:root {
    color-scheme: dark;
    font-family: Inter, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background: #07111f;
    color: #f8fbff;
    margin: 0;
    min-height: 100vh;
}

button,
input,
a {
    font: inherit;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(340px, .48fr) minmax(480px, .52fr);
    position: relative;
}

.auth-brand-panel {
    background:
        radial-gradient(circle at 25% 30%, rgba(59, 130, 246, .22), transparent 38%),
        linear-gradient(145deg, #081525, #0b1c31);
    border-right: 1px solid rgba(96, 165, 250, .14);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 34px clamp(34px, 5vw, 78px);
    position: relative;
}

.auth-brand-row {
    align-items: center;
    display: flex;
    gap: 20px;
}

.auth-tradecendra-brand {
    align-items: center;
    color: #169eea;
    display: inline-flex;
    gap: 10px;
    line-height: 0;
    max-width: 360px;
    text-decoration: none;
}

.auth-tradecendra-brand:hover,
.auth-tradecendra-brand:focus {
    text-decoration: none;
}

.auth-tradecendra-symbol {
    display: block;
    height: auto;
    width: 58px;
}

.auth-tradecendra-wordmark {
    background: linear-gradient(90deg, #36efff, #169eea 52%, #165dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.auth-tradecendra-wordmark span {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.auth-tradecendra-wordmark {
    -webkit-text-fill-color: transparent;
}

.auth-tradecendra-logo {
    display: block;
    height: auto;
    max-height: 66px;
    object-fit: contain;
    width: min(300px, 72vw);
}

.auth-provider-card {
    margin-top: 0;
    width: 100%;
}

.auth-provider-card h3 {
    color: #dbeafe;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0 0 12px;
}

.auth-form-panel {
    align-items: center;
    background:
        linear-gradient(rgba(10, 22, 38, .92), rgba(10, 22, 38, .96)),
        radial-gradient(circle at 80% 10%, rgba(37, 99, 235, .18), transparent 40%);
    display: flex;
    justify-content: center;
    padding: 32px clamp(24px, 5vw, 76px);
}

.auth-card {
    background: rgba(8, 20, 34, .78);
    border: 1px solid rgba(96, 165, 250, .18);
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
    max-width: 480px;
    padding: 28px;
    width: 100%;
}

.auth-back-link {
    color: #8093ab;
    display: inline-flex;
    font-size: 11px;
    gap: 5px;
    text-decoration: none;
    white-space: nowrap;
}

.auth-back-link:hover {
    color: #60a5fa;
}

.auth-card h2 {
    font-size: 26px;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0 0 8px;
}

.auth-card > p {
    color: #92a4bb;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 22px;
}

.auth-card > p[hidden] {
    display: none;
}

.auth-provider-grid {
    display: grid;
    gap: 10px;
}

.auth-provider-button {
    align-items: center;
    background: #132238;
    border: 1px solid #2a405d;
    border-radius: 7px;
    color: #c5d1df;
    display: flex;
    font-size: 12px;
    font-weight: 600;
    gap: 7px;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
    white-space: nowrap;
}

.auth-provider-button:not([aria-disabled="true"]):hover {
    background: #182b45;
    border-color: #48698e;
    color: #fff;
}

.auth-provider-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .55;
}

.auth-provider-button.is-loading {
    pointer-events: none;
}

.auth-method-divider {
    align-items: center;
    color: #7f94ad;
    display: grid;
    font-size: 10px;
    font-weight: 800;
    gap: 12px;
    grid-template-columns: 1fr auto 1fr;
    letter-spacing: .08em;
    margin: 18px 0;
    text-transform: uppercase;
}

.auth-email-divider {
    background: rgba(96, 165, 250, .16);
    height: 1px;
    margin: 18px 0;
}

body[data-auth-mode="login"] .auth-email-divider {
    display: none;
}

.auth-method-divider::before,
.auth-method-divider::after {
    background: rgba(96, 165, 250, .16);
    content: "";
    height: 1px;
}

#auth-form label {
    color: #c5d1df;
    display: block;
    font-size: 11px;
    margin-bottom: 13px;
}

#auth-form label[hidden] {
    display: none !important;
}

