/* =====================================================================
   Miaou · painel do lojista
   Design system: Warm Neutral SaaS (v1)
   Neutros quentes + acento esmeralda · títulos em peso 400 · numerais 300
   · pílulas totais · anel hairline no lugar de borda · sombras difusas.
   ===================================================================== */

:root {
  /* neutros quentes: a espinha dorsal */
  --ink: #1e1d1c; --ink-strong: #0e0e10; --paper: #fefdfb; --surface: #ffffff;
  --panel: #f7f6f3; --panel-2: #f1f0ef; --border: #dfdcd9;
  --line: rgba(30,29,28,.06); --line-2: rgba(0,0,0,.08);
  --muted: #78756f; --muted-2: #737373; --faint: #aaaaaa; --on-dark: #f7f6f3;

  /* acento: usado em pequenas doses */
  --accent: #00bb7f; --accent-bright: #00d294; --accent-soft: #d0fae5; --accent-ink: #007956;

  /* dados (paleta funcional, validada para daltonismo) */
  --data-1: #00bb7f; --data-2: #54a2ff; --data-1-soft: rgba(0,187,127,.12); --data-2-soft: rgba(84,162,255,.14);

  /* status */
  --ok: #00bb7f; --warn: #edb200; --bad: #fb2c36; --bad-soft: #fef2f2;

  /* raio */
  --r-chip: 12px; --r-sm: 14px; --r-md: 16px; --r-lg: 20px; --r-xl: 24px; --r-2xl: 28px; --r-pill: 9999px;

  /* elevação */
  --e-ring: 0 0 0 1px rgba(0,0,0,.06);
  --e-soft: 0 2px 12px rgba(0,0,0,.06);
  --e-raised: 0 0 0 1px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.08);
  --e-float: 0 24px 80px rgba(0,0,0,.22);

  --focus-ring: rgba(30,29,28,.35);
  --ease: cubic-bezier(.4, 0, .2, 1);

  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--panel); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--ink); }
.muted { color: var(--muted); }
::selection { background: var(--accent-soft); }

/* ---- tipografia ------------------------------------------------------ */
h1 { font-size: 28px; line-height: 1.35; letter-spacing: -.02em; font-weight: 400; margin: 0 0 6px; }
h2 { font-size: 20px; line-height: 1.4; letter-spacing: -.015em; font-weight: 500; margin: 0 0 14px; }
h3 { font-size: 16px; line-height: 1.5; font-weight: 600; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.overline { text-transform: uppercase; font-size: 11.5px; letter-spacing: .06em; font-weight: 500; color: var(--muted); }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
  background: var(--panel-2); padding: 3px 7px; border-radius: 8px; word-break: break-all; }

/* ícones: traço arredondado, herdam a cor do contexto */
.ic { width: 18px; height: 18px; flex: none; display: block; }
svg.ic, .ic { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---- casca: menu lateral + conteúdo ---------------------------------- */
/* O menu vive sobre o mesmo fundo do painel; o que separa é uma linha
   hairline, não uma mudança de superfície. */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column;
  gap: 22px; padding: 28px 16px; background: transparent; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; height: 38px; padding: 0 12px; }
.brand img { height: 26px; width: auto; display: block; }
.mbar .brand img { height: 22px; }

