/* Happy Hour Beer — Comandas. Cores do cardápio: preto, verde #00BF63, branco e madeira. */
:root {
  color-scheme: dark;
  --bg: #070707;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --surface-3: #232323;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f1;
  --text-2: #c3c2b7;
  --muted: #8a8882;
  --green: #00bf63;
  --green-hi: #19d877;
  --green-ink: #03150b;
  --green-soft: rgba(0, 191, 99, 0.12);
  --green-line: rgba(0, 191, 99, 0.45);
  --wood: #3d1c0c;
  --danger: #ef5a5a;
  --danger-soft: rgba(239, 90, 90, 0.12);
  --warn: #f5b129;
  --warn-soft: rgba(245, 177, 41, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font-display: "Oswald", "Bebas Neue", "Arial Narrow", system-ui, sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; }
body { min-height: 100dvh; overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green); }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.t2 { color: var(--text-2); }
.danger-text { color: var(--danger); }
.green-text { color: var(--green); }
.display { font-family: var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }

/* ---------------------------------------------------------------- topo */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; min-height: 60px;
  background: linear-gradient(rgba(20, 8, 2, 0.55), rgba(20, 8, 2, 0.75)), url("../img/wood.jpg") center / cover;
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.topbar .logo { height: 42px; border-radius: 8px; display: block; cursor: pointer; flex: none; }
.topbar .spacer { flex: 1; }
.topnav { display: none; gap: 4px; }
.topnav a {
  color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 999px;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 15px;
}
.topnav a.ativo, .topnav a:hover { background: rgba(0, 0, 0, 0.45); color: var(--text); }
.topnav a.ativo { color: var(--green); }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.5); border: 1px solid var(--border); cursor: pointer;
}
.user-chip .papel { font-size: 11px; color: var(--green); text-transform: uppercase; letter-spacing: .06em; }
.user-chip { min-width: 0; flex-shrink: 1; }
.user-chip > div:first-child { min-width: 0; }
.user-chip .avatar { flex: none; }
.user-chip .nome { font-weight: 600; font-size: 14px; max-width: min(120px, 30vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: var(--green-ink); font-weight: 800; font-size: 13px;
}
.alerta-imp svg { width: 16px; height: 16px; }
@media (max-width: 600px) { .alerta-imp .txt { display: none; } .user-chip .papel { display: none; } }
.alerta-imp {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239, 90, 90, .4); font-size: 13px; font-weight: 600;
  cursor: pointer;
}

/* ---------------------------------------------------------------- navegação inferior (mobile) */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(12, 12, 12, 0.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.ativo { color: var(--green); }

main#app { padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 1280px; margin: 0 auto; }

@media (min-width: 900px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  main#app { padding: 24px 24px 48px; }
  .topbar { padding: 8px 24px; }
}

/* ---------------------------------------------------------------- tipografia de página */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 28px; text-transform: uppercase; letter-spacing: .02em; }
.page-head .grow { flex: 1; }
.voltar {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
}
.section-title {
  font-family: var(--font-display); text-transform: uppercase; font-size: 15px; letter-spacing: .06em; color: var(--text-2);
  margin: 24px 0 10px; display: flex; align-items: center; gap: 8px;
}
.tag-green {
  display: inline-block; background: var(--green); color: var(--green-ink); font-family: var(--font-display);
  text-transform: uppercase; padding: 2px 10px; border-radius: 6px; font-size: 14px; letter-spacing: .04em;
}

