/* Taanotado — painel, acesso e componentes compartilhados */
:root {
  --ink: #0c3325;
  --ink-2: #4b5f57;
  --ink-3: #7b8c85;
  --bg: #fdf8ee;
  --paper: #ffffff;
  --line: #ece4d6;
  --line-2: #f6efe3;
  --nav: #0c3325;
  --nav-2: #134434;
  --brand: #f3621f;
  --brand-600: #d4501a;
  --brand-50: #ffeee4;
  --yolk: #f3621f;
  --yolk-50: #ffeee4;
  --ok: #12874a;
  --ok-50: #e3f4ea;
  --danger: #d14343;
  --danger-50: #fdeeee;
  --blue: #2f6fd6;
  --blue-50: #eaf1fd;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(12, 51, 37, .06), 0 4px 14px rgba(12, 51, 37, .05);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.ic { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: 600 .95rem var(--font); cursor: pointer;
  text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #d8cfbf; background: #fffcf7; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #164a39; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-50); border-color: #f0c4c4; }
.btn-whats { background: #1faa59; border-color: #1faa59; color: #fff; }
.btn-whats:hover { background: #188f4a; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: #d8cfbf; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-50); }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.hint { font-size: .8rem; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink); font: 400 .95rem var(--font);
}
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(243, 98, 31, .2); }
.input.ok { border-color: var(--brand); }
.input.bad { border-color: var(--danger); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; }
.input-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(243, 98, 31, .2); }
.input-group .addon { display: flex; align-items: center; padding: 0 12px; background: var(--line-2); color: var(--ink-2); font-size: .9rem; white-space: nowrap; border-right: 1px solid var(--line); }
.input-group .input { border: 0; border-radius: 0; box-shadow: none !important; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.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; } .row { flex-direction: column; } }

/* Interruptor */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: #d8d0c2; position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.toggle-row:first-child { border-top: 0; }
.toggle-row .t { font-weight: 600; }
.toggle-row .d { font-size: .85rem; color: var(--ink-3); margin-top: 2px; }

