:root {
  --field: #083030;
  --card: #0c3c3c;
  --ink: #f4fffc;
  --text: #d7f3ec;
  --muted: #8ebdb4;
  --line: rgba(151, 252, 228, 0.18);
  --mint: #97fce4;
  --down: #ff8b84;
  --sans: "Satoshi", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--field); color: var(--ink); }
body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  font: 15px/1.4 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
.top, footer, .panel-h, .account, .prompt { display: flex; align-items: center; }
.top {
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}
a.brand { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 42px; width: auto; }
.brand b { display: block; font-weight: 900; font-size: 22px; letter-spacing: -0.04em; }
.brand span, .title, .top-meta, .panel-h span, footer, .account { color: var(--muted); }
.title { margin: 0; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 13px; }
.top-meta { display: flex; align-items: center; gap: 12px; }
.pill, time {
  font-family: var(--mono);
  font-size: 13px;
}
.pill {
  color: var(--field);
  background: var(--mint);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}
.pill.wait { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.pill.down { background: var(--down); }
main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(460px, 1fr);
}
.book, .term {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 18px 8px;
}
.book { border-right: 1px solid var(--line); }
.panel-h { justify-content: space-between; margin-bottom: 8px; }
.panel-h h2 { margin: 0; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.seats { display: grid; gap: 8px; }
.seat {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 4px 12px;
  padding: 10px 12px;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--line);
}
.seat b { font-size: 22px; letter-spacing: -0.04em; }
.seat .side { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.seat .side.short { color: var(--down); }
.seat .side.long { color: var(--mint); }
.seat .pnl { font-family: var(--mono); font-weight: 700; text-align: right; }
.seat .pnl.up { color: var(--mint); }
.seat .pnl.down { color: var(--down); }
.seat .facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0;
}
.seat .facts div { display: flex; flex-direction: column; gap: 1px; }
.seat .facts span { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.seat .facts strong { font-family: var(--mono); font-weight: 500; font-size: 13px; }
.empty {
  margin: 0;
  padding: 18px 12px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.table-wrap { min-height: 0; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13px; }
th, td { text-align: left; padding: 6px 8px 6px 0; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
td.call.long, .up { color: var(--mint); }
td.call.short, .down { color: var(--down); }
.account { margin: 8px 0 0; font-family: var(--mono); font-size: 12px; }
.term { background: #062626; }
#log {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
}
#log li { display: grid; grid-template-columns: 92px 52px 1fr; gap: 8px; }
#log time, #log .tag { color: var(--muted); }
#log .tag { font-weight: 700; }
#log .tag.call { color: var(--mint); }
#log .tag.seat { color: var(--ink); }
#log .tag.stop, #log .tag.skip { color: var(--down); }
.prompt {
  gap: 8px;
  margin: 8px 0 0;
  font-family: var(--mono);
  color: var(--mint);
}
.prompt i {
  width: 9px; height: 16px; background: var(--mint);
  animation: blink 1.05s steps(1) infinite;
}
footer {
  padding: 8px 22px 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 980px) {
  main { grid-template-columns: 1fr; }
  .book { border-right: 0; border-bottom: 1px solid var(--line); }
  body { height: auto; }
}
