/* ============================================================
   Auth pages — login, 2FA, password reset
   Uses ZGF CSS variables for automatic light/dark support.
   ============================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--page-bg);
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--form-background-color);
    border: 1px solid var(--page-border);
    border-radius: var(--zgf-radius2);
    padding: 2.75rem 2.5rem 2.25rem;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.07);
}

/* ---- Logo ---- */
.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.auth-logo img {
    height: 36px;
    width: auto;
    opacity: 0.85;
    filter: invert(0);
}

[data-theme="light"] .auth-logo img,
:root:not([data-theme="dark"]) .auth-logo img {
    filter: invert(1) brightness(0.15);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .auth-logo img {
        filter: invert(1) brightness(0.15);
    }
}

/* ---- Headings ---- */
.auth-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--page-text);
    text-align: center;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--zgfgray);
    text-align: center;
    margin: 0 0 1.75rem;
    line-height: 1.5;
}

/* ---- Fields ---- */
.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--zgfgray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.auth-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--page-border);
    border-radius: var(--zgf-radius5);
    background: var(--page-bg);
    color: var(--page-text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: var(--zgfred);
}

.auth-input--code {
    font-size: 1.5rem;
    letter-spacing: 0.35em;
    text-align: center;
    font-weight: 600;
}

/* ---- Errors ---- */
.auth-errors,
.auth-field .errorlist {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--zgfred);
}

.auth-errors p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--zgfred);
}

/* ---- Primary button ---- */
.auth-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--zgfred);
    color: #fff;
    border: none;
    border-radius: var(--zgf-radius5);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 1.25rem;
    letter-spacing: 0.01em;
    transition: opacity 0.15s;
}

.auth-btn:hover {
    opacity: 0.88;
}

/* ---- Footer links ---- */
.auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.auth-links a {
    font-size: 0.85rem;
    color: var(--zgfgray);
    text-decoration: none;
}

.auth-links a:hover {
    color: var(--zgfred);
    text-decoration: underline;
}

/* ---- Microsoft SSO button ---- */
.auth-btn--ms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #0078d4;
    text-decoration: none;
    margin-top: 0;
}

.auth-btn--ms:hover {
    opacity: 0.9;
}

/* ---- Divider ---- */
.auth-divider {
    border: none;
    border-top: 1px solid var(--page-border);
    margin: 1.5rem 0;
}

/* ---- QR code container ---- */
.auth-qr {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0;
}

.auth-qr img {
    width: 200px;
    height: 200px;
    border-radius: var(--zgf-radius6);
    background: #fff;
    padding: 8px;
}

/* ---- Manual secret ---- */
.auth-secret {
    background: var(--page-bg);
    border: 1px solid var(--page-border);
    border-radius: var(--zgf-radius5);
    padding: 0.6rem 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--page-text);
    text-align: center;
    letter-spacing: 0.08em;
    word-break: break-all;
    margin-bottom: 1rem;
}

/* ---- Success icon ---- */
.auth-success-icon {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* ---- Step indicator ---- */
.auth-step {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.auth-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--page-border);
}

.auth-step-dot.active {
    background: var(--zgfred);
}
