:root {
            --brand: #635BFF;
            --brand-600: #5147F5;
            --ink: #101828;
            --body: #475467;
            --muted: #667085;
            --faint: #98A2B3;
            --line: #EAECF0;
            --danger: #F04438;
            --success: #12B76A;
        }

        *, *::before, *::after { box-sizing: border-box; }

        html, body { height: 100%; }

        body {
            margin: 0;
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            color: var(--body);
            background: #F7F8FC;
            -webkit-font-smoothing: antialiased;
        }

        h1, h2, h3, p { margin: 0; }

        a { color: inherit; text-decoration: none; }

        .auth-shell {
            min-height: 100vh;
            display: grid;
            grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
        }

        /* ── Brand side ─────────────────────────────────────────── */
        .auth-brand {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 40px;
            padding: 48px 56px;
            color: #fff;
            overflow: hidden;
            background:
                radial-gradient(900px 500px at 10% -10%, rgba(124, 117, 255, .55), transparent 60%),
                radial-gradient(700px 500px at 100% 110%, rgba(20, 184, 166, .28), transparent 60%),
                linear-gradient(145deg, #14122B 0%, #1B1840 48%, #101828 100%);
        }

        .auth-brand::after {
            content: '';
            position: absolute;
            inset: 0;
            background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
            background-size: 26px 26px;
            mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%);
            pointer-events: none;
        }

        .brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }

        .brand-mark {
            width: 42px;
            height: 42px;
            display: grid;
            place-items: center;
            border-radius: 12px;
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 19px;
            font-weight: 800;
            color: #fff;
            background: linear-gradient(135deg, #7C75FF, #5147F5);
            box-shadow: 0 12px 28px -10px rgba(99, 91, 255, .9);
        }

        .brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; background: #fff; }

        .brand-lockup-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
        .brand-lockup-tag { font-size: 10.5px; color: rgba(255,255,255,.55); letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }

        .brand-copy { position: relative; z-index: 1; max-width: 460px; }

        .brand-eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 10.5px;
            font-weight: 600;
            letter-spacing: .06em;
            text-transform: uppercase;
            color: #D9DAFF;
            background: rgba(124, 117, 255, .16);
            border: 1px solid rgba(124, 117, 255, .28);
        }

        .brand-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: clamp(30px, 3.4vw, 44px);
            line-height: 1.12;
            font-weight: 800;
            letter-spacing: -.035em;
            margin-top: 18px;
        }

        .brand-title em { font-style: normal; color: #A9A4FF; }

        .brand-sub { margin-top: 16px; font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.64); max-width: 420px; }

        .brand-points { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }

        .brand-point { display: flex; align-items: flex-start; gap: 11px; }

        .brand-point-icon {
            width: 34px;
            height: 34px;
            flex-shrink: 0;
            display: grid;
            place-items: center;
            border-radius: 9px;
            font-size: 14px;
            color: #C7C4FF;
            background: rgba(255,255,255,.06);
            border: 1px solid rgba(255,255,255,.10);
        }

        .brand-point-title { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.92); }
        .brand-point-sub { font-size: 11px; line-height: 1.5; color: rgba(255,255,255,.48); margin-top: 2px; }

        .brand-foot {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding-top: 18px;
            border-top: 1px solid rgba(255,255,255,.10);
            font-size: 10.5px;
            color: rgba(255,255,255,.42);
        }

        .brand-status { display: inline-flex; align-items: center; gap: 7px; }
        .brand-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #12B76A; box-shadow: 0 0 0 3px rgba(18,183,106,.18); }

        /* ── Form side ──────────────────────────────────────────── */
        .auth-main {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 32px;
            background:
                radial-gradient(700px 400px at 110% -10%, #EEF0FF 0%, transparent 60%),
                #F7F8FC;
        }

        .auth-card { width: 100%; max-width: 396px; }

        .auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 26px; }
        .auth-mobile-brand .brand-mark { width: 36px; height: 36px; font-size: 16px; }
        .auth-mobile-brand .brand-lockup-name { color: var(--ink); }
        .auth-mobile-brand .brand-lockup-tag { color: var(--faint); }

        .auth-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); }

        .auth-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 27px;
            font-weight: 800;
            letter-spacing: -.03em;
            color: var(--ink);
            margin-top: 8px;
        }

        .auth-sub { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 7px; }

        .auth-alert {
            display: flex;
            align-items: flex-start;
            gap: 9px;
            margin-top: 20px;
            padding: 11px 13px;
            border-radius: 10px;
            font-size: 11.5px;
            line-height: 1.5;
            color: #B42318;
            background: #FFFBFA;
            border: 1px solid #FECDCA;
        }

        .auth-alert.is-success { color: #027A48; background: #F6FEF9; border-color: #A6F4C5; }

        .auth-form { margin-top: 24px; }

        .field { margin-bottom: 16px; }

        .field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }

        .field label { font-size: 11px; font-weight: 600; color: #344054; letter-spacing: .01em; }

        .field-link { font-size: 11px; font-weight: 600; color: var(--brand-600); }
        .field-link:hover { text-decoration: underline; }

        .input-wrap { position: relative; }

        .input-wrap > .bi {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            color: var(--faint);
            pointer-events: none;
        }

        .input {
            width: 100%;
            height: 46px;
            padding: 0 14px 0 41px;
            border-radius: 11px;
            border: 1px solid var(--line);
            background: #fff;
            font-family: inherit;
            font-size: 13px;
            color: var(--ink);
            outline: none;
            transition: border-color .15s, box-shadow .15s;
        }

        .input::placeholder { color: var(--faint); }

        .input:focus {
            border-color: rgba(99, 91, 255, .6);
            box-shadow: 0 0 0 4px rgba(99, 91, 255, .10);
        }

        .input.is-invalid { border-color: #FDA29B; background: #FFFBFA; }
        .input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(240, 68, 56, .10); }
        .input--password { padding-right: 46px; }
        .auth-alert-icon { margin-top: 1px; }
        .text-ink { color: var(--ink); }

        .input-wrap .reveal {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            display: grid;
            place-items: center;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: var(--faint);
            font-size: 13px;
            cursor: pointer;
        }

        .input-wrap .reveal:hover { background: #F2F4F7; color: var(--body); }

        .error-text { margin-top: 5px; font-size: 10.5px; font-weight: 500; color: #B42318; }

        .auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 20px; }

        .check { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
        .check input { width: 15px; height: 15px; border-radius: 4px; accent-color: var(--brand); cursor: pointer; }

        .btn-submit {
            width: 100%;
            height: 46px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border: 0;
            border-radius: 11px;
            font-family: inherit;
            font-size: 13px;
            font-weight: 700;
            color: #fff;
            cursor: pointer;
            background: linear-gradient(135deg, #6C64FF, #5147F5);
            box-shadow: 0 10px 22px -10px rgba(81, 71, 245, .8);
            transition: transform .15s, box-shadow .15s, opacity .15s;
        }

        .btn-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(81, 71, 245, .85); }
        .btn-submit:active { transform: translateY(0); }

        .auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
        .auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }

        .back-store {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            height: 42px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: #fff;
            font-size: 11.5px;
            font-weight: 600;
            color: var(--body);
            transition: border-color .15s, color .15s;
        }

        .back-store:hover { border-color: #C7CBD5; color: var(--ink); }

        .auth-foot { margin-top: 22px; text-align: center; font-size: 10.5px; color: var(--faint); line-height: 1.6; }
        .auth-lang { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
        .auth-lang a { color: var(--brand-600); font-weight: 600; }

        .demo-note {
            margin-top: 18px;
            padding: 10px 12px;
            border-radius: 9px;
            border: 1px dashed #D0D5DD;
            background: rgba(255,255,255,.7);
            font-size: 10.5px;
            line-height: 1.55;
            color: var(--muted);
        }

        .demo-note code { font-size: 10px; color: var(--ink); background: #F2F4F7; padding: 1px 5px; border-radius: 4px; }

        @media (max-width: 980px) {
            .auth-shell { grid-template-columns: minmax(0, 1fr); }
            .auth-brand { display: none; }
            .auth-mobile-brand { display: flex; }
            .auth-main { padding: 32px 20px; align-items: flex-start; padding-top: 44px; }
            .auth-card { max-width: 420px; margin: 0 auto; }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
        }

/* Theme */
html[data-theme="dark"] {
    --ink: #F2F4F7;
    --body: #C1C7D2;
    --muted: #98A2B3;
    --faint: #7A879B;
    --line: #223049;
    --brand: #8B84FF;
    --brand-600: #A9A4FF;
}
html[data-theme="dark"] body { background: #080D17; }
html[data-theme="dark"] .auth-main {
    background: radial-gradient(700px 400px at 110% -10%, #191A33 0%, transparent 60%), #080D17;
}
html[data-theme="dark"] .auth-title { color: var(--ink); }
html[data-theme="dark"] .auth-sub { color: var(--muted); }
html[data-theme="dark"] .input,
html[data-theme="dark"] .back-store,
html[data-theme="dark"] .demo-note {
    background: #101827;
    border-color: var(--line);
    color: var(--ink);
}
html[data-theme="dark"] .auth-mobile-brand .brand-lockup-name { color: var(--ink); }
html[data-theme="dark"] .back-store:hover { background: #172339; border-color: #30415E; color: var(--ink); }
html[data-theme="dark"] .auth-theme { color: var(--body); background: #101827; border-color: var(--line); }

.auth-theme {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--body);
    font-size: 14px;
    cursor: pointer;
    z-index: 2;
}
.auth-main { position: relative; }
