/* Rethink Sans (fonte variável, hospedada no próprio Miaou: a CSP só permite arquivos do servidor) · SIL OFL 1.1, ver /fonts/RethinkSans-LICENSE.txt */
@font-face {
  font-family: "Rethink Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url(/fonts/rethink-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Rethink Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url(/fonts/rethink-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* =====================================================================
   Miaou · painel do lojista
   Base: creme quente, tinta quase preta, cartões brancos com borda fina
   (sem sombra), botões em pílula. Cor só com significado:
     rosa  = uso do provador (provas, pessoas, funil)
     verde = dinheiro e confirmação (vendas, receita, checks, "ativo")
     vermelho = queda e erro
   Degradê do Miaou (lilás → pêssego) só nos cartões escuros: a loja no
   menu e o plano Enterprise.
   ===================================================================== */

:root {
  /* fundo e superfícies */
  --cream: #f6f4f0;          /* fundo da página */
  --stone: #e7e6e4;          /* bordas, trilhos */
  --stone-line: #d6d3d1;     /* borda de botões e campos */
  --hair: rgba(231,230,228,.75);
  --surface: #ffffff;

  /* tinta */
  --ink: #030712;
  --ink-hover: #171b26;
  --text-2: #384154;
  --text-3: #475573;
  --muted: #6b7280;
  --faint: #94a3b8;
  --on-dark: #ffffff;

  /* cartão escuro */
  --night: #030712;
  --night-line: #232737;
  --on-night-2: #cbd5e1;
  --on-night-3: #94a3b8;

  /* rosa: uso do provador (escala do funil, do claro ao escuro) */
  --pink: #f5286a;
  --pink-2: #f97aa0;
  --pink-3: #fcb6cb;
  --pink-15: #f64f86;
  --pink-soft: rgba(245,40,106,.1);

  /* verde: dinheiro e confirmação */
  --green: #22c55e;
  --green-ink: #15803d;
  --green-night: #86efac;
  --green-soft: rgba(34,197,94,.12);

  /* alerta e erro */
  --amber: #f59e0b;
  --amber-ink: #b45309;
  --amber-soft: #fffbeb;
  --red: #ef4444;
  --red-ink: #dc2626;
  --red-soft: #fef2f2;

  /* degradê do Miaou (capa do provador), na estrutura linear de cima para baixo */
  --glow-card: linear-gradient(180deg, rgba(3,7,18,0) 38%, rgba(98,62,128,.55) 64%, rgba(176,124,204,.8) 83%, rgba(244,164,126,.95) 100%);
  --glow-halo: linear-gradient(90deg, rgba(110,190,210,.45), rgba(186,140,214,.5) 50%, rgba(247,166,128,.5));

  /* forma */
  --r-sm: 12px;
  --r-md: 16px;
  --r-card: 24px;
  --r-pill: 9999px;
  --e-lift: 0 4px 6px -2px rgba(10,22,52,.05), 0 10px 15px -3px rgba(10,22,52,.1);
  --focus-ring: rgba(245,40,106,.4);
  --ease: cubic-bezier(.4, 0, .2, 1);

  font-family: "Rethink Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { background: var(--cream); }
body { margin: 0; font-size: 15px; line-height: 1.5; letter-spacing: -.15px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--ink); }
.muted { color: var(--muted); }
::selection { background: var(--pink-soft); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* textura de pontos no canto superior direito */
body::before { content: ""; position: fixed; top: 0; right: 0; width: 620px; height: 420px; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(10,22,52,.13) 1px, transparent 1.2px); background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(70% 80% at 100% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(70% 80% at 100% 0%, #000 0%, transparent 70%); }

/* ---- tipografia ------------------------------------------------------ */
h1 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -.8px; color: var(--ink); text-wrap: balance; }
h2 { margin: 0 0 14px; font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.3px; color: var(--ink); }
h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.5; font-weight: 700; letter-spacing: -.2px; }
.sub { margin: 6px 0 0; font-size: 16px; letter-spacing: -.2px; color: var(--text-3); }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: 0;
  background: var(--cream); border: 1px solid var(--stone); padding: 3px 8px; border-radius: 8px; word-break: break-all; }

/* ícones (Hugeicons): 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 ---------------------------------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column; gap: 24px;
  padding: 26px 16px 18px; background: var(--cream); border-right: 1px solid var(--stone); overflow-y: auto; }
.brand { display: flex; align-items: center; height: 36px; padding: 0 12px; }
.brand img { height: 26px; width: auto; display: block; }

.tabs { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; }
.tabs button { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 14px; border: 0; background: none;
  border-radius: var(--r-pill); cursor: pointer; color: var(--text-2); font-size: 15px; 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(--stone); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs [hidden] { display: none !important; }

/* 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: rgba(246,244,240,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--stone); }
.mbar .brand { padding: 0; height: auto; }
.mbar .brand img { height: 22px; }
.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-pill); transition: 150ms var(--ease); }
.mbar-btn:hover { background: var(--stone); }
.mbar-btn .ic { width: 22px; height: 22px; }
.scrim { display: none; }

/* ---- cartão escuro com o degradê do Miaou ----------------------------- */
.glow { position: relative; isolation: isolate; }
.glow::before { content: ""; position: absolute; left: 10%; right: -3%; bottom: -5%; height: 50%; z-index: -1; border-radius: 40px;
  background: var(--glow-halo); filter: blur(30px); pointer-events: none; }
.night { position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: var(--on-dark);
  border: 1px solid var(--night-line); border-radius: var(--r-card); }
.night::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--glow-card); }

