/* Jobmate HUB — a light "writing workspace" look: warm paper background, one teal accent,
   serif headings. Every colour is a token so the dark theme only has to redefine this block. */

:root {
  --bg: #f6f4ee;
  --panel: #ffffff;
  --panel-2: #faf8f3;
  --border: #e3ded3;
  --border-strong: #cfc8ba;
  --text: #1d2b2a;
  --subtle: #5f6b69;
  --accent: #0f766e;
  --accent-hover: #0b5f59;
  --on-accent: #ffffff;
  --accent-soft: #dff1ee;
  --accent-ink: #0b5f59;
  --success: #15803d;
  --success-soft: #e3f4e8;
  --error: #b42318;
  --error-soft: #fdecea;
  --error-line: #f3c7c1;
  --score-high: #4f46e5;
  --score-mid: #f97316;
  --score-low: #ef4444;
  --hover: #efece4;
  --input-bg: #ffffff;
  --sidebar-bg: #fbfaf6;
  --focus: rgba(15, 118, 110, 0.22);
  --shadow: 0 1px 2px rgba(29, 43, 42, 0.05), 0 4px 14px rgba(29, 43, 42, 0.04);
  --radius: 10px;
  --side: 250px;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

/* Dark theme: used when the visitor picked it, or when their system prefers it and they have
   not picked light. The two blocks must stay identical. */
:root[data-theme="dark"] {
  --bg: #0f1716;
  --panel: #172120;
  --panel-2: #131c1b;
  --border: #283634;
  --border-strong: #3a4b48;
  --text: #e5ecea;
  --subtle: #93a3a0;
  --accent: #2aa598;
  --accent-hover: #36b8aa;
  --on-accent: #06211e;
  --accent-soft: #153430;
  --accent-ink: #6ddccf;
  --success: #5cc98a;
  --success-soft: #14301f;
  --error: #f08a80;
  --error-soft: #3a1b19;
  --error-line: #6a2e29;
  --score-high: #6366f1;
  --score-mid: #fb923c;
  --score-low: #f43f5e;
  --hover: #1e2b29;
  --input-bg: #111a19;
  --sidebar-bg: #121b1a;
  --focus: rgba(42, 165, 152, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1716;
    --panel: #172120;
    --panel-2: #131c1b;
    --border: #283634;
    --border-strong: #3a4b48;
    --text: #e5ecea;
    --subtle: #93a3a0;
    --accent: #2aa598;
    --accent-hover: #36b8aa;
    --on-accent: #06211e;
    --accent-soft: #153430;
    --accent-ink: #6ddccf;
    --success: #5cc98a;
    --success-soft: #14301f;
    --error: #f08a80;
    --error-soft: #3a1b19;
    --error-line: #6a2e29;
    --score-high: #6366f1;
    --score-mid: #fb923c;
    --score-low: #f43f5e;
    --hover: #1e2b29;
    --input-bg: #111a19;
    --sidebar-bg: #121b1a;
    --focus: rgba(42, 165, 152, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent-ink); }

.ic {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}

/* ---- layout and sidebar ---- */

.layout {
  display: flex;
  min-height: 100vh;
}

.topbar { display: none; }

.sidebar {
  width: var(--side);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 22px 14px 16px 14px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  padding: 0 6px;
  margin-bottom: 8px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
}

.brand-mark .ic { vertical-align: 0; }

.nav-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 0 10px;
  margin: 14px 0 5px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin-bottom: 1px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.nav-link .ic { color: var(--subtle); }
.nav-link:hover { background: var(--hover); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-link.active .ic { color: var(--accent-ink); }

.sidebar-spacer { flex: 1; min-height: 12px; }

.sidebar-user {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding: 14px 6px 0 6px;
  font-size: 13px;
}

.sidebar-user-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sidebar-user-name { font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
button.btn.signout-btn { width: 100%; margin-top: 12px; padding: 7px 10px; font-size: 13px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--subtle);
  cursor: pointer;
}

.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn .ic { vertical-align: 0; }

/* The toggle shows where a click takes you: a moon in light mode, a sun in dark mode. */
.theme-toggle .ic:last-child { display: none; }
:root[data-theme="dark"] .theme-toggle .ic:first-child { display: none; }
:root[data-theme="dark"] .theme-toggle .ic:last-child { display: inline; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic:first-child { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ic:last-child { display: inline; }
}

.content {
  flex: 1;
  min-width: 0;
  padding: 30px 36px 48px 36px;
  max-width: 1100px;
}

.content.wide { max-width: 1560px; }
.content.full { max-width: none; }

h1.page-title {
  font-family: var(--font-heading);
  font-size: 27px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px 0;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- two-column drafting workspace: what you give the AI on the left, its draft on the right ---- */

.workspace { display: block; }

@media (min-width: 1180px) {
  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .draft-col { position: sticky; top: 24px; }
}

.panel.draft-panel { border-top: 3px solid var(--accent); }

.draft-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.draft-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.draft-panel:not([hidden]) + .draft-placeholder { display: none; }

.panel.draft-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 260px;
  border-style: dashed;
  border-color: var(--border-strong);
  background: transparent;
  box-shadow: none;
  color: var(--subtle);
  font-size: 14px;
}

.draft-placeholder p { margin: 12px 0 0 0; max-width: 300px; }

.draft-placeholder-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.draft-placeholder-mark .ic { width: 20px; height: 20px; vertical-align: 0; }

/* ---- panels and forms ---- */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.panel > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  margin-top: 14px;
}

label:first-child { margin-top: 0; }
input[type=hidden] + label { margin-top: 0; }

.hint {
  font-size: 12.5px;
  color: var(--subtle);
  font-weight: 400;
  margin-left: 6px;
}

code {
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--hover);
}

input[type=text], input[type=password], input[type=email], textarea, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  background: var(--input-bg);
  color: var(--text);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus);
}

