/* Authentication layout. Fields, labels, buttons and feedback belong to the DS. */
.auth-login-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(1rem, 4vh, 2.5rem) 0;
    background:
        radial-gradient(circle at top left, var(--brand-accent-soft), transparent 26%),
        linear-gradient(135deg, var(--brand-ink), var(--brand-surface));
    overflow: hidden;
}

.auth-login-shell::before,
.auth-login-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.auth-login-shell::before {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -140px;
    background: radial-gradient(circle, var(--brand-accent-soft), transparent 66%);
}

.auth-login-shell::after {
    width: 320px;
    height: 320px;
    left: -120px;
    bottom: -140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 68%);
}

.auth-security-container {
    position: relative;
    max-width: 520px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: var(--ds-radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand .think-logo__image {
    width: 156px;
}

.auth-login-card {
    border-radius: var(--ds-radius);
    background: var(--ds-surface-strong);
    box-shadow: var(--ds-shadow);
}

.auth-login-card .card-body {
    padding: clamp(1.25rem, 4vw, 2rem);
    min-width: 0;
    overflow-wrap: anywhere;
}

.auth-heading {
    margin-bottom: 1.5rem;
}

.auth-eyebrow {
    margin: 0 0 0.5rem;
    color: var(--ds-button-primary-hover);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-title {
    margin: 0;
    color: var(--ds-ink);
    font-size: clamp(1.35rem, 3vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.25;
}

.auth-description {
    margin: 0.65rem 0 0;
    color: var(--ds-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.auth-login-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin: 0 0 1.5rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--ds-line);
    list-style: none;
}

.auth-login-steps li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ds-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.auth-login-steps li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--ds-line);
    border-radius: 50%;
    font-size: 0.7rem;
}

.auth-login-steps [aria-current="step"] {
    color: var(--ds-button-primary-hover);
}

.auth-login-steps [aria-current="step"] > span {
    border-color: var(--ds-button-primary);
    background: var(--ds-button-primary-soft);
}

.auth-secondary-actions {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.auth-support-note {
    margin: 1rem 0 0;
    color: var(--ds-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.auth-support-note a {
    display: inline-flex;
    align-items: center;
    min-height: var(--ds-button-height-comfortable);
    color: var(--ds-button-primary-hover);
}

.auth-enrollment {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-mfa-qr {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    background: var(--ds-surface-strong);
}

.auth-manual-setup {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-button-radius);
    background: var(--ds-surface);
    font-size: 0.85rem;
    line-height: 1.5;
}

.auth-manual-setup summary {
    display: list-item;
    min-height: var(--ds-button-height-comfortable);
    padding-block: 0.65rem;
    color: var(--ds-field-ink);
    font-weight: 600;
    cursor: pointer;
}

.auth-manual-setup summary:focus-visible {
    outline: 2px solid var(--ds-field-border-focus);
    outline-offset: 3px;
    border-radius: var(--ds-field-radius);
}

.auth-mfa-secret,
.auth-mfa-codes code {
    color: var(--ds-field-ink);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    overflow-wrap: anywhere;
    user-select: all;
}

.auth-mfa-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0;
    list-style: none;
}

.auth-mfa-codes li {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-button-radius);
    background: var(--ds-surface);
    text-align: center;
}

.auth-mfa-codes code {
    font-size: 0.9rem;
}

.auth-account-shell {
    max-width: 1100px;
}

.auth-account-form {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.auth-account-form .ds-surface-panel__body {
    padding: 1.25rem;
}

.auth-account-options {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.auth-account-options legend {
    float: none;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-account-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-button-radius);
    cursor: pointer;
}

.auth-account-option .form-check-input {
    flex-shrink: 0;
    margin: 0.2rem 0 0;
}

.auth-account-option:has(input:checked) {
    border-color: var(--ds-field-border-focus);
    background: var(--ds-button-primary-soft);
}

.auth-account-option:focus-within {
    box-shadow: 0 0 0 2px var(--ds-field-focus);
}

.auth-account-option strong {
    display: block;
    font-size: 0.875rem;
}

.auth-account-option__description {
    display: block;
    margin-top: 0.3rem;
    color: var(--ds-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.auth-account-option--danger strong {
    color: var(--ds-button-danger);
}

@media (max-width: 991.98px) {
    .auth-account-form { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 575.98px) {
    .auth-mfa-codes { grid-template-columns: minmax(0, 1fr); }
    .auth-enrollment {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }
    .auth-manual-setup { width: 100%; }
    .auth-account-form .ds-surface-panel__body { padding: 1rem; }
    .auth-account-option { padding: 0.85rem; }
}

@media print {
    .auth-login-shell {
        display: block !important;
        min-height: auto !important;
        padding: 0;
        background: white;
        overflow: visible;
    }
    .auth-login-shell::before,
    .auth-login-shell::after,
    .auth-mfa-no-print { display: none !important; }
    .auth-login-card { box-shadow: none; }
    .auth-mfa-codes li { break-inside: avoid; }
}