/* cartão da loja no rodapé do menu: status, interruptor e uso do mês */
.side-foot .glow::before { left: 18%; right: 12%; bottom: 2%; height: 40%; filter: blur(16px); opacity: .7; }
.store { display: grid; gap: 14px; padding: 16px; border-radius: 22px; }
.store-top { display: flex; align-items: center; gap: 12px; }
.store-id { flex: 1; min-width: 0; display: grid; gap: 1px; }
.store-id b { font-size: 15px; font-weight: 700; letter-spacing: -.2px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-id .state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--green-night); white-space: nowrap; }
.store-id .state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.store-id .state.off { color: var(--on-night-3); }
.store-id .state.off::before { background: var(--on-night-3); box-shadow: none; }
.store hr { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 0; width: 100%; }
.store-quota hr { margin: 0 0 14px; }
.store-plan { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-night-2); }
.store-use { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.store-use b { font-size: 26px; font-weight: 700; letter-spacing: -.8px; line-height: 1; font-variant-numeric: tabular-nums; }
.store-use span { font-size: 14px; color: var(--on-night-2); }
.store .meter { margin: 10px 0 8px; background: rgba(255,255,255,.15); }
.store-cap { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--on-night-2); font-variant-numeric: tabular-nums; }
.store [hidden] { display: none !important; }

