/* Painel Yucatán — tema escuro, cores da marca, pensado para tablet no balcão e computador. */
:root {
  --bg: #120b08;
  --bg-2: #170f0b;
  --panel: #1d140f;
  --panel-2: #261a13;
  --panel-3: #33241b;
  --line: rgba(246, 231, 200, 0.09);
  --line-2: rgba(246, 231, 200, 0.17);
  --cream: #f6e7c8;
  --cream-2: #e3cda4;
  --muted: #b29d80;
  --muted-2: #8a7660;
  --turq: #25c6b8;
  --turq-2: #129d91;
  --turq-ink: #062a27;
  --orange: #ff7a1a;
  --magenta: #ec1e79;
  --yellow: #ffbe1a;
  --red: #ef4444;
  --green: #4cc26a;
  --blue: #5aa9ff;
  --purple: #a78bfa;
  --radius: 14px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Reggae One', 'DM Sans', system-ui, sans-serif;
  /* Séries dos gráficos — validadas (modo escuro, superfície #1d140f): faixa de luminosidade, croma, daltonismo e contraste. */
  --s1: #16a092;
  --s2: #df600e;
  --s3: #8a70ee;
  --s4: #d0226c;
  --s5: #bf8700;
  --s6: #3a87dc;
  --grid: rgba(246, 231, 200, 0.07);
  --axis: rgba(246, 231, 200, 0.2);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--turq); }
