/* Menuza Admin e Portal: as cores vêm de 3 escolhas do Admin (principal, fundo e destaque) e de tokens derivadas delas. Sem tema escuro automático. */
:root {
  --bg: #FFF9EA; --surface: #FFFFFF; --fg: #1E0B25; --muted: #786A74; --line: #E4DCD2;
  --brand: #4B1B5C; --brand-ink: #FFFFFF; --accent: #E0A100; --accent-ink: #1A1A1A;
  --side: #4B1B5C; --side-fg: #EDE8EF; --side-muted: #C0AFC6; --side-active: #E0A100; --side-active-ink: #1A1A1A;
  --btn: #E0A100; --btn-ink: #1A1A1A; --btn-hover: #E8B940;
  --hover: #F2EBDE; --focus: #4B1B5C;
  --ok: #1B6B45; --ok-bg: #E2F3E9; --warn: #8A5200; --warn-bg: #FFEFCC;
  --danger: #A8261E; --danger-bg: #FCE5E3; --info: #38489A; --info-bg: #E7EAFA; --muted-bg: #EFE8DC;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--body); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-fg); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }
.sidebar > * { flex-shrink: 0; }
.logo { font-family: var(--display); font-weight: 800; font-size: 24px; padding: 0 10px; display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--side-fg); }
.logo small { font: 600 11px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--side-fg); font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a.active { background: var(--side-active); color: var(--side-active-ink); font-weight: 700; }
.side-foot { margin-top: auto; padding: 0 10px; font-size: 13px; color: var(--side-muted); }
.side-foot b { display: block; color: var(--side-fg); font-weight: 600; }
.side-foot button { all: unset; cursor: pointer; text-decoration: underline; margin-top: 6px; color: var(--accent); }

.content { padding: 28px max(20px, 3vw); min-width: 0; max-width: 1180px; width: 100%; }
/* Desktop: o painel ocupa a tela; o menu e o conteúdo rolam cada um por conta própria (a página não rola). O conteúdo
   ocupa a coluna inteira (barra de rolagem na borda da tela) e o recuo à direita mantém o texto em até 1180px. */