/* Escolha segmentada */
.seg { display: inline-flex; padding: 3px; background: var(--line-2); border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: 600 .88rem var(--font); color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Cartões de opção grandes */
.choice { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; font: inherit; color: inherit; }
.choice:hover { border-color: #d4cab8; }
.choice.on, .choice[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-50); }
.choice .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--line-2); display: grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.choice.on .ico { background: #fff; color: var(--brand-600); }
.choice b { display: block; }
.choice small { color: var(--ink-3); }

/* ---------- Painéis / superfícies ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.green { background: var(--ok-50); color: var(--ok); }
.badge.yolk { background: var(--yolk-50); color: #a8410f; }
.badge.red { background: var(--danger-50); color: var(--danger); }
.badge.blue { background: var(--blue-50); color: var(--blue); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty .ic { margin: 0 auto 10px; color: #bfb6a6; }
.empty b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }
hr.sep { border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .8rem; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: toastIn .2s ease-out; max-width: 92vw; }
.toast.err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 30, 22, .5); }
.modal-box { background: var(--paper); border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: modalIn .18s ease-out; }
.modal-box.wide { max-width: 760px; }
.modal-box.narrow { max-width: 420px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); }
.modal-head p { color: var(--ink-3); font-size: .88rem; margin-top: 2px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
@media (max-width: 640px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 18px 18px 0 0; max-height: 92vh; }
}

/* ============ Layout do painel ============ */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--nav); color: #d6e7df; padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.side .store-id { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px; }
.side .store-id img, .side .store-id .ph { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--nav-2); display: grid; place-items: center; color: #fff; font-weight: 800; }
.side .store-id b { color: #fff; display: block; font-size: .98rem; line-height: 1.2; }
.side .store-id small { color: #8fb3a3; font-size: .78rem; }
.side .store-id a { color: #ffb48f; font-size: .78rem; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c1d8cd; font-weight: 500; text-decoration: none; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: rgba(255,255,255,.1); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--yolk); }
.side nav a .count { margin-left: auto; background: var(--yolk); color: #ffffff; font-size: .72rem; font-weight: 800; border-radius: 99px; padding: 1px 7px; }
.side .plan-box { margin-top: auto; padding: 12px; border-radius: 12px; background: var(--nav-2); font-size: .85rem; }
.side .plan-box b { color: #fff; }
.side .plan-box a { color: var(--yolk); font-weight: 700; }
.side .bottom-links a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: #8fb3a3; font-size: .88rem; text-decoration: none; }
.side .bottom-links a:hover { color: #fff; }

.main { min-width: 0; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--ink-3); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wrap { max-width: 1180px; }

.mobile-top, .tabbar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 16px 14px 96px; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--nav); color: #fff; position: sticky; top: 0; z-index: 50; }
  .mobile-top b { font-size: 1rem; }
  .mobile-top a { color: #ffb48f; font-size: .82rem; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--paper); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 .7rem var(--font); color: var(--ink-3); background: none; border: 0; padding: 4px 0; text-decoration: none; cursor: pointer; position: relative; }
  .tabbar .on { color: var(--brand-600); }
  .tabbar .dot { position: absolute; top: 0; right: calc(50% - 18px); background: var(--yolk); color: #ffffff; font-size: .65rem; border-radius: 99px; padding: 0 5px; font-weight: 800; }
  .page-head h1 { font-size: 1.4rem; }
}
.more-menu { position: fixed; inset: 0; z-index: 80; background: rgba(8,30,22,.45); display: flex; align-items: flex-end; }
.more-menu .sheet { background: var(--paper); width: 100%; border-radius: 18px 18px 0 0; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); }
.more-menu .sheet a { display: flex; align-items: center; gap: 12px; padding: 14px 12px; color: var(--ink); font-weight: 600; border-radius: 10px; text-decoration: none; }
.more-menu .sheet a:hover { background: var(--line-2); }

/* Barra do link da loja */
.linkbar { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.linkbar .lbl { font-size: .8rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.linkbar code { flex: 1; min-width: 0; font: 600 .9rem var(--font); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbar .tools { display: flex; gap: 6px; }
@media (max-width: 640px) { .linkbar .lbl { display: none; } }

/* Indicadores do dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.kpi { background: var(--paper); padding: 18px 20px; }
.kpi .v { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .l { color: var(--ink-3); font-size: .85rem; margin-top: 2px; }
.kpi .v.alert { color: #a77800; }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi .v { font-size: 1.35rem; } }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 10px 4px 0; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; max-width: 44px; border-radius: 6px 6px 2px 2px; background: var(--brand); min-height: 3px; }
.bars .b.today i { background: var(--nav); }
.bars .b span { font-size: .75rem; color: var(--ink-3); }
.bars .b em { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--ink-2); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ Produtos ============ */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; }
.cat-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.cat-pills::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font: 600 .86rem var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill .n { opacity: .65; margin-left: 4px; font-weight: 500; }
.cat-block { margin-bottom: 18px; }
.cat-block > header { display: flex; align-items: center; gap: 10px; padding: 0 4px 8px; }
.cat-block > header h3 { font-size: 1rem; }
.prod-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line-2); background: var(--paper); }
.prod-row:first-child { border-top: 0; }
.prod-row.off { opacity: .55; }
.prod-row .thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--line-2); display: grid; place-items: center; color: #bfb6a6; flex-shrink: 0; }
.prod-row .info { flex: 1; min-width: 0; }
.prod-row .info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-row .info .meta { font-size: .82rem; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.prod-row .price { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prod-row .price s { display: block; font-weight: 400; color: var(--ink-3); font-size: .8rem; }
.prod-row .acts { display: flex; gap: 6px; align-items: center; }
.drag { cursor: grab; color: #bfb6a6; }
.prod-row.dragging { opacity: .4; }
@media (max-width: 640px) { .prod-row { flex-wrap: wrap; } .prod-row .acts { width: 100%; justify-content: flex-end; } .drag { display: none; } }

/* Formulário de produto */
.form-section { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.form-section > h4 { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin-bottom: 14px; }
.img-pick { display: flex; gap: 14px; align-items: center; }
.img-pick .prev { width: 88px; height: 88px; border-radius: 12px; background: var(--line-2) center/cover no-repeat; display: grid; place-items: center; color: #bfb6a6; flex-shrink: 0; border: 1px dashed #d8d0c2; }
.group-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fffdf9; }
.group-card .opt { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; margin-bottom: 8px; }
.locked { position: relative; }
.locked::after { content: attr(data-plan); position: absolute; top: -9px; right: 10px; background: var(--yolk); color: #ffffff; font-size: .7rem; font-weight: 800; padding: 1px 8px; border-radius: 99px; }

/* ============ Pedidos: quadro de comandas ============ */
.status-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: thin; }
.status-tabs button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font: 600 .85rem var(--font); color: var(--ink-2); cursor: pointer; }
.status-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.status-tabs .c { background: var(--line-2); color: var(--ink-2); border-radius: 99px; padding: 0 7px; font-size: .75rem; }
.status-tabs button.on .c { background: rgba(255,255,255,.18); color: #fff; }
.scope-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--blue-50); color: #24508f; border-radius: 10px; font-size: .88rem; margin-bottom: 14px; flex-wrap: wrap; }
.scope-note button { background: none; border: 0; color: #24508f; font: 700 .88rem var(--font); text-decoration: underline; cursor: pointer; padding: 0; }

.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.ticket {
  position: relative; background: var(--paper); border-radius: 10px 10px 0 0; padding: 16px 16px 22px;
  box-shadow: 0 1px 2px rgba(12,51,37,.08), 0 -2px 14px rgba(12,51,37,.05);
  border-top: 5px solid var(--line); margin-bottom: 8px;
}
/* picote da comanda */
.ticket::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background: radial-gradient(circle at 7px 8px, transparent 5px, var(--paper) 5.5px) 0 0 / 14px 8px repeat-x;
  filter: drop-shadow(0 2px 1px rgba(12,51,37,.07));
}
.ticket.st-pendente { border-top-color: var(--yolk); }
.ticket.st-pendente.fresh { animation: fresh 1.2s ease-out 2; }
@keyframes fresh { 50% { box-shadow: 0 0 0 4px rgba(243,98,31,.45), 0 6px 16px rgba(12,51,37,.06); } }
.ticket.st-confirmado, .ticket.st-em_preparo, .ticket.st-em_separacao { border-top-color: var(--blue); }
.ticket.st-pronto, .ticket.st-disp_retirada, .ticket.st-avisou_motoboy, .ticket.st-saiu_entrega { border-top-color: #7b5cd6; }
.ticket.st-entregue { border-top-color: var(--ok); }
.ticket.st-cancelado { border-top-color: var(--danger); opacity: .75; }
.ticket .t-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ticket .t-num { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ticket .t-time { font-size: .8rem; color: var(--ink-3); }
.ticket .t-total { text-align: right; }
.ticket .t-total b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.ticket .t-total small { display: block; font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.ticket .t-cust { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.ticket .t-cust .av { width: 34px; height: 34px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; font-weight: 800; color: var(--ink-2); flex-shrink: 0; }
.ticket .t-cust a { font-size: .82rem; }
.ticket .t-items { font-size: .9rem; margin-bottom: 10px; }
.ticket .t-items li { list-style: none; padding: 2px 0; }
.ticket .t-items ul { margin: 0; padding: 0; }
.ticket .t-items .sub { color: var(--ink-3); font-size: .8rem; padding-left: 18px; }
.ticket .t-addr { font-size: .84rem; color: var(--ink-2); display: flex; gap: 6px; margin-bottom: 8px; }
.ticket .t-pay { font-size: .84rem; background: var(--line-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.ticket .t-tools { display: flex; gap: 6px; }
.ticket .t-status { margin-top: 12px; }
.ticket .t-status select { font-weight: 700; }
.ticket details { font-size: .8rem; color: var(--ink-3); margin-bottom: 8px; }
.ticket details summary { cursor: pointer; }

/* ============ PDV ============ */
.pdv { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.pdv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pdv-item { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 10px; cursor: pointer; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.pdv-item:hover { border-color: var(--brand); }
.pdv-item .ph { aspect-ratio: 4/3; border-radius: 8px; background: var(--line-2) center/cover no-repeat; }
.pdv-item b { font-size: .88rem; line-height: 1.25; }
.pdv-item span { font-weight: 700; color: var(--brand-600); font-size: .9rem; }
.pdv-item.off { opacity: .5; }
.pdv-cart { position: sticky; top: 16px; }
.pdv-line { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.pdv-line .n { flex: 1; min-width: 0; font-size: .9rem; }
.pdv-line .n small { display: block; color: var(--ink-3); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; }
.qty button { width: 30px; height: 30px; border: 0; background: none; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals { font-size: .92rem; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-size: 1.25rem; font-weight: 800; padding-top: 8px; }
@media (max-width: 1000px) { .pdv { grid-template-columns: 1fr; } .pdv-cart { position: static; } }

/* ============ Configurações ============ */
.settings { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: .92rem; text-decoration: none; }
.settings-nav a:hover { background: var(--paper); color: var(--ink); }
.settings-nav a.on { background: var(--paper); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.settings section { scroll-margin-top: 16px; margin-bottom: 18px; }
.settings section > .panel-pad > h2 { margin-bottom: 4px; }
.settings section > .panel-pad > .lead { color: var(--ink-3); font-size: .9rem; margin-bottom: 16px; }
.save-state { font-size: .8rem; color: var(--ink-3); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.swatch { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; cursor: pointer; position: relative; }
.swatch.on { border-color: var(--ink); box-shadow: inset 0 0 0 2px #fff; }
.hours-row { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 10px; align-items: center; padding: 6px 0; }
.upsell { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--yolk-50); border-radius: 10px; font-size: .88rem; color: #9a3c0e; margin-bottom: 14px; }
.upsell a { font-weight: 700; color: #9a3c0e; text-decoration: underline; }
@media (max-width: 900px) {
  .settings { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .settings-nav a { white-space: nowrap; }
  .hours-row { grid-template-columns: 1fr 1fr; }
  .hours-row > :first-child { grid-column: 1 / -1; }
}

/* ============ Planos ============ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border: 2px solid var(--nav); }
.plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--ink-3); }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.plan li { display: flex; gap: 8px; }
.plan li .ic { color: var(--brand); margin-top: 2px; }
.plan .cta { margin-top: auto; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.pix-box { text-align: center; }
.pix-box img { width: 220px; height: 220px; margin: 0 auto 12px; image-rendering: pixelated; }
.pix-box textarea { font-size: .78rem; min-height: 70px; }

/* ============ Acesso (login / cadastro) ============ */
.auth { display: grid; grid-template-columns: minmax(380px, 1fr) 1fr; min-height: 100vh; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(24px, 6vw, 88px); background: var(--paper); }
.auth-form .inner { width: 100%; max-width: 420px; }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; color: var(--ink); text-decoration: none !important; margin-bottom: 36px; }
.brand-mark .logo-mark { display: block; flex-shrink: 0; }
.auth h1 { font-size: 2rem; margin-bottom: 8px; }
.auth .lead { color: var(--ink-2); margin-bottom: 26px; }
.auth-side { background: var(--nav); color: #e2efe8; padding: 48px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: 1.6rem; max-width: 420px; margin-bottom: 22px; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.auth-side li { display: flex; gap: 10px; align-items: flex-start; }
.auth-side li .ic { color: var(--yolk); margin-top: 2px; }
.auth-side .demo-ticket { margin-top: 36px; max-width: 320px; background: #fff; color: var(--ink); border-radius: 10px 10px 0 0; padding: 16px; position: relative; font-size: .86rem; transform: rotate(-2deg); }
.auth-side .demo-ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: radial-gradient(circle at 7px 8px, transparent 5px, #fff 5.5px) 0 0 / 14px 8px repeat-x; }
.auth-side .demo-ticket b.n { font-size: 1.3rem; }
.steps-bar { display: flex; gap: 4px; margin-bottom: 26px; }
.steps-bar i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.steps-bar i.on { background: var(--brand); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .9rem; background: none; border: 0; cursor: pointer; padding: 0; margin-bottom: 18px; font-family: var(--font); }
.back-link:hover { color: var(--ink); }
.step { animation: stepIn .2s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateX(8px); } }
.code-inputs { display: flex; gap: 8px; }
.code-inputs input { width: 100%; height: 56px; text-align: center; font: 800 1.4rem var(--font); border: 1px solid var(--line); border-radius: 10px; }
.code-inputs input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(243,98,31,.2); }
.slug-msg { font-size: .82rem; margin-top: 6px; font-weight: 600; }
.slug-msg.ok { color: var(--brand-600); }
.slug-msg.bad { color: var(--danger); }
.done-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; margin-bottom: 18px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-form { padding: 28px 22px; justify-content: flex-start; } .brand-mark { margin-bottom: 24px; } }

/* Impressão do QR */
.qr-poster { max-width: 420px; margin: 40px auto; text-align: center; padding: 32px; border: 2px solid var(--ink); border-radius: 18px; background: #fff; }
.qr-poster #qr { display: inline-block; margin: 20px 0; }
@media print { .no-print { display: none !important; } body { background: #fff; } .qr-poster { margin: 0 auto; } }

/* ===== Tipografia da marca Taanotado (Fredoka nos títulos, Nunito no texto) ===== */
:root { --font-display: "Fredoka", "Nunito", system-ui, sans-serif; }
h1, h2, h3, .kpi .v, .ticket .t-num, .plan .price, .brand-mark, .auth h1, .done-ico + h1 { font-family: var(--font-display); }
h1 { font-weight: 700; letter-spacing: -.015em; }
h2, h3 { font-weight: 600; letter-spacing: -.005em; }
.kpi .v, .ticket .t-num, .plan .price { font-weight: 600; letter-spacing: -.01em; }
.btn { font-weight: 700; }
.btn-lg, .btn-primary.btn-lg { border-radius: 999px; }
.wordmark { display: block; }
.side .side-brand { padding: 2px 8px 14px; }
.billing-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; }
.billing-bar.trial { background: var(--brand-50); color: #8a3a10; }
.billing-bar.grace, .billing-bar.blocked { background: var(--danger-50); color: #9b2c2c; }
.billing-bar .btn { margin-left: auto; }
.admin-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #fff3c4; color: #5a4300; font-size: .88rem; font-weight: 700; }
.admin-bar a { color: #5a4300; text-decoration: underline; margin-left: auto; }
.price-hero { font-family: var(--font-display); font-size: 3rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.price-hero small { font-family: var(--font); font-size: 1rem; font-weight: 600; color: var(--ink-3); }
.status-pill-lg { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-weight: 800; font-size: .9rem; }
.status-pill-lg.trial { background: var(--brand-50); color: #a8410f; }
.status-pill-lg.active, .status-pill-lg.exempt { background: var(--ok-50); color: var(--ok); }
.status-pill-lg.grace, .status-pill-lg.blocked { background: var(--danger-50); color: var(--danger); }

/* ---------- Admin da plataforma ---------- */
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.admin-brand span { background: var(--brand); color: #fff; font: 700 .7rem var(--font); text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 99px; }
.mobile-top .admin-brand { padding: 0; }
.admin-mnav { display: none; }
@media (max-width: 900px) {
  .admin-mnav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px; background: var(--nav-2); scrollbar-width: none; }
  .admin-mnav a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; color: #c1d8cd; font-weight: 700; font-size: .85rem; text-decoration: none; }
  .admin-mnav a.on { background: #fff; color: var(--ink); }
  body.admin .main { padding-bottom: 40px; }
}
.status-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.status-strip a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.status-strip a:hover { border-color: #d8cfbf; }
.status-strip .status-pill-lg { font-size: .78rem; padding: 4px 10px; }
.status-strip b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
@media (max-width: 1000px) { .status-strip { grid-template-columns: repeat(2, 1fr); } .status-strip a:last-child { grid-column: span 2; } }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; height: 220px; padding: 20px 20px 8px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.bar { width: 100%; max-width: 56px; background: var(--brand); border-radius: 8px 8px 3px 3px; }
.bar-col:last-child .bar { background: var(--ink); }
.bar-v { font-size: .75rem; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar-l { font-size: .8rem; font-weight: 700; color: var(--ink-2); text-transform: capitalize; }
.bar-n { font-size: .72rem; color: var(--ok); font-weight: 700; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-50); border-color: #f1c4c4; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-stats div { background: var(--line-2); border-radius: 10px; padding: 10px 12px; }
.mini-stats b { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.mini-stats span { font-size: .78rem; color: var(--ink-3); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 20px; }
.filter-bar .field { margin: 0; min-width: 150px; }
.cfg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.cfg-row b { overflow-wrap: anywhere; text-align: right; }
.copy-line { display: flex; gap: 8px; }
.copy-line .input { font-size: .82rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
.howto { background: var(--brand-50); border-radius: 12px; padding: 12px 14px; margin: 14px 0; font-size: .88rem; }
.howto ol { margin: 6px 0 0; padding-left: 20px; }
.howto code { background: #fff; padding: 1px 6px; border-radius: 5px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box .ic { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.search-box .input { padding-left: 38px; min-width: 260px; }
.status-tabs a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font: 700 .85rem var(--font); color: var(--ink-2); text-decoration: none; }
.status-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.status-tabs a.on .c { background: rgba(255,255,255,.18); color: #fff; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 5px 12px; font: 700 .85rem var(--font); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand-600); }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
@media (max-width: 640px) { .search-box .input { min-width: 0; width: 100%; } .page-head .actions, .search-box { width: 100%; } }

.log-scroll { max-height: 520px; overflow-y: auto; }
@media (max-width: 760px) { .table-wrap .table { min-width: 580px; } }
.evo-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.evo-qr { margin-top: 14px; text-align: center; }
.evo-qr img { width: 260px; max-width: 100%; margin: 0 auto 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