/* ---------------------------------------------------------------- botões e campos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn.primary:hover { background: var(--green-hi); }
.btn.danger { background: var(--danger-soft); border-color: rgba(239, 90, 90, .45); color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; white-space: normal; text-align: center; line-height: 1.2; }
.btn.big { min-height: 54px; font-size: 17px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn svg { width: 20px; height: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-strong); outline: none; font-size: 16px;
}
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
textarea.input { min-height: 70px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.grid-2 > .btn { padding: 0 10px; white-space: normal; text-align: center; line-height: 1.15; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; min-height: 44px; cursor: pointer; }
.switch input { display: none; }
.switch .trilho { width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; }
.switch .trilho::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .trilho { background: var(--green); }
.switch input:checked + .trilho::after { transform: translateX(18px); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--text-2);
}
.chip.ativo { background: var(--green); color: var(--green-ink); border-color: var(--green); }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-2); }
.seg button.ativo { background: var(--surface-3); color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 48px; height: 48px; opacity: .5; margin-bottom: 8px; }

/* ---------------------------------------------------------------- login */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(ellipse at top, rgba(0, 191, 99, .14), transparent 55%), var(--bg); }
.login-card { width: 100%; max-width: 380px; }
.login-card .logo-big { width: 100%; border-radius: 16px; display: block; margin-bottom: 24px; box-shadow: var(--shadow); }
.login-card h2 { font-family: var(--font-display); text-transform: uppercase; margin: 0 0 4px; font-size: 22px; }
.login-card .sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.versao { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ---------------------------------------------------------------- mesas */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 38px; }
.resumo-topo { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--text-2); }
.pill b { color: var(--text); }

.mesas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
@media (max-width: 420px) { .mesas-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } }
.mesa {
  position: relative; aspect-ratio: 1 / 1; border-radius: 16px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: border-color .2s, background .2s; overflow: hidden;
}
.mesa:hover { border-color: var(--border-strong); }
.mesa .n { font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1; color: var(--muted); }
.mesa .info { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.25; }
.mesa.ocupada { background: linear-gradient(160deg, rgba(0, 191, 99, .22), rgba(0, 191, 99, .06)); border-color: var(--green-line); }
.mesa.ocupada .n { color: var(--text); }
.mesa.ocupada .info { color: var(--text-2); }
.mesa.ocupada .valor { font-size: 12px; font-weight: 700; color: var(--green-hi); }
.mesa .badge {
  position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--green); color: var(--green-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
@media (max-width: 420px) {
  .mesa .n { font-size: 24px; }
  .mesa .info { display: none; }
  .mesa .valor { font-size: 11px; }
  .mesa .valor .rs { display: none; }   /* sem "R$" o valor cabe no quadradinho */
  .mesa .badge { top: 3px; right: 3px; min-width: 18px; height: 18px; font-size: 11px; padding: 0 4px; }
}

/* ---------------------------------------------------------------- comandas */
.layout-mesa { display: grid; gap: 16px; }
@media (min-width: 1000px) { .layout-mesa { grid-template-columns: 1fr 360px; align-items: start; } }
.comanda-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.comanda-card + .comanda-card { margin-top: 10px; }
.comanda-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.comanda-head .nome { font-weight: 700; font-size: 17px; }
.comanda-head .meta { font-size: 12px; color: var(--muted); }
.comanda-head .saldo { margin-left: auto; text-align: right; }
.comanda-head .saldo b { font-size: 18px; display: block; }
.inicial {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--green-soft); color: var(--green); font-weight: 800; font-family: var(--font-display); font-size: 20px;
  border: 1px solid var(--green-line);
}
.comanda-acoes { display: flex; gap: 8px; padding: 0 16px 14px; flex-wrap: wrap; }

.itens { list-style: none; margin: 0; padding: 0; }
.itens li { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.itens li:last-child { border-bottom: 0; }
.itens .q { min-width: 34px; font-weight: 700; color: var(--green); }
.itens .desc { flex: 1; min-width: 0; }
.itens .desc .nm { font-weight: 600; }
.itens .desc .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.itens .v { font-weight: 600; white-space: nowrap; }
.itens li.cancelado .nm, .itens li.cancelado .v { text-decoration: line-through; color: var(--muted); }
.itens li.pago .v::after { content: " ✓"; color: var(--green); }
.badge-mini { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); margin-left: 4px; vertical-align: middle; }
.badge-mini.green { background: var(--green-soft); color: var(--green); }
.badge-mini.red { background: var(--danger-soft); color: var(--danger); }

.totais { display: grid; gap: 6px; padding: 14px 16px; background: var(--surface-2); border-top: 1px solid var(--border); }
.totais .l { display: flex; justify-content: space-between; color: var(--text-2); font-size: 14px; }
.totais .l.big { color: var(--text); font-size: 20px; font-weight: 800; margin-top: 4px; }
.totais .l.big span:last-child { color: var(--green-hi); }

.painel-lateral { position: sticky; top: 84px; }

