:root {
  --bg: #f4f6f9; --card: #ffffff; --text: #18212f; --muted: #64748b; --line: #e3e8ef;
  --accent: #1d4ed8; --accent-text: #ffffff; --accent-bg: #e8efff;
  --ok: #16a34a; --ok-text: #15803d; --ok-bg: #e7f6ec;
  --warn: #d97706; --warn-text: #b45309; --warn-bg: #fef3e2;
  --closed: #94a3b8; --closed-text: #475569; --closed-bg: #eef2f6;
  --err: #dc2626; --err-text: #c62828; --err-bg: #fdecec;
  --side: #0f1b2d; --side-text: #c4cede; --side-muted: #6f7d94; --side-hover: rgba(255, 255, 255, .06);
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 2px 8px rgba(15, 27, 45, .04);
  --gap: 14px;
  --radius: 12px;
  --lateral: 248px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1420; --card: #151e2c; --text: #e6ebf2; --muted: #94a3b8; --line: #243042;
    --accent: #5b8cff; --accent-text: #ffffff; --accent-bg: #1a2a4d;
    --ok: #4ade80; --ok-text: #86efac; --ok-bg: #12301f;
    --warn: #fbbf24; --warn-text: #fcd34d; --warn-bg: #3a2a0b;
    --closed: #94a3b8; --closed-text: #cbd5e1; --closed-bg: #1e293b;
    --err: #f87171; --err-text: #fca5a5; --err-bg: #3d1616;
    --side: #0a111c; --side-text: #c4cede; --side-muted: #6f7d94; --side-hover: rgba(255, 255, 255, .06);
    --shadow: none;
  }
}
:root[data-theme="dark"] {
    --bg: #0d1420; --card: #151e2c; --text: #e6ebf2; --muted: #94a3b8; --line: #243042;
    --accent: #5b8cff; --accent-text: #ffffff; --accent-bg: #1a2a4d;
    --ok: #4ade80; --ok-text: #86efac; --ok-bg: #12301f;
    --warn: #fbbf24; --warn-text: #fcd34d; --warn-bg: #3a2a0b;
    --closed: #94a3b8; --closed-text: #cbd5e1; --closed-bg: #1e293b;
    --err: #f87171; --err-text: #fca5a5; --err-bg: #3d1616;
    --side: #0a111c; --side-text: #c4cede; --side-muted: #6f7d94; --side-hover: rgba(255, 255, 255, .06);
    --shadow: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Moldura: menu lateral escuro + barra de cima (no celular o menu vira gaveta). */
.app { display: flex; min-height: 100dvh; }
.lateral {
  width: var(--lateral); flex: none; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
}
.marca { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 20px) 18px 14px; color: #fff; text-decoration: none; }
.marca-logo { width: 36px; height: 36px; border-radius: 10px; background: #1d4ed8; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.marca b { display: block; font-size: 15px; }
.marca small { display: block; color: #8a97ad; font-size: 12px; }
.menu { padding: 4px 10px 20px; flex: 1; }
.menu-grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--side-muted); padding: 16px 10px 6px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border-radius: 8px;
  color: var(--side-text); text-decoration: none; font-size: 14px;
}
.menu-item:hover { background: var(--side-hover); color: #fff; }
.menu-item[aria-current="page"] { background: #1d4ed8; color: #fff; }
.menu-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-item .nome-loja { font-weight: 650; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-dica { font-size: 13px; color: var(--side-muted); padding: 4px 10px; margin: 0; line-height: 1.4; }
.lateral-rodape { padding: 14px 18px calc(env(safe-area-inset-bottom) + 14px); border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: #8a97ad; }

.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.barra-topo {
  position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}
.menu-btn { display: none; width: 44px; height: 44px; flex: none; border-radius: 10px; border: 1px solid var(--line); background: var(--card); place-items: center; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.campo-topo { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 0 1 300px; }
.campo-topo span { font-size: 11px; color: var(--muted); font-weight: 600; }
.campo-topo select { height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--card); color: inherit; font-size: 16px; min-width: 0; width: 100%; }
.espaco { flex: 1; }
.fundo-menu { position: fixed; inset: 0; z-index: 40; background: rgba(8, 14, 24, .5); }

.tela {
  width: 100%; max-width: 920px; margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 32px) max(16px, env(safe-area-inset-left));
}
.demo-banner { text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; background: var(--warn-bg); color: var(--warn-text); }

@media (max-width: 899px) {
  .lateral {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; height: auto; width: min(300px, 84vw);
    transform: translateX(-100%); transition: transform .22s ease; visibility: hidden;
  }
  .lateral.aberta { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .menu-btn { display: grid; }
  .menu-item { min-height: 46px; font-size: 15px; }
  .tela { padding-top: 16px; }
  .demo-banner { padding-top: calc(env(safe-area-inset-top) + 6px); }
  .demo-banner:not([hidden]) + .barra-topo { padding-top: 10px; }
}

.topo { display: flex; align-items: center; gap: 10px; margin-bottom: var(--gap); }
.topo h1 { font-size: 28px; line-height: 1.15; margin: 0; letter-spacing: -.5px; font-weight: 700; }
.topo .data { margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.topo .sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.topo .grow { flex: 1; min-width: 0; }
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.girando svg { animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }



.busca {
  width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  padding: 0 14px; font-size: 16px; margin-bottom: var(--gap); outline: none;
}
.busca:focus, .campo input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

.grupo { margin-bottom: 22px; }
.grupo h2 {
  font-size: 13px; font-weight: 650; color: var(--muted);
  margin: 0 0 8px 4px; display: flex; justify-content: space-between;
}
.lista { display: grid; gap: 8px; }
.loja {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; min-height: 70px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .1s;
}
.loja:active { transform: scale(.99); }
.loja .info { flex: 1; min-width: 0; }
.loja .nome, .loja .meta { display: block; }
.loja .nome { font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loja .meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.loja .meta b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.loja .seta { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; opacity: .7; }
.loja.inativa { opacity: .6; }

.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--closed); }
.dot.OK { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.dot.WARNING { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.dot.CLOSED { background: var(--closed); }
.dot.ERROR { background: var(--err); box-shadow: 0 0 0 4px var(--err-bg); }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--closed-bg); color: var(--closed-text); }
.pill.OK { background: var(--ok-bg); color: var(--ok-text); }
.pill.WARNING { background: var(--warn-bg); color: var(--warn-text); }
.pill.ERROR { background: var(--err-bg); color: var(--err-text); }

.cartao { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: var(--gap); }
.cartao h2 { font-size: 15px; margin: 0 0 10px; }
.linhas { margin: 0; display: grid; gap: 10px; }
.linhas div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.linhas dt { color: var(--muted); }
.linhas dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.campo { display: block; margin-bottom: 14px; }
.campo span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.campo input, .campo select {
  width: 100%; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  padding: 0 12px; font-size: 16px; outline: none; color: inherit;
}
.campo textarea { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; outline: none; }
.campo textarea:focus, .campo select:focus { border-color: var(--accent); }
.chave { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 14px; cursor: pointer; }
.chave input { width: 48px; height: 28px; appearance: none; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.chave input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.chave input:checked { background: var(--ok); }
.chave input:checked::after { left: 23px; }

.btn { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 650; font-size: 16px; cursor: pointer; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }

.voltar { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; text-decoration: none; font-weight: 600; margin-bottom: 4px; }
.voltar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }

.passos { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.vazio { text-align: center; padding: 36px 16px; }
.vazio p { margin: 6px 0 16px; }
.erro-coleta { background: var(--err-bg); color: var(--err); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: var(--gap); }

.aviso {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 20px); z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px);
}

/* Página de login: faixa da marca (azul-marinho) + formulário. No computador, metade e metade. */
body.login { min-height: 100dvh; display: flex; flex-direction: column; }
.login-marca {
  background: #0f1b2d; color: #c4cede; display: flex; flex-direction: column; gap: 18px;
  padding: calc(env(safe-area-inset-top) + 22px) 20px 24px;
}
.login-marca-topo { display: flex; align-items: center; gap: 10px; color: #fff; }
.login-marca-topo b { display: block; font-size: 16px; }
.login-marca-topo small { display: block; color: #8a97ad; font-size: 12px; }
.login-marca-texto h2 { color: #fff; font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -.3px; }
.login-marca-texto ul { display: none; }
.login-marca-rodape { display: none; }
.login-lado { flex: 1; display: flex; justify-content: center; padding: 24px 16px calc(env(safe-area-inset-bottom) + 24px); }
.login-card { width: 100%; max-width: 400px; }
.login-card h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.3px; }
.login-card > .muted:first-of-type { margin: 0; }
.login-card form { margin: 22px 0 14px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.senha-campo { position: relative; margin-bottom: 14px; }
.senha-campo input { width: 100%; height: 50px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: inherit; padding: 0 92px 0 14px; font-size: 16px; outline: none; }
.senha-campo input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.ver-senha { position: absolute; right: 6px; top: 6px; height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; }
.login-error { background: var(--err-bg); color: var(--err-text); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: -4px 0 14px; }
@media (min-width: 900px) {
  body.login { flex-direction: row; }
  .login-marca { width: 46%; max-width: 560px; padding: 40px 48px; justify-content: space-between; }
  .login-marca-texto h2 { font-size: 34px; max-width: 420px; }
  .login-marca-texto ul { display: grid; gap: 12px; list-style: none; margin: 28px 0 0; padding: 0; font-size: 15px; }
  .login-marca-texto li { display: flex; gap: 10px; align-items: center; }
  .login-marca-texto li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5b8cff; flex: none; }
  .login-marca-rodape { display: block; color: #6f7d94; font-size: 12px; }
  .login-lado { align-items: center; padding: 40px; }
}

/* Atalho da loja para as vendas. */
.atalho { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-height: 64px; }
.atalho .info { flex: 1; min-width: 0; }
.atalho .info b, .atalho .info span { display: block; }
.atalho .seta { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; }
.atalho-icone { width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); display: grid; place-items: center; flex: none; }
.atalho-icone svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Vendas. */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px var(--gap); padding: 2px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.datas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.datas .btn { grid-column: 1 / -1; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: var(--gap); transition: opacity .2s; }
.kpis.atualizando { opacity: .5; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; min-width: 0; }
.kpi-nome { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi b { display: block; font-size: 20px; line-height: 1.25; margin: 4px 0 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.var { font-size: 12px; font-weight: 700; }
.var.bom { color: var(--ok-text); }
.var.ruim { color: var(--err-text); }
.var.neutro { color: var(--muted); font-weight: 600; }
.barras { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.barra-topo { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.barra-topo span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.barra { height: 8px; border-radius: 99px; background: var(--bg); margin: 5px 0 2px; overflow: hidden; }
.barra span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.barra-pct { font-size: 12px; }
.aviso-homolog { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: var(--gap); font-weight: 600; }

/* Avaliações. */
.nota-loja { display: flex; align-items: center; gap: 14px; }
.nota-loja .nota { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.nota-loja p { margin: 4px 0 0; }
.estrelas { color: #e3a008; letter-spacing: 1px; font-size: 16px; white-space: nowrap; }
.estrelas .apagada { color: var(--line); }
.lista-aval { display: grid; gap: 10px; margin-bottom: var(--gap); }
.lista-aval .cartao { margin-bottom: 0; }
.avaliacao.pendente { border-color: var(--warn); }
.aval-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.aval-meta { margin: 4px 0 8px; }
.aval-texto { margin: 0 0 8px; font-size: 15px; overflow-wrap: anywhere; }
.aval-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.aval-tags span { font-size: 12px; background: var(--bg); border-radius: 99px; padding: 3px 10px; color: var(--muted); }
.aval-resposta { background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 14px; margin-bottom: 8px; overflow-wrap: anywhere; }
.aval-resposta.da-loja { border-left: 3px solid var(--accent); }
.aval-prazo { font-size: 13px; color: var(--warn); font-weight: 600; margin: 0 0 10px; }
.aval-form textarea { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; outline: none; }
.aval-form textarea:focus { border-color: var(--accent); }
.aval-form-rodape { display: flex; align-items: center; gap: 8px; }
.aval-form-rodape .contador { flex: 1; }
.contador.erro { color: var(--err); font-weight: 700; }
.erro-campo { color: var(--err); font-weight: 600; font-size: 14px; margin: 8px 0 0; }
.detalhe .aval-texto { margin-top: 14px; }
.campos-lado .btn { align-self: end; min-height: 48px; margin-bottom: 14px; }

/* Financeiro. */
.abas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: var(--gap); }
.abas button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 0 4px; }
.abas button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
.abas.abas-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-largo { grid-column: 1 / -1; }
.kpi-largo b { font-size: 26px; }
.negativo { color: var(--err); }
.positivo { color: var(--ok); }
.linhas .total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; }
.linhas dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pedido-topo { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; min-height: 32px; }
.pedido-valores { white-space: nowrap; font-variant-numeric: tabular-nums; }
.seletor { width: 100%; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; font-size: 16px; text-transform: capitalize; }
.baixar { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* Cardápio. */
.item-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; }
.item-card.pausado .item-nome { color: var(--muted); }
.item-linha { display: flex; align-items: center; gap: 10px; }
.item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; background: none; border: 0; padding: 4px 0; text-align: left; cursor: pointer; min-height: 44px; }
.item-nome { font-weight: 650; font-size: 15px; }
.item-preco { font-size: 15px; font-variant-numeric: tabular-nums; }
.preco-de { text-decoration: line-through; color: var(--muted); font-size: 13px; }
.chave-item { margin: 0; min-height: 44px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.form-preco { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.opcoes-promo { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.opcoes-promo label { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.opcoes-promo input { width: 20px; height: 20px; accent-color: var(--accent); }
.previa { margin: 0 0 12px; font-weight: 600; }
.acoes-cardapio { display: flex; gap: 8px; margin-bottom: var(--gap); }
.acoes-cardapio .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.acoes-cat { display: flex; gap: 12px; text-transform: none; letter-spacing: 0; }
.link { background: none; border: 0; padding: 6px 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; text-decoration: none; }
.btn-leve { display: flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; background: var(--bg); min-height: 44px; font-size: 15px; }
.editor-item textarea, .editor-item select { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; }
.editor-item select { height: 48px; padding: 0 10px; }
.editor-item .contador-campo { float: right; font-weight: 500; }
.campos-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.titulo-secao { font-size: 16px; margin: 6px 0 8px; }
.grupo-topo { display: flex; gap: 8px; align-items: flex-end; }
.grupo-topo .grow { flex: 1; }
.grupo-topo .icon-btn { margin-bottom: 14px; }
.regra { margin: -6px 0 10px; font-weight: 600; }
.opcoes { display: grid; gap: 8px; margin-bottom: 10px; }
.opcao-linha { display: grid; grid-template-columns: 44px minmax(0, 1fr) 76px auto auto; gap: 6px; align-items: center; }
.opcao-linha input:not([type=checkbox]) { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; padding: 0 10px; font-size: 16px; min-width: 0; width: 100%; }
.opcao-linha .icon-btn { width: 36px; height: 36px; }
.rodape-fixo { position: sticky; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.canal-linha { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.canal-linha input:not([type=checkbox]), .faixa-topo input { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; padding: 0 10px; font-size: 16px; min-width: 0; width: 100%; }
.canal-nome { font-weight: 600; }
.faixa-horario { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 10px; }
.faixa-topo { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; }
.dias { display: flex; gap: 4px; margin-top: 8px; }
.dia { flex: 1; }
.dia input { position: absolute; opacity: 0; pointer-events: none; }
.dia span { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; font-weight: 650; cursor: pointer; }
.dia input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.dia input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tamanho, .sabor { border-top: 1px solid var(--line); padding-top: 10px; }
.tamanho:first-of-type, .sabor:first-of-type { border-top: 0; padding-top: 0; }
.precos-sabor { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.acoes-cardapio .btn { padding: 0 10px; }
.item-sel { display: flex; align-items: center; padding-right: 2px; }
.item-sel input { width: 22px; height: 22px; accent-color: var(--accent); }
.item-card.selecionado { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.barra-lote { position: sticky; bottom: 12px; z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 12px; margin: var(--gap) 0; }
.lote-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.lote-topo b { flex: 1; }
.lote-botoes { display: flex; gap: 8px; }
.lote-botoes .btn { flex: 1; padding: 0 8px; }
.lote-campos { display: grid; grid-template-columns: 1.3fr 1fr 70px; gap: 8px; margin-bottom: 8px; }
.lote-campos select, .lote-campos input { height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; padding: 0 10px; font-size: 16px; min-width: 0; }
.lote-previa { margin: 0 0 6px; line-height: 1.5; }
.complementos { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.complementos h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.comp-grupo { margin-bottom: 8px; }
.comp-titulo, .comp-opcao { margin-bottom: 0; min-height: 44px; }
.comp-opcao { display: flex; align-items: center; gap: 10px; }
.comp-opcao .grow { flex: 1; min-width: 0; }
.foto-campo { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.foto-grande { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.foto-vazia { display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); font-size: 12px; }
.foto-acoes { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.foto-mini { width: 44px; height: 44px; border-radius: 10px; border: 1px dashed var(--line); background: var(--bg); padding: 0; overflow: hidden; cursor: pointer; font-size: 18px; }
.foto-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-foto { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.comp-opcao { padding-left: 12px; font-size: 15px; }
.chips-pausa { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.chips-pausa .btn { padding: 0 4px; font-size: 15px; }
.pausa-outro { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.pausa-outro .grow { flex: 1; margin-bottom: 0; }
.lista-pausas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-pausas li { display: flex; align-items: center; gap: 10px; }
.lista-pausas .grow { flex: 1; }
.dia-horario { border-top: 1px solid var(--line); padding: 8px 0; }
.dia-horario .faixa-topo { margin-top: 6px; }
.dia-topo { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.dia-topo b { min-width: 72px; }
.dia-topo .link { margin-left: auto; }
.modelo-nota { border-top: 1px solid var(--line); padding: 10px 0; }
.modelo-nota h3 { font-size: 15px; margin: 0 0 8px; color: #f5a623; }
.modelo-linha { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-bottom: 8px; }
.modelo-linha .previa-modelo { grid-column: 1 / -1; margin: 0; }
.sugestao { border-top: 1px solid var(--line); padding: 10px 0; }
.sugestao textarea { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; padding: 10px; font: inherit; font-size: 16px; margin: 6px 0 8px; }
.historico { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }

/* Desempenho. */
.kpis-cartao .kpi { box-shadow: none; background: var(--bg); border-color: transparent; }
.kpis-cartao .kpi b { font-size: 18px; }
.grafico-horas { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-bottom: 18px; position: relative; }
.barra-hora { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.barra-hora span { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; display: block; }
.barra-hora small { position: absolute; bottom: -18px; font-size: 10px; color: var(--muted); }
.mapa-calor { display: grid; gap: 2px; margin-top: 16px; align-items: center; }
.mapa-calor small { font-size: 10px; color: var(--muted); text-align: center; }
.mapa-calor .celula { aspect-ratio: 1; border-radius: 3px; background: var(--accent); display: block; }
.barra-dupla { height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 25%, var(--bg)); overflow: hidden; }
.barra-dupla span { display: block; height: 100%; background: var(--accent); }
.aviso-info { background: var(--closed-bg); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: var(--gap); }
.lote-botoes a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* Rastrear pedido: etapas da venda ao repasse */
.rastreio-etapa { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 6px; }
.linha-tempo { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.linha-tempo li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; }
.linha-tempo li::before { content: ""; position: absolute; left: -20px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.linha-tempo li.negativo::before { background: var(--err); }
.repasse-pedido { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }

/* Painel geral. */
.tela.larga { max-width: 1180px; }
.kpis-painel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis-painel .kpi:first-child { grid-column: 1 / -1; }
.kpis-painel .kpi:first-child b { font-size: 28px; }
.kpis-painel .kpi b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi.esqueleto b, .kpi.esqueleto .kpi-nome { background: var(--bg); border-radius: 6px; color: transparent; }
.estrela { color: #e3a008; }
.painel-grade { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.painel-grade .cartao { margin-bottom: 0; }
.grafico-dias { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 6px; }
.dia-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dia-barras { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.dia-barras span { width: min(16px, 40%); border-radius: 4px 4px 0 0; }
.b-atual { background: var(--accent); }
.b-anterior { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.dia-col small { font-size: 11px; color: var(--muted); }
.legenda { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ranking .barra { height: 6px; margin: 4px 0 0; }
.ranking a { color: inherit; text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabela-lojas h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tabela { display: grid; }
.tabela .tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.tabela .tr:first-of-type { border-top: 0; }
.tabela .th { display: none; }
.td-loja { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-loja b, .td-loja small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-loja small { font-size: 12px; }
.tabela .num { font-variant-numeric: tabular-nums; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.tabela .num::before { content: attr(data-r); color: var(--muted); font-size: 13px; }
.td-fat { grid-column: 1 / -1; }
.td-fat b { font-size: 15px; }
.td-sem { grid-column: 1 / -1; font-size: 13px; }
@media (min-width: 900px) {
  .kpis-painel { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kpis-painel .kpi:first-child { grid-column: auto; }
  .kpis-painel .kpi:first-child b { font-size: 22px; }
  .painel-grade { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .grafico-dias { height: 230px; }
  .tabela .th { display: grid; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-top: 0; }
  .tabela .tr { grid-template-columns: minmax(0, 2.2fr) 1.4fr .8fr 1fr .8fr .8fr; align-items: center; padding: 10px 6px; border-radius: 8px; }
  .tabela a.tr:hover { background: var(--bg); }
  .td-loja { grid-column: auto; }
  .tabela .num { justify-content: flex-end; }
  .tabela .num::before { content: none; }
  .td-fat { grid-column: auto; }
  .td-sem { grid-column: 2 / 6; text-align: right; }
}

/* Tela da loja. */
.titulo-bloco { font-size: 13px; font-weight: 650; color: var(--muted); margin: 6px 0 8px 2px; }
.status-faixa { display: flex; align-items: flex-start; gap: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--closed); border-radius: var(--radius); padding: 12px 14px; margin-bottom: var(--gap); }
.status-faixa.OK { border-left-color: var(--ok); }
.status-faixa.WARNING { border-left-color: var(--warn); }
.status-faixa.ERROR { border-left-color: var(--err); }
.status-faixa .dot { margin-top: 6px; }
.status-faixa .grow { flex: 1; min-width: 0; }
.status-faixa b { font-size: 16px; }
.status-faixa p { margin: 3px 0 0; }
.status-faixa .lido { white-space: nowrap; margin-top: 2px; }
.kpis-loja { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis-loja a.kpi { color: inherit; text-decoration: none; }
.kpis-loja a.kpi:hover { border-color: var(--accent); }
.kpi-largo-3 { grid-column: 1 / -1; }
.acessos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: var(--gap); }
.acesso { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; min-width: 0; transition: border-color .15s, transform .1s; }
.acesso:hover { border-color: var(--accent); }
.acesso:active { transform: scale(.98); }
.acesso .atalho-icone { margin-bottom: 4px; }
.acesso b { font-size: 15px; }
.acesso .small { line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.faltam p { margin: 6px 0 0; }
.loja-grade { display: grid; gap: 0 var(--gap); }
@media (max-width: 380px) {
  .acesso .small { display: none; }
}
@media (min-width: 900px) {
  .kpis-loja { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi-largo-3 { grid-column: span 3; }
  .acessos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .loja-grade { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Abas em linha (sublinhado), roláveis no celular. */
.abas-linha { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 0 -16px var(--gap); padding: 0 16px; }
.abas-linha::-webkit-scrollbar { display: none; }
.abas-linha button { flex: none; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.abas-linha button:hover { color: var(--text); }
.abas-linha button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
@media (min-width: 900px) { .abas-linha { margin: 0 0 var(--gap); padding: 0; } }

/* Financeiro. */
.kpis-fin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis-fin .kpi-destaque { grid-column: 1 / -1; background: var(--accent-bg); border-color: transparent; }
.kpis-fin .kpi-destaque b { font-size: 28px; }
.kpis-fin .kpi .small { display: block; }
.previsao { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px var(--gap); padding: 0 16px 2px; }
.previsao::-webkit-scrollbar { display: none; }
.previsao-item { flex: none; min-width: 128px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.previsao-item span { text-transform: capitalize; }
.previsao-item b { font-size: 17px; font-variant-numeric: tabular-nums; }
.fin-grade { display: grid; gap: 0 var(--gap); }
.positivo-fundo { background: var(--ok) !important; }
.negativo-fundo { background: var(--err) !important; }
.lista-linhas { padding: 4px 16px; }
.linha-item { padding: 12px 0; border-top: 1px solid var(--line); }
.linha-item:first-child { border-top: 0; }
.linha-item .aval-topo + .aval-topo { margin-top: 4px; }
.valor-linha { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pedido-fin.aberto { background: var(--bg); margin: 0 -16px; padding: 12px 16px; }
@media (min-width: 900px) {
  .kpis-fin { grid-template-columns: 1.4fr 1fr 1fr; }
  .kpis-fin .kpi-destaque { grid-column: auto; }
  .kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .previsao { margin: 0 0 var(--gap); padding: 0 0 2px; }
  .fin-grade { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Padrão das telas no computador: números em fileira e cartões em duas colunas. */
.grade-2 { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.grade-2 > .cartao { margin-bottom: 0; }
@media (min-width: 900px) {
  .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .grade-2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .lista { grid-template-columns: 1fr 1fr; }
  .aval-grade { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Vendas. */
:root { --serie-1: #1d4ed8; --serie-2: #5b8cff; --serie-3: #93b4ff; --serie-4: #c7d7fe; --serie-5: #94a3b8; }
.kpis-vendas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis-vendas .kpi-destaque { grid-column: 1 / -1; background: var(--accent-bg); border-color: transparent; }
.kpis-vendas .kpi-destaque b { font-size: 28px; }
.kpis-vendas .kpi > span:last-child { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.grade-3 { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.grade-3 > .cartao { margin-bottom: 0; }
.pilha { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg); gap: 2px; margin-bottom: 12px; }
.pilha span { display: block; height: 100%; min-width: 3px; }
.serie-1 { background: var(--serie-1); } .serie-2 { background: var(--serie-2); } .serie-3 { background: var(--serie-3); } .serie-4 { background: var(--serie-4); } .serie-5 { background: var(--serie-5); }
.legenda-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.legenda-dist li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; font-size: 14px; }
.legenda-dist i { width: 10px; height: 10px; border-radius: 3px; }
.legenda-dist .nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legenda-dist b { font-variant-numeric: tabular-nums; }
.legenda-dist .small { grid-column: 2 / -1; margin-top: -2px; }
@media (min-width: 900px) {
  .kpis-vendas { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .kpis-vendas .kpi-destaque { grid-column: auto; }
  .kpis-vendas .kpi-destaque b { font-size: 24px; }
  .grade-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}

/* Avaliações. */
.auto-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.auto-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aval-resumo { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.aval-resumo .cartao, .aval-resumo .kpis { margin-bottom: 0; }
.nota-cartao .nota-loja { margin-bottom: 14px; }
.nota-cartao .nota { font-size: 44px; font-weight: 700; }
.notas-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notas-dist li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 13px; }
.notas-dist .barra { margin: 0; height: 8px; }
.notas-dist b { text-align: right; font-variant-numeric: tabular-nums; }
.nota-5 { background: #16a34a !important; } .nota-4 { background: #65a30d !important; } .nota-3 { background: #d97706 !important; }
.nota-2 { background: #ea580c !important; } .nota-1 { background: #dc2626 !important; } .nota-0 { background: var(--closed) !important; }
.aval-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-botao { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.kpi-botao.alerta { background: var(--warn-bg); border-color: transparent; }
.kpi-botao.alerta b { color: var(--warn-text); }
.aval-cliente { display: flex; align-items: center; gap: 10px; }
.aval-cliente .grow { flex: 1; min-width: 0; }
.aval-cliente b, .aval-cliente .small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.aval-nota { margin: 8px 0 6px; }
.avaliacao.pendente { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.recolhivel summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 28px; }
.recolhivel summary::-webkit-details-marker { display: none; }
.recolhivel summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.recolhivel[open] summary::after { content: "–"; }
@media (min-width: 900px) {
  .aval-resumo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .aval-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desempenho. */
.kpi-rodape { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.sub-bloco { font-size: 13px; font-weight: 650; color: var(--muted); margin: 14px 0 8px; }
.horarios .sub-bloco:first-child { margin-top: 0; }
.horarios-grade { display: grid; gap: 18px; }
.horarios .grafico-horas { height: 150px; }
.horarios .barra-hora span { background: var(--accent); border-radius: 4px 4px 0 0; }
.mapa-calor .celula { border-radius: 4px; }
.dois-numeros { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.dois-numeros > div { display: flex; flex-direction: column; gap: 2px; }
.dois-numeros b { font-size: 24px; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .horarios-grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

/* Cardápio. */
.kpis-card .kpi-botao { text-align: left; }
.acoes-cardapio { flex-wrap: wrap; }
.btn-ativo { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.cat-cartao { padding: 0; overflow: hidden; }
.cat-topo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin: 0; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 15px; }
.cat-nome { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cat-pausada .cat-nome { color: var(--muted); }
.cat-itens { display: grid; }
.cat-itens > .muted { padding: 12px 16px; margin: 0; }
.cat-cartao .item-card { border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); padding: 8px 16px; }
.cat-cartao .item-card:first-child { border-top: 0; }
.cat-cartao .item-card.selecionado { background: var(--accent-bg); box-shadow: none; }
.cat-cartao .item-card.aberto { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.item-foto { width: 48px; height: 48px; }
@media (min-width: 900px) {
  .cat-itens { grid-template-columns: 1fr 1fr; }
  .cat-cartao .item-card:nth-child(2) { border-top: 0; }
  .cat-cartao .item-card:nth-child(even) { border-left: 1px solid var(--line); }
  .cat-cartao .item-card.aberto { grid-column: 1 / -1; border-left: 0; }
}
@media (max-width: 899px) {
  .acoes-cardapio { display: grid; grid-template-columns: 1fr 1fr; }
  .acoes-cardapio .btn { white-space: nowrap; }
}

/* Itens vendidos. */
.funil { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.funil li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.funil-barra { justify-self: center; height: 34px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 56px; }
.funil li:nth-child(2) .funil-barra { background: #3b6df0; }
.funil li:nth-child(3) .funil-barra { background: #5b8cff; }
.funil li:nth-child(4) .funil-barra { background: #7ea4ff; }
.funil li:nth-child(5) .funil-barra { background: var(--ok); }
.funil-legenda { display: flex; flex-direction: column; font-size: 14px; }
.destaques { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.destaques li { display: grid; gap: 1px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.destaques li:last-child { border-bottom: 0; padding-bottom: 0; }
.destaques b { font-size: 16px; }
.destaque-valor { color: var(--accent); font-weight: 600; font-size: 14px; }
.ranking-itens .vendido { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.posicao { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--muted); }
.vendido.top .posicao { background: var(--accent); color: #fff; }
.vendido-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vendido-num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Lojas. */
.kpis-status .kpi-nome { display: flex; align-items: center; gap: 6px; }
.kpis-status .kpi-nome .dot { width: 8px; height: 8px; box-shadow: none; }
.kpis-status .kpi-botao[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.kpis-status .r-ok b { color: var(--ok-text); }
.kpis-status .r-warn b { color: var(--warn-text); }
.kpis-status .r-err b { color: var(--err-text); }
.kpis-status .r-closed b { color: var(--closed-text); }
.kpis-status .zero { opacity: .6; }
.grupo-cartao { padding: 0; overflow: hidden; }
.grupo-fora { opacity: .85; }
.grupo-linhas { display: grid; }
.loja-cab { display: none; }
.loja-linha { border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); min-height: 64px; padding: 12px 16px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 18px; gap: 12px; }
.grupo-linhas .loja-linha:nth-child(2) { border-top: 0; }
.loja-linha:hover { background: var(--bg); }
.loja-local { display: none; }
.loja-venda { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.loja-venda b { font-size: 15px; }
@media (min-width: 900px) {
  .loja-cab, .loja-linha { grid-template-columns: 10px minmax(0, 2fr) minmax(0, 1fr) 130px 18px; }
  .loja-cab { display: grid; gap: 12px; padding: 10px 16px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  .loja-cab span:nth-child(4) { text-align: right; }
  .grupo-linhas .loja-linha:nth-child(2) { border-top: 1px solid var(--line); }
  .loja-local { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .so-celular { display: none; }
}
@media (min-width: 900px) {
  .grupo-cartao ~ .grupo-cartao .loja-cab { display: none; }
  .grupo-cartao ~ .grupo-cartao .loja-cab + .loja-linha { border-top: 0; }
}

/* Formulários (pausas, resposta automática, adicionar loja, editores do cardápio). */
.form-acoes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.form-acoes .btn { flex: 1 1 auto; }
.dia-horario { display: grid; gap: 6px; }
.dia-horario.fechado .dia-topo b { color: var(--muted); }
.dia-turnos { display: grid; gap: 6px; }
.kpi-alerta { background: var(--warn-bg); border-color: transparent; }
.kpi-alerta b { color: var(--warn-text); }
.opcoes-cartao { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.opcoes-cartao label { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.opcoes-cartao label:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.opcoes-cartao input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.opcoes-cartao b, .opcoes-cartao .small { display: block; }
.modelo-nota { border-top: 0; padding: 16px; }
.modelo-nota h3 { margin: 0 0 10px; }
.passos-numero { list-style: none; padding: 0; counter-reset: passo; gap: 14px; }
.passos-numero li { counter-increment: passo; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.passos-numero li::before { content: counter(passo); width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.rodape-fixo { position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.editor-item .grade-2 > .cartao { margin-bottom: 0; }
@media (min-width: 900px) {
  .dia-horario { grid-template-columns: 160px minmax(0, 1fr); align-items: start; }
  .dia-horario .dia-topo { min-height: 44px; }
  .opcoes-cartao { grid-template-columns: 1fr 1fr; }
  .rodape-fixo { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); display: flex; justify-content: flex-end; }
  .rodape-fixo .btn-block { width: auto; min-width: 260px; }
  .form-acoes .btn { flex: 0 0 auto; }
}
.grade-2:empty { display: none; }
.linhas-texto dd { white-space: normal; }
