/* ============================================================
   GRCompli — Auth pages (/login, /register)
   Self-contained stylesheet. No @imports.
   ============================================================ */

:root {
    --bg-0: #0b0f1a;
    --bg-1: #0f1424;
    --bg-2: #131a31;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #e6e9f2;
    --text-dim: #a8b0c5;
    --text-mute: #7c869f;
    --accent: #6366f1;
    --accent-2: #22d3ee;
    --accent-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #22d3ee 100%);
    --danger-bg: rgba(239, 68, 68, 0.08);
    --danger-border: rgba(239, 68, 68, 0.35);
    --danger-text: #fca5a5;
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.6),
                 0 18px 36px -18px rgba(99, 102, 241, 0.25);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--text);
    background: var(--bg-0);
}

body {
    display: grid;
    grid-template-columns: minmax(380px, 1fr) 1.1fr;
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 12% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
        radial-gradient(900px 500px at 100% 100%, rgba(34, 211, 238, 0.12), transparent 60%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- Left panel — form ---------------- */
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

.form-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    animation: fadeUp 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Brand pill above heading */
.form-card__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.02em;
}
.form-card__brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px -4px rgba(99, 102, 241, 0.5);
}
.form-card__brand-name { font-weight: 600; color: var(--text); }

.form-card h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}
.form-card .lede {
    margin: 0 0 28px 0;
    font-size: 14.5px;
    color: var(--text-dim);
    line-height: 1.55;
}

/* Error banner */
.error-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-md);
    color: var(--danger-text);
    font-size: 13.5px;
}
.error-msg svg circle,
.error-msg svg path { stroke: currentColor; }
.error-msg svg circle[fill] { fill: currentColor; }

/* SSO buttons */
.sso-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.sso-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.sso-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    text-decoration: none;
    transform: translateY(-1px);
}
.sso-btn:active { transform: translateY(0); }

/* Divider */
.divider {
    position: relative;
    text-align: center;
    color: var(--text-mute);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 20px 0;
}
.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 80px);
    height: 1px;
    background: var(--border);
}
.divider::before { left: 0; }
.divider::after  { right: 0; }

/* Form fields */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
}
.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.form-label-row .form-label { margin-bottom: 0; }
.form-link-inline {
    font-size: 12.5px;
    color: var(--accent-2);
    text-decoration: none;
}
.form-link-inline:hover { text-decoration: underline; }

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.form-input::placeholder { color: var(--text-mute); }
.form-input:hover { border-color: rgba(255, 255, 255, 0.22); }
.form-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Password strength bar */
.pw-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}
.pw-strength-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-grad);
    transition: width 0.25s ease;
    border-radius: 999px;
}

/* Submit */
.submit-btn {
    width: 100%;
    height: 46px;
    margin-top: 8px;
    background: var(--accent-grad);
    color: #fff;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.6);
    transition: transform 0.12s, box-shadow 0.2s, filter 0.15s;
}
.submit-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.submit-btn:active { transform: translateY(0); }
.submit-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35),
                0 12px 30px -10px rgba(99, 102, 241, 0.6);
}

/* Footer links */
.form-footer {
    margin: 22px 0 0 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-dim);
}
.form-footer a { color: var(--accent-2); font-weight: 500; }

.legal-line {
    margin: 18px 0 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-mute);
    line-height: 1.6;
}
.legal-line a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- Right panel — hero ---------------- */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    background:
        radial-gradient(1000px 500px at 80% 20%, rgba(139, 92, 246, 0.18), transparent 60%),
        radial-gradient(800px 600px at 20% 80%, rgba(34, 211, 238, 0.14), transparent 60%),
        linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 100%);
    border-left: 1px solid var(--border);
}

/* Animated background glows */
.hero__glow-blue,
.hero__glow-green {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    pointer-events: none;
    animation: float 14s ease-in-out infinite;
}
.hero__glow-blue {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -120px;
    right: -80px;
}
.hero__glow-green {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
    bottom: -100px;
    left: -60px;
    animation-delay: -7s;
}
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    50%      { transform: translateY(-20px) translateX(20px) scale(1.05); }
}

.hero__content { position: relative; z-index: 1; }

.hero__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}
.hero__brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #fff 0%, #d4d4d8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(255, 255, 255, 0.15);
}

.hero__quote-block {
    position: relative;
    z-index: 1;
    max-width: 540px;
}
.hero__eyebrow {
    display: inline-block;
    padding: 5px 12px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
}
.hero__quote-mark {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 96px;
    line-height: 0.7;
    color: rgba(99, 102, 241, 0.55);
    margin-bottom: 4px;
}
.hero__quote {
    margin: 0;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.025em;
    color: var(--text);
}
.hero__quote em {
    font-style: normal;
    background: linear-gradient(135deg, #a5b4fc 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero__attribution {
    margin-top: 22px;
    font-size: 13.5px;
    color: var(--text-mute);
    letter-spacing: 0.04em;
}

.hero__footer {
    position: relative;
    z-index: 1;
    font-size: 12.5px;
    color: var(--text-mute);
    letter-spacing: 0.04em;
}
.hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.hero__chip {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-dim);
    transition: background 0.15s, border-color 0.15s;
}
.hero__chip:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--border-strong);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
    body { grid-template-columns: 1fr; }
    .hero { display: none; }
    .form-panel { padding: 32px 20px; }
}

@media (max-width: 480px) {
    .form-card { padding: 28px 22px; border-radius: 14px; }
    .form-card h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__glow-blue, .hero__glow-green { animation: none; }
    .form-card { animation: none; }
}