.tabs { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.tabs button { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 12px; border: 0;
  background: none; border-radius: var(--r-sm); cursor: pointer; color: var(--muted); font-size: 14.5px; font-weight: 500;
  text-align: left; white-space: nowrap; transition: 150ms var(--ease); }
.tabs button .ic { width: 19px; height: 19px; flex: none; }
.tabs button:hover { background: var(--panel-2); color: var(--ink); }
.tabs button[aria-selected="true"] { background: #eceae7; color: var(--ink); }

/* Loja + interruptor na mesma linha, como um bloco só. */
.side-foot { padding-top: 16px; border-top: 1px solid var(--line); }
.store-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--e-ring); }
.store-id { flex: 1; min-width: 0; display: grid; gap: 2px; }
.store-id b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-id span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch { display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 38px; height: 22px; border-radius: var(--r-pill); background: var(--border); position: relative; transition: 150ms var(--ease); flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: 150ms var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { left: 19px; }
.switch input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Barra do celular com o botão do menu; some no desktop. */
.mbar { display: none; align-items: center; gap: 10px; padding: 10px 16px; position: sticky; top: 0; z-index: 30;
  background: var(--panel); border-bottom: 1px solid var(--line); }
.mbar .brand { padding: 0; height: auto; }
.mbar-btn { width: 40px; height: 40px; margin-left: -8px; border: 0; background: none; color: var(--ink);
  display: grid; place-items: center; cursor: pointer; flex: none; border-radius: var(--r-sm); transition: 150ms var(--ease); }
.mbar-btn:hover { background: var(--panel-2); }
.mbar-btn .ic { width: 22px; height: 22px; }
.scrim { display: none; }

/* ---- página ---------------------------------------------------------- */
.view { max-width: 1120px; margin: 0 auto; width: 100%; padding: 28px 36px 72px; }
.page-head { display: flex; align-items: center; gap: 12px 16px; margin-bottom: 24px; flex-wrap: wrap; min-height: 36px; }
.page-head .tt { flex: 1; min-width: 220px; }
.page-head h1, .page-head .sub { margin: 0; }
.page-head .sub { margin-top: 4px; }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.card { background: var(--surface); border: 0; border-radius: var(--r-xl); padding: 24px; margin-bottom: 16px; box-shadow: var(--e-ring), var(--e-soft); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head h2 { margin: 0; flex: 1; }
.card.flat { background: var(--panel); box-shadow: none; }

/* ---- botões (pílulas, peso 500) -------------------------------------- */
.btn { height: 40px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: 150ms var(--ease); white-space: nowrap; }
.btn:hover { background: var(--panel); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.btn.primary:hover { background: #333230; }
.btn.danger { color: var(--bad); border-color: var(--border); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { height: 34px; padding: 0 16px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* chip de ferramenta no cabeçalho de página */
.chip-btn { height: 36px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--r-pill); background-color: var(--surface);
  color: var(--ink); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: 150ms var(--ease); }
.chip-btn:hover { background-color: var(--panel); }
.chip-btn .ic { width: 16px; height: 16px; }

/* ---- formulários ----------------------------------------------------- */
label.f { display: grid; gap: 7px; font-size: 13.5px; font-weight: 500; }
label.f small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
label.f input, label.f select { font-weight: 400; }
input[type="text"], input[type="number"], input[type="search"], select {
  height: 42px; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 14px; background: var(--surface); min-width: 0; font-size: 14.5px; transition: 150ms var(--ease); }
/* todos os selects: mesma seta arredondada (Hugeicons) com respiro igual ao do texto */
select { -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9' stroke='%231e1d1c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; }
select.chip-btn { padding: 0 44px 0 18px; }
select::-ms-expand { display: none; }
input[type="text"]:focus, input[type="number"]:focus, input[type="search"]:focus, select:focus { border-color: var(--ink); outline: 2px solid var(--focus-ring); outline-offset: 1px; }
input::placeholder { color: var(--muted); }
/* Amostra de cor: quadrado do mesmo tamanho da caixa de seleção. */
input[type="color"] { width: 20px; height: 20px; border: 1.5px solid var(--border); border-radius: 6px; padding: 0; background: none; cursor: pointer; overflow: hidden; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }

/* Caixa de seleção: quadrado preto quando marcada, com o check branco do Hugeicons. */
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex: none; margin: 0;
  border: 1.5px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; position: relative; transition: 150ms var(--ease); }
input[type="checkbox"]:hover { border-color: var(--muted); }
input[type="checkbox"]:checked { background: var(--ink); border-color: var(--ink); }
input[type="checkbox"]:checked::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.0588 8.83333 19 7'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Barra de progresso/faixa: trilho vazio em --border, preenchimento esmeralda, bola branca. */
input[type="range"] { appearance: none; -webkit-appearance: none; width: 190px; height: 20px; background: none; cursor: pointer; --fill: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) var(--fill), var(--border) var(--fill)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0;
  margin-top: -6px; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.18); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: var(--r-pill); background: var(--border); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: var(--r-pill); background: var(--accent); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.18); }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--focus-ring), 0 2px 6px rgba(0,0,0,.18); }

