/* Login/Register — Razor Pages, not Blazor, so they don't get shell.css. Single centered card
   on a plain page, matching taxvill.com/sign-in's layout (no PT Garant-style split brand panel). */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

body {
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

:focus-visible {
    outline: 2px solid var(--accent-quiet);
    outline-offset: 2px;
    border-radius: 4px;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 28px;
}

.auth-brand { display: block; line-height: 0; }
.auth-brand img { display: block; height: 40px; width: auto; }

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: 0 1px 2px rgba(21, 32, 43, .06), 0 8px 24px rgba(21, 32, 43, .06);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-card h1 {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 4px;
    text-align: center;
}

.auth-card .subhead {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}

.auth-card .form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-primary); }

input[type="text"], input[type="password"], input[type="email"] {
    width: 100%;
    font: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-hover);
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    padding: 10px 12px;
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

input::placeholder { color: var(--text-muted); }

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
    outline: none;
    background: var(--bg-surface);
    border-color: var(--accent-quiet);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-quiet) 15%, transparent);
}

input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-hover) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.field-validation-error, .validation-summary-errors ul, .auth-errors ul {
    font-size: 12.5px;
    color: var(--danger);
    margin: 0;
    padding: 0;
    list-style: none;
}

.btn-primary {
    width: 100%;
    padding: 11px 16px;
    background: var(--accent);
    color: var(--accent-contrast);
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 600;
    transition: background var(--dur-fast) var(--ease);
}
.btn-primary:hover { background: var(--accent-hover); }

.auth-footnote {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}
.auth-footnote a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.auth-footnote a:hover { text-decoration: underline; }

/* ── Confirmation / reset flow ─────────────────────────────────────────── */
.auth-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.auth-head h1 { margin: 6px 0 4px; text-wrap: balance; }
.auth-head .subhead { line-height: 1.55; max-width: 34ch; text-wrap: balance; }
.auth-email {
    display: block; width: fit-content; max-width: 100%; margin: 8px auto;
    padding: 6px 12px; border-radius: var(--radius-control); background: var(--bg-hover);
    font-size: 13.5px; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere;
}

.auth-icon {
    width: 52px; height: 52px; border-radius: 16px;
    display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent);
}
.auth-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-icon--done { background: var(--success-soft); color: var(--success); }
.auth-icon--alert { background: var(--warning-soft); color: var(--warning); }

.auth-errors:empty, .auth-errors.validation-summary-valid { display: none; }
.auth-errors ul { padding: 10px 12px; background: var(--danger-soft); border-radius: var(--radius-control); display: flex; flex-direction: column; gap: 2px; }

.auth-flash {
    margin: 0; padding: 10px 12px; font-size: 13px; text-align: center;
    background: var(--success-soft); color: var(--success); border-radius: var(--radius-control);
}

.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-link { font-size: 12.5px; color: var(--accent); text-decoration: none; font-weight: 500; }
.field-link:hover { text-decoration: underline; }
.field-hint { font-size: 12px; color: var(--text-muted); }
.field-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.field-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

input.code-input {
    text-align: center;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 26px; font-weight: 700;
    letter-spacing: .45em; padding: 12px 0 12px .45em;
    font-variant-numeric: tabular-nums;
}
input.code-input::placeholder { color: var(--border-strong); }

.btn-primary { display: block; text-align: center; text-decoration: none; }
.btn-secondary {
    display: block; width: 100%; padding: 10px 16px; text-align: center; text-decoration: none;
    border: 1px solid var(--border-strong); border-radius: var(--radius-control);
    font-size: 13.5px; font-weight: 600; color: var(--text-primary); background: var(--bg-surface);
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); }
.btn-secondary:disabled { color: var(--text-muted); cursor: default; }

.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-help { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.auth-help p { margin: 0; font-size: 13px; color: var(--text-secondary); line-height: 1.55; text-wrap: balance; }

.auth-footnote { margin: 0; }
.auth-footnote .dot { margin: 0 6px; color: var(--text-muted); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .field-pair { grid-template-columns: 1fr; } }
