:root {
    --auth-navy: #08152d;
    --auth-navy-2: #0d2247;
    --auth-blue: #2f8cff;
    --auth-purple: #8b5cf6;
    --auth-cyan: #23c8ff;
    --auth-text: #101b35;
    --auth-muted: #68738d;
    --auth-surface: #ffffff;
    --auth-page: #f5f8fe;
    --auth-border: #dfe6f3;
    --auth-input: #f8faff;
    --auth-shadow: 0 28px 70px rgba(26, 47, 91, .14);
}

[data-am-theme="dark"] {
    --auth-text: #f6f8ff;
    --auth-muted: #aab5cc;
    --auth-surface: #121d35;
    --auth-page: #091226;
    --auth-border: #273553;
    --auth-input: #0e1930;
    --auth-shadow: 0 28px 80px rgba(0, 0, 0, .34);
    color-scheme: dark;
}

html, body { min-height: 100%; }
body.auth-body {
    margin: 0;
    min-width: 320px;
    background: var(--auth-page);
    color: var(--auth-text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(430px, 46%) minmax(520px, 54%);
    background: var(--auth-page);
}

.auth-brand-panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 34px clamp(34px, 4vw, 72px) 42px;
    color: #fff;
    background:
        radial-gradient(circle at 72% 25%, rgba(35, 200, 255, .22), transparent 28%),
        radial-gradient(circle at 20% 82%, rgba(139, 92, 246, .28), transparent 34%),
        linear-gradient(145deg, #071329 0%, #0c2148 58%, #101a39 100%);
}

.auth-brand-topbar,
.auth-brand-content {
    position: relative;
    z-index: 2;
}

.auth-brand-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}
.auth-brand-logo:hover { color: inherit; }
.auth-brand-logo img { width: 54px; height: 54px; flex: 0 0 auto; }
.auth-brand-logo span { display: flex; flex-direction: column; line-height: 1; }
.auth-brand-logo strong { font-size: 1.08rem; letter-spacing: .055em; }
.auth-brand-logo small { margin-top: 7px; font-size: .56rem; letter-spacing: .24em; opacity: .62; }

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 12px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 700;
}
.auth-back-link:hover { color: #fff; background: rgba(255,255,255,.07); }

.auth-brand-content {
    max-width: 610px;
    min-height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 52px;
    padding: 70px 0 50px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px 13px;
    border: 1px solid rgba(77, 178, 255, .28);
    border-radius: 999px;
    background: rgba(35, 138, 255, .12);
    color: #cfebff;
    font-size: .82rem;
    font-weight: 750;
}

.auth-brand-copy h1 {
    max-width: 570px;
    margin: 0;
    font-size: clamp(2.5rem, 4.3vw, 4.65rem);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 850;
}
.auth-brand-copy h1::after {
    content: "";
    display: block;
    width: 120px;
    height: 5px;
    margin-top: 24px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--auth-cyan), var(--auth-purple));
}
.auth-brand-copy > p {
    max-width: 540px;
    margin: 24px 0 0;
    color: rgba(255,255,255,.72);
    font-size: 1.04rem;
    line-height: 1.7;
}

.auth-benefits {
    display: grid;
    gap: 13px;
    margin-top: 32px;
}
.auth-benefits > div {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255,255,255,.9);
    font-size: .94rem;
    font-weight: 650;
}
.auth-benefit-icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(18, 206, 153, .16);
    color: #55e6b7;
}

.auth-assistant-card {
    width: min(430px, 100%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 18px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 20px;
    background: rgba(255,255,255,.075);
    box-shadow: 0 18px 44px rgba(0,0,0,.16);
    backdrop-filter: blur(14px);
}
.auth-assistant-card img { width: 62px; height: 62px; }
.auth-assistant-card div { display: grid; gap: 4px; }
.auth-assistant-card strong { font-size: .95rem; }
.auth-assistant-card span { color: rgba(255,255,255,.64); font-size: .82rem; line-height: 1.45; }

.auth-brand-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}
.auth-orb-one { width: 330px; height: 330px; right: -170px; bottom: -100px; border: 1px solid rgba(47,140,255,.32); }
.auth-orb-two { width: 220px; height: 220px; right: -95px; bottom: -35px; border: 1px solid rgba(139,92,246,.28); }

.auth-form-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px clamp(26px, 4vw, 64px) 24px;
    background: var(--auth-page);
}

.auth-form-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.auth-language-switcher {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: var(--auth-surface);
}
.auth-language-switcher button {
    width: 34px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--auth-muted);
    font-size: .7rem;
    font-weight: 850;
}
.auth-language-switcher button:hover { background: rgba(47,140,255,.09); color: var(--auth-blue); }
.auth-theme-toggle {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: var(--auth-surface);
    color: var(--auth-muted);
}
.auth-theme-toggle:hover { color: var(--auth-purple); border-color: rgba(139,92,246,.35); }

.auth-mobile-brand { display: none; }
.auth-form-wrap {
    width: min(520px, 100%);
    margin: auto;
    padding: 44px 0 36px;
}