.st.ok { background: var(--accent-soft); color: var(--accent-ink); }
.st.todo { background: var(--panel-2); color: var(--muted); }
.st.warn { background: #fffbeb; color: #8a6400; }

/* ---- KPI (rótulo + numeral leve + variação + sparkline) --------------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; background: var(--surface);
  border-radius: var(--r-xl); box-shadow: var(--e-ring), var(--e-soft); padding: 4px; margin-bottom: 16px; }
.kpi { padding: 20px 22px; border-radius: var(--r-lg); position: relative; overflow: hidden; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lab lab" "val spark" "delta delta"; align-items: center; gap: 2px 12px; }
.kpi + .kpi::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 1px; background: var(--line-2); }
.kpi .k-lab { grid-area: lab; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.kpi .k-help { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--border); display: inline-grid; place-items: center;
  font-size: 9.5px; color: var(--muted); cursor: help; flex: none; }
.kpi .k-val { grid-area: val; font-size: 36px; font-weight: 300; letter-spacing: -.02em; line-height: 1.05; }
.kpi .k-delta { grid-area: delta; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.kpi .k-delta .ic { width: 13px; height: 13px; }
.kpi .k-delta.up { color: var(--accent-ink); }
.kpi .k-delta.down { color: var(--bad); }
.kpi .k-spark { grid-area: spark; width: 84px; height: 38px; flex: none; align-self: end; }
.kpi .k-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* ---- gráfico de linhas ----------------------------------------------- */
.chart { width: 100%; }
.chart-legend { display: flex; gap: 20px; margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.chart-legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .g-line { stroke: var(--line-2); stroke-width: 1; }
.chart .g-txt { font-size: 11px; fill: var(--muted); }
.chart-empty { color: var(--muted); font-size: 14px; padding: 28px 0; }
.chart { position: relative; }
.chart-tip { position: absolute; top: 0; width: 150px; background: var(--ink); color: var(--on-dark); border-radius: var(--r-chip);
  padding: 9px 12px; font-size: 12.5px; pointer-events: none; box-shadow: var(--e-soft); display: grid; gap: 4px; }
.chart-tip[hidden] { display: none; }
.chart-tip b { font-weight: 500; }
.chart-tip span { display: flex; align-items: center; gap: 7px; color: rgba(247,246,243,.82); }
.chart-tip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* barras horizontais (ranking de tamanhos) */
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 72px 1fr 48px; gap: 12px; align-items: center; font-size: 14px; }
.bar b { font-weight: 500; }
.bar .track { background: var(--panel); border-radius: var(--r-pill); height: 12px; }
.bar i { display: block; height: 12px; border-radius: var(--r-pill); background: var(--accent); }
.bar .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- tabelas --------------------------------------------------------- */
table.t { width: 100%; border-collapse: collapse; }
.t th, .t td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.thumb { width: 40px; height: 40px; border-radius: var(--r-chip); object-fit: cover; background: var(--panel-2); }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--r-pill); background: var(--panel);
  font-size: 12.5px; line-height: 1; white-space: nowrap; margin: 3px 6px 3px 0; vertical-align: middle; }
/* selo logo abaixo de um seletor (Produtos): respiro entre os dois */
td select + div > .chip, td select + .chip { margin-top: 8px; }
.chip.ok { background: var(--accent-soft); color: var(--accent-ink); }
.chip.warn { background: #fffbeb; color: #8a6400; }

.sim { background: var(--panel); border-radius: var(--r-lg); padding: 20px; }
.sim .res { font-size: 40px; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; }

 

/* controle segmentado interno (aparência) */
.seg { display: inline-flex; gap: 2px; background: var(--panel); border-radius: var(--r-pill); padding: 4px; }
.seg button { border: 0; background: none; height: 32px; padding: 0 15px; border-radius: var(--r-pill); cursor: pointer;
  color: var(--muted); font-size: 13px; font-weight: 500; transition: 150ms var(--ease); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--e-soft); }