@media (min-width: 761px) {
  html:has(> body > .app), body:has(> .app) { height: 100%; overflow: hidden; }
  .app { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .app > .sidebar { height: auto; min-height: 0; }
  .app > .content { height: 100%; overflow-y: auto; overscroll-behavior: contain; max-width: none; padding-right: max(max(20px, 3vw), calc(100% - 1180px + max(20px, 3vw))); }
  .app.wide > .content { padding-right: max(20px, 3vw); }
}
@media print {
  .app, .app > .content { height: auto; overflow: visible; }
}
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat span { display: block; font-size: 13px; color: var(--muted); }
.stat strong { display: block; font: 800 24px var(--display); margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12px; }
.stat.alert strong { color: var(--danger); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 14px var(--body); cursor: pointer; text-decoration: none; text-align: center; line-height: 1.25; }
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field[hidden] { display: none; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
input:not([type]), input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); font: inherit; min-width: 0; }
input:not([type]), input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], select, textarea { transition: border-color .15s, box-shadow .15s, background-color .15s; }
input:not([type]):focus, input[type=text]:focus, input[type=tel]:focus, input[type=email]:focus, input[type=password]:focus, input[type=number]:focus, input[type=date]:focus, input[type=month]:focus, input[type=search]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
textarea { min-height: 80px; resize: vertical; }
/* Valor em reais (data-money, public/js/money-input.js): "R$" dentro do campo, mesma altura dos selects, erro em vermelho. */
.money { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
.field > .money, .pay-split .money { display: block; width: 100%; }
.money-prefix { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.money input { padding-left: 36px; font-variant-numeric: tabular-nums; }
input.is-invalid, select.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.pay-split { display: flex; flex-direction: column; gap: 10px; }
.pay-split-rest { margin: -4px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--hover); font-size: 14px; }
.pay-split-rest[hidden], .pay-split-error[hidden] { display: none; }
.pay-split-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 600; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.error { color: var(--danger); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-foot { display: flex; gap: 8px; margin-top: 18px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; padding: 5px 8px; font-size: 13px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; }
.table a.row-link { font-weight: 600; text-decoration: none; }
.table a.row-link:hover { text-decoration: underline; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--muted-bg); color: var(--muted); }
.badge-accent { background: var(--accent); color: var(--accent-ink); }

.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash code { background: var(--surface); color: var(--fg); padding: 2px 8px; border-radius: 6px; font-size: 15px; user-select: all; }

.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.module-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 110px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.module-row:last-of-type { border-bottom: 0; }
.module-row b { display: block; }
.total { display: flex; justify-content: space-between; padding-top: 12px; font-weight: 700; font-size: 16px; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-art { background: var(--side); color: var(--side-fg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .logo { font-size: 34px; padding: 0; }
.login-art p { font: 700 clamp(26px, 3vw, 38px)/1.15 var(--display); max-width: 14em; margin: 0; }
.login-art p em { font-style: normal; color: var(--accent); }
.login-art::after { content: ""; position: absolute; right: -90px; bottom: -90px; width: 300px; height: 300px; border-radius: 50%; background: var(--accent); opacity: .95; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px max(20px, 4vw); }
.login-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; }
  .nav { flex-direction: row; flex-wrap: wrap; order: 3; width: 100%; }
  .side-foot { margin-top: 0; margin-left: auto; padding: 0; text-align: right; }
  .content { padding: 20px 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 20px 40px; min-height: 200px; }
  .login-art::after { width: 160px; height: 160px; right: -50px; bottom: -60px; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: no-preference) { .btn { transition: background .15s; } }

/* Aparência do cardápio */
.head-logo { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; vertical-align: middle; margin-right: 8px; border: 1px solid var(--line); background: var(--surface); }
.store-cell { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--muted-bg); color: var(--muted); font: 700 14px var(--display); display: grid; place-items: center; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; align-items: start; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 72px; height: 72px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: var(--surface); flex: none; text-align: center; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.palettes { display: flex; gap: 8px; flex-wrap: wrap; }
.palette { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--fg); font: 600 13px var(--body); cursor: pointer; }
.palette:hover { background: var(--hover); }
.dots { display: inline-flex; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); margin-left: -4px; }
.dots i:first-child { margin-left: 0; }
.color-field input[type=color] { width: 100%; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.flash-warn { background: var(--warn-bg); color: var(--warn); margin: 0; }

/* Prévia do cardápio no celular: tela de 360 px (a mesma medida do cardápio real) reduzida para caber na coluna. */
.mini { --p: #B93A0B; --p-ink: #fff; --s: #FFF6EC; --s-ink: #1A1A1A; --a: #FFB703; --a-ink: #1A1A1A; width: 270px; border: 5px solid #17141A; border-radius: 28px; overflow: hidden; background: var(--s); position: relative; }
.mini-clip { width: 260px; height: 470px; overflow: hidden; position: relative; }
.mini-screen { --logo: 84px; --hang: 42px; --logo-left: 4px; width: 360px; height: 651px; transform: scale(.7222); transform-origin: top left; background: var(--s); color: var(--s-ink); font-size: 14px; line-height: 1.4; position: relative; overflow: hidden; }
.bp-hero { padding: 12px 16px 0; }
.bp-wrap { position: relative; }
.cover-img { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.cover-pic { position: absolute; inset: 0; background-repeat: no-repeat; background-size: calc(max(100cqw, 100cqh * var(--r, 1.6)) * var(--z, 1)) auto; background-position: var(--cx, 50%) var(--cy, 50%); }
.bp-cover, .pos-cover { position: relative; overflow: hidden; }
.pos-cover { cursor: grab; touch-action: none; }
.pos-cover.dragging { cursor: grabbing; }
.cover-desk { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; border-top: 2px dashed #fff; border-bottom: 2px dashed #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.25); }
.cover-desk[hidden] { display: none; }
.cover-desk span { position: absolute; right: 6px; top: 2px; padding: 1px 6px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-weight: 700; }
.cover-zoom button { flex: none; min-width: 34px; }
.bp-cover { height: 140px; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.18); background: linear-gradient(135deg, var(--p), var(--a)) center / cover no-repeat; }
.bp-logo { position: absolute; z-index: 2; left: var(--logo-left); top: calc(100% - var(--hang)); width: var(--logo); height: var(--logo); box-sizing: border-box; border-radius: 18px; background: var(--a); color: var(--a-ink); display: grid; place-items: center; font-weight: 700; font-size: 30px; overflow: hidden; }
.bp-logo.custom { left: clamp(0px, calc(var(--lx) - var(--logo) / 2), calc(100% - var(--logo))); top: clamp(0px, calc(var(--ly) - var(--logo) / 2), calc(100% - var(--hang))); }
.bp-logo.shape-round { border-radius: 50%; }
.bp-logo.shape-square { border-radius: 0; }
.bp-logo.bordered { border: 4px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.18); }
.bp-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bp-ident { display: flex; align-items: flex-start; gap: 12px; margin: calc(-1 * var(--hang)) 4px 0; position: relative; }
.bp-slot { flex: none; width: var(--logo); height: var(--logo); }
.bp-who { padding: calc(var(--hang) + 4px) 0 0; min-width: 0; }
.bp-who h1 { margin: 0; font-size: 22px; line-height: 1.15; font-family: inherit; color: inherit; }
.bp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 6px; font-size: 12.5px; }
/* Destaque das informações (prévia e opções): mesmas formas do cardápio. */
.bp-meta.st-pills, .bp-meta.st-filled, .bp-meta.st-brand { gap: 4px 6px; }
.bp-meta > * + *::before { content: '•'; margin-right: 8px; opacity: .6; }
.bp-meta:not(.st-plain) > *::before { content: none !important; }
.bp-meta.st-pills > *, .bp-meta.st-filled > *, .bp-meta.st-brand > * { padding: 2px 9px; border-radius: 99px; line-height: 1.4; }
.bp-meta.st-pills > * { border: 1.5px solid currentColor; }
.bp-meta.st-brand > * { background: var(--bp-p, var(--p, #4B1B5C)); color: var(--bp-pi, var(--p-ink, #fff)) !important; }
.bp-more { font-weight: 700; }
/* Dentro da imagem (nome e informações sobre a capa): texto branco, como no cardápio. */
.bp-piece .bp-meta, .pos-piece .bp-meta { margin-top: 0; font-size: 12.5px; }
.bp-piece .bp-meta > span, .pos-piece .bp-meta > span { display: inline-flex; align-items: center; font-size: inherit; }
.bp-piece .bp-open, .pos-piece .bp-open { color: inherit; }
.bp-piece .bp-meta.st-filled .bp-open, .pos-piece .bp-meta.st-filled .bp-open, .bp-piece .bp-meta.st-card .bp-open, .pos-piece .bp-meta.st-card .bp-open { color: #429662; }
.bp-piece .bp-meta.st-filled > *, .pos-piece .bp-meta.st-filled > * { background: rgba(0,0,0,.45); }
.bp-piece .bp-meta.st-card, .pos-piece .bp-meta.st-card { background: #E8E8E8; color: #1A1A1A; text-shadow: none; border-color: rgba(0,0,0,.18); }
.bp-meta.st-card > .bp-open { color: #429662; }
.bp-meta.st-brand > .bp-open { background: #429662; color: #fff !important; }
.bp-meta.st-pills > .bp-open, .bp-piece .bp-meta.st-pills > .bp-open, .pos-piece .bp-meta.st-pills > .bp-open { color: #429662; }
.bp-meta.st-brand > .bp-open::before { background: #fff; }
.bp-meta.st-filled > .bp-open, .bp-piece .bp-meta.st-filled > .bp-open, .pos-piece .bp-meta.st-filled > .bp-open { background: rgba(66,150,98,.25); }
.bp-meta.st-filled > * { background: rgba(128,128,128,.18); }
.bp-meta.st-card { width: fit-content; padding: 6px 12px; gap: 3px 10px; border: 1px solid rgba(128,128,128,.4); border-radius: 12px; background: #E8E8E8; color: #1A1A1A; }
.info-styles { display: flex; gap: 10px; flex-wrap: wrap; }
.info-style { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; text-align: center; }
.info-style:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.info-style input { position: absolute; opacity: 0; pointer-events: none; }
.info-style .bp-meta { margin: 0; font-size: 11.5px; color: #1A1A1A; background-color: transparent; }
.info-style .bp-meta.st-card { background: #E8E8E8; }
.bp-open { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #15803D; }
.bp-open::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #22C55E; }
.bp-chips { display: flex; gap: 8px; padding: 10px 16px; overflow: hidden; margin-top: 4px; border-bottom: 1px solid rgba(128,128,128,.25); }
.bp-chips span { white-space: nowrap; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--p); font-size: 14px; font-weight: 600; }
.bp-chips span.on { background: var(--p); color: var(--p-ink); }
.bp-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; background: #fff; color: #6b6b6b; border-bottom: 1px solid rgba(128,128,128,.25); }
.bp-search span { padding: 12px 0; font-size: 16px; }
.bp-body { padding: 8px 16px; }
.bp-body h2 { font-size: 18px; margin: 16px 0 10px; font-family: inherit; color: inherit; }
.bp-item { display: flex; gap: 12px; padding: 12px; margin-bottom: 10px; border-radius: 14px; background: rgba(255,255,255,.7); color: #1A1A1A; border: 1px solid rgba(128,128,128,.25); }
.bp-photo { width: 84px; height: 84px; border-radius: 12px; border: 1px solid rgba(128,128,128,.28); box-shadow: 0 3px 10px rgba(0,0,0,.16); background: var(--a); flex: none; }
.bp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bp-info b { font-size: 16px; }
.bp-info p { margin: 0; font-size: 14px; color: #555; }
.bp-price { margin-top: auto; font-weight: 700; font-size: 16px; }
.bp-price::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--a); margin-right: 6px; }
.bp-bag { position: absolute; left: 0; right: 0; bottom: 66px; padding: 10px 16px; background: var(--s); border-top: 1px solid rgba(128,128,128,.25); }
.bp-bag > span { display: flex; justify-content: space-between; font-weight: 700; padding: 13px 18px; border-radius: 14px; background: var(--p); color: var(--p-ink); }
/* Barra de baixo igual à do celular: ícones com o nome embaixo e a página atual em destaque. */
.bp-nav { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; background: var(--p); color: var(--p-ink); display: flex; justify-content: space-around; align-items: center; box-shadow: 0 -4px 16px rgba(0,0,0,.18); }
.bp-nav span { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 6px 10px; border-radius: 14px; font-size: 11.5px; font-weight: 700; line-height: 1.1; }
.bp-nav span.on { background: #fff; color: var(--p); }

/* Posição da logo: o lojista arrasta a logo sobre a imagem de fundo (mesma medida do celular). */
.pos-stage { width: 328px; max-width: 100%; margin-bottom: 46px; --logo: 84px; --hang: 42px; --logo-left: 4px; --p: #B93A0B; --a: #FFB703; --a-ink: #1A1A1A; }
.pos-wrap { position: relative; touch-action: none; user-select: none; }
.pos-cover { aspect-ratio: 328 / 140; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.18); background: linear-gradient(135deg, var(--p), var(--a)) center / cover no-repeat; }
.pos-logo { position: absolute; z-index: 2; left: var(--logo-left); top: calc(100% - var(--hang)); width: var(--logo); height: var(--logo); box-sizing: border-box; border-radius: 18px; background: var(--a); color: var(--a-ink); display: grid; place-items: center; font-weight: 700; font-size: 30px; overflow: visible; cursor: grab; outline: 2px dashed var(--brand); outline-offset: 3px; }
.pos-logo.dragging { cursor: grabbing; }
.pos-logo.custom { left: clamp(0px, calc(var(--lx) - var(--logo) / 2), calc(100% - var(--logo))); top: clamp(0px, calc(var(--ly) - var(--logo) / 2), calc(100% - var(--hang))); }
.pos-logo.shape-round { border-radius: 50%; }
.pos-logo.shape-square { border-radius: 0; }
.pos-logo.bordered { border: 4px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.18); }
.pos-logo > #pos-logo-img { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: inherit; }
.pos-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* Nome e informações da loja dentro da imagem de fundo (editor e prévia): duas peças sobre a imagem, ao lado da logo. */
.pos-piece, .bp-piece { position: absolute; z-index: 2; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); line-height: 1.3; }
.pos-piece { cursor: grab; outline: 2px dashed var(--brand); outline-offset: 3px; touch-action: none; user-select: none; }
.pos-piece.dragging { cursor: grabbing; }
.pos-piece[hidden], .bp-piece[hidden] { display: none; }
.pos-piece b, .bp-piece b { display: block; font-size: 22px; line-height: 1.15; }
.pos-piece span, .bp-piece span { display: block; font-size: 12.5px; }
.align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } .align-justify { text-align: justify; }
.bp-hero.info-inside .bp-ident { display: none; }
.pos-stage { margin-bottom: 0; padding-bottom: 0; background: var(--s, #fff); border-radius: 16px; }
.info-controls { display: flex; gap: 16px; flex-wrap: wrap; }
.info-piece { display: flex; flex-direction: column; gap: 8px; flex: 1 1 280px; min-width: 240px; }
.info-piece .color-row { display: flex; gap: 8px; align-items: center; }
.info-piece .color-row input[type=color] { width: 56px; flex: none; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.info-align { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.info-align select { min-width: 200px; font-weight: 400; }
.pos-dot { position: absolute; right: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); display: grid; place-items: center; font-size: 12px; line-height: 1; pointer-events: none; z-index: 3; }
.shape-options { display: flex; gap: 10px; flex-wrap: wrap; }
.shape-option { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; background: #9A93A8; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; }
.shape-option:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand); }
.shape-option input { position: absolute; opacity: 0; pointer-events: none; }
.shape-option i { position: relative; display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; box-sizing: border-box; background: var(--muted-bg); color: var(--fg); font: 700 22px/1 inherit; font-style: normal; }
.shape-option i img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shape-option i.s-round { border-radius: 50%; }
.shape-option i.s-square { border-radius: 0; }
.shape-option i.s-rounded { border-radius: 14px; }
.shape-options.bordered i { border: 4px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.18); }
.logo-border-toggle { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.logo-border-toggle input { margin-top: 3px; }
.logo-border-toggle small { display: block; font-weight: 400; color: var(--muted); }
/* A prévia acompanha a rolagem: o lojista ajusta as configurações lá embaixo e vê o resultado no mesmo lugar. */
.brand-preview { position: sticky; top: 16px; align-self: start; }
.brand-preview-title { margin: 0 0 8px; font-weight: 700; }
.brand-save { width: 270px; max-width: 100%; margin-top: 12px; }
@media (max-width: 760px) { .brand-grid { grid-template-columns: minmax(0, 1fr); } .mini { max-width: 270px; } .brand-preview { position: static; } }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: background .15s, border-color .15s, color .15s; }
.tabs a:hover { border-color: var(--brand); }
.tabs a.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.tabs a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 640px) { .tabs a { flex: 1 1 100%; } }
.perm-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.perm-field legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.perm-group { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 8, 19, .6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); color: var(--fg); border-radius: 16px; padding: 22px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 10px; }
.modal h2 { margin: 0; font: 800 20px var(--display); }
.modal p { margin: 0; }
.modal-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.modal-store { justify-content: space-between; padding: 12px 14px; text-align: left; }

.nav-group { margin-top: 6px; }
.nav-group summary { cursor: pointer; padding: 9px 12px; border-radius: 8px; font-weight: 600; color: var(--side-fg); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "▾"; font-size: 12px; color: var(--side-muted); transition: transform .15s; }
.nav-group:not([open]) summary::after { transform: rotate(-90deg); }
.nav-group summary:hover { background: rgba(255,255,255,.08); }
.nav-group a { margin-left: 10px; font-size: 14px; }
/* Submenu dentro de um grupo (Delivery → Tipos de entrega): só o tipo escolhido no Perfil da empresa fica ativo. */
.nav-subgroup summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; margin: 1px 8px 1px 22px; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--side-fg); }
.nav-subgroup summary::-webkit-details-marker { display: none; }
.nav-subgroup summary::after { content: "▾"; margin-left: auto; font-size: 12px; color: var(--side-muted); transition: transform .15s; }
.nav-subgroup:not([open]) summary::after { transform: rotate(-90deg); }
.nav-subgroup summary span { flex: 1; }
.nav-subgroup summary:hover { background: rgba(255,255,255,.08); }
.nav-group .nav-subgroup a, .nav-group[open] .nav-subgroup a { margin-left: 40px; display: flex; align-items: flex-start; gap: 10px; line-height: 1.25; white-space: normal; }
.nav-group .nav-subgroup a .icon { margin-top: 1px; }
.nav-group .nav-subgroup a.in-use, .nav-group[open] .nav-subgroup a.in-use { font-weight: 800; background: rgba(255,255,255,.12); border-left-color: var(--side-active); }
.nav-group .nav-subgroup a.in-use::after { content: "●"; margin-left: auto; align-self: center; font-size: 9px; color: var(--side-active); }
@media (max-width: 760px) { .nav-group { margin-top: 0; } .nav-group a { margin-left: 0; } }

.pv { display: grid; grid-template-columns: 130px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); color: var(--fg); font-size: 12px; min-height: 250px; }
.pv-side { background: var(--side); color: var(--side-fg); padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.pv-logo { font: 800 16px var(--display); padding: 0 6px 8px; }
.pv-side span { padding: 5px 8px; border-radius: 6px; }
.pv-side span.on { background: var(--side-active); color: var(--side-active-ink); font-weight: 700; }
.pv-main { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pv-title { font: 800 16px var(--display); }
.pv-cards { display: flex; gap: 8px; }
.pv-card { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.pv-card small { display: block; color: var(--muted); font-size: 10.5px; }
.pv-card strong { font-size: 18px; }
.pv-row { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.pv-badge { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 1px 9px; font-weight: 700; font-size: 11px; }
.pv-actions { display: flex; align-items: center; gap: 12px; }
.pv-btn { background: var(--btn); color: var(--btn-ink); border-radius: 8px; padding: 6px 12px; font-weight: 700; }
.pv-link { color: var(--brand); font-weight: 600; text-decoration: underline; }
.theme-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .theme-grid { grid-template-columns: minmax(0, 1fr); } }

/* Telas de edição que cabem inteiras na tela: formulário largo em duas colunas e a lista de uso ao lado. */
.fit-grid { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .fit-grid { grid-template-columns: minmax(0, 1fr); } }
.fit-grid .form-grid, .form-grid.tight { gap: 10px 22px; align-items: start; }
.fit-grid .stack, .fit-grid .stack-sm { gap: 10px; }
.fit-grid .form-foot { margin-top: 12px; }
.fit-grid textarea { min-height: 56px; }
.fit-grid .option-row { grid-template-columns: auto minmax(0, 1fr) 96px auto auto; gap: 6px; padding: 5px 0; }
.fit-grid .thumb-lg { width: 96px; height: 96px; }
.option-scroll { max-height: 230px; overflow-y: auto; }
.type-radios { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.page-head.compact { margin-bottom: 12px; }
.page-head.compact h1 { margin: 0; }
.mode-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.mode-field legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--muted-bg); border-radius: 12px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 20px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--btn); color: var(--btn-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.color-row input[type=color] { flex: 1 1 56px; min-width: 56px; width: auto; }
.hex-input { flex: 1 1 92px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; text-align: center; letter-spacing: .02em; }
.hex-input.is-invalid { border-color: var(--danger); background: var(--danger-bg); }

.logo-img { height: 34px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.login-art .logo-img { height: 56px; max-width: 260px; }
.login-store { display: flex; align-items: center; gap: 16px; }
.login-store-logo { position: relative; width: 84px; height: 84px; border-radius: 20px; background: var(--surface); color: var(--fg); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); display: grid; place-items: center; overflow: hidden; font: 800 34px var(--display); flex: none; }
.login-store-logo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.login-store-name { font: 800 28px/1.15 var(--display); overflow-wrap: anywhere; }
.asset-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.asset-box { width: 72px; height: 72px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: var(--side); flex: none; text-align: center; }
.asset-box.is-light { background: var(--surface); }
.asset-box img { width: 100%; height: 100%; object-fit: contain; }
.pv-logo img { height: 20px; width: auto; max-width: 100%; object-fit: contain; display: block; }

.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font: 600 14px var(--body); cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.tabs button:hover { border-color: var(--brand); }
.tabs button.active { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.tabs-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs-row .tabs { margin: 0; }
[data-tab-panel][hidden] { display: none; }
.js-tabs .tabs { margin-bottom: 16px; }
.catalog-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .catalog-layout { grid-template-columns: minmax(0, 1fr); } }
.cat-list { padding: 0; overflow: hidden; }
.cat-list header { padding: 14px 16px; border-bottom: 1px solid var(--line); margin: 0; }
.cat-item { display: flex; justify-content: space-between; gap: 8px; padding: 11px 16px; text-decoration: none; border-left: 3px solid transparent; border-bottom: 1px solid var(--line); }
.cat-item:hover { background: var(--hover); }
.cat-item.active { background: var(--hover); border-left-color: var(--brand); font-weight: 700; }
.catalog-layout > .card:last-child { padding: 0; overflow: visible; }
.catalog-layout > .card:last-child > header { padding: 14px 16px; border-bottom: 1px solid var(--line); margin: 0; }
.catalog-layout > .card:last-child > .empty { padding: 28px 16px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.product-card { display: flex; gap: 12px; padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); background: var(--muted-bg); color: var(--muted); display: grid; place-items: center; font: 700 22px var(--display); overflow: hidden; flex: none; }
.thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-lg { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .14); display: block; }
.product-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.product-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kebab { position: relative; }
.kebab summary { list-style: none; cursor: pointer; padding: 0 8px; font-size: 18px; line-height: 1.3; border-radius: 6px; }
.kebab summary::-webkit-details-marker { display: none; }
.kebab summary:hover { background: var(--hover); }
.kebab-menu { position: absolute; right: 0; top: 100%; z-index: 5; min-width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); padding: 4px; display: flex; flex-direction: column; }
.kebab-menu a, .kebab-menu button { all: unset; box-sizing: border-box; cursor: pointer; padding: 8px 12px; border-radius: 6px; font-size: 14px; display: block; width: 100%; }
.kebab-menu a:hover, .kebab-menu button:hover { background: var(--hover); }
.kebab-menu .danger { color: var(--danger); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.info-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.count-pill { min-width: 26px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 99px; display: inline-grid; place-items: center; font-size: 12px; margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-check span { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--muted); }
.chip-check input:checked + span { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.chip-check input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip-sm span { padding: 4px 10px; font-size: 13px; }
.avail-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.avail-box h3 { font-size: 15px; margin: 0 0 2px; }
.avail-box p { margin: 0 0 10px; }
.schedule-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.schedule-times { display: flex; align-items: center; gap: 8px; }
#schedules { margin-bottom: 8px; }
.addon-pick { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.addon-pick:hover { background: var(--hover); }
.addon-pick > span { display: flex; flex-direction: column; gap: 2px; }
.pdv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.pdv-row:hover { background: var(--hover); }
.pdv-row b { font-size: 17px; }
.pct { margin: 6px 0 0; font-size: 14px; }
.pct-ok { color: var(--ok); } .pct-warn { color: var(--warn); } .pct-danger { color: var(--danger); } .pct-muted { color: var(--muted); }

.side-foot .mode-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: calc(100% + 20px); margin: 0 -10px 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-fg); font-size: 14px; font-weight: 600; text-decoration: none; }
.side-foot .mode-toggle[hidden] { display: none; }
.side-foot .mode-toggle:hover { background: rgba(255, 255, 255, .1); }
.side-foot .mode-toggle:focus-visible { outline: 2px solid var(--side-active); outline-offset: 2px; }
@media (max-width: 760px) { .side-foot .mode-toggle { width: auto; margin: 0 0 6px auto; } }

.img-editor { max-width: 380px; }
.img-editor-canvas { width: 100%; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .14); cursor: grab; touch-action: none; background: #fff; }
.img-editor-canvas.is-dragging { cursor: grabbing; }
.img-editor-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.img-editor-label { display: flex; justify-content: space-between; font-weight: 600; }
.img-editor-field input[type=range] { width: 100%; accent-color: var(--brand); padding: 0; }
.img-editor .actions { justify-content: flex-end; margin-top: 4px; }

.sort-group { margin-bottom: 12px; padding: 12px 16px; }
.sort-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sort-group > header { margin: 0 0 4px; }
.sort-group > header h2 { flex: 1; min-width: 0; }
.sort-products { list-style: none; margin: 8px 0 0; padding: 0; }
.sort-product { padding: 8px 8px 8px 28px; border-top: 1px solid var(--line); background: var(--surface); }
.sort-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-sm { width: 40px; height: 40px; border-radius: 8px; font-size: 16px; }
.drag-handle { cursor: grab; color: var(--muted); font-size: 18px; line-height: 1; letter-spacing: -3px; user-select: none; padding: 4px 2px; }
.drag-handle:active { cursor: grabbing; }
.is-dragging { opacity: .4; }
.sort-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); margin-top: 8px; }

.sort-list { list-style: none; margin: 0; padding: 0; }
.sort-groups > li { margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 6px 12px; }
.sort-groups details > summary { list-style: none; cursor: pointer; padding: 6px 0; }
.sort-groups details > summary::-webkit-details-marker { display: none; }
.sort-caret { width: 14px; flex: none; color: var(--muted); font-size: 12px; transition: transform .12s; }
details[open] > summary > .sort-caret { transform: rotate(90deg); }
.sort-leaf { cursor: default; }
.sort-products { margin: 4px 0 6px 18px; border-left: 2px solid var(--line); padding-left: 10px; }
.sort-products > li { border-top: 1px solid var(--line); padding: 4px 0; background: transparent; }
.sort-products > li:first-child { border-top: 0; }
.sort-addons { margin: 4px 0 6px 38px; border-left: 2px dashed var(--line); padding-left: 10px; }
.sort-addon { padding: 6px 0; border-top: 1px solid var(--line); }
.sort-addon:first-child { border-top: 0; }
.sort-group, .sort-product { padding-left: 12px; }
.sort-products .sort-product { padding-left: 0; }

.nav a { display: flex; align-items: center; gap: 10px; }
.nav .icon, .nav-group .icon { flex: none; width: 18px; height: 18px; opacity: .9; }
.nav a.active .icon { opacity: 1; }
.nav-group summary { gap: 10px; justify-content: flex-start; }
.nav-group summary::after { margin-left: auto; }
.nav-group summary span { flex: 1; }
.nav-group a { margin-left: 10px; }
@media (max-width: 760px) { .nav .icon { width: 16px; height: 16px; } }

.addon-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; overflow: visible; }
.addon-card > :first-child { border-radius: var(--radius) var(--radius) 0 0; }
.addon-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; cursor: pointer; }
.addon-head > span { display: flex; flex-direction: column; gap: 2px; }
.addon-config { display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 14px 40px; border-top: 1px solid var(--line); background: var(--bg); padding-top: 12px; }
.addon-config[hidden] { display: none; }
.option-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 130px auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.option-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .option-row { grid-template-columns: auto minmax(0, 1fr) 100px; } }
.option-row.is-text .option-name { font-weight: 500; font-style: italic; }
.option-row.is-text .money, .option-row.is-text [data-price] { visibility: hidden; }
/* Complemento que "faz parte do anterior": recuado e preso ao de cima, com a faixa de destaque. */
.addon-card.is-joined { margin-left: 28px; margin-top: -6px; border-left: 3px solid var(--accent); }
.addon-joined-note { font-size: 12px; font-weight: 600; color: var(--muted); }
.addon-joined-note b { color: var(--fg); }
[data-own-rule][hidden], .addon-joined-note[hidden], .addon-config .hint[hidden], [data-rule-note][hidden], [data-text-badge][hidden] { display: none; }

.sort-options { margin: 4px 0 6px 28px; border-left: 2px dotted var(--line); padding-left: 10px; }
.sort-option { padding: 5px 0; border-top: 1px solid var(--line); }
.sort-option:first-child { border-top: 0; }

.store-brand { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 10px; }
.store-logo { position: relative; width: 72px; height: 72px; border-radius: 14px; background: var(--surface); color: var(--fg); border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 3px 10px rgba(0, 0, 0, .25); display: grid; place-items: center; overflow: hidden; font: 800 28px var(--display); flex: none; }
.store-logo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.store-name { font: 700 16px/1.2 var(--display); overflow-wrap: anywhere; }
@media (max-width: 760px) { .store-brand { flex-direction: row; align-items: center; text-align: left; gap: 10px; } .store-logo { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; } }

.addon-picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.addon-picker + .addon-picker { margin-top: 8px; }
.addon-picker select { flex: 1 1 260px; max-width: 420px; }
.addon-head-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.addon-title { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.drag-handle { touch-action: none; }
.drag-handle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.addon-card.is-dragging, .option-row.is-dragging { opacity: .45; background: var(--hover); }

.kebab[open] { z-index: 20; }
.status-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface); }
.status-toggle:hover { border-color: var(--brand); }
.status-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.status-toggle .track { width: 28px; height: 16px; border-radius: 99px; background: var(--muted); position: relative; flex: none; transition: background .15s; }
.status-toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.status-toggle.is-on { color: #1b6b45; border-color: #1b6b45; }
.status-toggle.is-on .track { background: #1b6b45; }
.info-foot form:last-child { margin-left: auto; }
.status-toggle.is-on .track::after { transform: translateX(12px); }

/* Ordenar catálogo: menu de ordenação (nome, preço, mais vendidos) */
.sort-toolbar { align-items: center; }
.sort-menu-wrap { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.sort-menu { position: relative; }
.sort-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 700; letter-spacing: .03em; }
.sort-menu summary::-webkit-details-marker { display: none; }
.sort-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 270px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); overflow: hidden; }
.sort-menu-panel button { display: block; width: 100%; text-align: left; padding: 14px 18px; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.sort-menu-panel button:last-child { border-bottom: 0; }
.sort-menu-panel button:hover, .sort-menu-panel button:focus-visible { background: var(--bg); outline: none; }

/* Dica de ajuda (<x-help>): ícone "i" com balão ao passar o mouse, focar ou clicar */
.help { position: relative; display: inline-flex; align-items: center; flex: none; }
.help-btn { all: unset; box-sizing: border-box; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--brand); cursor: pointer; }
.help-btn:hover, .help-btn:focus-visible, .help.is-open .help-btn { background: var(--hover); outline: none; }
.help-btn:focus-visible { box-shadow: 0 0 0 2px var(--brand); }
.help-tip { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: 300px; max-width: 80vw; padding: 10px 12px; border-radius: 10px; background: var(--fg); color: var(--bg); font-size: 13px; line-height: 1.45; font-weight: 400; text-align: left; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); visibility: hidden; opacity: 0; transition: opacity .12s; pointer-events: none; }
.help:hover .help-tip, .help:focus-within .help-tip, .help.is-open .help-tip { visibility: visible; opacity: 1; pointer-events: auto; }

/* Linhas de opções do complemento no produto: ícone de ajuda antes do campo, na mesma linha */
.opt-actions select { width: auto; flex: 1 1 200px; min-width: 0; }
.opt-actions .help { margin-right: -4px; }

/* Botão On-line / Off-line da loja, no menu do portal (abaixo do nome da loja e acima do Painel) */
.store-toggle { margin: -8px 0 0; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.store-toggle summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; }
.store-toggle summary::-webkit-details-marker { display: none; }
.store-toggle .dot { width: 10px; height: 10px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); flex: none; }
.store-toggle.is-off .dot { background: #EF4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); }
.store-toggle.is-closed .dot { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); }
.store-toggle-body .btn { text-align: center; }
.store-toggle summary b { font-size: 14px; }
.store-toggle .hint { margin-left: auto; font-size: 12px; color: var(--side-muted); }
.store-toggle summary:hover { background: rgba(255, 255, 255, .08); }
.store-toggle-body { padding: 4px 12px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.store-toggle-body p { margin: 0; color: var(--side-fg); }
.store-toggle-body small { color: var(--side-muted); }
.store-toggle-body label { display: flex; gap: 8px; align-items: flex-start; line-height: 1.3; cursor: pointer; color: var(--side-fg); }
.store-toggle-body input[type=radio] { margin-top: 2px; accent-color: var(--side-active); }

/* Pedidos em quadro (Kanban) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.order-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.order-filters .field { min-width: 200px; }
.order-filters .field:first-child { flex: 1 1 260px; max-width: 420px; }
/* Quadro de pedidos: a página não rola; cada coluna rola os próprios cartões e o cabeçalho (legenda) fica sempre fixo */
.kanban { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(210px, 1fr)); gap: 12px; align-items: stretch; overflow-x: auto; height: 100%; min-height: 0; }
.k-col { background: var(--muted-bg); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.k-col.drop-target { outline: 2px dashed var(--brand); outline-offset: -4px; }
.k-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--accent); color: var(--accent-ink); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.k-head h2 { font-size: 14px; margin: 0; color: inherit; }
.k-head .badge { background: var(--accent-ink); color: var(--accent); }
.k-list { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 60px; overflow-y: auto; padding: 10px; }
.k-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.k-card.k-pending { border-left-color: var(--warn); }
.k-card.k-done { border-left-color: var(--ok); }
.k-card { cursor: grab; }
.k-group { border: 1px solid var(--line); border-left: 4px solid var(--st-delivering); border-radius: 8px; background: var(--surface); }
.k-group > summary { cursor: pointer; padding: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.k-group-nums { flex-basis: 100%; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
/* Cada rota é um bloco só: o selo e os números dela dentro da mesma moldura. Pedidos sem rota ficam soltos, sem moldura. */
.k-group-route { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border: 1px solid var(--line, var(--muted)); border-radius: 999px; font-weight: 700; color: var(--fg, inherit); }
.k-group-route:not(:has(.k-route-chip)) { padding-left: 2px; border-color: transparent; font-weight: 400; color: var(--muted, inherit); }
.k-group-nums:has(.k-group-order) { flex-direction: column; align-items: flex-start; gap: 6px; }
.k-group-order { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--line, var(--muted)); border-radius: 999px; }
.k-group-order:not(:has(.k-route-chip)) { padding-left: 10px; }
.k-group-order b { font-size: 1rem; }
/* Alinhamento das linhas: algarismos de largura igual; Rota e Seq. reservam 3 dígitos e o número do pedido --k-num-ch (maior da coluna). */
.k-group-order { font-variant-numeric: tabular-nums; }
.k-group-order .k-digits { display: inline-block; min-width: 3ch; text-align: left; }
.k-group-order .k-num { min-width: calc(var(--k-num-ch, 3) * 1ch); }
.k-group-order .k-route-chip, .k-group-order .k-seq { padding-right: 4px; }
.k-group-list { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 10px; }
.k-card.dragging { position: fixed; z-index: 50; pointer-events: none; opacity: .92; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.k-top { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.k-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.k-type { font-size: 11px; padding: 1px 7px; }
.k-addr { min-width: 0; }
.k-total { margin-left: auto; font-weight: 700; }
.k-handle { cursor: grab; touch-action: none; user-select: none; color: var(--muted); letter-spacing: -2px; padding: 2px 4px; }
.k-name { font-weight: 600; }
.k-tags { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 0; }
.k-view { margin-left: auto; }
.k-pick { margin-top: 2px; }
.conclude-dialog { width: min(420px, calc(100% - 24px)); border: 0; border-radius: 14px; padding: 18px; background: var(--surface); color: var(--fg); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.conclude-dialog::backdrop { background: rgba(15, 8, 19, .6); }
#conclude-fields.on { display: flex !important; }
/* Fita do pedido (bobina térmica) */
.receipt-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: 94vh; overflow-y: auto; }
.receipt-close { align-self: center; }
.receipt { background: #fffbe0; color: #222; width: 320px; max-width: 92vw; padding: 18px 16px 8px; font: 13px/1.45 "Courier New", ui-monospace, monospace; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.receipt h3 { margin: 0; text-align: center; font: 700 16px "Courier New", ui-monospace, monospace; text-transform: uppercase; }
.receipt .r-center { text-align: center; }
.receipt .r-line { border-top: 1px dashed #777; margin: 8px 0; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 8px; }
.receipt .r-row > span:last-child { white-space: nowrap; }
.receipt .r-sub { padding-left: 14px; font-size: 12px; color: #444; }
.receipt .r-total { font-weight: 700; font-size: 15px; }
.receipt .r-cut { margin: 14px -16px 0; border-top: 2px dashed #555; height: 14px; position: relative; }
.receipt .r-cut::after { content: "✂"; position: absolute; right: 12px; top: -12px; font-size: 14px; color: #555; background: #fffbe0; padding: 0 3px; }
.k-actions { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.k-select { flex: 1; min-width: 0; padding: 4px 6px; font-size: 13px; }
.k-empty { text-align: center; margin: 14px 0; }
.k-actions .btn { order: -1; }

/* Menu lateral recolhível: o botão fica dentro do menu; recolhido, o menu vira uma faixa só de ícones (tela larga) */
.side-collapse { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; top: 8px; right: 8px; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--side-fg); }
.side-collapse:hover { background: rgba(255, 255, 255, .12); }
.side-collapse:focus-visible { outline: 2px solid var(--side-active); outline-offset: 2px; }
.app.menu-collapsed .side-collapse .icon { transform: rotate(180deg); }
.app.wide .content { max-width: none; }
.app.wide .content { padding-top: 14px; }
.app.wide .page-head { margin-bottom: 10px; }
.app.wide .page-head h1 { font-size: 22px; }
.app.wide .page-head p { margin-top: 2px; font-size: 13px; }
@media (min-width: 761px) {
  .app.wide .content { height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; padding-bottom: 16px; overflow: hidden; }
  .app.wide #orders-board { flex: 1; min-height: 0; }
}
@media (max-width: 760px) { .kanban { grid-template-columns: repeat(var(--cols, 5), 82vw); scroll-snap-type: x mandatory; } .k-col { scroll-snap-align: start; } .k-list { max-height: 65vh; } }
@media (min-width: 761px) {
  .app.menu-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
  .app.menu-collapsed .sidebar { padding: 16px 10px; align-items: center; gap: 16px; }
  .app.menu-collapsed .side-collapse { position: static; align-self: center; }
  .app.menu-collapsed .store-brand { padding: 0; }
  .app.menu-collapsed .store-logo { width: 44px; height: 44px; border-radius: 10px; font-size: 20px; }
  .app.menu-collapsed .store-name, .app.menu-collapsed .logo small, .app.menu-collapsed .side-foot, .app.menu-collapsed .store-toggle-body,
  .app.menu-collapsed .store-toggle summary b, .app.menu-collapsed .store-toggle .hint, .app.menu-collapsed .nav span,
  .app.menu-collapsed .nav-group summary::after, .app.menu-collapsed .nav-group a { display: none; }
  .app.menu-collapsed .store-toggle { margin: 0; }
  .app.menu-collapsed .nav { align-items: center; width: 100%; }
  .app.menu-collapsed .nav > a, .app.menu-collapsed .nav-group summary { justify-content: center; padding: 10px; }
  .app.menu-collapsed .nav-group { margin-top: 2px; }
}
@media (max-width: 760px) { .side-collapse { display: none; } }

/* Som de pedido novo */
.sound-controls { display: flex; gap: 8px; margin-left: auto; align-items: center; }
/* Pedidos: título e explicação na mesma linha; botões e controles de som/impressora numa linha, à esquerda. */
.orders-head { flex-direction: column; align-items: stretch; gap: 10px; }
.orders-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.orders-title h1 { margin: 0; }
.app.wide .orders-head .orders-title p { margin: 0; }
.orders-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; }
.orders-actions .sound-controls { margin-left: 0; }
.sound-controls .printer-pick { max-width: 220px; }
.btn-icon { padding: 8px 10px; }
.sound-controls .btn[aria-pressed="false"] { background: var(--muted-bg); color: var(--muted); }

/* Grupo do menu aberto: painel mais claro e subitens com guia à esquerda, para se destacarem do título. */
.nav-group[open] { background: rgba(255,255,255,.07); border-radius: 10px; padding-bottom: 6px; }
.nav-group[open] > summary { font-weight: 700; }
.nav-group[open] a { margin: 1px 8px 1px 22px; padding-left: 12px; border-left: 2px solid rgba(255,255,255,.22); border-radius: 0 8px 8px 0; font-size: 14px; }
.nav-group[open] a:hover { border-left-color: currentColor; }
.nav-group[open] a.active { border-left-color: currentColor; }
@media (max-width: 760px) { .nav-group[open] a { margin: 0; border-left: 0; border-radius: 8px; } }
.app.menu-collapsed .nav-group[open] { background: none; padding-bottom: 0; }

/* Clientes: nome em destaque, botão do menu de ações, notas de RFV e tela de parâmetros */
.customer-name { color: var(--brand); font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; }
.kebab summary.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 14px; line-height: 1.2; }
.kebab-menu .icon { vertical-align: -3px; margin-right: 6px; }
.kebab-menu { min-width: 190px; }
.rfv { display: inline-flex; gap: 3px; }
.score { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; color: #1f2937; }
.score-5 { background: #86efac; } .score-4 { background: #bbf7d0; } .score-3 { background: #fde68a; } .score-2 { background: #fecaca; } .score-1 { background: #fca5a5; }
.rfv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.rfv-card h2 { margin: 0 0 4px; font: 800 17px var(--display); }
.rfv-card > p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.rfv-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 10px; }
.rfv-row .score { width: 26px; height: 26px; }
.rfv-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.rfv-line input { width: 96px; }
.rfv-line .muted { font-size: 13px; }

@media (max-width: 900px) { .rfv-grid { grid-template-columns: minmax(0, 1fr); } }

/* Ficha do cliente (modal centralizado) */
.modal-backdrop[hidden] { display: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--hover); }
.customer-modal { width: min(1080px, 96vw); max-width: none; height: min(760px, 92vh); padding: 0; gap: 0; overflow: hidden; position: relative; outline: none; }
.customer-modal.customer-page { width: 100%; max-width: 1080px; height: auto; margin: 0 auto; border: 1px solid var(--line); box-shadow: none; }
.cc { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.customer-page .cc { height: auto; }
.cc-close { all: unset; position: absolute; top: 14px; right: 14px; cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; z-index: 2; }
.cc-close:hover { background: var(--hover); }
.cc-head { display: flex; align-items: center; gap: 4px 14px; padding: 16px 56px 12px 22px; flex-wrap: wrap; }
.cc-head h2 { margin: 0; font: 800 20px var(--display); overflow-wrap: anywhere; }
.cc-head small { color: var(--muted); }
.cc-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--hover); display: grid; place-items: center; color: var(--muted); }
.cc-avatar .icon { width: 22px; height: 22px; }
.cc-tabs { display: flex; border-bottom: 1px solid var(--line); }
.cc-tabs button { all: unset; box-sizing: border-box; flex: 1; text-align: center; padding: 11px 6px; cursor: pointer; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.cc-tabs button:hover { color: var(--fg); }
.cc-tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.cc-tabs button.active { color: var(--fg); font-weight: 700; border-bottom-color: var(--fg); }
.cc-body { padding: 18px 20px 22px; overflow-y: auto; min-height: 0; }
.cc-body section[hidden] { display: none; }
.cc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 0; }
.cc-stats > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.cc-stats .icon { grid-row: span 2; width: 24px; height: 24px; color: var(--muted); }
.cc-stats b { font-size: 15px; }
.cc-stats span { font-size: 12px; color: var(--muted); }
.cc-title { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 10px; }
.cc-title h3 { margin: 0; font: 800 16px var(--display); }
.cc-tools { display: flex; gap: 6px; }
.cc-tools form { margin: 0; }
.cc-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
.cc-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.cc-info dt { font-size: 12px; color: var(--muted); }
.cc-info dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.cc-info .wide { grid-column: 1 / -1; }
.cc-wa { color: #16a34a; vertical-align: middle; }
.cc-reset .inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cc-reset input[type=date] { width: auto; }
.cc-reset p { margin: 0 0 8px; }
.cc-address { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.cc-address div { display: flex; flex-direction: column; min-width: 0; }
.cc-address small { color: var(--muted); }
.cc-address.primary { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); background: var(--hover); }
.cc-pin, .cc-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--hover); display: grid; place-items: center; color: var(--muted); }
.cc-ico.off { opacity: .45; }
.cc-order { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.cc-order summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 38px minmax(0, 1fr) 14px; gap: 12px; align-items: center; padding: 10px 12px; }
.cc-order summary::-webkit-details-marker { display: none; }
.cc-order[open] .cc-chevron { transform: rotate(90deg); }
.cc-chevron { color: var(--muted); font-size: 20px; transition: transform .15s; }
.cc-order-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cc-order-main small { color: var(--muted); }
.cc-order-main small b { color: var(--fg); }
.cc-order-body { border-top: 1px solid var(--line); padding: 10px 14px 14px; font-size: 14px; }
.cc-order-body ul { list-style: none; margin: 0 0 10px; padding: 0; }
.cc-order-body li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.cc-order-body li small { display: block; color: var(--muted); }
.cc-order-body dl { margin: 0; display: grid; gap: 4px; }
.cc-order-body dl div { display: flex; justify-content: space-between; gap: 12px; }
.cc-order-body dt { color: var(--muted); }
.cc-order-body dd { margin: 0; text-align: right; }
.cc-empty { text-align: center; color: var(--muted); padding: 28px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cc-empty.small { padding: 12px; }
.cc-empty .icon { width: 36px; height: 36px; opacity: .5; }
.cc-empty p { margin: 0; font-weight: 700; }


/* Parâmetros de RFV: explicação */
.rfv-about { margin-bottom: 16px; }
.rfv-about h2 { margin: 18px 0 8px; font: 800 17px var(--display); }
.rfv-about h2:first-child { margin-top: 0; }
.rfv-about p { margin: 0 0 10px; max-width: 80ch; }
.rfv-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0 4px; }
.rfv-pillars > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.rfv-pillars h3 { margin: 8px 0 4px; font: 800 15px var(--display); }
.rfv-pillars p { margin: 0; font-size: 13px; color: var(--muted); }
.rfv-uses { margin: 0 0 10px; padding-left: 20px; max-width: 80ch; display: grid; gap: 6px; }
.rfv-example { background: var(--hover); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
@media (max-width: 900px) { .rfv-pillars { grid-template-columns: minmax(0, 1fr); } }

/* Edição direta na ficha do cliente e modal de endereço */
.cc-info label, .cc-info > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-info label > span, .cc-info .lbl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cc-info .val { padding: 7px 0; }
.cc-form input, .cc-form textarea { font-weight: 700; }
.cc-form:not(.editing) input, .cc-form:not(.editing) textarea { border-color: transparent; background: transparent; padding-left: 0; padding-right: 0; color: var(--fg); -webkit-text-fill-color: var(--fg); opacity: 1; resize: none; cursor: default; }
.cc-form:not(.editing) input[type=date]::-webkit-calendar-picker-indicator { display: none; }
.cc-form.editing .cc-wa { display: none; }
.cc-form-actions { display: flex; gap: 8px; margin-top: 10px; }
.cc-form-actions[hidden], .cc-form [data-form-errors][hidden] { display: none; }
.cc-form [data-form-errors], .af [data-form-errors] { margin-top: 10px; font-size: 13px; }
.cc-warn { color: var(--danger) !important; }
.cc-address-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.cc-address { grid-template-columns: 40px minmax(0, 1fr) auto; }
.cc-address-tools .btn-sm { padding: 5px 7px; }
.address-modal { width: min(880px, 96vw); max-width: none; max-height: 92vh; padding: 0; gap: 0; overflow: hidden; outline: none; position: relative; }
#address-modal { z-index: 60; }
.af { display: flex; flex-direction: column; min-height: 0; max-height: 92vh; }
.af-head { padding: 16px 56px 12px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.af-head h2 { margin: 0; font: 800 18px var(--display); }
.af-head small { color: var(--muted); }
.af-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 16px 20px; overflow-y: auto; min-height: 0; }
.af-fields { display: grid; gap: 10px; align-content: start; }
.af-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.af-row:first-of-type { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.af-map .map-box { height: 300px; }
.map-box { height: 260px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: #E5E7EB; z-index: 0; }
.map-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.af [data-form-errors] { margin: 0 20px; }
.af-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
    .customer-modal { height: 94vh; }
    .cc-cols, .af-body { grid-template-columns: minmax(0, 1fr); }
    .cc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .cc-info, .af-row, .af-row:first-of-type { grid-template-columns: minmax(0, 1fr); } }

/* Admin: mensagens do assistente */
.bm-help { margin-bottom: 16px; }
.bm-help h2 { margin: 0 0 8px; font: 800 16px var(--display); }
.bm-help ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 90ch; }
.bm-card { margin-bottom: 16px; }
.bm-card h2 { margin: 0; font: 800 17px var(--display); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bm-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.bm-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bm-edit textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.bm-vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { all: unset; box-sizing: border-box; cursor: pointer; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.chip:hover { background: var(--hover); border-color: var(--brand); }
.chip:focus-visible { outline: 2px solid var(--brand); }
.bm-preview .lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bm-bubble { white-space: pre-wrap; background: #dcf8c6; color: #111; border-radius: 4px 12px 12px 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0, 0, 0, .15); min-height: 48px; }
.bm-bubble pre { margin: 4px 0; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
@media (max-width: 900px) { .bm-grid { grid-template-columns: minmax(0, 1fr); } }

/* Envio de arquivo: o campo todo é uma área tracejada (como um campo de formulário) e o botão fica pequeno dentro dela */
input[type=file] { width: 100%; max-width: 100%; padding: 6px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; transition: border-color .15s, background-color .15s; }
input[type=file]:hover { border-color: var(--accent); background: var(--hover); }
input[type=file]::file-selector-button { margin-right: 10px; padding: 5px 12px; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--fg); font: 600 13px var(--body); cursor: pointer; transition: background-color .15s; }
input[type=file]:hover::file-selector-button { background: var(--accent); color: var(--btn-ink); }
input[type=file]:focus-visible { outline: none; border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.bm-tabs { margin-bottom: 14px; }
.bm-emoji { width: auto; padding: 4px 8px; font-size: 13px; border-radius: 8px; cursor: pointer; }
.bm-flags { display: flex; gap: 8px 24px; flex-wrap: wrap; margin: 4px 0 12px; }
.bm-flags .check { display: inline-flex; align-items: center; gap: 8px; }
.bm-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: var(--hover); }
.bm-note details { margin-top: 6px; }
.bm-note pre { white-space: pre-wrap; margin: 6px 0 0; font: 13px ui-monospace, monospace; }

/* Filtros: legenda em cima do campo e botão ao lado. Tudo com a mesma altura e o botão alinhado pela base dos campos */
.toolbar input:not([type=checkbox]):not([type=radio]), .toolbar select, .toolbar .btn,
.order-filters input:not([type=checkbox]):not([type=radio]), .order-filters select, .order-filters .btn { height: 40px; box-sizing: border-box; }
.toolbar .btn, .order-filters .btn { padding-top: 0; padding-bottom: 0; }
.toolbar .field { min-width: 150px; }
.toolbar .field:first-child { flex: 1 1 260px; max-width: 420px; }
.toolbar .field input[type=search], .toolbar .field select { width: 100%; max-width: none; }
/* Campo e botão lado a lado fora de filtros (cabeçalho da página e senha do cliente): campo com a mesma altura do botão */
.page-head .inline-form input, .page-head .inline-form select, .cc-reset .inline-form input { padding: 8px 11px; font-size: 14px; }

.locked-box { padding: 9px 11px; border: 1px dashed var(--line); border-radius: 8px; background: var(--hover); color: var(--fg); font-weight: 600; }
.field input:disabled { background: var(--hover); color: var(--muted); cursor: not-allowed; }

/* Filtros dos bairros: o atributo hidden precisa vencer o display de .btn, .empty e das linhas. */
[data-neighborhood-row][hidden], [data-filter-clear][hidden], [data-filter-empty][hidden] { display: none; }

/* Entrega por raio e áreas: rótulo escrito no desenho e linha da lista marcada (classes radius-*). */
.radius-label span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; padding: 1px 7px; border-radius: 99px; background: #fff; color: #1D4ED8; border: 1px solid #2563EB; font: 400 11px/1.5 system-ui, sans-serif; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.radius-label.is-hover span { background: #DBEAFE; border-width: 2px; font-weight: 800; }
.radius-label.is-selected span { background: #F97316; border-color: #C2410C; color: #fff; font-weight: 800; z-index: 1000; }
.radius-row { cursor: pointer; }
.radius-row.is-selected { background: rgba(249, 115, 22, .12); box-shadow: inset 3px 0 0 #F97316; }

/* Integrações */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.integration-card { display: flex; flex-direction: column; gap: 8px; }
.integration-card h2 { margin: 0; font-size: 18px; }
.integration-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--muted-bg); color: var(--fg); }
.integration-icon svg { width: 22px; height: 22px; }
.integration-icon:has(img) { width: 56px; height: 56px; background: none; }
.integration-icon img, .integration-title img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.integration-title { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 380px; }
.integration-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
/* Tela da integração */
.integration-title img { width: 64px; height: 64px; }
.integration-title h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.integration-title h1 .badge { font-size: 12px; }
.integration-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.copy-field { margin-bottom: 14px; }
.copy-field > label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.copy-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.copy-row code { flex: 1; min-width: 0; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--muted-bg); border: 1px solid var(--line); padding: 9px 12px; border-radius: 8px; overflow-wrap: anywhere; }
.copy-row code.masked { color: var(--muted); letter-spacing: .06em; }
.copy-row .btn { flex: none; }
.copy-row-hot code { border-color: var(--accent); background: var(--surface); }
.secret-alert { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.meta-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 0; }
.meta-tiles > div { background: var(--muted-bg); border-radius: 8px; padding: 10px 12px; }
.meta-tiles dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.meta-tiles dd { margin: 2px 0 0; font-weight: 600; }
.credential-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.step-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.step-list p { margin: 2px 0 8px; }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px; }
.method { flex: none; font: 700 11px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 8px; border-radius: 6px; }
.method-post { background: var(--ok-bg); color: var(--ok); }
.method-get { background: var(--info-bg); color: var(--info); }
.step-list .copy-row code { font-size: 12px; padding: 7px 10px; }
@media (max-width: 900px) { .integration-layout { grid-template-columns: minmax(0, 1fr); } }
.field > .bm-emoji { margin-top: 6px; }

.hours-day { padding: 12px 0; border-top: 1px solid var(--line); }
.hours-day:first-of-type { border-top: 0; }
.hours-day-head { display: flex; align-items: center; gap: 10px; }
.hours-day-body { margin: 8px 0 0 32px; }
.hours-period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hours-period input[type="text"] { flex: 1 1 160px; min-width: 0; }
.hours-day-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hours-day-copy { margin-top: 8px; }

/* Modal de progresso da importação do iFood */
.ifood-import { max-width: 520px; }
.ifood-import-now { font-weight: 600; }
.ifood-import-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ifood-import-bar > span { display: block; height: 100%; width: 100%; background: var(--brand); }
.ifood-import-bar.is-running > span { width: 35%; animation: ifood-slide 1.2s ease-in-out infinite alternate; }
.ifood-import-bar.is-failed > span { background: var(--danger); }
.ifood-import-log { margin: 0; padding: 8px 8px 8px 28px; max-height: 200px; overflow: auto; font-size: 13px; color: var(--muted); background: var(--muted-bg); border-radius: 8px; }
.ifood-import-log li:last-child { color: var(--fg); font-weight: 600; }
.ifood-import-foot { display: flex; justify-content: flex-end; }
@keyframes ifood-slide { from { margin-left: 0; } to { margin-left: 65%; } }
@media (prefers-reduced-motion: reduce) { .ifood-import-bar.is-running > span { animation: none; width: 100%; } }
.ifood-import-bar > span { transition: width .4s ease; }
.ifood-import-bar:not(.is-running) > span { width: 0; }
.ifood-import-bar.is-failed > span { width: 100%; }
.ifood-import-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.ifood-import-result { list-style: none; margin: 4px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.ifood-import-result b { font: 800 20px var(--display); margin-right: 4px; }

/* Caixa: o dinheiro e a sua composição (vendas, fundo, suprimentos e sangrias) ficam agrupados e destacados */
.cash-group td { background: color-mix(in srgb, var(--warn) 14%, transparent); font-weight: 700; border-left: 4px solid var(--warn); }
.cash-sub td { background: color-mix(in srgb, var(--warn) 7%, transparent); font-size: 13px; color: var(--muted); border-left: 4px solid var(--warn); }
.cash-sub td:first-child { padding-left: 28px; }
.row-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; max-width: 328px; }
.bp-hero.info-inside { padding-bottom: 54px; }
.pos-wrap.cover-full .pos-cover, .bp-wrap.cover-full .bp-cover { border: 0; border-radius: 0; box-shadow: none; }
.bp-wrap.cover-full { margin: -12px -16px 0; }
.cover-styles { display: flex; gap: 10px; flex-wrap: wrap; }
.cover-style { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; text-align: center; }
.cover-style:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.cover-style input { position: absolute; opacity: 0; pointer-events: none; }
.cover-style i { position: relative; display: block; width: 84px; height: 56px; border: 2px solid var(--line); border-radius: 8px; background: var(--muted-bg); overflow: hidden; }
.cover-style i b { position: absolute; background: var(--muted); }
.cover-style i.c-rounded b { inset: 8px; border: 3px solid #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.cover-style i.c-full b { left: 0; right: 0; top: 8px; height: 26px; }
.pos-guide { position: absolute; z-index: 1; pointer-events: none; border: 0 dashed var(--brand); }
.pos-guide[hidden] { display: none; }
.pos-guide-v { left: 50%; top: -6px; bottom: -6px; border-left-width: 2px; }
.pos-guide-h { top: 50%; left: -6px; right: -6px; border-top-width: 2px; }
.logo-zoom, .inline-range { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; font-weight: 600; }
.logo-zoom input[type=range], .inline-range input[type=range] { flex: 1; min-width: 80px; }
.logo-zoom span, .inline-range span { white-space: nowrap; }
.brand-tabs { min-width: 0; }
.bp-body.img-right .bp-item { flex-direction: row-reverse; }
.side-options { display: flex; gap: 10px; flex-wrap: wrap; }
.side-option { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; text-align: center; }
.side-option:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.side-option input { position: absolute; opacity: 0; pointer-events: none; }
.side-option i { position: relative; display: block; width: 150px; height: 62px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.side-option i b { position: absolute; top: 9px; width: 42px; height: 42px; border-radius: 8px; background: var(--muted); }
.side-option i u { position: absolute; height: 7px; border-radius: 4px; background: var(--line); text-decoration: none; }
.side-option i.side-left b { left: 9px; }
.side-option i.side-left u { left: 62px; }
.side-option i.side-right b { right: 9px; }
.side-option i.side-right u { left: 10px; }
.side-option i u:nth-of-type(1) { top: 12px; width: 52px; background: var(--muted); }
.side-option i u:nth-of-type(2) { top: 28px; width: 70px; }
.side-option i u:nth-of-type(3) { top: 42px; width: 34px; }
.bp-photo { position: relative; overflow: hidden; }
.bp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Botão de status das impressoras (menu): verde quando tudo certo, vermelho quando alguma impressora ativa está desconectada. */
.print-status { margin: -8px 0 0; width: 100%; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--side-fg); font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 12px; }
.print-status[hidden] { display: none; }
.print-status .dot { width: 10px; height: 10px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); flex: none; }
.print-status.is-alert { background: rgba(239, 68, 68, .22); }
.print-status.is-alert .dot { background: #EF4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .3); }
.print-status b { font-size: 14px; }
.print-status .hint { margin-left: auto; font-size: 12px; color: var(--side-muted); }
.print-status:hover { background: rgba(255, 255, 255, .14); }
.app.menu-collapsed .print-status { margin: 0; justify-content: center; }
.app.menu-collapsed .print-status b, .app.menu-collapsed .print-status .hint { display: none; }
.receipt-print { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; max-width: 320px; }
.receipt-print .small { flex-basis: 100%; text-align: center; }

/* Editor do layout das impressões (Admin → Impressão) */
.pl-types { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 6px; }
.pl-types-title { font-weight: 700; margin-right: 4px; }
.pl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-weight: 600; font-size: 14px; text-decoration: none; }
.pl-chip:hover { border-color: var(--brand); }
.pl-chip.active { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.pl-inherit { margin: 0 0 16px; }
.pl-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .pl-grid { grid-template-columns: 1fr; } }
.pl-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pl-bar h2 { margin: 0; }
.pl-add { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.pl-block { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pl-block.off .pl-head b { opacity: .5; text-decoration: line-through; }
.pl-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.pl-handle { cursor: grab; color: var(--muted); user-select: none; touch-action: none; padding: 0 4px; font-weight: 700; }
.pl-on { display: flex; align-items: center; gap: 8px; flex: 1; cursor: pointer; }
.pl-toggle { padding: 4px 12px; font-size: 13px; }
.pl-remove { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 6px; }
.pl-remove:hover { color: var(--danger, #D14343); }
.pl-opts { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 10px 12px 12px; border-top: 1px dashed var(--line); }
.pl-opts[hidden] { display: none; }
.pl-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; min-width: 140px; }
.pl-field:has(textarea), .pl-field:has(input[type=text]) { flex: 1 1 100%; }
.pl-field select, .pl-field input, .pl-field textarea { font: inherit; font-weight: 400; }
.pl-check { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.pl-vars { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.pl-var { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 2px 8px; font: 12px monospace; cursor: pointer; color: var(--fg); }
.pl-var:hover { border-color: var(--brand); }
.pl-reset { margin-top: 10px; }
.pl-cols { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.pl-preview-card { position: sticky; top: 12px; }
.pl-paper-wrap { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; overflow-x: auto; }
/* O papel é uma representação da bobina térmica: branco com tinta preta, nos dois modos do sistema. */
.pl-paper { --cols: 48; width: calc(var(--cols) * 1ch); max-width: none; margin: 0 auto; padding: 10px 8px; background: #fff; color: #111; font: 13px/1.25 'Courier New', ui-monospace, monospace; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); box-sizing: content-box; }
.pl-line { position: relative; overflow: hidden; white-space: pre; }
.pl-t { transform-origin: 0 0; white-space: pre; }
.pl-boxwrap { display: flex; align-items: center; margin: 2px 0; overflow: visible; }
.pl-box { border: 2px dashed #555; padding: 8px 14px; font-size: 11px; background: #f3f3f3; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pl-image { width: 150px; height: 64px; display: flex; align-items: center; justify-content: center; }
.pl-qr { width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; }
.pl-cut { text-align: center; color: #777; margin-top: 10px; font-size: 11px; }

/* Ícone da forma de pagamento: botão com o ícone atual e grade de opções. */
.icon-pick { position: relative; }
.icon-pick summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); }
.icon-pick summary::-webkit-details-marker { display: none; }
.icon-pick .caret { font-size: 11px; color: var(--muted); }
.icon-pick .icon-grid { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 8px; width: 270px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.icon-pick .icon-grid label { cursor: pointer; }
.icon-pick .icon-grid input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick .icon-grid span { display: grid; place-items: center; height: 38px; border-radius: 8px; border: 1px solid transparent; color: var(--fg); }
.icon-pick .icon-grid span:hover { background: var(--hover); }
.icon-pick .icon-grid input:checked + span { border-color: var(--brand); background: var(--hover); color: var(--brand); }
.icon-pick .icon-grid input:focus-visible + span { outline: 2px solid var(--focus); }

/* Pedidos manuais: um botão com ícone por tipo de pedido. */
.new-order-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 18px; width: min(94vw, 480px); background: var(--surface); color: var(--fg); }
.new-order-dialog::backdrop { background: rgba(0,0,0,.45); }
.new-order-dialog h2 { margin: 0 0 4px; font-size: 1.1rem; }
.new-order-types { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 64px; gap: 8px; }
/* Botões do mesmo tamanho e cada texto numa linha só ("Consumir no local"). */
.new-order-types .manual-btn { justify-content: center; padding: 0 10px; height: 100%; white-space: nowrap; min-width: 0; }
.new-order-types .manual-btn svg { flex-shrink: 0; }
@media (max-width: 420px) { .new-order-types .manual-btn { font-size: .8rem; gap: 5px; padding: 0 4px; } }
.manual-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 600; text-decoration: none; }
.manual-btn:hover { background: var(--hover); border-color: var(--brand); }
.mo-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .mo-grid { grid-template-columns: 1fr; } }
.mo-group { margin: 14px 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mo-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.mo-product { text-align: left; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.mo-product:hover { border-color: var(--brand); background: var(--hover); }
.mo-product small { color: var(--muted); }
.mo-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mo-line .opts { color: var(--muted); font-size: 13px; }
.mo-line button { font-size: 12px; }
.mo-sum { display: flex; justify-content: space-between; padding: 4px 0; }
.mo-sum.total { font-weight: 800; font-size: 18px; }
.mo-found { border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; overflow: hidden; }
.mo-found button { display: block; width: 100%; text-align: left; font: inherit; padding: 8px 12px; background: var(--surface); color: var(--fg); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.mo-found button:hover { background: var(--hover); }
.mo-pays { display: grid; gap: 6px; }
.mo-pay { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-weight: 600; padding: 9px 12px; border: 2px solid transparent; border-radius: 10px; background: var(--hover); color: var(--fg); cursor: pointer; }
.mo-pay[aria-pressed="true"] { border-color: var(--brand); background: var(--surface); }
.mo-addr { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 14px; }

/* ===== Modo celular: aplicativo ===== */
.appbar, .bottom-nav, .drawer-backdrop { display: none; }
@media (max-width: 760px) {
  .app { display: block; }
  html.drawer-lock { overflow: hidden; }

  .appbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 8px 0 4px; padding-top: env(safe-area-inset-top); box-sizing: content-box; background: var(--side); color: var(--side-fg); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
  .appbar-btn { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--side-fg); }
  .appbar-btn:active, .bottom-nav button:active { background: rgba(255,255,255,.14); }
  .appbar-btn .icon { width: 24px; height: 24px; }
  .appbar-brand { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--side-fg); font: 700 17px var(--display); }
  .appbar-logo { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; overflow: hidden; }
  .appbar-logo img { width: 100%; height: 100%; object-fit: cover; }
  .appbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .appbar-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #3DDC84; }
  .appbar-dot.is-off { background: #FF6B5E; }

  .user-menu { position: relative; flex: 0 0 auto; }
  .user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 4px; border-radius: 99px; background: rgba(255,255,255,.12); }
  .user-menu summary::-webkit-details-marker { display: none; }
  .user-menu summary .icon { width: 16px; height: 16px; }
  .user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
  .user-first { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
  .user-panel { position: absolute; right: 0; top: 48px; width: min(280px, 86vw); background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.28); padding: 8px; z-index: 40; }
  .user-id { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
  .user-id b { display: block; overflow-wrap: anywhere; }
  .user-id small { display: block; color: var(--muted); overflow-wrap: anywhere; }
  .user-panel .mode-toggle, .user-out { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 10px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--fg); }
  .user-panel .mode-toggle[hidden] { display: none; }
  .user-out { color: var(--danger); }
  .user-panel .mode-toggle:hover, .user-out:hover { background: var(--hover); }
  .user-panel form { margin: 0; }

  .drawer-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.5); }
  .drawer-backdrop:not([hidden]) { display: block; }
  .sidebar { position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; width: min(84vw, 320px); height: 100dvh; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 18px; padding: 18px 12px calc(18px + env(safe-area-inset-bottom)); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 4px 0 24px rgba(0,0,0,.35); }
  .app.drawer-open .sidebar { transform: none; }
  .sidebar .nav { flex-direction: column; flex-wrap: nowrap; order: 0; width: 100%; }
  .sidebar .nav a, .nav-group summary { padding-top: 12px; padding-bottom: 12px; }
  .side-foot { display: none; }
  .app.menu-collapsed { grid-template-columns: none; }

  .content { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); max-width: none; }
  .page-head { margin-bottom: 16px; }
  h1 { font-size: 22px; }
  .card { border-radius: 14px; }
  .btn { min-height: 40px; }

  .bottom-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.12); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a, .bottom-nav button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 58px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .bottom-nav .icon { width: 22px; height: 22px; padding: 3px 18px; box-sizing: content-box; border-radius: 99px; transition: background .15s; }
  .bottom-nav a.active { color: var(--brand); font-weight: 700; }
  .bottom-nav a.active .icon { background: color-mix(in srgb, var(--brand) 18%, transparent); }
  .bottom-nav a:focus-visible, .bottom-nav button:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
.adj-box { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Filtros do histórico de atividades */
.toolbar .field input[type=date], .toolbar .field input[type=search] { width: auto; }
.toolbar .field { min-width: 0; }

/* Mapa de rotas dos pedidos (tela cheia) */
.route-modal { position: fixed; inset: 0; z-index: 2000; background: var(--bg); display: flex; flex-direction: column; }
.route-modal[hidden] { display: none; }
.route-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.route-bar h2 { margin: 0; font-size: 1.1rem; }
.route-stages { display: flex; flex-wrap: wrap; gap: 8px; }
.route-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 auto; }
.route-chip.route-pick, .route-chip.route-pick[aria-pressed] { --chip: var(--accent); background: var(--accent); color: var(--accent-ink); opacity: 1; text-decoration: none; }
.route-chip.route-pick.is-on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 0 0 2px var(--accent-ink); }
.route-mapwrap { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; }
.route-toast { position: absolute; left: 56px; top: 10px; z-index: 1100; max-width: min(70%, 340px); padding: 5px 10px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; line-height: 1.3; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; }
.route-toast[hidden] { display: none; }
.route-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--chip); background: var(--chip); color: #111; font: inherit; font-weight: 600; cursor: pointer; }
.route-chip[data-stage="delivering"] { color: #fff; }
.route-chip[aria-pressed="false"] { background: transparent; color: var(--fg); opacity: .6; text-decoration: line-through; }
#route-map { flex: 1; min-width: 0; min-height: 0; }
.route-body { flex: 1; display: flex; min-height: 0; }
.route-side { width: 340px; max-width: 42vw; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); min-height: 0; }
.route-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 10px 0; }
.route-tools .k-select { flex: 1; min-width: 120px; }
.route-side > p { margin: 8px 10px; }
.route-list { list-style: none; margin: 0; padding: 0 10px 10px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.route-item { border: 1px solid var(--line); border-left: 6px solid var(--stage); border-radius: 8px; padding: 8px 10px; background: var(--surface); cursor: pointer; display: flex; gap: 8px; align-items: flex-start; }
.route-item:hover, .route-item.is-active { border-color: var(--brand); border-left-color: var(--stage); background: var(--hover); }
.route-item .route-info { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.route-item .route-check { margin-top: 3px; }
.route-tag { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--stage); color: #111; }
.route-tag.is-dark { color: #fff; }
.route-courier { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--courier); color: #fff; }
@media (max-width: 760px) { .route-body { flex-direction: column-reverse; } .route-side { width: 100%; max-width: none; height: 45%; border-right: 0; border-top: 1px solid var(--line); } }
.route-num { background: transparent; border: 0; box-shadow: none; font-weight: 700; font-size: 10px; color: #111; padding: 0; }
.route-num::before { display: none; }
#filters-clear[hidden] { display: none; }
.k-group-done { margin-left: auto; }
.cg-wrap { background: var(--surface); padding: 16px; border-radius: 10px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; }
.cg-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.cg-table th, .cg-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.cg-table .num { text-align: right; }
.cg-change { border: 2px solid var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent); border-radius: 8px; padding: 10px; margin: 10px 0; font-size: 1.05rem; }
.cg-return { border: 3px solid var(--ok); background: color-mix(in srgb, var(--ok) 18%, transparent); border-radius: 10px; padding: 12px; margin: 10px 0; text-align: center; }
.cg-return-title { font-weight: 700; letter-spacing: .03em; font-size: .9rem; }
.cg-return-value { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.cg-return-detail { font-size: .9rem; opacity: .85; }
.cg-change ul { margin: 6px 0 0; padding-left: 18px; font-size: .95rem; }
.cg-orders { padding-left: 18px; font-size: .9rem; }
.cg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.cg-order { border-top: 1px solid var(--line); padding: 8px 0; }
.cg-order h4 { margin: 0 0 4px; }
.cg-order ul { margin: 0 0 6px; padding-left: 18px; }
.cg-troco { color: var(--warn); font-weight: 700; }
.cg-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cg-edit[hidden], [data-a1-box][hidden] { display: none; }
.route-pin { background: transparent; border: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.route-info-tip { font-size: 13px; line-height: 1.35; }
#route-map.is-picking .route-pin { cursor: crosshair; }
#route-map.is-picking .route-pin.route-pickable, #route-map.is-picking .route-pin.route-pickable * { cursor: pointer; }
/* Selecionar no Mapa desligado: o mapa todo (pedidos, rotas, loja, entregadores) mostra a mão de arrastar. */
#route-map:not(.is-picking), #route-map:not(.is-picking) .leaflet-interactive, #route-map:not(.is-picking) .leaflet-marker-icon * { cursor: grab; }
#route-map.leaflet-dragging:not(.is-picking), #route-map.leaflet-dragging:not(.is-picking) .leaflet-interactive { cursor: grabbing; }
@keyframes route-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(1.12); } }
.route-blink svg { animation: route-blink 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .route-blink svg { animation: none; } }

.route-box { position: absolute; z-index: 1050; border: 2px dashed var(--accent-ink, #1A1A1A); background: color-mix(in srgb, var(--accent) 30%, transparent); pointer-events: none; }
#route-map.is-picking { touch-action: none; cursor: crosshair; user-select: none; }
.couriers-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 18px; width: min(94vw, 460px); background: var(--surface); color: var(--fg); }
.couriers-dialog #couriers-msg { position: sticky; top: 0; z-index: 10; margin: 0 0 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.couriers-dialog #couriers-msg.flash-error { background: linear-gradient(var(--danger-bg), var(--danger-bg)), var(--surface); }
.couriers-dialog #couriers-msg.flash-ok { background: linear-gradient(var(--ok-bg), var(--ok-bg)), var(--surface); }
.couriers-dialog::backdrop { background: rgba(0,0,0,.45); }
.couriers-bulk { display: flex; gap: 6px; margin-bottom: 8px; }
.couriers-list { list-style: none; margin: 0 0 12px; padding: 0; max-height: 40vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.couriers-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.couriers-form { border-top: 1px solid var(--line); padding-top: 10px; }
.couriers-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.couriers-fields input[name=name] { grid-column: 1 / -1; }
.couriers-fields .btn-primary { justify-self: start; }
.couriers-fields .couriers-close { justify-self: end; }

.route-confirm { border: 1px solid var(--line); border-radius: 12px; padding: 18px; width: min(94vw, 520px); max-height: 88vh; background: var(--surface); color: var(--fg); }
.route-confirm::backdrop { background: rgba(0,0,0,.5); }
.route-confirm-list { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; }
.route-confirm-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.route-confirm-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--courier); color: #fff; font-size: 14px; }
.route-confirm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.route-confirm-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 10px; border-bottom: 1px solid var(--line); }
.route-confirm-table td { padding: 5px 10px; border-bottom: 1px solid var(--line); }
.route-confirm-table tr:last-child td { border-bottom: 0; }
.route-confirm { position: fixed; }
.route-confirm::backdrop { background: rgba(0,0,0,.12); }
.route-confirm-handle { margin: 0 0 8px; cursor: move; touch-action: none; user-select: none; display: flex; align-items: baseline; gap: 10px; }
.route-confirm-table { table-layout: fixed; }
.route-confirm-table th:nth-child(1), .route-confirm-table td:nth-child(1) { width: 64px; }
.route-confirm-table th:nth-child(2), .route-confirm-table td:nth-child(2) { width: 46%; }
.route-confirm-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.couriers-filters { display: grid; grid-template-columns: 1fr 120px; gap: 6px; margin-bottom: 8px; }
.couriers-actions { display: flex; gap: 6px; flex-shrink: 0; }
.couriers-item.is-inactive { opacity: .7; }
.route-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.route-head .route-courier { margin-left: auto; text-align: right; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.couriers-actions .is-locked { opacity: .55; cursor: not-allowed; }

.route-queue { list-style: none; margin: 0 10px 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.route-queue[hidden] { display: none; }
.route-queue-item { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: 3px 8px; border-left: 4px solid var(--courier); background: var(--hover); border-radius: 4px; font-size: 13px; }
.route-eta { color: var(--fg); font-weight: 600; }
.route-limit { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.route-limit .k-select { width: auto; }
.route-chip.route-suggest { --chip: #7DD3FC; background: #7DD3FC; color: #0C4A6E; }
.route-chip.route-suggest:hover:not(:disabled) { background: #BAE6FD; }
.route-chip.route-suggest:disabled { opacity: .5; cursor: not-allowed; }
.route-actions .route-limit { color: var(--fg); }

.route-tabs { display: flex; gap: 4px; margin: 0 10px; border-bottom: 1px solid var(--line); }
.route-tab { flex: 1; padding: 7px 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.route-tab.is-active { color: var(--fg); border-bottom-color: var(--accent); }
.route-list[hidden], .route-couriers-panel[hidden] { display: none; }
.route-couriers-panel { flex: 1; overflow-y: auto; min-height: 0; }
.route-couriers-panel .route-queue { margin-top: 0; padding-bottom: 10px; }
.route-queue-item { align-items: center; cursor: grab; touch-action: none; user-select: none; padding: 8px; }
.route-queue-item .route-grip { color: var(--muted); }
.route-queue-info { flex: 1; min-width: 0; }
.route-ghost { position: fixed; z-index: 3000; pointer-events: none; padding: 4px 10px; border-radius: 999px; background: var(--courier); color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.route-pin.route-drop svg { transform: scale(1.35); filter: drop-shadow(0 0 6px var(--accent)); }
.route-toast.is-error { background: #B91C1C; color: #fff; }

.warn-head { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.route-sound-hint { background: #DC2626; color: #fff; border-color: #DC2626; }
.route-sound-hint[hidden] { display: none; }

.route-queue-head { list-style: none; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 2px 2px; }
.route-queue-head:first-child { padding-top: 0; }
.route-queue-item.is-focus { outline: 2px solid var(--courier); background: color-mix(in srgb, var(--courier) 18%, var(--hover)); }
.route-courier-filter { width: 100%; box-sizing: border-box; margin: 0 0 6px; padding: 6px 8px; font-size: 13px; border: 1px solid var(--border, #d1d5db); border-radius: 8px; background: var(--surface, #fff); color: inherit; }
.route-toast.is-wide { left: 10px; max-width: min(92%, 420px); }
/* Paleta dos status: a mesma nas colunas, nos cartões, nos filtros do mapa e nos pontos do mapa (orders-route.js lê estas variáveis). */
:root {
  --st-pending: #F2A65A; --st-accepted: #E8C547; --st-preparing: #6FCF97; --st-delivering: #2A9D8F; --st-done: #B79AD6;
  --st-pending-ink: #2A1A05; --st-accepted-ink: #2A2305; --st-preparing-ink: #0B2A18; --st-delivering-ink: #FFFFFF; --st-done-ink: #2B0F36;
}

.k-head-pending { background: var(--st-pending); color: var(--st-pending-ink); }
.k-head-pending .badge { background: var(--st-pending-ink); color: var(--st-pending); }
.k-card.k-pending { border-left-color: var(--st-pending); }
.k-head-accepted { background: var(--st-accepted); color: var(--st-accepted-ink); }
.k-head-accepted .badge { background: var(--st-accepted-ink); color: var(--st-accepted); }
.k-card.k-accepted { border-left-color: var(--st-accepted); }
.k-head-preparing { background: var(--st-preparing); color: var(--st-preparing-ink); }
.k-head-preparing .badge { background: var(--st-preparing-ink); color: var(--st-preparing); }
.k-card.k-preparing { border-left-color: var(--st-preparing); }
.k-head-delivering { background: var(--st-delivering); color: var(--st-delivering-ink); }
.k-head-delivering .badge { background: var(--st-delivering-ink); color: var(--st-delivering); }
.k-card.k-delivering { border-left-color: var(--st-delivering); }
.k-head-done { background: var(--st-done); color: var(--st-done-ink); }
.k-head-done .badge { background: var(--st-done-ink); color: var(--st-done); }
.k-card.k-done { border-left-color: var(--st-done); }
.route-queue-item.is-locked { cursor: pointer; }
.route-queue-item.is-locked .route-grip { visibility: hidden; }

/* App do entregador: Escala de hoje e Mapa dos entregadores */
.shift-settings-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.shift-settings-form > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.shift-switch { flex-direction: row !important; align-items: center !important; gap: 12px !important; cursor: pointer; color: var(--fg) !important; font-size: 15px !important; flex: 1 1 320px; }
.shift-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.shift-switch small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.shift-switch-ui { flex: none; width: 46px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.shift-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.shift-switch input:checked + .shift-switch-ui { background: var(--danger); }
.shift-switch input:checked + .shift-switch-ui::after { transform: translateX(20px); }
.shift-switch input:focus-visible + .shift-switch-ui { outline: 2px solid var(--focus); outline-offset: 2px; }
.shift-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.shift-row:first-of-type { border-top: 0; }
.shift-row .muted { display: block; }
.courier-invite-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-color: var(--accent); }
.courier-invite-link p { margin: 0; }
.courier-map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.courier-map { height: calc(100vh - 190px); min-height: 420px; border-radius: var(--radius); border: 1px solid var(--line); }
.courier-map-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.courier-map-item { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; cursor: pointer; }
.courier-map-item:hover:not([disabled]) { background: var(--muted-bg); }
.courier-map-item:focus-visible { outline: 2px solid var(--focus); }
.courier-map-item[disabled] { cursor: default; opacity: .7; }
.courier-map-item small { display: block; color: var(--muted); font-size: 12px; }
.courier-map-legend { margin-top: 12px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 4px; }
.dot-live { background: var(--ok); }
.dot-lost { background: var(--muted); }
.courier-icon-sample { display: flex; flex-wrap: wrap; gap: 8px; }
/* Marcador dos entregadores nos mapas da loja (courier-marker.js): a arte do Menuza Entregador, borda na cor da situação seguindo o contorno da imagem. */
.courier-mark-icon { background: transparent; border: 0; }
.courier-mark { display: block; position: relative; transition: opacity .3s; }
.courier-mark img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
/* Entregadores no mesmo lugar (courier-stack.js): contador no canto do marcador de cima. */
.courier-stack-count { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: var(--brand-ink, #fff); border: 2px solid var(--card, #fff); font: 800 11px/16px var(--display); text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); pointer-events: none; }
.courier-mark img { filter: drop-shadow(3px 0 0 var(--mark)) drop-shadow(-3px 0 0 var(--mark)) drop-shadow(0 3px 0 var(--mark)) drop-shadow(0 -3px 0 var(--mark)) drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.courier-mark.is-lost { opacity: .7; }
/* Nome curto do entregador em cima do marcador. */
.courier-mark-name { position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: #fff; color: #1f1f1f; border: 2px solid var(--mark); border-radius: 999px; padding: 1px 7px; font: 700 11px/15px var(--display, sans-serif); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); pointer-events: none; }
.courier-legend { background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text); border-radius: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); font-size: 11px; line-height: 1.3; padding: 4px 8px; max-width: 220px; }
.courier-legend summary { cursor: pointer; font-weight: 600; color: var(--muted); list-style: none; }
.courier-legend summary::-webkit-details-marker { display: none; }
.courier-legend summary::before { content: '● '; color: var(--muted); }
.courier-legend ul { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 3px; }
.courier-legend .courier-tip { font-size: 12px; line-height: 1.45; }
.courier-status-dot { margin-right: 6px; }
.courier-status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--mark); border: 1px solid rgba(0, 0, 0, .5); vertical-align: -1px; }
.courier-art-picker { border: 0; padding: 0; margin: 0 0 10px; min-width: 0; }
.courier-art-picker legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.courier-art-group { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.courier-art-group > b { width: 84px; font-size: 13px; }
.courier-art-options { display: flex; gap: 8px; flex-wrap: wrap; }
.courier-art { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.courier-art:hover { border-color: var(--muted); }
.courier-art input { position: absolute; opacity: 0; pointer-events: none; }
.courier-art img { width: 40px; height: 40px; object-fit: contain; }
.courier-art:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.courier-art:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.courier-sample { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; text-align: center; }
.courier-status-preview { gap: 12px 6px; }
.courier-sample small { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
    .courier-map-wrap { grid-template-columns: 1fr; }
    .courier-map { height: 60vh; }
}

/* Sequência do pedido no dia de trabalho (cartão do quadro de pedidos), ao lado do número. */
.k-seq { font: 700 11px var(--display); padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }

/* Rota de entrega no cartão do pedido ("Rota 12"); amarela tracejada enquanto o entregador não leu o QR Code. */
.k-route-chip { display: inline-block; font: 700 11px var(--display); padding: 1px 8px; border-radius: 999px; background: var(--muted-bg); border: 1px solid var(--line, var(--muted)); }
.k-card.is-delivered { box-shadow: inset 4px 0 0 var(--ok); }
.k-card.has-occurrence { box-shadow: inset 4px 0 0 var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.k-outcome { margin-left: 4px; }
.k-delivered { color: var(--ok); margin-top: 4px; }
.k-occurrence { margin-top: 6px; padding: 8px; border-radius: 8px; border: 1px solid var(--warn); color: var(--fg); background: var(--surface); }
.k-occurrence-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.k-occurrence-actions form { margin: 0; }
.k-pay-alert { margin-top: 4px; padding: 4px 8px; border-left: 3px solid var(--warn); border-radius: 4px; background: var(--surface); }
.cg-reported { margin: 4px 0; padding: 4px 8px; border-left: 3px solid var(--warn); }
.board-toast { position: fixed; right: 16px; bottom: 16px; z-index: 60; max-width: min(360px, calc(100vw - 32px)); padding: 10px 14px; border-radius: var(--radius); background: var(--fg); color: var(--surface); font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.board-toast.is-warn { background: var(--warn); color: var(--warn-bg); }
.k-route-chip.is-waiting { border-style: dashed; background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }

/* Histórico do entregador (Delivery → Entregadores → Histórico; public/js/courier-history.js). Os modais passam do
   max-width padrão (420px): calendário médio; corridas em quase a tela toda, sempre com a lista à esquerda e o mapa à
   direita (a 1ª corrida já abre no mapa; empilhados abaixo de 900px). */
.modal.history-modal { max-width: none; width: min(720px, 96vw); max-height: 94vh; }
.modal.history-modal.is-wide { width: min(1500px, 97vw); height: 94vh; }
.history-body { display: grid; grid-template-columns: 1fr; gap: 14px; min-height: 0; flex: 1; }
.history-list { overflow: auto; min-height: 0; max-height: 100%; }
.history-rides th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.history-rides td { vertical-align: top; }
.history-rides td:nth-child(4) { min-width: 180px; }
.history-rides td:nth-child(1), .history-rides td:nth-child(2) { white-space: nowrap; }
.history-rides td:nth-child(5), .history-rides td:nth-child(6) { white-space: nowrap; }
.history-body.has-map .history-list { max-height: 34vh; }
.history-body.has-map .history-rides th:nth-child(7), .history-body.has-map .history-rides td:nth-child(7) { display: none; }
.history-map-wrap { display: flex; flex-direction: column; min-height: 0; }
.history-map { flex: 1; min-height: 340px; border-radius: var(--radius); border: 1px solid var(--line); }
@media (min-width: 900px) {
    .history-body.has-map { grid-template-columns: minmax(520px, 56%) 1fr; }
    .history-body.has-map .history-list { max-height: none; }
    .history-map { min-height: 0; height: 100%; }
}
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.history-actions { display: flex; gap: 8px; margin-left: auto; }
.history-total { color: var(--fg); }
.hc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 10px 0; }
.hc-head { font: 700 11px var(--display); text-align: center; color: var(--muted); text-transform: uppercase; }
.hc-day { display: grid; gap: 1px; justify-items: center; padding: 8px 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); font: inherit; cursor: default; min-height: 70px; }
.hc-day .hc-num { font-size: 11px; color: var(--muted); }
.hc-day strong { font: 800 20px var(--display); line-height: 1.1; }
.hc-day small { font-size: 10px; color: var(--muted); }
.hc-day.has-rides { cursor: pointer; border-color: var(--accent); background: var(--warn-bg); }
.hc-day.has-rides:hover, .hc-day.has-rides:focus-visible { background: var(--accent); color: var(--accent-ink); }
.hc-day.has-rides:hover small, .hc-day.has-rides:hover .hc-num { color: inherit; }
.hc-day:disabled { opacity: .55; }
.history-rides .hr-row { cursor: pointer; }
.history-rides .hr-row:hover, .history-rides .hr-row.is-selected { background: var(--hover); }
.history-rides .hr-row.is-selected td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.hr-diff { display: inline-block; font: 700 11px var(--display); padding: 1px 6px; border-radius: 999px; }
.hr-diff.is-ok { background: var(--ok-bg); color: var(--ok); }
.hr-diff.is-early { background: var(--info-bg); color: var(--info); }
.hr-diff.is-late { background: var(--danger-bg); color: var(--danger); }
.hr-info { border: 0; background: none; color: var(--info); font-size: 16px; cursor: pointer; padding: 0 2px; vertical-align: middle; }
.history-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.history-legend .lg-suggested, .history-legend .lg-actual { display: inline-block; width: 28px; height: 0; border-top: 4px dashed var(--info); }
.history-legend .lg-actual { border-top-style: solid; border-top-color: var(--accent); }

/* Relatórios da tela de Pedidos (public/js/orders-reports.js). */
.reports-dialog { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg, inherit); }
.reports-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.reports-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.reports-head h2 { margin: 0; font-size: 1.2rem; }
.reports-head-end { margin-left: auto; display: flex; gap: 8px; }
.reports-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.reports-period label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.reports-period input { width: 120px; }
.reports-quick { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.reports-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.reports-card { display: grid; grid-template-columns: 24px 1fr; gap: 4px 10px; align-items: start; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: inherit; font: inherit; cursor: pointer; }
.reports-card:hover, .reports-card:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.reports-card svg { width: 22px; height: 22px; color: var(--brand); grid-row: span 2; }
.reports-card span { color: var(--muted); font-size: 13px; }
.reports-body { overflow: auto; }
.rp-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.rp-stat { flex: 1 1 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.rp-stat span { display: block; font-size: 12px; color: var(--muted); }
.rp-stat b { font-size: 1.15rem; }
.rp-h { font-size: 1rem; margin: 16px 0 8px; }
.rp-table-wrap { overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rp-table th, .rp-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.rp-table th { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.rp-table .num { text-align: right; white-space: nowrap; }
.rp-table tfoot th, .rp-table tfoot td { border-top: 2px solid var(--line); border-bottom: 0; color: inherit; font-size: 14px; }
.rp-click { cursor: pointer; }
.rp-click:hover, .rp-click:focus-visible { background: var(--muted-bg); outline: none; }
.rp-total { min-width: 140px; }
.rp-bar { position: relative; display: block; min-width: 110px; height: 22px; border-radius: 6px; background: var(--muted-bg); overflow: hidden; }
.rp-bar-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--brand) 30%, transparent); border-radius: 6px; }
.rp-bar-text { position: relative; display: block; padding: 0 8px; line-height: 22px; font-weight: 700; text-align: right; }
.rp-hbars { display: grid; gap: 6px; max-width: 640px; }
.rp-hbar { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.rp-cols { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding: 8px 0 0; margin-bottom: 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.rp-col { flex: 1 0 28px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.rp-col-bar { width: 70%; min-height: 0; background: var(--brand); border-radius: 4px 4px 0 0; }
.rp-col-n { font-size: 11px; font-weight: 700; }
.rp-col-h { font-size: 11px; color: var(--muted); }
.rp-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--muted-bg); }
.rp-delivered { background: var(--ok-bg); color: var(--ok); }
.rp-occurrence { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 760px) { .rp-hbar { grid-template-columns: 120px 1fr; } .reports-head-end { margin-left: 0; } }
.reports-dialog [hidden] { display: none !important; }
.rp-quick { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: inherit; font: 600 13px var(--display, inherit); cursor: pointer; }
.rp-quick[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.orders-actions .sound-controls { align-self: stretch; }
.orders-actions .printer-pick { align-self: stretch; height: auto; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
/* Relatórios, som, teste e impressora ficam juntos à direita da linha (Novo pedido, Entregadores e Rota à esquerda). */
.orders-actions #reports-open { margin-left: auto; }

/* Marketing → Avaliações (portal/reviews/index). */
.rv-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .rv-grid { grid-template-columns: 1fr; } }
.rv-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.rv-stat { flex: 1 1 120px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.rv-stat span { display: block; font-size: 12px; color: var(--muted); }
.rv-stat b { font-size: 1.3rem; }
.rv-stat small { display: block; color: var(--muted); }
.rv-item { padding: 12px 0; border-top: 1px solid var(--line); }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; }
.rv-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
@media (max-width: 760px) { .rv-rows { grid-template-columns: 1fr; } }
.rv-q { display: inline-block; min-width: 64px; font-weight: 700; font-size: 13px; }
.rv-stars { color: var(--accent); font-size: 18px; letter-spacing: 1px; }
.rv-off { color: var(--line); }
.rv-text { margin: 2px 0 0; font-size: 14px; }
.rv-reply-form { margin-top: 8px; }
.rv-reply-form textarea { width: 100%; }
.rv-reply-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 6px; }
