/* =========================================================================
   Auth shell (Login / Register) — translated from the prototype's AuthShell.
   Theme-aware: light uses the app tokens; html.theme-dark uses the
   prototype's exact dark values. The promo panel stays dark-navy in both
   themes (same treatment as the landing hero).
   ========================================================================= */

/* Hide the app nav rows + footer on auth pages */
body:has(.acAuthShell) #topNavLoggedIn,
body:has(.acAuthShell) #topNavLoggedOut,
body:has(.acAuthShell) #middleNav,
body:has(.acAuthShell) #selectorNav,
body:has(.acAuthShell) .footerContainer { display: none !important; }
body:has(.acAuthShell) main { margin-bottom: 0 !important; }
body:has(.acAuthShell) main > .container { max-width: 100% !important; width: 100% !important; padding: 0 !important; }

.acAuthShell {
    min-height: calc(100vh - 76px);
    background: var(--ac-bg);
    color: var(--ac-ink);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
html.theme-dark .acAuthShell {
    background: radial-gradient(circle at top, #10294f 0%, #07111f 34%, #040b16 100%);
    color: #eef4ff;
}

/* Top bar: brand + theme toggle + back-to-home */
.acAuthBar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 24px;
    background: var(--ac-surface);
    border-bottom: 1px solid var(--ac-border);
}
html.theme-dark .acAuthBar { background: rgba(3,8,18,0.68); border-color: rgba(70,102,155,0.22); backdrop-filter: blur(10px); }
.acAuthBrand { font-weight: 800; font-size: 20px; color: var(--ac-ink); text-decoration: none !important; }
html.theme-dark .acAuthBrand { color: #eef4ff; }
.acAuthBar-right { display: flex; align-items: center; gap: 10px; }
/* Both bar controls share the app-wide 34px nav-control height */
.acAuthBar .themeToggleBtn { min-height: 34px; }
.acAuthBack {
    display: inline-flex; align-items: center; gap: 8px;
    box-sizing: border-box; min-height: 34px;
    border: 1px solid var(--ac-border); border-radius: 8px;
    background: var(--ac-surface); color: var(--ac-ink);
    padding: 4px 14px; font-size: 14px; text-decoration: none !important;
}
.acAuthBack:hover { background: var(--ac-bg); color: var(--ac-ink); }
html.theme-dark .acAuthBack { background: transparent; color: #eef4ff; border-color: rgba(255,255,255,0.5); }
html.theme-dark .acAuthBack:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* 1460px = the landing's .pl-container width, shared by all public pages */
.acAuthWrap { max-width: 1460px; margin: 0 auto; padding: 40px 24px; }
@media (min-width: 1200px) { .acAuthWrap { padding: 48px; } }

/* ---- Form card (left) ---- */
.acAuthCard {
    height: 100%;
    border-radius: 20px;
    padding: 28px;
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    box-shadow: var(--ac-shadow-md);
}
@media (min-width: 1200px) { .acAuthCard { padding: 44px; } }
html.theme-dark .acAuthCard {
    background: linear-gradient(180deg, rgba(7,20,43,0.96) 0%, rgba(5,14,30,0.90) 100%);
    border: 1px solid rgba(80,118,189,0.24);
    box-shadow: 0 24px 60px rgba(0,0,0,0.32);
}
.acAuthIcon {
    width: 56px; height: 56px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e8f0ff; color: #2556c6; font-size: 22px; margin-bottom: 16px;
}
html.theme-dark .acAuthIcon { background: rgba(45,124,255,0.14); color: #5fa1ff; }
/* No font-size — h1 titles use the stock h1 scale everywhere */
.acAuthTitle { font-weight: 800; color: var(--ac-ink); margin-bottom: 8px; }
html.theme-dark .acAuthTitle { color: #eef4ff; }
.acAuthSubtitle { color: var(--ac-muted); font-size: 17px; margin-bottom: 24px; }
html.theme-dark .acAuthSubtitle { color: #aebbd5; }

/* Inputs — bootstrap input-group with icon prefix */
.acAuthCard .form-label { color: var(--ac-ink); font-weight: 500; }
html.theme-dark .acAuthCard .form-label { color: #d8e4f8; }
.acAuthCard .input-group-text {
    background: var(--ac-bg); border-color: var(--ac-border); color: var(--ac-accent);
}
html.theme-dark .acAuthCard .input-group-text {
    background: rgba(255,255,255,0.06); border-color: rgba(124,164,233,0.18); color: #8fb8ff;
}
.acAuthCard .form-control { border-color: var(--ac-border); color: var(--ac-ink); }
/* Prefilled-and-locked fields (e.g. email on ResetPassword) */
.acAuthCard .form-control[readonly] { opacity: .65; cursor: not-allowed; }
html.theme-dark .acAuthCard .form-control {
    background: rgba(255,255,255,0.05); border-color: rgba(124,164,233,0.18); color: #eef4ff;
}
html.theme-dark .acAuthCard .form-control::placeholder { color: #6d80a0; }
html.theme-dark .acAuthCard .form-control:focus {
    background: rgba(255,255,255,0.07); color: #eef4ff;
    border-color: rgba(124,164,233,0.45); box-shadow: 0 0 0 .25rem rgba(45,124,255,.15);
}
/* Password eye-reveal: center it vertically in the taller lg input */
.acAuthCard #eyeIconContainer {
    top: 50%; transform: translateY(-50%);
    right: 12px;
    display: inline-flex; align-items: center;
    color: var(--ac-muted); cursor: pointer;
}
html.theme-dark .acAuthCard #eyeIconContainer { color: #8fb8ff; }
.acAuthCard #password { padding-right: 38px; }

/* intl-tel-input dropdown on dark */
html.theme-dark .acAuthCard .iti__selected-flag { background: rgba(255,255,255,0.06); }
html.theme-dark .acAuthCard .iti__country-list { background: #0f1a2e; color: #eef4ff; border-color: #24314a; }

/* Notification prefs box */
.acAuthPrefs {
    border-radius: 16px; padding: 16px;
    background: var(--ac-bg); border: 1px solid var(--ac-border);
}
html.theme-dark .acAuthPrefs { background: rgba(255,255,255,0.04); border-color: rgba(124,164,233,0.16); }
.acAuthPrefs .form-check-label { color: var(--ac-ink); }
html.theme-dark .acAuthPrefs .form-check-label { color: #eef4ff; }
.acAuthPrefs .subtitle { color: var(--ac-muted); font-size: 12px; margin-left: 1.6em; }
html.theme-dark .acAuthPrefs .subtitle { color: #93a4bd; }

/* Primary CTA + links */
.acAuthCta {
    background: #2d7cff; border: 1px solid #2d7cff; color: #fff;
    border-radius: 8px; padding: 12px 28px; font-size: 18px; font-weight: 600;
}
.acAuthCta:hover { background: #1f6bec; color: #fff; }
.acAuthLink { color: #62a2ff !important; text-decoration: none !important; font-size: 14px; }
.acAuthLink:hover { text-decoration: underline !important; }
html:not(.theme-dark) .acAuthLink { color: #2556c6 !important; }

.acAuthFooter {
    margin-top: 24px; padding-top: 16px;
    border-top: 1px solid var(--ac-border);
    color: var(--ac-muted); font-size: 14px;
}
html.theme-dark .acAuthFooter { border-color: rgba(80,118,189,0.18); color: #aebbd5; }

/* ---- Promo panel (right) — dark navy in BOTH themes, like the landing hero ---- */
.acAuthPromo {
    position: relative; overflow: hidden; height: 100%;
    min-height: 560px; border-radius: 20px;
    background: linear-gradient(135deg, rgba(9,31,67,0.98) 0%, rgba(7,18,36,0.92) 48%, rgba(18,67,157,0.75) 100%);
    border: 1px solid rgba(80,118,189,0.24);
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    color: #eef4ff;
}
.acAuthPromoGlow {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(74,140,255,0.35) 0%, rgba(74,140,255,0.08) 28%, rgba(0,0,0,0) 56%);
}
.acAuthPromoBody {
    position: relative; height: 100%;
    display: flex;
    flex-direction: column;
    padding: 28px;
}
@media (min-width: 1200px) { .acAuthPromoBody { padding: 44px; } }
.acAuthBadge {
    display: inline-block; align-self: flex-start;
    background: #2d7cff; color: #fff;
    border-radius: 6px; padding: 6px 12px;
    font-size: 12px; font-weight: 700; margin-bottom: 16px;
}
/* No font-size — h1 titles use the stock h1 scale everywhere */
.acAuthPromoTitle { font-weight: 800; margin-bottom: 16px; color: #f5f8ff; }
.acAuthPromoText { color: #c7d5ec; font-size: 18px; max-width: 520px; line-height: 1.6; margin-bottom: 24px; }
.acAuthFeature {
    border-radius: 16px; padding: 14px 16px; margin-top: 12px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(124,164,233,0.16);
}
.acAuthFeature-title { font-weight: 600; font-size: 18px; color: #eef4ff; margin-bottom: 2px; }
.acAuthFeature-desc { color: #bfd0eb; font-size: 14px; }

@media (max-width: 991.98px) {
    .acAuthPromo { min-height: 0; }
}
