:root {
  --bg: #12141a;
  --card: #1a1d26;
  --line: #2a2f3d;
  --text: #e6e8ee;
  --dim: #98a0b3;
  --accent: #4f9cf9;
  --warn: #f0b429;
  --bad: #f2555a;
  --good: #3ddc97;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.banner {
  background: var(--warn);
  color: #1a1400;
  text-align: center;
  padding: 7px;
  font-weight: 700;
  letter-spacing: .02em;
}

header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}
header h1 { font-size: 17px; margin: 0; font-weight: 600; }
nav { display: flex; gap: 6px; }
.who { margin-left: auto; color: var(--dim); font-size: 13px; }

button {
  background: #252a36;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: #06121f; font-weight: 600; }
.tab.active { border-color: var(--accent); color: var(--accent); }

main { padding: 20px; max-width: 1100px; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 18px;
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase;
           letter-spacing: .07em; color: var(--dim); }

.row { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
         color: var(--dim); margin: 12px 0 4px; }
.big { font-size: 21px; font-weight: 600; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.hint { color: var(--dim); font-size: 13px; margin: 4px 0; }
.error { color: var(--bad); font-size: 13px; }
.warn { color: var(--warn); font-size: 13px; }

input, textarea, select {
  background: #10131a;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  padding: 8px 10px;
  font: inherit;
  width: 100%;
}
label { display: block; font-size: 13px; color: var(--dim); }
form.row label { flex: 1; min-width: 150px; }
textarea { min-height: 62px; margin: 10px 0; resize: vertical; }

.script {
  background: #10131a;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  padding: 13px;
  white-space: pre-wrap;
  margin: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
}
/* An unfilled variable must LOOK unfilled, never like copy to read aloud. */
.script .missing { background: rgba(240,180,41,.22); color: var(--warn);
                   border-radius: 3px; padding: 0 3px; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: 13px; }
.chip.selected { background: var(--accent); border-color: var(--accent);
                 color: #06121f; font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--dim); font-weight: 500; font-size: 11px;
     text-transform: uppercase; letter-spacing: .06em;
     border-bottom: 1px solid var(--line); padding: 7px 8px; }
td { padding: 7px 8px; border-bottom: 1px solid #20242e; vertical-align: top; }
tr:last-child td { border-bottom: none; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px;
        font-size: 11px; font-weight: 700; text-transform: uppercase; }
.pill.ok { background: rgba(61,220,151,.16); color: var(--good); }
.pill.warn { background: rgba(240,180,41,.16); color: var(--warn); }
.pill.critical { background: rgba(242,85,90,.18); color: var(--bad); }
.pill.unknown { background: rgba(152,160,179,.16); color: var(--dim); }

.result { background: #10131a; border: 1px solid var(--line); border-radius: 7px;
          padding: 12px; overflow-x: auto; font-size: 12.5px; }
.check { display: flex; gap: 11px; align-items: baseline; padding: 7px 0;
         border-bottom: 1px solid #20242e; }
.check:last-child { border-bottom: none; }
code { background: #10131a; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

.phonebar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #10131a; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 13px; margin-bottom: 14px;
}
#remote-audio { display: none; }
select { background: #10131a; border: 1px solid var(--line); color: var(--text);
         border-radius: 7px; padding: 8px 10px; font: inherit; width: 100%; }
#cfg-list-select { margin-bottom: 14px; }

.pop { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(79,156,249,.35); }
.pop h2 { color: var(--accent); }

.thread { max-height: 260px; overflow-y: auto; padding-right: 4px; }
.bubble { border-radius: 9px; padding: 8px 11px; margin: 6px 0; max-width: 80%;
          border: 1px solid var(--line); font-size: 13.5px; }
.bubble.inbound { background: #181d28; margin-right: auto; }
.bubble.outbound { background: #1d2534; margin-left: auto;
                   border-color: #33405a; }
.bubble .meta { font-size: 10.5px; text-transform: uppercase;
                letter-spacing: .06em; color: var(--dim); margin-bottom: 3px; }