svg { width: 1em; height: 1em; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
#printFrame { position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0; visibility: hidden; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--panel-3); border-top-color: var(--turq); animation: spin 0.8s linear infinite; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.nw { flex-wrap: nowrap; }
.stack { display: grid; gap: 12px; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }
.good { color: #8ee6a3; }
.bad { color: #ff9f9f; }
.warn { color: #ffd77a; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(60% 50% at 50% 30%, rgba(255, 122, 26, 0.18), transparent 70%), radial-gradient(40% 40% at 10% 90%, rgba(37, 198, 184, 0.12), transparent 70%), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; padding: 28px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.login-card h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 2.2rem; text-align: center; color: var(--orange); }
.login-card p { text-align: center; margin: 4px 0 20px; color: var(--muted); }

/* ---------- Estrutura ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.side .logo { font-family: var(--display); font-size: 1.6rem; color: var(--orange); padding: 4px 12px 12px; }
.side .logo small { display: block; font-family: var(--font); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--cream-2); text-decoration: none; font-weight: 600; position: relative; }
.nav a svg { width: 20px; height: 20px; color: var(--muted); }
.nav a:hover { background: var(--panel); }
.nav a.on { background: var(--panel-2); color: var(--cream); }
.nav a.on svg { color: var(--turq); }
.nav .nbadge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--magenta); color: #fff; font-size: 0.75rem; font-weight: 800; display: grid; place-items: center; }
.nav .nbadge.y { background: var(--yellow); color: #2a1a00; }
.side .me { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }
.side .me b { color: var(--cream); display: block; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: rgba(18, 11, 8, 0.96); border-bottom: 1px solid var(--line); min-height: 62px; }
.topbar h1 { margin: 0; font-size: 1.25rem; font-weight: 800; flex: 1; min-width: 140px; }
.icon-btn.menu-btn { display: none; }
.content { padding: 18px; flex: 1; }
.test-banner { background: repeating-linear-gradient(45deg, #3a2a08, #3a2a08 12px, #2c2006 12px, #2c2006 24px); color: #ffe7ad; padding: 8px 18px; font-weight: 700; font-size: 0.88rem; border-bottom: 1px solid rgba(255, 190, 26, 0.35); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sound-banner { background: #3b0f24; color: #ffd1e5; padding: 10px 18px; font-weight: 800; border-bottom: 1px solid rgba(236, 30, 121, 0.5); display: flex; gap: 12px; align-items: center; cursor: pointer; }
@media (max-width: 1099px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 70; left: 0; top: 0; width: 260px; transform: translateX(-105%); transition: transform 0.25s ease; box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; z-index: 69; background: rgba(0, 0, 0, 0.5); }
  .icon-btn.menu-btn { display: inline-grid; }
  .content { padding: 12px; }
  .topbar { padding: 8px 12px; }
}

/* ---------- Botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 12px; border: 1px solid transparent;
  background: linear-gradient(135deg, var(--turq), var(--turq-2)); color: var(--turq-ink); font-weight: 800; white-space: nowrap; text-decoration: none; transition: filter 0.15s, transform 0.1s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: var(--panel-2); color: var(--cream); border-color: var(--line-2); font-weight: 700; }
.btn.ghost:hover { background: var(--panel-3); }
.btn.warn { background: linear-gradient(135deg, #ffcb4d, #f0a400); color: #2a1a00; }
.btn.danger { background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; }
.btn.warm { background: linear-gradient(135deg, var(--orange), var(--magenta)); color: #fff; }
.btn.wa { background: #25d366; color: #052e16; }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 0.84rem; border-radius: 10px; }
.btn.lg { min-height: 50px; font-size: 1.05rem; padding: 10px 20px; }
.btn.block { width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--cream); }
.icon-btn svg { width: 19px; height: 19px; }
.link { background: none; border: 0; padding: 0; color: var(--turq); font-weight: 700; text-decoration: underline; }
.link.danger { color: #ff9f9f; }
.field { display: grid; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field > label, .lbl { font-size: 0.8rem; font-weight: 700; color: var(--cream-2); }
.hint { font-size: 0.78rem; color: var(--muted); }
.input, .select, textarea.input { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--cream); outline: none; }
textarea.input { min-height: 80px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--turq); }
.input.sm, .select.sm { min-height: 32px; padding: 4px 8px; font-size: 0.86rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 700px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; padding: 4px 0; font-size: 0.92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--turq); margin-top: 2px; flex: none; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; font-size: 0.84rem; font-weight: 700; }
.days label:has(input:checked) { background: rgba(37, 198, 184, 0.15); border-color: var(--turq); }
.days input { accent-color: var(--turq); }

/* Interruptor */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 700; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .sw { width: 46px; height: 26px; border-radius: 13px; background: var(--panel-3); border: 1px solid var(--line-2); position: relative; transition: background 0.2s; flex: none; }
.switch .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--cream-2); transition: transform 0.2s; }
.switch input:checked + .sw { background: var(--green); border-color: var(--green); }
.switch input:checked + .sw::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .sw { outline: 2px solid var(--yellow); outline-offset: 2px; }
.switch.big .sw { width: 58px; height: 32px; border-radius: 16px; }
.switch.big .sw::after { width: 24px; height: 24px; }
.switch.big input:checked + .sw::after { transform: translateX(26px); }

/* ---------- Cartões e etiquetas ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h2, .card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.card + .card { margin-top: 14px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font-size: 0.74rem; font-weight: 800; background: var(--panel-3); color: var(--cream-2); white-space: nowrap; }
.tag.green { background: rgba(76, 194, 106, 0.16); color: #9be8b0; }
.tag.red { background: rgba(239, 68, 68, 0.18); color: #ffadad; }
.tag.orange { background: rgba(255, 122, 26, 0.18); color: #ffc08f; }
.tag.yellow, .tag.gold { background: rgba(255, 190, 26, 0.18); color: #ffdc85; }
.tag.blue { background: rgba(90, 169, 255, 0.16); color: #a9d0ff; }
.tag.purple { background: rgba(167, 139, 250, 0.18); color: #cfc0ff; }
.tag.turq { background: rgba(37, 198, 184, 0.16); color: #8cf0e6; }
.tag.muted { background: var(--panel-2); color: var(--muted); }
.tag.test { background: #4a3608; color: #ffd77a; border: 1px dashed rgba(255, 190, 26, 0.6); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--muted); font-weight: 800; }
.tabs button.on { color: var(--cream); border-bottom-color: var(--turq); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k-l { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.kpi .k-v { font-size: 1.55rem; font-weight: 800; margin-top: 2px; line-height: 1.2; }
.kpi .k-d { font-size: 0.8rem; margin-top: 4px; color: var(--muted); }
.kpi.accent { border-color: rgba(37, 198, 184, 0.45); background: linear-gradient(135deg, rgba(37, 198, 184, 0.12), var(--panel)); }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 0.92rem; margin-bottom: 12px; }
.alert.warn { background: rgba(255, 190, 26, 0.1); border: 1px solid rgba(255, 190, 26, 0.35); color: #ffe3a0; }
.alert.bad { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.4); color: #ffd0d0; }
.alert.good { background: rgba(76, 194, 106, 0.1); border: 1px solid rgba(76, 194, 106, 0.35); color: #c9f5d5; }
.alert.info { background: rgba(37, 198, 184, 0.08); border: 1px solid rgba(37, 198, 184, 0.3); color: #c5f5f0; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.t th, table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 800; background: var(--panel-2); position: sticky; top: 0; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--panel-2); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 800; background: var(--panel-2); }

/* ---------- Quadro de pedidos ---------- */
.board-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .board { grid-template-columns: 1fr; } }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 160px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 800; }
.col-head .cnt { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--panel-3); display: grid; place-items: center; font-size: 0.85rem; }
.col.new .col-head .cnt { background: var(--magenta); color: #fff; }
.col.new.ringing { border-color: rgba(236, 30, 121, 0.7); box-shadow: 0 0 0 3px rgba(236, 30, 121, 0.15); animation: ring 1s ease-in-out infinite; }
.col-list { display: grid; gap: 10px; }
.ocard { --h: 140; position: relative; background: var(--panel); border: 1px solid var(--line-2); border-left: 6px solid hsl(var(--h) 70% 50%); border-radius: 14px; padding: 12px;
  box-shadow: inset 0 0 0 999px hsla(var(--h), 80%, 45%, var(--tint, 0.04)); }
.ocard.late { border-color: rgba(239, 68, 68, 0.75); animation: late 1.6s ease-in-out infinite; }
.ocard.flash { animation: flash 1s ease 3; }
.o-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.o-code { font-family: var(--display); font-size: 1.35rem; color: var(--yellow); letter-spacing: 0.04em; }
.o-timer { margin-left: auto; font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 1.05rem; padding: 2px 8px; border-radius: 8px; background: hsla(var(--h), 70%, 45%, 0.2); color: hsl(var(--h) 85% 72%); }
.o-cust { margin-top: 6px; font-weight: 800; }
.o-cust a { color: inherit; text-decoration: none; }
.o-sub { font-size: 0.84rem; color: var(--muted); }
.o-items { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); font-size: 0.9rem; }
.o-items .it { padding: 2px 0; }
.o-items .it b { color: var(--cream); }
.o-items .ad { color: var(--muted); font-size: 0.82rem; padding-left: 18px; }
.o-items .nt { color: var(--yellow); font-size: 0.82rem; padding-left: 18px; font-weight: 700; }
.o-items .gift { color: #ffdc85; }
.o-note { font-size: 0.86rem; color: var(--yellow); font-weight: 700; margin: 6px 0; }
.o-pay { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.88rem; margin: 6px 0; }
.o-fee { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.86rem; margin: 4px 0; color: var(--cream-2); }
.rural-check { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.o-total { font-weight: 800; font-size: 1.05rem; }
.o-driver { display: flex; gap: 6px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.o-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.o-actions .btn.main { flex: 1 1 100%; }
.paidbox { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(255, 190, 26, 0.5); background: rgba(255, 190, 26, 0.1); font-weight: 800; cursor: pointer; }
.paidbox.on { border-color: rgba(76, 194, 106, 0.6); background: rgba(76, 194, 106, 0.14); color: #9be8b0; }
.paidbox input { width: 18px; height: 18px; accent-color: var(--green); }
.wa-pending { animation: pulseBtn 1.6s ease-in-out infinite; }
.done-list { margin-top: 16px; }
.done-list summary { cursor: pointer; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 800; list-style: none; display: flex; gap: 10px; align-items: center; }
.done-list summary::-webkit-details-marker { display: none; }
.done-list[open] summary { border-radius: 12px 12px 0 0; }
.mini-orders { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; overflow: hidden; }
.mini-order { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); cursor: pointer; flex-wrap: wrap; }
.mini-order:last-child { border-bottom: 0; }
.mini-order:hover { background: var(--panel); }
.mini-order.canceled { border-left: 4px solid var(--red); }
.board-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Modais ---------- */
.mbg { position: fixed; inset: 0; background: rgba(5, 3, 2, 0.72); display: grid; place-items: center; padding: 16px; animation: fade 0.18s ease; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: pop 0.2s ease; }
.modal.wide { width: min(860px, 100%); }
.modal.xwide { width: min(1180px, 100%); }
.modal.full { width: 100%; height: 100%; max-height: none; }
.m-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.m-head h2 { margin: 0; flex: 1; font-size: 1.1rem; }
.m-body { padding: 16px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.m-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) { .mbg { padding: 0; } .modal { max-height: 100vh; height: 100%; border-radius: 0; } }

/* ---------- Balcão (PDV) ---------- */
.pos { display: grid; grid-template-columns: 1fr 380px; gap: 0; height: 100%; min-height: 0; }
.pos-left { padding: 14px; overflow-y: auto; min-height: 0; }
.pos-right { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg-2); }
.pos-ticket { flex: 1; overflow-y: auto; padding: 12px 14px; }
.pos-foot { padding: 12px 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.pos-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.pos-cats button { flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 700; color: var(--cream-2); }
.pos-cats button.on { background: var(--cream); color: #2a1a10; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pos-item { text-align: left; padding: 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); min-height: 74px; display: flex; flex-direction: column; gap: 4px; }
.pos-item:hover { border-color: var(--turq); }
.pos-item b { font-size: 0.9rem; line-height: 1.2; }
.pos-item span { color: var(--cream-2); font-weight: 800; font-size: 0.88rem; margin-top: auto; }
.pos-item.sold { opacity: 0.4; pointer-events: none; }
.tline { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tline .tn { flex: 1; min-width: 0; font-size: 0.9rem; }
.tline .ta { color: var(--muted); font-size: 0.8rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); }
.qty button { width: 30px; height: 30px; border: 0; background: none; color: var(--cream); font-weight: 800; border-radius: 50%; }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }
@media (max-width: 860px) { .pos { grid-template-columns: 1fr; } .pos-right { border-left: 0; border-top: 1px solid var(--line); } }
.opt-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.opt-row label { flex: 1; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.opt-row input { width: 20px; height: 20px; accent-color: var(--turq); }

/* ---------- Listas do cardápio ---------- */
.plist { display: grid; gap: 8px; }
.prow { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); flex-wrap: wrap; }
.prow.off { opacity: 0.55; }
.prow .pth { width: 52px; height: 52px; border-radius: 10px; background: var(--panel-3); object-fit: cover; flex: none; display: grid; place-items: center; font-size: 1.4rem; overflow: hidden; }
.prow .pth img { width: 100%; height: 100%; object-fit: cover; }
.prow .pinfo { flex: 1; min-width: 180px; }
.prow .pname { font-weight: 800; }
.prow .pmeta { font-size: 0.82rem; color: var(--muted); }
.cat-block { margin-bottom: 22px; }
.cat-block > h3 { margin: 0 0 10px; font-size: 1.05rem; display: flex; gap: 8px; align-items: center; }
.cat-block > h4 { margin: 14px 0 8px; font-size: 0.95rem; color: var(--cream-2); }
.photo-box { display: flex; gap: 12px; align-items: center; }
.photo-box .ph { width: 110px; height: 110px; border-radius: 14px; background: var(--panel-3); overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; text-align: center; }
.photo-box .ph img { width: 100%; height: 100%; object-fit: cover; }
.addon-edit-wrap { margin-bottom: 6px; }
.addon-edit { display: grid; grid-template-columns: auto 1fr 100px 100px auto auto auto; gap: 6px; align-items: center; }
.addon-edit .mv { display: inline-flex; gap: 2px; }
.addon-edit-wrap .unl { color: var(--yellow); margin: 2px 0 0 64px; }
@media (max-width: 640px) { .addon-edit { grid-template-columns: auto 1fr 1fr; } .addon-edit-wrap .unl { margin-left: 0; } }
.link-row { display: grid; grid-template-columns: 1fr 64px 64px 64px auto auto auto; gap: 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); margin-bottom: 6px; }
.link-row .lr-name { min-width: 0; }
@media (max-width: 640px) { .link-row { grid-template-columns: 1fr 1fr 1fr; } .link-row .lr-name { grid-column: 1 / -1; } }
.unl-row { display: grid; grid-template-columns: 1fr 80px 80px; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.chk-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--bg-2); }

/* ---------- Clientes / conversas ---------- */
.habits { margin: 0; padding-left: 18px; }
.habits li { margin: 3px 0; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px; }
.note.reclamacao { border-left: 4px solid var(--red); }
.note.elogio { border-left: 4px solid var(--green); }
.note.resolved { opacity: 0.6; }
.chat { display: grid; grid-template-columns: 320px 1fr; gap: 14px; min-height: 60vh; }
@media (max-width: 860px) { .chat { grid-template-columns: 1fr; } }
.conv { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; margin-bottom: 8px; }
.conv.on { border-color: var(--turq); }
.conv.att { border-color: rgba(236, 30, 121, 0.7); }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 6px; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px; font-size: 0.92rem; white-space: pre-wrap; word-wrap: break-word; }
.bubble.cliente { align-self: flex-start; background: var(--panel-3); border-bottom-left-radius: 4px; }
.bubble.bot { align-self: flex-end; background: rgba(37, 198, 184, 0.18); border-bottom-right-radius: 4px; }
.bubble.atendente { align-self: flex-end; background: rgba(255, 122, 26, 0.2); border-bottom-right-radius: 4px; }
.bubble.sistema { align-self: center; background: none; color: var(--muted); font-size: 0.8rem; text-align: center; }
.bubble small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 2px; }

