/* =====================================================================
   Painel — sistema de cores
   Tema CLARO por padrão; ESCURO com o botão do topo (data-theme="dark").
   A barra lateral é azul-noite nos dois temas (redefine as próprias variáveis).
   Identidade do site de vendas: azul #0131cd + limão #b9fc01 (botão principal). Verde/âmbar/vermelho só para situação.
   ===================================================================== */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/Inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/Sora-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/static/fonts/Sora-latin-800.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --bg: #f4f6ff;
  --surface: #ffffff;
  --surface-2: #eef1ff;
  --surface-3: #e8edff;
  --border: #e1e7fb;
  --border-strong: #c9d3f5;
  --text: #00165e;
  --text-2: #2f3f7a;
  --muted: #5b6796;
  --placeholder: #8a94bd;
  --primary: #0131cd;
  --primary-hover: #00165e;
  --primary-soft: rgba(1, 49, 205, .08);
  --primary-line: rgba(1, 49, 205, .30);
  --on-primary: #ffffff;
  /* botão principal (CTA): limão com texto azul-noite, como no site de vendas */
  --cta: #b9fc01; --cta-hover: #cbfe3d; --on-cta: #000b33; --cta-glow: rgba(185, 252, 1, .45);
  --ok: #16a34a;   --ok-soft: #ecfdf3;   --ok-line: #abefc6;  --ok-text: #067647;
  --warn: #d97706; --warn-soft: #fffaeb; --warn-line: #fedf89; --warn-text: #b54708;
  --danger: #dc2626; --danger-soft: #fef3f2; --danger-line: #fecdca; --danger-text: #b42318;
  --info: #0284c7; --info-soft: #f0f9ff;
  --info-text: #0131cd;
  --money: #067647;
  --hover-row: #f7f9ff;
  --topbar-bg: rgba(244, 246, 255, .88);
  --popover-bg: #000b33; --popover-text: #ffffff;
  /* séries dos gráficos (paleta categórica validada no fundo claro) */
  --series-1: #0131cd; --series-2: #e6339f; --series-3: #5f8f00; --series-4: #3e8bff;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 22, 94, .06);
  --shadow: 0 1px 3px rgba(0, 22, 94, .08), 0 10px 28px rgba(0, 22, 94, .08);
  --sidebar-w: 252px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-title: "Sora", var(--font);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0131cd;
  --surface: #1a46d2;
  --surface-2: #2249d3;
  --surface-3: #2a52d5;
  --border: #4a6fdd;
  --border-strong: #6d8ae3;
  --text: #ffffff;
  --text-2: #eaeeff;
  --muted: #d6dfff;
  --placeholder: #a9b9f2;
  --primary: #b9fc01;
  --primary-hover: #cbfe3d;
  --primary-soft: rgba(185, 252, 1, .14);
  --primary-line: rgba(185, 252, 1, .45);
  --on-primary: #000b33;
  --ok: #4ade80;   --ok-soft: rgba(74, 222, 128, .18);   --ok-line: rgba(74, 222, 128, .45);  --ok-text: #9af5ba;
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .18); --warn-line: rgba(251, 191, 36, .45); --warn-text: #ffe08a;
  --danger: #ff8a8a; --danger-soft: rgba(255, 138, 138, .2); --danger-line: rgba(255, 138, 138, .5); --danger-text: #ffd6d6;
  --info: #7fd6ff; --info-soft: rgba(127, 214, 255, .16);
  --info-text: #d4ff6b;
  --money: #9af5ba;
  --hover-row: rgba(255, 255, 255, .06);
  --topbar-bg: rgba(1, 49, 205, .9);
  --popover-bg: #000b33; --popover-text: #ffffff;
  --series-1: #b9fc01; --series-2: #ff7ad0; --series-3: #ffffff; --series-4: #7fd6ff;
  --shadow-sm: 0 1px 2px rgba(0, 11, 51, .3);
  --shadow: 0 1px 2px rgba(0, 11, 51, .3), 0 10px 28px rgba(0, 11, 51, .35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { margin: 0; font-family: var(--font-title); font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: 22px; }
h2 { font-size: 15px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12px; }
code { background: var(--surface-3); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--text-2); } 
code { overflow-wrap: anywhere; }
.mono { color: var(--muted); word-break: break-all; max-width: 460px; }
small, .hint, .subtitle { color: var(--muted); }
.hint { font-size: 12.5px; line-height: 1.5; }
.err { color: var(--danger); font-size: 12.5px; }
.icon { width: 16px; height: 16px; flex: 0 0 auto; }
.inline { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 30;
  display: flex; flex-direction: column; background: var(--surface);
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: #0131cd; color: #b9fc01;
}
.brand-mark .icon { width: 18px; height: 18px; }
.brand-text { display: flex; flex-direction: column; font-family: var(--font-title); font-weight: 700; line-height: 1.2; }
.brand-text small { font-weight: 400; font-size: 11.5px; margin-top: 2px; }

.nav { flex: 1; overflow-y: auto; padding: 6px 10px 14px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; color: var(--text-2); font-weight: 500; transition: background .15s, color .15s;
}
.nav-link .icon { color: var(--muted); transition: color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link:hover .icon { color: var(--text-2); }
.nav-link.active { background: var(--cta); color: var(--on-cta); font-weight: 700; }
.nav-link.active .icon { color: var(--on-cta); }

/* Grupos recolhíveis (dropdown) */
.nav-group { margin-top: 2px; }
.nav-group-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 600; cursor: pointer; list-style: none; user-select: none;
  transition: background .15s, color .15s;
}
.nav-group-head::-webkit-details-marker { display: none; }
.nav-group-head span { flex: 1; }
.nav-group-head .icon { color: var(--muted); }
.nav-group-head .chev { width: 15px; height: 15px; transition: transform .2s ease; }
.nav-group-head:hover { background: var(--surface-2); color: var(--text); }
.nav-group-head:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.nav-group[open] > .nav-group-head { color: var(--text); }
.nav-group[open] > .nav-group-head .chev { transform: rotate(180deg); }
.nav-group.has-active > .nav-group-head > .icon:first-child { color: var(--primary); }
.nav-group-body {
  position: relative; margin: 2px 0 6px 19px; padding-left: 10px;
  border-left: 1px solid var(--border-strong); display: flex; flex-direction: column; gap: 1px;
}
.nav-group.anim[open] .nav-group-body { animation: nav-open .18s ease; }
.nav-group-body .nav-link { padding: 7px 10px; font-size: 13.5px; }
.nav-group-body .nav-link .icon { width: 15px; height: 15px; }
.nav-group-body .nav-link.active::before {
  content: ""; position: absolute; left: -11px; top: 7px; bottom: 7px; width: 2px;
  border-radius: 2px; background: var(--primary);
}
@keyframes nav-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Módulos do menu: cada um com a sua cor, para não confundir vendas com promoções */
.mod-sales  { --mod: #22c55e; --mod-soft: rgba(34,197,94,.12);  --mod-line: rgba(34,197,94,.28); }
.mod-offers { --mod: #f59e0b; --mod-soft: rgba(245,158,11,.12); --mod-line: rgba(245,158,11,.28); }
.nav-module {
  margin: 12px 0 4px; padding: 8px 6px 6px; border-radius: 12px;
  border: 1px solid var(--border); background: linear-gradient(180deg, var(--mod-soft), transparent 70px);
  border-top: 2px solid var(--mod);
}
.nav-module-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; }
.nav-module-ic {
  flex: 0 0 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--mod-soft); border: 1px solid var(--mod-line); color: var(--mod);
}
.nav-module-ic .icon { width: 16px; height: 16px; }
.nav-module-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.nav-module-title b { font-size: 13px; font-weight: 700; color: var(--text); }
.nav-module-title small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.live { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.live.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.nav-module .nav-group-head .icon:first-child, .nav-module .nav-group.has-active > .nav-group-head > .icon:first-child { color: var(--mod); opacity: 1; }
.nav-module .nav-group-body { border-left-color: var(--mod-line); }
.nav-module .nav-link.active { background: var(--mod-soft); }
.nav-module .nav-link.active .icon { color: var(--mod); }
.nav-module .nav-group-body .nav-link.active::before { background: var(--mod); }
.nav-module > .nav-link .icon { color: var(--mod); opacity: .8; }

/* Cada bot de promoção listado pelo nome */
.nav-bot { gap: 9px; padding: 6px 8px !important; }
.bot-avatar {
  position: relative; flex: 0 0 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: var(--mod, var(--text)); background: var(--mod-soft); border: 1px solid var(--mod-line);
}
.bot-avatar i { position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); border: 2px solid var(--surface); }
.bot-avatar i.on { background: var(--ok); }
.nav-bot-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.nav-bot-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-bot-text small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-add { color: var(--muted) !important; font-size: 12.5px !important; }

/* Etiqueta do módulo no topo da página */
.module-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--mod); background: var(--mod-soft); border: 1px solid var(--mod-line);
}
.module-pill .icon { width: 13px; height: 13px; }

/* Barra lateral: azul vivo do site (e azul-escuro no tema escuro), com a grade quadriculada. Redefine as variáveis só aqui dentro; o resto do CSS não muda. */
.sidebar {
  --surface: #0131cd; --surface-2: rgba(255, 255, 255, .12); --surface-3: rgba(255, 255, 255, .2);
  --text: #ffffff; --text-2: #eaeeff; --muted: #d6dfff; --placeholder: #a9b9f2;
  --border: rgba(255, 255, 255, .10); --border-strong: rgba(255, 255, 255, .20);
  --primary: #b9fc01; --primary-hover: #cbfe3d; --primary-soft: rgba(185, 252, 1, .14); --primary-line: rgba(185, 252, 1, .4);
  border-right: 0;
}
.sidebar-footer {
  display: flex; align-items: center; gap: 8px; padding: 12px;
  border-top: 1px solid var(--border);
}
.user-chip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 8px; color: var(--text); }
.user-chip:hover { background: var(--surface-2); color: var(--text); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--border-strong); font-weight: 600; font-size: 13px;
}
.user-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-info b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.user-info small { font-size: 11.5px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.icon-btn .icon { width: 18px; height: 18px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: var(--topbar-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 600; color: var(--text-2); flex: 1; }
.topbar-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.topbar-link:hover { color: var(--text); }
.menu-toggle { display: none; }
.content { width: 100%; max-width: 1240px; padding: 28px; margin: 0 auto; }
.sidebar-backdrop { display: none; }

/* ---------- Cabeçalho de página ---------- */
.page-header, .head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 22px;
}
.page-header .subtitle { margin-top: 4px; font-size: 13.5px; }
.page-actions, .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.content > h1 { margin-bottom: 20px; }
.content > h2, .section-title { margin: 28px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--cta);
  background: var(--cta); color: var(--on-cta); font: inherit; font-family: var(--font-title); font-weight: 700; font-size: 13px;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--on-cta); box-shadow: 0 0 0 4px var(--cta-glow); }
