:root {
  --bg: #030712;
  --panel: rgba(15, 23, 42, 0.85);
  --border: rgba(56, 189, 248, 0.2);
  --cyan: #22d3ee;
  --cyan-dim: #0891b2;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  color-scheme: dark;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 211, 238, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(99, 102, 241, 0.08), transparent);
}

.app {
  height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.brand { display: flex; align-items: center; gap: 1rem; }
.brand-icon { font-size: 2rem; color: var(--cyan); filter: drop-shadow(0 0 12px var(--cyan)); }
.brand h1 { font-size: 1.5rem; letter-spacing: 0.2em; font-weight: 700; }
.brand p { color: var(--muted); font-size: 0.85rem; }

.live-badge {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid var(--border);
}
.live-badge.listening { background: rgba(52, 211, 153, 0.2); color: var(--green); border-color: var(--green); }
.live-badge.thinking { background: rgba(251, 191, 36, 0.2); color: var(--amber); border-color: var(--amber); }
.live-badge.speaking { background: rgba(34, 211, 238, 0.2); color: var(--cyan); border-color: var(--cyan); }
.live-badge.completed { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.live-badge.enrollment { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }

.grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px 1fr 380px;
  gap: 1.25rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
  backdrop-filter: blur(16px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel h2 {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.controls { overflow-y: auto; }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field span { font-size: 0.8rem; color: var(--muted); }
.field input,
.field select,
.field textarea {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}
.field select option,
.field input option {
  background: #0f172a;
  color: var(--text);
}
.field textarea,
.field input[type="text"],
.field input[type="number"],
.field input[type="url"] {
  background-image: none;
  padding-right: 1rem;
  appearance: auto;
  -webkit-appearance: auto;
}
.field textarea { resize: vertical; min-height: 3.5rem; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-field input { width: auto; }

.section-fold {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
}
.section-fold summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  user-select: none;
}
.section-fold[open] summary { margin-bottom: 0.5rem; }

.mic-test-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 1rem;
}
.mic-test-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.mic-test-btns { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
.mic-test-btns .btn { flex: 1; margin: 0; }

.level-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.level-bar #levelFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 0.3s;
}

.test-audio { width: 100%; margin-top: 8px; display: none; }

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  width: 100%;
}
.btn-small:hover { color: var(--cyan); border-color: var(--cyan); }

.btn-verify {
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
  border: 1px solid var(--green);
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.5rem;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-start { background: linear-gradient(135deg, #06b6d4, #0891b2); color: #fff; box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35); }
.btn-stop { background: rgba(248, 113, 113, 0.2); color: var(--red); border: 1px solid var(--red); }
.btn-next { background: rgba(99, 102, 241, 0.25); color: #c7d2fe; border: 1px solid rgba(99, 102, 241, 0.5); }
.btn-report { background: rgba(34, 211, 238, 0.12); color: var(--cyan); border: 1px solid var(--cyan-dim); }
.btn-save { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border); }

.btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.btn-group .btn { margin: 0; }

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.info-card {
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.info-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; }
.info-value { font-size: 0.9rem; color: var(--cyan); }
.info-value.small { font-size: 0.8rem; color: var(--text); word-break: break-word; }
.face-capture-card { gap: 0.45rem; }
.face-capture-thumb {
  width: 100%;
  max-width: 140px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.4; }
.field-required .req { color: var(--red); font-style: normal; }
.duration-row { display: flex; gap: 0.5rem; align-items: center; }
.duration-row select { flex: 1; }
.duration-custom {
  width: 5rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.65rem;
  color: var(--text);
  font-family: inherit;
}
.teams-hint { margin-bottom: 0.75rem; }

.auto-listen {
  font-size: 0.75rem;
  color: var(--cyan);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: rgba(34, 211, 238, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.voice-accent {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.1);
}

.center {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 1rem;
}

.hero-top {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
}

.timer-row {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: stretch;
}

.btn-stop-interview {
  flex: 0 0 auto;
  align-self: center;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-stop-interview:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.28);
  border-color: var(--red);
}
.btn-stop-interview:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-stop-interview[hidden] {
  display: none;
}

.timer-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
}
.timer-chip.urgent {
  border-color: var(--amber);
  background: rgba(251, 191, 36, 0.12);
}
.timer-chip.ok {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}
.timer-chip.ok .timer-val { color: var(--cyan); }
.timer-chip.warning {
  border-color: var(--amber);
  background: rgba(251, 191, 36, 0.18);
  animation: timer-pulse 1.2s ease-in-out infinite;
}
.timer-chip.warning .timer-val { color: var(--amber); }
.timer-chip.critical {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.2);
  animation: timer-pulse 0.7s ease-in-out infinite;
}
.timer-chip.critical .timer-val { color: #fca5a5; }
.timer-chip.ended {
  border-color: #818cf8;
  background: rgba(129, 140, 248, 0.15);
}
.timer-chip.ended .timer-val { color: #a5b4fc; }
@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}
.timer-chip.extended {
  border-color: var(--cyan);
}
.timer-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.timer-val {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
}
.timer-chip.urgent .timer-val { color: var(--amber); }

.wave-stage {
  position: relative;
  flex: 1;
  min-height: 200px;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, rgba(34, 211, 238, 0.1), transparent 70%),
              rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.wave-stage.thinking-active {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 36px rgba(251, 191, 36, 0.22) inset;
}

@keyframes thinking-pulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50%       { opacity: 0.6; transform: translateX(-50%) scale(1.04); }
}

.wave-stage.thinking-active .wave-sub {
  color: var(--amber);
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.7);
  animation: thinking-pulse 1.4s ease-in-out infinite;
  white-space: nowrap;
}

#waveCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-shadow: 0 0 40px rgba(34, 211, 238, 0.8);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  z-index: 2;
}
.wave-label.status-listening { color: var(--green); text-shadow: 0 0 40px rgba(52, 211, 153, 0.7); }
.wave-label.status-thinking { color: var(--amber); text-shadow: 0 0 40px rgba(251, 191, 36, 0.7); }
.wave-label.status-speaking { color: var(--cyan); text-shadow: 0 0 40px rgba(34, 211, 238, 0.8); }
.wave-label.status-idle { color: var(--text); }
.wave-label.status-enrollment { color: #c4b5fd; }

.wave-sub {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: clamp(0.85rem, 2vw, 1rem);
  pointer-events: none;
  text-align: center;
  z-index: 2;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-caption {
  flex-shrink: 0;
  min-height: 2.5rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  font-size: 0.92rem;
  line-height: 1.4;
}
.live-caption.visible {
  opacity: 1;
  transform: translateY(0);
}
.live-caption.dora { border-left: 3px solid var(--cyan); }
.live-caption.candidate { border-left: 3px solid var(--green); }
.live-caption-role {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.5rem;
}

.live-hearing {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  opacity: 0.45;
  transition: opacity 0.2s, border-color 0.2s;
}
.live-hearing.active {
  opacity: 1;
  border-color: rgba(52, 211, 153, 0.55);
}
.live-hearing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.live-hearing-title { color: var(--green); font-weight: 600; }
.live-hearing-state { font-weight: 500; }
.live-hearing-state.speaking { color: var(--green); }
.live-hearing-state.waiting { color: var(--muted); }
.live-hearing-state.processing { color: var(--amber, #fbbf24); }
.live-mic-bar {
  height: 6px;
  background: rgba(0,0,0,0.35);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.live-mic-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34d399, #10b981);
  border-radius: 999px;
  transition: width 0.12s linear;
}
.live-partial-text {
  min-height: 2.2rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #e2e8f0;
  font-family: "Outfit", system-ui, sans-serif;
}
.live-partial-text.typing::after {
  content: "▌";
  animation: blink 0.9s step-end infinite;
  color: var(--green);
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }
.live-partial-placeholder { color: var(--muted); font-style: italic; }

.scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  flex-shrink: 0;
}

.score {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 0.5rem;
  text-align: center;
}
.score-val { display: block; font-size: 1.75rem; font-weight: 700; color: var(--cyan); }
.score-name { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; }

.transcript-panel { min-height: 0; }
.transcript {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.msg {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.msg.dora {
  background: rgba(34, 211, 238, 0.1);
  border-left: 3px solid var(--cyan);
}
.msg.candidate {
  background: rgba(52, 211, 153, 0.08);
  border-left: 3px solid var(--green);
}
.msg b { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 0.35rem; text-transform: uppercase; }

.log-fold summary {
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 0.35rem;
}
.logs {
  max-height: 280px;
  min-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  flex-shrink: 0;
  scroll-behavior: smooth;
}
.logs div { padding: 0.2rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }

.logs div { padding: 0.2rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0 0.35rem;
}
.mode-btn {
  padding: 0.55rem 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.mode-btn.active {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.12);
}
.pace-toggle .pace-btn.active[data-fast="1"] {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
}
.pace-toggle { margin-top: 0.35rem; }
.mode-btn:disabled { opacity: 0.45; cursor: not-allowed; }
#interviewModeHint { margin-bottom: 0.65rem; }

.remote-server-box { margin: 0.75rem 0 1rem; }
.remote-status {
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  margin-bottom: 0.65rem;
  color: var(--muted);
}
.remote-status.live { color: var(--green); border-color: rgba(52, 211, 153, 0.35); }
.remote-url {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font-size: 0.78rem;
  margin-bottom: 0.65rem;
}
.hint-local { margin-top: 0.5rem; font-size: 0.78rem; color: var(--muted); }

@media (max-width: 1100px) {
  html, body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .grid { grid-template-columns: 1fr; }
  .scores { grid-template-columns: repeat(2, 1fr); }
  .wave-stage { min-height: 220px; }
}

/* Scrollable utility (accounts page, etc.) */
html:has(body.page-scroll),
body.page-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  height: auto;
  min-height: 100vh;
}

/* Custom scrollbars — visible on dark UI */
.panel-scroll,
.controls,
.transcript,
.logs,
.accounts-table-wrap,
.page-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.45) rgba(0, 0, 0, 0.25);
}

.panel-scroll::-webkit-scrollbar,
.controls::-webkit-scrollbar,
.transcript::-webkit-scrollbar,
.logs::-webkit-scrollbar,
.accounts-table-wrap::-webkit-scrollbar,
.page-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.panel-scroll::-webkit-scrollbar-thumb,
.controls::-webkit-scrollbar-thumb,
.transcript::-webkit-scrollbar-thumb,
.logs::-webkit-scrollbar-thumb,
.accounts-table-wrap::-webkit-scrollbar-thumb,
.page-scroll::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.35);
  border-radius: 8px;
}

.panel-scroll::-webkit-scrollbar-track,
.controls::-webkit-scrollbar-track,
.transcript::-webkit-scrollbar-track,
.logs::-webkit-scrollbar-track,
.accounts-table-wrap::-webkit-scrollbar-track,
.page-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.controls {
  scrollbar-gutter: stable;
}

/* Candidate accounts admin */
.page-accounts .accounts-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  min-height: 100vh;
}

