/* ==========================================================================
   signin.css (every rule is scoped under .signin-shell so glass.css element rules such as
   html.glass-theme h1 / a cannot outrank it on production) — the sign-in shell: /login (password + verification code) and
   /logout (confirm + signed out). Loaded AFTER app.css and glass.css, scoped to
   body.signin-shell, so neither theme's .login-* rules reach these pages.
   Brand: DM Sans · navy #0B1D33 · gold #B59355 (same tokens as app.css).
   ========================================================================== */

/* html body… = (0,1,2): ties glass.css's `html.glass-theme body` and wins by order */
html body.signin-shell {
    --si-navy: #0B1D33;
    --si-navy-hover: #14304F;
    --si-gold: #B59355;
    --si-gold-soft: #E8C98A;
    --si-gold-ink: #7E6330;
    --si-page: #F5F1E8;
    --si-paper: #FFFFFF;
    --si-ink: #16213A;
    --si-ink-2: #4F5D73;
    --si-ink-3: #5F6B80;
    --si-line: #DAD4C6;
    --si-line-strong: #98A2B3;
    --si-danger: #B3261E;
    --si-danger-ink: #8C1D16;
    --si-danger-bg: #FCEEEC;
    --si-danger-line: #F0B8B3;
    --si-success: #1E6B45;
    --si-success-bg: #E8F3EC;
    --si-success-line: #B9DCC7;
    --si-warn-ink: #6F4E12;
    --si-warn-bg: #FBF3E2;
    --si-warn-line: #EAD3A1;
    --si-info-ink: #24364F;
    --si-info-bg: #EEF2F8;
    --si-info-line: #C9D3E3;
    --si-ring: 0 0 0 3px rgba(11, 29, 51, .16);

    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--si-page);
    color: var(--si-ink);
    font-family: var(--f-sans, 'DM Sans', system-ui, sans-serif);
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: normal;
    -webkit-font-smoothing: antialiased;
}
body.signin-shell::before, body.signin-shell::after { display: none; content: none; }

/* Skip link — visible only when focused */
.signin-shell .si-skip {
    position: absolute; left: 16px; top: -48px; z-index: 20;
    padding: 8px 12px; border-radius: 6px;
    background: var(--si-navy); color: #fff; font-weight: 600; text-decoration: none;
    transition: top .15s ease-out;
}
.signin-shell .si-skip:focus { top: 12px; outline: 2px solid var(--si-gold); outline-offset: 2px; }

/* -------------------------------------------------------------------------- */
/* Page: brand panel + form column                                             */
/* -------------------------------------------------------------------------- */

