/* duymenu — design system */
:root {
  --blue-50: #eef3ff; --blue-100: #dbe5ff; --blue-200: #bccdff; --blue-500: #2b59ff; --blue-600: #1f45e0; --blue-700: #1836b3; --blue-900: #0b1a5c;
  --brand: var(--blue-500); --brand-hover: var(--blue-600); --brand-soft: var(--blue-50); --brand-ink: #fff;
  --accent: #ffb020; --accent-soft: #fff4dc;
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f1f3f9; --surface-3: #e8ebf4;
  --border: #e3e6ef; --border-strong: #cfd4e2;
  --text: #0f1424; --text-2: #4a5269; --text-3: #7d8499;
  --green: #12a150; --green-soft: #e3f7ec; --red: #e5383b; --red-soft: #fde8e8; --amber: #d98200; --amber-soft: #fff3db; --purple: #7a4dff; --purple-soft: #efe9ff; --cyan: #0891b2; --cyan-soft: #e0f6fb;
  --shadow-sm: 0 1px 2px rgba(15, 20, 36, .06);
  --shadow: 0 1px 3px rgba(15, 20, 36, .06), 0 6px 16px -8px rgba(15, 20, 36, .12);
  --shadow-lg: 0 24px 60px -20px rgba(15, 20, 36, .35);
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --sidebar: 248px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #5b7fff; --brand-hover: #7894ff; --brand-soft: #1a2348; --accent-soft: #3a2c0c;
  --bg: #0b0e17; --surface: #121624; --surface-2: #181d2e; --surface-3: #212740;
  --border: #242a3e; --border-strong: #333a55;
  --text: #eef0f7; --text-2: #aab0c6; --text-3: #767d96;
  --green-soft: #0d2c1c; --red-soft: #3a1416; --amber-soft: #33240a; --purple-soft: #231a45; --cyan-soft: #0b2a33;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 6px 16px -8px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-family: var(--font-display); font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--blue-200); color: var(--blue-900); }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.lg { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.tnum { font-variant-numeric: tabular-nums; }

/* ===== Botões ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 550; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; white-space: nowrap; text-decoration: none !important; user-select: none; }
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, .chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 12px -4px rgba(43, 89, 255, .55); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #c92a2d; border-color: #c92a2d; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #0e8a44; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--text-3) transparent var(--text-3) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary.loading::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Formulários ===== */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 550; color: var(--text-2); }
.hint { font-size: 12px; color: var(--text-3); }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:hover { border-color: var(--text-3); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .prefix { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; font-size: 13px; }
.input-group .input { padding-left: 36px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 22px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked { background: var(--brand); border-color: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }
.form-error { color: var(--red); font-size: 13px; }

/* ===== Cards e superfícies ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-header h3 { font-size: 15px; font-weight: 650; }
.card-body { padding: 20px; }
.section-title { font-size: 15px; font-weight: 650; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.blue { background: var(--brand-soft); color: var(--brand); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge.cyan { background: var(--cyan-soft); color: var(--cyan); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; color: var(--text-2); }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip .count { font-size: 11px; background: var(--surface-3); color: var(--text-2); padding: 0 6px; border-radius: 999px; }
.chip.active .count { background: rgba(255,255,255,.2); color: inherit; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; border: 0; background: none; color: var(--text-2); font-weight: 550; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--brand); }

/* ===== Tabelas ===== */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--surface-2); }

