.qa-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, #eef2ff 0%, #f8fafc 45%, #f1f5f9 100%);
    padding: 2.5rem 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #0f172a;
}

.qa-auth-wrap {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.qa-auth-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow:
        0 30px 60px -22px rgba(15, 23, 42, 0.28),
        0 6px 20px -8px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.qa-auth-card--wide {
    max-width: 960px;
}

.qa-auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    text-align: center;
}

.qa-auth-logo {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow:
        0 14px 28px -10px rgba(30, 58, 138, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.qa-auth-logo--brand {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    background: #0a0a0a;
    overflow: hidden;
    padding: 6px;
    box-shadow:
        0 14px 28px -10px rgba(15, 23, 42, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.qa-auth-logo--brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qa-auth-logo--danger {
    background: linear-gradient(135deg, #991b1b 0%, #ef4444 100%);
    box-shadow:
        0 14px 28px -10px rgba(153, 27, 27, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.qa-auth-logo--success {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    box-shadow:
        0 14px 28px -10px rgba(6, 95, 70, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.qa-auth-title {
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #0f172a;
    margin: 0;
}

.qa-auth-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    max-width: 36ch;
}

.qa-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.qa-auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.qa-auth-field-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.qa-auth-field-hint {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

.qa-auth-input {
    padding: 0.78rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
    width: 100%;
    box-sizing: border-box;
}

.qa-auth-input::placeholder {
    color: #94a3b8;
}

.qa-auth-input:hover {
    border-color: #94a3b8;
}

.qa-auth-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.qa-auth-input--code {
    text-align: center;
    letter-spacing: 0.35em;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.875rem 1rem;
}

.qa-auth-check {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.qa-auth-check input {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.qa-auth-btn {
    padding: 0.82rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 150ms ease, background 150ms ease, color 150ms ease, border-color 150ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1.2;
}

.qa-auth-btn--primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow:
        0 8px 18px -6px rgba(30, 58, 138, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    width: 100%;
}

.qa-auth-btn--primary:hover {
    box-shadow:
        0 12px 24px -6px rgba(30, 58, 138, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.qa-auth-btn--primary:active {
    transform: translateY(1px);
}

.qa-auth-btn--secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.qa-auth-btn--secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.qa-auth-btn--danger {
    background: #ffffff;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.qa-auth-btn--danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.qa-auth-btn--ghost {
    background: transparent;
    color: #475569;
}

.qa-auth-btn--ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.qa-auth-alert {
    padding: 0.9rem 1.05rem;
    border-radius: 10px;
    font-size: 0.875rem;
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    line-height: 1.5;
}

.qa-auth-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.qa-auth-alert strong {
    display: block;
    margin-bottom: 0.15rem;
    font-weight: 600;
}

.qa-auth-alert--danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.qa-auth-alert--warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.qa-auth-alert--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.qa-auth-alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.qa-auth-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.25rem 0;
}

.qa-auth-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
}

.qa-auth-link-row {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.qa-auth-link-row a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.qa-auth-link-row a:hover {
    text-decoration: underline;
}

.qa-auth-qr-grid {
    display: grid;
    grid-template-columns: minmax(200px, 220px) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.qa-auth-qr-grid > * {
    min-width: 0;
}

.qa-auth-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
}

.qa-auth-qr-box img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    background: #ffffff;
    padding: 10px;
    box-shadow: 0 0 0 1px #e2e8f0, 0 4px 12px -4px rgba(15, 23, 42, 0.1);
}

.qa-auth-qr-caption {
    font-size: 0.8125rem;
    color: #64748b;
    text-align: center;
}

.qa-auth-secret-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-family: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    color: #0f172a;
    word-break: break-all;
}

.qa-auth-step-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
    padding-left: 1.25rem;
    margin: 0;
}

.qa-auth-step-list li::marker {
    color: #3b82f6;
    font-weight: 600;
}

.qa-auth-kv {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

.qa-auth-kv-label {
    color: #64748b;
}

.qa-auth-kv-value {
    color: #0f172a;
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: right;
    min-width: 0;
}

.qa-auth-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.qa-auth-action-row {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    align-items: center;
}

.qa-auth-action-row .qa-auth-btn {
    width: auto;
}

.qa-auth-2fa-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.qa-auth-2fa-step {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.qa-auth-2fa-step-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px -2px rgba(30, 58, 138, 0.5);
}

.qa-auth-2fa-step-body {
    flex: 1;
    min-width: 0;
}

.qa-auth-2fa-step-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.qa-auth-2fa-step-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.55;
}

.qa-auth-2fa-step-text code {
    font-family: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace;
    font-size: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 1px 6px;
    border-radius: 4px;
    color: #1e3a8a;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.qa-auth-2fa-step-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.625rem;
}

.qa-auth-2fa-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease;
}

.qa-auth-2fa-link:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.qa-auth-2fa-signout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 12px;
    color: #64748b;
}

.qa-auth-2fa-signout-link {
    background: transparent;
    border: none;
    padding: 0;
    color: #1e40af;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
}

.qa-auth-2fa-signout-link:hover {
    color: #1e3a8a;
}

.qa-recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .qa-recovery-grid {
        grid-template-columns: 1fr;
    }
}

.qa-recovery-code {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #0f172a;
    text-align: center;
    user-select: all;
}

@media print {
    .qa-auth-shell {
        background: #ffffff !important;
        padding: 0 !important;
    }
    .qa-auth-card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
    }
    .qa-auth-action-row {
        display: none !important;
    }
    .qa-recovery-grid {
        background: #ffffff !important;
        border-color: #94a3b8 !important;
    }
}

@media (max-width: 600px) {
    .qa-auth-card {
        padding: 1.75rem 1.5rem;
        border-radius: 14px;
    }
    .qa-auth-qr-grid {
        grid-template-columns: 1fr;
    }
}