/* interruptor: verde quando ligado (o único controle com cor) */
.switch { display: inline-flex; align-items: center; cursor: pointer; flex: none; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.switch span { width: 38px; height: 22px; border-radius: var(--r-pill); background: var(--stone-line); 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,.18); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { left: 19px; }
.switch input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.night .switch span { background: rgba(255,255,255,.22); }
.night .switch input:checked + span { background: var(--green); }

/* ---- página ---------------------------------------------------------- */
.view { position: relative; max-width: 1180px; margin: 0 auto; width: 100%; min-height: 100vh; padding: 36px 40px 80px;
  border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
.page-head { display: flex; align-items: center; gap: 16px 24px; margin-bottom: 28px; flex-wrap: wrap; min-height: 48px; }
.page-head .tt { flex: 1; min-width: 220px; }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > .card { margin-bottom: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.card { position: relative; background: var(--surface); border: 1px solid var(--stone); border-radius: var(--r-card); padding: 28px; margin-bottom: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.card-head h2 { margin: 0; flex: 1; min-width: 0; }
.card.empty { text-align: center; }
.card.empty h2 { margin-bottom: 8px; }

/* ---- botões (pílulas) ------------------------------------------------- */
/* .btn sem modificador = secundário (branco com borda); .primary = preto */
.btn { height: 44px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--stone-line); background: var(--surface); color: var(--ink);
  cursor: pointer; font-size: 15px; font-weight: 700; letter-spacing: -.2px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: 150ms var(--ease); white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink); }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.btn.primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn.light { background: #fff; border-color: #fff; color: var(--ink); }
.btn.light:hover { background: var(--cream); border-color: var(--cream); }
.btn.danger { color: var(--red-ink); }
.btn.danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* botão de ferramenta (cabeçalho, paginação, cópia) e seletor suspenso */
.chip-btn { height: 40px; padding: 0 18px; border: 1px solid var(--stone-line); border-radius: var(--r-pill); background-color: var(--surface);
  color: var(--ink); font-size: 14.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
  transition: border-color 150ms var(--ease); white-space: nowrap; }
.chip-btn:hover { border-color: var(--ink); }
.chip-btn .ic { width: 16px; height: 16px; }
.chip-btn:disabled { opacity: .5; cursor: not-allowed; }
.chip-btn:disabled:hover { border-color: var(--stone-line); }

/* ---- formulários ----------------------------------------------------- */
label.f { display: grid; gap: 7px; font-size: 14px; font-weight: 600; }
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: 44px; border: 1px solid var(--stone-line); border-radius: var(--r-sm); padding: 0 14px; background-color: var(--surface);
  min-width: 0; font-size: 15px; transition: border-color 150ms var(--ease); }
/* todos os selects: seta do 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='%23030712' 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::-ms-expand { display: none; }
/* seletor suspenso em pílula (período, preferências) */
select.chip-btn { height: 44px; padding: 0 44px 0 20px; border-radius: var(--r-pill); font-size: 15px; background-position: right 18px center; }
input[type="text"]:hover, input[type="number"]:hover, input[type="search"]:hover, select:hover { border-color: var(--ink); }
input[type="text"]:focus, input[type="number"]:focus, input[type="search"]:focus, select:focus { border-color: var(--ink); outline: 3px solid var(--focus-ring); outline-offset: 0; }
input::placeholder { color: var(--faint); }
.filters input[type="search"] { width: 340px; max-width: 100%; }
/* amostra de cor: quadrado arredondado */
input[type="color"] { width: 20px; height: 20px; border: 1.5px solid var(--stone-line); 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(--stone-line); 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; }
/* o interruptor usa uma caixa escondida: sem o visual de caixa */
.switch input[type="checkbox"] { appearance: auto; -webkit-appearance: auto; border: 0; }
.switch input[type="checkbox"]::after { content: none; }

/* faixa: trilho cinza, preenchimento preto, 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(--ink) var(--fill), var(--stone) 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 var(--stone-line), 0 2px 6px rgba(10,22,52,.18); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: var(--r-pill); background: var(--stone); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: var(--r-pill); background: var(--ink); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 0 0 1px var(--stone-line), 0 2px 6px rgba(10,22,52,.18); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--focus-ring), 0 2px 6px rgba(10,22,52,.18); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--focus-ring), 0 2px 6px rgba(10,22,52,.18); }

/* ---- números: um cartão por métrica ----------------------------------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.kpi { position: relative; min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--stone); border-radius: var(--r-card);
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "lab lab" "val spark" "delta delta" "note note"; align-items: end; align-content: start; gap: 0 12px; }
.kpi .k-lab { grid-area: lab; display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 14px; color: var(--text-3); font-size: 14px; }
.kpi .k-lab::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--k, var(--ink)); }
.kpi .k-lab .k-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .k-help { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--stone-line); display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 600; color: var(--muted); cursor: help; flex: none; letter-spacing: 0; }
.kpi .k-val { grid-area: val; font-size: 40px; font-weight: 700; letter-spacing: -1.4px; line-height: 1; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .k-val .cur { font-size: 20px; letter-spacing: -.3px; margin-right: 2px; }
.kpi .k-spark { grid-area: spark; justify-self: end; width: 100%; max-width: 88px; height: 40px; }
.kpi .k-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.kpi .k-delta { grid-area: delta; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--text-3); min-width: 0; }
.kpi .k-delta b { font-weight: 700; color: var(--text-3); }
.kpi .k-delta.up b { color: var(--green-ink); }
.kpi .k-delta.down b { color: var(--red-ink); }
.kpi .k-note { grid-area: note; margin-top: 2px; font-size: 13px; color: var(--muted); }

/* ---- gráfico de linhas ------------------------------------------------ */
.chart { position: relative; width: 100%; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-3); }
.chart-legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .g-line { stroke: var(--stone); stroke-width: 1; }
.chart .g-txt { font-size: 12px; fill: var(--faint); font-variant-numeric: tabular-nums; }
.chart-empty { color: var(--muted); font-size: 14.5px; padding: 28px 0; margin: 0; }
.chart-tip { position: absolute; top: 0; width: 180px; background: var(--night); color: var(--on-dark); border-radius: 14px;
  padding: 10px 14px; font-size: 13px; pointer-events: none; box-shadow: var(--e-lift); display: grid; gap: 4px; }
.chart-tip[hidden] { display: none; }
.chart-tip b { font-weight: 700; }
.chart-tip span { display: flex; align-items: center; gap: 8px; color: var(--on-night-2); }
.chart-tip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---- barras horizontais (funil e compartilhamentos) ------------------- */
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 72px 1fr 48px; gap: 14px; align-items: center; font-size: 15px; }
.bar.wide { grid-template-columns: minmax(110px, 170px) 1fr minmax(76px, auto); }
.bar b { font-weight: 500; }
.bar .track { background: var(--stone); border-radius: var(--r-pill); height: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--pink); }
.bar .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar .num small { font-size: 12.5px; font-weight: 400; color: var(--faint); }