/* ---------------------------------------------------------------- pedido */
.layout-pedido { display: grid; gap: 16px; }
.layout-pedido > *, .layout-mesa > * { min-width: 0; }
@media (min-width: 1000px) { .layout-pedido { grid-template-columns: 1fr 380px; align-items: start; } }
.cats-sticky { position: sticky; top: 60px; z-index: 5; background: var(--bg); padding: 8px 0 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
@media (min-width: 900px) { .cats-sticky { margin: 0; padding-left: 0; padding-right: 0; top: 60px; } }
.produtos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.produto {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-align: left; width: 100%;
  transition: border-color .15s;
}
.produto:hover { border-color: var(--green-line); }
.produto .pn { font-weight: 600; line-height: 1.2; }
.produto .pd { font-size: 12px; color: var(--muted); margin-top: 2px; }
.produto .pp { margin-left: auto; font-family: var(--font-display); font-size: 18px; color: var(--text); white-space: nowrap; }
.produto .qbadge { min-width: 26px; height: 26px; border-radius: 999px; background: var(--green); color: var(--green-ink); font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; }
.cat-titulo { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 10px; display: flex; align-items: center; gap: 10px; }
.cat-titulo .setor { font-family: var(--font); text-transform: none; font-size: 12px; color: var(--muted); letter-spacing: 0; }

.carrinho { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.carrinho-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.carrinho-body { padding: 4px 16px; max-height: 55vh; overflow: auto; }
.carrinho-foot { padding: 14px 16px; border-top: 1px solid var(--border); }
.linha-cart { padding: 12px 0; border-bottom: 1px solid var(--border); }
.linha-cart:last-child { border-bottom: 0; }
.linha-cart .top { display: flex; align-items: center; gap: 8px; }
.linha-cart .nm { flex: 1; font-weight: 600; min-width: 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 18px; font-weight: 700; }
.stepper span { min-width: 30px; text-align: center; font-weight: 700; }
.linha-cart .extras { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.linha-cart .para { font-size: 12px; color: var(--text-2); margin-top: 6px; }

.cart-fab {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 25;
  display: flex; align-items: center; gap: 12px; padding: 0 18px; min-height: 58px; border-radius: 16px;
  background: var(--green); color: var(--green-ink); border: 0; font-weight: 800; font-size: 16px; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 191, 99, .35);
}
.cart-fab svg { width: 24px; height: 24px; flex: none; }
@media (max-width: 999px) { .layout-pedido { padding-bottom: 76px; } }
.cart-fab .qt { background: var(--green-ink); color: var(--green); border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; }
.cart-fab .tt { margin-left: auto; }
@media (min-width: 1000px) { .cart-fab { display: none; } .so-mobile { display: none !important; } }
@media (max-width: 999px) { .so-desktop { display: none !important; } }

.fly-dot { position: fixed; z-index: 100; width: 16px; height: 16px; border-radius: 50%; background: var(--green); pointer-events: none; box-shadow: 0 0 12px var(--green); }

/* ---------------------------------------------------------------- folha (modal) */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .62); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + var(--safe-b));
  box-shadow: var(--shadow);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--surface-3); margin: 4px auto 12px; }
