/* Tokens do tema escuro "Calor" (docs/ux/design-system.md), replicados para a web leve (ADR-019). */
:root {
  --canvas: #14100f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-high: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text-strong: #f5f0ec;
  --text-body: #c8bfb9;
  --text-muted: #a0958f;
  --text-subtle: #8c817b;
  --accent: #ff8a3d;
  --success: #3dd68c;
  --success-container: rgba(61, 214, 140, 0.14);
  --warning: #ffb340;
  --warning-content: #ffc470;
  --danger: #ff5c5c;
  --font: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--canvas);
  color: var(--text-strong);
  font-family: var(--font);
  /* Lida a 3 metros: base grande, cresce com a TV. */
  font-size: clamp(18px, 1.35vw, 34px);
  overflow: hidden;
  cursor: none;
}
[hidden] { display: none !important; }

/* Pareamento */
.pairing {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4vh 6vw;
}
.pairing h1 { font-size: 2.2em; margin: 0 0 1em; }
.pair-label { color: var(--text-muted); margin: 0; font-size: 1.2em; }
.pair-code {
  font-size: 6em;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0.2em 0;
  font-variant-numeric: tabular-nums;
}
.pair-hint { color: var(--text-body); font-size: 1.2em; max-width: 34em; }

/* Painel */
.board { height: 100%; display: flex; flex-direction: column; }
.offline {
  background: var(--danger);
  color: #1a1513;
  font-weight: 700;
  text-align: center;
  padding: 0.4em;
}
.topbar {
  display: flex;
  align-items: baseline;
  gap: 1em;
  padding: 0.5em 1em 0.3em;
}
.brand { font-weight: 700; font-size: 1.3em; color: var(--accent); }
.store { color: var(--text-muted); flex: 1; }
.clock { font-variant-numeric: tabular-nums; color: var(--text-body); font-size: 1.3em; }

.columns {
  flex: 1;
  display: flex;
  gap: 0.8em;
  padding: 0 0.8em 0.8em;
  min-height: 0;
}
.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.6em;
  padding: 0.5em;
}
.column h2 {
  margin: 0.1em 0.2em 0.5em;
  font-size: 1.15em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-body);
}
.column.ready h2 { color: var(--success); }
.count {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  border-radius: 1em;
  background: var(--surface-high);
  color: var(--text-strong);
  margin-left: 0.3em;
}
.cards { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 0.5em; }

.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 0.55em;
  padding: 0.5em 0.65em;
}
.card.tone-warn { border-color: var(--warning); }
.card.tone-late { border-color: var(--danger); background: rgba(255, 92, 92, 0.1); }
.card.tone-ready { border-color: var(--success); background: var(--success-container); }
.card.tone-delivered { opacity: 0.45; }
.card-head { display: flex; align-items: center; gap: 0.5em; }
.card-number { font-size: 1.9em; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-info { min-width: 0; }
.card-place { font-weight: 700; font-size: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { color: var(--text-muted); font-size: 0.85em; }

.items { list-style: none; margin: 0.35em 0 0; padding: 0; }
.item { display: flex; gap: 0.4em; padding: 0.12em 0; }
.qty { font-weight: 800; min-width: 2.2em; font-size: 1.15em; }
.item-body { display: flex; flex-direction: column; }
.name { font-size: 1.1em; }
.note {
  color: var(--warning-content);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95em;
}
.item.cancelled .name, .item.cancelled .qty { text-decoration: line-through; color: var(--text-subtle); }
.tag-cancelled { color: var(--danger); font-weight: 800; font-size: 0.85em; }
