/* Sign-in and account-access pages (Phase D): the navy page, logo and eyebrow, the white card, the forms inside it and
   the plain access-denied state. Values follow the Next.js AdminAuthCard and its form fields. */

body.auth { min-height: 100vh; background: var(--brand-primary); }
body.auth-plain { background: var(--bg-page); }

.auth-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 3rem 1rem; outline: none; }
.auth-column { width: 100%; max-width: 28rem; }

.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; text-align: center; }
.auth-logo { display: inline-flex; border-radius: var(--radius-sm); }
.auth-logo img { display: block; height: 2.5rem; width: auto; }
.auth-logo:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.auth-eyebrow { display: flex; align-items: center; gap: 0.375rem; margin: 0; font-size: var(--text-caption); font-weight: 500; letter-spacing: 0.025em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }
.auth-eyebrow .icon { width: 0.875rem; height: 0.875rem; }

.auth-card { padding: 2rem; border-radius: 1rem; background: var(--bg-surface); box-shadow: var(--shadow-lg); }
.auth-card h1 { margin: 0 0 1.5rem; font-family: var(--font-heading); font-size: var(--text-h4); font-weight: 500; line-height: 1.3; color: var(--text-primary); }

.auth-notice { margin: 1.5rem 0 0; text-align: center; font-size: var(--text-caption); color: rgba(255, 255, 255, 0.7); }

/* ---------- forms in the card ---------- */
.auth-form, .auth-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.auth-form-tight, .auth-stack-tight { gap: 1rem; }
.auth-form[hidden], .auth-stack[hidden], .auth-done[hidden] { display: none; }
.auth-card .field { gap: 0.5rem; }
.auth-card .field label { font-size: var(--text-small); color: var(--text-primary); }
.auth-card .field input:not([type="checkbox"]):not([type="radio"]) { height: 2rem; min-height: 2rem; padding: 0.25rem 0.625rem; border-color: var(--border-default); border-radius: var(--radius-md); }
.auth-grid { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .auth-grid { grid-template-columns: 1fr 1fr; } }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.auth-check { align-items: center; }
.auth-check input { width: 1.5rem; height: 1.5rem; margin: 0; }
.auth-check label { font-size: var(--text-small); color: var(--text-secondary); }

/* #1c6cff on white is 4.5:1, as on the Next.js page. */
.auth-link { font-size: var(--text-small); font-weight: 500; color: var(--brand-accent); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-link-center { align-self: center; }

.auth-submit { width: 100%; min-height: 2.25rem; }
.auth-intro { margin: 0; font-size: var(--text-small); color: var(--text-muted); }
.auth-intro strong { color: var(--text-primary); }
.auth-small { margin: 0; font-size: var(--text-small); }
.auth-caption { margin: 0; font-size: var(--text-caption); color: var(--text-muted); }
.auth-loading { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--text-muted); }
.auth-done { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; outline: none; }

/* Alerts (shadcn Alert): an icon and the text. */
.auth-alert { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; align-items: start; margin: 0; padding: 0.75rem 1rem; border: 1px solid var(--border-default); border-radius: var(--radius); font-size: var(--text-small); outline: none; }
.auth-alert[hidden] { display: none; }
.auth-alert > .icon { width: 1rem; height: 1rem; margin-top: 0.1rem; }
.auth-alert p { margin: 0; }
.auth-alert a { color: inherit; text-decoration: underline; }
.auth-alert-error { background: var(--bg-surface); color: var(--state-error-text); }
.auth-alert-success { border-color: transparent; background: color-mix(in srgb, var(--state-success) 10%, white); color: var(--state-success-text); font-weight: 500; }
.auth-alert-success > .icon { width: 1.25rem; height: 1.25rem; margin-top: 0; }

/* ---------- access denied (no card shell) ---------- */
.auth-state { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 100%; max-width: 27rem; padding: 3rem 1.5rem; border: 1px dashed var(--border-default); border-radius: var(--radius-xl); text-align: center; }
.auth-state-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; margin-bottom: 0.75rem; border-radius: 999px; background: color-mix(in srgb, var(--state-error) 12%, white); color: var(--state-error); }
.auth-state-icon .icon { width: 1.5rem; height: 1.5rem; }
.auth-state h1 { margin: 0; font-family: var(--font-heading); font-size: 1rem; line-height: 1.4; font-weight: 500; color: var(--text-primary); }
.auth-state p { max-width: 24rem; margin: 0; font-size: var(--text-small); color: var(--text-muted); }
.auth-state .button { margin-top: 1.25rem; }

@media (max-width: 30rem) {
  .auth-card { padding: 2rem 1.5rem; }
}

/* ---------- Store sign-in (/login, 2026-11-09): tabs, Google / Apple, registration, alternatives ---------- */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; margin: 0 0 1.25rem; padding: 0.25rem; border-radius: var(--radius); background: var(--bg-muted); }
.auth-tab { min-height: 2.75rem; border: 0; border-radius: calc(var(--radius) - 2px); background: transparent; color: var(--text-secondary); font: inherit; font-size: var(--text-small); font-weight: 600; cursor: pointer; }
.auth-tab[aria-selected="true"] { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.auth-tab:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.auth-social { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.auth-social[hidden], .auth-social-button[hidden] { display: none; }
.auth-social-button { justify-content: center; gap: 0.5rem; width: 100%; min-height: 2.75rem; border: 1px solid var(--border-strong); background: var(--bg-surface); color: var(--text-primary); font-weight: 600; text-decoration: none; }
.auth-social-button:hover { background: var(--bg-muted); text-decoration: none; }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0 0; color: var(--text-muted); font-size: var(--text-caption); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-default); }
.auth-alt { margin: 0.25rem 0 0; color: var(--text-secondary); font-size: var(--text-small); text-align: center; }
.auth-alert-info { background: var(--bg-muted); color: var(--text-primary); }
.auth-link-button { padding: 0; border: 0; background: none; font: inherit; color: var(--brand-accent); font-weight: 600; text-decoration: underline; cursor: pointer; }
.auth-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-items: start; }
.auth-row-split .field { margin: 0; }
.field-hint { margin: 0.25rem 0 0; color: var(--text-muted); font-size: var(--text-caption); }
@media (max-width: 420px) {
  .auth-card { padding: 1.25rem; }
  .auth-row-split { grid-template-columns: 1fr; }
}

/* Resend Verification Email (registration screen, expired link page; context/specs/email-verification-delivery.md). */
.auth-resend { display: grid; gap: 0.5rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); }
.auth-resend-title { margin: 0; font-weight: 600; color: var(--text-primary); }
.auth-resend .auth-intro { margin: 0; }
.auth-resend-status { margin: 0; min-height: 1.25rem; color: var(--text-secondary); }
.auth-resend [data-resend-verification]:disabled { cursor: not-allowed; opacity: 0.75; }
/* /clogin while signed in to the Digital Store (client-login button, 2026-11-16): several short paragraphs. */
.auth-alert[data-store-account] > div { display: grid; gap: 0.375rem; min-width: 0; }
.auth-alert[data-store-account] p { margin: 0; }