/* ---------- Gráficos ---------- */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .ax { stroke: rgba(246, 231, 200, 0.12); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--cream-2); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: fixed; z-index: 200; pointer-events: none; background: #0d0806; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 0.82rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); max-width: 280px; }
.tip-t { color: var(--muted); font-size: 0.76rem; margin-bottom: 4px; }
.tip-r { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.tip-r i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tip-r b { color: var(--cream); font-variant-numeric: tabular-nums; }
.tip-r span { color: var(--cream-2); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .band:hover .bar, .chart .band:focus .bar { filter: brightness(1.18); }
.chart .band:focus { outline: none; }
.legend .lk { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 0.88rem; }
.hbar .bar { height: 14px; border-radius: 7px; background: var(--panel-3); overflow: hidden; }
.hbar .bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--turq), var(--turq-2)); }
.hbar .bar i.warm { background: linear-gradient(90deg, var(--orange), var(--magenta)); }
.flowbar { display: flex; height: 44px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.flowbar > div { height: 100%; min-width: 2px; transition: filter 0.15s; cursor: default; }
.flowbar > div:hover { filter: brightness(1.25); }
.progress { height: 12px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--green)); }
.range-row { display: grid; grid-template-columns: 1fr 70px; gap: 10px; align-items: center; }
.range-row input[type='range'] { width: 100%; accent-color: var(--turq); }