.toast { visibility: hidden; opacity: 0; position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: var(--on-dark); padding: 12px 20px; border-radius: var(--r-pill); transition: 150ms var(--ease); z-index: 10; max-width: 90vw; font-size: 14px; }
.toast.show { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--bad); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- responsivo (por último, para vencer as regras acima) ------------- */
@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .mbar { display: flex; grid-row: 1; }

  /* menu vira gaveta: entra pela esquerda sobre um véu */
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: 276px; max-width: 84vw; height: 100dvh; z-index: 40;
    background: var(--panel); border-right: 1px solid var(--line); transform: translateX(-100%);
    transition: transform 200ms var(--ease); }
  body.nav-open .side { transform: none; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(30,29,28,.42);
    opacity: 0; pointer-events: none; transition: opacity 150ms var(--ease); }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .view { padding: 20px 20px 56px; }
  
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi + .kpi::before { display: none; }
  .hide-sm { display: none; }
}
@media (max-width: 520px) {
  h1 { font-size: 24px; }
  .kpi-row { grid-template-columns: 1fr; }
  .kpi .k-spark { width: 72px; }
}

.view, .card, .home-col, .grid > * { min-width: 0; }

@media (max-width: 600px) {
  .view { padding: 16px 16px 56px; overflow-x: hidden; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  
  /* celular: título e ferramentas na mesma linha; botões viram só o ícone */
  .page-head { flex-wrap: nowrap; }
  .page-head .tt { min-width: 0; }
  .page-head .tools { flex: none; flex-wrap: nowrap; gap: 8px; }
  .page-head .tools .chip-btn .lbl { display: none; }
  .page-head .tools button.chip-btn { width: 36px; padding: 0; justify-content: center; }
  .page-head .tools select.chip-btn { padding: 0 38px 0 14px; background-position: right 12px center; }
  /* produtos mais provados: nome e os três números numa linha */
  table.t.stack.top-t tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 2px; padding: 12px 0; }
  table.t.stack.top-t td { padding: 0; font-size: 14px; }
  table.t.stack.top-t td.st-main { flex: 1 0 100%; padding: 0 0 2px; font-weight: 500; }
  table.t.stack.top-t td[data-label]::before { content: none; }
  table.t.stack.top-t td[data-short]::after { content: " " attr(data-short); color: var(--muted); }
  table.t.stack.top-t td[data-short] + td[data-short]::before { content: "·"; color: var(--faint); margin-right: 6px; display: inline; }
  .row .spacer { display: none; }
  .row > .btn.primary { margin-left: auto; }
  .filters input[type="search"] { flex: 1 1 100%; width: 100%; }
  .card { padding-left: 16px; padding-right: 16px; }
  

  /* tabelas viram cartões: uma linha = um bloco, rótulo acima do valor */
  table.t.stack, table.t.stack tbody { display: block; width: 100%; }
  table.t.stack thead { display: none; }
  table.t.stack tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  table.t.stack tr:last-child { border-bottom: 0; }
  table.t.stack td { display: block; padding: 4px 0; border: 0; text-align: left; }
  table.t.stack td.hide-sm { display: none; }
  table.t.stack td.st-main { padding-bottom: 8px; }
  table.t.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
  table.t.stack td select { width: 100%; }
  table.t.stack td .btn { margin: 0 6px 6px 0; }
  table.t.stack td.num { text-align: left; }

  /* números lado a lado, dois por linha */
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 16px 14px; grid-template-columns: 1fr; grid-template-areas: "lab" "val" "delta"; }
  .kpi .k-lab { white-space: normal; font-size: 12.5px; margin-bottom: 4px; }
  .kpi .k-val { font-size: 28px; }
  .kpi .k-spark { display: none; }
  .kpi .k-delta { white-space: normal; font-size: 12px; }
}
@media (max-width: 600px) {
  
  
  
  
  /* gráfico por dia: mantém letras legíveis e rola para o lado */
  .chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chart svg { min-width: 620px; }
}