/* ===== KPIs ===== */
.kpi { padding: 18px 20px; }
.kpi .kpi-label { font-size: 13px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .kpi-delta { font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.delta-up { color: var(--green); } .delta-down { color: var(--red); }

/* ===== Estados vazios / skeleton ===== */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 4px; }
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--text-2); max-width: 380px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Toast ===== */
#toasts { position: fixed; z-index: 1000; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (max-width: 600px) { #toasts { left: 12px; right: 12px; bottom: 12px; } }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toastIn .25s cubic-bezier(.2,.9,.3,1.2); }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast.error svg { color: #ff7a7c; } .toast.success svg { color: #4ade80; }
.toast.out { animation: toastOut .2s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ===== Modal ===== */
.modal-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(10, 14, 28, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fadeIn .15s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: modalIn .22s cubic-bezier(.2,.9,.3,1.1); border: 1px solid var(--border); }
.modal.lg { max-width: 760px; } .modal.sm { max-width: 400px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; }
.modal-header h2 { font-size: 17px; font-weight: 650; font-family: var(--font); }
.modal-body { padding: 4px 20px 20px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
@media (max-width: 600px) {
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { max-width: none !important; border-radius: 20px 20px 0 0; max-height: 92vh; animation: sheetIn .25s cubic-bezier(.2,.9,.3,1); }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes sheetIn { from { transform: translateY(100%); } }

/* ===== Logo ===== */
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.035em; color: var(--text); text-decoration: none !important; }
.logo img { width: 30px; height: 30px; }
.logo b { color: var(--brand); font-weight: 800; }

/* ===== Layout do painel ===== */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; gap: 4px; overflow-y: auto; }
.sidebar .logo { padding: 4px 10px 14px; }
.store-switch { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 10px; }
.store-switch .avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; overflow: hidden; }
.store-switch .avatar img { width: 100%; height: 100%; object-fit: cover; }
.store-switch .name { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-section { font-size: 11px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--text-2); font-weight: 550; text-decoration: none !important; position: relative; }
.nav-link svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--brand-soft); color: var(--brand); }
.nav-link.active svg { opacity: 1; }
.nav-link .nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nav-link .lock { margin-left: auto; width: 14px; height: 14px; opacity: .5; }
.sidebar-footer { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar h1 { font-family: var(--font); font-size: 18px; font-weight: 650; }
.content { padding: 8px 28px 48px; width: 100%; max-width: 1360px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 20px; }
.page-head h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.page-head p { color: var(--text-2); margin-top: 4px; }
.menu-toggle { display: none; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid; }
.banner svg { width: 18px; height: 18px; flex: none; }
.banner.info { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.banner.warn { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.banner.danger { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.banner .btn { margin-left: auto; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 200; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; }
  .app.nav-open .sidebar { box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 150; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 8px 16px 40px; }
}

/* ===== Página de autenticação ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: radial-gradient(1200px 600px at -10% -10%, #4b74ff 0%, transparent 60%), radial-gradient(800px 500px at 110% 110%, #ffb020 0%, transparent 55%), var(--blue-700); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .logo { color: #fff; } .auth-side .logo b { color: var(--accent); }
.auth-side h2 { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -0.035em; max-width: 440px; }
.auth-side p { opacity: .85; max-width: 420px; margin-top: 12px; font-size: 15px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 28px; letter-spacing: -0.03em; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }
/* Entrar e telas de senha: só o formulário, no meio da tela */
.auth.auth-center { grid-template-columns: 1fr; background: radial-gradient(900px 500px at 50% -20%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%), var(--bg); }
.auth-center .auth-main { min-height: 100vh; }
.auth-center .auth-card { max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 36px 32px; box-shadow: 0 24px 60px -30px rgba(0,0,0,.35); }
@media (max-width: 480px) { .auth-center .auth-card { padding: 28px 20px; border: 0; box-shadow: none; background: transparent; } }

.steps { display: flex; gap: 6px; margin-bottom: 24px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .3s; }
.steps span.on { background: var(--brand); }

.plan-pick { display: grid; gap: 10px; }
.plan-option { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border); cursor: pointer; transition: border-color .15s, background .15s; }
.plan-option:hover { border-color: var(--border-strong); }
.plan-option input { accent-color: var(--brand); width: 18px; height: 18px; }
.plan-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.plan-option .price { margin-left: auto; font-weight: 700; white-space: nowrap; }

/* ===== Pedidos (kanban) ===== */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--surface-2); border-radius: 16px; padding: 10px; min-height: 200px; border: 1px solid var(--border); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 650; font-size: 13.5px; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; }
.col-head .count { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 600; }
.col-list { display: flex; flex-direction: column; gap: 8px; }
.order-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; box-shadow: var(--shadow-sm); }
.order-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.order-card.is-new { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 8%, transparent); } }
.order-card .num { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.order-card .items { color: var(--text-2); font-size: 13px; margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-card .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.order-card .actions { display: flex; gap: 6px; margin-top: 10px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.timer.late { color: var(--red); }

/* ===== Listas de cardápio ===== */
.menu-cat { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.menu-cat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.menu-item:last-child { border-bottom: 0; }
.menu-item .thumb { width: 48px; height: 48px; border-radius: 10px; background: var(--surface-3); object-fit: cover; flex: none; display: grid; place-items: center; color: var(--text-3); }
.menu-item .thumb svg { width: 20px; height: 20px; }
.menu-item.inactive { opacity: .55; }
.price-old { text-decoration: line-through; color: var(--text-3); font-size: 12px; margin-right: 4px; }

.option-group-edit { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface-2); }

/* ===== Checklist ===== */
.checklist { display: flex; flex-direction: column; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); color: var(--text); text-decoration: none !important; }
.check-item:last-child { border-bottom: 0; }
.check-item .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.check-item.done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.check-item.done .tick svg { width: 13px; height: 13px; }
.check-item.done span { color: var(--text-3); text-decoration: line-through; }
.progress { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #7b9bff); border-radius: 8px; transition: width .6s; }

/* ===== Gráficos simples (SVG) ===== */
.chart { width: 100%; height: 220px; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.chart .axis-label { fill: var(--text-3); font-size: 11px; }
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13px; }
.bar-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }

/* ===== Impressão de cupom ===== */
#print-area { display: none; }
@media print {
  @page { margin: 0; }
  body * { visibility: hidden !important; }
  #print-area, #print-area * { visibility: visible !important; }
  #print-area { display: block !important; position: absolute; left: 0; top: 0; }
}
.receipt { font-family: 'Courier New', ui-monospace, monospace; color: #000; background: #fff; font-size: 12px; line-height: 1.35; padding: 4mm 3mm; }
.receipt.w80 { width: 76mm; } .receipt.w58 { width: 54mm; font-size: 11px; }
.receipt h1 { font-size: 16px; text-align: center; margin: 0 0 2px; font-family: inherit; }
.receipt .c { text-align: center; } .receipt .b { font-weight: 700; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.receipt .line { display: flex; justify-content: space-between; gap: 8px; }
.receipt .big { font-size: 18px; font-weight: 700; }

/* ícones dentro de textos */
.kpi-label svg, .check-item > svg, .badge svg, .meta svg, .small svg, .muted svg { width: 15px; height: 15px; flex: none; }
.check-item > svg { margin-left: auto; }
.empty-inline { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--text-3); } .kv dd { margin: 0; }
.timeline { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--border); margin-left: 6px; padding-left: 16px; }
.timeline div { position: relative; padding: 4px 0 10px; font-size: 13px; }
.timeline div::before { content: ''; position: absolute; left: -22px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.item-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.item-line:last-child { border-bottom: 0; }
.qty-pill { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--surface-3); font-weight: 700; font-size: 12.5px; margin-right: 8px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

@media (max-width: 600px) {
  .board { grid-auto-columns: 86%; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .page-head h2 { font-size: 22px; }
}

/* ===== PDV em janela própria ===== */
.pdv-solo .app { grid-template-columns: minmax(0, 1fr); }
.pdv-solo .sidebar, .pdv-solo .menu-toggle { display: none !important; }
.pdv-solo .content { max-width: none; }
.modal.xl { max-width: 1180px; width: calc(100vw - 32px); }

/* ===== PDV por mesas ===== */
.pdv-top { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.pdv-modes button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; font-size: 14px; }
.pdv-modes svg { width: 17px; height: 17px; }
.tm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(240px, 1.2fr); gap: 10px; margin-bottom: 10px; }
.tm-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.tm-stat span { font-size: 12.5px; color: var(--text-3); }
.tm-stat b { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; }
.tm-stat b small { font-size: 14px; color: var(--text-3); font-weight: 600; }
.tm-stat.alert { border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-soft); }
.tm-stat.alert b { color: var(--red); }
.tm-goto { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.tm-goto .input { height: 44px; font-size: 16px; }
.tm-goto .btn { height: 44px; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tm-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 118px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; color: var(--text); transition: transform .12s, box-shadow .12s, border-color .12s; font: inherit; }
.tm-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, var(--shadow-sm)); border-color: var(--border-strong); }
.tm-num { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.tm-num small { font-size: 13px; font-weight: 700; margin-left: 4px; color: inherit; opacity: .75; }
.tm-sub { font-size: 12.5px; color: var(--text-3); }
.tm-card.free { background: var(--surface-2); border-style: dashed; }
.tm-card.free .tm-num { color: var(--text-3); }
.tm-card.busy { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.tm-card.busy .tm-num { color: var(--brand); }
.tm-card.busy .tm-sub { color: var(--text-2); }
.tm-card.partial { background: linear-gradient(180deg, var(--brand-soft), var(--green-soft, var(--brand-soft))); }
.tm-card.bill { background: var(--red-soft); border-color: var(--red); animation: tmPulse 1.6s ease-in-out infinite; }
.tm-card.bill .tm-num { color: var(--red); }
.tm-card.merged { background: var(--surface-2); opacity: .8; }
.tm-card.merged .tm-num { color: var(--text-3); }
@keyframes tmPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 45%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 0%, transparent); } }
.tm-total { font-size: 19px; font-family: var(--font-display); letter-spacing: -0.02em; margin-top: auto; }
.tm-time { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.tm-time svg { width: 13px; height: 13px; }
.tm-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tm-tags .badge { font-size: 10.5px; }

.tm-detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.tm-main { display: flex; flex-direction: column; min-height: 60vh; }
.tm-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.tm-head h2 { font-family: var(--font-display); font-size: 28px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-merged { display: inline-flex; gap: 6px; }
.tm-merged .chip { font-family: var(--font); font-size: 13px; padding-right: 4px; }
.tm-x { border: 0; background: none; cursor: pointer; display: inline-grid; place-items: center; padding: 2px; color: var(--text-3); border-radius: 50%; }
.tm-x:hover { background: var(--surface-3); color: var(--red); }
.tm-x svg { width: 14px; height: 14px; }
.tm-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tm-orders { padding: 6px 16px 16px; overflow-y: auto; }
.tm-order { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.tm-order:last-child { border-bottom: 0; }
.tm-order-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tm-item { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.tm-item.paid { opacity: .55; }
.tm-item.paid b:first-child { text-decoration: line-through; }
.tm-q { min-width: 28px; color: var(--brand); }
.tm-side { position: sticky; top: 76px; display: flex; flex-direction: column; }
.tm-sum { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
.tm-total-row { padding-top: 10px; border-top: 1px solid var(--border); font-size: 16px; }
.tm-rest { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); }
.tm-rest b { font-family: var(--font-display); font-size: 30px; letter-spacing: -0.03em; }
.tm-rest.ok { background: var(--green-soft, var(--brand-soft)); color: var(--green); }
.tm-people { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tm-pay-buttons { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tm-pay-buttons .btn-lg { height: 56px; font-size: 17px; }
.tm-payments { padding: 4px 16px 16px; }
.tm-payment { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }

/* modal de recebimento */
.pm-target { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); }
.pm-target b { font-family: var(--font-display); font-size: 32px; letter-spacing: -0.03em; }
.pm-row { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; }
.pm-methods { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pm-method { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.pm-method svg { width: 20px; height: 20px; }
.pm-method.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pm-change { padding: 12px 16px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.pm-equal { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px; }
.pm-items { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.pm-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 4px 8px 4px 4px; }
.pm-item.on { border-color: var(--brand); background: var(--brand-soft); }
.pm-item-main { flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 8px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.pm-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.pm-item.on .pm-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.pm-check svg { width: 14px; height: 14px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; }
.tp-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font: inherit; color: var(--text-2); }
.tp-btn b { font-size: 18px; color: var(--text); }
.tp-btn span { font-size: 11px; }
.tp-btn.busy { background: var(--brand-soft); }
.tp-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tp-btn.on b { color: #fff; }

/* lançar itens */
.lp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; min-height: 60vh; }
.lp-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; overflow-y: auto; max-height: 56vh; align-content: start; }
.lp-prod { display: flex; flex-direction: column; gap: 6px; text-align: left; min-height: 92px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.lp-prod:hover { border-color: var(--brand); }
.lp-prod:disabled { opacity: .5; cursor: not-allowed; }
.lp-right { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); min-height: 0; }
.lp-cart { flex: 1; overflow-y: auto; padding: 6px 12px; max-height: 50vh; }
.lp-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.lp-foot { padding: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 1100px) {
  .tm-detail, .lp { grid-template-columns: 1fr; }
  .tm-side { position: static; }
  .tm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-goto { grid-column: 1 / -1; }
  .pm-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
[hidden] { display: none !important; }

/* ===== Caixa: conferência no fechamento e resumo ===== */
.cash-check { display: grid; gap: 10px; }
.cash-check-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 120px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.cash-check-row > div:first-child { display: grid; gap: 2px; }
.cash-diff { font-size: 13px; font-weight: 600; text-align: right; }
.cash-diff.ok { color: var(--green); } .cash-diff.bad { color: var(--red); }
@media (max-width: 560px) { .cash-check-row { grid-template-columns: 1fr; } .cash-diff { text-align: left; } }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.stat-mini { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.stat-mini span { font-size: 12px; color: var(--text-3); } .stat-mini b { font-size: 17px; font-variant-numeric: tabular-nums; }
.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); font-size: 13.5px; }
.alert.amber { background: var(--amber-soft); color: var(--text); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.alert.red { background: var(--red-soft); color: var(--text); border-color: color-mix(in srgb, var(--red) 35%, transparent); }

/* ===== Faixa de conexão (servidor / Wi-Fi) ===== */
.conn-bar { position: fixed; left: 50%; top: 10px; transform: translate(-50%, -140%); visibility: hidden; z-index: 9000; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: min(720px, calc(100vw - 24px)); padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.35; box-shadow: 0 10px 30px rgba(15, 20, 36, .22); transition: transform .25s ease, visibility .25s; pointer-events: none; }
.conn-bar.show { transform: translate(-50%, 0); pointer-events: auto; visibility: visible; }
.conn-bar.off { background: #b3261e; color: #fff; }
.conn-bar.warn { background: #8a5200; color: #fff; }
.conn-bar.ok { background: #12703f; color: #fff; }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.conn-bar.off .conn-dot { animation: conn-pulse 1s ease-in-out infinite; }
@keyframes conn-pulse { 50% { opacity: .25; } }
.conn-pend { border: 0; border-radius: 999px; padding: 6px 12px; background: #fff; color: #111; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.pend-list { display: grid; gap: 8px; }
.pend-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.pend-item > div:first-child { display: grid; gap: 2px; }
@media (prefers-reduced-motion: reduce) { .conn-bar { transition: none; } .conn-bar.off .conn-dot { animation: none; } }

/* ===== Cadastro de mesas ===== */
.tb-group { margin-bottom: 20px; }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tb-card { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-height: 92px; transition: border-color .15s, transform .15s; }
.tb-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.tb-card.off { opacity: .55; border-style: dashed; }
.tb-num { font-family: var(--font-display, inherit); font-size: 24px; font-weight: 800; line-height: 1; }
.tb-name { font-size: 12.5px; color: var(--text-2); min-height: 16px; }
.tb-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.tb-meta svg { width: 14px; height: 14px; }
.area-head { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 8px 0 -2px; }

/* ===== Início: agora na loja ===== */
.now { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.now:empty { display: none; }
.now-tile { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; border-left: 5px solid var(--border-strong); }
.now-tile:hover { border-color: var(--brand); border-left-color: var(--brand); }
.now-tile:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.now-tile.ok { border-left-color: var(--green); }
.now-tile.warn { border-left-color: var(--amber); background: var(--amber-soft); }
.now-tile.alert { border-left-color: var(--red); background: var(--red-soft); }
.now-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.now-value { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.now-sub { font-size: 12.5px; color: var(--text-2); }
@media (max-width: 560px) { .now-value { font-size: 21px; } .now-tile { padding: 12px; } }

/* ===== QR code dos apps ===== */
.qr-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 16px; }
.qr-img { width: 190px; height: 190px; border-radius: 12px; border: 1px solid var(--border); background: #fff; padding: 6px; }
@media (max-width: 640px) { .qr-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* Celular: os botões do topo (ex.: Suprimento, Sangria, Fechar caixa) descem para uma linha própria
   e rolam dentro dela, em vez de empurrar a página para o lado. */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; height: auto; min-height: 60px; padding-top: 8px; padding-bottom: 8px; row-gap: 8px; }
  #topActions:not(:empty) { order: 3; flex: 1 0 100%; min-width: 0; display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  #topActions > * { flex: none; }
}

/* PDV: busca de cliente no balcão */
.cust-results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md, 0 12px 30px -12px rgba(0,0,0,.25)); max-height: 280px; overflow-y: auto; }
.cust-result { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.cust-result:last-child { border-bottom: 0; }
.cust-result:hover, .cust-result:focus-visible { background: var(--surface-2); outline: none; }
