/* Mesa VIVA — painel da equipa e plataforma.
   Paleta da marca: verde-escuro de sala, dourado de serviço, creme de toalha.
   Fraunces (títulos e números), Instrument Sans (interface), IBM Plex Mono (etiquetas, códigos). */

@font-face { font-family: 'Fraunces'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/fraunces-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/fraunces-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 500; font-display: swap; src: url('../fonts/fraunces-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 600; font-display: swap; src: url('../fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url('../fonts/instrument-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url('../fonts/instrument-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url('../fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 700; font-display: swap; src: url('../fonts/instrument-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --ink: #152420;
  --ink-2: #1e3530;
  --ink-3: #2c4a43;
  --gold: #e3a83b;
  --gold-soft: #f0c675;
  --gold-wash: #fbf0d9;
  --cream: #f4efe4;
  --paper: #fbf8f2;
  --white: #ffffff;
  --line: #e2d9c6;
  --line-soft: #ece5d6;
  --text: #1c2622;
  --muted: #66746d;
  --sage: #9cb2a4;
  --live: #e1546c;
  --live-wash: #fbe4e8;
  --ok: #2d7a57;
  --ok-wash: #ddefe5;
  --warn: #a8650f;
  --warn-wash: #fbecd2;
  --danger: #b3261e;
  --danger-wash: #f9dfdc;
  --info: #2f5f7a;
  --info-wash: #dfeaf1;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(21, 36, 32, .06), 0 4px 16px rgba(21, 36, 32, .05);
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--text); background: var(--cream); }
a { color: var(--ink-3); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 .75em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
[x-cloak] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estrutura ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #cfdcd4; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 18px; color: #fff; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.wordmark { font-family: var(--display); font-size: 22px; letter-spacing: -.02em; color: #fff; line-height: 1; }
.wordmark em { font-style: italic; color: var(--gold); font-weight: 500; }
.side .place { margin: 0 14px 14px; padding: 12px 12px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--ink-3); }
.side .place b { display: block; color: #fff; font-weight: 600; font-size: 14px; line-height: 1.3; }
.side .place span { font-family: var(--mono); font-size: 11px; color: var(--sage); }
.nav { padding: 6px 10px 18px; flex: 1; }
.nav h6 { margin: 16px 12px 6px; font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: #7f9a8d; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: #d5e1da; }
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.on { background: var(--ink-3); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav a.on svg { opacity: 1; color: var(--gold); }
.nav .count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--live); color: #fff; font: 600 11px/18px var(--sans); text-align: center; }
.side .me { border-top: 1px solid var(--ink-3); padding: 14px 18px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font: 600 12px/1 var(--sans); flex: none; }
.side .me .who { flex: 1; min-width: 0; }
.side .me .who b { display: block; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me button { background: none; border: 0; color: var(--sage); cursor: pointer; padding: 6px; border-radius: 6px; }
.side .me button:hover { color: #fff; background: var(--ink-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 22px 32px 0; }
.topbar .title { flex: 1; min-width: 0; }
.topbar .title .eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: block; }
.content { padding: 22px 32px 48px; flex: 1; }
.menu-btn { display: none; }

.acting { background: var(--gold); color: var(--ink); padding: 8px 32px; display: flex; gap: 12px; align-items: center; font-size: 13.5px; }
.acting form { margin-left: auto; }
.acting button { background: var(--ink); color: #fff; border: 0; border-radius: 6px; padding: 5px 12px; font: 600 12.5px var(--sans); cursor: pointer; }

/* indicador "ao vivo" */
.live { display: inline-flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 7px 11px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(225, 84, 108, .6); animation: pulse 2s infinite; }
.live.off i { background: var(--sage); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(225, 84, 108, .55); } 70% { box-shadow: 0 0 0 9px rgba(225, 84, 108, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 84, 108, 0); } }

/* ---------- Blocos ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.card > .hd h2, .card > .hd h3 { flex: 1; }
.card > .bd { padding: 18px 20px; }
.card > .bd.flush { padding: 0; }
.card + .card, .stack > * + * { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.stat { padding: 18px 20px; }
.stat .k { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stat .v { font: 500 30px/1.1 var(--display); margin-top: 10px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .s { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat.dark .k { color: var(--gold-soft); }
.stat.dark .s { color: var(--sage); }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--text); font: 600 13.5px/1.2 var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: #cfc3aa; background: var(--paper); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-3); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: var(--gold-soft); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-wash); border-color: #efb9b3; }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-soft); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 6px; }
.btn.lg { padding: 13px 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: 32px; height: 32px; padding: 0; }

/* ---------- Etiquetas de estado ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font: 600 11.5px/1.6 var(--sans); white-space: nowrap; background: var(--line-soft); color: var(--muted); }
.tag.novo { background: var(--live-wash); color: #a3293f; }
.tag.preparando { background: var(--warn-wash); color: var(--warn); }
.tag.entregue { background: var(--ok-wash); color: var(--ok); }
.tag.finalizado { background: #e6ebe8; color: #4a5a52; }
.tag.cancelado { background: var(--danger-wash); color: var(--danger); text-decoration: line-through; }
.tag.pendente { background: var(--live-wash); color: #a3293f; }
.tag.atendido { background: var(--ok-wash); color: var(--ok); }
.tag.gold { background: var(--gold-wash); color: #865a0b; }
.tag.info { background: var(--info-wash); color: var(--info); }
.tag.ink { background: var(--ink); color: #fff; }

/* ---------- Tabelas ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.dim td { opacity: .55; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }

/* ---------- Formulários ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
label.f > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 9px 11px; border: 1px solid #d6ccb6; border-radius: 8px; background: var(--white); font: 14.5px/1.4 var(--sans); color: var(--text); }
.input:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
textarea.input { min-height: 84px; resize: vertical; }
.input.sm { padding: 6px 9px; font-size: 13.5px; }
.help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.err { color: var(--danger); font-size: 12.5px; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--ink); width: 16px; height: 16px; }
.check b { display: block; font-weight: 600; font-size: 14px; }
.check small { color: var(--muted); }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 18px; background: var(--white); }
.fieldset legend { font: 500 18px var(--display); padding: 0 6px; margin-left: -6px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-cards label { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; display: block; }
.radio-cards label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.radio-cards input { accent-color: var(--ink); }

/* ---------- Avisos ---------- */
.notice { padding: 11px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.notice.ok { background: var(--ok-wash); border-color: #b9dcc8; color: #1f5c40; }
.notice.bad { background: var(--danger-wash); border-color: #efb9b3; color: #8d1f18; }
.notice.warn { background: var(--warn-wash); border-color: #f0d19e; color: #7a4a09; }
.notice.info { background: var(--paper); border-color: var(--line); color: var(--text); }
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); font-size: 14px; border-left: 4px solid var(--gold); }
.toast.bad { border-left-color: var(--live); }

.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* ---------- Modal / painel lateral ---------- */
.overlay { position: fixed; inset: 0; background: rgba(21, 36, 32, .45); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: var(--white); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal.wide { max-width: 760px; }
.modal .hd { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.modal .hd h2 { flex: 1; }
.modal .bd { padding: 20px 22px; }
.modal .ft { padding: 14px 22px; border-top: 1px solid var(--line-soft); display: flex; gap: 10px; justify-content: flex-end; background: var(--paper); border-radius: 0 0 14px 14px; }

/* ---------- Separadores ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; font: 600 14px var(--sans); color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs .on { color: var(--ink); border-bottom-color: var(--gold); }
.seg { display: inline-flex; background: var(--line-soft); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg a { border: 0; background: none; padding: 6px 12px; border-radius: 6px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; text-decoration: none; }
.seg .on { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* ---------- Sala: mapa de mesas ---------- */
.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 14px 14px 12px; cursor: pointer; min-height: 132px; display: flex; flex-direction: column; font: inherit; color: inherit; transition: transform .1s, box-shadow .15s; }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tile .lbl { font: 500 30px/1 var(--display); letter-spacing: -.02em; }
.tile .lbl small { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.tile .state { margin-top: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .state b { color: var(--text); font-weight: 600; }
.tile .pin { font: 500 19px/1 var(--mono); letter-spacing: .18em; color: var(--ink); background: var(--gold-wash); border: 1px dashed #e6c27a; border-radius: 6px; padding: 5px 7px; display: inline-block; margin-top: 8px; align-self: flex-start; }
.tile .flags { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.tile.free { background: var(--paper); border-style: dashed; }
.tile.open { border-color: var(--ink-3); box-shadow: inset 0 3px 0 var(--ink); }
.tile.locked { background: repeating-linear-gradient(-45deg, #f6f1e6, #f6f1e6 8px, #efe7d6 8px, #efe7d6 16px); }
.tile.inactive { opacity: .45; }
.tile.alert { border-color: var(--live); box-shadow: 0 0 0 2px var(--live-wash), inset 0 3px 0 var(--live); }
.tile.bill { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-wash), inset 0 3px 0 var(--gold); }
.tile.sel { outline: 2px solid var(--ink); outline-offset: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); display: inline-block; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 12px; align-items: flex-start; }
.feed li:last-child { border-bottom: 0; }
.feed .who { font: 500 20px/1 var(--display); min-width: 44px; }
.feed .what { flex: 1; min-width: 0; font-size: 13.5px; }
.feed .what b { font-weight: 600; }
.feed .when { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.feed li.hot { background: #fff7f8; }

.order-lines { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13.5px; }
.order-lines li { display: flex; gap: 8px; padding: 2px 0; }
.order-lines .q { font-family: var(--mono); color: var(--muted); min-width: 26px; }
.order-lines .n { flex: 1; }
.note { margin-top: 6px; padding: 6px 9px; background: var(--gold-wash); border-radius: 6px; font-size: 13px; color: #6e4a08; }

/* ---------- Cozinha ---------- */
.kds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kds .col h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 19px; }
.kds .col h2 .tag { font-family: var(--mono); }
.ticket { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.ticket .top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.ticket .top .t { font: 500 26px/1 var(--display); }
.ticket .top .age { margin-left: auto; font: 500 13px var(--mono); color: var(--muted); }
.ticket .top .age.late { color: var(--live); }
.ticket .order-lines { font-size: 15.5px; }
.ticket .order-lines .q { font-weight: 500; color: var(--ink); }
.ticket .go { margin-top: 12px; display: flex; gap: 8px; }
.ticket.new { border-left: 4px solid var(--live); }
.ticket.prep { border-left: 4px solid var(--gold); }
.ticket.done { opacity: .7; }

/* ---------- Gráficos simples ---------- */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.bars .b i { display: block; width: 100%; background: var(--ink-3); border-radius: 3px 3px 0 0; min-height: 1px; }
.bars .b.peak i { background: var(--gold); }
.bars .b span { font: 10px var(--mono); color: var(--muted); margin-top: 5px; white-space: nowrap; }
.bars .b em { font: 10px var(--mono); font-style: normal; color: var(--text); margin-bottom: 3px; }
.hbar { height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.hbar i { display: block; height: 100%; background: var(--gold); }

/* ---------- Menu (pratos) ---------- */
.thumb { width: 52px; height: 52px; border-radius: 8px; background: var(--line-soft) center/cover no-repeat; flex: none; display: grid; place-items: center; font: 500 18px var(--display); color: var(--muted); }
.swatch { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); padding: 0; cursor: pointer; }

/* ---------- Paginação ---------- */
.pager { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .pp { display: flex; gap: 4px; }

/* ---------- Entrada / páginas soltas ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth .art { background: var(--ink); color: #dfe8e2; padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth .art .wordmark { font-size: 30px; }
.auth .art h1 { color: #fff; font-size: clamp(32px, 4vw, 52px); max-width: 13ch; margin-top: auto; font-weight: 400; }
.auth .art h1 em { color: var(--gold); }
.auth .art p { max-width: 42ch; color: var(--sage); margin-top: 18px; }
.auth .art .ticketline { position: absolute; right: -60px; top: 90px; width: 300px; transform: rotate(8deg); background: var(--cream); color: var(--ink); border-radius: 6px; padding: 18px 20px; font: 13px/1.7 var(--mono); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); opacity: .96; }
.auth .art .ticketline hr { border: 0; border-top: 1px dashed #bfb39a; margin: 8px 0; }
.auth .art .foot { margin-top: 36px; font: 12px var(--mono); color: #7f9a8d; }
.auth .form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--paper); }
.auth .form .box { width: 100%; max-width: 380px; }
.auth .form h2 { font-size: 28px; margin-bottom: 6px; }
.demo-hint { margin-top: 22px; border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 13px; background: var(--white); }
.demo-hint code { font-family: var(--mono); font-size: 12.5px; }

.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.solo .box { max-width: 520px; width: 100%; }

.terminal { font: 500 11.5px/1 var(--mono); color: var(--muted); letter-spacing: .06em; }
.terminal::before { content: '›_ '; color: var(--gold); }

/* ---------- Ecrãs pequenos ---------- */
@media (max-width: 1180px) {
  .split { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kds { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 70; width: 270px; left: 0; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 16px 16px 0; }
  .content { padding: 16px 16px 40px; }
  .acting { padding: 8px 16px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .kds { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .auth { grid-template-columns: 1fr; }
  .auth .art { padding: 28px 24px; min-height: 220px; }
  .auth .art .ticketline { display: none; }
  .auth .art h1 { font-size: 30px; margin-top: 30px; }
  .radio-cards { grid-template-columns: 1fr; }
  .floor { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 24px; }
}

@media print {
  .side, .topbar .live, .no-print, .acting, .toast-wrap { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* correcções de alinhamento */
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
.tbl th.right, .tbl td.right { text-align: right; }