.btn:active { transform: scale(.97); }
.btn .icon { width: 16px; height: 16px; }
.btn-secondary, .btn.ghost { background: var(--surface-3); border-color: var(--border-strong); color: var(--primary); box-shadow: none; }
.btn-secondary:hover, .btn.ghost:hover { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); box-shadow: none; }
.btn-danger, .btn.danger { background: transparent; border-color: var(--danger-line); color: var(--danger-text); }
.btn-danger:hover, .btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-text); box-shadow: none; }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { filter: brightness(1.06); color: #fff; box-shadow: none; }
.btn-sm, .btn.small { height: 32px; padding: 0 14px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 16px;
}
.card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.card-header .card-icon {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); flex: 0 0 auto;
}
.card-header h2 { font-size: 15px; }
.card-header p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-header .step {
  font-size: 11px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .06em;
}
.card-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--border); }

/* ---------- KPIs ---------- */
.stats, .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat, .kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.stat span, .kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.kpi-icon .icon { width: 16px; height: 16px; }
.kpi-icon.ok { background: var(--ok-soft); color: var(--ok); }
.kpi-icon.warn { background: var(--warn-soft); color: var(--warn); }
.kpi-icon.danger { background: var(--danger-soft); color: var(--danger); }
.kpi-icon.info { background: var(--primary-soft); color: var(--primary); }
.stat b, .kpi-value { font-family: var(--font-title); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.stat small, .kpi-sub { color: var(--muted); font-size: 12px; }
.stat.alert, .kpi.alert { border-color: var(--warn-line); }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok-text); }
.badge-warn { background: var(--warn-soft); color: var(--warn-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-info { background: var(--primary-soft); color: var(--info-text); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.badge-discount { background: var(--ok-soft); color: var(--ok-text); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; margin: 2px 4px 2px 0;
  border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-2); font-size: 12px;
}
.chip .icon { width: 13px; height: 13px; }
.chip.small { height: 20px; font-size: 11.5px; padding: 0 8px; }
.chip.off { text-decoration: line-through; opacity: .6; }

/* Filtros segmentados */
.segmented, .filters {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.segmented a, .filters a {
  padding: 6px 14px; border-radius: 999px; color: var(--text-2); font-size: 13px; font-weight: 500;
}
.segmented a:hover, .filters a:hover { color: var(--text); background: var(--surface-2); }
.segmented a.on, .filters a.on, .filters .chip.on { background: var(--primary); color: var(--on-primary); box-shadow: none; font-weight: 600; }
.filters .chip { border: 0; height: auto; margin: 0; }
.count { color: var(--muted); font-weight: 500; margin-left: 4px; }

/* ---------- Alertas ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--radius); border: 1px solid; font-size: 13.5px;
}
.alert .icon { margin-top: 2px; }
.alert-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-text); }
.alert-ok .icon { color: var(--ok); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-text); }
.alert-warn .icon { color: var(--warn); }
.alert-error { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-text); }
.alert-error .icon { color: var(--danger); }
.alert-info { background: var(--primary-soft); border-color: var(--primary-line); color: var(--info-text); }
.alert-info .icon { color: var(--primary); }
.flash { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: var(--ok-soft); border-color: rgba(34,197,94,.35); }
.flash.warn { background: var(--warn-soft); border-color: rgba(245,158,11,.35); }
.flash.error { background: var(--danger-soft); border-color: rgba(239,68,68,.35); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
tbody tr:hover td { background: var(--hover-row); }
tr:last-child td { border-bottom: 0; }
tr.muted td { opacity: .55; }
td.empty, .empty { text-align: center; color: var(--muted); padding: 36px 16px; }
td.actions { white-space: nowrap; }
td small { display: block; }

/* ---------- Formulários ---------- */
.form label, label.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.form label > small, label.field > small { font-weight: 400; }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 9px 12px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:hover, select:hover, textarea:hover { border-color: var(--primary-line); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type=checkbox] { width: 16px; height: 16px; padding: 0; accent-color: var(--primary); }
textarea { resize: vertical; }
.input-group { position: relative; }
.input-group .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-group input { padding-left: 36px; }
.form label.check-line, label.check-line {
  flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-weight: 400; margin-bottom: 10px;
}
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 4px 0 16px; }
legend { color: var(--muted); padding: 0 6px; font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; }

/* Seletor de categorias em "pílulas" */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill { position: relative; margin: 0 !important; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2);
  font-size: 13px; font-weight: 500; cursor: pointer; user-select: none; transition: all .15s;
}
.pill span:hover { border-color: var(--primary-line); color: var(--text); }
.pill input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--text); }
.pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-soft); }

/* Interruptor */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.search { display: flex; gap: 8px; margin-bottom: 16px; max-width: 520px; }
.row-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-form input { width: auto; flex: 1; min-width: 160px; }
.row-form .w-xs { flex: 0 0 72px; min-width: 72px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 13px; }
.pager-nav { display: flex; gap: 6px; }

