/* Beach Club Passo Fundo — painel escuro em tons de azul */
:root {
  --bg: #070F2B;          /* azul-marinho profundo */
  --surface: #0D1838;     /* cards */
  --surface-2: #14224A;   /* campos e itens sobre cards */
  --surface-3: #1B2C5C;   /* hover */
  --line: #24356A;
  --line-soft: #1A2752;
  --text: #EEF2FF;
  --muted: #9AA6CC;
  --brand: #2F4BFF;       /* azul principal */
  --brand-hi: #7B8CFF;
  --brand-ink: #FFFFFF;   /* texto sobre o azul */
  --brand-soft: rgba(47, 75, 255, .18);
  --free: #3FCB8E;  --free-soft: rgba(63, 203, 142, .15);
  --res: #F2B84B;   --res-soft: rgba(242, 184, 75, .15);
  --occ: #F0654F;   --occ-soft: rgba(240, 101, 79, .16);
  --neutral-soft: rgba(162, 162, 167, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 28px -16px rgba(0, 0, 0, .7);
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--brand-hi); }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-hi); outline-offset: 2px; border-radius: 6px; }

/* ---------- Topo ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid #25252E; }
.topbar-row { display: flex; align-items: center; gap: 14px; padding: 10px 20px; max-width: 1600px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.wordmark { font-weight: 700; font-size: 1.05rem; line-height: .98; letter-spacing: -.01em; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 8px; font-size: .96rem; border-radius: 8px; white-space: nowrap; font-weight: 500; position: relative; }
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; font-weight: 600; }
.nav a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--brand); }
.userbox { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.shift-btn { border: 1px solid var(--line); background: transparent; color: var(--text); padding: 7px 12px; border-radius: 8px; font: inherit; font-size: .9rem; cursor: pointer; }
.shift-btn.on { border-color: var(--brand); background: var(--brand-soft); }
.user-btn { background: var(--surface-2); color: #fff; border: 0; padding: 8px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
@media (max-width: 900px) {
  .topbar-row { flex-wrap: wrap; padding: 8px 12px; gap: 10px; }
  .nav { order: 3; flex-basis: 100%; }
  .userbox { margin-left: auto; }
  .shift-btn .shift-label { display: none; }
}

main { max-width: 1600px; margin: 0 auto; padding: 20px; }
@media (max-width: 600px) { main { padding: 12px; } }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: transparent; color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hi); border-color: var(--brand-hi); }
.btn.danger { color: var(--occ); border-color: rgba(240, 101, 79, .45); }
.btn.danger.solid { background: var(--occ); color: #1E0B07; border-color: var(--occ); }
.btn.big { min-height: 54px; font-size: 1.05rem; padding: 12px 20px; }
.btn.sm { min-height: 34px; padding: 5px 10px; font-size: .9rem; }
.btn.block { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-size: .95rem; text-decoration: none;
}
.icon-btn:hover { border-color: var(--muted); background: var(--surface-2); }

label.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .92rem; }
label.field .hint, label.field > span.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 44px; width: 100%;
}
input::placeholder, textarea::placeholder { color: #85858D; }
input:disabled { color: var(--muted); }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid rgba(47, 75, 255, .25); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; color: var(--muted); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }

/* ---------- Painéis ---------- */
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; border-left: 3px solid var(--line); }
.panel .kpi { background: var(--surface-2); }
main > .kpis .kpi { background: var(--surface); }
.kpi b { display: block; font-size: 1.45rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi.good { border-left-color: var(--brand); }
.kpi.warn { border-left-color: var(--res); }
.kpi.bad { border-left-color: var(--occ); }

/* ---------- Cards de quadra ---------- */
.courts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
@media (min-width: 1380px) { .courts { grid-template-columns: repeat(5, minmax(0, 1fr)); } .facts { font-size: .86rem; } }
.court {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; position: relative; min-height: 250px; overflow: hidden;
}
.court::before { content: ""; height: 6px; background: var(--free); }
.court.reservada::before { background: var(--res); }
.court.ocupada::before { background: var(--occ); }
.court-head { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 8px; }
.court-num { font-weight: 800; font-size: 4rem; line-height: .82; color: #fff; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.court-num small { display: block; font-size: .78rem; letter-spacing: 0; color: var(--muted); font-weight: 600; line-height: 1.5; }
.court-title { flex: 1; min-width: 0; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .84rem;
  background: var(--free-soft); color: var(--free);
}
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.reservada { background: var(--res-soft); color: var(--res); }
.status-pill.ocupada { background: var(--occ-soft); color: var(--occ); }
.status-pill.cancelada, .status-pill.fechada { background: var(--neutral-soft); color: var(--muted); }
.pend-flag { display: inline-flex; margin-top: 6px; padding: 2px 8px; border-radius: 6px; background: var(--occ); color: #1E0B07; font-size: .78rem; font-weight: 700; }
.court-time { white-space: nowrap; font-size: 1.2rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.court-body { padding: 0 14px 10px; flex: 1; }
.resp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.phone { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--muted); font-size: .92rem; }
.phone a { color: var(--muted); text-decoration: none; }
.phone a:hover { color: var(--brand-hi); text-decoration: underline; }
.phone .mini { border: 0; background: transparent; cursor: pointer; padding: 3px 5px; border-radius: 6px; font-size: .9rem; color: var(--muted); }
.phone .mini:hover { background: var(--surface-2); }
.facts { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 10px 0 0; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { white-space: nowrap; margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts .sep { grid-column: 1 / -1; border-top: 1px dashed var(--line); margin: 5px 0; }
.facts .total { font-weight: 700; color: var(--text); font-size: 1rem; }
.money-trigger { border: 0; background: transparent; font: inherit; font-weight: 700; cursor: pointer; padding: 0 2px; border-bottom: 1px dotted currentColor; font-variant-numeric: tabular-nums; }
.money-trigger.paid { color: var(--free); }
.money-trigger.pending { color: var(--occ); }
.money-trigger.zero { color: var(--muted); }
.court-foot { padding: 10px 14px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.court-foot .btn { flex: 1 1 130px; min-width: 0; padding-left: 10px; padding-right: 10px; }
.court-empty { color: var(--muted); padding: 6px 0 4px; }
.upcoming { margin-top: 8px; font-size: .85rem; color: var(--muted); }
.upcoming b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Popover de pagamentos ---------- */
.popover {
  position: fixed; z-index: 60; background: #0F1B40; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  min-width: 240px; max-width: min(360px, calc(100vw - 20px)); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8); font-size: .92rem;
}
.popover h4 { margin: 0 0 8px; font-size: 1.05rem; }
.popover ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.popover li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; }
.popover li .meta { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
.popover .empty { color: var(--muted); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .84rem; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
tr.canceled td { color: var(--muted); text-decoration: line-through; }
tr.canceled td.keep { text-decoration: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .8rem; font-weight: 700; background: var(--neutral-soft); color: var(--muted); white-space: nowrap; }
.tag.pix { background: var(--brand-soft); color: var(--brand-hi); }
.tag.cartao { background: rgba(160, 140, 230, .16); color: #BBA9F5; }
.tag.dinheiro { background: var(--free-soft); color: var(--free); }
.tag.ok { background: var(--free-soft); color: var(--free); }
.tag.warn { background: var(--res-soft); color: var(--res); }
.tag.bad { background: var(--occ-soft); color: var(--occ); }
.lvl { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lvl::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #6E6E78; }
.lvl.normal::before { background: var(--free); }
.lvl.atencao::before { background: var(--res); }
.lvl.critico::before { background: var(--occ); }
.lvl.critico { color: var(--occ); }

/* ---------- Comanda ---------- */
.tab-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .tab-layout { grid-template-columns: 1fr; } }
.tab-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tab-hero .court-num { font-size: 3.4rem; }
.tab-hero .info { flex: 1; min-width: 220px; }
.tab-hero .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.person-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.person-row:last-of-type { border-bottom: 0; }
.person-name { font-weight: 700; }
.person-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.flag { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--muted); min-height: 30px; }
.flag.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.flag:disabled { cursor: default; }
.person-money { text-align: right; font-size: .88rem; font-variant-numeric: tabular-nums; line-height: 1.35; color: var(--muted); }
.person-money b { font-size: 1rem; color: var(--text); }
.person-money .pend { color: var(--occ); font-weight: 700; }
.person-money .done { color: var(--free); font-weight: 700; }
@media (max-width: 560px) { .person-row { grid-template-columns: 1fr auto; } .person-row .pay-col { grid-column: 1 / -1; } .person-row .pay-col .btn { width: 100%; } }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 40px; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.prod-tile { border: 1px solid var(--line-soft); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 10px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 74px; }
.prod-tile:hover { border-color: var(--brand); background: var(--surface-3); }
.prod-tile:active { transform: scale(.98); }
.prod-tile b { font-weight: 600; line-height: 1.2; }
.prod-tile span { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.prod-tile.low span.st { color: var(--occ); font-weight: 600; }
.prod-tile:disabled { opacity: .4; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }

.summary { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-variant-numeric: tabular-nums; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .big { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.summary .paid dd { color: var(--free); }
.summary .pending dd { color: var(--occ); }
.summary .sep { grid-column: 1/-1; border-top: 1px solid var(--line); }

.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.history li { border-left: 3px solid var(--line); padding-left: 10px; }
.history .when { color: var(--muted); font-variant-numeric: tabular-nums; }

.alert { border-radius: var(--radius-sm); padding: 12px 14px; background: var(--res-soft); color: #F6D48E; border: 1px solid rgba(242, 184, 75, .3); margin-bottom: 14px; }
.alert a { color: #fff; }
.alert.bad { background: var(--occ-soft); color: #F8B1A5; border-color: rgba(240, 101, 79, .35); }
.alert.info { background: var(--brand-soft); color: #B9C6FF; border-color: rgba(47, 75, 255, .35); }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(12, 16, 20, .72); z-index: 50; display: flex; align-items: flex-start; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 12px 24px; overflow-y: auto;
}
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 560px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.modal-body { padding: 10px 18px 18px; }
.modal-body .panel { background: transparent; box-shadow: none; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }
@media (max-width: 560px) { .modal-foot .btn { flex: 1; } }
.pay-methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 420px) { .pay-methods { grid-template-columns: repeat(2, 1fr); } }
.pay-methods button { min-height: 56px; padding: 4px 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; font-size: .85rem; line-height: 1.15; cursor: pointer; }
.pay-methods button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-hi); }
.calc-box { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.calc-box .headline { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; color: var(--brand-hi); }

.suggest { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 4px; max-height: 220px; overflow-y: auto; background: var(--surface-2); }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 10px 12px; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.suggest button:hover { background: var(--surface-3); }

.people-edit { display: flex; flex-direction: column; gap: 6px; }
.people-edit .pe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line-soft); background: var(--surface-2); border-radius: 10px; }
.people-edit .pe b { flex: 1; min-width: 120px; }

/* ---------- Agenda ---------- */
.agenda { padding-bottom: 14px; display: grid; grid-template-columns: 64px repeat(5, minmax(140px, 1fr)); min-width: 780px; position: relative; }
.agenda .hcell { font-weight: 700; padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; }
.agenda .tcol { position: relative; }
.agenda .tlabel { position: absolute; left: 0; right: 8px; text-align: right; font-size: .8rem; color: var(--muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.agenda .col { position: relative; border-left: 1px solid var(--line-soft); cursor: copy; }
.agenda .col:hover { background: rgba(255, 255, 255, .02); }
.agenda .slotline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line-soft); }
.agenda .slotline.hour { border-top: 1px solid var(--line); }
.agenda .block { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 6px 8px; font-size: .84rem; overflow: hidden; cursor: pointer; background: #4A4232; border-left: 4px solid var(--res); }
.agenda .block.aberta { background: #4D3232; border-left-color: var(--occ); }
.agenda .block.fechada { background: var(--surface-3); border-left-color: var(--muted); }
.agenda .block b { display: block; font-variant-numeric: tabular-nums; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 0%, #13235A 0%, var(--bg) 70%); }
.login { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 28px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand img { width: 64px; height: 64px; }
.login-brand .wordmark { font-size: 1.6rem; }

/* ---------- Toast ---------- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100vw - 24px)); }
.toast { background: #0F1B40; color: var(--text); border: 1px solid var(--line); padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7); width: 100%; }
.toast.err { background: var(--occ); color: #1E0B07; border-color: var(--occ); font-weight: 600; }
.toast.ok { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }

.empty-state { padding: 26px; text-align: center; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.bar { height: 8px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }
pre.json { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border-radius: 8px; padding: 8px; font-size: .8rem; margin: 4px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .modal { animation: pop .14s ease-out; }
  @keyframes pop { from { transform: translateY(8px); } to { transform: none; } }
}
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --text: #111; --muted: #555; --line: #ccc; --line-soft: #ddd; }
  .topbar, .page-head .actions, .court-foot { display: none; }
  .panel, .court { box-shadow: none; }
}

/* ---------- Notificações de reservas online ---------- */
.bell-btn { position: relative; border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; width: 40px; height: 38px; font-size: 1.05rem; cursor: pointer; }
.bell-btn:hover { background: var(--surface-2); }
.bell-btn.ring { border-color: var(--brand); }
.bell-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--occ); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
@media (prefers-reduced-motion: no-preference) {
  .bell-btn.ring { animation: ring 2.4s ease-in-out infinite; }
  @keyframes ring { 0%, 86%, 100% { transform: none; } 89% { transform: rotate(-12deg); } 92% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }
}
.toast.notif { background: #0F1B40; border: 1px solid var(--brand); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .8); }
.toast.notif b { color: var(--brand-hi); }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notif-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.notif-list li.new { border-color: var(--brand); }
.notif-main { min-width: 0; flex: 1; }

/* ============================================================
   v3 — estados (🟢 livre · 🔵 reservada · 🟡 em utilização · ⚫ encerrada · 🔴 pendência)
   ============================================================ */
:root {
  --st-livre: #3FCB8E; --st-livre-soft: rgba(63, 203, 142, .15);
  --st-reservada: #4C9BF0; --st-reservada-soft: rgba(76, 155, 240, .17);
  --st-uso: #F2C94B; --st-uso-soft: rgba(242, 201, 75, .17);
  --st-encerrada: #8A8A96; --st-encerrada-soft: rgba(20, 20, 26, .55);
  --st-pendencia: #F0654F; --st-pendencia-soft: rgba(240, 101, 79, .17);
}
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .84rem; white-space: nowrap; }
.state-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.court.st-livre::before { background: var(--st-livre); }
.court.st-reservada::before { background: var(--st-reservada); }
.court.st-uso::before { background: var(--st-uso); }
.court.st-encerrada::before { background: var(--st-encerrada); }
.court.st-pendencia::before { background: var(--st-pendencia); }
.state-pill.st-cancelada { background: var(--neutral-soft); color: var(--muted); }
.state-pill.st-livre { background: var(--st-livre-soft); color: var(--st-livre); } .dot.st-livre { background: var(--st-livre); }
.state-pill.st-reservada { background: var(--st-reservada-soft); color: var(--st-reservada); } .dot.st-reservada { background: var(--st-reservada); }
.state-pill.st-uso { background: var(--st-uso-soft); color: var(--st-uso); } .dot.st-uso { background: var(--st-uso); }
.state-pill.st-encerrada { background: var(--st-encerrada-soft); color: #C9C9D1; } .dot.st-encerrada { background: #15151B; box-shadow: 0 0 0 1.5px var(--st-encerrada); }
.state-pill.st-pendencia { background: var(--st-pendencia-soft); color: var(--st-pendencia); } .dot.st-pendencia { background: var(--st-pendencia); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 14px; color: var(--muted); font-size: .9rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.section-title { font-size: 1.05rem; margin: 18px 0 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.court.grill .court-num { font-size: 3.2rem; }
.pend-flag { color: var(--st-pendencia); font-weight: 700; font-size: .85rem; margin-top: 4px; }
.seg.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* Topo: busca por código e aniversários */
.code-search { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 4px 0 12px; }
.code-search input { background: transparent; border: 0; width: 78px; min-height: 34px; padding: 0; text-transform: uppercase; letter-spacing: .08em; color: var(--text); }
.code-search input:focus { outline: none; }
.code-search button { background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 4px 6px; }
.code-search:focus-within { border-color: var(--brand); }
.bday-line { background: rgba(242, 201, 75, .1); border: 1px solid rgba(242, 201, 75, .35); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; }
.new-customer-hint { margin-top: 10px; font-size: .88rem; color: var(--brand-hi); background: var(--brand-soft); border-radius: var(--radius-sm); padding: 6px 10px; display: inline-block; }

/* Notificação grande no centro (reserva online / aniversário) */
.notif-overlay { z-index: 1000; background: rgba(8, 10, 14, .78); backdrop-filter: blur(3px); }
.notif-big { max-width: 460px; width: calc(100% - 32px); padding: 0; overflow: hidden; border: 2px solid var(--brand); text-align: center; animation: nbpop .25s ease-out; }
.notif-big.bday { border-color: var(--st-uso); }
@keyframes nbpop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.nb-head { background: var(--brand); color: var(--brand-ink); font-weight: 800; letter-spacing: .06em; font-size: 1.15rem; padding: 14px; }
.bday .nb-head { background: var(--st-uso); }
.nb-body { padding: 18px 20px 6px; display: grid; gap: 8px; }
.nb-name { font-size: 1.6rem; font-weight: 800; }
.nb-space { font-size: 1.1rem; color: var(--brand-hi); font-weight: 700; }
.nb-when { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.nb-meta { color: var(--muted); }
.nb-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; color: var(--text); }
.nb-foot { display: flex; gap: 10px; justify-content: center; padding: 16px 20px 20px; flex-wrap: wrap; }
.nb-foot .btn { min-width: 150px; }

/* Comanda */
.tab-title { font-size: clamp(1.4rem, 3vw, 2rem); margin: 4px 0 0; }
.tab-strip { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.quick-row { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-start; }
.mini-link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: .95rem; }
.mini-link:hover { color: var(--brand-hi); }
.quickpay .btn { min-width: 76px; }
.person-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.person-row:last-of-type { border-bottom: 0; }
.person-name { font-weight: 700; }
.person-money { text-align: right; }
.pay-col { min-width: 90px; text-align: right; }
.pend { color: var(--st-pendencia); font-weight: 700; } .done { color: var(--st-livre); font-weight: 700; }
@media (max-width: 640px) { .person-row { grid-template-columns: 1fr auto; } .pay-col { grid-column: 1 / -1; text-align: left; } }

/* Agenda em grade */
.date-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.date-pick { position: relative; display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 12px; font-weight: 700; min-height: 40px; }
.date-pick input { background: transparent; border: 0; color: var(--text); color-scheme: dark; min-height: 0; padding: 0; width: 130px; }
.agenda-wrap { max-height: 72vh; }
.agenda-grid { border-collapse: separate; border-spacing: 3px; min-width: 820px; }
.agenda-grid th { position: sticky; top: 0; background: var(--bg); z-index: 1; text-align: center; font-size: .9rem; padding: 6px; }
.agenda-grid tbody th { position: sticky; left: 0; top: auto; z-index: 1; font-variant-numeric: tabular-nums; }
.agenda-grid th.grill { color: var(--st-uso); }
.ag-cell { padding: 0; border: 0 !important; }
.ag-cell button { width: 100%; min-height: 50px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--text); font: inherit; font-size: .85rem; padding: 4px; }
.ag-cell button .dot { width: 8px; height: 8px; }
.ag-cell small { color: var(--muted); font-size: .72rem; }
.ag-cell .cont { color: var(--muted); font-size: .8rem; }
.ag-cell.st-livre button { background: var(--st-livre-soft); color: var(--st-livre); font-weight: 700; font-size: .75rem; letter-spacing: .05em; flex-direction: row; gap: 6px; }
.ag-cell.st-livre button:hover:not(:disabled) { border-color: var(--st-livre); }
.ag-cell.st-livre.past button { opacity: .35; cursor: default; }
.ag-cell.st-reservada button { background: var(--st-reservada-soft); border-color: rgba(76, 155, 240, .4); }
.ag-cell.st-uso button { background: var(--st-uso-soft); border-color: rgba(242, 201, 75, .45); }
.ag-cell.st-encerrada button { background: var(--st-encerrada-soft); border-color: #55555f; }
.ag-cell.st-pendencia button { background: var(--st-pendencia-soft); border-color: rgba(240, 101, 79, .5); }

/* Tabelas, listas e cartões */
tr.inactive td { opacity: .55; } tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-3); }
.notes-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
pre.notes { white-space: pre-wrap; font-family: inherit; margin: 0; color: var(--text); }
.cat-title { letter-spacing: .06em; font-size: .95rem; color: var(--brand-hi); }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.off { opacity: .45; text-decoration: line-through; }
.usage-bar { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.usage-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-hi)); border-radius: 999px; }
.pkg-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.move-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.move-types button { text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); cursor: pointer; display: grid; gap: 4px; font: inherit; }
.move-types button span { font-size: .8rem; color: var(--muted); }
.move-types button.on { border-color: var(--brand); background: var(--brand-soft); }

/* Caixa */
.cash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 14px 0; }
.cash-grid .panel { margin: 0; }
.acc-line { padding: 8px 0; border-bottom: 1px solid var(--line-soft); } .acc-line:last-of-type { border-bottom: 0; }

/* Despesas / contas a pagar */
.month-title { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: .04em; margin: 0 0 6px; }
.payables { display: grid; gap: 8px; }
.payable { display: grid; grid-template-columns: 130px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 5px solid #6d6d78; border-radius: var(--radius-sm); background: var(--surface); }
.payable.bad { border-left-color: var(--st-pendencia); background: rgba(240, 101, 79, .06); }
.payable.warn { border-left-color: #F29B4B; }
.payable .pamt { text-align: right; } .payable .pamt .tag { margin-top: 4px; }
@media (max-width: 760px) { .payable { grid-template-columns: 1fr auto; } .payable .pd { grid-column: 1 / -1; } .payable > .row { grid-column: 1 / -1; } }

/* Calendário de faturamento */
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head div { text-align: center; color: var(--muted); font-weight: 700; font-size: .85rem; padding: 4px; }
.cal-day { min-height: 128px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 8px; text-align: left; color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.cal-day.empty { background: transparent; border: 0; cursor: default; }
.cal-day.has { border-color: var(--line); } .cal-day:hover:not(.empty) { border-color: var(--brand); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-num { font-weight: 800; font-size: 1.1rem; }
.cal-lines { display: grid; gap: 1px; font-size: .74rem; flex: 1; }
.cal-lines div, .cal-total { display: flex; justify-content: space-between; gap: 6px; }
.cal-lines span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-lines .space span { color: var(--brand-hi); } .cal-lines .discount b { color: var(--st-pendencia); }
.cal-total { border-top: 1px solid var(--line); padding-top: 4px; font-size: .8rem; font-weight: 800; }
.cal-total.big { font-size: 1.15rem; margin-top: 10px; }
.cal-detail details { border-bottom: 1px solid var(--line-soft); padding: 8px 0; }
.cal-detail summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 700; }
.cal-detail details.noitems summary { cursor: default; list-style: none; }
.cal-detail ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
@media (max-width: 760px) {
  .cal-head { display: none; } .cal-grid { grid-template-columns: 1fr 1fr; } .cal-day.empty { display: none; } .cal-day { min-height: 0; }
  .cal-day:not(.has) { opacity: .5; }
}
.overlay.notif-overlay { align-items: center; }
@media (min-width: 900px) { .nav { flex-wrap: wrap; row-gap: 0; overflow: visible; } .nav a { padding: 6px 8px; } }
.page-head .row select { width: auto; min-width: 130px; }
.payable .pamt .tag { display: block; width: fit-content; margin: 4px 0 0 auto; }
.date-pick input { width: 30px; color: transparent; cursor: pointer; }
.date-pick input::-webkit-datetime-edit { display: none; }

/* v4 — menu por setores, comanda de compra, estoque baixo, operações do caixa */
.nav-sep { width: 1px; align-self: stretch; margin: 6px 6px; background: var(--line); flex: none; }
.counter-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 8px; }
.counter-card { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--st-uso); color: var(--text); text-decoration: none; }
.counter-card.pend { border-left-color: var(--st-pendencia); }
.counter-card:hover { border-color: var(--brand); }
.counter-sum table td { padding: 6px 4px; }
.low-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.low-box { display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: var(--radius-sm); cursor: pointer; font: inherit; color: var(--text); }
.low-box b { font-size: 1.8rem; line-height: 1; }
.low-box small { color: var(--muted); }
.low-box.red { background: var(--st-pendencia-soft); border: 1.5px solid var(--st-pendencia); } .low-box.red b { color: var(--st-pendencia); }
.low-box.yellow { background: var(--st-uso-soft); border: 1.5px solid var(--st-uso); } .low-box.yellow b { color: var(--st-uso); }
.cash-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 12px; }
.cash-op { display: grid; gap: 4px; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit; }
.cash-op span { font-size: .8rem; color: var(--muted); font-weight: 400; }
.cash-op:hover { border-color: var(--brand); }
.cash-op.primary { background: var(--brand-soft); border-color: var(--brand); }
.day-close { border-color: var(--brand); }
.check.joga { margin: 2px 0; font-weight: 600; }
.tag.debito { background: rgba(160, 140, 230, .16); color: #BBA9F5; }
.tag.credito { background: rgba(120, 170, 240, .16); color: #9CC3F5; }
.seg button:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.change-box { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 8px; }
.change-result { font-size: 1.25rem; }
.change-result.ok { color: var(--brand-hi); }
.change-result.short { color: var(--st-pendencia); font-size: 1rem; }
.day-line { margin-top: 4px; font-size: .9rem; color: var(--muted); }
.day-line b { color: var(--text); font-weight: 700; }
.next-label { display:block; font-size:.78rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color: var(--st-reservada); }
.split-calc { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 12px; margin:4px 0 10px; background: var(--surface-2); border:1px solid var(--line); border-radius: var(--radius-sm); }
.split-calc input { width:76px; }
.split-calc b { color: var(--brand-hi); }
.agenda-search { display:flex; gap:8px; margin: 0 0 12px; flex-wrap: wrap; }
.agenda-search input { flex:1; min-width: 220px; }
.panel.found { border-color: var(--brand); }
.next-info { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--st-reservada-soft); color: var(--text); font-size: .92rem; }
.next-info .small { color: var(--muted); }
/* Comanda: separação entre "para quem" e "qual produto" */
.launch-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin-bottom: 18px; }
.step-label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 10px; flex-wrap: wrap; }
.step-label .n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: inline-grid; place-items: center; font-size: .82rem; flex: none; }
.person-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.person-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.person-pick .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; }
.person-pick.on { border-color: var(--brand); background: var(--brand-soft); }
.person-pick.on .av { background: var(--brand); color: var(--brand-ink); }
.launch-to { color: var(--brand-hi); }
.purge-panel { border-color: rgba(240, 101, 79, .45); margin-top: 18px; }
.agenda-grid tr.now-row > th { color: var(--brand-hi); }
.agenda-grid tr.now-row .ag-cell button { box-shadow: inset 0 3px 0 var(--brand); }
.now-tag { display: block; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-hi); }
.agenda-grid thead th { z-index: 3; background: var(--bg); } .agenda-grid tbody th { background: var(--bg); }
.qr-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.qr-card img { background: #fff; border-radius: 10px; padding: 6px; width: 180px; height: 180px; }
.qr-card h3 { margin: 0 0 6px; }
.qr-url { font-weight: 700; font-size: 1.15rem; color: var(--brand-hi); word-break: break-all; margin-bottom: 8px; }

/* Início automático do jogo */
.auto-hint { width: 100%; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }

/* Botão "Paga a quadra toda" */
.person-row .court-all { font-size: .82rem; margin-left: 8px; text-decoration: underline; color: var(--brand-hi); }

/* Relatório do site: gráficos de barras */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 16px 0; }
.bar-chart { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; }
.bar-chart h3 { margin: 0 0 10px; font-size: 1rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 190px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar { width: 100%; max-width: 38px; min-height: 2px; background: var(--brand); border-radius: 4px 4px 0 0; }
.bar-col:hover .bar { background: var(--brand-hi); }
.bar-val { font-size: .8rem; color: var(--text); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.bar-lbl { position: absolute; bottom: -22px; font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* Auditoria: excluir movimentações marcadas */
.del-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 10px; }
.chk-col { width: 44px; text-align: center; }
.chk-col input { width: 20px; height: 20px; cursor: pointer; }
tr.row-gone td { opacity: .55; }
tr.row-gone td.chk-col { opacity: 1; }
/* Manual de uso */
.manual-panel { padding: 0; overflow: hidden; }
.manual-frame { display: block; width: 100%; height: calc(100vh - 220px); min-height: 480px; border: 0; background: #fff; }
.manual-tip { margin: 0; padding: 8px 14px; }
/* Categorias de despesa com × para excluir */
.chip-x { position: relative; display: inline-flex; }
.chip-x .chip { padding-right: 30px; }
.chip-x .x { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 11px; border: 0; background: transparent; color: var(--muted, #9aa); font-size: 17px; line-height: 20px; cursor: pointer; padding: 0; }
.chip-x .x:hover { background: rgba(239, 68, 68, .18); color: #f87171; }
.chip-x.off .chip { padding-right: 14px; }
/* Mensagens no WhatsApp */
.bc-prev { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; font-size: 14px; }
tr.bc-sent td { opacity: .75; }
.bc-seq-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bc-seq-bar span { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.welcome-alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
input.court-final { width: 110px; text-align: right; padding: 4px 8px; min-height: 32px; font: inherit; font-weight: 700; }
.notify-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.cons-chip { margin-left: 8px; border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.cons-chip:hover { background: var(--surface-2); }
/* Lançar consumo (janela) */
.cons-chip.launch { background: var(--brand); border-color: var(--brand); color: #fff; }
.launch-results { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.launch-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.launch-item:hover, .launch-item.on { background: var(--surface-2); border-color: var(--brand); }
.launch-sel { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.launch-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: end; margin-top: 10px; }
.launch-grid .field b { font-size: 16px; } .launch-grid .field b.big { font-size: 20px; }
.big-qty { display: inline-flex; align-items: center; gap: 6px; } .big-qty input { width: 64px; text-align: center; font: inherit; font-weight: 700; padding: 6px; }
@media (max-width: 560px) { .launch-grid { grid-template-columns: 1fr 1fr; } }
.launch-grid .field { display: flex; flex-direction: column; gap: 4px; }
.name-link { background: none; border: 0; padding: 0; font: inherit; font-weight: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.name-link:hover { color: var(--brand); }
.icon-btn.danger-x:hover { color: #f87171; border-color: #f87171; }
.bday-cust { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; text-align: left; }
.loyalty-balls { letter-spacing: 1px; }
.join-box { border-top: 1px solid var(--line); padding-top: 10px; }
.join-btn { display: flex; justify-content: space-between; gap: 10px; text-align: left; }
.extra-pay { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }

/* Conta no Resumo da comanda */
.cart-box { border: 2px solid var(--brand); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.cart-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; }
.cart-person { border-bottom: 1px dashed var(--line); padding: 8px 0; }
.cart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 1.02rem; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; font-size: .95rem; padding: 2px 0; }
.cart-line.off { opacity: .45; text-decoration: line-through; }
.cart-line.sub { margin-top: 4px; font-weight: 600; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.25rem; font-weight: 800; padding: 10px 0 4px; }

.cart-x { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--occ); background: transparent; color: var(--occ); font-weight: 800; font-size: 1rem; cursor: pointer; line-height: 1; }
.cart-x:hover { background: var(--occ); color: #fff; }

.split-calc .split-sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.split-calc input.court-final { width: 96px; }
.split-calc select { width: auto; padding: 6px 8px; }
.split-calc .seg.sm button { padding: 6px 12px; }

/* Formulário de reserva compacto (cabe até "Forma de cobrança" sem rolar) */
.res-form { gap: 10px; }
.res-form .panel.res-cust { padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.res-form .grid-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.res-row { display: grid; grid-template-columns: minmax(140px, 1fr) 120px auto; gap: 10px; align-items: end; }
.res-row .seg { flex-wrap: nowrap; }
.res-row .seg button { white-space: nowrap; }
.res-form .field .hint { display: inline; margin-left: 4px; }
.res-form .field input, .res-form .field select { min-height: 40px; padding-top: 7px; padding-bottom: 7px; }
.res-form .seg button { padding: 8px 12px; }
@media (max-width: 760px) { .res-form .grid-3, .res-row { grid-template-columns: 1fr; } }
.res-row div.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .92rem; }

.split-calc.compact { font-size: .86rem; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; }
.split-calc.compact input { width: 58px; padding: 5px 6px; min-height: 0; }
.split-calc.compact input.court-final { width: 84px; }
.split-calc.compact .btn.sm { padding: 5px 10px; font-size: .84rem; white-space: nowrap; }
.split-calc.compact > span, .split-calc.compact b { white-space: nowrap; }
.p-items { margin-top: 4px; max-width: 340px; }
.p-item { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; color: var(--muted); padding: 1px 0; }
.p-item span:last-child { color: var(--text); white-space: nowrap; }

/* Nova reserva em duas colunas: tudo numa tela só */
.res-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; align-items: start; }
.res-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.res-form label.field { font-size: .85rem; gap: 3px; }
.res-form .field input, .res-form .field select { min-height: 36px; padding-top: 5px; padding-bottom: 5px; font-size: .92rem; }
.res-form .calc-box { padding: 8px 12px; }
.res-form .calc-box .summary dt, .res-form .calc-box .summary dd { font-size: .9rem; }
.res-form .res-row { grid-template-columns: 1fr 90px; }
.res-form .res-row > div.field { grid-column: 1 / -1; }
.res-form .seg button { padding: 6px 10px; font-size: .88rem; }
@media (max-width: 860px) { .res-cols { grid-template-columns: 1fr; } }
.res-when { display: flex; flex-direction: column; gap: 8px; }
.res-form .res-cust { gap: 6px; }
.res-form [data-recwrap].panel { padding: 8px 12px; margin: 0; }
.res-form .res-cust .grid-3 { grid-template-columns: 1.4fr 1fr 1fr; }

.court-who { display: block; font-size: 1.35rem; font-weight: 800; color: var(--text); text-decoration: none; line-height: 1.15; margin-top: 4px; }
.court-who:hover { color: var(--brand-hi); }
.court-time-sm { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.day-slot { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line-soft); }
.day-slot a { color: var(--text); text-decoration: none; }

.qr-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: stretch; }
.qr-row .qr-card { flex-direction: column; align-items: center; text-align: center; flex-wrap: nowrap; }
.qr-row .qr-url { word-break: break-all; }
.res-form [data-offslot], .res-form [data-avail] .alert { font-size: .82rem; padding: 6px 10px; }

/* Cesta de pagamento */
.p-val { display: inline-flex; align-items: center; gap: 6px; }
.bsk-arrow { border: 1.5px solid var(--brand); color: var(--brand-hi); background: transparent; border-radius: 8px; width: 28px; height: 24px; font-weight: 800; cursor: pointer; line-height: 1; padding: 0; }
.bsk-arrow:hover { background: var(--brand); color: var(--brand-ink); }
.bsk-in { font-size: .72rem; color: var(--brand-hi); }
.p-item.sel span:first-child { color: var(--brand-hi); }
.bsk-back { border: 1.5px solid var(--occ); color: var(--occ); background: transparent; border-radius: 8px; width: 28px; height: 24px; font-weight: 800; cursor: pointer; padding: 0; margin-right: 4px; }
.bsk-back:hover { background: var(--occ); color: #fff; }
.p-items { max-width: 380px; }

.person-money.owed { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 1.15rem; min-width: 120px; }
.person-money.owed b { font-size: 1.25rem; }

/* valor/Pago encostado à direita, onde ficava o botão Receber */
.person-row .pay-col:empty { display: none; }
.person-row:has(.pay-col:empty) { grid-template-columns: minmax(0, 1fr) auto; }
.person-money.owed { justify-content: flex-end; text-align: right; min-width: 150px; padding-right: 6px; font-size: 1.4rem; }
.person-money.owed b { font-size: 1.5rem; }
.person-money.owed .done { font-size: 1.4rem; font-weight: 800; }

/* valor que falta / Pago: na ponta direita da linha da pessoa */
.person-row:has(.person-money.owed) { grid-template-columns: minmax(0, 1fr) auto; }
.person-money.owed { justify-content: flex-end; text-align: right; min-width: 150px; padding-right: 8px; font-size: 1.6rem; }
.person-money.owed b { font-size: 1.7rem; font-weight: 700; }
.person-money.owed .done { font-size: 1.6rem; font-weight: 700; }

.item-x, .person-x { border: 0; background: transparent; color: var(--occ); font-weight: 800; cursor: pointer; padding: 0 4px; font-size: .95rem; line-height: 1; }
.person-x { font-size: 1.05rem; margin-left: 4px; }
.item-x:hover, .person-x:hover { color: #fff; background: var(--occ); border-radius: 6px; }

.person-x { margin: 0 6px 0 0; }
.person-x-sp { display: inline-block; width: 22px; }

.pay-methods.five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.pay-methods.five button { min-height: 44px; font-size: .8rem; padding: 4px; }
@media (max-width: 480px) { .pay-methods.five { grid-template-columns: repeat(3, 1fr); } }
