/* "QSE account" pages (Layout/AccountLayout.razor, 2026-10-10 redesign): sign-in, sign-up, password, email and the
   Contested Ground sign-in pages. Neutral company brand with shared theme surfaces. Classes prefixed qa-.
   The last block dresses the Bootstrap markup the Contested Ground pages (/device, /connect/consent) still use. */
.qa {
    --qa-bg: var(--qse-app-bg); --qa-card: var(--qse-surface); --qa-field: var(--qse-app-bg); --qa-line: var(--qse-border); --qa-line2: var(--qse-border-strong);
    --qa-fg: var(--qse-text); --qa-dim: var(--qse-text-muted); --qa-blue: #2563EB; --qa-blue-hi: #3B82F6; --qa-link: var(--bs-link-color);
    --qa-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
    min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    background: var(--qa-bg); color: var(--qa-fg); font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.5;
}
.qa a { color: var(--qa-link); text-decoration: none; }
.qa a:hover { text-decoration: underline; }
.qa a:focus-visible, .qa button:focus-visible, .qa input:focus-visible { outline: 3px solid var(--qse-focus); outline-offset: 2px; }

.qa-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--qa-line); }
.qa-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--qa-fg) !important; text-decoration: none !important; }
.qa-brand img { height: 30px; width: auto; display: block; }
.qa-brand span { font-weight: 700; letter-spacing: 0.02em; line-height: 1.15; }
.qa-brand small { display: block; font-family: var(--qa-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--qa-dim); font-weight: 600; }
.qa-who { color: var(--qa-dim); font-size: 14px; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-who b { color: var(--qa-fg); font-weight: 600; }
.qa-home { font-size: 14px; color: var(--qa-dim) !important; }

.qa-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.qa-body:focus { outline: none; }

.qa-card { width: 100%; max-width: 440px; background: var(--qa-card); border: 1px solid var(--qa-line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.qa-card h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.qa-card p { margin: 0; color: var(--qa-dim); }
.qa-card form { display: flex; flex-direction: column; gap: 16px; margin: 0; }

.qa-ctx { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #11161F; border: 1px solid rgba(124,170,255,0.3); }
.qa-ctx.cg { background: #12110D; border-color: rgba(201,185,143,0.35); }
.qa-ctx i { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; background: #1A2742 center / cover no-repeat; }
.qa-ctx.cg i { background: #1C1A14 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48.5' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16.2v32.3L28 64.7 0 48.5V16.2zM28 64.7l28 16.2v32.3M28 64.7L0 80.9v32.3' fill='none' stroke='%235C5440' stroke-width='3'/%3E%3C/svg%3E"); }
.qa-ctx b { display: block; color: var(--qa-fg); }
.qa-ctx span { color: var(--qa-dim); font-size: 14px; line-height: 1.35; }
.qa-ctx.cg b { color: #F2EBDA; } .qa-ctx.cg span { color: #CFC6B0; }

.qa-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qa-field label { font-size: 14px; font-weight: 600; }
.qa-field input { min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--qa-line2); background: var(--qa-field); color: var(--qa-fg); font: 400 16px Inter, system-ui, sans-serif; width: 100%; }
.qa-field input:focus { border-color: var(--qa-blue-hi); }
.qa-field small { color: var(--qa-dim); font-size: 13px; }
.qa-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* 2026-10-11 date of birth (Account/BirthDateFields.razor): three selects in one row. */
.qa-dob { border: 0; padding: 0; margin: 0; min-width: 0; }
.qa-dob legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; float: none; width: auto; color: var(--qa-fg); }
.qa-dob-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; }
.qa-dob select { min-height: 48px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--qa-line2); background: var(--qa-field); color: var(--qa-fg); font: 400 16px Inter, system-ui, sans-serif; width: 100%; }
.qa-dob select:focus { border-color: var(--qa-blue-hi); }
.qa-code-input { font-family: var(--qa-mono) !important; font-size: 24px !important; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }

.qa-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--qa-fg); }
.qa-check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--qa-blue-hi); }
.qa-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }

.qa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border-radius: 10px; border: 0; background: var(--qa-blue); color: #FFFFFF !important; font-weight: 700; font-size: 16px; padding: 0 20px; width: 100%; cursor: pointer; text-decoration: none !important; }
.qa-btn:hover { background: #1D4ED8; }
.qa-btn.ghost { background: transparent; border: 1px solid var(--qse-border-strong); color: var(--qa-fg) !important; }
.qa-btn.ghost:hover { border-color: var(--qse-border-strong); background: rgba(255,255,255,0.04); }
.qa-btn.danger { background: #B91C1C; } .qa-btn.danger:hover { background: #991B1B; }   /* 2026-10-11 account deletion */
.qa-list-plain { margin: 0 0 4px; padding-left: 18px; color: var(--qa-fg); font-size: 15px; } .qa-list-plain li { margin-bottom: 8px; }
.qa-btn svg { flex-shrink: 0; }
.qa-row { display: flex; gap: 10px; flex-wrap: wrap; } .qa-row .qa-btn { flex: 1 1 140px; }
.qa-or { display: flex; align-items: center; gap: 12px; color: var(--qa-dim); font-size: 13px; }
.qa-or::before, .qa-or::after { content: ""; flex: 1; border-top: 1px solid var(--qa-line); }
.qa-fine { font-size: 13px !important; color: var(--qa-dim); }
.qa-center { text-align: center; }

.qa-alert { border-radius: 10px; padding: 12px 14px; font-size: 15px; border: 1px solid; }
.qa-alert.err { background: rgba(239, 68, 68, 0.1); border-color: rgba(252, 165, 165, 0.4); color: var(--bs-danger-text-emphasis); }
.qa-alert.ok { background: rgba(34, 197, 94, 0.1); border-color: rgba(134, 239, 172, 0.4); color: var(--bs-success-text-emphasis); }
.qa-alert.warn { background: rgba(234, 179, 8, 0.1); border-color: rgba(253, 224, 71, 0.4); color: var(--bs-warning-text-emphasis); }
.qa-spinner { width: 32px; height: 32px; border-radius: 999px; border: 3px solid var(--qa-line2); border-top-color: var(--qa-blue-hi); animation: qa-spin 0.9s linear infinite; margin: 4px auto; }
@keyframes qa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qa-spinner { animation: none; } }

/* Turnstile sits in the flow like a field. */
.qa .cf-turnstile { min-height: 65px; }

.qa-foot { border-top: 1px solid var(--qa-line); padding: 16px clamp(16px, 3vw, 32px); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; color: var(--qa-dim); font-size: 14px; }
.qa-foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.qa-foot a { color: var(--qa-dim) !important; }
@media (max-width: 767.98px) {
    .qa-foot nav a { min-height: 44px; display: inline-flex; align-items: center; }
    .qa-card { padding: 22px 18px; }
    .qa-pair { grid-template-columns: minmax(0, 1fr); }
}

/* Account overview (/account). */
.qa-card.wide { max-width: 640px; }
.qa-sect { border-top: 1px solid var(--qa-line); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.qa-sect h2 { margin: 0; font-family: var(--qa-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--qa-dim); font-weight: 600; }
.qa-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--qse-surface-2); }
.qa-line > span { min-width: 0; }
.qa-line b { display: block; overflow-wrap: anywhere; }
.qa-line span span { color: var(--qa-dim); font-size: 14px; }
.qa-line a { white-space: nowrap; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.qa-rev { min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--qse-border-strong); background: transparent; color: var(--qa-fg); font-weight: 600; white-space: nowrap; cursor: pointer; }
.qa-rev:hover { border-color: rgba(252,165,165,0.6); color: var(--bs-danger-text-emphasis); }
.qa-rev:disabled { opacity: 0.5; cursor: default; }
.qa-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.qa-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

/* Device code + consent permission list (Connect pages). */
.qa-code { font-family: var(--qa-mono); font-weight: 700; font-size: clamp(30px, 8vw, 44px); letter-spacing: 0.12em; text-align: center; padding: 14px; border-radius: 12px; background: var(--qa-field); border: 1px dashed rgba(255,255,255,0.3); color: var(--qa-fg); }
.qa-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.qa-list li { display: flex; gap: 10px; align-items: flex-start; }
.qa-ic { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; fill: none; stroke: #86EFAC; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qa-list li.no .qa-ic { stroke: #FCA5A5; }
.qa-card p b { color: var(--qa-fg); }

/* Bootstrap markup inside the account layout (the Contested Ground /device and /connect/consent pages). */
.qa .row { width: 100%; margin: 0 !important; justify-content: center; }
.qa .row > [class*="col"] { padding: 0; max-width: 440px; width: 100%; flex: 0 1 440px; }
.qa .card { background: var(--qa-card); border: 1px solid var(--qa-line); border-radius: 18px; box-shadow: none !important; color: var(--qa-fg); }
.qa .card-body { padding: 28px !important; }
.qa .card-title { font-size: 26px; font-weight: 700; color: var(--qa-fg); }
.qa .text-muted { color: var(--qa-dim) !important; }
.qa .form-label { font-size: 14px; font-weight: 600; color: var(--qa-fg); }
.qa .form-control { min-height: 48px; border-radius: 10px; border: 1px solid var(--qa-line2); background: var(--qa-field); color: var(--qa-fg); }
.qa .form-control:focus { background: var(--qa-field); color: var(--qa-fg); border-color: var(--qa-blue-hi); box-shadow: none; }
.qa .btn { min-height: 50px; border-radius: 10px; font-weight: 700; }
.qa .btn-primary { background: var(--qa-blue); border-color: var(--qa-blue); color: #FFFFFF; }
.qa .btn-primary:hover { background: #1D4ED8; border-color: #1D4ED8; }
.qa .btn-outline-secondary { background: transparent; border-color: var(--qse-border-strong); color: var(--qa-fg); }
.qa .btn-outline-secondary:hover { background: rgba(255,255,255,0.06); color: var(--qa-fg); }
.qa .alert { border-radius: 10px; }
.qa .alert-danger { background: rgba(239, 68, 68, 0.1); border-color: rgba(252, 165, 165, 0.4); color: var(--bs-danger-text-emphasis); }
.qa .alert-warning { background: rgba(234, 179, 8, 0.1); border-color: rgba(253, 224, 71, 0.4); color: var(--bs-warning-text-emphasis); }
.qa .display-6 { color: var(--qa-fg); background: var(--qa-field); border: 1px dashed rgba(255,255,255,0.3); border-radius: 12px; padding: 14px; letter-spacing: 0.12em; }