/* ---- tabelas --------------------------------------------------------- */
table.t { width: 100%; border-collapse: collapse; }
.t th, .t td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t th { padding-top: 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); border-bottom-color: var(--stone); }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.t td.conv { color: var(--green-ink); font-weight: 700; }
.thumb { width: 42px; height: 42px; border-radius: var(--r-sm); object-fit: cover; background: var(--cream); }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--r-pill); background: var(--stone); color: var(--text-2);
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1; white-space: nowrap; margin: 3px 6px 3px 0; vertical-align: middle; }
td select + div > .chip, td select + .chip { margin-top: 8px; }
.chip.ok { background: var(--green-soft); color: var(--green-ink); }
.chip.warn { background: var(--amber-soft); color: var(--amber-ink); }
.chip.bad { background: var(--red-soft); color: var(--red-ink); }
.card-head .chip { margin: 0; }
th.act, td.act { text-align: right; width: 1%; white-space: nowrap; }
td.act .chip-btn { height: 36px; padding: 0 14px; }
td.act .chip-btn .ic { color: var(--green); }

/* controle segmentado (Estilo Miaou / Estilo da loja, telas da prévia) */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--cream); border: 1px solid var(--stone); }
.seg button { border: 0; background: none; height: 36px; padding: 0 16px; border-radius: var(--r-pill); cursor: pointer;
  color: var(--text-2); font-size: 14px; font-weight: 500; transition: 150ms var(--ease); white-space: nowrap; }
.seg button:hover:not(:disabled) { background: var(--stone); color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-pressed="true"]:hover { background: var(--ink); color: #fff; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.seg.seg-sm button { height: 30px; padding: 0 13px; font-size: 13px; }

.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: 50;
  max-width: 90vw; font-size: 14px; font-weight: 500; box-shadow: var(--e-lift); }
.toast.show { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red-ink); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }

/* ---- aviso curto (cota, WhatsApp desligado) --------------------------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 20px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--stone); }
.banner > .ic { width: 22px; height: 22px; color: var(--muted); }
.banner.warn { background: var(--amber-soft); border-color: #fde68a; }
.banner.warn > .ic { color: var(--amber); }
.banner.bad > .ic { color: var(--red); }
.banner.bad .banner-t b { color: var(--red-ink); }
.banner-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.banner-t b { font-weight: 700; }
.banner-t span { color: var(--text-3); font-size: 14px; }

.note { font-size: 14px; color: var(--text-3); margin: 18px 0 0; display: flex; align-items: center; gap: 6px; }
.note .ic { width: 15px; height: 15px; }

/* ---- barra de uso: rosa até 80%, âmbar a partir de 80%, vermelha quando acaba */
.meter { height: 10px; border-radius: var(--r-pill); background: var(--stone); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--pink), #ff8db0); transition: width .4s var(--ease); }
.meter.warn i { background: linear-gradient(90deg, var(--amber), #fbbf24); }
.meter.bad i { background: var(--red); }

/* ---- preferências ----------------------------------------------------- */
.pref { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.pref:last-of-type { border-bottom: 0; }
.pref b { display: block; font-weight: 600; font-size: 15px; }
.pref .muted { display: block; font-size: 13.5px; margin-top: 2px; }
.pref select { flex: none; }
.pref a.mail { color: var(--ink); text-decoration: none; }
.pref a.mail:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- planos: uso do mês ----------------------------------------------- */
.usage { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.usage b { font-size: 44px; font-weight: 700; letter-spacing: -1.4px; line-height: 1; color: var(--pink); font-variant-numeric: tabular-nums; }
.usage span { font-size: 20px; color: var(--text-3); }
.usage.bad b { color: var(--red-ink); }
.usage-cap { margin: 10px 0 0; font-size: 14px; color: var(--text-3); }

/* ---- planos: cartões (formato da referência: borda fina, sem sombra) -- */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: stretch; margin-bottom: 20px; }
/* quatro cartões só quando cabem com folga (o preço tem 56px) */
@media (max-width: 1360px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plans > .glow { display: flex; }
.plan { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; width: 100%; min-width: 0;
  padding: 32px 28px 28px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--stone); }
.plan-top { display: flex; flex-direction: column; gap: 36px; }
.plan h3 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.6px; line-height: 34px; }
.plan-desc { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.price-box { display: flex; flex-direction: column; gap: 6px; min-height: 88px; }
.price { display: flex; align-items: flex-end; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--ink); }
.price .cur { font-size: 26px; line-height: 34px; }
.price .big { font-size: 56px; letter-spacing: -2px; line-height: 60px; height: 60px; padding: 0 8px 0 2px; font-variant-numeric: tabular-nums; }
.price .per { font-size: 24px; font-weight: 400; line-height: 32px; color: var(--muted); }
.billed { font-size: 15.5px; line-height: 1.45; color: var(--text-2); }
.billed .save { color: var(--green-ink); font-weight: 500; white-space: nowrap; }
.feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 16px; letter-spacing: -.2px; }
.feats li { display: flex; gap: 12px; line-height: 26px; }
/* check do Hugeicons dentro de um círculo cheio: verde com check branco (no cartão escuro, branco com check escuro) */
.feats .ic { width: 20px; height: 20px; margin-top: 3px; padding: 4px; border-radius: 50%; background: var(--green); color: #fff; }
.feats .ic path { stroke-width: 3.2; }
.plan .btn { height: 54px; font-size: 18px; letter-spacing: -.3px; width: 100%; }
.plan .btn:disabled { opacity: 1; color: var(--faint); background: transparent; border-color: var(--stone); cursor: default; }

/* Enterprise: o cartão escuro com o degradê */
.plan.night { border-color: var(--night-line); color: var(--on-dark); background: var(--night); }
.plan.night h3, .plan.night .price { color: #fff; }
.plan.night .plan-desc, .plan.night .billed, .plan.night .price .per { color: var(--on-night-2); }
.plan.night .billed .save { color: var(--green-night); }
.plan.night .feats .ic { background: #fff; color: var(--ink); }
.plan.night .btn:disabled { color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.3); background: transparent; }
input[type="range"].vol-range { width: 100%; height: 24px; margin: 0; }
input[type="range"].vol-range::-webkit-slider-runnable-track { background: linear-gradient(90deg, #fff var(--fill), rgba(255,255,255,.18) var(--fill)); }
input[type="range"].vol-range::-moz-range-track { background: rgba(255,255,255,.18); }
input[type="range"].vol-range::-moz-range-progress { background: #fff; }
input[type="range"].vol-range::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
input[type="range"].vol-range::-moz-range-thumb { width: 20px; height: 20px; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
input[type="range"].vol-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--focus-ring); }
input[type="range"].vol-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--focus-ring); }
.vol-ticks { display: flex; justify-content: space-between; margin: 6px 0 0; }
.vol-ticks button { all: unset; cursor: pointer; font-size: 12.5px; color: var(--on-night-3); 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: #fff; font-weight: 600; }
.vol-ticks button:focus-visible { outline: 2px solid var(--focus-ring); border-radius: 6px; }

/* ---- 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(--hair); }
.pager:empty { display: none; }
.pager-info { flex: 1; text-align: center; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---- Preferências › Aparência do provador ----------------------------- */
/* À direita, o provador de verdade (iframe em modo prévia) num celular branco. */
.look-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 36px; align-items: start; }
.look-ctl { min-width: 0; transition: opacity 150ms var(--ease); }
.look-ctl.busy { opacity: .55; pointer-events: none; }
.look-mode { margin-bottom: 14px; }
.look-note { margin: 4px 0 0; font-size: 14.5px; }
.look-lock { display: grid; gap: 12px; justify-items: start; }
.look-lock p { margin: 0; font-size: 14.5px; }
.pref b .src { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.pref b .src.link { border: 0; background: none; padding: 0; cursor: pointer; color: var(--pink); text-decoration: underline; text-underline-offset: 2px; font: inherit; font-size: 12px; }
.swatch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex: none; }
.swatch input[type="color"] { width: 32px; height: 32px; border-radius: 10px; }
.swatch .hex { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); min-width: 62px; letter-spacing: 0; }
.range { display: flex; align-items: center; gap: 12px; flex: none; }
.range input[type="range"] { width: 170px; }
.range .px { min-width: 52px; text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

.look-prev { display: grid; gap: 16px; justify-items: center; position: sticky; top: 24px; min-width: 0; }
.phone-fit { display: flex; justify-content: center; width: 100%; min-width: 0; }
.phone-fit > .phone { flex: none; margin: 0 9px; }
.phone { position: relative; width: 300px; padding: 9px; border-radius: 58px; background: linear-gradient(180deg, #ffffff, #f7f8fa);
  box-shadow: 0 0 0 1px #dfe2e7, 0 0 0 4px #f1f3f5, 0 0 0 5px #e4e7eb,
    0 40px 70px -30px rgba(17,24,39,.35), 0 16px 30px -18px rgba(17,24,39,.18); }
.phone-btn { position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(90deg, #d9dde3, #eef0f3); }
.phone-btn.vol-up { left: -8px; top: 132px; height: 46px; }
.phone-btn.vol-down { left: -8px; top: 190px; height: 46px; }
.phone-btn.power { right: -8px; top: 160px; height: 72px; background: linear-gradient(270deg, #d9dde3, #eef0f3); }
.phone-glass { position: relative; display: flex; flex-direction: column; height: 600px; border-radius: 49px; overflow: hidden; background: #fff;
  box-shadow: inset 0 0 0 1px #e9ebef; }
.phone-status { position: relative; flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between;
  padding: 6px 26px 0 30px; font: 600 13px/1 -apple-system, "SF Pro Text", "Rethink Sans", system-ui, sans-serif; color: #111; letter-spacing: -.01em; }
.phone-notch { position: absolute; top: 0; left: 50%; width: 118px; height: 28px; transform: translateX(-50%);
  background: linear-gradient(180deg, #fbfbfc, #f5f6f8); border-radius: 0 0 18px 18px; box-shadow: 0 0 0 1px #e3e6ea; }
.phone-notch::after { content: ""; position: absolute; top: 9px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: #e4e7eb; }
.sb-time { position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.sb-icons { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; }
.sb-icons svg { height: 11px; width: auto; fill: #111; stroke: #111; }
.sb-icons svg:not(.bat) { stroke: none; }
.sb-icons .bat { height: 12px; }
/* área do app: o provador é desenhado em 390 px e reduzido para a largura da tela */
.phone-app { position: relative; flex: 1; overflow: hidden; }
.phone-screen { position: absolute; top: 0; left: 0; z-index: 1; width: 390px; height: 739px; border: 0; background: transparent; transform: scale(.7231); transform-origin: 0 0; }
/* página do produto atrás do provador (o card do provador cobre a parte de baixo) */
.phone-store { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; color: #111; font-family: ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; }
.ps-bar { flex: none; display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 14px; border-bottom: 1px solid #f0f0f2; }
.ps-bar span { font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.ps-bar i { width: 14px; height: 2px; border-radius: 1px; background: #111; box-shadow: 0 4px 0 #111, 0 -4px 0 #111; }
.ps-bar i:last-child { width: 12px; height: 12px; background: none; border: 1.5px solid #111; border-radius: 3px; box-shadow: none; }
.ps-img { flex: none; height: 300px; background: #f3f0ec center / cover no-repeat; }
.ps-info { display: grid; gap: 4px; padding: 12px 14px; }
.ps-name { font-size: 13px; font-weight: 600; }
.ps-price { font-size: 12px; color: #4b5563; }
.ps-buy { margin-top: 6px; height: 30px; display: grid; place-items: center; border-radius: 6px; background: #111; color: #fff; font-size: 11px; font-weight: 600; }
.phone-home { flex: none; height: 22px; display: grid; place-items: center; background: #fff; }
.phone-home span { width: 104px; height: 4px; border-radius: 3px; background: #1d1d1f; }

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

/* ---- responsivo (por último, para vencer as regras acima) ------------- */
.view, .card, .grid > * { min-width: 0; }
.card:has(> table.t) { overflow-x: auto; }
table.t select { max-width: 240px; }

@media (max-width: 1240px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .mbar { display: flex; grid-row: 1; }
  body::before { width: 320px; height: 260px; }

  /* menu vira gaveta: entra pela esquerda sobre um véu */
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: 284px; max-width: 86vw; height: 100dvh; z-index: 40;
    border-right: 1px solid var(--stone); transform: translateX(-100%); transition: transform 220ms var(--ease); }
  body.nav-open .side { transform: none; box-shadow: 0 24px 80px rgba(3,7,18,.25); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(3,7,18,.4);
    opacity: 0; pointer-events: none; transition: opacity 180ms var(--ease); }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .view { padding: 24px 20px 64px; border: 0; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .look-grid { grid-template-columns: 1fr; }
  .look-prev { position: static; }
}
@media (max-width: 640px) {
  .plans { grid-template-columns: 1fr; }
  .banner { flex-wrap: wrap; }
  .banner .btn { width: 100%; }
}
@media (max-width: 600px) {
  .view { padding: 20px 16px 56px; overflow-x: hidden; }
  h1 { font-size: 26px; letter-spacing: -.6px; }
  .sub { font-size: 14.5px; }
  .card { padding: 22px 16px; }
  .plan { padding: 28px 22px 22px; }

  /* celular: título e ferramentas na mesma linha; botões viram só o ícone */
  .page-head { flex-wrap: nowrap; align-items: flex-start; }
  .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: 40px; padding: 0; justify-content: center; }
  .page-head .tools select.chip-btn { height: 40px; padding: 0 38px 0 14px; font-size: 14.5px; background-position: right 12px center; }

  /* números: dois por linha, sem o gráfico pequeno */
  .kpi-row { gap: 12px; }
  .kpi { padding: 16px 14px; grid-template-columns: 1fr; grid-template-areas: "lab" "val" "delta" "note"; }
  .kpi .k-lab { font-size: 12.5px; margin-bottom: 8px; align-items: flex-start; line-height: 1.3; min-height: 2.6em; }
  .kpi .k-lab::before { margin-top: 4px; }
  .kpi .k-lab .k-txt { white-space: normal; }
  .kpi .k-help { display: none; }
  .kpi .k-val { font-size: 28px; letter-spacing: -.8px; }
  .kpi .k-val .cur { font-size: 15px; }
  .kpi .k-spark { display: none; }
  .kpi .k-delta, .kpi .k-note { font-size: 12px; }

  .bar.wide { grid-template-columns: minmax(96px, 120px) 1fr minmax(56px, auto); gap: 10px; font-size: 14px; }

  /* 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; }

  .row .spacer { display: none; }
  .row > .btn.primary { margin-left: auto; }
  .filters input[type="search"] { flex: 1 1 100%; width: 100%; }

  .usage b { font-size: 36px; }
  .usage span { font-size: 17px; }
  .price .big { font-size: 50px; }

  /* 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: 600; }
  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); font-weight: 400; }
  table.t.stack.top-t td[data-short] + td[data-short]::before { content: "·"; color: var(--faint); margin-right: 6px; display: inline; }

  /* 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(--hair); }
  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: .08em; color: var(--faint); font-weight: 600; margin-bottom: 4px; }
  table.t.stack td select { width: 100%; max-width: none; }
  table.t.stack td .btn { margin: 0 6px 6px 0; }
  table.t.stack td.num { text-align: left; }

  .pager { flex-wrap: wrap; }
  .pager-info { order: -1; flex: 1 1 100%; }
  .pager .chip-btn { flex: 1; justify-content: center; }

  .seg.seg-sm button { padding: 0 10px; }
  .pref-range { flex-wrap: wrap; }
  .range { width: 100%; }
  .range input[type="range"] { flex: 1; width: auto; }
}