#auth-form input {
    background: #081422;
    border: 1px solid #2a405d;
    border-radius: 6px;
    color: #fff;
    display: block;
    font-size: 13px;
    margin-top: 5px;
    min-height: 42px;
    padding: 10px 11px;
    width: 100%;
}

#auth-form input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
    outline: none;
}

#auth-form input.is-invalid {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .12);
}

.auth-password-field {
    display: block;
    position: relative;
}

.auth-password-field input {
    padding-right: 44px !important;
}

.auth-password-field button {
    background: transparent;
    border: 0;
    color: #8ca0b9;
    cursor: pointer;
    height: 40px;
    position: absolute;
    right: 1px;
    top: 6px;
    width: 40px;
}

.auth-password-help,
.auth-password-match,
.auth-message {
    display: block;
    font-size: 11px;
    line-height: 1.5;
}

.auth-password-help {
    color: #8194ac;
    margin: -3px 0 13px;
}

.auth-password-help[hidden] {
    display: none;
}

.auth-password-match {
    color: #f87171;
    margin: 5px 0 0;
    min-height: 0;
}

.auth-password-match:empty {
    display: none;
}

.auth-agreement-dock {
    display: grid;
    gap: 10px;
    margin: 4px 0 14px;
    width: 100%;
}

.auth-agreement-dock[hidden] {
    display: none !important;
}

