/* Authentication forms follow the current theme, including browser autofill. */
.auth-page { --auth-field-bg: #fff; --auth-field-text: #1e293b; }
.dark .auth-page { --auth-field-bg: #0d111b; --auth-field-text: #f8fafc; }
.auth-page input:not([type="checkbox"]):not([type="hidden"]) { color-scheme: light; }
.dark .auth-page input:not([type="checkbox"]):not([type="hidden"]) { color-scheme: dark; }
.auth-page input:-webkit-autofill,
.auth-page input:-webkit-autofill:hover,
.auth-page input:-webkit-autofill:focus,
.auth-page input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--auth-field-text) !important;
    caret-color: var(--auth-field-text);
    -webkit-box-shadow: 0 0 0 1000px var(--auth-field-bg) inset !important;
    box-shadow: 0 0 0 1000px var(--auth-field-bg) inset !important;
}
.auth-page input:autofill { background-color: var(--auth-field-bg) !important; color: var(--auth-field-text) !important; }
.auth-page .validation-summary-valid { display: none; }
.auth-page .validation-summary-errors { margin-block: 16px; padding: 12px; border: 1px solid #ef4444; border-radius: 8px; color: #dc2626; }
.dark .auth-page .validation-summary-errors { color: #fca5a5; }
.auth-page .validation-summary-errors ul { margin: 0; padding-inline-start: 18px; }
.auth-page [hidden] { display: none !important; }
.auth-page .auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.auth-page .tm-country-dropdown { position: relative; }
.auth-page .tm-phone-wrap, .auth-page .tm-phone-input { min-width: 0; }

/* Authentication support pages share the login page's gold branding. */
.auth-page .auth-result {
    --result-text: #0f172a;
    --result-muted: #475569;
    --result-accent: #8b6508;
    --result-border: rgba(184, 134, 11, .24);
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 8rem 1rem 4rem;
    color: var(--result-text);
}
.dark .auth-page .auth-result {
    --result-text: #f8fafc;
    --result-muted: #b2bdcc;
    --result-accent: #d4a017;
    --result-border: rgba(184, 134, 11, .3);
}
.auth-page .auth-result-background { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.auth-page .auth-result-background svg { position: absolute; top: 20%; width: 100%; height: 24rem; color: rgba(34, 197, 94, .12); }
.auth-page .auth-result-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 2.5rem;
    width: 100%;
    max-width: 56rem;
    padding: 2rem;
    border: 1px solid var(--result-border);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #fff, #f8fafc);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}
.dark .auth-page .auth-result-card {
    background: linear-gradient(145deg, #101010, #070707);
    box-shadow: 0 20px 70px rgba(0, 0, 0, .45);
}
.auth-page .auth-result-content { min-width: 0; align-self: center; padding-block: 1rem; text-align: start; }
.auth-page .auth-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--result-border);
    border-radius: 1rem;
    background: rgba(184, 134, 11, .1);
    color: var(--result-accent);
}
.auth-page .auth-result-icon svg { width: 1.75rem; height: 1.75rem; }
.auth-page .auth-result-icon-warning { color: #b45309; background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); }
.dark .auth-page .auth-result-icon-warning { color: #fbbf24; }
.auth-page .auth-result-content h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 700; line-height: 1.4; }
.auth-page .auth-result-message { margin-top: 1rem; color: var(--result-muted); font-size: 1rem; line-height: 1.9; overflow-wrap: anywhere; }
.auth-page .auth-result-warning { color: #92400e; }
.dark .auth-page .auth-result-warning { color: #fcd34d; }
.auth-page .auth-result-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 2rem; }
.auth-page .auth-result-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    min-height: 3rem;
    padding: .75rem 1rem;
    border: 1px solid transparent;
    border-radius: .75rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s, border-color .15s;
}
.auth-page .auth-result-button svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.auth-page .auth-result-button-primary { background: #8b6508; color: #fff; box-shadow: 0 6px 18px rgba(139, 101, 8, .18); }
.auth-page .auth-result-button-primary:hover { background: #755406; }
.auth-page .auth-result-button-secondary { border-color: var(--result-border); color: var(--result-accent); background: transparent; }
.auth-page .auth-result-button-secondary:hover { background: rgba(184, 134, 11, .08); border-color: var(--result-accent); }
.auth-page .auth-result-button:focus-visible { outline: 3px solid var(--result-accent); outline-offset: 4px; }
.auth-page .auth-result-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    border: 1px solid var(--result-border);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(184, 134, 11, .09), rgba(184, 134, 11, .02));
    text-align: center;
}
.auth-page .auth-result-logo { display: block; width: 12rem; max-width: 100%; height: auto; object-fit: contain; }
.auth-page .auth-result-trust-icon { display: flex; justify-content: center; color: var(--result-accent); margin-bottom: .75rem; }
.auth-page .auth-result-trust-icon svg { width: 1.5rem; height: 1.5rem; }
.auth-page .auth-result-brand h2 { font-size: 1.125rem; line-height: 1.5; font-weight: 700; margin-bottom: .5rem; }
.auth-page .auth-result-brand p { color: var(--result-muted); font-size: .875rem; line-height: 1.8; }
.auth-page .auth-confirm-form { margin-top: 1.5rem; }
.auth-page .auth-confirm-email { text-align: start; }
.auth-page .auth-confirm-email label { display: block; margin-bottom: .5rem; font-size: .875rem; font-weight: 500; }
.auth-page .auth-confirm-field { position: relative; }
.auth-page .auth-confirm-field > svg { position: absolute; top: 50%; left: 1rem; width: 1.25rem; height: 1.25rem; transform: translateY(-50%); color: var(--result-muted); pointer-events: none; }
.auth-page .auth-confirm-field input { min-width: 0; min-height: 3rem; padding-inline-start: 3rem; text-align: start; }
.auth-page .auth-recovery-options { margin-top: 1.5rem; }
.auth-page .auth-recovery-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.auth-page .auth-recovery-field { min-width: 0; text-align: start; }
.auth-page .auth-recovery-label { display: block; margin-bottom: .5rem; font-size: .875rem; font-weight: 500; }
.auth-page .auth-recovery-hint { color: var(--result-muted); font-size: .875rem; line-height: 1.8; }
.auth-page .auth-recovery .fp-btn { width: 100%; }
.auth-page .auth-recovery .auth-result-button:disabled { opacity: .7; cursor: not-allowed; }
.auth-page .auth-recovery .fp-tab--active { background: rgba(184, 134, 11, .12); color: var(--result-accent); }
.auth-page .auth-recovery .fp-tab:focus-visible { outline: 2px solid var(--result-accent); outline-offset: 2px; }
.auth-page .auth-recovery #fpError:empty { display: none; }
.auth-page .auth-recovery .tm-country-panel { right: auto; left: auto; inset-inline-start: 0; max-width: calc(100vw - 6rem); }
.auth-page .auth-recovery .tm-phone-input:focus { border-color: var(--result-accent); box-shadow: 0 0 0 3px rgba(184, 134, 11, .15); }
.auth-page .auth-recovery-footer { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--result-border); text-align: center; }
.auth-page .auth-recovery-footer a { color: var(--result-accent); font-size: .875rem; line-height: 1.8; }
.auth-page .auth-recovery-footer a:hover { text-decoration: underline; }
.auth-page .auth-password-field { position: relative; }
.auth-page .auth-password-field > svg { position: absolute; top: 50%; inset-inline-start: 1rem; width: 1.25rem; height: 1.25rem; transform: translateY(-50%); color: var(--result-muted); pointer-events: none; }
.auth-page .auth-password-field input { min-width: 0; min-height: 3rem; padding-inline: 3rem; text-align: start; }
.auth-page .auth-password-field button { position: absolute; inset-block: 2px; inset-inline-end: 2px; display: flex; align-items: center; justify-content: center; width: 2.75rem; border-radius: .625rem; color: var(--result-muted); }
.auth-page .auth-password-field button svg { width: 1.25rem; height: 1.25rem; }
.auth-page .auth-password-field button:hover { color: var(--result-accent); }
.auth-page .auth-password-field button:focus-visible { outline: 2px solid var(--result-accent); }
@media (max-width: 767px) {
    .auth-page .auth-result { padding: 7rem 1rem 3rem; }
    .auth-page .auth-result-card { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem; }
    .auth-page .auth-result-brand { order: -1; padding: 1rem; gap: .75rem; }
    .auth-page .auth-result-logo { width: 6rem; }
    .auth-page .auth-result-brand-copy { display: none; }
    .auth-page .auth-result-content { padding-block: 0; text-align: center; }
    .auth-page .auth-result-icon { margin-inline: auto; margin-bottom: 1rem; }
    .auth-page .auth-result-actions { margin-top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-page .auth-result-button { transition: none; }
}
@media (max-width: 767px) {
    .auth-page .glass-card { padding: 24px 16px; }
    .auth-page .input-box .flex { flex-wrap: wrap; }
}
