/* VoxaDent - dark theme. Simple, large, high-contrast (WCAG AA). System fonts only (no external fonts). */
:root {
  color-scheme: dark;
  --bg: #0B0B10;          /* page */
  --card: #15151C;        /* panels */
  --field: #1E1E28;       /* inputs / text areas (slightly lighter) */
  --text: #EDEDF3;
  --muted: #B3B0C4;
  --line: #34344A;
  --line-strong: #6B6987;  /* 3:1+ against panels, for field/button outlines */
  --violet: #741DFF; --magenta: #F701D0;
  --grad: linear-gradient(90deg, #F701D0, #741DFF);
  --focus: #C9A8FF;
  --rec: #FF5A5F;         /* recording / errors (text-safe red on dark) */
  --rec-solid: #E5383B;
  --ok: #6EE7A0; --ok-bg: #0E2A1C; --ok-line: #1F5E3D;
  --warn: #FFD27A; --warn-bg: #2B2110; --warn-line: #6B5020;
  --mark-bg: #FFD54F; --mark-text: #15151C;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 18px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
[hidden] { display: none !important; }

.topbar { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: var(--card); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--grad); }
.brand { display: flex; align-items: center; }
.brand-logo { height: 42px; width: auto; display: block; }
.login-logo { display: block; width: 260px; max-width: 80%; height: auto; margin: -10px auto 4px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.who { color: var(--muted); font-size: 16px; }

main { max-width: 1400px; margin: 0 auto; padding: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.narrow { max-width: 480px; margin: 40px auto; }
.narrow h1 { text-align: center; }
h1 { margin-top: 0; font-size: 28px; }
h2 { margin: 0; font-size: 20px; }
a { color: var(--focus); }

label { display: block; font-weight: 600; margin-bottom: 14px; }
input, select { display: block; width: 100%; margin-top: 6px; padding: 12px; font: inherit; color: var(--text); border: 2px solid var(--line-strong); border-radius: 8px; background: var(--field); }
select option { background: var(--field); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--violet); }
input.code { font-size: 28px; letter-spacing: 6px; text-align: center; }
::placeholder { color: #8E8BA3; }

.btn { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 2px solid var(--line-strong); background: var(--field); color: var(--text); cursor: pointer; }
.btn:hover:not(:disabled) { border-color: var(--focus); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* Gradient buttons use bold 19px+ text so white text meets WCAG AA for large text on the magenta end. */
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; font-size: 20px; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-big { font-size: 20px; padding: 14px 24px; }
form .btn-big { width: 100%; }
.btn-record { font-size: 26px; font-weight: 700; padding: 18px 40px; min-width: 260px; background: var(--grad); border-color: transparent; color: #fff; border-radius: 999px; box-shadow: 0 4px 22px rgba(247, 1, 208, .28); }
.btn-record:hover:not(:disabled) { filter: brightness(1.1); border-color: transparent; }
.btn-record.recording { background: transparent; border-color: var(--rec); color: var(--rec); box-shadow: 0 0 0 4px rgba(255, 90, 95, .18); }

.msg { margin: 10px 0 0; }
.msg:empty { display: none; }
.error { color: var(--rec); font-weight: 600; }
.notice { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); padding: 8px 12px; border-radius: 8px; }

.steps { padding-left: 22px; }
.qr { display: flex; justify-content: center; margin: 10px 0; }
/* White tile so phone cameras can scan the QR code */
.qr img { width: 240px; height: 240px; padding: 14px; background: #fff; border-radius: 10px; }
.secret { display: block; word-break: break-all; font-size: 16px; padding: 8px; background: var(--field); color: var(--text); border-radius: 6px; margin-top: 6px; }
summary { cursor: pointer; color: var(--muted); }

.pickers { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.pickers label { flex: 1 1 300px; margin-bottom: 0; }
.recorder { display: flex; align-items: center; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.rec-indicator { font-size: 22px; font-weight: 700; color: var(--rec); display: flex; align-items: center; gap: 10px; }
.dot { width: 18px; height: 18px; border-radius: 50%; background: var(--rec-solid); box-shadow: 0 0 10px var(--rec-solid); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.status { font-size: 18px; color: var(--muted); }

.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .panes { grid-template-columns: 1fr; } }
.pane { display: flex; flex-direction: column; margin-bottom: 0; }
.pane-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
textarea { width: 100%; min-height: 460px; resize: vertical; padding: 12px; font: 17px/1.5 Consolas, "Cascadia Mono", monospace; color: var(--text); background: var(--field); border: 2px solid var(--line-strong); border-radius: 8px; }
.marked { margin-top: 10px; padding: 12px; border: 2px dashed var(--warn-line); background: var(--warn-bg); color: var(--text); border-radius: 8px; white-space: pre-wrap; font: 16px/1.5 Consolas, "Cascadia Mono", monospace; max-height: 300px; overflow: auto; }
.marked::before { content: "Numbers to check are highlighted:"; display: block; font: 600 14px "Segoe UI", system-ui, sans-serif; color: var(--warn); margin-bottom: 6px; }
mark { background: var(--mark-bg); color: var(--mark-text); padding: 0 2px; border-radius: 3px; font-weight: 700; }

.numcheck { margin-top: 18px; }
.numcheck-summary { font-size: 20px; font-weight: 700; padding: 12px 16px; border-radius: 8px; }
.numcheck-summary.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.numcheck-summary.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
#numcheck-list { color: var(--text); }
.small { font-size: 14px; color: var(--muted); }
.bottom-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