/* ---------- Promoções ---------- */
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.sticky { position: sticky; top: 76px; }
.status-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 4px var(--surface-3); }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.status-hero b { font-size: 16px; }
.status-hero small { display: block; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.mini-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.mini-stat span { color: var(--muted); font-size: 12px; display: block; }
.mini-stat b { font-size: 20px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.meta-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; }
.meta-list span { color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); }
.checklist .icon { margin-top: 2px; }
.checklist .ok { color: var(--ok); }
.checklist .no { color: var(--muted); }
.test-results { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.test-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.test-row .icon { margin-top: 2px; }
.test-row.ok .icon { color: var(--ok); }
.test-row.fail .icon { color: var(--danger); }
.test-row small { display: block; word-break: break-word; }

.offers { display: grid; gap: 12px; }
.offer { display: flex; gap: 18px; align-items: flex-start; margin: 0; }
.offer-img, .offer .noimg {
  width: 112px; height: 112px; object-fit: contain; background: #fff; border-radius: 10px; flex: 0 0 112px;
}
.offer .noimg { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.offer .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.offer-title { color: var(--text); font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.offer-title:hover { color: var(--primary); text-decoration: underline; }
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.price-new { font-size: 18px; font-weight: 700; }
.offer-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.offer-meta span { display: inline-flex; align-items: center; gap: 5px; }
.offer-meta .icon { width: 14px; height: 14px; }
.offer.muted { opacity: .55; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); }
.auth-aside {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 52px; border-right: 1px solid var(--border);
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(99,102,241,.20), transparent 60%),
    #0d111b;
}
.auth-aside::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.auth-aside > * { position: relative; }
.auth-aside .brand-mark { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 8px 24px rgba(59,130,246,.35); }
.auth-aside .brand-mark .icon { width: 20px; height: 20px; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; color: var(--text); }
.auth-pitch { max-width: 460px; }
.auth-pitch h2 { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.auth-pitch h2 em { font-style: normal; background: linear-gradient(90deg, #60a5fa, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-pitch p { margin-top: 14px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.auth-features { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.auth-features li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 13.5px; }
.auth-features li b { display: block; color: var(--text); font-weight: 600; font-size: 14px; }
.auth-feature-ic {
  flex: 0 0 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); color: #93c5fd;
}
.auth-copy { color: var(--muted); font-size: 12.5px; }

.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .auth-logo { display: none; margin-bottom: 28px; }
.auth-card h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.auth-card .subtitle { margin: 6px 0 28px; font-size: 14px; }
.auth-card .alert { margin-bottom: 18px; }
.auth-card .form label { margin: 0; }
.auth-card .mb-field { margin-bottom: 18px; }
.auth-card label { font-size: 13px; }
.input-wrap { position: relative; display: block; margin-top: 7px; }
.input-wrap > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.auth-card .input-wrap input { width: 100%; height: 46px; padding-left: 40px; font-size: 14.5px; border-radius: 10px; background: var(--surface); }
.auth-card .input-wrap input:focus { background: var(--surface-2); }
.input-wrap .reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.input-wrap .reveal:hover { color: var(--text); background: var(--surface-3); }
.input-wrap .reveal .icon-hide { display: none; }
.input-wrap .reveal.on .icon-show { display: none; }
.input-wrap .reveal.on .icon-hide { display: block; }
.auth-card .input-wrap input.has-reveal { padding-right: 46px; }
.auth-card .btn-lg { height: 46px; border-radius: 999px; font-size: 14.5px; margin-top: 4px;
  background: linear-gradient(135deg, #3b82f6, #6366f1); border: 0; box-shadow: 0 8px 20px rgba(59,130,246,.25); }
.auth-card .btn-lg:hover { background: var(--cta-hover); filter: none; }
.auth-card .otp-input { text-align: center; letter-spacing: .5em; font-family: var(--mono); font-size: 20px; padding-left: 40px; }
.auth-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.auth-foot .icon { width: 14px; height: 14px; color: var(--ok); }
.auth-bottom { margin-top: 30px; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .auth-card .auth-logo { display: flex; }
  .auth-panel {
    background: radial-gradient(600px 360px at 50% 0%, rgba(59,130,246,.16), transparent 70%), var(--bg);
  }
}

.login { max-width: 360px; margin: 10vh auto; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .layout-2col { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .topbar-link span { display: none; }
}
@media (max-width: 600px) {
  .offer { flex-direction: column; }
  .offer-img, .offer .noimg { width: 100%; height: 180px; flex-basis: auto; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
}

/* Utilitários */
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mb-3 { margin-bottom: 12px; } .mb-0 { margin-bottom: 0; }
.hint .icon, p .icon { width: 13px; height: 13px; vertical-align: -2px; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }

/* Ajustes finos */
td.actions { display: table-cell; white-space: nowrap; }
td.actions > * { display: inline-flex; vertical-align: middle; margin-right: 6px; }
td.actions form { display: inline; margin: 0; }
.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { grid-template-columns: minmax(0, 1fr); } }

/* WhatsApp */
.qr-box { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.qr-box img { width: 240px; height: 240px; background: #fff; padding: 10px; border-radius: 12px; }
.steps-list { margin: 0; padding-left: 18px; color: var(--text-2); display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 220px; }
.mini-stat small { font-size: 12px; color: var(--muted); font-weight: 400; }
.mini-stat .small-value { font-size: 14px; }
.pill small { color: var(--muted); }
.pill input:disabled + span { cursor: default; opacity: .7; }
.phase { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 2px; margin-bottom: 12px; background: var(--surface-2); }
.phase-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.phase-num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.phase .hint { margin-bottom: 12px; }
.phase-banner { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.phase-banner small { color: var(--muted); }

/* Assistente passo a passo (WhatsApp) */
.stepper { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.step-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.step-item .step-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.step-item small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-item.current { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.step-item.locked { opacity: .55; }
.step-badge {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border-strong);
}
.current .step-badge { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.done .step-badge { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.step-badge .icon { width: 16px; height: 16px; }

.step-card { padding: 0; overflow: hidden; }
.step-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; }
.step-head > div { flex: 1; min-width: 0; }
.step-head h2 { font-size: 15.5px; margin-bottom: 3px; }
.step-head p { color: var(--text-2); font-size: 13.5px; }
.step-side { margin-left: auto; }
.step-body { padding: 4px 20px 20px 64px; }
.step-card.current { border-color: var(--primary-line); }
.step-card.locked { opacity: .5; }
.step-card.done .step-head p { color: var(--muted); }
.step-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 18px 0 4px; }
.step-actions .row-form select { width: auto; min-width: 180px; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; margin: 4px 0 14px; padding-left: 4px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--border-strong); }
.tl-item { position: relative; display: flex; gap: 14px; }
.tl-item p { color: var(--text-2); font-size: 13.5px; margin-top: 3px; }
.tl-item > div > b { margin-right: 8px; }
.tl-dot { position: relative; z-index: 1; flex: 0 0 12px; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.tl-item.on .tl-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

.advanced { margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.advanced summary { cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 500; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary:hover { color: var(--text); }
.advanced[open] summary { border-bottom: 1px solid var(--border); }
.advanced > form, .advanced > .divider, .advanced > .switch-row { margin: 14px; }
.advanced .divider { margin: 0 14px; }

.today-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.today-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.today-list span { color: var(--muted); }

@media (max-width: 760px) {
  .stepper { grid-template-columns: minmax(0, 1fr); }
  .step-body { padding-left: 20px; }
}

/* ---------- Dashboard ---------- */
.service-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.service { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); }
a.service:hover { border-color: var(--border-strong); color: var(--text); }
.service b { display: block; font-size: 13.5px; }
.service small { color: var(--muted); font-size: 12.5px; }
.onboarding { border-color: var(--primary-line); }
.onboarding-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.progress-wrap { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
progress { width: 160px; height: 8px; appearance: none; border: 0; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.setup-check { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; color: var(--ok); }
.setup-list li.done .setup-check { border-color: var(--ok); background: var(--ok-soft); }
.setup-check .icon { width: 14px; height: 14px; }
.setup-text { flex: 1; min-width: 0; }
.setup-text small { display: block; color: var(--muted); margin-top: 2px; }
.setup-list li.done .setup-text b { color: var(--muted); text-decoration: line-through; }

/* ---------- Escolhas em cartão (radio) ---------- */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.choice-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form label.choice, label.choice { display: block; margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-box { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); transition: all .15s; }
.choice-box .icon { width: 20px; height: 20px; color: var(--muted); }
.choice-box b { font-size: 14px; }
.choice-box small { color: var(--muted); font-weight: 400; line-height: 1.45; }
.choice:hover .choice-box { border-color: var(--primary-line); }
.choice input:checked + .choice-box { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary) inset; }
.choice input:checked + .choice-box .icon { color: var(--primary); }
.choice input:focus-visible + .choice-box { box-shadow: 0 0 0 3px var(--primary-soft); }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.help-grid > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-size: 13px; }
.help-grid b { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.help-grid p { color: var(--text-2); }
.input-lg { font-size: 20px !important; font-weight: 600; max-width: 220px; }

/* ---------- Planos em cartões ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card-grid > .card { margin: 0; }
.plan-card { display: flex; flex-direction: column; gap: 8px; }
.plan-card.muted { opacity: .6; }
.plan-top { display: flex; justify-content: space-between; gap: 8px; }
.plan-card h3 { font-size: 16px; font-weight: 600; margin-top: 4px; }
.plan-price { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.plan-section { border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.plan-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.plan-foot .hint { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Listas em cartão ---------- */
.list-card { padding: 0; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.list-row.muted { opacity: .55; }
.list-row .card-icon, .cat-row .card-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: 0 0 auto; }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cat-row { display: flex; gap: 14px; align-items: flex-start; }
.flex-1 { flex: 1; min-width: 0; }
.w-pos { width: 90px; flex: 0 0 90px; }
.cat-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.card.muted { opacity: .6; }

/* ---------- Conta ---------- */
.code-box { display: inline-block; margin-top: 8px; padding: 10px 16px; font: 600 20px var(--mono); letter-spacing: .08em; background: var(--bg); border: 1px dashed var(--primary); border-radius: var(--radius); color: #fff; user-select: all; }
.big-steps { font-size: 14px; gap: 14px; }

@media (max-width: 1000px) {
  .service-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-grid.three, .help-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .service-row, .choice-grid, .choice-grid.three, .help-grid { grid-template-columns: minmax(0, 1fr); }
  .list-row { flex-wrap: wrap; }
  .cat-row { flex-wrap: wrap; }
}

.choice { position: relative; }

/* Modelo do post (bot de promoções) */
.template-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.template-editor textarea { font-family: var(--mono); font-size: 13px; line-height: 1.5; min-height: 220px; }
.label-like { display: block; font-size: 13px; color: var(--text-2); font-weight: 500; margin-bottom: 6px; }
.wa-bubble { background: #1f2c33; border-radius: 10px 10px 10px 2px; padding: 10px 12px; border: 1px solid #2a3942; }
.wa-bubble pre, .post-preview pre {
  margin: 0; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.45 var(--font); color: #e9edef;
}
.placeholders { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.pill-static { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px 3px 4px; }
.pill-static code { margin-right: 4px; }
.check-inline { display: flex !important; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.check-inline input { width: auto; }
.post-preview summary { cursor: pointer; color: var(--text-2); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.post-preview summary .icon { width: 14px; height: 14px; }
.post-preview pre { margin-top: 8px; background: #1f2c33; border: 1px solid #2a3942; border-radius: 10px; padding: 10px 12px; }
.offer-form { display: flex; flex-direction: column; gap: 8px; }
.offer-fields { display: grid; grid-template-columns: 1.4fr .6fr 1.4fr; gap: 8px; }
@media (max-width: 900px) {
  .template-editor, .offer-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Verificação em duas etapas */
.qr-2fa { display: inline-block; background: #fff; padding: 8px; border-radius: 10px; margin: 10px 0 6px; line-height: 0; }
.qr-2fa svg { width: 190px; height: 190px; }
.otp-input { font-family: var(--mono); font-size: 20px; letter-spacing: .3em; text-align: center; max-width: 200px; }

/* Funil e cupons */
.row-total td { border-top: 2px solid var(--border-strong); background: var(--surface-2); }
.code-box-url { font-size: 14px; letter-spacing: 0; word-break: break-all; max-width: 100%; }

/* Bots de ofertas */
.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.bot-card { margin: 0; color: var(--text); transition: border-color .15s ease, transform .15s ease; }
.bot-card:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.bot-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bot-card-head > div { flex: 1; min-width: 0; }
.bot-card-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-card-head small { color: var(--muted); font-size: 12.5px; }
.bot-card .today-list .icon { width: 13px; height: 13px; vertical-align: -2px; }
.danger-zone summary { cursor: pointer; }
.module-tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }
.badge-store-shopee { background: rgba(238, 77, 45, .14); color: #ff7a59; border: 1px solid rgba(238, 77, 45, .3); }
.badge-store-amazon { background: rgba(255, 153, 0, .12); color: #ffb347; border: 1px solid rgba(255, 153, 0, .3); }
.badge-store-mercadolivre { background: rgba(255, 230, 0, .1); color: #f5d90a; border: 1px solid rgba(255, 230, 0, .25); }

/* ===================================================================== */
/* Central dos bots de promoção                                          */
/* ===================================================================== */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar form { margin: 0; }
.kpi-of { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.muted-inline { color: var(--muted); font-size: 11.5px; margin-left: 4px; }

.central-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.central-card { margin: 0; display: flex; flex-direction: column; gap: 14px; border-top: 3px solid var(--border-strong); }
.central-card.level-ok { border-top-color: var(--ok); }
.central-card.level-warn { border-top-color: var(--warn); }
.central-card.level-setup { border-top-color: var(--primary); }
.central-head { display: flex; align-items: center; gap: 12px; }
.bot-avatar.big { flex: 0 0 38px; height: 38px; border-radius: 10px; font-size: 16px; --mod: #f59e0b; --mod-soft: rgba(245,158,11,.12); --mod-line: rgba(245,158,11,.28); }
.central-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.central-name a { color: var(--text); }
.central-name a:hover { text-decoration: underline; }
.central-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.central-name small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.level-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }
.level-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.level-pill.level-ok { background: var(--ok-soft); color: var(--ok-text); border-color: var(--ok-line); }
.level-pill.level-warn { background: var(--warn-soft); color: var(--warn-text); border-color: var(--warn-line); }
.level-pill.level-setup { background: var(--primary-soft); color: var(--info-text); border-color: var(--primary-line); }
.central-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.central-stats > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.central-stats span { color: var(--muted); font-size: 11.5px; }
.central-stats b { font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.central-stats small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .central-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.central-problems { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
  background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--radius); font-size: 13px; color: var(--text); }
.central-problems li { display: flex; gap: 8px; align-items: flex-start; }
.central-problems .icon { width: 14px; height: 14px; color: var(--warn); flex: 0 0 14px; margin-top: 2px; }
.central-setup { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.setup-head { display: flex; justify-content: space-between; font-size: 13px; }
.setup-head span { color: var(--muted); }
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 999px; width: 0; }
.progress .w-10 { width: 10%; } .progress .w-20 { width: 20%; } .progress .w-30 { width: 30%; } .progress .w-40 { width: 40%; }
.progress .w-50 { width: 50%; } .progress .w-60 { width: 60%; } .progress .w-70 { width: 70%; } .progress .w-80 { width: 80%; }
.progress .w-90 { width: 90%; } .progress .w-100 { width: 100%; background: var(--ok); }
.central-last { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-2); margin: 0; }
.central-last .icon { flex: 0 0 13px; margin-top: 2px; color: var(--muted); }
.central-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.central-actions form { margin: 0; }

/* "?" de ajuda com explicação curta */
.help-tip { position: relative; display: inline-flex; align-items: center; color: var(--muted); cursor: help; vertical-align: middle; outline: none; }
.help-tip .icon { width: 15px; height: 15px; }
.help-tip:hover, .help-tip:focus { color: var(--text); }
.help-bubble { display: none; position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: min(300px, 80vw); padding: 9px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 400; line-height: 1.45;
  background: var(--popover-bg); color: var(--popover-text); border: 1px solid var(--border-strong); box-shadow: 0 8px 24px rgba(0,0,0,.25); white-space: normal; text-align: left; }
.help-tip:hover .help-bubble, .help-tip:focus .help-bubble { display: block; }

/* ===================================================================== */
/* Estatísticas (gráficos em SVG, sem JS)                                */
/* Cores das lojas: paleta categórica validada no fundo escuro (#121620) */
/* ===================================================================== */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-bar .label-like { margin: 0; }
.filter-bar select { width: auto; min-width: 200px; }
.filter-bar .segmented { margin: 0; }
.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .kpis.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.chart-head h2 { font-size: 15px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.s-mercadolivre { fill: var(--series-1); background: var(--series-1); }
.s-shopee { fill: var(--series-2); background: var(--series-2); }
.s-amazon { fill: var(--series-3); background: var(--series-3); }
.s-single, .s-bot { fill: var(--primary); background: var(--primary); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .base-line { stroke: var(--border-strong); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .hit { fill: transparent; }
.chart .bar-group:hover .hit { fill: var(--hover-row); }
.chart .bar-group:hover .seg { filter: brightness(1.15); }
.table-view { margin-top: 12px; }
.table-view summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.table-view .table-wrap { margin-top: 10px; max-height: 320px; overflow-y: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty-chart { color: var(--muted); font-size: 13px; text-align: center; padding: 28px 0; margin: 0; }
.grid-2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; margin-top: 16px; }
.grid-2-cards > .card { margin: 0; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.hbar-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar { width: 100%; height: 12px; display: block; }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; }
.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.top-list li { display: flex; align-items: center; gap: 12px; }
.top-list img, .top-list .noimg { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; background: #fff; flex: 0 0 44px; }
.top-list .noimg { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.top-list div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top-list a { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list small { color: var(--muted); font-size: 12px; }

/* ===================================================================== */
/* Cartão de oferta e prévia "como fica no grupo"                        */
/* ===================================================================== */
.offer { gap: 20px; }
.offer.suspicious { border-color: var(--danger-line); }
.offer-media { position: relative; flex: 0 0 150px; display: block; }
.offer-media .offer-img, .offer-media .noimg { width: 150px; height: 150px; border-radius: 12px; object-fit: contain; background: #fff; display: grid; place-items: center; }
.offer-media .noimg { background: var(--surface-3); color: var(--muted); }
.offer-off { position: absolute; top: 8px; left: 8px; background: #16a34a; color: #fff; font-weight: 700; font-size: 12.5px; padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.offer-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.offer-top .badge .icon { width: 12px; height: 12px; }
.offer-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-big { font-size: 22px; font-weight: 700; color: var(--money); letter-spacing: -.01em; }
.offer-ship { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ok); }
.offer-ship .icon { width: 14px; height: 14px; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-ghost-danger { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost-danger:hover { background: var(--danger-soft); color: var(--danger-text); border-color: var(--danger-line); }
.offer-toggles { display: flex; flex-direction: column; gap: 6px; }
.offer-edit summary, .offer-phone summary { cursor: pointer; color: var(--text-2); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; width: fit-content; }
.offer-edit summary:hover, .offer-phone summary:hover { color: var(--text); }
.offer-edit summary .icon, .offer-phone summary .icon { width: 14px; height: 14px; }
.offer-edit[open], .offer-phone[open] { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.offer-edit .offer-fields { margin: 10px 0; }
.offer-edit .offer-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.offer-phone .phone { margin-top: 10px; }
@media (max-width: 720px) {
  .offer-media { flex-basis: auto; width: 100%; }
  .offer-media .offer-img, .offer-media .noimg { width: 100%; height: 200px; }
}

.phone { max-width: 360px; border-radius: 16px; overflow: hidden; border: 1px solid #2b3946; background: #0e1621; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #17212b; border-bottom: 1px solid #0e1621; }
.phone-head div { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.phone-head b { font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-head small { font-size: 11.5px; color: #7f91a4; }
.phone-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #f59e0b; color: #111; font-weight: 700; font-size: 14px; flex: 0 0 32px; }
.phone-body { padding: 14px 12px; }
.phone-bubble { position: relative; background: #182533; border-radius: 12px 12px 12px 4px; overflow: hidden; max-width: 320px; }
.phone-bubble img { width: 100%; max-height: 260px; object-fit: contain; background: #fff; display: block; }
.phone-noimg { height: 120px; display: grid; place-items: center; background: #22303f; color: #7f91a4; font-size: 12px; }
.phone-text { padding: 8px 12px 20px; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.45 var(--font); color: #e9edef; }
.phone-text b { font-weight: 700; color: #fff; }
.phone-text i { font-style: italic; color: #cfd8e3; }
.phone-time { position: absolute; right: 10px; bottom: 5px; font-size: 11px; color: #6c8ba5; }

/* ajustes: "?" ao lado do nome do campo, cabeçalho do cartão no celular, eixos do gráfico */
.form label { position: relative; }
.form label > .help-tip { position: absolute; top: 1px; right: 0; }
.form label.check-line > .help-tip { position: static; }
.central-head { flex-wrap: wrap; }
.central-name { flex: 1 1 160px; }
/* (rótulos dos gráficos agora são texto da página: tamanho fixo, ver .bchart) */
.offer-edit .offer-fields label { position: relative; }
.offer-edit .offer-fields label > .help-tip { position: absolute; top: 0; right: 0; }

/* ===================================================================== */
/* App instalável (PWA)                                                  */
/* ===================================================================== */
.install-btn[hidden], .ios-install[hidden] { display: none !important; }
.install-btn { margin-left: auto; }
.install-btn + .topbar-link { margin-left: 12px; }
.ios-install { align-items: center; }
.ios-install .icon-btn { margin-left: auto; flex: 0 0 auto; }
/* Dentro do app instalado: sem o link para o site e respeitando o recorte da tela do iPhone */
.is-app .topbar-link { display: none; }
.is-app .sidebar { padding-bottom: env(safe-area-inset-bottom); }
.offline { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; max-width: 420px; margin: 0 auto; }
.offline img { border-radius: 18px; }
.offline h1 { font-size: 20px; }
.offline p { color: var(--text-2); font-size: 14px; line-height: 1.5; }

/* ===================================================================== */
/* Celular: barra de app, passo a passo de instalação, tabelas em cartões */
/* ===================================================================== */
.tabbar { display: none; }
.install-login { margin-top: 14px; }
.install-login[hidden] { display: none !important; }

.sheet { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 18px;
  padding: 20px; width: min(440px, calc(100vw - 24px)); max-height: 88vh; overflow-y: auto; }
.sheet::backdrop { background: rgba(0, 0, 0, .6); }
.sheet-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.sheet-head img { border-radius: 11px; flex: 0 0 44px; }
.sheet-head div { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: 16px; }
.sheet-head p { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.sheet-ios, .sheet-other { display: none; }
.sheet.is-ios .sheet-ios, .sheet.is-other .sheet-other { display: block; }
.sheet .hint { margin: -4px 0 16px; color: var(--muted); }
.install-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.install-steps b { color: var(--text); }
.install-steps .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.ios-share svg { width: 18px; height: 18px; vertical-align: -4px; color: var(--primary); }

@media (max-width: 900px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 22;
    background: var(--topbar-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0;
    background: none; border: 0; color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 500; cursor: pointer; }
  .tabbar .icon { width: 21px; height: 21px; }
  .tabbar .on { color: var(--text); }
  .tabbar .on .icon { color: var(--primary); }
  .content { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .sidebar { padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 600px) {
  .sheet { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 720px) {
  .topbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .install-btn { padding: 6px 10px; }

  /* Cabeçalho da página: título em cima, botões embaixo ocupando a largura */
  .page-header { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .page-header h1 { font-size: 21px; }
  .page-actions > .btn { flex: 1 1 auto; }

  .card { padding: 16px; }
  .card-header { gap: 10px; margin-bottom: 14px; }
  .card-header .card-icon { width: 32px; height: 32px; }

  /* Abas e filtros numa linha só, deslizando para o lado */
  .segmented, .filters { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .segmented::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
  .segmented a, .filters a { white-space: nowrap; flex: 0 0 auto; }

  /* Formulários em linha: campo em cima, botão embaixo */
  .row-form > input, .row-form > select { min-width: 0; flex: 1 1 100%; }
  .row-form > .btn { flex: 1 1 auto; }

  /* Dashboard mais compacto */
  .service-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .service { padding: 10px 12px; gap: 10px; }
  .service b { font-size: 12.5px; }
  .service small { font-size: 11.5px; }
  .kpis, .kpis.kpis-4 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 12px 14px; gap: 4px; }
  .kpi-value { font-size: 20px; }
  .kpi-label { font-size: 11.5px; }
  .kpi-sub { font-size: 11px; }
  .kpi-icon { width: 26px; height: 26px; }
  .kpi-icon .icon { width: 14px; height: 14px; }
  .setup-list li { flex-wrap: wrap; align-items: flex-start; }
  .setup-list li > .btn, .setup-list li > .hint { margin-left: 40px; }

  /* Página do bot: situação e "Ligar bot" primeiro */
  .layout-2col { gap: 14px; }
  .aside-first { order: -1; }

  /* Tabelas viram cartões (o nome da coluna aparece ao lado do valor) */
  .stack-wrap { background: transparent; border: 0; overflow: visible; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px; margin-bottom: 10px; }
  table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; min-height: 40px;
    border-bottom: 1px solid var(--border); text-align: right; word-break: break-word; }
  table.stack td:last-child { border-bottom: 0; }
  table.stack td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left;
    color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
  table.stack td[data-label=""]::before { content: none; }
  table.stack td[data-label=""] { justify-content: flex-end; }
  table.stack td.actions { flex-wrap: wrap; white-space: normal; }
  table.stack td[colspan] { display: block; text-align: center; }
  table.stack td[colspan]::before { content: none; }

  .central-actions .btn, .central-actions form, .offer-actions .btn { flex: 1 1 auto; }
  .central-actions form .btn { width: 100%; }
}

/* Plataforma (clientes) */
.acting-bar { align-items: center; flex-wrap: wrap; }
.acting-bar form { margin-left: auto; }
.credential-card { border-color: var(--ok-line); }
.credential { display: grid; gap: 10px; margin: 0; }
.credential div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; }
.credential dt { color: var(--muted); font-size: 13px; }
.credential dd { margin: 0; word-break: break-all; }
.credential code { font-size: 14px; padding: 4px 8px; }
.inline-form { margin: 0; }
.inline-form select { width: auto; min-width: 160px; }
@media (max-width: 600px) { .credential div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.badge-store-tiktok { background: rgba(254, 44, 85, .12); color: #ff6b8a; border: 1px solid rgba(254, 44, 85, .3); }
.badge-store-aliexpress { background: rgba(255, 71, 38, .12); color: #ff7a5c; border: 1px solid rgba(255, 71, 38, .3); }
.s-tiktok { fill: var(--series-4); background: var(--series-4); }
.shopee-result { border-color: rgba(231, 102, 36, .4); }
.shopee-result .kpi { padding: 12px 14px; }
.status-list { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.shopee-result .hbars li { grid-template-columns: minmax(0, 1fr) 54px 84px; }

/* ===================================================================== */
/* Visual de produto (2026-11): menu limpo, cartões leves, login de marca */
/* ===================================================================== */
body { font-size: 14px; letter-spacing: -.003em; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.page-header .subtitle { font-size: 14px; color: var(--muted); }
.card, .kpi, .stat, .service, .table-wrap, .central-stats > div { box-shadow: var(--shadow-sm); }
.card { border-radius: 14px; }
.kpi { border-radius: 14px; gap: 8px; }
.kpi-label { font-weight: 500; color: var(--muted); }
.kpi-value { font-family: var(--font-title); font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-icon { background: var(--primary-soft); color: var(--primary); }
th { background: var(--surface-2); }
.segmented, .filters { background: var(--surface-2); border-color: var(--border); }
.segmented a.on, .filters a.on { box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border); }
.btn { border-radius: 9px; box-shadow: var(--shadow-sm); }
.btn-secondary, .btn.ghost { background: var(--surface); border-color: var(--border-strong); }
.btn-secondary:hover, .btn.ghost:hover { background: var(--surface-2); }
input, select, textarea { background: var(--surface); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
.section-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; }

/* Barra lateral: módulos como seções simples (sem caixas coloridas) */
.sidebar { border-right: 0; }
.brand { padding: 20px 18px 16px; }
.brand-text { font-size: 15px; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); }
.mod-sales  { --mod: #5eead4; --mod-soft: rgba(94, 234, 212, .12); --mod-line: rgba(94, 234, 212, .3); }
.mod-offers { --mod: #fcd34d; --mod-soft: rgba(252, 211, 77, .12); --mod-line: rgba(252, 211, 77, .3); }
.nav-module { margin: 14px 0 2px; padding: 0; border: 0; background: none; border-radius: 0; }
.nav-module-head { padding: 6px 10px 6px; }
.nav-module-ic { flex: 0 0 24px; height: 24px; border-radius: 7px; }
.nav-module-ic .icon { width: 14px; height: 14px; }
.nav-module-title b { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.nav-module-title small { font-size: 11.5px; color: var(--text-2); }
.nav-link.active { background: var(--cta); color: var(--on-cta); }
.nav-module .nav-link.active { background: var(--cta); }
.nav-module .nav-link.active .icon, .nav-link.active .icon { color: var(--on-cta); }
.nav-module .nav-group-body .nav-link.active::before { background: var(--cta); }
.module-pill { --mod: var(--primary); --mod-soft: var(--primary-soft); --mod-line: var(--primary-line); }
.sidebar-footer { border-top-color: var(--border); }

/* Topo */
.topbar { gap: 10px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.install-btn { margin-left: 0; }

/* Etiquetas das lojas (legíveis nos dois temas) */
.badge-store-shopee { background: #fff1ec; color: #c2410c; border: 1px solid #fed7c8; }
.badge-store-amazon { background: #fff7e6; color: #b45309; border: 1px solid #fde4b0; }
.badge-store-mercadolivre { background: #fffbe0; color: #8a6d00; border: 1px solid #f5e58a; }
.badge-store-tiktok { background: #fff0f3; color: #be123c; border: 1px solid #fecdd6; }
.badge-store-aliexpress { background: #fff1ee; color: #b42318; border: 1px solid #fdd0c8; }
:root[data-theme="dark"] .badge-store-shopee { background: rgba(238, 77, 45, .14); color: #ff7a59; border-color: rgba(238, 77, 45, .3); }
:root[data-theme="dark"] .badge-store-amazon { background: rgba(255, 153, 0, .12); color: #ffb347; border-color: rgba(255, 153, 0, .3); }
:root[data-theme="dark"] .badge-store-mercadolivre { background: rgba(255, 230, 0, .1); color: #f5d90a; border-color: rgba(255, 230, 0, .25); }
:root[data-theme="dark"] .badge-store-tiktok { background: rgba(254, 44, 85, .12); color: #ff6b8a; border-color: rgba(254, 44, 85, .3); }
:root[data-theme="dark"] .badge-store-aliexpress { background: rgba(255, 71, 38, .12); color: #ff7a5c; border-color: rgba(255, 71, 38, .3); }
.shopee-result { border-color: var(--border); }

/* Login: painel da marca (escuro) + formulário no tema da página */
.auth-aside {
  --surface: #13122b; --surface-2: #1d1b3d; --border: #25234a; --border-strong: #34315f;
  --text: #f1f0ff; --text-2: #c9c6ee; --muted: #8f8bc0;
  background: radial-gradient(900px 520px at 0% 0%, rgba(109, 92, 255, .35), transparent 60%),
              radial-gradient(700px 520px at 100% 100%, rgba(74, 54, 227, .3), transparent 60%), #0f0e24 !important;
  color: var(--text);
}
.auth-aside .brand-mark { box-shadow: 0 8px 24px rgba(1, 49, 205, .45); }
.auth-pitch h2 em { background: linear-gradient(90deg, #c4b5fd, #a5b4fc); -webkit-background-clip: text; background-clip: text; }
.auth-card .btn-lg { background: var(--cta); color: var(--on-cta); box-shadow: 0 8px 20px var(--cta-glow); }
.auth-card .input-wrap input { background: var(--surface); }

/* ===================================================================== */
/* Financeiro                                                            */
/* ===================================================================== */
.fin-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.fin-total { background: linear-gradient(135deg, #0131cd, #00165e); color: #fff; border: 0; border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.fin-total .lbl { font-size: 13px; opacity: .85; font-weight: 500; }
.fin-total .big { font-size: 38px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fin-total .sub { font-size: 13px; opacity: .85; }
.fin-total .split { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 13px; }
.fin-total .split b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.fin-side { display: grid; gap: 12px; }
.fin-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fin-mini span { color: var(--muted); font-size: 13px; }
.fin-mini b { font-size: 19px; font-variant-numeric: tabular-nums; }
.fin-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fin-status .kpi { border-left: 3px solid var(--border-strong); }
.fin-status .kpi.ok { border-left-color: var(--ok); }
.fin-status .kpi.warn { border-left-color: var(--warn); }
.fin-status .kpi.lost { border-left-color: var(--danger); }
.money { color: var(--money); }
.store-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.store-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.store-list li:first-child { border-top: 0; }
.store-list .name { flex: 1; font-weight: 600; }
.store-list .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.s-vendas { fill: var(--series-1); background: var(--series-1); }
.s-shopee-fin { fill: var(--series-2); background: var(--series-2); }
@media (max-width: 900px) { .fin-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .fin-status { grid-template-columns: minmax(0, 1fr); } .fin-total .big { font-size: 32px; } }

/* ===================================================================== */
/* V2 (modelo aprovado): menu claro, blocos coloridos, faixa roxa no celular */
/* ===================================================================== */
:root { --tone-violet: linear-gradient(135deg, #2f5fe8, #0131cd); --tone-coral: linear-gradient(135deg, #ff7a6b, #e5484d);
  --tone-green: linear-gradient(135deg, #34c38f, #13a26b); --tone-amber: linear-gradient(135deg, #f8c04e, #e79b13);
  --tone-indigo: linear-gradient(135deg, #4f9cff, #1d5fe0); --radius-lg: 16px; }
.card, .kpi, .table-wrap, .central-card { border-radius: 18px; }

/* Menu lateral: azul-noite nos dois temas (variáveis redefinidas em .sidebar) */
.sidebar { background: var(--surface); border-right: 1px solid var(--border); }
.nav-link { color: var(--text-2); }
.nav-link.active, .nav-module .nav-link.active { background: var(--cta); color: var(--on-cta); font-weight: 700; }
.nav-link.active .icon { color: var(--on-cta); }
.nav-module-title b { color: var(--muted); }
.mod-sales  { --mod: #0d9488; --mod-soft: rgba(13, 148, 136, .1); --mod-line: rgba(13, 148, 136, .3); }
.mod-offers { --mod: #d97706; --mod-soft: rgba(217, 119, 6, .1); --mod-line: rgba(217, 119, 6, .3); }
:root[data-theme="dark"] .mod-sales  { --mod: #5eead4; }
:root[data-theme="dark"] .mod-offers { --mod: #fcd34d; }

/* Blocos coloridos (indicadores principais) */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 16px;
  color: #fff; box-shadow: 0 10px 24px -12px rgba(30, 20, 90, .45); transition: transform .15s ease; min-width: 0; }
.tile:hover { color: #fff; transform: translateY(-2px); }
.tile::after { content: ""; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.tile-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); margin-bottom: 8px; }
.tile-ic .icon { width: 16px; height: 16px; }
.tile-label { font-size: 12.5px; opacity: .9; font-weight: 500; }
.tile b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tone-violet { background: var(--tone-violet); } .tone-coral { background: var(--tone-coral); } .tone-green { background: var(--tone-green); }
.tone-amber { background: var(--tone-amber); } .tone-indigo { background: var(--tone-indigo); }

/* Dashboard: gráfico + primeiros passos */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-grid > .card { margin: 0; }
.steps-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps-check li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.steps-check b { display: block; font-size: 13.5px; font-weight: 600; }
.steps-check small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.dot-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; margin-top: 1px; }
.steps-check li.done .dot-check { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.steps-check li.done b { color: var(--muted); text-decoration: line-through; }
.dot-check .icon { width: 12px; height: 12px; stroke-width: 3; }
.progress span { background: var(--primary); }
.dash-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.mini-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-sm); color: var(--text); min-width: 0; }
.mini-card:hover { color: var(--text); border-color: var(--primary-line); }
.mini-card b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.mini-card small { color: var(--muted); font-size: 12px; }
.mini-ic { flex: 0 0 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.s-shopee-fin { fill: var(--primary); background: var(--primary); }
.s-vendas { fill: var(--series-2); background: var(--series-2); }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Financeiro: destaque no mesmo estilo dos blocos */
.fin-total { background: var(--tone-violet); border-radius: 18px; }

/* Avatar de robô dos bots */
.robot { display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.robot svg { width: 70%; height: 70%; }
.bot-avatar.robot { border: 0; }
.bot-avatar.big.robot { flex: 0 0 44px; height: 44px; border-radius: 13px; }
.queue-bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.queue-bar span { display: block; height: 100%; border-radius: 999px; background: var(--tone-green); }

/* Ofertas: lista + painel "Postar pelo link" na lateral (desktop) */
.offers-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.offers-layout > aside { position: sticky; top: 76px; }
.offers-layout > aside .card { margin: 0; }
.offers-layout > aside .offer-fields { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) { .offers-layout { grid-template-columns: minmax(0, 1fr); } .offers-layout > aside { position: static; order: -1; } }

/* Celular: faixa azul no topo, com os cartões por cima */
@media (max-width: 900px) {
  .topbar { background: #0131cd; border-bottom: 0; color: #fff; }
  .topbar .topbar-title, .topbar .icon-btn, .topbar .menu-toggle { color: #fff; }
  .topbar .icon-btn:hover { background: rgba(255, 255, 255, .15); border-color: transparent; }
  .topbar .module-pill { background: rgba(255, 255, 255, .18); color: #fff; border-color: transparent; }
  .topbar .install-btn { background: #fff; color: #0131cd; border-color: #fff; }
  /* o cabeçalho da página continua a faixa azul do topo */
  .content > .page-top:first-child { margin-top: -20px; }
  .page-top { margin: 0 -16px 18px; padding: 18px 16px 22px; background: linear-gradient(180deg, #0131cd, #2f5fe8);
    border-radius: 0 0 26px 26px; color: #fff; }
  .page-top h1 { color: #fff; }
  .page-top .subtitle { color: rgba(255, 255, 255, .85); }
  .page-top .btn-secondary { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); }
  .page-top .btn:not(.btn-secondary) { background: var(--cta); color: var(--on-cta); border-color: var(--cta); }
  .page-top .help-tip { color: rgba(255, 255, 255, .85); }
  .tabbar .on .icon { color: var(--primary); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiles .tile:first-child { grid-column: span 2; }
  .tile { padding: 14px; }
  .tile b { font-size: 21px; }
  .dash-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

.tile small, .tile .tile-label { color: rgba(255, 255, 255, .88); }
.dash-grid { align-items: start; }
.tiles.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .tiles.tiles-3 { grid-template-columns: minmax(0, 1fr); } .tiles.tiles-3 .tile:first-child { grid-column: auto; } }

/* ===================================================================== */
/* Login V3: painel preto da marca + cartão de entrada                   */
/* ===================================================================== */
.auth { background: var(--bg); }
.auth-aside {
  --surface: #111111; --surface-2: #181818; --border: #232323; --border-strong: #2e2e2e;
  --text: #ffffff; --text-2: #c7c7cf; --muted: #8c8c96;
  border-right: 0;
  background: radial-gradient(720px 460px at 8% -10%, rgba(109, 92, 255, .42), transparent 62%),
              radial-gradient(620px 420px at 105% 105%, rgba(229, 72, 77, .18), transparent 60%), #000 !important;
}
.auth-pitch h2 { font-size: 40px; line-height: 1.1; }
.auth-pitch h2 em { background: linear-gradient(90deg, #a99bff, #ff8a7a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.auth-tile { border-radius: 16px; padding: 16px; color: #fff; display: flex; flex-direction: column; gap: 8px; min-height: 128px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.auth-tile .icon { width: 22px; height: 22px; padding: 7px; box-sizing: content-box; border-radius: 10px; background: rgba(255, 255, 255, .18); }
.auth-tile b { font-size: 14px; font-weight: 600; margin-top: auto; }
.auth-tile span { font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .88); }
.auth-stores { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-size: 12.5px; color: var(--muted); }
.auth-stores i { font-style: normal; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .04); color: var(--text-2); }

.auth-panel { background: radial-gradient(560px 380px at 50% 0%, var(--primary-soft), transparent 70%), var(--bg); }
.auth-card { max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 36px 34px 30px; box-shadow: 0 24px 60px rgba(16, 24, 40, .10), 0 2px 6px rgba(16, 24, 40, .05); }
:root[data-theme="dark"] .auth-card { box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.auth-card .brand-mark.top { display: grid; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 20px;
  box-shadow: 0 10px 26px rgba(1, 49, 205, .35); }
.auth-card .brand-mark.top .icon { width: 22px; height: 22px; }
.auth-card .input-wrap input { background: var(--surface-2); border-color: var(--border); }
.auth-card .input-wrap input:focus { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.auth-card .btn-lg { border: 0; box-shadow: 0 10px 24px var(--cta-glow); }
.auth-foot { justify-content: center; }

@media (max-width: 1100px) { .auth-tiles { grid-template-columns: minmax(0, 1fr); } .auth-tile { min-height: 0; flex-direction: row; align-items: center; }
  .auth-tile b { margin-top: 0; } .auth-tile div { display: flex; flex-direction: column; } }
@media (max-width: 900px) {
  .auth-panel { justify-content: flex-start; padding: 0 16px 32px;
    background: linear-gradient(180deg, #000 0, #000 230px, var(--bg) 230px); }
  .auth-panel::before { content: ""; display: block; height: 230px; width: calc(100% + 32px); margin: 0 -16px -150px;
    background: radial-gradient(420px 240px at 0% 0%, rgba(109, 92, 255, .55), transparent 70%),
                radial-gradient(360px 220px at 100% 100%, rgba(229, 72, 77, .25), transparent 70%); }
  .auth-card { padding: 28px 22px 24px; border-radius: 20px; }
  .auth-card .auth-logo { display: none; }
  .auth-mobile-head { display: flex; }
}
.auth-mobile-head { display: none; position: relative; z-index: 1; width: 100%; max-width: 420px; align-items: center; gap: 10px;
  color: #fff; font-weight: 600; font-size: 16px; margin: -40px 0 32px; }
.auth-mobile-head .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.auth-panel > .auth-card { position: relative; z-index: 1; }
.auth-tile > div { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
@media (max-width: 1100px) { .auth-tile > div { margin-top: 0; } }
@media (max-width: 900px) { .auth-mobile-head { display: flex; } .auth-card .brand-mark.top { display: none; } }

/* Entrar com Google */
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-google { height: 46px; border-radius: 10px; gap: 10px; justify-content: center; font-weight: 600; font-size: 14.5px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-google:hover { background: var(--surface-2); color: var(--text); }
.g-logo { width: 18px; height: 18px; flex: 0 0 18px; }
.device-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.device-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.device-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.device-list small { color: var(--muted); }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.check-line input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 18px; accent-color: var(--primary); }
.data-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0; }
.data-list div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.data-list dt { font-size: 12px; color: var(--muted); }
.data-list dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.auth-switch { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--text-2); }
.auth-switch a { font-weight: 600; }
.plan-feats { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.plan-feats li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.plan-feats .icon { width: 18px; height: 18px; color: #4ade80; flex: 0 0 18px; }
/* Meu plano */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 6px; }
.plan-card .plan-feats { margin: 10px 0 18px; flex: 1; }
.plan-card .plan-feats li { color: var(--text-2); font-size: 13.5px; }
.plan-card .plan-feats .icon { color: var(--ok); }
.plan-card.featured { border: 2px solid var(--primary); box-shadow: 0 12px 32px var(--primary-soft); }
.plan-card.current { background: var(--primary-soft); }
.plan-price { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 0; }
.plan-price small { font-size: 15px; font-weight: 500; color: var(--muted); margin: 0 2px; }
.plan-flag { position: absolute; top: -11px; right: 16px; background: var(--tone-violet); color: #fff; font-size: 11.5px;
  font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.btn.disabled { pointer-events: none; opacity: .6; }
.plan-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px;
  border-radius: 14px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--text); font-size: 13.5px; }
.plan-banner .icon { color: var(--primary); }
.plan-banner.reached { background: var(--warn-soft); border-color: var(--warn-line); }
.plan-banner.reached .icon { color: var(--warn); }
@media (max-width: 900px) { .plan-grid { grid-template-columns: minmax(0, 1fr); } }
/* Aviso do plano Grátis: chamativo (faixa da marca + botão branco) */
.plan-banner { position: relative; overflow: hidden; gap: 16px; padding: 16px 18px; border: 0; color: #fff;
  background: var(--tone-violet); box-shadow: 0 12px 28px rgba(1, 49, 205, .28); border-radius: 16px; }
.plan-banner::after { content: ""; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); pointer-events: none; }
.plan-banner.reached { background: var(--tone-coral); border: 0; box-shadow: 0 12px 28px rgba(229, 72, 77, .28); }
.plan-banner-ic { flex: 0 0 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.plan-banner .plan-banner-ic .icon, .plan-banner.reached .plan-banner-ic .icon { color: #fff; width: 20px; height: 20px; }
.plan-banner-text { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.plan-banner-text b { font-size: 15.5px; font-weight: 700; }
.plan-banner-text > span:not(.plan-meter) { font-size: 13.5px; color: rgba(255, 255, 255, .9); }
.plan-meter { display: block; height: 6px; margin-top: 8px; max-width: 320px; border-radius: 999px; background: rgba(255, 255, 255, .25); }
.plan-meter span { display: block; height: 100%; border-radius: 999px; background: #fff; width: 0; }
.plan-meter .w-10 { width: 10%; } .plan-meter .w-20 { width: 20%; } .plan-meter .w-30 { width: 30%; } .plan-meter .w-40 { width: 40%; }
.plan-meter .w-50 { width: 50%; } .plan-meter .w-60 { width: 60%; } .plan-meter .w-70 { width: 70%; } .plan-meter .w-80 { width: 80%; }
.plan-meter .w-90 { width: 90%; } .plan-meter .w-100 { width: 100%; }
.plan-banner-cta { position: relative; z-index: 1; background: var(--cta); color: var(--on-cta); font-weight: 700; padding: 10px 18px;
  border: 0; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.plan-banner-cta:hover { background: var(--cta-hover); color: var(--on-cta); transform: translateY(-1px); }
.plan-banner.reached .plan-banner-cta { color: #c2353a; }
.plan-banner-cta .icon { width: 16px; height: 16px; }
@media (max-width: 600px) { .plan-banner-cta { width: 100%; justify-content: center; } }
.plan-banner .plan-banner-cta .icon { color: currentColor; }

/* ===================================================================== */
/* Fluxo do bot (estilo editor de automação)                             */
/* ===================================================================== */
.flow-shell { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.flow-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.flow-state { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.flow-state b { font-size: 15px; }
.flow-state small { color: var(--muted); }
.flow-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.flow-switch-form { display: flex; }
.flow-switch { width: 52px; height: 30px; border-radius: 999px; border: 0; padding: 3px; cursor: pointer;
  background: var(--surface-3); display: flex; transition: background .2s; }
.flow-switch .knob { width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.flow-switch.on { background: var(--ok); }
.flow-switch.on .knob { transform: translateX(22px); }

.flow-canvas { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: 18px;
  padding: 24px 28px 76px; background-color: var(--surface-2);
  background-image: radial-gradient(var(--border-strong) 1.1px, transparent 1.1px); background-size: 20px 20px; }
.flow-row { display: flex; align-items: flex-start; height: 272px; width: max-content; margin: 0 auto; }
.flow-tip { position: absolute; left: 24px; bottom: 14px; margin: 0; display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); }
.flow-tip .icon { width: 14px; height: 14px; }

/* bloco */
.fnode { position: relative; width: 112px; height: 116px; margin-top: 78px; display: flex; flex-direction: column;
  align-items: center; text-align: center; color: var(--text); text-decoration: none; }
.flow-outputs .fnode { margin-top: 0; }
.fnode-box { position: relative; width: 76px; height: 76px; flex: 0 0 76px; border-radius: 16px; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--border-strong); box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.fnode-box > .icon { width: 30px; height: 30px; }
.fnode:hover .fnode-box, .fnode:focus-visible .fnode-box { transform: translateY(-2px); border-color: var(--primary);
  box-shadow: 0 10px 24px var(--primary-soft); }
.fnode.k-gatilho .fnode-box { border-radius: 38px 16px 16px 38px; }
.fnode-label { display: flex; flex-direction: column; margin-top: 8px; line-height: 1.25; }
.fnode-label b { font-size: 13px; font-weight: 600; }
.fnode-label small { font-size: 11.5px; color: var(--muted); max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* cor de cada etapa */
.k-gatilho .fnode-box > .icon { color: var(--primary); } .k-lojas .fnode-box > .icon { color: #f2683a; }
.k-filtros .fnode-box > .icon { color: #5b6cf0; } .k-horario .fnode-box > .icon { color: #e79b13; }
.k-post .fnode-box > .icon { color: #13a26b; } .k-telegram .fnode-box > .icon { color: #229ed9; }
.k-whatsapp .fnode-box > .icon { color: #25d366; }
/* situação */
.fnode-badge { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff; border: 2px solid var(--surface-2); }
.fnode-badge .icon { width: 12px; height: 12px; }
.st-ok .fnode-badge { background: var(--ok); }
.st-warn .fnode-badge { background: var(--warn); }
.st-lock .fnode-badge { background: var(--primary); }
.st-off .fnode-badge { display: none; }
.st-warn .fnode-box { border-color: var(--warn); border-style: dashed; }
.st-off .fnode-box, .st-lock .fnode-box { opacity: .6; }
.fnode-bolt { position: absolute; left: -22px; top: 50%; transform: translateY(-50%); color: #f2683a; }
.fnode-bolt .icon { width: 16px; height: 16px; }
/* detalhe ao passar o mouse */
.fnode-pop { position: absolute; z-index: 5; top: -10px; left: 50%; transform: translate(-50%, -100%); width: 210px;
  display: none; flex-direction: column; gap: 3px; padding: 10px 12px; text-align: left; border-radius: 12px;
  background: var(--popover-bg); color: var(--popover-text); font-size: 12px; box-shadow: var(--shadow); }
.fnode-pop em { font-style: normal; color: #fbbf24; }
.fnode-pop strong { margin-top: 4px; font-weight: 600; color: #c4b5fd; }
.fnode:hover .fnode-pop, .fnode:focus-visible .fnode-pop { display: flex; }
/* lojas (sub-blocos ligados por tracejado) */
.fnode-subs { position: absolute; top: 132px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding-top: 18px; }
.fnode-subs::before { content: ""; position: absolute; top: -14px; left: 50%; height: 23px; border-left: 2px dashed var(--border-strong); }
.fnode-subs::after { content: ""; position: absolute; top: 9px; left: 25px; right: 25px; border-top: 2px dashed var(--border-strong); }
.fsub { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 50px; }
.fsub::before { content: ""; position: absolute; top: -9px; height: 9px; left: 50%; border-left: 2px dashed var(--border-strong); }
.fsub i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800;
  font-size: 13px; color: #fff; border: 2px solid var(--surface-2); box-shadow: var(--shadow-sm); }
.fsub em { font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.fsub.fs-shopee i { background: #ee4d2d; } .fsub.fs-mercadolivre i { background: #ffe600; color: #2d3277; }
.fsub.fs-amazon i { background: #232f3e; color: #ff9900; } .fsub.fs-tiktok i { background: #111; color: #25f4ee; }
.fsub.off i { background: var(--surface-3); color: var(--muted); }
.fsub.off em { text-decoration: line-through; }
.fsub.missing i { outline: 2px dashed var(--warn); outline-offset: 2px; }
/* ligações */
.flow-edge { width: 44px; height: 76px; margin-top: 78px; display: flex; align-items: center; position: relative; }
.flow-edge i { display: block; width: 100%; height: 2px; background: var(--border-strong); }
.flow-edge::after { content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left: 8px solid var(--border-strong); border-right: 0; }
.flow-fork { width: 70px; height: 272px; flex: 0 0 70px; overflow: visible; }
.flow-fork path { fill: none; stroke: var(--border-strong); stroke-width: 2; vector-effect: non-scaling-stroke; }
.flow-split { display: none; }
.flow-outputs { display: flex; flex-direction: column; gap: 40px; }
.running .flow-edge i { background: repeating-linear-gradient(90deg, var(--primary) 0 8px, transparent 8px 14px);
  background-size: 14px 2px; animation: flow-dash .7s linear infinite; }
.running .flow-edge::after { border-left-color: var(--primary); }
.running .flow-fork path { stroke: var(--primary); stroke-dasharray: 8 6; animation: flow-fork .7s linear infinite; }
@keyframes flow-dash { to { background-position: 14px 0; } }
@keyframes flow-fork { to { stroke-dashoffset: -14; } }
@media (prefers-reduced-motion: reduce) { .running .flow-edge i, .running .flow-fork path { animation: none; } }

.flow-runs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

/* celular: o fluxo vira uma lista vertical */
@media (max-width: 820px) {
  .flow-canvas { padding: 18px 14px 50px; overflow: visible; }
  .flow-row { flex-direction: column; align-items: stretch; height: auto; width: auto; }
  .fnode, .flow-outputs .fnode { width: auto; height: auto; margin: 0; flex-direction: row; flex-wrap: wrap; align-items: center;
    text-align: left; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
  .fnode-box { width: 52px; height: 52px; flex-basis: 52px; border-radius: 12px; }
  .fnode.k-gatilho .fnode-box { border-radius: 26px 12px 12px 26px; }
  .fnode-box > .icon { width: 24px; height: 24px; }
  .fnode-label { margin: 0; flex: 1; }
  .fnode-label small { max-width: none; white-space: normal; }
  .fnode-bolt { display: none; }
  .fnode-pop { display: none !important; }
  .fnode-subs { position: static; transform: none; padding: 0; width: 100%; flex-wrap: wrap; gap: 8px; }
  .fnode-subs::before, .fnode-subs::after, .fsub::before { display: none; }
  .fsub { flex-direction: row; width: auto; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); }
  .fsub i { width: 26px; height: 26px; font-size: 11px; border: 0; }
  .fsub em { font-size: 12px; }
  .flow-edge { width: 2px; height: 22px; margin: 0 0 0 38px; }
  .flow-edge i { width: 2px; height: 100%; }
  .flow-edge::after { display: none; }
  .running .flow-edge i { background: repeating-linear-gradient(180deg, var(--primary) 0 6px, transparent 6px 10px);
    background-size: 2px 10px; animation: flow-dash-v .7s linear infinite; }
  .flow-fork { display: none; }
  .flow-split { display: block; margin: 6px 0 8px 26px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .flow-outputs { gap: 10px; }
  .flow-tip { left: 14px; }
  .flow-runs { grid-template-columns: 1fr 1fr; }
}
@keyframes flow-dash-v { to { background-position: 0 10px; } }
@media (min-width: 1280px) { .flow-canvas { overflow: visible; } }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-row a { font-size: 13px; font-weight: 500; }
.nav-pro { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; color: #fff; background: var(--tone-violet); }
.upsell-card { border: 2px solid var(--primary-line); }
.copy-code { display: inline-block; word-break: break-all; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
/* Marca: etiqueta com brilho */
.brand-mark { background: #0131cd; color: #b9fc01; }
.brand-mark .logo-mark { width: 66%; height: 66%; display: block; }

/* ---------- Guia rápido ---------- */
.journey { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.journey li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.journey li.current { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--surface); }
.journey li.current .step-badge { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.journey li.done { opacity: .7; }
.journey li.done b { text-decoration: line-through; color: var(--muted); }
.journey-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.journey-text b { font-size: 14px; }
.journey-text small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.journey-how { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.journey-how .icon { width: 13px; height: 13px; }
.how-flow { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.how-flow li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.how-flow li + li::before { content: "→"; position: absolute; left: -10px; top: 22px; transform: translateX(-50%);
  color: var(--muted); font-size: 14px; }
.how-flow b { font-size: 13.5px; }
.how-flow small { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.how-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.how-ic .icon { width: 18px; height: 18px; }
.how-notes, .guide-tips { display: flex; flex-direction: column; gap: 8px; }
.how-notes p, .guide-tips p { position: relative; padding-left: 24px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.how-notes p > .icon:first-child, .guide-tips p > .icon:first-child { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; color: var(--primary); }
.guide { scroll-margin-top: 80px; }
.guide h3 { font-size: 14px; margin: 6px 0 10px; }
.guide-steps { margin: 0 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.guide-steps li::marker { color: var(--primary); font-weight: 700; }
.guide-steps b { color: var(--text); }
#comece, #como-funciona { scroll-margin-top: 80px; }
.faq { margin: 0; display: flex; flex-direction: column; }
.faq dt { font-weight: 600; font-size: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.faq dt:first-child { border-top: 0; padding-top: 0; }
.faq dd { margin: 4px 0 12px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.faq ul { margin: 6px 0 0; padding-left: 18px; }
.toc { display: flex; flex-direction: column; gap: 2px; }
.toc a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc .icon { width: 15px; height: 15px; color: var(--muted); }
@media (max-width: 1100px) {
  .how-flow { grid-template-columns: minmax(0, 1fr); }
  .how-flow li { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .how-flow li small { flex-basis: 100%; }
  .how-flow li + li::before { content: "↓"; left: 50%; top: -14px; }
}
@media (max-width: 600px) {
  .journey li { grid-template-columns: 30px minmax(0, 1fr); }
  .journey li > .btn { grid-column: 2; justify-self: start; }
}

/* ---------- Celular: ajustes finos ---------- */
@media (max-width: 760px) {
  /* abas do bot: quebram em linhas em vez de sumir para o lado */
  .segmented.tabs-wrap { flex-wrap: wrap; overflow: visible; gap: 4px; }
  .segmented.tabs-wrap a { flex: 1 1 30%; text-align: center; justify-content: center; }
  /* célula com várias linhas (nome + detalhes) */
  table.stack td > .cell { min-width: 0; flex: 1 1 auto; }
}

/* ---------- Gráficos de barras por dia ---------- */
.bchart { --chart-h: 210px; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: var(--chart-h) auto; column-gap: 10px; }
.bchart-y { grid-row: 1; grid-column: 1; position: relative; min-width: 28px; }
.bchart-y span { position: absolute; right: 0; transform: translateY(50%); font-size: 11px; line-height: 1; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bchart-y .at-0 { bottom: 0; } .bchart-y .at-25 { bottom: 25%; } .bchart-y .at-50 { bottom: 50%; }
.bchart-y .at-75 { bottom: 75%; } .bchart-y .at-100 { bottom: 100%; }
.bchart-plot { grid-row: 1; grid-column: 2; display: block; width: 100%; height: 100%; overflow: visible; }
.bchart-plot .grid-line { stroke: var(--border); stroke-width: 1; }
.bchart-plot .grid-line.base { stroke: var(--border-strong); }
.bchart-plot .hit { fill: transparent; }
.bchart-plot .bar-group:hover .hit { fill: var(--hover-row); }
.bchart-plot .bar-group:hover .seg { filter: brightness(1.15); }
.bchart-x { grid-row: 2; grid-column: 2; display: flex; height: 16px; margin-top: 8px; }
.bchart-x span { position: relative; flex: 1 1 0; min-width: 0; }
.bchart-x i { position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; line-height: 1.3;
  color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bchart.dense .bchart-x span:first-child i { left: 0; transform: none; }   /* muitos dias: primeira e última data não saem do gráfico */
.bchart.dense .bchart-x span:last-child i { left: auto; right: 0; transform: none; }
@media (max-width: 600px) {
  .bchart { --chart-h: 160px; column-gap: 8px; }
  .bchart-x i.alt { display: none; }                               /* no celular, uma data sim, outra não */
}

/* Item ativo do menu (pílula limão): textos pequenos escuros para manter o contraste */
.nav-link.active small, .nav-link.active .nav-bot-text small { color: var(--on-cta); opacity: .72; }
.nav-link.active .bot-avatar { color: var(--on-cta); background: rgba(0, 11, 51, .12); border-color: rgba(0, 11, 51, .28); }
.nav-link.active .bot-avatar i { border-color: var(--cta); }

/* ---------- Logos das marcas (Telegram, WhatsApp...) ---------- */
.brand-telegram { color: #27a7e7; } .brand-whatsapp { color: #25d366; }
.brand-shopee { color: #ee4d2d; } .brand-amazon { color: #ff9900; } .brand-tiktok { color: #111111; }
/* onde o ícone fica num quadradinho: fundo branco, como ícone de aplicativo, para a cor da marca aparecer em qualquer tema */
.tile-ic:has(.icon-brand), .mini-ic:has(.icon-brand), .card-icon:has(.icon-brand), .kpi-icon:has(.icon-brand) {
  background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 2px 8px rgba(0, 22, 94, .14);
}
.tile-ic .icon-brand, .mini-ic .icon-brand, .kpi-icon .icon-brand, .card-icon .icon-brand { width: 24px; height: 24px; }
/* dentro de botões e links o logo acompanha a cor do texto (um tom só) */
.btn .icon-brand, .nav-link .icon-brand, .toc a .icon-brand { color: currentColor; }


/* ---------- Mesma cara do site de vendas: azul vivo, grade quadriculada, limão de destaque ---------- */
.sidebar, :root[data-theme="dark"] body {
  --sidebar-grid: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
}
.sidebar { background-image: var(--sidebar-grid); background-size: 44px 44px; }
:root[data-theme="dark"] .sidebar { --surface: #00165e; }
:root[data-theme="dark"] body { background-image: var(--sidebar-grid); background-size: 44px 44px; background-attachment: fixed; }
/* cartões coloridos do início: no azul vivo, os de tom azul viram azul-escuro para não sumir no fundo */
:root[data-theme="dark"] { --tone-violet: linear-gradient(135deg, #00165e, #000b33); --tone-indigo: linear-gradient(135deg, #0a2a9a, #00165e); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .kpi, :root[data-theme="dark"] .table-wrap, :root[data-theme="dark"] .central-card { box-shadow: var(--shadow-sm); }

/* Logo na barra lateral azul: quadrado limão com a etiqueta azul (o azul sobre azul sumia) */
.sidebar .brand-mark { background: #0131cd; color: #b9fc01; }

/* Entrada (login, cadastro...): lado esquerdo no azul vivo com a grade, igual ao topo do site de vendas */
.auth-aside {
  --surface: #00165e; --surface-2: rgba(255, 255, 255, .12); --border: rgba(255, 255, 255, .22); --border-strong: rgba(255, 255, 255, .35);
  --text: #ffffff; --text-2: #eaeeff; --muted: #d6dfff;
  border-right: 0; color: var(--text);
  background: radial-gradient(640px 420px at 12% 0%, rgba(185, 252, 1, .16), transparent 62%),
              linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
              linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px), #0131cd !important;
  background-size: auto, 44px 44px, 44px 44px !important;
}
.auth-aside::before { display: none; }
.auth-aside .brand-mark { background: #0131cd; color: #b9fc01; }
.auth-pitch h2 em { background: linear-gradient(90deg, #b9fc01, #ffffff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-stores i { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* Tema escuro: os ícones do fluxo ficam brancos (as cores de antes sumiam no azul vivo); Telegram e WhatsApp mantêm a marca */
:root[data-theme="dark"] .fnode-box > .icon:not(.icon-brand) { color: #ffffff; }

/* Menu lateral no azul vivo: as cores dos módulos (vendas = verde, promoções = âmbar) ficam mais claras para manter o contraste */
.sidebar .mod-sales { --mod: #7dffb0; --mod-soft: rgba(125, 255, 176, .16); --mod-line: rgba(125, 255, 176, .4); }
.sidebar .mod-offers { --mod: #ffd25a; --mod-soft: rgba(255, 210, 90, .16); --mod-line: rgba(255, 210, 90, .4); }

/* Cards no padrão da paleta: azul-escuro, limão e branco (coral/verde/âmbar saem dos cartões decorativos) */
.tone-coral.tile, .tone-coral.auth-tile { background: #b9fc01; color: #000b33; box-shadow: 0 12px 30px -12px rgba(185, 252, 1, .45); }
.tone-green.tile, .tone-green.auth-tile { background: #ffffff; color: #0131cd; box-shadow: 0 12px 30px -12px rgba(0, 11, 51, .45); }
.tone-amber.tile { background: #0131cd; color: #fff; box-shadow: 0 10px 24px -12px rgba(0, 11, 51, .6); border: 1px solid rgba(255, 255, 255, .35); }
.tone-violet.tile, .tone-violet.auth-tile, .tone-indigo.tile, .tone-indigo.auth-tile { background: #00165e; color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.tone-coral.tile:hover { color: #000b33; } .tone-green.tile:hover { color: #0131cd; }
.tone-coral.tile small, .tone-coral.tile .tile-label, .tone-coral.auth-tile span { color: rgba(0, 11, 51, .82); }
.tone-green.tile small, .tone-green.tile .tile-label, .tone-green.auth-tile span { color: #2c46a8; }
.tone-coral .tile-ic, .tone-coral.auth-tile .icon { background: rgba(0, 11, 51, .12); }
.tone-green .tile-ic, .tone-green.auth-tile .icon { background: #e8edff; }
.tone-coral.tile::after, .tone-green.tile::after { background: rgba(1, 49, 205, .08); }

/* Fluxo do bot: fundo preto */
.flow-canvas { --surface: #0b0d12; --surface-2: #000; --surface-3: #15181f; --border: #262a35; --border-strong: #4a5063;
  --text: #fff; --text-2: #e6e9f2; --muted: #a9b1c9; --primary: #b9fc01;
  background-color: #000; color: #fff; border-color: #262a35; }
.flow-canvas .fnode-box { box-shadow: none; }
.flow-canvas .fnode-box > .icon:not(.icon-brand) { color: #fff; }
.flow-canvas .k-gatilho .fnode-box > .icon { color: #b9fc01; }
.flow-canvas .k-lojas .fnode-box > .icon { color: #ff9b73; }
.flow-canvas .k-post .fnode-box > .icon { color: #5be3a8; }

/* Lojas do fluxo: logo de cada marca dentro da bolinha */
.fsub i .icon-brand { width: 22px; height: 22px; }
.fsub.fs-shopee i { background: #ee4d2d; color: #fff; }
.fsub.fs-mercadolivre i { background: #ffe600; color: #2d3277; }
.fsub.fs-amazon i { background: #232f3e; color: #ff9900; }
.fsub.fs-tiktok i { background: #000; color: #fff; }
.fsub.fs-tiktok i .icon-brand { filter: drop-shadow(1.2px 1px 0 #25f4ee) drop-shadow(-1.2px -1px 0 #fe2c55); }
.fsub.off i .icon-brand { opacity: .55; }
.fsub.off i { background: var(--surface-3); color: var(--muted); }
.fsub.missing i { outline: 2px dashed #ffd25a; }

/* Cartões pequenos (aguardando, atenção, vendas, clientes): ícone maior, com anel e cores só da paleta */
.mini-card { padding: 16px 18px; gap: 14px; }
.mini-ic { flex: 0 0 48px; height: 48px; border-radius: 15px; position: relative; border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 4px rgba(185, 252, 1, .18), 0 8px 18px -8px rgba(0, 11, 51, .6); }
.mini-ic .icon { width: 24px; height: 24px; stroke-width: 2.4; }
.mini-ic.tone-amber { background: #b9fc01; color: #000b33; }
.mini-ic.tone-coral { background: #fff; color: #d92d3a; box-shadow: 0 0 0 4px rgba(1, 49, 205, .22), 0 8px 18px -8px rgba(0, 11, 51, .6); }
.mini-ic.tone-green { background: #00165e; color: #b9fc01; }
.mini-ic.tone-indigo { background: #fff; color: #0131cd; }
.mini-ic:has(.icon-brand) { border-color: #fff; }
.mini-card b { font-family: Sora, Inter, sans-serif; font-size: 22px; font-weight: 800; }

/* Logo da barra lateral: etiqueta azul bem visível sobre o limão, maior e com brilho */
.brand-mark { box-shadow: 0 0 0 3px rgba(185, 252, 1, .25), 0 8px 20px -6px rgba(185, 252, 1, .55); }
.sidebar .brand-mark { width: 44px; height: 44px; border-radius: 13px; color: #b9fc01; }
.brand-mark .logo-mark { width: 78%; height: 78%; }
.fsub i .icon-brand { color: inherit; }
.fsub.fs-mercadolivre i .icon-brand { width: 30px; height: 30px; }

/* Uma logo só em todo o painel (a mesma do favicon): quadrado azul com a etiqueta limão.
   Sobre fundo azul ganha um anel branco para não sumir. */
.brand-mark { background: #0131cd; color: #b9fc01; box-shadow: 0 8px 20px -8px rgba(0, 11, 51, .55); }
.sidebar .brand-mark, .auth-aside .brand-mark, .auth-mobile-head .brand-mark { border: 2px solid #fff; box-shadow: 0 8px 20px -6px rgba(0, 11, 51, .6); }

/* Movimento reduzido: sem animações para quem pede isso no sistema */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Listas vazias: cartão tracejado, mais fácil de notar */
td.empty, .empty { border-radius: 14px; font-size: 14px; }
.card > .empty, .empty-state { border: 2px dashed var(--border-strong); background: var(--surface-2); margin: 12px; }

/* Convite para baixar o app (Dashboard) */
.app-promo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 16px; border-radius: 18px;
  background: #00165e; color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.app-promo-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #b9fc01; color: #000b33; flex: 0 0 46px; }
.app-promo-ic .icon { width: 24px; height: 24px; stroke-width: 2.3; }
.app-promo > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.app-promo b { font-family: Sora, Inter, sans-serif; font-size: 16px; }
.app-promo small { color: #d6dfff; font-size: 13px; }
.app-promo-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.app-promo .store-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 12px; background: #000; color: #fff;
  border: 1px solid rgba(255, 255, 255, .35); text-decoration: none; font: 700 15px/1.1 Sora, Inter, sans-serif; transition: transform .15s, border-color .15s; }
.app-promo .store-btn:hover { transform: translateY(-1px); border-color: #b9fc01; }
.app-promo .store-btn .icon { width: 26px; height: 26px; color: #fff; flex: none; }
.app-promo .store-btn span { display: flex; flex-direction: column; }
.app-promo .store-btn small { font: 500 10px/1.2 Inter, sans-serif; color: #d6dfff; }

.dash-section { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.dash-section h2 { margin: 0; font-family: Sora, Inter, sans-serif; font-size: 17px; }
.dash-section small { color: var(--muted, #5b6b99); font-size: 13px; }
.dash-section-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.dash-section-ic .icon { width: 20px; height: 20px; }
.dash-section-ic, .dash-section-ic.tone-amber, .dash-section-ic.tone-indigo { background: #0131cd; color: #b9fc01; }
/* ícones pequenos do Dashboard: um estilo só (azul-escuro com ícone limão) */
.mini-ic, .mini-ic.tone-amber, .mini-ic.tone-coral, .mini-ic.tone-green, .mini-ic.tone-indigo, .mini-ic.tone-violet {
  background: #00165e; color: #b9fc01; box-shadow: 0 0 0 4px rgba(1, 49, 205, .12); border-color: #fff; }
.mini-ic:has(.icon-brand) { background: #fff; }

/* ---------------------------------------------------------------------
   Celular (360–430 px): nada de rolagem horizontal da página, toque confortável (≥ 44 px),
   tabelas largas rolam dentro do próprio quadro, e o campo não dá zoom no iPhone.
   --------------------------------------------------------------------- */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video, canvas { max-width: 100%; }
.card, .alert, .tile, .mini-card, .page-header > * { min-width: 0; }
pre, code, .alert span, .steps-check b, .steps-check small, td, th { overflow-wrap: anywhere; }
.onboarding { margin-bottom: 18px; }
.onboarding .chart-head h2 { font-size: 16px; line-height: 1.3; }
.onboarding .steps-check a { color: inherit; }
.onboarding-cta { margin-top: 16px; width: 100%; white-space: normal; height: auto; min-height: 46px; padding-top: 10px; padding-bottom: 10px; text-align: center; }
@media (min-width: 721px) { .onboarding-cta { width: auto; } }

@media (max-width: 720px) {
  .btn, .btn-sm, .btn.small, button.btn, a.btn { min-height: 44px; }
  .btn-sm, .btn.small { padding-left: 14px; padding-right: 14px; }
  input, select, textarea { min-height: 44px; font-size: 16px; }
  input[type=checkbox], input[type=radio] { min-height: 0; }
  .reveal, .icon-btn, .nav-toggle, .topbar button { min-width: 44px; min-height: 44px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap table:not(.stack) { min-width: 560px; }
  .table-wrap table.stack { min-width: 0; }
  .empty-state .btn, .empty .btn { width: 100%; }
  .dash-row, .tiles { gap: 10px; }
}
@media (max-width: 420px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile b { font-size: 20px; }
  .page-actions { width: 100%; }
  .page-actions > .btn { flex: 1 1 100%; }
}