button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::placeholder { color: var(--subtle); opacity: 0.75; }

textarea { resize: vertical; min-height: 110px; }
textarea.small { min-height: 70px; }
textarea.output { min-height: 340px; font-size: 15px; line-height: 1.65; background: var(--panel-2); }
textarea.syllabus-draft { min-height: 560px; }
textarea[readonly] { background: var(--panel-2); color: var(--subtle); }
.workspace #body_text { min-height: 240px; }

.row { display: flex; gap: 14px 16px; flex-wrap: wrap; }
.row + .row { margin-top: 14px; }
.row > div { flex: 1; min-width: 200px; }

.actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: center;
}

button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
}

button.btn:hover { background: var(--hover); }

button.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 600;
}

button.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.btn:disabled { opacity: 0.5; cursor: not-allowed; }
button.btn.block { width: 100%; }
button.btn.danger { color: var(--error); border-color: var(--error-line); }
button.btn.danger:hover { background: var(--error-soft); }
button.btn .ic { width: 16px; height: 16px; vertical-align: 0; }

a.btn-link {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

a.btn-link:hover { background: var(--hover); }
a.btn-link.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
a.btn-link.primary:hover { background: var(--accent-hover); }

.status-line {
  font-size: 13px;
  color: var(--subtle);
}

.status-line.error { color: var(--error); }
.status-line.success { color: var(--success); }

/* In-progress messages ("Generating...") get a spinner so a long AI call visibly is still running. */
.status-line.working { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); }

.status-line.working::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .status-line.working::before { animation-duration: 2.4s; }
}

.flash {
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 14px;
  margin-bottom: 16px;
}

.flash.ok { background: var(--success-soft); border-color: transparent; color: var(--success); }
.flash.error { background: var(--error-soft); border-color: var(--error-line); color: var(--error); }
.flash.info { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.flash a { color: inherit; font-weight: 600; }
.error-text { color: var(--error); }

/* ---- AI provider picker and tabs ---- */

.provider-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--subtle);
}

.provider-btn, .category-tab {
  padding: 6px 13px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

.provider-btn:hover, .category-tab:hover { background: var(--hover); }

.provider-btn.active, .category-tab.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 600;
}

.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.category-tab { padding: 8px 16px; }
.category-panel { display: none; }
.category-panel.active { display: block; }

/* ---- grading output ---- */