.page-accounts .accounts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  max-width: 520px;
}

.page-accounts .card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  min-width: 0;
}

.page-accounts .card h2 {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-accounts .link-box {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.75rem;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  word-break: break-all;
  margin: 0.75rem 0;
  max-height: 6rem;
  overflow-y: auto;
}

.page-accounts .nav {
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.page-accounts .nav a {
  color: var(--cyan);
  text-decoration: none;
  margin-right: 1rem;
}

.page-accounts .accounts-table-wrap {
  overflow: auto;
  max-height: min(420px, 50vh);
  margin-top: 0.25rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.page-accounts .accounts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 860px;
}

.page-accounts .accounts-table th,
.page-accounts .accounts-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.page-accounts .accounts-table .th-actions {
  width: 14rem;
  min-width: 14rem;
}

.page-accounts .skills-preview {
  max-width: 220px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  word-break: break-word;
}

.page-accounts .actions-cell {
  min-width: 14rem;
  white-space: nowrap;
}

.page-accounts .actions-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-start;
}

.page-accounts .btn-inline {
  width: auto !important;
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.page-accounts .btn-danger-inline:hover {
  color: var(--red);
  border-color: var(--red);
}

.page-accounts .btn-dl-report:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.page-accounts .btn-dl-audio:hover {
  color: var(--green, #4ade80);
  border-color: var(--green, #4ade80);
}

.page-accounts #editCard {
  margin-top: 1.25rem;
}

.page-accounts #editCard[hidden] {
  display: none !important;
}

.page-accounts .edit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.page-accounts .edit-head span {
  color: var(--cyan);
  font-weight: 600;
  word-break: break-all;
}

.btn-inline {
  width: auto;
}

.page-accounts .questions-panel {
  margin: 0.25rem 0 1rem;
  padding: 0.75rem 0.85rem 0.25rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.06);
}

.page-accounts .questions-panel summary {
  cursor: pointer;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.page-accounts .questions-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
}

.page-accounts .questions-lock-hint {
  margin: -0.25rem 0 0.75rem;
  color: var(--amber);
  font-size: 0.8rem;
}

.page-accounts .readonly-field {
  opacity: 0.85;
  border-color: rgba(148, 163, 184, 0.35);
}

.page-accounts .btn-regen:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.btn-busy {
  opacity: 0.75;
  cursor: wait;
}

.btn-success-inline {
  color: var(--green) !important;
  border-color: var(--green) !important;
}

.btn-danger-inline {
  color: var(--red) !important;
  border-color: var(--red) !important;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  margin-top: 0.75rem;
}

.dashboard-table th,
.dashboard-table td {
  font-size: 0.82rem;
  white-space: nowrap;
}

.dashboard-table .th-actions {
  min-width: 18rem;
  width: 18rem;
}

.dashboard-table .actions-cell {
  min-width: 18rem;
}

.dashboard-table td:first-child {
  white-space: normal;
  min-width: 6rem;
}
