/* Painel Busca Promo — formato "Choque": menu flutuante, cantos bem redondos, fonte Lexend.
   Duas aparências: data-look="rosa" (feminino, claro) e data-look="noite" (masculino, escuro).
   A cor de destaque (--accent) vem de /js/theme.js, conforme a paleta escolhida. */
:root, [data-look="rosa"] {
  --bg: #FBF6F8; --panel: #FFFFFF; --panel2: #FBF1F5; --input: #FBF6F8; --side: #FFFFFF;
  --line: #F1E3EA; --line2: #E6D2DC; --fg: #24161D; --muted: #6D5763; --dim: #A18F99;
  --accent: oklch(0.62 0.24 355); --accent-ink: #fff; --accent-soft: oklch(0.95 0.04 355); --bar: oklch(0.87 0.07 355);
  --ok: oklch(0.47 0.11 155); --warn: oklch(0.5 0.12 65); --bad: oklch(0.52 0.17 25); --info: oklch(0.5 0.12 250); --violet: oklch(0.5 0.17 300);
  --ok-bg: oklch(0.95 0.04 155); --warn-bg: oklch(0.95 0.05 75); --bad-bg: oklch(0.95 0.03 25); --info-bg: oklch(0.95 0.03 245);
  --logo1: #24161D; --shadow: 0 2px 14px rgba(120, 30, 70, .06); --shadow-side: 0 6px 24px rgba(120, 30, 70, .08); --overlay: rgba(36, 22, 29, .45);
  --font: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, "SF Mono", monospace;
  --r: 24px; --r-sm: 14px;
  color-scheme: light;
}
[data-look="noite"] {
  --bg: #07070A; --panel: #0F0F15; --panel2: #171720; --input: #0B0B10; --side: #0F0F15;
  --line: #1C1C26; --line2: #2A2A38; --fg: #F3F3F8; --muted: #9A9AB0; --dim: #5E5E70;
  --ok: oklch(0.8 0.13 155); --warn: oklch(0.84 0.13 85); --bad: oklch(0.72 0.17 22); --info: oklch(0.78 0.11 240); --violet: oklch(0.76 0.13 300);
  --ok-bg: oklch(0.3 0.05 155); --warn-bg: oklch(0.3 0.05 85); --bad-bg: oklch(0.3 0.06 22); --info-bg: oklch(0.3 0.05 240);
  --logo1: #F3F3F8; --shadow: none; --shadow-side: none; --overlay: rgba(0, 0, 0, .65);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { opacity: .85; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo-ico { position: relative; width: 34px; height: 34px; flex: none; }
.logo-ico i { position: absolute; inset: 0; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.logo-ico .l1 { background: var(--logo1); -webkit-mask-image: url(/img/bp-m1.png); mask-image: url(/img/bp-m1.png); }
.logo-ico .l2 { background: var(--accent); -webkit-mask-image: url(/img/bp-m2.png); mask-image: url(/img/bp-m2.png); }
.logo-ico .l3 { background: var(--ok); -webkit-mask-image: url(/img/bp-m3.png); mask-image: url(/img/bp-m3.png); }
.logo-txt { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.logo-txt b:first-child { color: var(--logo1); } .logo-txt b:last-child { color: var(--accent); }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 262px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--side); margin: 12px; border-radius: 26px; box-shadow: var(--shadow-side); border: 1px solid var(--line);
  padding: 20px 14px 16px; position: sticky; top: 12px; height: calc(100vh - 24px); overflow-y: auto; display: flex; flex-direction: column;
  overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
[data-look="rosa"] .side { border-color: transparent; }
.brand { display: flex; align-items: center; padding: 2px 8px 16px; }
.nav-group { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; color: var(--fg); text-decoration: none; font-size: 13.5px; }
.nav a:hover { background: var(--panel2); opacity: 1; }
.nav a.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nav .count { margin-left: auto; font: 600 11px var(--mono); background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 7px; }
.nav a.on .count { background: var(--accent-ink); color: var(--accent); }
.side-user { font-size: 12.5px; color: var(--muted); padding: 10px 10px 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.main { min-width: 0; padding: 26px 32px 60px; max-width: 1320px; width: 100%; }
.topbar { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { font-size: 30px; font-weight: 600; margin: 0; letter-spacing: -.02em; line-height: 1.1; }
.topbar .sp { flex: 1; }
.btn.menu-btn { display: none; }
.crumb { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 2px; }
.banner { background: var(--warn-bg); border: 1px solid var(--line); padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner.bad { background: var(--bad-bg); }
.banner.info { background: var(--info-bg); }

/* ---------- aparência (menu) ---------- */
.look { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--panel2); }
.seg button { flex: 1; border: 0; background: transparent; padding: 6px 8px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--fg); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; padding: 0 2px; }
.sw { width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--side), 0 0 0 4px transparent; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--side), 0 0 0 4px var(--fg); }
.look-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.look-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: var(--r-sm); border: 2px solid var(--line2); background: var(--panel); cursor: pointer; text-align: left; }
.look-pick button:hover, .look-pick button.on { border-color: var(--accent); }
/* o cartão "Masculino" usa as cores do modo escuro: o texto acompanha */
.look-pick button { color: var(--fg); }
.look-pick .prev { width: 100%; height: 70px; border-radius: 10px; margin-bottom: 6px; }
.look-pick .prev.rosa { background: linear-gradient(90deg, oklch(0.62 0.24 355) 0 26%, #FBF6F8 26%); border: 1px solid #F1E3EA; }
.look-pick .prev.noite { background: linear-gradient(90deg, oklch(0.82 0.14 200) 0 26%, #07070A 26%); }

/* ---------- componentes ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.card .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.kpi .l { color: var(--muted); font-size: 12.5px; }
.kpi .v { font-size: 36px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.kpi .s { color: var(--dim); font-size: 12px; }
.kpi-link { text-decoration: none; color: inherit; display: block; min-width: 0; }
.kpi-link:hover { opacity: 1; } .kpi-link:hover .kpi { border-color: var(--accent); }
.tab-n { font: 11px var(--mono); color: var(--dim); margin-left: 4px; }
.kpis-hot > :nth-child(3) .kpi { background: var(--accent); border-color: var(--accent); }
.kpis-hot > :nth-child(3) .kpi .l, .kpis-hot > :nth-child(3) .kpi .v, .kpis-hot > :nth-child(3) .kpi .s { color: var(--accent-ink); }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--panel); padding: 8px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--fg); font-size: 13.5px; font-weight: 500; }
.btn:hover { border-color: var(--accent); opacity: 1; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel2); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .nav a:focus-visible, .seg button:focus-visible, .sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); min-width: 0; }
label.f > span.h { color: var(--dim); font-size: 11.5px; }
input, select, textarea { background: var(--input); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 9px 12px; width: 100%; min-width: 0; color: var(--fg); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 90px; resize: vertical; font-family: var(--font); }
textarea.mono, .mono { font-family: var(--mono); font-size: 12.5px; }
input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; padding: 0; flex: none; border-radius: 6px; border: 1.5px solid var(--line2); background: var(--panel) center / 12px no-repeat; cursor: pointer; transition: background-color .12s, border-color .12s; }
input[type=checkbox]:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.6-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-look="noite"] input[type=checkbox]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.6-5' fill='none' stroke='%2307070A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type=checkbox]:disabled { opacity: .45; cursor: default; }
input[type=color] { padding: 2px; border-radius: 8px; }
label.chk { display: flex; gap: 10px; align-items: center; color: var(--fg); font-size: 13.5px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label.chk { gap: 0; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font-size: 12.5px; user-select: none; }
.chips label.chk:hover { border-color: var(--accent); }
.chips label.chk:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chips label.chk input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chips label.chk:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.card.sticky { position: sticky; top: 20px; align-self: start; }
.grid.g2 { align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--mono); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-ok { background: var(--ok-bg); color: var(--ok); } .p-warn { background: var(--warn-bg); color: var(--warn); }
.p-bad { background: var(--bad-bg); color: var(--bad); } .p-info { background: var(--info-bg); color: var(--info); }
.p-dim { background: var(--panel2); color: var(--muted); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); background: var(--panel2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--panel2); }
td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--panel2); display: block; }
div.thumb { background: repeating-linear-gradient(135deg, var(--panel2) 0 6px, var(--line) 6px 12px); }
.trunc { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs a:hover { color: var(--fg); opacity: 1; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
pre.code { background: var(--input); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; overflow-x: auto; font: 12.5px/1.55 var(--mono); margin: 0; white-space: pre-wrap; word-break: break-word; }
details summary { cursor: pointer; }
.preview-wa { background: #0B141A; border-radius: var(--r-sm); padding: 16px; }
.bubble { background: #005C4B; color: #E9EDEF; border-radius: 8px; padding: 9px 11px; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.45 system-ui, sans-serif; max-width: 420px; }
.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 6px; }
.bar-chart div { flex: 1; background: var(--bar); border-radius: 999px; min-height: 4px; }
.bar-chart div.pk, .bar-chart div:hover { background: var(--accent); }
.bar-labels { display: flex; gap: 4px; font: 10.5px var(--mono); color: var(--dim); margin-top: 4px; }
.bar-labels span { flex: 1; text-align: center; }
.hbar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: 12.5px; margin: 7px 0; }
.hbar .track { background: var(--panel2); border-radius: 99px; height: 8px; overflow: hidden; }
.hbar .fill { background: var(--accent); height: 100%; border-radius: 99px; }
.hbar .num { text-align: right; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--dim); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); } .dot.off { background: var(--bad); } .dot.wait { background: var(--warn); }
.acc-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.acc-line:last-child { border-bottom: 0; }
.qr { background: #fff; padding: 10px; border-radius: var(--r-sm); width: 260px; max-width: 100%; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font: 14px var(--mono); }
.codes span { background: var(--input); border: 1px solid var(--line); border-radius: 10px; padding: 6px; text-align: center; }

/* ---------- modal e aviso ---------- */
.modal-bg { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r); width: min(720px, 100%); padding: 22px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.modal.wide { width: min(1000px, 100%); }
.modal h2 { margin: 0 0 14px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.toast-box { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--panel); color: var(--fg); border: 1px solid var(--line2); border-left: 4px solid var(--ok); padding: 11px 16px; border-radius: var(--r-sm); max-width: 360px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); }
.toast.err { border-left-color: var(--bad); }

/* ---------- telas de acesso ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 30px 16px; background: var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 30px 28px; box-shadow: var(--shadow-side); }
.auth-card .brand { padding: 0 0 10px; }
.auth-card h1 { font-size: 26px; font-weight: 600; margin: 8px 0 4px; letter-spacing: -.02em; }
.auth-card p.sub { color: var(--muted); margin: 0 0 18px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card .btn.primary { justify-content: center; padding: 11px 16px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 13px; flex-wrap: wrap; }
.err-msg { color: var(--bad); font-size: 13px; min-height: 18px; }
.ok-msg { color: var(--ok); font-size: 13px; }
.pw-meter { height: 5px; border-radius: 5px; background: var(--panel2); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; width: 270px; left: 0; top: 0; transform: translateX(-110%); transition: transform .2s; }
  .side.open { transform: none; }
  .btn.menu-btn { display: inline-flex; }
  .main { padding: 16px 16px 60px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .look-pick { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* =====================================================================
   Tela Início no formato do modelo (cards, barras arredondadas, selos)
   ===================================================================== */
.topbar .btn { padding: 9px 18px; font-weight: 600; }
.pause-ico { font-size: 10px; letter-spacing: -2px; margin-right: 4px; }
.dash-kpis { gap: 16px; }
.dash-kpis .kpi-link { text-decoration: none; color: inherit; display: block; }
.dash-kpis .kpi-link:hover { opacity: 1; }
.dash-kpis .kpi { height: 100%; padding: 22px 24px 20px; transition: border-color .15s; }
.dash-kpis .kpi-link:hover .kpi { border-color: var(--line2); }
.dash-kpis .kpi .l { color: var(--fg); font-size: 13.5px; font-weight: 500; opacity: .92; }
.dash-kpis .kpi .v { font-size: 38px; font-weight: 700; margin: 6px 0 4px; line-height: 1.05; }
.dash-kpis .kpi .s { color: var(--fg); opacity: .8; font-size: 12.5px; font-weight: 500; }
.kpi.hl { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi.hl .l, .kpi.hl .s { color: var(--accent-ink); }
.dash-mid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 18px; gap: 16px; }
.dash-bottom { margin-top: 18px; gap: 16px; }
.dash-mid .card, .dash-bottom .card { padding: 22px 22px 20px; }
.card .h-inline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.card .h-inline h3 { margin: 0; font-size: 16.5px; font-weight: 600; }
.card .h-inline span { color: var(--dim); font-size: 12.5px; }

/* gráfico: barras grossas e arredondadas, zeros viram tracinhos */
.dash-mid .bar-chart { height: 140px; gap: 8px; padding-top: 0; }
.dash-mid .bar-chart div { border-radius: 999px; min-height: 0; }
.dash-mid .bar-chart div.zero { height: 6px !important; flex: 1; }
.dash-mid .bar-chart div.zero:first-child { height: 18px !important; flex: 0 0 18px; }
.dash-mid .bar-labels { gap: 8px; margin-top: 12px; }
.dash-mid .bar-labels span { text-align: left; }
.dash-mid .bar-labels span:last-child { text-align: right; }

/* contas e últimas ofertas */
.dash-mid .acc-line, .dash-bottom .acc-line { padding: 12px 0; gap: 12px; }
.acc-name { flex: 1; min-width: 0; }
.acc-name b { font-weight: 600; font-size: 14px; }
.acc-meta { color: var(--dim); font-size: 12px; margin-left: 2px; }
.offer-line .t { display: block; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 14px; }
.offer-line .m { display: block; color: var(--dim); font-size: 12px; margin-top: 1px; }

/* selos retangulares com fundo claro (como no modelo) */
.dash-mid .pill, .dash-bottom .pill { border-radius: 6px; padding: 2px 8px; font-size: 11px; letter-spacing: .01em; }
.dash-mid .pill::before, .dash-bottom .pill::before { display: none; }
.dash-mid .p-ok, .dash-bottom .p-ok { background: #D4F5E0; color: #16774A; }
.dash-mid .p-warn, .dash-bottom .p-warn { background: #FFE5B8; color: #8A5200; }
.dash-mid .p-bad, .dash-bottom .p-bad { background: #FFDADA; color: #B42D2D; }
.dash-mid .p-info, .dash-bottom .p-info { background: #DCE8FF; color: #1F4FA6; }

/* barras horizontais */
.dash-bottom .hbar { grid-template-columns: 96px 1fr 36px; gap: 14px; margin: 11px 0; font-size: 13px; }
.dash-bottom .hbar .track { height: 8px; }
.dash-bottom .hbar .num { font-weight: 600; }
.hbars-alt .hbar .fill { background: var(--bar); }
[data-look="noite"] .hbars-alt .hbar .fill { background: color-mix(in oklab, var(--bar) 80%, #fff 6%); }

@media (max-width: 1100px) { .dash-mid { grid-template-columns: minmax(0, 1fr); } }
.kpi .v .kpi-of { font-size: 18px; color: var(--dim); font-weight: 500; margin-left: 2px; }
.kpi.hl .v .kpi-of { color: var(--accent-ink); opacity: .7; }

/* =====================================================================
   Proporcional a cada tela: conteúdo ocupa a largura toda, menu mais
   estreito e compacto (cabe inteiro sem rolar), gráfico maior.
   ===================================================================== */
:root { --side-w: clamp(196px, 13.5vw, 232px); }
.app { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.main { max-width: none; padding: clamp(16px, 1.6vw, 30px) clamp(16px, 2vw, 40px) 48px; }

/* menu compacto */
.side { margin: 10px 0 10px 10px; padding: 14px 8px 10px; border-radius: 22px; height: calc(100vh - 20px); top: 10px; }
.brand { padding: 0 6px 8px; }
.logo { gap: 8px; }
.logo-ico { width: 28px; height: 28px; }
.logo-txt { font-size: clamp(14px, 1.05vw, 17px); }
.nav-group { padding: 9px 10px 3px; font-size: 9.5px; }
.nav a { padding: 5px 12px; font-size: 13px; line-height: 1.35; }
.look { padding: 8px 4px 2px; }
.look .nav-group { padding: 0 0 4px !important; }
.seg button { padding: 4px 6px; font-size: 12px; }
.swatches { gap: 7px; margin-top: 8px; }
.swatches .sw { width: 18px; height: 18px; }
.side-user { padding: 8px 8px 2px; margin-top: 6px; font-size: 11.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
.side .nav:last-child a { padding: 4px 12px; }
/* telas baixas (notebook): aperta ainda mais */
@media (max-height: 860px) {
  .nav-group { padding: 6px 10px 2px; }
  .nav a { padding: 3px 12px; font-size: 12.5px; }
  .brand { padding-bottom: 4px; }
  .look { padding-top: 6px; }
}

/* topo e números acompanham o tamanho da tela */
.topbar h1 { font-size: clamp(24px, 2vw, 34px); }
.dash-kpis .kpi { padding: clamp(16px, 1.3vw, 26px); }
.dash-kpis .kpi .v { font-size: clamp(30px, 2.5vw, 46px); }
.dash-kpis .kpi .l { font-size: clamp(12.5px, .85vw, 15px); }

/* gráfico maior: ocupa 2/3 da linha e cresce com a altura da tela */
.dash-mid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dash-mid .bar-chart { height: clamp(160px, 26vh, 320px); gap: clamp(5px, .5vw, 10px); }
.dash-mid .bar-labels { gap: clamp(5px, .5vw, 10px); }
.dash-mid .card, .dash-bottom .card { padding: clamp(16px, 1.3vw, 26px); }
.card .h-inline h3 { font-size: clamp(15px, 1.05vw, 18px); }

@media (max-width: 1100px) {
  .dash-mid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { margin: 0; height: 100vh; border-radius: 0 22px 22px 0; width: 240px; }
}

/* grupo recolhível (Administração) */
.nav-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: transparent; cursor: pointer;
  text-align: left; border-radius: 8px; }
.nav-toggle:hover { color: var(--fg); }
.nav-toggle .chev { width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; margin-right: 6px; }
.nav-toggle.open .chev { transform: rotate(45deg); margin-top: -3px; }

/* setinha da Administração bem visível */
.nav-toggle { padding: 7px 10px !important; margin: 2px 0; color: var(--muted); }
.nav-toggle:hover { background: var(--panel2); }
.nav-toggle .chev { width: 22px; height: 22px; border: 0 !important; transform: none !important; margin: -4px -4px -4px 0 !important;
  border-radius: 99px; background: var(--panel2); display: grid; place-items: center; }
.nav-toggle .chev::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--fg); border-bottom: 2px solid var(--fg);
  transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.nav-toggle.open .chev::before { transform: translateY(2px) rotate(-135deg); }
.nav-toggle:hover .chev { background: var(--accent); }
.nav-toggle:hover .chev::before { border-color: var(--accent-ink); }
.nav-toggle .chev { background: var(--accent-soft); }
.nav-toggle .chev::before { border-color: var(--accent); }

/* código de pareamento do WhatsApp */
.pair-code { font: 700 clamp(28px, 4vw, 40px) var(--mono); letter-spacing: .14em; text-align: center; padding: 16px; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--fg); border: 1px dashed var(--accent); }
#modal .tabs a { cursor: pointer; }

/* ajuda passo a passo */
.help-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; vertical-align: middle; border-radius: 99px;
  border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent); font: 700 12px var(--font); cursor: pointer; padding: 0; line-height: 1; }
.topbar h1 .help-btn { width: 24px; height: 24px; font-size: 14px; position: relative; top: -3px; }
.help-btn:hover { background: var(--accent); color: var(--accent-ink); }
.help-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.help-layer { z-index: 70; }
.help-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.help-steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: passo; display: flex; flex-direction: column; gap: 10px; }
.help-steps li { counter-increment: passo; position: relative; padding: 10px 12px 10px 46px; border-radius: var(--r-sm); background: var(--panel2); line-height: 1.55; }
.help-steps li::before { content: counter(passo); position: absolute; left: 12px; top: 10px; width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font: 700 12px var(--mono); }
.help-steps code, .help-tips code { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; font: 12px var(--mono); word-break: break-all; }
.help-tips { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px dashed var(--accent); background: var(--accent-soft); }
.help-tips ul { margin: 6px 0 0; padding-left: 18px; }
.help-tips li { margin: 3px 0; }

/* olhinho da senha */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 42px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--fg); opacity: .55; cursor: pointer; padding: 0; }
.pw-eye:hover, .pw-eye:focus-visible { opacity: 1; background: var(--accent-soft); outline: none; }
