:root {
  --bg: #0f1419;
  --card: #1a2332;
  --border: #2d3a4f;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --primary: #3b82f6;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
}
header h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
header p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: stretch;
}

.card-setup {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  overflow: visible;
}
.card.wide { grid-column: 1 / -1; }
.card h2 { margin: 0 0 1rem; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

label { display: block; margin: 0.75rem 0 0.25rem; font-size: 0.85rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0d1117;
  color: var(--text);
  font-size: 0.95rem;
}

/* API key alanları — type=password yerine maskeleme (Chrome şifre kaydı tetiklenmesin) */
input.input-secret {
  -webkit-text-security: disc;
  text-security: disc;
  font-family: monospace;
}
textarea { resize: vertical; font-family: inherit; }

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.row { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.75rem; flex-wrap: wrap; }
.row input { flex: 1; min-width: 200px; }

.url-input {
  display: flex;
  align-items: stretch;
  margin-top: 0.25rem;
}
.url-prefix {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  background: #0a0f16;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}
.url-input input {
  flex: 1;
  min-width: 120px;
  border-radius: 0 6px 6px 0;
}

button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.primary { background: var(--primary); color: white; }
button.success { background: var(--success); color: #052e16; margin-top: 1rem; width: 100%; }
button.secondary { background: #374151; color: white; margin-top: 0.75rem; }

.info-panel {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #0d1117;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.assistant-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 0.85rem;
  padding: 0.7rem 0.75rem;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 12rem;
}
.assistant-info-head {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.info-grid {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.35rem 0.65rem;
  margin: 0;
  font-size: 0.8rem;
}
.info-grid dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}
.info-grid dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}
.info-grid dd.is-empty {
  color: #4b5563;
  font-style: italic;
}
.info-grid dd.is-ok { color: #86efac; }
.info-grid dd.is-warn { color: #fcd34d; }
.info-mcp-list {
  margin: 0.5rem 0 0;
  padding: 0.35rem 0 0 1rem;
  font-size: 0.74rem;
  color: var(--muted);
  flex: 1;
  min-height: 3rem;
  max-height: none;
  overflow-y: auto;
}
.info-mcp-list:empty { display: none; }
.info-status {
  margin: 0.5rem 0 0;
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--muted);
}
.info-status.is-loading { color: #93c5fd; }
.info-status.is-ok { color: #86efac; }
.info-status.is-warn { color: #fcd34d; }
.info-status.is-error { color: #fca5a5; }
.assistant-info.is-loading .info-grid dd:not(.is-ok) {
  color: #4b5563;
}

.llm-dynamic-panel {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.llm-dynamic-panel input[type="number"] { max-width: 6rem; }
.llm-gen-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.llm-gen-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.llm-gen-field select,
.llm-gen-field input { min-width: 8rem; }
.llm-gen-field-narrow input { max-width: 5rem; }
.voice-dynamic-questions { margin-top: 0.75rem; }
.qa-gen-preview li,
.qa-custom-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}
.qa-gen-preview .q-gen-check,
.qa-custom-list .q-qa-remove {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.qa-list-toolbar {
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}
.qa-list-head {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.qa-custom-list .in-qa-tag {
  color: #86efac;
  font-style: normal;
  font-size: 0.72rem;
}
.llm-q-preview {
  margin: 0.5rem 0 0;
  padding: 0.35rem 0 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  max-height: 10rem;
  overflow-y: auto;
}
.llm-q-preview:empty { display: none; }
.llm-q-preview li { margin-bottom: 0.25rem; }
.llm-q-preview .crit-tag { color: #fcd34d; font-style: normal; }
.hidden { display: none; }

.progress-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}
.progress-header .eta { color: var(--muted); font-size: 0.85rem; }
.progress-track {
  height: 10px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.progress-meta .phase {
  color: var(--warning);
  font-style: italic;
}

.terminal {
  background: #0a0e14;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  min-height: 160px;
  max-height: 320px;
  overflow-y: auto;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-log-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.terminal-log-toggle input {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.score-banner {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.score-banner.pass { background: #14532d; color: #bbf7d0; }
.score-banner.fail { background: #7f1d1d; color: #fecaca; }
.score-banner-breakdown {
  font-size: 0.92em;
  opacity: 0.92;
  font-weight: 400;
}
.score-banner-breakdown strong {
  font-weight: 700;
}

.subsection-title {
  margin: 1.25rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
}

.guest-profile { margin-bottom: 0.5rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 1rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
  text-align: left;
}
th { background: #0d1117; color: var(--muted); }
tr.pass td:nth-child(3) { color: var(--success); }
tr.fail td:nth-child(3) { color: var(--danger); }
tr.partial td:nth-child(3) { color: var(--warning); }
tr.error td:nth-child(3) { color: var(--danger); }

.mcp-preview-wrap {
  margin-bottom: 0.75rem;
}
.mcp-preview {
  background: #0a0e14;
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  padding: 0.5rem 0.75rem 0.65rem;
  font-size: 0.8rem;
  max-height: 160px;
  overflow-y: auto;
  color: var(--muted);
}
.mcp-preview-wrap .abbr-legend {
  margin: 0;
  padding: 0.45rem 0.75rem;
  background: #0a0e14;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.45;
}
.abbr-legend {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}
.abbr-legend-compact {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
}
.abbr-legend .info-tip {
  width: 1rem;
  height: 1rem;
  font-size: 0.62rem;
  margin-left: 0.15rem;
}
.mcp-preview .tool-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1.1fr) auto minmax(8.5rem, auto) minmax(6rem, 1fr);
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid #1e293b;
  align-items: center;
}
.mcp-preview .tool-row-head {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom: 1px solid #334155;
  padding-bottom: 0.35rem;
  margin-bottom: 0.15rem;
}
.mcp-preview .tool-row:last-child { border-bottom: none; }
.mcp-preview .tool-name { color: var(--text); font-family: "Cascadia Code", Consolas, monospace; font-size: 0.75rem; }
.mcp-preview .tool-desc {
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tool-src {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
}
.tool-src.internal { background: #1e3a5f; color: #93c5fd; }
.tool-src.external { background: #3b2f1e; color: #fcd34d; }
.tool-kind {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.25rem;
  vertical-align: middle;
}
.tool-kind.data { background: #1a3d2e; color: #6ee7b7; }
.tool-kind.action { background: #3d1a2e; color: #f9a8d4; }
.tool-size-excluded { color: var(--muted); font-size: 0.72rem; white-space: nowrap; }
.analysis-domain { margin: 0 0 0.75rem; }
.mcp-preview .tool-size { font-size: 0.72rem; color: var(--warning); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mcp-preview .stat-bt {
  display: inline-block;
  margin-left: 0.2rem;
  padding: 0 0.25rem;
  border-radius: 3px;
  background: #1e3a5f;
  color: #93c5fd;
  font-size: 0.62rem;
  font-weight: 700;
  vertical-align: middle;
}

.analysis-panel {
  background: #0a0e14;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
}
.analysis-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.analysis-summary div {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
}
.analysis-panel h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mcp-table tr.good td:nth-child(2) { color: var(--success); }
.mcp-table tr.warn td:nth-child(2) { color: var(--warning); }
.mcp-table tr.bad td:nth-child(2) { color: var(--danger); }
.mcp-table ul { margin: 0; padding-left: 1rem; }
.mcp-table .issue { color: var(--warning); }
.analysis-panel .tip { color: var(--muted); margin: 0.25rem 0; font-size: 0.8rem; }

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.3rem;
  border-radius: 50%;
  background: #374151;
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  vertical-align: middle;
  border: none;
  padding: 0;
}
.info-tip .info-popover {
  display: none;
  position: absolute;
  z-index: 200;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 6px);
  width: max-content;
  max-width: 360px;
  padding: 0.65rem 0.8rem;
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.info-tip:hover .info-popover,
.info-tip:focus .info-popover,
.info-tip:focus-within .info-popover {
  display: block;
}
.analysis-summary .card-title {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-bottom: 0.35rem;
}

.results-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0a0e14;
}
.results-wrap table {
  margin-top: 0;
  width: max-content;
  min-width: 100%;
}
.results-wrap th.col-response,
.results-wrap td.col-response {
  min-width: 480px;
  max-width: 720px;
  white-space: pre-wrap;
  word-break: break-word;
  vertical-align: top;
  font-size: 0.78rem;
  line-height: 1.35;
}
.results-wrap th.col-reason,
.results-wrap td.col-reason {
  min-width: 320px;
  max-width: 560px;
  white-space: pre-wrap;
  word-break: break-word;
  vertical-align: top;
  font-size: 0.78rem;
  line-height: 1.35;
}
.results-wrap td.col-id { white-space: nowrap; }
.results-wrap td.col-verdict { white-space: nowrap; }
.results-wrap td.col-actions {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.btn-exclude-result {
  border: 1px solid #7f1d1d;
  background: #450a0a;
  color: #fecaca;
  border-radius: 4px;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
}
.fix-suggestions {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border);
}
.fix-tip {
  font-size: 0.75rem;
  color: #93c5fd;
  margin-top: 0.35rem;
  line-height: 1.35;
}
.fix-tip ul {
  margin: 0.25rem 0 0 1rem;
  padding: 0;
}

.token-panel {
  background: #0d1520;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}
.token-panel h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: var(--text);
}
.token-panel .token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.token-panel .token-stat strong {
  color: var(--primary);
}
.token-panel ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.token-panel .token-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
}
.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
}
.config-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.config-table th,
.config-table td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #1e293b;
  vertical-align: top;
}
.config-table th {
  color: var(--muted);
  font-weight: 600;
  width: 42%;
}
.config-table td {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-word;
}

.qsel-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0a0f16;
}
.qsel-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.qsel-row-label {
  flex: 0 0 3.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.qsel-segment {
  display: inline-flex;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #0d1117;
}
.qsel-mode-btn {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.qsel-mode-btn:last-child {
  border-right: none;
}
.qsel-mode-btn:hover:not(.active) {
  background: #1a2332;
  color: var(--text);
}
.qsel-mode-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.qsel-presets {
  display: flex;
  flex: 1;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}
.qsel-agent-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}
.qsel-agent-hint {
  flex: 1 1 100%;
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}
.kit-row {
  align-items: stretch;
}
.kit-segment {
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  height: auto;
  overflow: visible;
}
.kit-segment .kit-tab-btn {
  flex: 1 1 auto;
  min-width: 4.5rem;
}
.kit-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.llm-kit-toggle {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.82rem;
}
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 8.5rem;
  overflow-y: auto;
  padding: 0.35rem 0 0.65rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.category-chip {
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0d1117;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.category-chip:hover {
  border-color: var(--primary);
  color: var(--text);
}
.category-chip.is-selected {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  font-weight: 600;
}
.category-chip.is-partial {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}
.category-chip .chip-count {
  opacity: 0.75;
  font-weight: 400;
  margin-left: 0.2rem;
}
.kit-tab-btn .chip-count {
  font-size: 0.68rem;
  opacity: 0.85;
  font-weight: 400;
}
.agent-type-badge {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.agent-type-badge.in-stay {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
}
.chip-btn {
  padding: 0.32rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0d1117;
  color: var(--text);
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.chip-preset:hover {
  border-color: var(--primary);
  background: #141c28;
}
.chip-preset.active {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}
.chip-preset.chip-warn {
  border-color: #7f1d1d55;
  color: #fca5a5;
}
.chip-preset.chip-warn:hover {
  border-color: #ef4444;
  background: #2a1515;
}
.chip-preset.chip-warn.active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}
.chip-clear {
  flex-shrink: 0;
  margin-left: auto;
  border-style: dashed;
  color: var(--muted);
  font-size: 0.74rem;
}
.chip-clear:hover {
  border-color: var(--muted);
  color: var(--text);
  background: #141820;
}
.qsel-row.hidden { display: none; }
.category-picker {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0d1117;
  margin-top: 0.35rem;
}
.category-picker.hidden { display: none; }
.category-picker-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.category-picker-head input[type="search"] {
  flex: 1;
  min-width: 140px;
  margin: 0;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.inline-check input { width: auto; margin: 0; }
.category-groups {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.35rem 0.5rem 0.5rem;
}
.cat-group-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0.5rem 0 0.25rem;
  padding: 0 0.25rem;
}
.cat-block {
  border-radius: 6px;
  margin-bottom: 0.15rem;
}
.cat-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.cat-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  padding: 0.3rem 0.35rem;
  margin: 0;
  font-size: 0.85rem;
  cursor: pointer;
}
.cat-label input { width: auto; margin: 0; flex-shrink: 0; }
.cat-name { font-weight: 600; }
.cat-badge {
  font-size: 0.72rem;
  color: var(--muted);
  background: #1a2332;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.cat-badge.crit { color: #fca5a5; }
.cat-expand {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}
.cat-questions {
  margin: 0 0 0.35rem 1.6rem;
  border-left: 2px solid var(--border);
  padding-left: 0.5rem;
}
.q-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.35rem 0.5rem;
  align-items: start;
  padding: 0.25rem 0.2rem;
  font-size: 0.78rem;
  cursor: pointer;
  margin: 0;
}
.q-row input { width: auto; margin: 0.15rem 0 0; }
.q-id {
  font-family: Consolas, monospace;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.q-text { color: var(--text); line-height: 1.35; }
.q-tag {
  font-size: 0.68rem;
  color: var(--warning);
  white-space: nowrap;
}
.selection-summary {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
}
.col-metrics {
  min-width: 140px;
  max-width: 200px;
  font-size: 0.72rem;
  vertical-align: top;
}
.metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 0.15rem;
}
.metric-chips.warn { margin-top: 0.15rem; }
.metric-chip {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #1e293b;
  color: var(--muted);
  white-space: nowrap;
}
.metric-chip.ok { color: #86efac; }
.metric-chip.mid { color: #fcd34d; background: #3b2f1a; }
.metric-chip.bad { color: #fca5a5; background: #3b1c1c; }
.advanced-range.hidden { display: none; }

.judge-llm-panel.hidden { display: none; }
.judge-key-hint code {
  font-size: 0.75rem;
  color: #93c5fd;
}

.scoring-hint-wrap {
  margin: 0.5rem 0 0.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0a0f16;
}
.scoring-hint {
  line-height: 1.45;
  margin: 0 0 0.45rem;
}
.scoring-hint strong { color: var(--text); font-weight: 600; }
.metrics-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  background: #111a28;
  color: #93c5fd;
  font-size: 0.76rem;
  cursor: pointer;
}
.metrics-link-btn:hover {
  border-color: var(--primary);
  background: #152238;
  color: #bfdbfe;
}

.modal-panel-wide {
  width: min(640px, 96vw);
}
.metrics-modal-intro,
.metrics-modal-thresholds {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.metrics-modal-thresholds {
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: #0d1117;
  border: 1px solid var(--border);
}
.metrics-modal-group {
  margin: 1rem 0 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}
.metrics-table th,
.metrics-table td {
  text-align: left;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid #1e293b;
  vertical-align: top;
}
.metrics-table th {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}
.metrics-table-name { font-weight: 600; white-space: nowrap; }
.metrics-table-desc { color: var(--muted); font-size: 0.74rem; }
.metrics-table-num {
  font-family: Consolas, monospace;
  color: #93c5fd;
  white-space: nowrap;
}
.metrics-table-pct {
  font-family: Consolas, monospace;
  color: var(--success);
  white-space: nowrap;
  min-width: 4.5rem;
  position: relative;
}
.metrics-bar {
  display: inline-block;
  height: 3px;
  max-width: 48px;
  margin-right: 0.35rem;
  background: var(--primary);
  border-radius: 2px;
  vertical-align: middle;
  opacity: 0.7;
}

.metrics-tier-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin: 0.75rem 0 1rem;
  font-size: 0.74rem;
}

.metrics-tier-legend-hint {
  color: var(--muted);
  flex: 1 1 12rem;
}

.weight-tier-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.weight-tier-badge.tier-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.weight-tier-badge.tier-core {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.weight-tier-badge.tier-support {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.metrics-table-expanded .metrics-table-desc {
  margin-top: 0.2rem;
  font-size: 0.72rem;
}

.metrics-table-tier {
  white-space: nowrap;
  vertical-align: top;
}

.metrics-table-subrules {
  font-size: 0.72rem;
  color: var(--muted);
  vertical-align: top;
  min-width: 10rem;
}

.metric-subrules {
  margin: 0;
  padding-left: 1rem;
  list-style: disc;
}

.metric-subrules li {
  margin: 0.15rem 0;
}

.subrule-pct {
  display: inline-block;
  min-width: 2rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.68rem;
}

.breakdown-sublist {
  margin: 0.2rem 0 0.35rem 1rem;
  padding: 0;
  list-style: circle;
  font-size: 0.85em;
  color: var(--muted);
}

.breakdown-sub-delta {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9em;
}

.judge-key-env.judge-key-missing {
  color: #fca5a5;
}

h3 .info-tip,
h4 .info-tip,
label .info-tip,
button .info-tip {
  font-size: 0.85em;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.metrics-modal-note {
  margin-bottom: 0.75rem;
}

.run-id-label {
  font-size: 0.8rem;
  color: var(--muted);
  cursor: help;
  max-width: 200px;
  line-height: 1.35;
}

/* ——— Studio nav ——— */
.studio-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.nav-link {
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}
.nav-link:hover { color: var(--text); border-color: var(--primary); }
.nav-link.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: #93c5fd;
}

/* ——— Voice QA ——— */
.voice-grid { align-items: start; }
.voice-subhead {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.voice-call-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}
.voice-call-list li { margin: 0.25rem 0; }
.voice-call-pick {
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0d1117;
  color: var(--text);
  cursor: pointer;
  font-size: 0.82rem;
}
.voice-call-pick:hover { border-color: var(--primary); }
.voice-options { flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0; }
.voice-meta.empty-state,
.voice-transcript.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
}
.voice-transcript {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.voice-turn {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: #0d1117;
  border: 1px solid var(--border);
}
.voice-turn-assistant { border-left: 3px solid var(--primary); }
.voice-turn-user { border-left: 3px solid var(--success); }
.voice-role {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.voice-content { font-size: 0.9rem; white-space: pre-wrap; }
.voice-audio-wrap { margin-top: 1rem; }
.voice-audio-wrap audio { width: 100%; margin-top: 0.25rem; }
.voice-eval-result { margin-top: 1rem; }
.voice-structured-scores {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.voice-structured-scores.empty-state {
  color: var(--muted);
  font-size: 0.88rem;
}
.voice-structured-scores h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}
.voice-structured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem;
}
.voice-structured-item {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0d1117;
  font-size: 0.82rem;
}
.voice-structured-item .label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}
.voice-structured-item .value-bool-true { color: #86efac; font-weight: 600; }
.voice-structured-item .value-bool-false { color: #fca5a5; font-weight: 600; }
.voice-structured-item .value-num-ok { color: #86efac; font-weight: 600; }
.voice-structured-item .value-num-mid { color: #fcd34d; font-weight: 600; }
.voice-structured-item .value-num-bad { color: #fca5a5; font-weight: 600; }
.voice-structured-summary {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d1117;
  font-size: 0.88rem;
  white-space: pre-wrap;
}
.voice-verdict.pass { border-color: var(--success); color: #86efac; }
.voice-verdict.partial { border-color: var(--warning); color: #fcd34d; }
.voice-verdict.fail { border-color: var(--danger); color: #fca5a5; }
.voice-findings { width: 100%; margin-top: 0.75rem; font-size: 0.82rem; }
.voice-findings .sev-critical td:nth-child(2) { color: var(--danger); }
.voice-findings .sev-warning td:nth-child(2) { color: var(--warning); }
.lmstudio-tabs { margin-top: 1rem; }
.lmstudio-tab-bar { display: flex; gap: 0.35rem; margin-bottom: 0.75rem; }
.lmstudio-tab {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0d1117;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
}
.lmstudio-tab.active { border-color: var(--primary); color: #93c5fd; }
.lmstudio-tab.hidden { display: none; }
.lmstudio-panel textarea { font-family: Consolas, monospace; font-size: 0.78rem; }
.voice-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.hint.key-ok { color: var(--success); }
.muted { color: var(--muted); }
.voice-outbound-card .voice-outbound-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.voice-outbound-field span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.voice-outbound-field-narrow input {
  width: 5rem;
}
.voice-outbound-advanced {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
}
.voice-outbound-advanced input {
  margin-bottom: 0.5rem;
}
.voice-outbound-actions {
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.voice-outbound-qa-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin: 0.75rem 0;
}
.voice-outbound-preview {
  margin-top: 0.75rem;
  padding: 0.65rem;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  max-height: 200px;
  overflow: auto;
}
.voice-context-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.5);
}
.voice-discover-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.5rem;
}
@media (max-width: 900px) {
  .voice-discover-row { grid-template-columns: 1fr; }
}
.voice-help-card { border-color: rgba(59, 130, 246, 0.35); }
.voice-help-steps {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.55;
}
.voice-help-steps li { margin-bottom: 0.45rem; }
.voice-call-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.voice-call-tab {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.voice-call-tab.active {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.12);
}
.voice-event-tool { border-left: 3px solid #f59e0b; padding-left: 0.5rem; margin: 0.35rem 0; }
.voice-event-result { border-left: 3px solid #22c55e; padding-left: 0.5rem; margin: 0.35rem 0; }
.voice-event-time { color: var(--muted); font-size: 0.72rem; margin-right: 0.35rem; }
.voice-tool-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}
.voice-tool-card pre {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.voice-path { font-size: 0.68rem; word-break: break-all; }
.metric-chip .info-tip {
  width: 0.95rem;
  height: 0.95rem;
  font-size: 0.58rem;
  margin-left: 0.15rem;
  vertical-align: baseline;
}
.voice-eval-result .metric-chips {
  margin: 0.5rem 0 0.75rem;
}
.voice-tool-analysis {
  margin: 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
}
.voice-tool-analysis .voice-subhead {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
}
.voice-tool-table .tool-st-missing td:last-child { color: #fcd34d; }
.voice-tool-table .tool-st-wrong_tool td:last-child { color: #fca5a5; }
.voice-tool-table .tool-st-ok td:last-child { color: #86efac; }
.voice-judge-intro {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--primary);
  background: rgba(59, 130, 246, 0.08);
}
.voice-judge-help {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 0.88rem;
}
.voice-judge-help-list {
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
}
.voice-metric-group-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
  color: #93c5fd;
}
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.voice-judge-paste textarea {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
}
.voice-judge-result {
  margin-top: 0.85rem;
}
.voice-judge-block {
  margin: 0.75rem 0;
}
.voice-judge-block h4 {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.voice-judge-row {
  margin: 0.35rem 0;
  font-size: 0.8rem;
}
.voice-field-head {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.voice-field-tr {
  color: var(--text);
  font-weight: 600;
}
.voice-field-key {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}
.voice-judge-list {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.45;
}
.voice-judge-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.voice-judge-chip {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.45);
}
.voice-judge-metrics {
  width: 100%;
  font-size: 0.76rem;
  border-collapse: collapse;
}
.voice-judge-metrics th,
.voice-judge-metrics td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.voice-judge-metrics th {
  color: var(--muted);
  font-weight: 500;
}
.voice-judge-metrics .metric-row-ok td:last-child { color: #86efac; }
.voice-judge-metrics .metric-row-mid td:last-child { color: #fcd34d; }
.voice-judge-metrics .metric-row-bad td:last-child { color: #fca5a5; }
.voice-judge-tools {
  display: grid;
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .voice-judge-tools { grid-template-columns: 1fr 1fr; }
}
.eval-reason { margin: 0.35rem 0 0.5rem; }
.link-btn {
  background: none;
  border: none;
  color: var(--accent, #60a5fa);
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}
.voice-vapi-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}
.voice-date-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.voice-date-field input,
.voice-date-field select {
  font-size: 0.85rem;
  min-width: 11.5rem;
}
.voice-vapi-pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
  position: relative;
  z-index: 2;
}
.voice-vapi-pager button {
  min-width: 7rem;
  pointer-events: auto;
}
.voice-vapi-pager button.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.voice-vapi-pager .hint { flex: 1; text-align: center; margin: 0; }
.voice-vapi-presets {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}
.voice-vapi-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.voice-vapi-search input { flex: 1; }
.voice-vapi-assistant-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.voice-vapi-assistant-filter select { min-width: 220px; flex: 1; }
.voice-retro-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.voice-retro-field span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.voice-retro-field-narrow input,
.voice-retro-field-narrow select { max-width: 10rem; }
.voice-retro-actions,
.voice-retro-options { gap: 0.75rem; margin: 0.75rem 0; }
.voice-retro-summary {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--surface-2, #f4f6f8);
  border: 1px solid var(--border, #dde3ea);
}
.voice-retro-stats { display: grid; gap: 0.35rem; font-size: 0.92rem; }
button.linkish {
  background: none;
  border: none;
  color: var(--accent, #2563eb);
  cursor: pointer;
  padding: 0;
  text-align: left;
  font: inherit;
}
.voice-vapi-table-wrap { margin-bottom: 1rem; }
.voice-vapi-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}
.voice-vapi-table th,
.voice-vapi-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.voice-vapi-table th { color: var(--muted); font-size: 0.72rem; }
.voice-vapi-assistant-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.5rem;
}
.voice-vapi-assistant-actions {
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.voice-fallback-details {
  margin: 0.75rem 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.voice-fallback-details summary { cursor: pointer; margin-bottom: 0.5rem; }

/* Login */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}
.login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  text-align: center;
}
.login-subtitle {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.login-submit {
  width: 100%;
  margin-top: 1rem;
}
.login-error {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-size: 0.85rem;
}

.nav-logout {
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
}
.nav-logout:hover {
  color: var(--text);
  border-color: var(--danger);
}