/* ---------- Avisos ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 12px; background: #2a1c15; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-weight: 700; font-size: 0.9rem; animation: pop 0.2s ease; }
.toast.ok { border-color: rgba(76, 194, 106, 0.55); }
.toast.err { border-color: rgba(239, 68, 68, 0.65); background: #2b1414; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } }
@keyframes ring { 50% { box-shadow: 0 0 0 6px rgba(236, 30, 121, 0.28); } }
@keyframes late { 50% { box-shadow: inset 0 0 0 999px hsla(0, 80%, 45%, 0.16), 0 0 0 3px rgba(239, 68, 68, 0.35); } }
@keyframes flash { 50% { transform: scale(1.015); box-shadow: 0 0 0 4px rgba(37, 198, 184, 0.5); } }
@keyframes pulseBtn { 50% { box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.35); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; } }

/* ---------- Busca de funções ---------- */
.finder { position: relative; width: 300px; max-width: 100%; }
.finder .input { padding-left: 34px; background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a8957d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 11px center; }
.finder-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; z-index: 60; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); padding: 6px; display: grid; gap: 2px; }
.finder-list button { text-align: left; background: none; border: 0; color: var(--cream); padding: 8px 10px; border-radius: 8px; cursor: pointer; display: grid; gap: 2px; font: inherit; }
.finder-list button small { color: var(--muted); font-size: 0.78rem; }
.finder-list button.on, .finder-list button:hover { background: var(--panel-3); }
.finder-empty { padding: 10px; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 760px) { #finderBox { order: 3; width: 100%; } .finder { width: 100%; } .finder-list { min-width: 0; } }

/* ---------- Funil do cardápio ---------- */
.funnel { display: grid; gap: 14px; margin-top: 14px; }
.fn-step { display: grid; gap: 6px; }
.fn-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fn-head b { font-size: 0.98rem; }
.fn-dot { width: 10px; height: 10px; border-radius: 3px; align-self: center; flex: none; }
.fn-sub { color: var(--muted); font-size: 0.8rem; }
.fn-bar { position: relative; height: 34px; border-radius: 8px; background: var(--panel-2); overflow: hidden; }
.fn-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 8px; opacity: 0.9; transition: width 0.5s ease; }
.fn-num { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: 1.05rem; color: var(--cream); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.fn-rate { font-size: 0.8rem; color: var(--cream-2); padding-left: 18px; position: relative; }
.fn-rate::before { content: '↳'; position: absolute; left: 2px; color: var(--muted); }
.fn-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.fn-foot > div { display: grid; gap: 2px; }
.fn-foot b { font-size: 1.25rem; }
@media (max-width: 760px) { .fn-foot { grid-template-columns: 1fr; } }

/* ---------- Matéria-prima ---------- */
.sp-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .sp-grid { grid-template-columns: 1fr; } }
.sp-period { align-items: flex-end; gap: 6px; }
.sp-period .field { margin: 0; }
.btn.on { border-color: var(--turq); color: var(--turq); background: rgba(37, 198, 184, 0.08); }
.sp-list { display: grid; gap: 8px; }
.sp-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.sp-item.buy { border-color: rgba(37, 198, 184, 0.35); background: linear-gradient(90deg, rgba(37, 198, 184, 0.07), transparent 60%), var(--panel-2); }
.sp-name { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.sp-advice { font-size: 0.82rem; color: var(--cream-2); margin-top: 4px; line-height: 1.45; }
.sp-nums { display: grid; grid-template-columns: repeat(5, minmax(78px, auto)); gap: 4px 14px; text-align: right; }
.sp-nums > div { display: grid; }
.sp-nums span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.sp-nums b { font-size: 0.92rem; }
.sp-nums small { color: var(--muted); font-size: 0.72rem; }
.sp-buy b { color: var(--turq); }
@media (max-width: 900px) { .sp-item { grid-template-columns: 1fr; } .sp-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: left; } }
.sp-cons { border-bottom: 1px solid var(--line); padding: 2px 0; }
.sp-cons summary { display: flex; gap: 10px; align-items: baseline; cursor: pointer; padding: 8px 2px; list-style: none; }
.sp-cons summary::-webkit-details-marker { display: none; }
.sp-cons summary::before { content: '▸'; color: var(--muted); transition: transform 0.15s; }
.sp-cons[open] summary::before { transform: rotate(90deg); }
.sp-total { font-size: 1.02rem; color: var(--cream); }
.sp-cat h3 { margin-top: 0; }
.sp-table td { vertical-align: middle; }
.sp-spark svg { width: 100%; height: 80px; margin-bottom: 10px; }
.sp-recipes { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .sp-recipes { grid-template-columns: 1fr; } }
.sp-ing-list { display: grid; gap: 4px; max-height: 70vh; overflow-y: auto; }
.sp-ing-list h3 { margin: 0 0 6px; }
.sp-ing-list button { display: flex; justify-content: space-between; gap: 8px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--cream); cursor: pointer; font: inherit; }
.sp-ing-list button:hover { background: var(--panel-2); }
.sp-ing-list button.on { background: var(--panel-3); border-color: var(--line-2); }
.rc-row { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); margin-bottom: 6px; }
.rc-kind { width: 22px; text-align: center; }

