:root {
    /* ── Page ─────────────────────────────────────────────────────────────── */
    --page-bg: #ffffff;
    /* page background                */
    --page-font: 'Google Sans', 'Segoe UI', Roboto, Arial, sans-serif;

    /* ── Card ─────────────────────────────────────────────────────────────── */
    --card-bg: #f7f7f7;
    /* card background                */
    --card-border: #117bc0;
    /* card border colour             */
    --card-border-radius: 12px;
    /* card corner rounding           */
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    --card-max-width: 900px;
    /* card max width on desktop      */
    --card-padding: 48px;
    /* inner padding                  */

    /* ── Typography ───────────────────────────────────────────────────────── */
    --text-primary: #ED1F24;
    /* main text (headings, labels)   */
    --text-secondary: #161616;
    /* subtitles, hints, muted text   */
    --text-heading-size: 28px;
    /* h1 / page title                */
    --text-subtitle-size: 16px;
    /* subtitle below heading         */
    --text-body-size: 14px;
    /* labels, body text              */
    --text-small-size: 12px;
    /* hints, footer links            */

    /* ── Links ────────────────────────────────────────────────────────────── */
    --link-color: #117bc0;
    /* link colour                    */
    --link-hover: #ed1f24;
    /* link hover colour              */

    /* ── Inputs ───────────────────────────────────────────────────────────── */
    --input-bg: transparent;
    /* input background               */
    --input-border: #646464;
    /* input border (unfocused)       */
    --input-border-focus: #117bc0;
    /* input border on focus          */
    --input-text: #161616;
    /* text inside inputs             */
    --input-placeholder: #6b7075;
    /* placeholder text               */
    --input-radius: 4px;
    /* input corner rounding          */
    --input-height: 50px;
    /* input height                   */
    --input-font-size: 16px;
    /* input text size                */
    --input-padding: 14px 16px;
    /* input inner padding            */

    /* ── Buttons ──────────────────────────────────────────────────────────── */
    --btn-primary-bg: #117bc0;
    /* primary button background      */
    --btn-primary-text: #ffffff;
    /* primary button text            */
    --btn-primary-hover: #065e97;
    /* primary button hover           */
    --btn-primary-radius: 20px;
    /* primary button rounding        */
    --btn-primary-height: 40px;
    /* primary button height          */
    --btn-primary-font: 14px;
    /* primary button text size       */
    --btn-primary-weight: 600;
    /* primary button font weight     */
    --btn-primary-padding: 0 32px;
    /* primary button padding         */

    --btn-ghost-text: #117bc0;
    /* ghost/outline button text      */
    --btn-ghost-hover-bg: rgba(138, 180, 248, 0.08);
    /* ghost hover bg       */

    /* ── Social Buttons ───────────────────────────────────────────────────── */
    --social-bg: transparent;
    --social-border: #5f6368;
    --social-text: #161616;            /* was a light grey from the old dark design: unreadable on the light card */
    --social-hover-bg: rgba(232, 234, 237, 0.08);
    --social-radius: 20px;
    --social-height: 40px;

    /* ── Alerts ───────────────────────────────────────────────────────────── */
    /* Dark text on a light tint (contrast 8.0 and 6.9). The old values were light text made for a dark page. */
    --alert-error-bg: #fdecea;
    --alert-error-border: #d93025;
    --alert-error-text: #8c1d18;
    --alert-success-bg: #e6f4ea;
    --alert-success-border: #2e7d32;
    --alert-success-text: #1b5e20;

    /* ── Divider ──────────────────────────────────────────────────────────── */
    --divider-color: #3d3d5c;
    --divider-text: #5f6368;

    /* ── Checkbox ─────────────────────────────────────────────────────────── */
    --checkbox-border: #5f6368;
    --checkbox-checked: #117bc0;

    /* ── Logo ─────────────────────────────────────────────────────────────── */
    --logo-height: 200px;
    /* desktop logo height               */
    --logo-height-tablet: 150px;
    /* tablet logo height (≤768px)       */
    --logo-height-mobile: 100px;
    /* mobile logo height (≤420px)       */

    /* ── Footer ───────────────────────────────────────────────────────────── */
    --footer-text: #5f6368;
    --footer-link: #117bc0;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════════════════════ */

.auth-page {
    font-family: var(--page-font);
    background: var(--page-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   AUTH BOX (the centered card)
   ═══════════════════════════════════════════════════════════════════════════════ */

.auth-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: var(--card-max-width);
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

/* ── Left panel: logo + branding ──────────────────────────────────────── */

.auth-brand {
    flex: 0 0 340px;
    padding: var(--card-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.auth-logo {
    width: auto;
    height: var(--logo-height);
    margin-bottom: 32px;
    object-fit: contain;
    align-self: center;
}

.auth-brand h1 {
    font-size: var(--text-heading-size);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-brand .auth-subtitle {
    font-size: var(--text-subtitle-size);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Right panel: form content ────────────────────────────────────────── */

.auth-form {
    flex: 1;
    padding: var(--card-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: var(--text-body-size);
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"] {
    width: 100%;
    height: var(--input-height);
    padding: var(--input-padding);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    color: var(--input-text);
    font-size: var(--input-font-size);
    font-family: var(--page-font);
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 1px var(--input-border-focus);
}

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

.form-hint {
    display: block;
    font-size: var(--text-small-size);
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ── Row layout (remember me + forgot link) ───────────────────────────── */

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-body-size);
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--checkbox-checked);
    cursor: pointer;
}

.link-subtle {
    font-size: var(--text-body-size);
    color: var(--link-color);
    text-decoration: none;
    white-space: nowrap;
}

.link-subtle:hover {
    color: var(--link-hover);
    text-decoration: underline;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--page-font);
    font-weight: var(--btn-primary-weight);
    font-size: var(--btn-primary-font);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-radius: var(--btn-primary-radius);
    height: var(--btn-primary-height);
    padding: var(--btn-primary-padding);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--btn-ghost-text);
    border-radius: var(--btn-primary-radius);
    height: var(--btn-primary-height);
    padding: var(--btn-primary-padding);
}

.btn-ghost:hover {
    background: var(--btn-ghost-hover-bg);
}

.btn-full {
    width: 100%;
}

/* ── Button row (Create account + Next) ─ like Google ─────────────────── */

.btn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
}

.btn-row .btn-ghost {
    padding: 0 16px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   SOCIAL BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: var(--social-height);
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    border-radius: var(--social-radius);
    color: var(--social-text);
    font-size: var(--text-body-size);
    font-weight: 500;
    font-family: var(--page-font);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-social:hover {
    background: var(--social-hover-bg);
}

.btn-social svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Google-specific icon colours */
.btn-google svg {
    fill: currentColor;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════════════════════════════════════════ */

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--divider-color);
}

.divider span {
    padding: 0 16px;
    font-size: var(--text-small-size);
    color: var(--divider-text);
    white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════════════════════ */

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: var(--text-body-size);
    margin-bottom: 20px;
    line-height: 1.4;
}

.alert-error {
    background: var(--alert-error-bg);
    border: 1px solid var(--alert-error-border);
    color: var(--alert-error-text);
}

.alert-success {
    background: var(--alert-success-bg);
    border: 1px solid var(--alert-success-border);
    color: var(--alert-success-text);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER (below the card)
   ═══════════════════════════════════════════════════════════════════════════════ */

.auth-footer {
    font-size: var(--text-small-size);
    color: var(--footer-text);
    text-align: center;
    margin-top: 24px;
}

.auth-footer a {
    color: var(--footer-link);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Footer inside the card (links at bottom) */
.auth-form .auth-footer {
    margin-top: auto;
    padding-top: 16px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   TABS (register page: email / phone)
   ═══════════════════════════════════════════════════════════════════════════════ */

.form-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--divider-color);
}

.form-tabs .tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--page-font);
    font-size: var(--text-body-size);
    font-weight: 500;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.form-tabs .tab:hover {
    color: var(--text-primary);
}

.form-tabs .tab.active {
    color: var(--link-color);
    border-bottom-color: var(--link-color);
}

.tab-panel[hidden] {
    display: none;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   OTP SPECIAL STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

.otp-group input {
    letter-spacing: 0.5em;
    text-align: center;
    font-size: 22px !important;
    font-weight: 600;
}

.resend-form {
    margin-top: 12px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (stacked layout)
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .auth-page {
        padding: 16px;
        justify-content: flex-start;
        padding-top: 40px;
    }

    .auth-box {
        flex-direction: column;
        max-width: 100%;
    }

    .auth-brand {
        flex: none;
        padding: 32px 28px 20px;
    }

    .auth-brand h1 {
        font-size: 24px;
    }

    .auth-logo {
        height: var(--logo-height-tablet);
    }

    .auth-form {
        padding: 20px 28px 32px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .btn-row {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .btn-row .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    :root {
        --card-padding: 24px;
        --text-heading-size: 22px;
    }

    .auth-logo {
        height: var(--logo-height-mobile);
    }
}
/* Fixed presentation values migrated from inline attributes for strict CSP. */
[data-auth-style="s025fe5129171"] {font-size:11px;}
[data-auth-style="s04bbec5e3d10"] {margin-top:24px;}
[data-auth-style="s0587732b39da"] {display:flex;flex-wrap:wrap;gap:10px;}
[data-auth-style="s0d5ff492ea5c"] {display:flex;gap:8px;align-items:center;}
[data-auth-style="s1417978e5575"] {display:flex;gap:12px;flex-wrap:wrap;margin-top:12px;}
[data-auth-style="s1603cce135aa"] {font-size:11px;color:var(--muted);}
[data-auth-style="s1953fa796cf3"] {margin-left:8px;}
[data-auth-style="s225b06227e5d"] {color:#dc2626;}
[data-auth-style="s32fb29efb85e"] {white-space:nowrap;}
[data-auth-style="s3757e3bfa05d"] {display:block;width:100%;margin-top:8px}
[data-auth-style="s3b40e41994b4"] {font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:0.08em;margin-bottom:8px;}
[data-auth-style="s3be88a387b8f"] {margin-top:12px;background:rgba(230,57,70,0.06);border:1px solid var(--danger);border-radius:6px;padding:16px;}
[data-auth-style="s3bed6f18ceb3"] {color:#a15c00;font-size:11px;font-weight:600;}
[data-auth-style="s3c4a3d440074"] {margin-bottom:20px;}
[data-auth-style="s42b84c3ed382"] {display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;}
[data-auth-style="s442b023e5539"] {margin-top:1rem;}
[data-auth-style="s4cb9fdd11761"] {margin-top:.4rem}
[data-auth-style="s4fc47cbe0b1b"] {display:flex;gap:12px;margin-bottom:20px;flex-wrap:wrap;}
[data-auth-style="s54be96cbb796"] {margin:0;flex:1;min-width:140px;}
[data-auth-style="s56bff03a91ca"] {margin:0;flex:2;min-width:180px;}
[data-auth-style="s56deb7ef850d"] {display:flex;align-items:center;gap:6px;font-size:13px;background:var(--bg);border:1px solid var(--border);padding:6px 12px;border-radius:6px;cursor:pointer;}
[data-auth-style="s5780b4213f5a"] {opacity:0.5;}
[data-auth-style="s5a2dfef236e7"] {text-align:center;}
[data-auth-style="s5d40951ff4e4"] {cursor:pointer;color:var(--danger);font-size:13px;font-weight:600;}
[data-auth-style="s5fb94b1cbf61"] {max-width:160px;}
[data-auth-style="s64dabcdc8a97"] {display:block;width:100%;margin:8px 0 16px}
[data-auth-style="s64ec8e767b96"] {flex:1;min-width:140px;}
[data-auth-style="s67a498603f42"] {margin-bottom:16px;color:var(--muted);font-size:13px;}
[data-auth-style="s68227a912990"] {margin-bottom:1rem;}
[data-auth-style="s6b8b63d565c4"] {display:inline}
[data-auth-style="s715316f4f2fa"] {display:flex;align-items:flex-start;gap:8px;font-weight:normal;font-size:13px;cursor:pointer;}
[data-auth-style="s7433cb4d9777"] {display:inline-block;cursor:pointer;}
[data-auth-style="s7564ec607ed8"] {margin-bottom:16px;}
[data-auth-style="s7dc4d4e255a8"] {margin-top:8px;background:var(--bg);border:1px solid var(--border);padding:16px;border-radius:6px;position:absolute;z-index:10;min-width:280px;}
[data-auth-style="s7e73504bb0d5"] {margin:16px 0;border:none;border-top:1px solid #eee;}
[data-auth-style="s808a39755dce"] {display:flex;gap:12px;flex-wrap:wrap;margin-top:16px;}
[data-auth-style="s841a49cfb87c"] {color:var(--muted);text-align:center;padding:32px;}
[data-auth-style="s8b08d7c0b59c"] {opacity:.8;}
[data-auth-style="s910f53fb7a81"] {margin-top:20px;}
[data-auth-style="s911ada616745"] {color:var(--muted);}
[data-auth-style="s97616966ca81"] {margin-top:12px;font-size:12px;color:var(--muted);}
[data-auth-style="s9b4851f6e8e2"] {display:flex; gap:12px; align-items:flex-end;}
[data-auth-style="sa097a3f00703"] {margin-bottom:24px;}
[data-auth-style="sa12fdc30fd65"] {margin:0;flex:1;}
[data-auth-style="sa32937dba9f1"] {color:var(--muted);font-size:13px;}
[data-auth-style="sa33b8fc2ff77"] {margin-top:8px;}
[data-auth-style="sa8360aea5d20"] {display:inline-block;margin-left:6px;}
[data-auth-style="sa85c61577336"] {text-decoration:none;}
[data-auth-style="sa88795c18bc6"] {display:inline;margin-left:6px;}
[data-auth-style="sa91548c59434"] {display:inline;}
[data-auth-style="safc144105ccf"] {margin-top:8px;color:var(--muted);font-size:12px;}
[data-auth-style="sb02f36217f51"] {margin-top:32px}
[data-auth-style="sb424d102a819"] {font-size:13px;margin-bottom:12px;}
[data-auth-style="sb6d781cbbc10"] {margin-top:12px;}
[data-auth-style="sb75e9dbffca1"] {font-size:13px;color:#a4161a;margin-bottom:12px;}
[data-auth-style="sb7ecfe9d733c"] {margin:20px 0;padding:20px}
[data-auth-style="sc388235ac698"] {max-width:280px;}
[data-auth-style="sc42f23b8ec8e"] {font-size:12px;}
[data-auth-style="sc500155b62b4"] {margin-bottom:8px;}
[data-auth-style="sc7d91bc5f3ad"] {color:#dc2626;font-size:11px;font-weight:600;}
[data-auth-style="sc8590d693ac0"] {margin-top:3px;}
[data-auth-style="scaf61fb5b5ca"] {color:#15803d;font-size:11px;font-weight:600;}
[data-auth-style="sccd997a1261f"] {color:#15803d;}
[data-auth-style="scd8445ce2d75"] {background:transparent;border:1px solid var(--border);color:var(--text);}
[data-auth-style="scdcef186c815"] {font-size:13px;}
[data-auth-style="scf6266496f6c"] {accent-color:var(--accent);}
[data-auth-style="sd0466aa33fa8"] {display:none;}
[data-auth-style="sd2e2fef79105"] {display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:10px;}
[data-auth-style="sd2fee0549d2d"] {color:#a15c00;}
[data-auth-style="sda1c7247b1f9"] {border-top:1px solid rgba(255,255,255,0.1);margin:8px 12px;padding-top:8px;}
[data-auth-style="se9dbc0e8a1b5"] {display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap;}
[data-auth-style="sedabaf13e494"] {color:var(--muted);font-size:12px;margin-left:8px;}
[data-auth-style="sf6be8b1e81ed"] {display:flex;gap:10px;align-items:center;}
[data-auth-style="sfffa4229ac38"] {font-size:10px;text-transform:uppercase;color:rgba(255,255,255,0.7);padding:4px 8px;letter-spacing:0.5px;}

/* ── Two-step sign-in ─────────────────────────────────────────────────────── */
.two-factor-methods { list-style: none; padding: 0; margin: 0 0 1rem; }
.two-factor-methods li { margin: .4rem 0; }
.qr-code { display: block; width: 220px; max-width: 100%; height: auto; margin: 1rem auto; background: #fff; }
.secret-key { font-family: "Courier New", monospace; letter-spacing: .12em; word-break: break-all; }
.device-list { list-style: none; padding: 0; }
.device-list li { padding: .6rem 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.auth-text { color: var(--text-secondary); font-size: var(--text-body-size); line-height: 1.5; margin: 0 0 1rem; }
ol.auth-text { padding-left: 1.25rem; }
.section-title { color: var(--text-secondary); font-size: 18px; margin: 1.75rem 0 .5rem; }
.device-list li { color: var(--text-secondary); font-size: var(--text-body-size); }
.device-list form { margin-top: .4rem; }

/* Sign-up guard field (SignupGuard::fields): off screen for people, present for scripts. */
.form-aside {position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;}