/* ---- números com comparação ao período anterior (Relatórios) --------- */
.kpi { grid-template-areas: "lab lab" "val spark" "delta delta" "note note"; }
.kpi .k-note { grid-area: note; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 600px) {
  .kpi { grid-template-areas: "lab" "val" "delta" "note"; }
  .kpi .k-note { font-size: 12px; }
  
  
  
  
  
  
}

/* rótulos de duas linhas não desalinham os números vizinhos no celular */
@media (max-width: 600px) {
  .kpi { align-content: start; }
  .kpi .k-lab { line-height: 1.3; height: 2.6em; align-items: flex-start; overflow: visible; }
}

/* tabelas largas (Produtos) rolam dentro do cartão em telas médias, sem empurrar a página */
.card:has(> table.t) { overflow-x: auto; }
table.t select { max-width: 220px; }

/* ---- paginação (rodapé do cartão da lista) --------------------------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.pager:empty { display: none; }
.pager-info { flex: 1; text-align: center; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.chip-btn:disabled { opacity: .5; cursor: not-allowed; }
.chip-btn:disabled:hover { background-color: var(--surface); }
@media (max-width: 600px) {
  .pager { flex-wrap: wrap; }
  .pager-info { order: -1; flex: 1 1 100%; }
  .pager .chip-btn { flex: 1; justify-content: center; }
}

/* ---- provador virtual --------------------------------------------------- */
.meter { height: 8px; border-radius: var(--r-pill); background: var(--panel-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--ink); transition: width .4s var(--ease); }
.meter.warn i { background: var(--warn); }
.meter.bad i { background: var(--bad); }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.pref:last-of-type { border-bottom: 0; }
.pref b { display: block; font-weight: 500; font-size: 14.5px; }
.pref .muted { display: block; font-size: 13px; margin-top: 2px; }
.pref select { flex: none; }
.pref a.mail { color: var(--ink); text-decoration: none; }
.pref a.mail:hover { text-decoration: underline; }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.tabs [hidden] { display: none !important; }