/* ---------- Indique e ganhe ---------- */
.linklike { background: none; border: 0; padding: 0; color: var(--cream); font: inherit; cursor: pointer; text-align: left; }
.linklike:hover { color: var(--turq); text-decoration: underline; }
.rf-active { display: flex; gap: 14px; align-items: center; padding: 16px 18px; margin-bottom: 14px; border-radius: 16px; border: 1px solid rgba(37, 198, 184, 0.4);
  background: radial-gradient(120% 160% at 0% 0%, rgba(236, 30, 121, 0.18), transparent 55%), radial-gradient(120% 160% at 100% 100%, rgba(37, 198, 184, 0.16), transparent 55%), var(--panel); }
.rf-active b { font-size: 1.1rem; }
.rf-ico { font-size: 2.2rem; line-height: 1; }
.rf-deal-adm { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 0.86rem; color: var(--cream-2); }
.rf-deal-adm b { font-size: 0.86rem; color: var(--cream); }
.rf-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rf-model { display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--cream); cursor: pointer; font: inherit; transition: transform 0.15s, border-color 0.15s, background 0.15s; }
.rf-model:hover { transform: translateY(-2px); border-color: var(--turq); background: var(--panel-3); }
.rf-model span { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.rf-model .rf-mico { font-size: 1.6rem; }
.rf-model .rf-use { color: var(--turq); font-weight: 800; font-size: 0.8rem; margin-top: 2px; }
.rf-rules-adm { display: grid; gap: 10px; }
.rf-rules-adm .switch { align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.rf-rules-adm .switch > span:last-child { display: grid; gap: 2px; }
.rf-rules-adm .switch > span:last-child span { font-size: 0.82rem; color: var(--muted); font-weight: 400; }
.rf-always { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--cream-2); font-size: 0.9rem; }
.sp-catrow td { background: var(--panel-2); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--turq); padding-top: 10px; }
.views-pill { text-decoration: none; cursor: pointer; }
.views-pill:hover { filter: brightness(1.15); }
.offline-banner { background: #5a0b0b; color: #ffe1e1; padding: 10px 18px; font-weight: 800; border-bottom: 2px solid #ff4d4d; animation: offPulse 1.6s ease-in-out infinite; }
@keyframes offPulse { 50% { background: #7a1010; } }
@media (prefers-reduced-motion: reduce) { .offline-banner { animation: none; } }