.auth-legal-acceptance {
    align-items: flex-start;
    background: rgba(12, 27, 45, .62);
    border: 1px solid rgba(96, 165, 250, .22);
    border-radius: 8px;
    cursor: pointer;
    display: grid !important;
    gap: 10px;
    grid-template-columns: auto 1fr;
    line-height: 1.45;
    margin: 0 !important;
    padding: 11px 12px;
    position: relative;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.auth-legal-acceptance::before {
    align-items: center;
    background: rgba(8, 20, 34, .92);
    border: 1px solid rgba(96, 165, 250, .38);
    border-radius: 999px;
    color: transparent;
    content: "\2713";
    display: flex;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    line-height: 1;
    margin-top: -1px;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
    width: 22px;
}

.auth-legal-acceptance:hover {
    background: rgba(14, 32, 53, .9);
    border-color: rgba(96, 165, 250, .38);
}

.auth-legal-acceptance[hidden] {
    display: none !important;
}

.auth-legal-acceptance input {
    height: 1px;
    left: 24px;
    margin: 0;
    opacity: 0;
    position: absolute;
    top: 22px;
    width: 1px;
}

.auth-legal-acceptance input:focus-visible {
    outline: none;
}

.auth-legal-acceptance:focus-within {
    border-color: rgba(96, 165, 250, .58);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
}

.auth-legal-acceptance span {
    color: #b7c7dc;
    display: block;
    font-size: 11px;
}

.auth-legal-acceptance:has(input:checked) {
    background: rgba(13, 51, 46, .78);
    border-color: rgba(52, 211, 153, .55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.auth-legal-acceptance:has(input:checked)::before {
    background: linear-gradient(135deg, #2dd4bf, #34d399);
    border-color: #6ee7b7;
    color: #05111f;
    transform: scale(1.03);
}

.auth-legal-acceptance a {
    color: #93c5fd;
    font-weight: 700;
    text-decoration: none;
}

.auth-legal-acceptance a:hover {
    color: #bfdbfe;
}

.auth-legal-acceptance.is-disabled {
    background: rgba(8, 20, 34, .48);
    border-color: rgba(96, 165, 250, .12);
    opacity: .62;
}

.auth-legal-acceptance.is-disabled,
.auth-legal-acceptance.is-disabled input {
    cursor: not-allowed;
}

.auth-message {
    color: #f87171;
    min-height: 18px;
    margin-bottom: 8px;
}

.auth-message.is-success {
    color: #34d399;
}

.auth-submit {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: 0;
    border-radius: 7px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    min-height: 42px;
    width: 100%;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .7;
}

.auth-reset-link {
    align-items: center;
    display: flex;
    justify-content: center;
    text-decoration: none;
}

.verification-card {
    border-color: rgba(96, 165, 250, .24);
    max-width: 500px;
    padding: 36px;
}

.verification-kicker {
    color: #60a5fa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.verification-card h2 {
    font-size: 30px;
    margin-bottom: 10px;
}

.verification-card > .verification-intro {
    margin-bottom: 2px;
}

.verification-card > .verification-email {
    color: #e5efff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
}

.verification-card > .verification-status {
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(96, 165, 250, .16);
    border-radius: 8px;
    color: #a9bdd4;
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 22px;
    padding: 10px 12px;
}

.verification-card > .verification-status--success {
    background: rgba(52, 211, 153, .08);
    border-color: rgba(52, 211, 153, .22);
    color: #86efc2;
}

.verification-card > .verification-status--error {
    background: rgba(248, 113, 113, .08);
    border-color: rgba(248, 113, 113, .22);
    color: #fca5a5;
}

.verification-code-form label {
    color: #cbd8e8;
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 7px;
}

.verification-code-field input {
    background: #081422;
    border: 1px solid #35506f;
    border-radius: 8px;
    color: #f8fbff;
    display: block;
    font-size: 27px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    height: 58px;
    letter-spacing: .42em;
    outline: none;
    padding: 10px 10px 10px calc(10px + .42em);
    text-align: center;
    width: 100%;
}

.verification-code-field input::placeholder {
    color: #41556d;
    opacity: .55;
}

.verification-code-field input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
}

.verification-code-form .auth-password-help {
    margin: 7px 0 16px;
}

.verification-code-form .auth-submit {
    min-height: 48px;
}

.verification-actions {
    align-items: center;
    border-top: 1px solid rgba(96, 165, 250, .13);
    color: #7589a2;
    display: flex;
    font-size: 11px;
    gap: 4px;
    justify-content: center;
    margin-top: 22px;
    padding-top: 18px;
}

.verification-actions form,
.verification-logout {
    margin: 0;
}

.verification-text-button {
    background: transparent;
    border: 0;
    color: #79b2ff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    padding: 4px;
}

.verification-text-button:hover,
.verification-text-button:focus-visible {
    color: #bfdbfe;
    text-decoration: underline;
}

.verification-logout {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.verification-text-button--muted {
    color: #7589a2;
    font-weight: 600;
}

.auth-forgot-link {
    color: #8fb4e8;
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-top: 13px;
    text-align: center;
    text-decoration: none;
}

.auth-forgot-link:hover {
    color: #bfdbfe;
}

.auth-forgot-link[hidden] {
    display: none;
}

#auth-invitation-toggle[hidden] {
    display: none;
}

.auth-mode-toggle {
    background: transparent;
    border: 0;
    color: #60a5fa;
    cursor: pointer;
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin: 17px auto 0;
}

.auth-card .auth-future-note {
    color: #667991;
    font-size: 9px;
    margin: 18px 0 0;
    text-align: center;
}

.auth-recovery-note,
.auth-provider-help,
.auth-dev-link {
    background: rgba(8, 20, 34, .72);
    border: 1px solid #223a57;
    border-radius: 8px;
}

.auth-recovery-note {
    display: grid;
    gap: 5px;
    margin-bottom: 18px;
    padding: 12px;
}

.auth-recovery-note strong,
.auth-provider-help > span,
.auth-dev-link span {
    color: #dbeafe;
    font-size: 11px;
    font-weight: 700;
}

.auth-recovery-note span,
.auth-provider-help p {
    color: #8ea2bb;
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
}

.auth-provider-help {
    display: grid;
    gap: 9px;
    margin-top: 18px;
    padding: 12px;
}

.auth-provider-help div {
    align-items: flex-start;
    display: flex;
    gap: 9px;
}

.auth-provider-help i {
    color: #60a5fa;
    font-size: 16px;
    line-height: 1.25;
}

.auth-dev-link {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    padding: 12px;
}

.auth-dev-link a {
    color: #60a5fa;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.auth-dev-link a:hover {
    color: #bfdbfe;
}

@media (max-width: 820px) {
    .auth-page {
        display: block;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 22px 20px 10px;
    }

    .auth-brand-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .auth-tradecendra-symbol {
        width: 48px;
    }

    .auth-tradecendra-wordmark {
        font-size: 31px;
    }

    .auth-form-panel {
        min-height: auto;
        padding: 18px 20px 28px;
    }

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

    .verification-card {
        padding: 26px 22px;
    }

    .verification-card h2 {
        font-size: 27px;
    }

    .auth-provider-grid {
        grid-template-columns: 1fr;
    }

    .auth-provider-button {
        justify-content: center;
    }

    .auth-agreement-dock {
        margin: 4px 0 14px;
    }
}

@media (max-width: 1040px) and (min-width: 821px) {
    .auth-page {
        grid-template-columns: minmax(300px, .42fr) minmax(460px, .58fr);
    }

    .auth-brand-panel {
        padding: 30px;
    }

}

/* Shared login/signup layout with a compact header and centered form. */
.auth-page-centered {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
.auth-page-centered .auth-brand-panel {
    background: transparent;
    border: 0;
    padding: 24px 32px;
}
.auth-page-centered .auth-brand-row {
    flex-direction: row;
    align-items: center;
}
.auth-page-centered .auth-tradecendra-brand { gap: 7px; }
.auth-page-centered .auth-tradecendra-symbol { width: 32px; }
.auth-page-centered .auth-tradecendra-wordmark { font-size: 23px; }
.auth-page-centered .auth-form-panel {
    background: transparent;
    flex: 1;
    padding: 16px 24px 48px;
}
.auth-page-centered .auth-card h2 { margin-bottom: 22px; }
@media (max-width: 820px) {
    .auth-page-centered .auth-brand-panel { padding: 20px; }
    .auth-page-centered .auth-form-panel { padding: 12px 20px 32px; }
}

/* Compact account forms, retaining readable text and natural scrolling on small screens. */
.auth-page-centered .auth-brand-panel { padding: 14px 24px; }
.auth-page-centered .auth-tradecendra-symbol { width: 28px; }
.auth-page-centered .auth-tradecendra-wordmark { font-size: 21px; }
.auth-page-centered .auth-form-panel { padding: 8px 20px 20px; }
.auth-page-centered .auth-card { padding: 20px 24px; }
.auth-page-centered .auth-card h2 { font-size: 23px; margin-bottom: 16px; }
body[data-auth-mode="register"] .auth-page-centered #auth-title { text-align: center; }
.auth-page-centered .auth-provider-grid { gap: 8px; }
.auth-page-centered .auth-provider-button { min-height: 36px; }
.auth-page-centered .auth-method-divider,
.auth-page-centered .auth-email-divider { margin: 12px 0; }
.auth-page-centered #auth-form label { margin-bottom: 9px; }
.auth-page-centered #auth-form input:not([type="checkbox"]):not([type="hidden"]) {
    min-height: 36px;
    padding: 7px 10px;
    margin-top: 4px;
}
.auth-page-centered .auth-password-field button { height: 34px; top: 5px; }
.auth-page-centered .auth-password-help { margin-bottom: 9px; }
.auth-page-centered .auth-agreement-dock { gap: 7px; margin: 4px 0 10px; }
.auth-page-centered .auth-legal-acceptance { padding: 8px 10px; gap: 8px; }
.auth-page-centered .auth-legal-acceptance::before { width: 18px; height: 18px; }
.auth-page-centered .auth-message:empty { display: none; }
.auth-page-centered .auth-submit { min-height: 36px; }
.auth-page-centered .auth-mode-toggle { margin-top: 10px; }
.auth-page-centered #auth-invitation-toggle { margin-top: 0; margin-bottom: 8px; }
.auth-page-centered .auth-card .auth-future-note { margin-top: 10px; }
@media (max-width: 480px) {
    .auth-page-centered .auth-card { padding: 18px; }
    .auth-page-centered .auth-brand-panel { padding: 14px 20px; }
}
.auth-page-centered #auth-form .auth-legal-acceptance input[type="checkbox"] {
    min-height: 1px;
    height: 1px;
    width: 1px;
    padding: 0;
    margin: 0;
    top: 12px;
    left: 18px;
}
@media (min-width: 821px) and (max-height: 800px) {
    .auth-page-centered .auth-brand-panel { padding: 10px 24px; }
    .auth-page-centered .auth-form-panel { padding-top: 4px; padding-bottom: 12px; }
    .auth-page-centered .auth-card { padding-top: 16px; padding-bottom: 16px; }
    .auth-page-centered .auth-card h2 { margin-bottom: 12px; }
}
.auth-code-help { display:block; margin-top:6px; font-size:11px; font-weight:400; line-height:1.5; }
