/* Shared styling for standalone, unauthenticated-or-token-authenticated
   auth pages: /forgotlogin, /reset-password, /settings/change-password,
   and the parental-controls / change-email flow pages. Reuses chat.css's
   design tokens (colors, fonts) — this file only adds the centered-card
   layout these pages need on top of that. */

.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* (Bug fix) This used to be `display: flex; gap: 8px;` around markup
   shaped like `depot<span>.</span>` — in a flex container, the bare
   text "depot" becomes its own anonymous flex item, separate from the
   <span> holding the dot, so `gap` inserted 8px of space BETWEEN THE
   WORD AND ITS OWN TRAILING DOT instead of only ever separating
   sibling elements the way it was intended to (there's only ever one
   real child here, the dot span — gap had nothing legitimate to space
   out). That's the "weird two-character-width gap before the dot" bug
   reported on /forgotlogin, /reset-password, and the parental-controls
   pages. Fixed by dropping flex entirely — this is plain centered text,
   it never needed flexbox in the first place, and `<span>` is already
   inline so it sits flush against "depot" by default with zero gap
   risk from now on. */
.auth-logo {
    text-align: center;
    margin-bottom: 22px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
}
.auth-logo span { color: var(--amber); }

/* Matches chat.html's top-left .logo-cell (icon + wordmark, same
   font-weight/size/color as .logo-cell-text) — used where a page needs
   to visually read as "the same Depot logo you see in the app" rather
   than the plain text-only .auth-logo above. Icon + text sit in
   separate elements, so `gap` here is legitimate and has never had the
   .auth-logo bug — kept as-is. */
.site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}
.site-logo img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}
.site-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--white);
    letter-spacing: -0.02em;
}
.site-logo-text span { color: var(--amber); }

.auth-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    margin-bottom: 8px;
}

.auth-sub {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 22px;
}

.auth-field { margin-bottom: 16px; }

.auth-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 16px; /* prevents iOS Safari auto-zoom on focus */
}
.auth-field input:focus {
    outline: none;
    border-color: rgba(255,145,0,0.4);
    box-shadow: 0 0 0 3px rgba(255,145,0,0.1);
}

.auth-method-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 4px;
}
.recovery-method-tab {
    flex: 1;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.recovery-method-tab.active {
    background: var(--amber);
    color: #0f172a;
    font-weight: 600;
}

.auth-submit { width: 100%; height: 44px; margin-top: 4px; }

.auth-error {
    font-size: 0.8rem;
    color: var(--red);
    margin-top: 12px;
    text-align: center;
}

.auth-success { text-align: center; }
.auth-success-icon {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--green-dim);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.auth-success-icon svg { width: 22px; height: 22px; stroke: var(--green); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-success p { font-size: 0.85rem; color: var(--text); line-height: 1.6; }

.auth-invalid { text-align: center; }
.auth-invalid p { font-size: 0.85rem; color: var(--text); line-height: 1.6; margin-bottom: 18px; }

.auth-back-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
}
.auth-back-link:hover { color: var(--amber); }

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}