:root {
    color-scheme: light dark;
    --brand-blue: #005d85;
    --brand-green: #00b595;
    --page: #f0f5f5;
    --surface: #fff;
    --field: #f7f9fa;
    --ink: #00364f;
    --muted: #58707c;
    --border: #d6e1e5;
    --link: #005d85;
    --accent-soft: #e4f6f1;
    --focus: #007b68;
    --danger: #b3263a;
    --danger-bg: #fff0f2;
    --success: #14664b;
    --success-bg: #e6f6ef;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--surface);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: .9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
::selection { background: #00b59540; color: var(--ink); }
a { color: var(--link); text-underline-offset: 4px; }
a:hover { color: var(--focus); }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 10; padding: 12px 20px; background: var(--surface); border-radius: 12px; }
.skip-link:focus { top: 12px; }
.auth-page { width: min(1320px, 100% - 96px); margin-inline: auto; }
.site-header { height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 27px; font-weight: 750; letter-spacing: -1px; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 50%; }
.brand-dot { color: var(--brand-green); }
.header-label { font-size: .8125rem; color: var(--muted); }
.auth-shell { display: grid; grid-template-columns: .95fr 1.05fr; min-height: 680px; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; overflow: clip; box-shadow: 0 24px 80px -50px #00364f40; }
.auth-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 52px 44px 34px; background: radial-gradient(ellipse at 95% 100%, #007b7270, transparent 65%), #00364f; color: #fff; }
.story-copy, .story-footer { position: relative; z-index: 1; }
.eyebrow { display: block; font-size: .625rem; font-weight: 750; letter-spacing: 2px; line-height: 1.6; }
.story-copy .eyebrow { color: #bce8e0; display: flex; align-items: center; gap: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #37dbb8; box-shadow: 0 0 0 4px #37dbb817; flex: 0 0 auto; }
.story-copy h2 { margin: 30px 0 22px; font-size: clamp(2.6rem, 3.7vw, 3.45rem); font-weight: 650; letter-spacing: -2.5px; line-height: 1.08; }
.story-copy h2 em { font-style: normal; color: #48dfbd; }
.story-copy p { color: #b8d0db; font-size: .9375rem; line-height: 1.8; margin: 0; }
.track-art { position: relative; flex: 1; min-height: 260px; margin: 0 -44px; }
.track-art svg { position: absolute; width: 112%; height: 380px; left: -6%; top: -38px; overflow: visible; stroke: #5ddac532; stroke-width: 1; }
.track-art .track-highlight { stroke: #44e0bd; stroke-width: 2; stroke-dasharray: 160 1614; animation: track-run 16s linear infinite; }
.track-caption { position: absolute; bottom: 38px; left: 44px; color: #9bc8cf; font-size: .5625rem; letter-spacing: 2px; }
.track-arrow { position: absolute; right: 42px; bottom: 22px; font-size: 44px; font-weight: 200; color: #47d7b8; }
.story-footer { display: flex; align-items: center; gap: 12px; color: #c0d7df; font-size: .75rem; }
.story-rule { width: 24px; height: 2px; background: var(--brand-green); }
.auth-content { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 48px 56px; }
.auth-content:focus { outline: none; }
.auth-form { width: 100%; max-width: 420px; animation: arrive .45s ease-out both; }
.content-eyebrow { color: var(--focus); margin-bottom: 20px; }
h1 { font-size: 2rem; line-height: 1.17; letter-spacing: -1px; font-weight: 700; margin: 0 0 14px; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.3px; }
h3 { font-size: 1.375rem; font-weight: 650; letter-spacing: -.4px; margin-bottom: 20px; }
h4 { font-size: 1.125rem; font-weight: 650; }
p { color: var(--muted); margin-bottom: 24px; }
.form-intro { margin-bottom: 30px; }
form { margin-top: 24px; }
.form-label, .form-floating > label { font-size: .8125rem; font-weight: 600; color: var(--ink); }
.form-label { margin-bottom: 8px; }
.form-control, .form-select {
    min-height: 50px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    background-color: var(--field); color: var(--ink); font-size: .9375rem;
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.form-control::placeholder { color: var(--muted); opacity: .8; }
.form-control:hover, .form-select:hover { border-color: var(--muted); }
.form-control:focus, .form-select:focus { border-color: var(--focus); background-color: var(--surface); color: var(--ink); box-shadow: 0 0 0 3px #00b59520; }
.form-control:disabled, .form-control[readonly] { background: var(--page); color: var(--muted); opacity: 1; }
.form-floating > label { background: transparent; }
.form-floating > .form-control:focus ~ label::after, .form-floating > .form-control:not(:placeholder-shown) ~ label::after { background: var(--field); }
input[type="checkbox"] { accent-color: var(--brand-blue); width: 17px; height: 17px; vertical-align: middle; margin-right: 7px; }
.form-check-input:checked { background-color: var(--brand-blue); border-color: var(--brand-blue); }
.form-options { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 22px 0 26px; font-size: .8125rem; }
.remember-option { display: inline-flex; gap: 2px; align-items: center; cursor: pointer; min-height: 32px; }
.form-options a { font-weight: 600; }
.form-text, .text-muted { color: var(--muted) !important; font-size: .75rem; line-height: 1.6; }
.form-text { margin-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; border-radius: 10px; padding: 12px 20px; font-size: .875rem; font-weight: 650; line-height: 1.5; transition: background-color .18s, box-shadow .18s, transform .18s; white-space: normal; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible, .btn-primary:active { background: #004c6e !important; border-color: #004c6e !important; color: #fff !important; box-shadow: 0 6px 18px #005d8526; }
.btn-primary:disabled { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; opacity: .6; }
.btn-outline-primary, .btn-secondary { color: var(--link); background: transparent; border-color: var(--border); }
.btn-outline-primary:hover, .btn-secondary:hover { color: var(--link); background: var(--accent-soft); border-color: var(--focus); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn-link { color: var(--link); }
.auth-submit { width: 100%; justify-content: space-between; }
.auth-submit span[aria-hidden] { font-size: 20px; line-height: 1; font-weight: 400; }
.account-prompt { margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--border); font-size: .8125rem; text-align: center; }
.account-prompt a { font-weight: 650; }
.secondary-link { margin: 14px 0 0; text-align: center; font-size: .75rem; }
.secondary-link a { color: var(--muted); }
.account-actions { display: grid; gap: 12px; margin-top: 30px; }
.account-identity { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--field); overflow-wrap: anywhere; }
.account-identity span { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.account-identity strong { font-weight: 600; }
.text-danger, .field-validation-error { color: var(--danger) !important; font-size: .8125rem; }
.field-validation-error { display: block; margin-top: 6px; }
.input-validation-error { border-color: var(--danger); }
.validation-summary-valid, .field-validation-valid { display: none; }
.validation-summary-errors { padding: 14px 16px; background: var(--danger-bg); border: 1px solid var(--danger); border-radius: 10px; margin-bottom: 20px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.alert { border-radius: 10px; font-size: .875rem; overflow-wrap: anywhere; }
.alert-success { color: var(--success); background: var(--success-bg); border-color: var(--success); }
.alert-danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }
.alert-warning { color: #775000; background: #fff5d6; border-color: #cfac57; }
hr { border-color: var(--border); opacity: 1; margin: 24px 0; }
/* Identity's built-in recovery/confirmation pages use Bootstrap columns inside this form. */
.auth-shell:not(.auth-shell--manage) .auth-form > .row > [class*="col-"] { width: 100%; }
.auth-shell:not(.auth-shell--manage) .auth-form > h2 { color: var(--muted); font-size: .9375rem; font-weight: 400; line-height: 1.6; letter-spacing: 0; }
.auth-shell:not(.auth-shell--manage) .auth-form > hr { display: none; }
.auth-shell--manage { grid-template-columns: 1fr; min-height: 620px; }
.auth-shell--manage .auth-story { display: none; }
.auth-shell--manage .auth-content { align-items: flex-start; padding: 48px; }
.auth-shell--manage .auth-form { max-width: none; }
.auth-shell--manage .auth-form > div > h2 { color: var(--muted); font-size: 1rem; font-weight: 400; margin-top: 12px; }
.auth-shell--manage .nav-pills { gap: 6px; padding-right: 20px; }
.nav-pills .nav-link { color: var(--muted); border-radius: 10px; padding: 12px 16px; font-size: .875rem; font-weight: 550; }
.nav-pills .nav-link:hover { color: var(--ink); background: var(--field); }
.nav-pills .nav-link.active { color: var(--link); background: var(--accent-soft); font-weight: 650; }
.auth-shell--manage .col-lg-9 { padding-left: 36px; border-left: 1px solid var(--border); }
.auth-shell--manage .col-xl-6 { width: 100%; max-width: 520px; }
.auth-shell--manage form { margin-top: 0; }
.auth-shell--manage .input-group .form-control { min-width: 0; }
.auth-shell--manage .input-group-text { background: var(--accent-soft); color: var(--success); border-color: var(--border); }
.auth-shell--manage .btn { margin-bottom: 6px; }
.auth-form pre, .auth-form code { color: var(--link); overflow-wrap: anywhere; white-space: pre-wrap; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px 2px 28px; color: var(--muted); font-size: .6875rem; }
@keyframes track-run { to { stroke-dashoffset: -1774; } }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-color-scheme: dark) {
    :root { --page: #081b26; --surface: #102a38; --field: #0c2432; --ink: #e6f2f5; --muted: #a1b7c3; --border: #2d4754; --link: #6fcee9; --accent-soft: #123f40; --focus: #44d6b5; --danger: #ff9cab; --danger-bg: #412632; --success: #75dfb8; --success-bg: #153e36; }
    .auth-story { background: radial-gradient(ellipse at 95% 100%, #007b7250, transparent 65%), #052f44; }
    .auth-shell { box-shadow: 0 24px 80px -50px #0008; }
    .btn-primary { background: #0078a4; border-color: #0078a4; }
    .btn-primary:hover, .btn-primary:focus-visible, .btn-primary:active { background: #0082af !important; border-color: #0082af !important; }
    .btn-danger { color: #321321; }
    .alert-warning { color: #f2d58e; background: #403719; border-color: #7b6933; }
    .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
    .form-check-input { background-color: var(--field); border-color: var(--muted); }
    .form-check-input:checked { background-color: var(--brand-blue); }
}
@media (min-width: 1600px) { .auth-page { padding-top: 30px; } }
@media (max-width: 1100px) {
    .auth-page { width: calc(100% - 48px); }
    .auth-story { padding-inline: 32px; }
    .auth-content { padding: 40px 32px; }
    .story-copy h2 { font-size: 2.75rem; }
    .story-copy .eyebrow { font-size: .5625rem; letter-spacing: 1.2px; }
    .track-art { margin-inline: -32px; }
    .track-caption { left: 32px; }
}
@media (max-width: 991.98px) {
    .auth-shell--manage .auth-content { padding: 28px; }
    .auth-shell--manage .nav-pills { flex-direction: row !important; padding: 0 0 20px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
    .auth-shell--manage .nav-pills .nav-link { padding: 10px 12px; font-size: .8125rem; }
    .auth-shell--manage .col-lg-9 { padding-left: 12px; border-left: 0; }
}
@media (max-width: 800px) {
    .auth-page { max-width: 600px; }
    .site-header { height: 88px; }
    .header-label { display: none; }
    .auth-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 20px; }
    .auth-story { padding: 24px 28px; }
    .story-copy .eyebrow, .story-copy p, .track-art, .story-footer { display: none; }
    .story-copy h2 { font-size: 1.375rem; letter-spacing: -.5px; margin: 0; }
    .story-copy h2 br { display: none; }
    .auth-content { padding: 36px 28px; }
    .content-eyebrow { margin-bottom: 16px; }
    h1 { font-size: 1.75rem; }
}
@media (max-width: 420px) {
    .auth-page { width: calc(100% - 28px); }
    .site-header { height: 76px; }
    .brand { font-size: 24px; }
    .brand img { width: 34px; height: 34px; }
    .auth-content, .auth-shell--manage .auth-content { padding: 30px 20px; }
    .auth-story { padding: 22px 20px; }
    .story-copy h2 { font-size: 1.25rem; }
    .form-options { gap: 8px; font-size: .75rem; }
    .form-control { font-size: 1rem; }
    .site-footer { font-size: .625rem; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
    .btn, .nav-link.active { border: 1px solid ButtonText; }
    .track-art { display: none; }
}
