/* Additions to login.css for the pages around the login form: second factor,
   password change, 2FA setup, logout, MCP consent. Same tokens, same card —
   this file only adds what those pages need beyond a two-field form. */

.auth-text {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.auth-text strong {
    color: var(--ink);
}

.auth-links {
    margin: 16px 0 0;
    text-align: center;
    font-size: 14px;
}

.auth-links a,
.auth-link-button {
    color: var(--brass-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-link-button {
    padding: 4px 2px;
    font: inherit;
    font-size: 14px;
    background: none;
    border: 0;
    cursor: pointer;
}

.auth-links a:focus-visible,
.auth-link-button:focus-visible {
    outline: 2px solid var(--brass-text);
    outline-offset: 2px;
    border-radius: 4px;
}

.auth-inline-form {
    display: inline;
    margin: 0;
}

/* Divider between the password form and the alternative sign-in. */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(43, 40, 48, 0.16);
}

.auth-secondary {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--field-border);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-secondary:hover {
    border-color: var(--brass-text);
    background: #ffffff;
}

.auth-secondary:focus-visible {
    outline: 3px solid var(--brass-text);
    outline-offset: 3px;
}

.auth-secondary[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(43, 40, 48, 0.14);
}

.auth-section h2 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.auth-rules {
    margin: 0 0 16px;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.auth-code-input {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3em;
    text-align: center;
}

.auth-qr {
    display: block;
    width: 200px;
    height: 200px;
    margin: 0 auto 12px;
    padding: 8px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--field-border);
}

.auth-secret {
    display: block;
    margin: 0 0 16px;
    padding: 8px 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-align: center;
    word-break: break-all;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed var(--field-border);
    border-radius: 8px;
}

.auth-recovery-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
    margin: 0 0 16px;
    padding: 12px 14px;
    list-style: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    letter-spacing: 0.06em;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--field-border);
    border-radius: 10px;
}

.auth-card-wide {
    max-width: 460px;
}

.auth-consent-list {
    margin: 0 0 16px;
    padding: 12px 14px;
    list-style: none;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--field-border);
    border-radius: 10px;
}

.auth-consent-list span {
    color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
    .auth-secondary {
        transition: none;
    }
}

@media print {
    .login-scene,
    .login-footer,
    .login-form,
    .auth-links,
    .auth-noprint {
        display: none !important;
    }

    .login-main {
        display: block;
        padding: 0;
    }

    .login-card {
        box-shadow: none;
        border: 0;
        background: #ffffff;
    }
}

/* display:block above would otherwise win over the hidden attribute; the
   passkey buttons stay hidden until the browser is known to support WebAuthn. */
.auth-secondary[hidden] {
    display: none;
}

#login-passkey {
    margin-top: 12px;
}