.signin-shell .si-page {
    display: grid;
    grid-template-columns: minmax(340px, 42%) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.signin-shell .si-brand {
    position: relative;
    display: flex; flex-direction: column;
    padding: 44px 52px 36px;
    background: var(--si-navy);
    color: #F3EEE3;
}
/* The one accent: a gold hairline on the seam between the two halves */
.signin-shell .si-brand::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--si-gold) 28%, var(--si-gold) 72%, transparent 100%);
    opacity: .9;
}
.signin-shell .si-brand-logo {
    display: block; width: 224px; height: auto;
    margin-left: -3px;   /* the crop keeps 6px of air; align the wordmark with the text column */
}
.signin-shell .si-brand-body { margin: auto 0; padding: 56px 0; max-width: 400px; }
.signin-shell .si-brand-lead {
    margin: 0 0 22px;
    font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.012em;
    color: #FFFFFF;
}
.signin-shell .si-brand-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.signin-shell .si-brand-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.5; color: #C9D0DC; }
.signin-shell .si-brand-list .si-icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--si-gold-soft); }
.signin-shell .si-brand-foot { display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.55; color: #9AA5B8; }
.signin-shell .si-brand-foot span:first-child { color: #C9D0DC; font-weight: 500; }

.signin-shell .si-main {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding: clamp(40px, 11vh, 112px) 24px 48px;
}
.signin-shell .si-main:focus { outline: none; }

.signin-shell .si-card {
    width: 100%; max-width: 440px; box-sizing: border-box;
    padding: 36px 40px 32px;
    background: var(--si-paper);
    border: 1px solid var(--si-line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(11, 29, 51, .04), 0 14px 36px -18px rgba(11, 29, 51, .22);
}

.signin-shell .si-foot {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
    margin-top: 26px; max-width: 440px;
    font-size: 13px; line-height: 1.5; color: var(--si-ink-3); text-align: center;
}
.signin-shell .si-foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.signin-shell .si-foot a:hover { color: var(--si-navy); }
.signin-shell .si-foot-rera { display: none; }

/* -------------------------------------------------------------------------- */
/* Card content                                                                */
/* -------------------------------------------------------------------------- */

/* glass.css sets font-family on h1/a/button explicitly; inherit the shell's DM Sans instead */
/* html … = (0,1,2): ties glass.css's `html.glass-theme h1` and wins by order */
html .signin-shell h1, html .signin-shell h2, html .signin-shell p, html .signin-shell a, html .signin-shell button, html .signin-shell input, html .signin-shell select, html .signin-shell textarea, html .signin-shell summary { font-family: inherit; }
.signin-shell .si-title {
    margin: 0 0 6px;
    font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em;
    color: var(--si-navy);
}
.signin-shell .si-sub { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: var(--si-ink-2); }

.signin-shell .si-alert {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0 0 18px; padding: 12px 14px;
    border: 1px solid; border-radius: 8px;
    font-size: 14px; line-height: 1.45;
}
.signin-shell .si-alert .si-icon { flex: none; margin-top: 1px; }
.signin-shell .si-alert strong { font-weight: 600; }
.signin-shell .si-alert-danger { background: var(--si-danger-bg);  border-color: var(--si-danger-line);  color: var(--si-danger-ink); }
.signin-shell .si-alert-success { background: var(--si-success-bg); border-color: var(--si-success-line); color: var(--si-success); }
.signin-shell .si-alert-warning { background: var(--si-warn-bg);    border-color: var(--si-warn-line);    color: var(--si-warn-ink); }
.signin-shell .si-alert-info { background: var(--si-info-bg);    border-color: var(--si-info-line);    color: var(--si-info-ink); }

.signin-shell .si-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.signin-shell .si-field { display: flex; flex-direction: column; gap: 6px; }
.signin-shell .si-label { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: 13px; font-weight: 600; color: var(--si-ink); }

.signin-shell .si-input {
    display: block; width: 100%; height: 46px; box-sizing: border-box;
    padding: 0 14px;
    border: 1.5px solid var(--si-line-strong); border-radius: 8px;
    background: #fff; color: var(--si-ink);
    font: 500 15px/1 var(--f-sans, 'DM Sans', system-ui, sans-serif);
    transition: border-color .15s ease-out, box-shadow .15s ease-out;
    -webkit-appearance: none; appearance: none;
}
.signin-shell .si-input::placeholder { color: #8B96A8; font-weight: 400; }
.signin-shell .si-input:hover { border-color: #7B8798; }
.signin-shell .si-input:focus { outline: none; border-color: var(--si-navy); box-shadow: var(--si-ring); }
.signin-shell .si-input[aria-invalid="true"] { border-color: var(--si-danger); }
.signin-shell .si-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, .18); }

.signin-shell .si-select {
    padding-right: 42px; cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234F5D73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.signin-shell .si-textarea { height: auto; min-height: 92px; padding: 12px 14px; line-height: 1.45; resize: vertical; }
.signin-shell .si-alert ul { margin: 0; padding-left: 18px; }
.signin-shell .si-help { margin: 0; font-size: 13px; line-height: 1.45; color: var(--si-ink-3); }
.signin-shell .si-caps { display: none; color: var(--si-gold-ink); font-weight: 500; }
.signin-shell .si-caps.on { display: block; }

.signin-shell .si-pw { position: relative; }
.signin-shell .si-pw .si-input { padding-right: 50px; }
.signin-shell .si-eye {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 36px; padding: 0;
    display: grid; place-items: center;
    border: 0; border-radius: 6px; background: transparent;
    color: var(--si-ink-2); cursor: pointer;
}
.signin-shell .si-eye:hover { background: #EEF1F5; color: var(--si-navy); }
.signin-shell .si-eye:focus-visible { outline: 2px solid var(--si-navy); outline-offset: 1px; }
.signin-shell .si-eye .si-icon { width: 20px; height: 20px; }
.signin-shell .si-eye .si-icon + .si-icon { display: none; }
.signin-shell .si-eye.is-on .si-icon { display: none; }
.signin-shell .si-eye.is-on .si-icon + .si-icon { display: block; }

/* Verification code: large, spaced, tabular digits */
.signin-shell .si-code {
    height: 56px; text-align: center;
    font-size: 26px; font-weight: 600; letter-spacing: .32em;
    font-variant-numeric: tabular-nums;
}
.signin-shell .si-code::placeholder { letter-spacing: .32em; font-weight: 500; }
.signin-shell .si-code.si-code-backup { letter-spacing: .12em; text-transform: uppercase; }

.signin-shell .si-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 48px; box-sizing: border-box; margin: 0; padding: 0 18px;
    border: 0; border-radius: 8px;
    font: 600 15px/1 var(--f-sans, 'DM Sans', system-ui, sans-serif);
    text-decoration: none; cursor: pointer;
    transition: background-color .15s ease-out, transform .08s ease-out;
}
.signin-shell .si-btn .si-icon { width: 18px; height: 18px; }
.signin-shell .si-btn-primary { background: var(--si-navy); color: #FFFFFF; }
.signin-shell .si-btn-primary:hover { background: var(--si-navy-hover); color: #FFFFFF; }
.signin-shell .si-btn-primary:active { transform: translateY(1px); }
.signin-shell .si-btn-primary:focus-visible { outline: 2px solid var(--si-navy); outline-offset: 3px; }
.signin-shell .si-btn-primary[disabled] { opacity: .75; cursor: progress; transform: none; }
.signin-shell .si-btn-secondary { background: #fff; color: var(--si-navy); border: 1.5px solid var(--si-line-strong); }
.signin-shell .si-btn-secondary:hover { background: var(--si-page); color: var(--si-navy); }
.signin-shell .si-btn-secondary:focus-visible { outline: 2px solid var(--si-navy); outline-offset: 3px; }
.signin-shell .si-form .si-btn { margin-top: 4px; }
/* Links styled as buttons must not inherit the in-card link treatment */
.signin-shell .si-card a.si-btn { text-decoration: none; }
.signin-shell .si-card a.si-btn-primary { color: #FFFFFF; }
.signin-shell .si-card a.si-btn-secondary { color: var(--si-navy); }

.signin-shell .si-actions { display: flex; flex-direction: column; gap: 10px; margin: 0; }

.signin-shell .si-links { margin: 18px 0 0; font-size: 14px; line-height: 1.5; color: var(--si-ink-2); }
.signin-shell .si-links-muted { font-size: 13px; color: var(--si-ink-3); }
.signin-shell .si-card a { color: var(--si-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--si-gold); }
.signin-shell .si-card a:hover { text-decoration-color: var(--si-navy); }
.signin-shell .si-card a:focus-visible { outline: 2px solid var(--si-navy); outline-offset: 2px; border-radius: 2px; }
.signin-shell .si-linkbtn {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: 600 14px/1.5 var(--f-sans, 'DM Sans', system-ui, sans-serif);
    color: var(--si-navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--si-gold);
}
.signin-shell .si-linkbtn:hover { text-decoration-color: var(--si-navy); }
.signin-shell .si-linkbtn:focus-visible { outline: 2px solid var(--si-navy); outline-offset: 2px; border-radius: 2px; }

/* "Forgot your password?" — a disclosure, because the real answer is a person */
.signin-shell .si-disclose { margin: 20px 0 0; }
.signin-shell .si-disclose summary {
    display: inline-flex; align-items: center; gap: 4px;
    list-style: none; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--si-navy);
    text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--si-gold);
}
.signin-shell .si-disclose summary::-webkit-details-marker { display: none; }
.signin-shell .si-disclose summary:hover { text-decoration-color: var(--si-navy); }
.signin-shell .si-disclose summary:focus-visible { outline: 2px solid var(--si-navy); outline-offset: 2px; border-radius: 2px; }
.signin-shell .si-disclose summary .si-icon { width: 16px; height: 16px; transition: transform .15s ease-out; }
.signin-shell .si-disclose[open] summary .si-icon { transform: rotate(180deg); }
.signin-shell .si-disclose p {
    margin: 10px 0 0; padding: 12px 14px;
    background: var(--si-page); border-radius: 8px;
    font-size: 14px; line-height: 1.5; color: var(--si-ink-2);
}

/* Who is signing in / signing out */
.signin-shell .si-who {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 18px; padding: 12px 14px;
    border: 1px solid var(--si-line); border-radius: 8px; background: var(--si-page);
}
.signin-shell .si-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.signin-shell .si-avatar {
    flex: none; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--si-navy); color: var(--si-gold-soft);
    font-size: 16px; font-weight: 700;
}
.signin-shell .si-who-name { font-weight: 600; color: var(--si-ink); line-height: 1.3; }
.signin-shell .si-who-meta { font-size: 13px; color: var(--si-ink-3); line-height: 1.4; }

/* Signed-out check mark */
.signin-shell .si-done-mark {
    width: 52px; height: 52px; border-radius: 50%; margin: 0 0 18px;
    display: grid; place-items: center;
    background: var(--si-success-bg); color: var(--si-success);
}
.signin-shell .si-done-mark .si-icon { width: 26px; height: 26px; }

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */

@media (min-width: 900px) and (max-width: 1199.98px) {
    .signin-shell .si-brand { padding: 36px 36px 30px; }
    .signin-shell .si-brand-logo { width: 196px; margin-left: -3px; }
    .signin-shell .si-brand-lead { font-size: 22px; }
}

@media (max-width: 899.98px) {
    .signin-shell .si-page { grid-template-columns: 1fr; min-height: 0; }
    .signin-shell .si-brand {
        flex-direction: row; align-items: center; justify-content: center;
        padding: 14px 20px;
    }
    .signin-shell .si-brand::after { display: none; }
    .signin-shell .si-brand-logo { width: 150px; margin-left: 0; }
    .signin-shell .si-brand-body, .signin-shell .si-brand-foot { display: none; }
    .signin-shell .si-main { justify-content: flex-start; padding: 24px 16px 32px; }
    .signin-shell .si-card { padding: 26px 22px 24px; border-radius: 10px; }
    .signin-shell .si-title { font-size: 23px; }
    .signin-shell .si-input { font-size: 16px; height: 48px; }   /* 16px: no iOS zoom */
    .signin-shell .si-code { font-size: 24px; height: 56px; }
    .signin-shell .si-btn { height: 50px; font-size: 16px; }
    .signin-shell .si-foot { margin-top: 22px; }
    .signin-shell .si-foot-rera { display: inline; }
}

@media (max-width: 360px) {
    .signin-shell .si-card { padding: 22px 16px 20px; }
    .signin-shell .si-brand-logo { width: 132px; }
}

@media (prefers-reduced-motion: reduce) {
    body.signin-shell * { transition: none !important; animation: none !important; }
}