.auth-card {
    padding: clamp(28px, 3vw, 42px);
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
}
.auth-card-heading { margin-bottom: 30px; }
.auth-card-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--auth-blue);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.auth-card h2 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 850;
}
.auth-card-heading p {
    margin: 13px 0 0;
    color: var(--auth-muted);
    line-height: 1.6;
}
.auth-form { display: grid; gap: 19px; }
.auth-field { display: grid; gap: 8px; }
.auth-field label { color: var(--auth-text); font-size: .84rem; font-weight: 800; }
.auth-input-wrap {
    min-height: 52px;
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    background: var(--auth-input);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-input-wrap:focus-within {
    border-color: rgba(47,140,255,.72);
    box-shadow: 0 0 0 4px rgba(47,140,255,.11);
    background: var(--auth-surface);
}
.auth-input-wrap > i { color: #8995ad; font-size: 1rem; }
.auth-input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    color: var(--auth-text) !important;
    box-shadow: none !important;
    font: inherit;
}
.auth-input-wrap input::placeholder { color: #9ba6bb; }
.auth-password-toggle {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--auth-muted);
}
.auth-password-toggle:hover { background: rgba(47,140,255,.08); color: var(--auth-blue); }
.auth-field-error { min-height: 0; color: #e74b67; font-size: .76rem; }
.auth-field-help { color: var(--auth-muted); font-size: .74rem; line-height: 1.45; }

.auth-validation-summary {
    display: none;
    padding: 12px 14px;
    border: 1px solid rgba(231,75,103,.2);
    border-radius: 12px;
    background: rgba(231,75,103,.07);
    color: #d83f5d;
    font-size: .82rem;
}
.auth-validation-summary.validation-summary-errors { display: block; }
.auth-validation-summary ul { margin: 0; padding-left: 18px; }

.auth-form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -2px;
    font-size: .82rem;
}
.auth-form-meta a, .auth-switch a, .auth-legal a { color: var(--auth-blue); font-weight: 750; text-decoration: none; }
.auth-form-meta a:hover, .auth-switch a:hover, .auth-legal a:hover { text-decoration: underline; }
.auth-check { display: inline-flex; align-items: center; gap: 8px; color: var(--auth-muted); cursor: pointer; }
.auth-check input { width: 17px; height: 17px; accent-color: var(--auth-blue); }

.auth-submit {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 3px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(100deg, #25b6ff 0%, #347fff 48%, #9a4df5 100%);
    box-shadow: 0 13px 30px rgba(70,104,255,.24);
    color: #fff;
    font-weight: 850;
    transition: transform .18s ease, box-shadow .18s ease;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 17px 36px rgba(70,104,255,.3); }
.auth-submit:focus-visible, .auth-theme-toggle:focus-visible, .auth-password-toggle:focus-visible,
.auth-language-switcher button:focus-visible { outline: 3px solid rgba(47,140,255,.28); outline-offset: 2px; }

.auth-switch {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
    color: var(--auth-muted);
    font-size: .84rem;
}
.auth-legal { margin: 0; color: var(--auth-muted); font-size: .72rem; line-height: 1.55; text-align: center; }

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(720px, 100%);
    margin: 0 auto;
    color: var(--auth-muted);
    font-size: .72rem;
}
.auth-footer div { display: flex; gap: 16px; }
.auth-footer a { color: inherit; text-decoration: none; }
.auth-footer a:hover { color: var(--auth-blue); }

[data-am-theme="dark"] .auth-card { box-shadow: var(--auth-shadow); }
[data-am-theme="dark"] .auth-language-switcher,
[data-am-theme="dark"] .auth-theme-toggle { background: #101a30; }

@media (max-width: 1050px) {
    .auth-shell { grid-template-columns: 40% 60%; }
    .auth-brand-panel { padding-left: 34px; padding-right: 34px; }
    .auth-brand-copy h1 { font-size: clamp(2.15rem, 4vw, 3.2rem); }
    .auth-back-link span { display: none; }
}

@media (max-width: 820px) {
    .auth-shell { display: block; min-height: 100vh; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { min-height: 100vh; padding: 18px 20px 20px; }
    .auth-form-toolbar { order: 0; }
    .auth-mobile-brand { display: block; margin-top: 18px; }
    .auth-mobile-brand .auth-brand-logo { color: var(--auth-text); }
    .auth-mobile-brand .auth-brand-logo img { width: 44px; height: 44px; }
    .auth-mobile-brand .auth-brand-logo strong { font-size: .92rem; }
    .auth-mobile-brand .auth-brand-logo small { color: var(--auth-muted); font-size: .48rem; }
    .auth-form-wrap { width: min(540px, 100%); padding: 34px 0 26px; }
    .auth-footer { margin-top: auto; }
}

@media (max-width: 520px) {
    .auth-form-panel { padding: 15px 14px 18px; }
    .auth-card { padding: 25px 20px; border-radius: 22px; box-shadow: 0 18px 45px rgba(26,47,91,.1); }
    .auth-form-wrap { padding-top: 26px; }
    .auth-form-meta { align-items: flex-start; }
    .auth-footer { flex-direction: column; text-align: center; }
    .auth-footer div { flex-wrap: wrap; justify-content: center; }
}


/* FULL MOBILE AUTH PATCH · touch targets and narrow-screen toolbar */
.auth-language-switcher button,
.auth-theme-toggle,
.auth-password-toggle {
    min-width: 44px;
    min-height: 44px;
}

@media (max-width: 575.98px) {
    .auth-form-toolbar {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .auth-language-switcher {
        max-width: calc(100% - 52px);
    }

    .auth-language-switcher button {
        width: 44px;
        height: 44px;
    }

    .auth-theme-toggle,
    .auth-password-toggle {
        width: 44px;
        height: 44px;
    }

    .auth-card {
        padding: 22px 16px;
        border-radius: 20px;
    }
}
