:root {
  --navy: #0f1b2d;
  --navy-2: #1b2a41;
  --accent: #ff6b2c;
  --accent-ink: #fff;
  --bg: #f4f6f9;
  --surface: #fff;
  --ink: #18212f;
  --muted: #667085;
  --line: #e4e7ec;
  --ok: #12a150;
  --warn: #f5a524;
  --danger: #e5484d;
  --info: #2f6fed;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); min-height: 100vh; font-size: 15px; line-height: 1.45; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
a { color: var(--info); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 14px;
  text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-danger { color: var(--danger); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 18px; font-size: 16px; border-radius: 12px; }

/* Formulários */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #344054; }
.input {
  width: 100%; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 10px;
  background: #fff; outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
textarea.input { resize: vertical; min-height: 64px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #344054; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.error-box { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; padding: 10px 12px; border-radius: 10px; font-size: 14px; }

/* Cartões e badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: #f2f4f7; color: #344054; white-space: nowrap;
}
.badge-ok { background: #e7f8ee; color: #0b7a3b; }
.badge-warn { background: #fff4e0; color: #9a5b00; }
.badge-danger { background: #fde8e8; color: #b42318; }
.badge-info { background: #e8f0fe; color: #1d4fbf; }
.badge-alc { background: #fff1e6; color: #b54708; }

/* Topo dos painéis */
.topbar {
  background: var(--navy); color: #fff; padding: 0 20px; height: 60px;
  display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; font-size: 17px; color: #fff; text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent);
  display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #fff;
}
.topbar .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: #fff; }
.topbar .sep { width: 1px; height: 24px; background: rgba(255, 255, 255, .15); }
.topbar .who { font-size: 13px; opacity: .8; }
@media (max-width: 700px) { .topbar .who, .topbar .sep { display: none; } }

.tabs { display: flex; gap: 4px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 60px; z-index: 15; }
.tab {
  border: 0; background: none; padding: 14px 12px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
}
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab .count { background: var(--danger); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; }
.tab .count:empty, .tab .count[data-n="0"] { display: none; }

.page { padding: 20px; max-width: 1400px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { font-size: 20px; }

.notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.notice-warn { background: #fffaeb; border-color: #fedf89; color: #93370d; }
.notice-danger { background: #fef3f2; border-color: #fecdca; color: #b42318; }

/* Estatísticas */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 24px; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }

/* Tabela */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f9fafb; }
table.data th, table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }

/* Kanban de pedidos */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #eaedf2; border-radius: var(--radius); padding: 10px; min-height: 300px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: 14px; }
.col-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.col-head .n { margin-left: auto; background: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; }
.col .empty { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 8px; }
.order { background: var(--surface); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); margin-bottom: 10px; border-left: 4px solid var(--line); }
.order.new { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { box-shadow: 0 0 0 3px var(--accent); } }
.order-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.order-head .table-no { font-weight: 800; font-size: 16px; }
.order-head .time { margin-left: auto; font-size: 12px; color: var(--muted); }
.order ul { margin: 6px 0; padding: 0; list-style: none; font-size: 14px; }
.order li { padding: 2px 0; }
.order li .q { font-weight: 800; margin-right: 4px; }
.order li .n { display: block; font-size: 12px; color: #b54708; padding-left: 20px; }
.order .note { background: #fffaeb; border-radius: 8px; padding: 6px 8px; font-size: 13px; margin: 6px 0; }
.idcheck { background: #fff1e6; border: 1px dashed #f79009; color: #93370d; border-radius: 8px; padding: 6px 8px; font-size: 12.5px; margin: 6px 0; }
.order-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.order-foot .total { font-weight: 700; margin-right: auto; font-size: 14px; }

/* Alertas de garçom */
.calls-bar { display: grid; gap: 8px; margin-bottom: 16px; }
.call {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px;
  background: #fff4e5; border: 2px solid var(--warn); animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { background: #ffe2b8; } }
.call .big { font-size: 20px; font-weight: 800; }

/* Mesas */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.tcard.busy { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.tcard h3 { font-size: 18px; }
.tcard .amount { font-size: 20px; font-weight: 800; }

/* Cardápio (painel) */
.menu-cat { margin-bottom: 18px; }
.menu-cat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.menu-cat-head h3 { font-size: 16px; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d0d5dd; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(16px); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 27, 45, .5); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); }

/* Toast */
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: 14px; animation: slide .25s ease; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }

/* Landing / login */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: radial-gradient(circle at 20% 20%, #23395b, var(--navy) 60%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero h1 { font-size: 40px; letter-spacing: -.03em; margin: 28px 0 12px; max-width: 520px; }
.auth-hero p { opacity: .8; max-width: 480px; font-size: 16px; }
.auth-hero ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-hero li { display: flex; gap: 10px; align-items: center; opacity: .92; }
.auth-hero li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); font-size: 12px; font-weight: 900; flex: none; }
.auth-side { display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 440px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #eaedf2; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.seg button { border: 0; background: none; padding: 9px; border-radius: 8px; font-weight: 700; color: var(--muted); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 20px; }
  .auth-hero h1 { font-size: 28px; margin-top: 18px; }
  .auth-hero ul { display: none; }
}

/* Impressão de QR Codes */
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.qr-card { background: #fff; border: 2px solid var(--qr, var(--accent)); border-radius: 18px; padding: 20px; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.qr-card .rname { font-weight: 800; font-size: 17px; }
.qr-card .mesa { font-size: 30px; font-weight: 900; color: var(--qr, var(--accent)); margin: 4px 0 10px; letter-spacing: -.02em; }
.qr-card img { width: 100%; max-width: 210px; image-rendering: pixelated; }
.qr-card .hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; }
  .qr-sheet { grid-template-columns: repeat(3, 1fr); gap: 10mm; }
}

/* Matriz de permissões */
table.data.perm-matrix th, table.data.perm-matrix td { text-align: center; }
table.data.perm-matrix th:first-child, table.data.perm-matrix td:first-child { text-align: left; min-width: 260px; }
table.data.perm-matrix th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); vertical-align: top; }
.perm-matrix tr.group td { background: #f9fafb; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.perm-matrix input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.perm-matrix input:disabled { cursor: not-allowed; opacity: .6; }

/* Extrato / conta */
.bill-lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.bill-lines td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.bill-lines td.q { width: 36px; font-weight: 700; }
.bill-lines td.v { text-align: right; white-space: nowrap; }
.bill-totals { display: grid; gap: 6px; font-size: 14px; }
.bill-totals .row { flex-wrap: nowrap; }
.bill-totals .total { font-size: 18px; border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 2px; }
.notice-info { background: #eef4ff; border-color: #c7d7fe; color: #1d4fbf; }
.notice-ok { background: #ecfdf3; border-color: #abefc6; color: #067647; }

/* Lista de compras */
.shop-list { display: grid; gap: 8px; }
.shop-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 10px; padding: 12px 14px; }
.shop-item.done { border-left-color: var(--ok); opacity: .8; }
.shop-item .meta { font-size: 13px; color: var(--muted); }
.stock-input { width: 100px; padding: 6px 10px; }
.pick-list { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.pick-list .cat { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin: 8px 0 4px; }
.pick-list label { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px; }

/* Área do proprietário */
.g-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 60px); }
.g-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.g-nav .g-group { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 6px; }
.g-nav button { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; font-weight: 600; color: #344054; }
.g-nav button:hover { background: #f2f4f7; }
.g-nav button.active { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--ink); }
.g-nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; }
.g-nav .count:empty { display: none; }
.g-main { padding: 22px; min-width: 0; max-width: 1280px; }
@media (max-width: 860px) {
  .g-layout { grid-template-columns: 1fr; }
  .g-nav { position: sticky; top: 60px; height: auto; display: flex; overflow-x: auto; padding: 6px 10px; border-right: 0; border-bottom: 1px solid var(--line); z-index: 10; }
  .g-nav .g-group { display: none; }
  .g-nav button { width: auto; white-space: nowrap; }
  .g-main { padding: 16px; }
}
.grid-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.panel h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.stat small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.alert b { color: var(--danger); }
.stat.good b { color: var(--ok); }
.period { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.period .input { width: auto; padding: 7px 10px; }
.seg-inline { display: inline-flex; background: #eaedf2; border-radius: 10px; padding: 3px; }
.seg-inline button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 700; color: var(--muted); }
.seg-inline button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.meter { height: 8px; border-radius: 4px; background: #eef1f5; overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--chart); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-plain li:last-child { border-bottom: 0; }

/* Gráfico de barras (uma série) */
:root { --chart: #2f6fed; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: #e9ecf1; stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .bar path { fill: var(--chart); }
.chart .bar:hover path, .chart .bar.on path { fill: #1d4fbf; }
.chart .bar rect { fill: transparent; cursor: default; }
.chart-tip { position: absolute; pointer-events: none; background: var(--navy); color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.chart-tip b { display: block; font-size: 13.5px; }
.link-btn { border: 0; background: none; color: var(--info); font-weight: 600; font-size: 13px; padding: 0; cursor: pointer; }

/* Rodízio de garçons */
.queue-list { display: flex; flex-wrap: wrap; gap: 8px; }
.queue-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; background: #fff; }
.queue-chip.next { border-color: var(--ok); background: #ecfdf3; }
.queue-chip.off { color: var(--muted); background: #f9fafb; }
.queue-chip .pos { font-weight: 800; }
.tcard.mine { box-shadow: 0 0 0 2px var(--ok); }
.waiter-tag { font-size: 12.5px; color: #344054; }
.call.escalated { border-color: var(--danger); }
.topbar .btn.on-duty { background: rgba(18, 161, 80, .25); border-color: rgba(18, 161, 80, .6); }

/* =====================================================================
   Identidade visual Gestão 360º
   Preto #111111 · Grafite #343434 · Branco · Dourado #C9A227 · Vermelho #B3261E
   Montserrat (títulos e números) · Inter (textos e interface) · DM Mono (rótulos e indicadores)
   ===================================================================== */
:root {
  --black: #111111;
  --graphite: #343434;
  --gold: #C9A227;
  --gold-light: #E2C766;
  --gold-dark: #8A6D12;       /* dourado legível sobre fundo claro */
  --red: #B3261E;
  --red-dark: #7D1814;
  --offwhite: #F5F3EE;
  --gray-light: #E9E9E7;
  --gray: #777777;

  --navy: var(--black);
  --navy-2: var(--graphite);
  --accent: var(--gold);
  --accent-ink: var(--black);
  --bg: var(--offwhite);
  --ink: var(--black);
  --muted: #6b6b6b;
  --line: var(--gray-light);
  --danger: var(--red);
  --warn: #B7791F;
  --ok: #1E7F4F;
  --info: var(--gold-dark);
  --chart: #A8861A;           /* validado: contraste >= 3:1 sobre branco */
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .05), 0 6px 18px rgba(17, 17, 17, .05);
  --font-title: "Montserrat", system-ui, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-family: var(--font-text);
}
body { font-family: var(--font-text); color: var(--ink); }
h1 { font-family: var(--font-title); font-weight: 800; letter-spacing: -.02em; }
h2 { font-family: var(--font-title); font-weight: 700; letter-spacing: -.01em; }
h3 { font-family: var(--font-title); font-weight: 600; }
a { color: var(--gold-dark); }
.field > span, .check { color: var(--graphite); }

/* Números e indicadores */
.stat b, .tcard .amount, .order-foot .total, .amount, .bill-totals .total b { font-family: var(--font-title); font-weight: 700; letter-spacing: -.01em; }
.stat span, table.data th, .g-nav .g-group, .order-head .badge, .order-head .time, .col-head .n,
.chart .axis text, .tab .count, .g-nav .count, .queue-chip .pos, code {
  font-family: var(--font-mono);
}
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat { border-radius: var(--radius); border-color: var(--line); }
.stat.good b, .pos { color: var(--gold-dark); }
.stat.alert b, .neg { color: var(--red); }
table.data th { font-size: 11px; letter-spacing: .06em; color: var(--muted); background: #FAF9F6; }

/* Botões: principal preto, secundário dourado, atenção vermelho */
.btn { border-radius: 10px; font-family: var(--font-text); }
.btn-primary { background: var(--black); border-color: var(--black); color: #fff; }
.btn-primary:hover { background: var(--graphite); filter: none; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--black); }
.btn-dark { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.btn-danger { color: var(--red); }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .22); }
.check input, .switch input { accent-color: var(--black); }
.switch input:checked + span { background: var(--black); }

/* Badges e avisos */
.badge { font-weight: 600; }
.badge-info { background: #F6EDCB; color: #5C470B; }
.badge-ok { background: #E6F2EB; color: #1E6B43; }
.badge-danger { background: #F7E3E1; color: var(--red-dark); }
.badge-warn { background: #FBF1DA; color: #7A5410; }
.notice-info { background: #FAF4E1; border-color: var(--gold-light); color: #5C470B; }
.error-box { background: #F9E9E7; color: var(--red-dark); border-color: #EBC2BE; }
.toast { background: var(--black); border-left: 3px solid var(--gold); }
.toast.error { background: var(--red); border-left-color: var(--red-dark); }
.toast.ok { background: var(--graphite); border-left-color: var(--gold); }

/* Topo, abas e marca */
.topbar { background: var(--black); box-shadow: inset 0 -1px 0 rgba(201, 162, 39, .55); }
.brand { font-family: var(--font-title); font-weight: 700; letter-spacing: -.01em; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; display: block; flex: none; }
.topbar .btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.topbar .btn:hover { border-color: var(--gold); }
.tab { font-family: var(--font-text); }
.tab.active { border-bottom-color: var(--gold); color: var(--black); }
.tab .count { background: var(--red); }
.seg button.active, .seg-inline button.active { color: var(--black); }

/* Área do proprietário */
.g-nav button.active { background: var(--offwhite); color: var(--black); box-shadow: inset 3px 0 0 var(--gold); }
.g-nav .count { background: var(--red); }
.panel, .card, .tcard, .order { border-radius: var(--radius); }
.chart .bar:hover path, .chart .bar.on path { fill: #7A6212; }
.chart-tip { background: var(--black); border-top: 2px solid var(--gold); }

/* Operação */
.col { background: #ECEAE4; }
.call { background: #FBF6E6; border-color: var(--gold); animation: pulse-gold 1.6s infinite; }
@keyframes pulse-gold { 50% { background: #F3E6BA; } }
.call.escalated { border-color: var(--red); background: #F9E9E7; animation: none; }
.idcheck { background: #FBF1DA; border-color: var(--gold); color: #5C470B; }
.order .note { background: #FAF6EA; }
.tcard.mine { box-shadow: 0 0 0 2px var(--gold); }
.tcard.busy { border-color: var(--gold-light); }
.queue-chip.next { border-color: var(--gold); background: #FAF4E1; }
.topbar .btn.on-duty { background: rgba(201, 162, 39, .18); border-color: var(--gold); }

/* Login e cadastro */
.auth-hero { background: var(--black); position: relative; overflow: hidden; }
.auth-hero > * { position: relative; z-index: 1; }
/* Elemento proprietário: arcos 360º saindo da composição */
.auth-hero::before, .auth-hero::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(201, 162, 39, .28); z-index: 0; }
.auth-hero::before { width: 620px; height: 620px; right: -260px; bottom: -220px; }
.auth-hero::after { width: 380px; height: 380px; right: -140px; bottom: -100px; border-color: rgba(201, 162, 39, .16); }
.auth-hero h1 { font-size: 46px; line-height: 1.08; }
.auth-hero .gold { color: var(--gold); }
.auth-hero .kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
.auth-hero li { gap: 12px; }
.auth-hero li::before { content: none; }
.auth-hero li .num { font-family: var(--font-mono); font-size: 12px; color: var(--gold); min-width: 30px; }
.auth-hero .logo-big { width: 96px; height: 96px; border-radius: 16px; }
.auth-hero .red-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 4px; vertical-align: middle; }
@media (max-width: 900px) { .auth-hero h1 { font-size: 30px; } .auth-hero .logo-big { width: 64px; height: 64px; } }
.auth-hero { gap: 24px; }
.seg, .seg-inline { background: #ECEAE4; }
/* Indicadores sempre em grade organizada: 4 por linha, 2×2 em telas médias, 1 no celular */
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }
/* Topo sem rolagem lateral na página: os itens não encolhem e o próprio topo rola em telas estreitas */
.topbar { overflow-x: auto; scrollbar-width: none; }
.topbar::-webkit-scrollbar { display: none; }
.topbar > * { flex: none; }
.topbar .spacer { flex: 1; }
.topbar .who { white-space: nowrap; }
@media (max-width: 1100px) { .topbar #today, .topbar .sep { display: none; } }
@media (max-width: 900px) { .topbar .who { display: none; } .topbar #rname { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* Modo suporte (acesso remoto da equipe Gestão 360º) */
.support-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--red); color: #fff; padding: 10px 16px; font-size: 13.5px; box-shadow: 0 -4px 16px rgba(0, 0, 0, .2); }
.support-bar .btn { background: #fff; color: var(--red); border-color: #fff; }
body.support-mode { padding-bottom: 70px; }
body.support-mode #toasts { bottom: 80px; }