.sheet h3 { margin: 0 0 4px; font-family: var(--font-display); text-transform: uppercase; font-size: 22px; letter-spacing: .02em; }
.sheet .sheet-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.sheet .acoes { display: flex; gap: 10px; margin-top: 18px; }
.sheet .acoes .btn { flex: 1; }
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; padding: 18px 22px 22px; }
  .sheet .grab { display: none; }
}
.lista-check { display: grid; gap: 8px; }
.lista-check label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.lista-check input { width: 20px; height: 20px; accent-color: var(--green); }
.lista-check label:has(input:checked) { border-color: var(--green-line); background: var(--green-soft); }
.formas { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.formas button { min-height: 52px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; font-weight: 700; }
.formas button.ativo { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.total-destaque { text-align: center; padding: 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.total-destaque .lbl { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.total-destaque .val { font-family: var(--font-display); font-size: 40px; color: var(--green-hi); line-height: 1.1; }
.total-destaque .det { font-size: 13px; color: var(--text-2); }

/* ---------------------------------------------------------------- toast */
.toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: 72px; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #1f1f1f; border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-weight: 600; font-size: 15px; }
.toast .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 14px; }
.toast.ok .ic { background: var(--green); color: var(--green-ink); }
.toast.erro .ic { background: var(--danger); color: #fff; }
.toast.info .ic { background: var(--surface-3); }

/* ---------------------------------------------------------------- tabelas */
.tabela-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th, .tabela td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabela th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.tabela td.r, .tabela th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .barra-inline { height: 6px; border-radius: 3px; background: var(--green); min-width: 2px; }

/* ---------------------------------------------------------------- relatórios */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.kpi .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .val { font-size: clamp(17px, 5.4vw, 24px); font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; }
.kpi .det { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.kpi.destaque { border-color: var(--green-line); background: linear-gradient(160deg, rgba(0, 191, 99, .16), var(--surface)); }
.graficos { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 1000px) { .graficos.duas { grid-template-columns: 1fr 1fr; } }
.graficos > .card { margin-top: 0; }
.grafico { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; position: relative; min-width: 0; }
.grafico h4 { margin: 0 0 2px; font-size: 15px; }
.grafico .gsub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.grafico svg { display: block; width: 100%; overflow: visible; }
.grafico .grid-line { stroke: #2c2c2a; stroke-width: 1; }
.grafico .baseline { stroke: #383835; stroke-width: 1; }
.grafico .tick { fill: #898781; font-size: 11px; font-variant-numeric: tabular-nums; }
.grafico .bar { fill: var(--green); pointer-events: none; } /* o toque vai para a área .hit, que cobre a barra */
.grafico .bar.dim { fill: rgba(0, 191, 99, .35); }
.grafico .hit { fill: transparent; cursor: pointer; }
.grafico .hit:hover + .bar, .grafico .bar.hover { fill: var(--green-hi); }
.grafico .lbl-val { fill: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.grafico .lbl-cat { fill: var(--text); font-size: 13px; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; background: #0b0b0b; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap;
}
.tooltip b { display: block; font-size: 14px; color: var(--text); }
.filtro-periodo { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filtro-periodo .input { width: auto; min-height: 40px; padding: 6px 10px; }

/* ---------------------------------------------------------------- admin */
.lista-admin { display: grid; gap: 8px; }
.item-admin { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.item-admin.inativo { opacity: .5; }
/* Cardápio no celular pequeno: nome em cima; preço, disponível e editar embaixo, à direita. */
@media (max-width: 420px) {
  .item-admin.linha-produto { flex-wrap: wrap; row-gap: 6px; }
  .item-admin.linha-produto .grow { flex-basis: 100%; }
  .item-admin.linha-produto .grow + * { margin-left: auto; }
  /* Fila de impressão: título do cupom na 1ª linha; Ver e Reenviar embaixo, à direita. */
  .item-admin.linha-job { flex-wrap: wrap; row-gap: 6px; }
  .item-admin.linha-job .grow { flex-basis: calc(100% - 22px); }
  .item-admin.linha-job .grow + * { margin-left: auto; }
  .section-title { flex-wrap: wrap; }
}
.item-admin .grow { flex: 1; min-width: 0; }
.item-admin .t { font-weight: 600; }
.item-admin .s { font-size: 12px; color: var(--muted); }
.pre-cupom { background: #f7f5ee; color: #111; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11px; line-height: 1.35; padding: 12px; border-radius: 8px; white-space: pre; overflow-x: auto; max-height: 340px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.status-dot.ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.off { background: var(--danger); }
.status-dot.pend { background: var(--warn); }
.token-box { font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); word-break: break-all; }

/* ---------------------------------------------------------------- impressão do navegador (extrato 80mm) */
#area-impressao { display: none; }
@media print {
  @page { size: 80mm auto; margin: 3mm; }
  body * { visibility: hidden !important; }
  #area-impressao, #area-impressao * { visibility: visible !important; }
  #area-impressao { display: block !important; position: absolute; left: 0; top: 0; width: 74mm; color: #000; background: #fff;
    font-family: ui-monospace, Consolas, monospace; font-size: 11px; white-space: pre-wrap; }
  html, body { background: #fff !important; }
}

/* Telas de toque: nada menor que 40px de altura para o dedo acertar de primeira. */
@media (pointer: coarse) {
  .btn.small { min-height: 40px; }
  .seg button { min-height: 40px; }
  .chip { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