/* Question match / grounding scores, shown as circular progress rings side by side. */
.match-scores {
  display: flex;
  margin: 4px 0 16px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.score-ring {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  --ring-color: var(--border-strong);
}

.score-ring + .score-ring { border-left: 1px solid var(--border); }
.score-ring.high { --ring-color: var(--score-high); }
.score-ring.mid { --ring-color: var(--score-mid); }
.score-ring.low { --ring-color: var(--score-low); }

/* Each ring blends two hues from the top of the ring to the bottom. These are deliberately not
   the app's teal: the scores should stand out from the rest of the page. The script points the
   arc at its gradient; the flat --ring-color is the fallback. */
.score-gradients { position: absolute; }
.grad-end.high { stop-color: var(--score-high); }
.grad-end.mid { stop-color: var(--score-mid); }
.grad-end.low { stop-color: var(--score-low); }
.grad-start.high { stop-color: #c084fc; }  /* violet into indigo */
.grad-start.mid { stop-color: #fde047; }   /* yellow into orange */
.grad-start.low { stop-color: #fda4af; }   /* rose into red */

.ring { position: relative; width: 76px; height: 76px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring-track { stroke: var(--hover); }

.ring-value {
  stroke: var(--ring-color);
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 0.7s ease;
}

.ring-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.ring-label { font-size: 13px; color: var(--subtle); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .ring-value { transition: none; }
}

.inline-comment {
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--accent-soft);
  font-size: 13.5px;
}

.inline-comment .excerpt {
  font-style: italic;
  color: var(--subtle);
  margin-bottom: 3px;
}

.file-upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

/* ---- settings ---- */

.settings-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.key-status {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--hover);
  white-space: nowrap;
}

.key-status.set { background: var(--success-soft); color: var(--success); }
.key-status.unset { background: var(--hover); color: var(--subtle); }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 14px;
}

.check-row input { accent-color: var(--accent); }

/* ---- book search ---- */

.book-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.book-cover {
  width: 84px;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.book-info { flex: 1; min-width: 0; }

.book-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.book-title .key-status { margin-left: 8px; font-family: var(--font-body); font-weight: 400; }

.book-meta {
  font-size: 13px;
  color: var(--subtle);
  margin-bottom: 2px;
}

.book-card .hint { margin-left: 0; }

/* ---- tables (PDU results, users) ---- */

.pdu-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.pdu-table th, .pdu-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.pdu-table th, .data-table th {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pdu-table a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.pdu-table a:hover { text-decoration: underline; }
.pdu-hours { white-space: nowrap; font-weight: 600; }
.pdu-notes { font-size: 13.5px; }
.pdu-disclaimer { display: block; margin-left: 0; }

.data-table th, .data-table td {
  text-align: left;
  vertical-align: middle;
  padding: 9px 10px 9px 0;
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td, .pdu-table tr:last-child td { border-bottom: 0; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-row form { margin: 0; }
.data-table button.btn { padding: 7px 12px; font-size: 13px; }

.role-pill {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--hover);
  color: var(--subtle);
}

.role-pill.admin { background: var(--accent-soft); color: var(--accent-ink); }
.role-pill.lead { background: var(--success-soft); color: var(--success); }

/* ---- sign-in pages ---- */

.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 72px 16px 40px 16px;
}

.auth-brand { justify-content: center; font-size: 24px; margin-bottom: 22px; }
.auth-card { padding: 28px; }
.auth-sub { display: block; margin: 0 0 18px 0; }
.auth-note { display: block; margin: 10px 0 0 0; }
.auth-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.auth-switch { text-align: center; font-size: 13px; color: var(--subtle); }

.auth-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 8px 0;
  font-size: 12px;
  color: var(--subtle);
}

.auth-sep::before, .auth-sep::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

.gbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.gbtn:hover { background: var(--hover); }
.gbtn.off { opacity: 0.5; pointer-events: none; }

input.otp-input {
  font-size: 26px;
  letter-spacing: 8px;
  text-align: center;
  font-family: Consolas, monospace;
}

.otp-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.otp-foot form { margin: 0; }

/* ---- Programming Feedback ---- */

.pf-drop {
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-2);
}

.pf-file-list { list-style: none; margin: 8px 0 0 0; padding: 0; font-size: 13px; color: var(--subtle); }
.pf-file-list li { padding: 2px 0; }
.pf-summary { margin: 0 0 4px 0; font-size: 14.5px; }
.pf-files-reviewed { display: block; margin: 0 0 4px 0; }
.pf-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px 0; }
.pf-filters .category-tab { padding: 4px 11px; font-size: 12px; }
.pf-none { margin: 4px 0 0 0; color: var(--success); font-size: 14px; }

.pf-issue {
  border: 1px solid var(--border);
  border-left: 4px solid var(--sev-color, var(--border-strong));
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--panel);
}

.pf-issue-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-issue-head .hint { margin-left: 0; }
.pf-loc { font-size: 12px; }
.pf-issue-title { font-weight: 600; margin-top: 6px; font-size: 14px; }
.pf-issue-text { margin: 4px 0 0 0; font-size: 13.5px; }
.pf-fix { margin-top: 8px; }
.pf-fix-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--subtle); }

.pf-fix pre {
  margin: 4px 0 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pf-strengths { margin: 0; padding-left: 20px; font-size: 14px; }

.sev-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--sev-color, var(--subtle));
}

.sev-bug, .sev-error { --sev-color: #dc2626; }
.sev-security { --sev-color: #9333ea; }
.sev-performance { --sev-color: #ea580c; }
.sev-warning { --sev-color: #ca8a04; }
.sev-style { --sev-color: #2563eb; }

/* ---- AI Voiceover ---- */

textarea.vo-script { min-height: 260px; font-size: 15px; line-height: 1.65; }
.vo-audio { width: 100%; margin-top: 4px; }
.vo-recorder { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vo-consent { align-items: flex-start; margin-top: 16px; line-height: 1.45; }
.vo-consent input { margin-top: 3px; }

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--error);
}

button.btn.recording { border-color: var(--error); color: var(--error); }
button.btn.recording .rec-dot { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

.vo-takes { list-style: none; margin: 10px 0 0 0; padding: 0; }

.vo-takes li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--subtle);
  margin-bottom: 8px;
}

.vo-takes audio { height: 34px; flex: 1; min-width: 180px; }
.provider-status { display: flex; gap: 8px; flex-wrap: wrap; }
.check-row input[type=radio] { accent-color: var(--accent); }
.check-row + .check-row { margin-top: 6px; }

/* ---- small screens: the sidebar becomes a slide-in menu under a top bar ---- */

@media (max-width: 860px) {
  .topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 10px 16px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border);
  }

  .topbar .brand { margin: 0; padding: 0; font-size: 18px; }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.35); }
  .content { padding: 20px 16px 40px 16px; }
  .panel { padding: 16px; }
  .data-table, .pdu-table { display: block; overflow-x: auto; }
}
