/* LiveScript HB — tema escuro operacional */
:root {
  --bg: #08111f;
  --bg2: #0b1628;
  --panel: #0e1b2e;
  --panel2: #12223a;
  --row: #0f1e33;
  --border: #1d2f4a;
  --border2: #27406a;
  --text: #e6edf7;
  --muted: #8ea0bb;
  --dim: #5f7392;
  --blue: #3b82f6;
  --blue2: #2563eb;
  --green: #22c55e;
  --green2: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --purple: #a855f7;
  --cyan: #06b6d4;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.mono, .num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hidden { display: none !important; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.wrap { flex-wrap: wrap; }
.right { margin-left: auto; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border2);
  background: var(--panel2); cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: #18304f; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--blue2); border-color: var(--blue); }
.btn.primary:hover { background: var(--blue); }
.btn.success { background: #0f6b3c; border-color: var(--green); }
.btn.danger { background: #6b1d1d; border-color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn.icon { width: 34px; padding: 0; }
.btn.icon.sm { width: 28px; }

input.inp, select.inp, textarea.inp {
  background: #0a1526; border: 1px solid var(--border2); border-radius: 8px;
  height: 34px; padding: 0 10px; outline: none; min-width: 0;
}
textarea.inp { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
.inp:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.inp.sm { height: 28px; font-size: 12.5px; padding: 0 8px; }
.inp.cell { height: 28px; font-size: 13px; background: transparent; border-color: transparent; width: 100%; padding: 0 6px; }
.inp.cell:hover { border-color: var(--border2); }
.inp.cell:focus { background: #0a1526; }
label.lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border2); background: transparent; border-radius: 999px;
  padding: 5px 12px; cursor: pointer; font-size: 13px;
}
.chip.sel { background: var(--blue2); border-color: var(--blue); color: #fff; }

.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 52px;
  height: 22px; padding: 0 8px; border-radius: 5px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .03em; color: #0b1220; text-transform: uppercase;
}
.badge.lg { height: 46px; min-width: 130px; font-size: 24px; border-radius: 8px; padding: 0 22px; }
.badge.md { height: 30px; min-width: 120px; font-size: 13px; border-radius: 6px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border2); background: var(--panel); font-weight: 600; font-size: 13px;
}
.pill.live { border-color: #14532d; background: #0b2a1a; color: #4ade80; }
.pill.onair { border-color: #7f1d1d; background: #2a0f14; color: #fca5a5; }
.pill.warn { border-color: #78350f; background: #2a1a08; color: #fbbf24; }
.pill.off { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.dot.green { background: var(--green); } .dot.red { background: var(--red); }
.dot.amber { background: var(--amber); } .dot.gray { background: var(--dim); } .dot.blue { background: var(--blue); }
.blink { animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 5px;
  font-size: 12px; font-weight: 600; border: 1px solid;
}
.tag.grave, .tag.critica { color: #fca5a5; border-color: #7f1d1d; background: #3a1216; }
.tag.medio { color: #fdba74; border-color: #7c2d12; background: #34190b; }
.tag.leve, .tag.atencao { color: #fcd34d; border-color: #78350f; background: #2f2208; }
.tag.positiva, .tag.ok { color: #86efac; border-color: #14532d; background: #0b2a1a; }
.tag.obs, .tag.observacao, .tag.na, .tag.pendente { color: #cbd5e1; border-color: #334155; background: #172235; }
.tag.falha { color: #fca5a5; border-color: #7f1d1d; background: #3a1216; }

/* ---------- shell (Host / Monitoração) ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 64px 1fr; height: 100vh; }
.topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 18px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: 40px; }
.brand .t1 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.brand .t1 b { color: var(--blue); font-weight: 800; }
.brand .t2 { font-size: 12px; color: var(--muted); }
.topbar .clock { display: flex; gap: 12px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #1e3a64; display: grid; place-items: center; font-weight: 700; font-size: 12px; border: 1px solid var(--border2); }
.bell { position: relative; }
.bell .cnt { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 9px; padding: 1px 5px; }

.sidebar {
  background: var(--bg2); border-right: 1px solid var(--border); padding: 14px 10px;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.nav {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 8px;
  color: #cbd5e1; cursor: pointer; font-weight: 500; border: 1px solid transparent; background: none; text-align: left; width: 100%;
}
.nav:hover { background: var(--panel); }
.nav.active { background: #13284a; border-color: #1f3b66; color: #fff; }
.nav .cnt { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 7px; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 4px; }
.nav-title { font-size: 10.5px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; }
.side-event { margin-top: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-size: 12px; }
.side-event .t { color: var(--muted); margin-bottom: 8px; }
.side-event b { font-size: 13px; display: block; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 6px 2px; font-size: 13px; }

.main { overflow-y: auto; padding: 18px 20px 30px; }
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 16px; align-items: start; }
@media (max-width: 1280px) { .main-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .side-event, .sidebar .side-user, .sidebar .nav-sep, .sidebar .nav-title { display: none; }
  .nav { width: auto; white-space: nowrap; height: 38px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; }
  .main { padding: 12px 16px 24px; }
}

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-h h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.card-h .link { margin-left: auto; font-size: 12.5px; color: var(--blue); cursor: pointer; background: none; border: 0; }
.card-b { padding: 14px 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.event-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.event-head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.event-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.status-badge { background: var(--red); color: #fff; font-weight: 700; padding: 7px 12px; border-radius: 6px; font-size: 13px; }
.status-badge.pre { background: #1e3a64; } .status-badge.end { background: #334155; }
.meta-chip { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.meta-chip b { color: var(--text); display: block; font-size: 13px; }
.meta-chip svg { width: 26px; height: 26px; color: #cbd5e1; }

.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.phase { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.phase.cur { border-color: var(--blue); background: #102445; box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .35); }
.phase .ring { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--dim); flex: none; display: grid; place-items: center; }
.phase.done .ring { background: var(--green); border-color: var(--green); }
.phase.cur .ring { border-color: #cbd5e1; }
.phase .n { font-weight: 700; font-size: 13px; text-transform: uppercase; }
.phase .s { font-size: 11.5px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.phase.done .s { color: var(--green); } .phase.cur .s { color: #93c5fd; }
.phase .t { font-size: 11.5px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); min-width: 0; }
.kpi .ico { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .ico svg { width: 28px; height: 28px; }
.kpi .l { font-size: 12.5px; color: #cbd5e1; }
.kpi .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.green { background: #0b2219; border-color: #14532d; } .kpi.green .ico { background: #0f3a26; color: var(--green); } .kpi.green .s { color: #4ade80; }
.kpi.blue .ico { background: #13284a; color: #60a5fa; } .kpi.blue .s { color: #60a5fa; }
.kpi.purple { background: #160f2e; border-color: #3b2a6b; } .kpi.purple .ico { background: #261a4d; color: #a78bfa; } .kpi.purple .v { font-size: 18px; text-transform: uppercase; } .kpi.purple .s { color: #c4b5fd; }
.kpi.red { background: #2a0f14; border-color: #7f1d1d; cursor: pointer; } .kpi.red .ico { background: #b91c1c; color: #fff; border-radius: 50%; } .kpi.red .s { color: #fca5a5; }

/* ---------- tabela de roteiro ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: #cbd5e1; padding: 9px 10px; background: #0c182b; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 6px 10px; border-bottom: 1px solid #142540; vertical-align: middle; }
.tbl tr.grp td { background: #0c1a2e; font-weight: 700; cursor: pointer; }
.tbl tr.grp td .muted { font-weight: 400; }
.tbl tr.it:hover td { background: #102039; }
.tbl tr.onair td { background: #0f2547 !important; }
.tbl tr.onair td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.tbl tr.done td { color: #b6c2d4; }
.tbl tr.skipped td { color: var(--dim); text-decoration: line-through; }
.tbl .c { text-align: center; }
.tbl .num { white-space: nowrap; }
.pos { color: #f87171; } .neg { color: #4ade80; }
.chk { width: 18px; height: 18px; border-radius: 4px; display: inline-grid; place-items: center; border: 1.5px solid var(--dim); }
.chk.on { background: var(--green); border-color: var(--green); color: #052e16; }
.chk.skip { background: #334155; border-color: #475569; }
.tbl-wrap { overflow-x: auto; }
.editor td { padding: 3px 4px; }
.editor .inp.cell { font-size: 12.5px; }
.editor select.inp.cell { padding: 0 2px; }

.menu { position: relative; display: inline-block; }
.menu-list { position: absolute; right: 0; top: 100%; z-index: 30; background: #10203a; border: 1px solid var(--border2); border-radius: 8px; min-width: 190px; padding: 4px; box-shadow: var(--shadow); }
.menu-list button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; background: none; border: 0; border-radius: 6px; cursor: pointer; text-align: left; font-size: 13px; }
.menu-list button:hover { background: #18304f; }

/* ---------- painéis laterais ---------- */
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #142540; }
.list-row:last-child { border-bottom: 0; }
.eng-row .name { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; }
.eng-row .st { width: 110px; display: flex; gap: 6px; align-items: center; font-size: 12.5px; background: #0b1729; border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; }
.bars { display: flex; gap: 2px; width: 64px; }
.bars i { flex: 1; height: 14px; border-radius: 1px; background: #23344f; }
.bars i.on { background: var(--green); } .bars.warn i.on { background: var(--amber); } .bars.bad i.on { background: var(--red); }
.alert-row .txt { flex: 1; min-width: 0; }
.alert-row .txt b { display: block; font-size: 13px; font-weight: 600; }
.alert-row .txt span { color: var(--muted); font-size: 12px; }
.alert-row .when { color: var(--muted); font-size: 12px; }
.obs-row { background: #0b1729; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.obs-row .meta { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.empty { color: var(--dim); font-size: 13px; padding: 10px 0; text-align: center; }

/* ---------- checklist ---------- */
.check-area { margin-bottom: 16px; }
.check-area h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.check-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: #0b1729; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.check-item .lbl2 { font-weight: 500; }
.check-item .by { color: var(--dim); font-size: 11.5px; margin-top: 2px; }
.seg { display: inline-flex; border: 1px solid var(--border2); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 5px 10px; font-size: 12px; cursor: pointer; border-right: 1px solid var(--border2); font-weight: 600; color: var(--muted); }
.seg button:last-child { border-right: 0; }
.seg button.on.ok { background: #0f6b3c; color: #fff; }
.seg button.on.atencao { background: #92400e; color: #fff; }
.seg button.on.falha { background: #991b1b; color: #fff; }
.seg button.on.na { background: #334155; color: #fff; }
.seg button.on.pendente { background: #1e3a64; color: #fff; }
.progress { height: 8px; border-radius: 4px; background: #1b2b45; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green); border-radius: 4px; }

/* ---------- ocorrências (modelo relatorios-host) ---------- */
.grav-group { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 700px) { .grav-group { grid-template-columns: repeat(2, 1fr); } }
.grav { border: 1px solid var(--border2); background: #0b1729; border-radius: 8px; padding: 8px; text-align: left; cursor: pointer; }
.grav b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.grav span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.grav.sel.positiva { border-color: var(--green); background: #0b2a1a; }
.grav.sel.obs { border-color: #64748b; background: #172235; }
.grav.sel.leve { border-color: var(--amber); background: #2f2208; }
.grav.sel.medio { border-color: #f97316; background: #34190b; }
.grav.sel.grave { border-color: var(--red); background: #3a1216; }
.gdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.gdot.positiva { background: var(--green); } .gdot.obs { background: #94a3b8; } .gdot.leve { background: #facc15; }
.gdot.medio { background: #f97316; } .gdot.grave { background: var(--red); }
.occ-item { display: grid; grid-template-columns: 14px 70px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #142540; font-size: 13px; }
.occ-item .t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.occ-item .meta { color: var(--dim); font-size: 11.5px; }
.occ-item.resolved .txt { color: var(--muted); }
.cat-group { border-left: 3px solid var(--blue); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 8px; border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cat-group .h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; }
.cat-group .h h4 { margin: 0; font-size: 16px; }
.cat-group .h .cnt { font-size: 11.5px; color: var(--muted); border: 1px solid var(--border2); border-radius: 5px; padding: 2px 8px; }

.rep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.rep-kpi { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.rep-kpi .ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.rep-kpi .v { font-size: 24px; font-weight: 800; line-height: 1; }
.rep-kpi .l { font-size: 12px; font-weight: 600; margin-top: 4px; }
.rep-kpi .s { font-size: 11px; color: var(--muted); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; align-items: end; }
.donuts { display: flex; gap: 14px; justify-content: space-around; padding: 6px 0 4px; }
.donut { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.donut b { color: var(--text); font-size: 16px; display: block; }
.preview-sheet { background: #fff; color: #111; border-radius: 6px; height: 340px; overflow: hidden; position: relative; }
.preview-sheet .inner { transform: scale(.42); transform-origin: 0 0; width: 238%; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, #12305a 0%, var(--bg) 60%); }
.login-box { width: min(880px, 100%); }
.login h1 { font-size: 30px; margin: 10px 0 4px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 22px 0; }
.role { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; cursor: pointer; text-align: left; }
.role:hover { border-color: var(--border2); }
.role.sel { border-color: var(--blue); background: #102445; }
.role .ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: #13284a; color: #60a5fa; margin-bottom: 12px; }
.role b { display: block; font-size: 16px; margin-bottom: 4px; }
.role span { font-size: 12.5px; color: var(--muted); }
.login-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }

/* ---------- HUDs (Grafismo / Detentor) ---------- */
.hud { min-height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 0 0 14px; }
.hud-top { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--bg2); flex-wrap: wrap; }
.hud-top .title { font-size: 22px; font-weight: 700; }
.hud-top .sep { width: 1px; height: 30px; background: var(--border2); }
.hud-top .live-tag { background: #dc2626; color: #fff; font-weight: 700; padding: 6px 12px; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.hud-top .onair-box { display: flex; align-items: center; gap: 10px; border: 1px solid #7f1d1d; background: #2a0f14; padding: 6px 14px; border-radius: 8px; font-weight: 700; }
.hud-top .onair-box .v { font-size: 20px; font-variant-numeric: tabular-nums; color: #fff; }
.hud-body { padding: 0 20px; display: flex; flex-direction: column; gap: 14px; }
.hud-now { border: 2px solid #10b981; border-radius: 14px; background: linear-gradient(180deg, #0a2124 0%, #0b1a2c 100%); box-shadow: 0 0 30px rgba(16, 185, 129, .18), inset 0 0 40px rgba(16, 185, 129, .05); padding: 20px 26px; }
.hud-now.idle { border-color: var(--border2); box-shadow: none; background: var(--panel); }
.hud-now.warn { border-color: var(--amber); box-shadow: 0 0 30px rgba(245, 158, 11, .2); }
.hud-label { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: #34d399; text-transform: uppercase; letter-spacing: .01em; }
.hud-now.idle .hud-label { color: var(--muted); }
.hud-label .bigdot { width: 22px; height: 22px; border-radius: 50%; border: 5px solid currentColor; }
.hud-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 42%); gap: 26px; align-items: center; }
@media (max-width: 1000px) { .hud-grid { grid-template-columns: 1fr; } }
.hud-num { font-size: 52px; font-weight: 800; color: #cbd5e1; font-variant-numeric: tabular-nums; }
.hud-title { font-size: clamp(34px, 4.6vw, 64px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin: 10px 0; }
.hud-guide { font-size: 22px; color: #cbd5e1; }
.hud-timer { display: flex; align-items: baseline; gap: 14px; }
.hud-timer .big { font-size: clamp(56px, 8vw, 116px); font-weight: 800; color: #34d399; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.02em; }
.hud-timer .tot { font-size: clamp(28px, 3.5vw, 46px); color: #cbd5e1; font-variant-numeric: tabular-nums; }
.hud-timer.over .big { color: var(--amber); }
.hud-bar { height: 28px; border-radius: 14px; background: #1b2b45; overflow: hidden; margin-top: 16px; }
.hud-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #34d399); border-radius: 14px; transition: width .2s linear; }
.hud-src { font-size: 13px; color: var(--muted); margin-top: 8px; display: flex; gap: 8px; align-items: center; }
.hud-preview { border: 2px solid #1f3a5f; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 7; background: radial-gradient(ellipse at 50% 0%, #2f5a3a 0%, #0d2316 45%, #06120c 100%); display: flex; align-items: center; justify-content: center; position: relative; }
.hud-preview img.asset { width: 100%; height: 100%; object-fit: cover; }
.vs { display: flex; align-items: center; justify-content: center; gap: 4%; width: 100%; }
.vs .crest { width: 30%; max-width: 170px; aspect-ratio: 1; }
.vs .x { font-size: clamp(30px, 4vw, 60px); font-weight: 800; }
.crest { border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; overflow: hidden; }
.crest img { width: 100%; height: 100%; object-fit: contain; }
.crest.txt { border: 4px solid rgba(255, 255, 255, .85); font-size: clamp(16px, 2.4vw, 34px); }
.hud-actions { display: grid; grid-template-columns: 1.1fr 1fr 1.1fr; gap: 14px; }
@media (max-width: 800px) { .hud-actions { grid-template-columns: 1fr; } }
.hud-btn { height: 74px; border-radius: 12px; border: 2px solid; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 16px; cursor: pointer; }
.hud-btn svg { width: 34px; height: 34px; stroke-width: 2.4; }
.hud-btn.g { background: #0d7a4a; border-color: #22c55e; color: #fff; }
.hud-btn.g:hover { background: #0f8f56; }
.hud-btn.n { background: #13213a; border-color: #2b4064; color: #fff; }
.hud-btn.b { background: #1d4ed8; border-color: #3b82f6; color: #fff; }
.hud-btn:disabled { opacity: .4; cursor: not-allowed; }
.hud-seq { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 6px 16px 10px; }
.hud-seq h3 { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-size: 20px; }
.hud-seq table { width: 100%; border-collapse: separate; border-spacing: 0 5px; font-size: 18px; }
.hud-seq th { text-align: left; color: #cbd5e1; font-weight: 500; font-size: 16px; padding: 2px 12px; }
.hud-seq td { padding: 7px 12px; background: #0e1d33; border-top: 1px solid #172a46; border-bottom: 1px solid #172a46; }
.hud-seq td:first-child { border-left: 1px solid #172a46; border-radius: 8px 0 0 8px; font-weight: 600; }
.hud-seq td:last-child { border-right: 1px solid #172a46; border-radius: 0 8px 8px 0; }
.st-pill { display: inline-block; background: #22324c; border-radius: 6px; padding: 3px 12px; font-size: 13px; font-weight: 700; letter-spacing: .03em; color: #e2e8f0; min-width: 120px; text-align: center; }
.st-pill.late { background: #5b2a0a; color: #fdba74; }
.hud-foot { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; font-size: 18px; }
.hud-foot .ok { width: 28px; height: 28px; border-radius: 50%; background: #15803d; display: grid; place-items: center; }
.stale { background: #3a2508; border: 1px solid #b45309; color: #fde68a; border-radius: 10px; padding: 10px 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; }

/* detentor */
.det-now { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr) minmax(0, 30%); gap: 26px; align-items: center; margin-top: 12px; }
@media (max-width: 1100px) { .det-now { grid-template-columns: 1fr; } }
.scoreboard { border: 2px solid #1f3a5f; border-radius: 12px; aspect-ratio: 16 / 7; background: radial-gradient(ellipse at 50% 0%, #2f5a3a 0%, #0d2316 45%, #06120c 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.scoreboard .line { display: flex; align-items: center; justify-content: center; gap: 6%; width: 100%; }
.scoreboard .crest { width: 28%; max-width: 130px; aspect-ratio: 1; }
.scoreboard .sc { font-size: clamp(36px, 4.6vw, 70px); font-weight: 800; font-variant-numeric: tabular-nums; }
.scoreboard .per { font-size: clamp(14px, 1.5vw, 22px); font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.scoreboard img.asset { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.det-title { font-size: clamp(30px, 3.4vw, 48px); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.det-meta { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #23405f; margin-top: 18px; padding-top: 14px; }
.det-meta div + div { border-left: 1px solid #23405f; padding-left: 24px; }
.det-meta span { display: block; font-size: 20px; color: #cbd5e1; }
.det-meta b { font-size: clamp(24px, 2.4vw, 34px); font-variant-numeric: tabular-nums; }
.restam { position: relative; display: flex; flex-direction: column; justify-content: center; padding-left: 28px; border-left: 1px solid #23405f; min-height: 220px; }
@media (max-width: 1100px) { .restam { border-left: 0; padding-left: 0; } }
.restam .l { font-size: 32px; font-weight: 800; color: #34d399; }
.restam .v { font-size: clamp(80px, 9vw, 150px); font-weight: 800; color: #34d399; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.03em; }
.restam .v.small { font-size: clamp(30px, 3vw, 44px); color: #cbd5e1; }
.restam svg.arc { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); height: 120%; width: auto; pointer-events: none; }
.restam .src { font-size: 13px; color: var(--muted); margin-top: 6px; }
.restam.over .l, .restam.over .v { color: var(--amber); }
.det-next { border: 2px solid #1d3f73; border-radius: 14px; background: linear-gradient(180deg, #0c1d3a, #0b1628); padding: 14px 22px; }
.det-next .hud-label { color: #60a5fa; font-size: 20px; }
.det-next .grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 30px; align-items: center; margin-top: 10px; }
@media (max-width: 800px) { .det-next .grid { grid-template-columns: 1fr; } }
.det-next .thumb { aspect-ratio: 16 / 6; border-radius: 8px; border: 1px solid #23405f; background: #0a1324; overflow: hidden; display: grid; place-items: center; color: var(--dim); font-weight: 700; font-size: 18px; text-align: center; padding: 6px; }
.det-next .thumb img { width: 100%; height: 100%; object-fit: cover; }
.det-next h2 { margin: 0 0 10px; font-size: clamp(26px, 2.6vw, 36px); }
.det-next .entra { display: flex; align-items: baseline; gap: 18px; margin-top: 10px; font-size: 24px; color: #93c5fd; font-weight: 700; }
.det-next .entra b { font-size: clamp(36px, 3.6vw, 52px); color: #60a5fa; font-variant-numeric: tabular-nums; }
.seq-thumb { width: 120px; height: 34px; border-radius: 5px; background: #0a1324; border: 1px solid #1d3354; overflow: hidden; display: grid; place-items: center; font-size: 11px; color: var(--dim); font-weight: 700; }
.seq-thumb img { width: 100%; height: 100%; object-fit: cover; }
.st-dot { display: inline-flex; gap: 10px; align-items: center; font-size: 16px; color: #cbd5e1; }
.st-dot i { width: 18px; height: 18px; border-radius: 50%; background: #94a3b8; display: inline-block; }
.st-dot.onair i { background: var(--green); }

/* ---------- toasts & modal ---------- */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: #10203a; border: 1px solid var(--border2); border-left: 4px solid var(--green); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13.5px; max-width: 380px; }
.toast.err { border-left-color: var(--red); }
.modal-bg { position: fixed; inset: 0; background: rgba(2, 6, 16, .7); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--border2); border-radius: 14px; width: min(620px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal .card-h { position: sticky; top: 0; background: var(--panel); z-index: 1; }

/* ---------- impressão do relatório (padrão do PDF de referência) ---------- */
#print-root { display: none; }
.sheet { font-family: Inter, Arial, sans-serif; color: #111; background: #fff; padding: 34px 40px; font-size: 13px; }
.sheet .top { display: flex; justify-content: space-between; font-size: 10px; color: #666; margin-bottom: 18px; }
.sheet h1 { font-size: 24px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .02em; }
.sheet .metas { display: flex; gap: 40px; margin-bottom: 18px; font-size: 11px; color: #555; }
.sheet .metas b { display: block; color: #111; font-size: 13px; }
.sheet h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 2px solid #111; padding-bottom: 4px; margin: 18px 0 6px; }
.sheet h3 { font-size: 12px; margin: 10px 0 4px; }
.sheet ul { list-style: none; margin: 0; padding: 0; }
.sheet li { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid #e5e7eb; }
.sheet li .gdot { margin-top: 4px; }
.sheet li .m { color: #666; font-size: 11px; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; }
  #app, #toasts { display: none !important; }
  #print-root { display: block !important; }
  .sheet { padding: 0; }
  .sheet h2 { break-after: avoid; }
  .gdot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- seletor de jogos simultâneos ---------- */
.game-sel { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--border2); border-radius: 8px; background: #0b1729; cursor: pointer; max-width: 460px; }
.game-sel select { background: transparent; border: 0; outline: none; font-weight: 700; font-size: 14px; min-width: 0; max-width: 300px; cursor: pointer; }
.game-sel select option, .game-sel select optgroup { background: #0e1b2e; color: var(--text); }
.game-sel .game-count { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.game-sel.in-hud { height: 40px; }
.game-sel.in-hud select { font-size: 16px; }
.game-fixed { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
a.nav { text-decoration: none; }
@media (max-width: 860px) { .game-sel { max-width: 100%; } .game-sel .game-count { display: none; } }
.crest.mini { width: 46px; height: 46px; flex: none; font-size: 12px; border-width: 2px; }

/* ---------- monitoração dos detentores ---------- */
.det-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
@media (max-width: 700px) { .det-grid { grid-template-columns: 1fr; } }
.det-mon { background: #0b1729; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.det-mon .lbl { margin-bottom: 4px; }

/* editor de roteiro: arrastar linhas e fonte */
.tbl.editor td.drag-h { cursor: grab; color: #64748b; width: 22px; text-align: center; }
.tbl.editor td.drag-h:hover { color: #cbd5e1; }
.tbl.editor tr.dragging td { opacity: .45; }
.tbl.editor tr.drop-before td { box-shadow: inset 0 2px 0 #3b82f6; }
.tbl.editor tr.drop-after td { box-shadow: inset 0 -2px 0 #3b82f6; }
.src-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid #334155; color: #cbd5e1; font-weight: 700; font-size: 14px; letter-spacing: .04em; white-space: nowrap; }
.tbl.editor td.drag-h svg { transform: rotate(90deg); }

/* pacote gráfico: exemplos de arte e galeria de templates */
/* tarja "exemplo" colada em cima da arte: a arte (16:9) ocupa o maior tamanho que cabe na caixa
   descontada a altura da tarja, e o conjunto fica centralizado, sem sobrepor e sem faixa vazia */
.ex-wrap { --ex-tag-h: 26px; width: 100%; height: 100%; container-type: size; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
.ex-fig { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ex-img { position: relative; width: min(100cqw, calc((100cqh - var(--ex-tag-h)) * 16 / 9)); aspect-ratio: 16 / 9; }
.ex-img > img, .hud-preview .ex-img img.asset, .scoreboard .ex-img img.asset { position: static; display: block; width: 100%; height: 100%; object-fit: contain; }
.seq-thumb .ex-wrap { --ex-tag-h: 0px; }
.seq-thumb .ex-tag { display: none; }
.ex-tag { flex: none; line-height: 1.3; background: #0b0b0f; color: #fff; border: 1.5px solid #eab308; border-radius: 7px; padding: 1px 9px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.asset-card.drop-file { outline: 2px dashed #3b82f6; outline-offset: -2px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; max-height: 70vh; overflow-y: auto; }
.tpl-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #1e3a5f; border-radius: 10px; background: #0b1729; color: #e6edf7; cursor: pointer; text-align: left; font: inherit; }
.tpl-card:hover { border-color: #3b82f6; background: #102039; }
.tpl-card img, .tpl-noimg { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; border-radius: 6px; display: grid; place-items: center; color: #64748b; }

/* artes por time */
/* par de artes por time: --n artes 16:9 lado a lado */
.ex-img.ex-pair { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 4px; aspect-ratio: auto; width: min(100cqw, calc((100cqh - var(--ex-tag-h)) * 16 / 9 * var(--n, 2))); }
.ex-pair > div { aspect-ratio: 16 / 9; }
.ex-pair > div { position: relative; min-width: 0; display: grid; place-items: center; background: #000; }
.ex-pair img { width: 100%; height: 100%; object-fit: contain; }
.ex-team { position: absolute; right: 6px; bottom: 6px; background: rgba(2, 6, 23, .8); color: #e6edf7; border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.asset-img { width: 100%; height: 100%; object-fit: contain; }
.asset-card .ex-wrap { width: 100%; height: 100%; }

/* promoção cruzada calculada pelo HUB */
.promo-line { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: #fbbf24; text-transform: none; font-weight: 500; }
.promo-line .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.promo-line.big { font-size: clamp(16px, 1.5vw, 22px); margin: 8px 0; }
.promo-line.big .ic { width: 20px; height: 20px; }

/* HUD do detentor: roteiro completo */
.hud-seq .seq-scroll { max-height: 70vh; overflow-y: auto; }
.hud-seq tr.seq-grp td { background: #0c1a2e; color: #93c5fd; font-weight: 700; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; padding-top: 10px; padding-bottom: 10px; position: sticky; top: 0; z-index: 1; }
.hud-seq tr.seq-past td { opacity: .5; }
.hud-seq tr.seq-next td { background: #102039; }
.st-dot.ok i { background: #4ade80; }
.st-dot.live i { background: #f87171; }
.st-dot.off i { background: #64748b; }

/* aba Assets por pacote: grade time x arte */
.times-grid td, .times-grid th { vertical-align: top; }
.times-grid th { white-space: normal; min-width: 140px; }
.tg-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tg-cell img { width: 130px; height: 73px; object-fit: contain; background: #000; border-radius: 4px; }