/* ---- aviso curto (cota, WhatsApp desligado) --------------------------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--e-ring), var(--e-soft); }
.banner > .ic { width: 22px; height: 22px; color: var(--muted); }
.banner.warn { background: #fffbeb; } .banner.warn > .ic { color: #b58300; }
.banner.bad { background: var(--bad-soft); } .banner.bad > .ic { color: var(--bad); }
.banner-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.banner-t b { font-weight: 500; }
.banner-t span { color: var(--muted); font-size: 13.5px; }
.banner .btn .ic { width: 16px; height: 16px; }
@media (max-width: 640px) { .banner { flex-wrap: wrap; } .banner .btn { width: 100%; } }

.note { font-size: 13px; margin: 14px 0 0; display: flex; align-items: center; gap: 6px; }
.note .ic { width: 15px; height: 15px; }

.bar.wide { grid-template-columns: minmax(110px, 170px) 1fr minmax(64px, auto); }
.bar .num small { font-size: 12px; color: var(--faint); }
th.act, td.act { text-align: right; width: 1%; white-space: nowrap; }
td.act .chip-btn { height: 32px; padding: 0 12px; text-decoration: none; }
td.act .chip-btn .ic { color: #25a35a; }

/* ---- uso do mês ------------------------------------------------------- */
.usage { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.usage b { font-size: 34px; font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.usage span { color: var(--muted); }

/* ---- planos: cartões grandes, o mais escolhido escuro ----------------- */
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.price-card { display: flex; flex-direction: column; padding: 28px; border-radius: var(--r-2xl); background: var(--panel);
  box-shadow: 0 0 0 1px var(--line-2); color: var(--ink); }
.price-card.on:not(.dark) { background: var(--surface); box-shadow: 0 0 0 1.5px var(--ink); }
.price-card.dark { background: var(--ink); color: var(--on-dark); box-shadow: none; }
.price-card.dark.on { box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 4px var(--panel-2); }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.pc-head h3 { margin: 0; font-size: 22px; font-weight: 400; letter-spacing: -.02em; }
.pc-pill { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--border); font-size: 13px; white-space: nowrap; }
.dark .pc-pill { border-color: rgba(247,246,243,.28); }
.pc-price { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.pc-price b { font-size: 48px; font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.pc-price span { color: var(--muted); font-size: 15px; }
.dark .pc-price span, .dark .pc-tag, .dark .pc-quota span { color: rgba(247,246,243,.62); }
.pc-tag { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
/* frase do plano com altura de duas linhas: as cotas ficam alinhadas entre os cartões */
.pricing .pc-price + .pc-tag { min-height: calc(2 * 1.45em); }
.price-card hr { border: 0; border-top: 1px solid var(--line-2); margin: 22px 0; width: 100%; }
.price-card.dark hr { border-top-color: rgba(247,246,243,.14); }
.pc-quota { display: flex; align-items: baseline; gap: 8px; }
.pc-quota b { font-size: 30px; font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.pc-quota span { font-size: 15px; }
/* desconto por prova (selo esmeralda do design system); a linha existe em todos os cartões para alinhar */
.pc-save { min-height: 28px; margin-top: 12px; display: flex; }
.pc-save span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 500; }
.dark .pc-save span { background: rgba(0,210,148,.16); color: var(--accent-bright); }
.pc-feat { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; font-size: 14.5px; }
.pc-feat li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.45; }
.pc-feat .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.pc-btn { margin-top: auto; width: 100%; height: 52px; border-radius: var(--r-pill); border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 500;
  background: var(--ink); color: var(--on-dark); transition: 150ms var(--ease); }
.pc-btn:hover { background: #333230; }
.pc-btn .ic { width: 18px; height: 18px; }
.pc-btn.light { background: var(--on-dark); color: var(--ink); }
.pc-btn.light:hover { background: #ffffff; }
.pc-btn:disabled { cursor: default; background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.dark .pc-btn:disabled { color: rgba(247,246,243,.62); box-shadow: inset 0 0 0 1px rgba(247,246,243,.28); }

/* Volume: barra à esquerda, preço e botão à direita */
.price-card.vol { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.vol-r { display: flex; flex-direction: column; }
.vol-r .pc-price { margin-top: 0; }
.vol-r .pc-quota { margin-top: 18px; }
.vol-r .pc-btn-slot { margin-top: 24px; }
.vol-slider { margin-top: 30px; }
.vol-l .pc-feat { margin: 28px 0 0; }
/* a faixa do design system (trilho --border, preenchimento esmeralda, bola branca), larga e com bola maior para o dedo */
input[type="range"].vol-range { width: 100%; height: 28px; margin: 0; }
/* no Volume o preenchimento é preto (tinta), como os botões do plano */
input[type="range"].vol-range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--ink) var(--fill), var(--border) var(--fill)); }
input[type="range"].vol-range::-moz-range-progress { background: var(--ink); }
input[type="range"].vol-range::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; }
input[type="range"].vol-range::-moz-range-thumb { width: 24px; height: 24px; }
.vol-ticks { display: flex; justify-content: space-between; margin: 10px 0 0; padding: 0 1px; }
.vol-ticks button { all: unset; cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; min-width: 26px; text-align: center;
  font-variant-numeric: tabular-nums; }
.vol-ticks button:first-child { text-align: left; } .vol-ticks button:last-child { text-align: right; }
.vol-ticks button.on { color: var(--ink); font-weight: 500; }
.vol-ticks button:focus-visible { outline: 2px solid var(--focus-ring); border-radius: 6px; }
.pc-note { margin-top: 16px; }

@media (max-width: 1100px) {
  .pricing { grid-template-columns: 1fr; max-width: 520px; }
  .pricing .pc-price + .pc-tag { min-height: 0; }
  .pc-save:empty { display: none; }
  .price-card.vol { grid-template-columns: 1fr; gap: 26px; max-width: 520px; }
}
@media (max-width: 640px) {
  .price-card { padding: 22px; border-radius: var(--r-xl); }
  .pc-price b { font-size: 42px; }
  .pc-head h3 { font-size: 20px; }
  .pc-feat { margin-bottom: 22px; }
}