/* Império BI — identidade do painel Império Progressivas 2026.
   Layout: barra lateral de módulos + barra de filtros fixa + grade de cartões. */
:root {
  --bg: #FFF8FB; --panel: #FFFFFF; --ink: #141014; --muted: #7C6B74; --line: #F2DCE6; --soft: #FCEAF2;
  --pink: #E0267D; --pink-2: #C61F6C; --pink-3: #8F1650; --baby: #F6B3CD; --gold: #C9A45C; --goldtx: #9C7A2E;
  --chip: #141014; --chiptx: #FFF8FB; --up: #1F8A5B; --down: #E0267D; --warn: #B7791F;
  --side: #141014; --sidetx: #F8EEF3;
  --display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --text: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --r: 14px; --r-lg: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0B0D; --panel: #1A1418; --ink: #F8EEF3; --muted: #B39FAA; --line: #34262D; --soft: #261B21;
    --pink: #F0469A; --pink-2: #D63883; --pink-3: #A72A67; --baby: #7A3A56; --gold: #D9B872; --goldtx: #D9B872;
    --chip: #221A1E; --chiptx: #F8EEF3; --up: #4CC38A; --down: #F0469A; --warn: #E0A84A;
    --side: #120E10; --sidetx: #F8EEF3; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0B0D; --panel: #1A1418; --ink: #F8EEF3; --muted: #B39FAA; --line: #34262D; --soft: #261B21;
  --pink: #F0469A; --pink-2: #D63883; --pink-3: #A72A67; --baby: #7A3A56; --gold: #D9B872; --goldtx: #D9B872;
  --chip: #221A1E; --chiptx: #F8EEF3; --up: #4CC38A; --down: #F0469A; --warn: #E0A84A;
  --side: #120E10; --sidetx: #F8EEF3; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--side); color: var(--sidetx); position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 16px 22px max(16px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 22px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.brand .mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--pink), var(--pink-3)); color: #fff;
  font-family: var(--display); font-weight: 800; font-size: 20px; box-shadow: 0 6px 18px -6px rgba(224, 38, 125, .7);
}
.brand b { display: block; white-space: nowrap; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.brand small { display: block; font-size: 11.5px; opacity: .6; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: inherit;
  text-decoration: none; font-weight: 500; font-size: 14.5px; opacity: .74; transition: background .2s, opacity .2s;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"] { opacity: 1; background: rgba(224, 38, 125, .18); color: #fff; box-shadow: inset 3px 0 0 var(--pink); }
.side-foot { margin-top: auto; font-size: 12px; opacity: .62; padding: 0 8px; display: flex; flex-direction: column; gap: 8px; }
.side-foot .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 6px; }
.theme-btn { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; padding: 7px 10px; cursor: pointer; text-align: left; color: var(--sidetx); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) 12px 24px;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px;
}
.topbar .title { margin-right: auto; min-width: 0; }
.topbar .title small { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.topbar .title h1 { font-size: 22px; font-weight: 800; }
.f { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
select {
  font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 30px 7px 10px; min-width: 0; cursor: pointer;
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: transparent; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--pink); color: #fff; }

.content { padding: 22px max(24px, env(safe-area-inset-right, 0px)) 60px 24px; display: flex; flex-direction: column; gap: 18px; max-width: 1440px; width: 100%; }
.demo {
  display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border: 1px dashed var(--gold);
  border-radius: var(--r); padding: 12px 16px; font-size: 13px; color: var(--ink);
}
.demo b { color: var(--goldtx); }
.view[hidden] { display: none !important; }
.view { display: flex; flex-direction: column; gap: 18px; animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- blocos ---------- */
.hero {
  background: var(--chip); color: var(--chiptx); border-radius: var(--r-lg); padding: clamp(20px, 3.4vw, 32px);
  position: relative; overflow: hidden; border: 1px solid var(--line);
}
.hero::before { content: ""; position: absolute; inset: -45% -12% auto auto; width: 68%; height: 150%; background: radial-gradient(closest-side, rgba(224, 38, 125, .45), rgba(224, 38, 125, 0)); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: auto auto -55% -12%; width: 55%; height: 130%; background: radial-gradient(closest-side, rgba(201, 164, 92, .26), rgba(201, 164, 92, 0)); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: flex-end; justify-content: space-between; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 2px 10px; margin-bottom: 10px; }
.hero .big-l { font-size: 13px; opacity: .72; }
.hero .big { font-family: var(--display); font-size: clamp(36px, 5.4vw, 60px); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.hero .big-s { margin-top: 8px; font-size: 14px; opacity: .85; }
.hk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.hk .c { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.hk .l { font-size: 12.5px; opacity: .72; }
.hk .v { font-family: var(--display); font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hk .d { font-size: 12px; margin-top: 3px; font-weight: 600; }
.hk canvas { display: block; width: 100% !important; height: 34px !important; margin-top: 8px; }

.st { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.st h2 { color: var(--pink); font-size: 22px; font-weight: 800; }
.st p { margin: 0; color: var(--muted); font-size: 13px; }

.kp { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 12px; }
.k { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; display: flex; flex-direction: column; gap: 2px; transition: transform .25s, box-shadow .25s; }
.k:hover, .card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--pink) 55%, transparent); }
.k .l { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.k .v { font-family: var(--display); font-size: 23px; font-weight: 800; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
.k .s { font-size: 12px; color: var(--muted); }
.k .d { font-size: 12px; font-weight: 700; }
.up { color: var(--up); } .dn { color: var(--down); } .ne { color: var(--muted); font-weight: 500; }
.hero .up { color: #6EE7B0; } .hero .dn { color: #FF8CC2; }
.info { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line); font-size: 10px; color: var(--muted); cursor: help; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; transition: transform .25s, box-shadow .25s; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.ttl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ttl h3 { font-size: 16.5px; font-weight: 600; }
.ttl small { color: var(--muted); font-size: 12.5px; }
.ch { position: relative; height: 280px; }
.ch.sm { height: 220px; } .ch.lg { height: 340px; }
.note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; line-height: 1.55; }

/* tabelas */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); z-index: 1; }
th { font-weight: 600; color: var(--muted); font-size: 12px; }
thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; }
thead th:first-child { z-index: 3; }
.dre td:first-child { min-width: 230px; }
.dre tr.g td { font-weight: 700; background: var(--soft); }
.dre tr.g td:first-child { background: var(--soft); }
.dre tr.res td { font-weight: 800; font-family: var(--display); font-size: 14.5px; border-top: 2px solid var(--gold); }
.dre tr.res.final td { background: var(--chip); color: var(--chiptx); }
.dre tr.res.final td:first-child { background: var(--chip); }
.dre tr.sub td:first-child { padding-left: 26px; color: var(--muted); }
.dre tr.sub td { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.dre tr.pct td { font-size: 12px; color: var(--muted); font-style: italic; }
.dre td.tot, .dre th.tot { border-left: 1px solid var(--line); font-weight: 700; }
.dre tr.prev td.p, .dre th.p { color: var(--goldtx); }
.toggle { cursor: pointer; user-select: none; }
.toggle::before { content: "▾"; display: inline-block; width: 14px; color: var(--muted); transition: transform .2s; }
tr.closed .toggle::before { transform: rotate(-90deg); }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 2px 10px; border: 1px solid var(--line); background: var(--soft); }
.pill.ok { border-color: var(--up); color: var(--up); background: color-mix(in srgb, var(--up) 10%, var(--panel)); }
.pill.warn { border-color: var(--gold); color: var(--goldtx); background: color-mix(in srgb, var(--gold) 14%, var(--panel)); }
.pill.bad { border-color: var(--pink); color: var(--pink); }

/* funil */
.funnel { display: flex; flex-direction: column; gap: 6px; }
.funnel .step { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.funnel .bar { height: 48px; border-radius: 12px; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; gap: 10px; min-width: 0; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.funnel .bar span { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel .bar b { font-family: var(--display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.funnel .conv { font-size: 12.5px; color: var(--muted); padding-left: 14px; }
.funnel .conv b { color: var(--ink); }

/* insights */
.reads { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 14px; }
.read { background: var(--chip); color: var(--chiptx); border-radius: var(--r); padding: 18px; border-top: 3px solid var(--gold); min-width: 0; }
.read b { display: block; color: var(--gold); font-family: var(--display); font-size: 16.5px; margin-bottom: 6px; }
.read p { margin: 0; font-size: 14px; opacity: .88; }

/* unidades */
.units { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.unit { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.unit::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--uc, var(--pink)); }
.unit-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.unit-h h3 { font-size: 19px; font-weight: 800; }
.unit-h small { display: block; color: var(--muted); font-size: 12.5px; }
.unit-k { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.unit-k div { min-width: 0; }
.unit-k span { display: block; font-size: 12px; color: var(--muted); }
.unit-k b { font-family: var(--display); font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.meter { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--gold)); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.ms { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 5px; }
.unit.slot { border-style: dashed; background: transparent; justify-content: center; align-items: center; text-align: center; color: var(--muted); min-height: 220px; }
.unit.slot::before { display: none; }
.unit.slot b { font-family: var(--display); font-size: 17px; color: var(--ink); }

/* mapa */
.map { position: relative; }
.map svg { width: 100%; height: auto; display: block; }
.map .lbl { font-family: var(--text); font-size: 12px; fill: var(--ink); font-weight: 600; }
.map .lbl2 { font-family: var(--text); font-size: 10.5px; fill: var(--muted); }
.pulse { animation: pulse 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0% { opacity: .55; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.4); } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* balanço */
.bal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bal h4 { margin: 0 0 8px; font-family: var(--display); font-size: 15px; }
.bal table td:first-child { white-space: normal; }
.bal tr.g td { font-weight: 700; background: var(--soft); }
.bal tr.t td { font-weight: 800; font-family: var(--display); border-top: 2px solid var(--gold); }

/* heatmap */
.heat { display: grid; gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 640px; }
.heat .hl { color: var(--muted); display: flex; align-items: center; white-space: nowrap; padding-right: 8px; }
.heat .hh { text-align: center; color: var(--muted); font-size: 11.5px; }
.heat .hc { border-radius: 7px; padding: 10px 4px; text-align: center; font-weight: 600; }

.tip-box { position: fixed; z-index: 99; pointer-events: none; background: var(--chip); color: var(--chiptx); border: 1px solid var(--gold); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; max-width: 260px; opacity: 0; transition: opacity .12s; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .c3 { grid-column: span 6; } .c4, .c5, .c7, .c8 { grid-column: span 12; } .c6 { grid-column: span 12; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); overflow-x: auto; }
  .brand small, .side-foot { display: none; }
  .nav { flex-direction: row; gap: 4px; }
  .nav a { padding: 8px 10px; white-space: nowrap; font-size: 13.5px; }
  .nav a svg { display: none; }
  .topbar { position: static; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
  .content { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
  .hk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c3 { grid-column: span 12; }
  .bal { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .side, .topbar { display: none; } .app { display: block; } .card, .k { break-inside: avoid; }
}

/* ---------- relatórios v2 ---------- */
.nav-g { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .45; padding: 14px 12px 4px; }
.nav-g:first-child { padding-top: 0; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; }
.ch.xl { height: 420px; }
td.txt { text-align: left !important; }
.mini { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.mini b { display: block; width: 70px; height: 7px; border-radius: 99px; background: var(--soft); overflow: hidden; flex: none; }
.mini b i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.mini span { min-width: 46px; text-align: right; }
.vazio { padding: 18px 4px; text-align: center; }
@media (max-width: 860px) {
  .nav-g { display: none; }
  .ch.xl { height: 360px; }
}

@media (max-width: 1100px) { .kp, .reads { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); } }
@media (max-width: 520px) { .kp { grid-template-columns: repeat(2, minmax(0, 1fr)); } .reads { grid-template-columns: minmax(0, 1fr); } }

/* ---------- login ---------- */
.sair { margin-left: auto; align-self: center; border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 7px 14px; font: 600 13px var(--text); cursor: pointer; min-height: 36px; }
.sair:hover { color: var(--pink); border-color: var(--pink); }
.login { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 20% 0%, rgba(224,38,125,.18), transparent 60%), var(--bg); }
.login[hidden] { display: none !important; }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 60px -30px rgba(143,22,80,.45); }
.login-card .brand { color: var(--ink); margin-bottom: 6px; }
.login-card .brand small { display: block; }
.lf { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.lf input { font: 500 16px var(--text); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 46px; }
.lf input:focus { outline: 2px solid var(--pink); outline-offset: 1px; }
.lerr { color: var(--pink); font-size: 13.5px; min-height: 18px; margin: 0; }
.lbtn { border: 0; border-radius: 12px; min-height: 48px; font: 700 15px var(--text); color: #fff; background: linear-gradient(135deg, var(--pink), var(--pink-3)); cursor: pointer; box-shadow: 0 10px 24px -12px rgba(224,38,125,.9); }
.lbtn:disabled { opacity: .6; cursor: wait; }

/* ---------- painel do celular (bento) ---------- */
.bento, .filtros-btn { display: none; }
@media (max-width: 860px) {
  .bento { display: block; margin-bottom: 16px; }
  #v-geral .hero, #v-geral #gKp, #v-geral .card:has(#cGeralMes), #v-geral .card:has(#cGeralCli) { display: none; }
  .bchips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
  .bchips::-webkit-scrollbar { display: none; }
  .bchip { flex: none; min-height: 38px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 13.5px var(--text); }
  .bchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .bgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(96px, auto); gap: 10px; }
  .bt { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: 0 14px 30px -24px rgba(143, 22, 80, .45); display: flex; flex-direction: column; }
  .bt .bl { color: var(--muted); font-size: 12.5px; font-weight: 600; }
  .bt .bv { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.01em; margin-top: 4px; font-variant-numeric: tabular-nums; }
  .bt .bs { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; flex-direction: column; gap: 3px; }
  .bt .bs i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
  .bt.hero2 { grid-column: 1 / -1; color: #fff; border: 0; background: radial-gradient(120% 120% at 100% 0%, #ff5fa8 0%, var(--pink) 30%, var(--pink-3) 75%, #4a0b2a 100%); box-shadow: 0 24px 40px -22px rgba(143, 22, 80, .9); }
  .bt.hero2 .bl, .bt.hero2 .bs, .bt.hero2 .bs * { color: rgba(255, 255, 255, .82) !important; }
  .bt.hero2 .bv { font-size: 32px; }
  .bt.tall { grid-row: span 2; }
  .bt.dark { background: #141014; border-color: #141014; }
  .bt.dark .bl { color: #c9b3bd; } .bt.dark .bv { color: var(--gold); } .bt.dark .bs { color: #b39faa; }
  .bt.wide { grid-column: 1 / -1; }
  .bsp { position: relative; height: 70px; margin-top: 8px; }
  .bdn { position: relative; height: 118px; margin: 10px 0 8px; }
  .bln { position: relative; height: 150px; margin-top: 6px; }
  .filtros-btn { display: inline-flex; align-items: center; margin-left: auto; align-self: center; min-height: 36px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 13px var(--text); }
  .filtros-btn + .sair { margin-left: 8px; }
  .topbar { flex-wrap: wrap; }
  .topbar .title { flex: 1 1 auto; min-width: 0; }
  .topbar:not(.abertos) .f { display: none; }
  .topbar.abertos .f { flex: 1 1 140px; }
}

/* ================= celular com cara de app iOS ================= */
.abas, .folha { display: none; }
@media (max-width: 860px) {
  :root { --ios: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif; --iosd: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif; }
  body { font-family: var(--ios); background: var(--bg); -webkit-tap-highlight-color: transparent; }
  h1, h2, h3, .big, .v, .bv, .rs-cols b, .rs-tile b, .rs-centro b { font-family: var(--iosd) !important; }
  .side { display: none !important; }
  .topbar { background: var(--bg); border: 0; padding-top: calc(10px + env(safe-area-inset-top, 0px)) !important; }
  .topbar .title small { display: none; }
  .topbar h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
  .content { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important; }
  .card, .k, .bt { border-radius: 16px !important; border-color: transparent !important; box-shadow: 0 1px 2px rgba(20, 16, 20, .05), 0 8px 24px -20px rgba(143, 22, 80, .35) !important; }
  .sair { display: none; }
  /* barra de abas */
  .abas { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 248, 251, .99); border-top: .5px solid var(--line); }
  .abas a, .abas button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; min-height: 48px; color: #9b8c94; text-decoration: none; font: 600 10.5px var(--ios); background: none; border: 0; }
  .abas svg { width: 25px; height: 25px; }
  .abas [aria-current="page"] { color: var(--pink); }
  /* folha que sobe (configurar, mais, Vanessa) */
  .folha { display: block; position: fixed; inset: 0; z-index: 150; }
  .folha[hidden] { display: none !important; }
  .fo-bg { position: absolute; inset: 0; background: rgba(20, 16, 20, .38); animation: foF .2s ease; }
  .fo-sh { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); animation: foS .28s cubic-bezier(.2, .8, .2, 1); }
  .fo-gr { width: 38px; height: 5px; border-radius: 3px; background: #d8c8d0; margin: 8px auto 2px; }
  .fo-hd { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 16px 12px; }
  .fo-hd b { font: 600 17px var(--ios); }
  .fo-hd button { justify-self: start; background: none; border: 0; color: var(--pink); font: 400 17px var(--ios); padding: 6px 0; min-height: 44px; }
  .fo-hd .fo-ok { justify-self: end; font-weight: 600; }
  .fo-bd { overflow-y: auto; padding: 0 16px 24px; -webkit-overflow-scrolling: touch; }
  @keyframes foS { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes foF { from { opacity: 0; } to { opacity: 1; } }
  .cf-gr { margin: 18px 4px 6px; font: 400 13px var(--ios); color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
  .cf-l, .mais-grupo { background: var(--panel); border-radius: 12px; overflow: hidden; }
  .cf-it { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 58px; border-bottom: .5px solid var(--line); }
  .cf-it:last-child { border-bottom: 0; }
  .cf-mv { display: flex; flex-direction: column; gap: 2px; }
  .cf-mv button { background: none; border: 0; color: #b9a3ae; font-size: 11px; padding: 2px 6px; min-height: 20px; }
  .cf-mv button:disabled { opacity: .3; }
  .cf-tx { flex: 1; min-width: 0; }
  .cf-tx b { display: block; font: 400 16px var(--ios); }
  .cf-tx small { color: var(--muted); font-size: 13px; }
  .cf-sw { flex: none; width: 51px; height: 31px; border-radius: 99px; border: 0; background: #e5dbe0; position: relative; transition: background .2s; }
  .cf-sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .22); transition: transform .2s; }
  .cf-sw[aria-checked="true"] { background: var(--pink); }
  .cf-sw[aria-checked="true"]::after { transform: translateX(20px); }
  .mais-it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; min-height: 50px; background: var(--panel); border: 0; border-bottom: .5px solid var(--line); color: var(--ink); text-decoration: none; font: 400 16px var(--ios); text-align: left; }
  .mais-it svg { width: 22px; height: 22px; color: var(--pink); flex: none; }
  .mais-it span { flex: 1; }
  .mais-it em { color: #c4b4bc; font-style: normal; font-size: 20px; }
  .mais-it.sair-it span { color: #D93A3A; }
  .cf-gr + .mais-it { border-radius: 12px 12px 0 0; }
}
/* ---------- resumo ---------- */
.rs { max-width: 560px; margin: 0 auto; }
.rs-mes { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 0 12px; }
.rs-mes b { font: 700 18px var(--display); min-width: 170px; text-align: center; }
.rs-mes button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--panel); color: var(--pink); font-size: 24px; line-height: 1; box-shadow: 0 1px 2px rgba(20,16,20,.06); }
.rs-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.rs-chips::-webkit-scrollbar { display: none; }
.rs-chips button { flex: none; min-height: 34px; padding: 6px 14px; border-radius: 99px; border: 0; background: var(--panel); color: var(--muted); font: 600 13.5px var(--text); }
.rs-chips button[aria-pressed="true"] { background: var(--pink); color: #fff; }
.rs-tl { background: linear-gradient(160deg, #ff4d9d 0%, var(--pink) 38%, var(--pink-3) 100%); color: #fff; border-radius: 20px; padding: 18px 14px 16px; box-shadow: 0 20px 36px -24px rgba(143, 22, 80, .9); }
.rs-line { position: relative; height: 24px; margin: 0 26px 10px; display: flex; justify-content: space-between; }
.rs-line::before { content: ""; position: absolute; left: 0; right: 50%; top: 11px; height: 3px; background: #fff; border-radius: 3px; }
.rs-line::after { content: ""; position: absolute; left: 50%; right: 0; top: 11px; border-top: 3px dotted rgba(255, 255, 255, .5); }
.rs-line span { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 12px; }
.rs-line span.on { background: #fff; color: var(--pink); box-shadow: 0 0 0 6px rgba(255, 255, 255, .22); }
.rs-cols { display: grid; grid-template-columns: 1fr 1.25fr 1fr; text-align: center; }
.rs-cols > div { min-width: 0; }
.rs-cols b { display: block; font: 700 15px var(--display); }
.rs-cols .meio b { font-size: 21px; }
.rs-cols small { font-size: 11.5px; opacity: .82; }
.rs-ask { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; min-height: 52px; background: var(--panel); border: 0; border-radius: 16px; color: var(--muted); font: 400 15.5px var(--text); text-align: left; box-shadow: 0 1px 2px rgba(20,16,20,.05); }
.rs-ask span { width: 30px; height: 30px; flex: none; border-radius: 9px; background: linear-gradient(135deg, var(--pink), var(--gold)); color: #fff; display: grid; place-items: center; font: 800 14px var(--display); }
.rs-ask em { margin-left: auto; color: var(--gold); font-style: normal; font-size: 18px; }
.rs-card { background: var(--panel); border-radius: 16px; padding: 16px; margin-top: 12px; box-shadow: 0 1px 2px rgba(20, 16, 20, .05), 0 8px 24px -20px rgba(143, 22, 80, .35); }
.rs-ct { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.rs-ct h3 { font-size: 17px; font-weight: 700; margin: 0; }
.rs-ct small { color: var(--muted); font-size: 12.5px; }
.rs-tbl { background: var(--bg); border-radius: 12px; padding: 8px 12px; margin-top: 10px; font-size: 13.5px; }
.rs-tbl .r { display: grid; grid-template-columns: 1.15fr 1fr .8fr; padding: 6px 0; align-items: center; }
.rs-tbl .r > :not(:first-child) { text-align: right; }
.rs-tbl .h { color: var(--muted); font-size: 12px; }
.rs-tbl i, .rs-leg i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.rs-nota { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.rs-sec { font: 700 17px var(--display); margin: 20px 2px 10px; }
.rs-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs-tile { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 16px; padding: 12px; min-width: 0; box-shadow: 0 1px 2px rgba(20, 16, 20, .05); }
.rs-tile > div { min-width: 0; }
.rs-tile i { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; font-size: 13px; }
.rs-tile b { display: block; font: 700 15.5px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-tile small { color: var(--muted); font-size: 12px; }
.rs-gauge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px; align-items: center; }
.rs-centro { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.rs-centro b { display: block; font: 800 17px var(--display); }
.rs-centro small { color: var(--muted); font-size: 12px; }
.rs-gk { display: flex; gap: 10px; align-items: center; margin: 7px 0; }
.rs-gk > div { min-width: 0; }
.rs-gk i { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12px; background: var(--soft); color: var(--pink); }
.rs-gk i.g { background: rgba(31, 138, 91, .12); color: var(--up); } .rs-gk i.r { background: rgba(217, 58, 58, .12); color: #D93A3A; }
.rs-gk small { display: block; color: var(--muted); font-size: 12px; }
.rs-gk b { font: 700 15.5px var(--display); } .rs-gk b.g { color: var(--up); } .rs-gk b.r { color: #D93A3A; }
.rs-leg { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-top: 9px; }
.rs-leg em { color: var(--muted); font-style: normal; font-weight: 500; }
.rs-prog { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; margin: 6px 0 4px; }
.rs-prog i { display: block; height: 100%; border-radius: 99px; }
.rs-dual { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--pink); }
.rs-dual span:last-child { color: var(--goldtx); }
.rs-vazio { text-align: center; color: var(--muted); padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rs-vazio span { width: 60px; height: 60px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 26px; color: var(--pink); margin-bottom: 6px; }
.rs-vazio b { color: var(--ink); font-weight: 600; }
.rs-vazio small { font-size: 12.5px; }
.rs-cfg { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 22px auto 8px; background: none; border: 0; color: var(--muted); font: 400 14px var(--text); min-height: 44px; }
.rs-cfg span { font-size: 24px; color: var(--pink); }
.rs .ch { height: 190px; } .rs .ch.sm { height: 140px; }
.rs-gauge .ch { height: 150px !important; }

/* ================= linha "carteira" (referência aprovada) ================= */
.wl-top { margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top, 0px)) 22px 64px; color: #fff; border-radius: 0 0 28px 28px; background: linear-gradient(180deg, #F0469A, var(--pink) 55%, #A81A5E); }
.wl-hd { display: flex; align-items: center; justify-content: space-between; }
.wl-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--pink-3); background: linear-gradient(135deg, #ffe3f0, #f3b6d2); border: 2px solid rgba(255,255,255,.5); }
.wl-ib { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; }
.wl-ib svg { width: 20px; height: 20px; }
.rs-mes.wl-mes { margin: 0; gap: 6px; }
.rs-mes.wl-mes b { color: #fff; font-size: 15px; min-width: 0; padding: 0 4px; }
.rs-mes.wl-mes button { width: 32px; height: 32px; background: rgba(255,255,255,.16); color: #fff; box-shadow: none; display: grid; place-items: center; }
.rs-mes button svg { width: 18px; height: 18px; }
.rs-mes button { display: grid; place-items: center; }
.wl-bal { text-align: center; margin-top: 18px; }
.wl-bal small { font-size: 13px; opacity: .82; }
.wl-bal b { display: block; font: 800 34px var(--display); letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.wl-vr { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.16); padding: 5px 11px; border-radius: 99px; }
.wl-vr svg { width: 13px; height: 13px; color: #9DF5C9; } .wl-vr.neg svg { color: #FFC2C6; }
.wl-acts { position: relative; margin: -44px 6px 0; background: var(--panel); border-radius: 20px; padding: 14px 6px; display: grid; grid-template-columns: repeat(4, 1fr); box-shadow: 0 14px 30px -18px rgba(143,22,80,.4); }
.wl-acts a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 600; min-height: 48px; }
.wl-acts svg { width: 24px; height: 24px; color: var(--pink); }
.wl-chips { margin-top: 14px !important; }
.wl-sec { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 2px 12px; }
.wl-sec b { font-size: 15.5px; font-weight: 700; }
.wl-sec a { color: var(--pink); font-size: 13px; font-weight: 600; cursor: pointer; }
.wl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.wl-grid > div { text-align: center; font-size: 11.5px; font-weight: 500; color: var(--ink); min-width: 0; }
.wl-grid i { font-style: normal; width: 54px; height: 50px; border-radius: 14px; background: var(--panel); display: grid; place-items: center; margin: 0 auto 7px; box-shadow: 0 6px 16px -10px rgba(143,22,80,.45); }
.wl-grid i b { font-size: 13px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wl-grid span { display: block; line-height: 1.25; }
.wl-promo { display: block; width: 100%; text-align: left; border: 0; border-radius: 20px; padding: 18px; color: #fff; position: relative; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, var(--pink), #3A0A22 72%); font-family: var(--text); }
.wl-promo b { display: block; font-size: 16.5px; line-height: 1.3; }
.wl-promo small { display: block; margin-top: 4px; opacity: .78; font-size: 12.5px; line-height: 1.45; }
.wl-promo::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.08); }
.es-l { color: var(--muted); font-size: 13px; }
.es-big { font: 800 30px var(--display); letter-spacing: -.02em; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.es-lg { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.es-lg i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.es-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.es-k { border-radius: 18px; padding: 14px; color: #fff; min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; }
.es-k.dark { background: #1A1216; } .es-k.rosa { background: linear-gradient(135deg, var(--pink), var(--pink-3)); }
.es-k svg { width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: #fff; color: #1A1216; }
.es-k.rosa svg { color: var(--pink); }
.es-k small { display: block; opacity: .75; font-size: 11.5px; margin-bottom: 2px; }
.es-k b { font-size: 17px; font-weight: 800; }
.fc { text-align: left; }
.fc-ok { display: grid; place-items: center; margin: 4px 0 10px; }
.fc-ok i { width: 60px; height: 60px; border-radius: 50%; background: rgba(31,138,91,.14); display: grid; place-items: center; }
.fc-ok svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--up); color: #fff; }
.fc-t { text-align: center; font-weight: 700; font-size: 16px; }
.fc-s { text-align: center; color: var(--muted); font-size: 12.5px; margin: 3px 0 8px; }
.fc-lr { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fc-lr span { color: var(--muted); } .fc-lr b { font-weight: 700; font-variant-numeric: tabular-nums; }
.fc-up { color: var(--up); } .fc-dn { color: #D93A3A; }
.fc-un { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-top: 10px; }
.fc-un i { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; font-size: 13px; }
.fc-un > div { flex: 1; min-width: 0; } .fc-un div b { display: block; font-size: 14px; } .fc-un small { color: var(--muted); font-size: 12px; }
.fc-btn { display: block; text-align: center; margin: 18px 0 8px; padding: 16px; border-radius: 16px; color: #fff; font-weight: 700; text-decoration: none; background: linear-gradient(90deg, #F0469A, var(--pink)); box-shadow: 0 12px 22px -12px rgba(224,38,125,.85); }
@media (max-width: 860px) {
  body[data-view="resumo"] .topbar { display: none; }
  body[data-view="resumo"] .content { padding-top: 0 !important; }
  body[data-view="resumo"] #parcial { display: none !important; }
  .abas { background: var(--panel); border-top: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px -22px rgba(143,22,80,.4); padding-top: 8px; }
  .abas svg { width: 24px; height: 24px; }
  .aba-v { flex: none !important; width: 58px; height: 58px; min-height: 58px !important; margin-top: -30px; border-radius: 50%; border: 5px solid var(--bg) !important; background: linear-gradient(135deg, #F0469A, var(--pink-3)) !important; display: grid !important; place-items: center; box-shadow: 0 12px 22px -8px rgba(224,38,125,.7); padding: 0 !important; }
  .aba-v b { color: #fff; font-size: 18px; font-weight: 800; }
}

/* ---------- Vanessa (personagem) ---------- */
.wl-van { padding: 0; overflow: visible; position: relative; background: #fff !important; }
.wl-van img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.7); }
.wl-van i { position: absolute; top: 1px; right: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid var(--pink); }
.wl-promo { padding-right: 122px; min-height: 132px; }
.wl-pose { position: absolute; right: 2px; bottom: -6px; height: 150px; width: auto; z-index: 1; pointer-events: none; }
.wl-promo b, .wl-promo small { position: relative; z-index: 2; }
.aba-v img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.aba-v { overflow: hidden; }
.van-f { display: flex; gap: 14px; align-items: flex-end; background: var(--panel); border-radius: 18px; padding: 14px 14px 0; overflow: hidden; }
.van-f img { width: 110px; height: auto; flex: none; }
.van-f b { display: block; font-size: 17px; margin-bottom: 6px; }
.van-f p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

.mark-img { padding: 0; object-fit: cover; background: none; box-shadow: 0 6px 16px -8px rgba(143,22,80,.7); }

/* ---------- computador: Início, Estatísticas e Fechamento em layout próprio ---------- */
@media (min-width: 861px) {
  .rs { max-width: 1240px; width: 100%; }
  body[data-view="resumo"] .content { padding-top: 22px !important; }
  /* Início: carteira à esquerda, indicadores e Vanessa à direita, blocos em grade embaixo */
  .rsd { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 22px; align-items: stretch; }
  .rsd-a { display: flex; flex-direction: column; }
  .rsd .wl-top { margin: 0; border-radius: 26px; padding: 22px 24px 76px; flex: 1; }
  .rsd .wl-bal { margin-top: 34px; }
  .rsd .wl-bal b { font-size: 40px; }
  .rsd .wl-acts { margin: -48px 16px 0; }
  .rsd-b { display: flex; flex-direction: column; min-width: 0; }
  .rsd-b .wl-chips { margin: 0 0 4px !important; padding: 0; }
  .rsd-b .wl-sec:first-of-type { margin-top: 10px; }
  .rsd .wl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .rsd .wl-grid > div { background: var(--panel); border-radius: 18px; padding: 14px 10px 12px; font-size: 12.5px; color: var(--muted); box-shadow: 0 1px 2px rgba(20,16,20,.05); }
  .rsd .wl-grid i { width: auto; height: auto; background: none; box-shadow: none; margin: 0 0 4px; }
  .rsd .wl-grid i b { font-size: 22px; }
  .rsd .wl-promo { margin-top: 0; min-height: 120px; padding-right: 170px; }
  .rsd .wl-pose { height: 168px; right: 18px; }
  .rsd-wg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; margin-top: 22px; }
  .rsd-wg > .rs-card { margin-top: 0; padding: 20px; }
  .rsd-wg .ch { height: 220px; }
  .rs-cfg { margin-top: 28px; }
  /* Estatísticas: gráfico grande à esquerda, cartões à direita */
  .esd { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .esd .es-big { font-size: 44px; }
  .esd-a .rs-card .ch { height: 380px; }
  .esd-b { padding-top: 0; }
  .esd-b .es-two { margin-top: 0; }
  .esd-b .es-k { min-height: 150px; padding: 18px; }
  .esd-b .es-k b { font-size: 22px; }
  /* Fechamento: recibo largo em duas colunas */
  #fcBody { max-width: 920px; }
  #fcBody .rs-mes { margin-bottom: 18px; }
  .rs-card.fc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; padding: 28px 32px; }
  .rs-card.fc > .fc-ok, .rs-card.fc > .fc-t, .rs-card.fc > .fc-s { grid-column: 1 / -1; }
  .rs-card.fc .fc-t { font-size: 22px; }
  .rs-card.fc .fc-lr { font-size: 15px; padding: 14px 0; }
  .rs-card.fc .fc-un { margin-top: 16px; }
  #fcBody .fc-btn { max-width: 360px; margin: 22px auto 8px; }
}
@media (min-width: 861px) and (max-width: 1180px) {
  .rsd { grid-template-columns: minmax(0, 1fr); }
  .rsd-wg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .esd { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Início no computador: painel próprio (não é o do celular) ---------- */
@media (min-width: 861px) {
  #rsBody { max-width: none; }
  .pc { display: flex; flex-direction: column; gap: 18px; }
  .pc-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
  .pc-mes { margin: 0; gap: 10px; justify-content: flex-start; }
  .pc-mes b { font-size: 22px; min-width: 0; padding: 0 4px; }
  .pc-mes button { width: 36px; height: 36px; font-size: 20px; }
  .pc-tag { font-size: 11.5px; font-weight: 700; color: var(--goldtx, #8A6A26); background: rgba(201,164,92,.16); border-radius: 99px; padding: 4px 10px; }
  .pc-bar .rs-chips { margin: 0; padding: 0; }
  .pc-ask { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 18px 4px 4px; border-radius: 99px; border: 0; background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,16,20,.06); cursor: pointer; }
  .pc-ask img { width: 36px; height: 36px; border-radius: 50%; }
  .pc-kpis { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr)); gap: 14px; }
  .pc-k { background: var(--panel); border-radius: 18px; padding: 16px 18px 0; display: flex; flex-direction: column; min-width: 0; box-shadow: 0 1px 2px rgba(20,16,20,.05); overflow: hidden; }
  .pc-k small { color: var(--muted); font-size: 13px; }
  .pc-k b { font: 800 26px var(--display); letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .pc-k.destaque { background: linear-gradient(150deg, var(--pink), var(--pink-3)); color: #fff; }
  .pc-k.destaque small, .pc-k.destaque .pc-dl, .pc-k.destaque .pc-dl em { color: rgba(255,255,255,.85); }
  .pc-k.destaque b { font-size: 32px; }
  .pc-dl { font-size: 12.5px; font-weight: 700; color: var(--muted); }
  .pc-dl em { font-style: normal; font-weight: 500; color: var(--muted); }
  .pc-dl.up { color: var(--up); } .pc-dl.dn { color: #D93A3A; }
  .pc-sp { height: 42px; margin: 8px -18px 0; }
  .pc-row { display: grid; gap: 18px; align-items: stretch; }
  .pc-row.r1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .pc-row.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pc-row.r4 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .pc-row.r4 > .rs-card { margin-top: 0; padding: 20px; }
  .pc-c { background: var(--panel); border-radius: 20px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(20,16,20,.05), 0 10px 30px -24px rgba(143,22,80,.35); min-width: 0; }
  .pc-c > header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
  .pc-c h3 { font-size: 17px; font-weight: 700; margin: 0; }
  .pc-c header small { color: var(--muted); font-size: 12.5px; }
  .pc-evo .ch { height: 320px; }
  .pc-van { background: #1A1216; color: #F7EEF2; display: flex; flex-direction: column; }
  .pc-van > header { justify-content: flex-start; align-items: center; }
  .pc-van > header img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--pink); }
  .pc-van header small { color: #B9A3AE; }
  .pc-van ol { margin: 4px 0 18px; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: l; }
  .pc-van li { position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.5; color: #E8DCE2; counter-increment: l; }
  .pc-van li::before { content: counter(l); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: rgba(224,38,125,.22); color: #FF8CC2; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
  .pc-van li b { color: #fff; }
  .pc-van > button { margin-top: auto; align-self: flex-start; border: 0; border-radius: 99px; padding: 11px 18px; background: var(--pink); color: #fff; font-weight: 700; cursor: pointer; }
  .pc-un { padding: 12px 0; border-top: 1px solid var(--line); }
  .pc-un:first-of-type { border-top: 0; padding-top: 0; }
  .pc-un-h { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
  .pc-un-h span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
  .pc-un-h i { width: 10px; height: 10px; border-radius: 50%; }
  .pc-un-h b { font-variant-numeric: tabular-nums; }
  .pc-un .rs-prog { margin: 8px 0 6px; }
  .pc-un-d { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
  .pc-cli { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
  .pc-cli .ch { height: 150px; }
  .pc-lst { display: grid; }
  .pc-lst > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .pc-lst > div:first-child { border-top: 0; }
  .pc-lst span { color: var(--muted); display: flex; align-items: center; gap: 8px; }
  .pc-lst span i { width: 9px; height: 9px; border-radius: 50%; }
  .pc-lst b { font-variant-numeric: tabular-nums; text-align: right; }
  .pc-lst em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--muted); }
  .pc-lst em:empty { display: none; }
  .pc-lst.big b { font: 800 19px var(--display); }
}
@media (min-width: 861px) and (max-width: 1280px) {
  .pc-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pc-k.destaque { grid-column: span 4; }
  .pc-row.r1 { grid-template-columns: minmax(0, 1fr); }
  .pc-row.r3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* logo = rosto da Vanessa */
.mark-img { border-radius: 50% !important; object-fit: cover; }

@media (min-width: 861px) {
  .pc-van li { padding-left: 0; counter-increment: none; }
  .pc-van li::before { content: none; display: none; }
  .pc-lst span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pc-lst > div { font-size: 13.5px; }
  .pc-row.r4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 861px) and (max-width: 1280px) { .pc-row.r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- sistema coerente no computador: mesmo acabamento em todas as telas ---------- */
[hidden] { display: none !important; }
@media (min-width: 861px) {
  .content { max-width: 1680px; }
  /* no Mês, o próprio painel escolhe mês e unidade: os filtros de cima só repetiriam */
  body[data-view="resumo"] .topbar .f:has(#fUnidade), body[data-view="resumo"] .topbar .f:has(#fComp),
  body[data-view="resumo"] .topbar .f:has(#fPreset), body[data-view="resumo"] .topbar .f:has(#fDe), body[data-view="resumo"] .topbar .f:has(#fAte) { display: none; }
  body[data-view="resumo"] .topbar { display: flex; }
}

/* ---------- Equipe ---------- */
.eq { max-width: none !important; display: flex; flex-direction: column; gap: 16px; }
.eq .pc-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.eq .pc-kpis.eq-k { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.eq .pc-k { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; min-width: 0; }
.eq .pc-k small { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.eq .pc-k b { font: 700 24px var(--display); letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eq .pc-k.destaque { box-shadow: inset 0 3px 0 var(--pink); }
.eq .pc-c { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.eq .pc-c > header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.eq .pc-c h3 { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.eq .pc-c header small { color: var(--muted); font-size: 12.5px; }
.eq-t td, .eq-t th { padding: 10px 10px; }
.eq-t tbody tr:hover td { background: var(--bg); }
.eq-n { display: inline-block; width: 22px; color: var(--muted); font-size: 12px; }
.eq-b { width: 120px; min-width: 80px; }
.eq-b i { display: block; height: 6px; border-radius: 3px; background: var(--pink); margin-left: auto; }
.eq-s { color: var(--muted); }
.eq-sp { display: block; margin-left: auto; }
.eq .pc-dl { font-size: 12.5px; font-weight: 700; color: var(--muted); } .eq .pc-dl.up { color: var(--up); } .eq .pc-dl.dn { color: #D93A3A; }
.eq .pc-row { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eq .pc-lst > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.eq .pc-lst > div:first-child { border-top: 0; }
.eq .pc-lst span { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq .pc-lst em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--muted); }
.eq .pc-lst.big b { font: 700 18px var(--display); }
.eq .pc-tag { font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; }
.eq .pc-at { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.pc-c header small a { color: var(--pink); font-weight: 600; text-decoration: none; }
@media (max-width: 860px) {
  .eq .pc-kpis.eq-k { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eq .pc-row { grid-template-columns: minmax(0, 1fr); }
  .eq .pc-mes b { font-size: 17px; min-width: 0; }
  .eq-b { display: none; }
}
.brand b { font-size: 15.5px; letter-spacing: 0; }
.eq > * { min-width: 0; max-width: 100%; }

.eq-p { position: relative; min-width: 110px; }
.eq-p i { position: absolute; left: 10px; bottom: 4px; height: 3px; border-radius: 2px; background: var(--pink); max-width: calc(100% - 20px); }
.eq-s { width: 100px; padding-right: 4px !important; }
@media (max-width: 860px) { .eq .tw { max-width: calc(100vw - 74px); } }
@media (min-width: 861px) {
  body[data-view="equipe"] .topbar .f:has(#fComp), body[data-view="equipe"] .topbar .f:has(#fPreset),
  body[data-view="equipe"] .topbar .f:has(#fDe), body[data-view="equipe"] .topbar .f:has(#fAte) { display: none; }
}

/* ---------- modelo com volume: degradê, sombra e destaque (pedido do dono) ---------- */
@media (min-width: 861px) {
  .card, .k, .pc-c, .pc-k { border-radius: 18px; box-shadow: 0 1px 2px rgba(20,16,20,.05), 0 18px 40px -28px rgba(143,22,80,.45); }
  .pc-k.destaque { background: linear-gradient(140deg, #F0469A 0%, var(--pink) 45%, var(--pink-3) 100%); color: #fff; box-shadow: 0 22px 40px -22px rgba(224,38,125,.85); }
  .pc-k.destaque small, .pc-k.destaque .pc-dl, .pc-k.destaque .pc-dl em { color: rgba(255,255,255,.88) !important; }
  .pc-k.destaque b { font-size: 32px; }
  .pc-at { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
  .pc-at i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 4px rgba(31,138,91,.15); }
  .pc-ask { margin-left: 0; }
  .lg-b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(180deg, var(--pink), #F6A9CC); margin-left: 8px; }
  .lg-l { display: inline-block; width: 16px; border-top: 3px solid var(--gold); border-radius: 2px; margin-left: 10px; }
  .pc-c header small { display: inline-flex; align-items: center; gap: 6px; }
  .pc-van { background: radial-gradient(120% 90% at 100% 0%, #6B1040 0%, #2A0F1D 55%, #1A1216 100%); color: #F7EEF2; }
  .pc-van h3 { color: #fff; }
  .pc-van ul { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; gap: 0; }
  .pc-van ul li { padding: 11px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 14.5px; line-height: 1.5; color: #E8DCE2; }
  .pc-van ul li:first-child { border-top: 0; padding-top: 0; }
  .pc-van ul li::before { content: none; }
  .eq .pc-k.destaque { background: linear-gradient(140deg, #F0469A 0%, var(--pink) 45%, var(--pink-3) 100%); color: #fff; box-shadow: 0 22px 40px -22px rgba(224,38,125,.85); }
  .eq .pc-k.destaque small { color: rgba(255,255,255,.88); }
  .eq .pc-c, .eq .pc-k { border-radius: 18px; box-shadow: 0 1px 2px rgba(20,16,20,.05), 0 18px 40px -28px rgba(143,22,80,.45); }
}

/* ---------- menu por setor, abas do setor e Vanessa no topo ---------- */
.nav { gap: 2px; }
.subabas { display: flex; gap: 6px; flex-wrap: wrap; }
.subabas a { padding: 8px 16px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; background: var(--panel); border: 1px solid var(--line); }
.subabas a[aria-current="page"] { background: var(--pink); border-color: var(--pink); color: #fff; box-shadow: 0 10px 18px -10px rgba(224,38,125,.8); }
.vbar { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 6px 6px 6px 8px; box-shadow: 0 1px 2px rgba(20,16,20,.05), 0 18px 40px -28px rgba(143,22,80,.45); }
.vbar img { width: 38px; height: 38px; border-radius: 50%; flex: none; }
.vbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; color: var(--ink); padding: 8px 4px; }
.vbar input::placeholder { color: var(--muted); }
.vbar button { flex: none; border: 0; border-radius: 99px; padding: 10px 20px; min-height: 40px; background: linear-gradient(135deg, #F0469A, var(--pink)); color: #fff; font-weight: 700; cursor: pointer; }
.vc { position: fixed; z-index: 80; right: 20px; bottom: 20px; width: 420px; max-width: calc(100vw - 24px); height: min(680px, calc(100vh - 40px)); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(40,10,25,.55); display: none; flex-direction: column; overflow: hidden; }
.vc.on { display: flex; }
.vc-hd { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: linear-gradient(135deg, var(--pink), var(--pink-3)); color: #fff; }
.vc-hd img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); }
.vc-hd div { flex: 1; min-width: 0; } .vc-hd b { display: block; font-size: 16px; } .vc-hd small { opacity: .85; font-size: 12px; }
.vc-hd button { border: 0; background: rgba(255,255,255,.18); color: #fff; border-radius: 99px; min-width: 36px; min-height: 36px; padding: 0 12px; font-weight: 600; cursor: pointer; font-size: 13px; }
.vc-hd #vanX { font-size: 20px; padding: 0; }
.vc-ms { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.vc-m { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; font-size: 14.5px; line-height: 1.5; }
.vc-m img { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.vc-m > div { padding: 10px 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; overflow-wrap: anywhere; }
.vc-m.eu { align-self: flex-end; }
.vc-m.eu > div { background: var(--pink); border-color: var(--pink); color: #fff; border-radius: 18px; border-bottom-right-radius: 6px; }
.vc-dig { display: flex; gap: 5px; align-items: center; min-height: 22px; }
.vc-dig i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; animation: vcp 1s ease-in-out 3; }
.vc-dig i:nth-child(2) { animation-delay: .15s; } .vc-dig i:nth-child(3) { animation-delay: .3s; }
@keyframes vcp { 50% { opacity: 1; transform: translateY(-3px); } }
.vc-oi { margin: auto; text-align: center; padding: 10px; }
.vc-oi img { height: 150px; width: auto; } .vc-oi b { display: block; font-size: 18px; margin-top: 6px; } .vc-oi p { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.vc-sug { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.vc-sug button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 99px; padding: 8px 14px; font-size: 13px; cursor: pointer; min-height: 36px; }
.vc-f { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); background: var(--panel); }
.vc-f textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 18px; padding: 11px 14px; font: inherit; font-size: 15px; background: var(--bg); color: var(--ink); outline: 0; max-height: 120px; }
.vc-f button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--pink); color: #fff; font-size: 20px; font-weight: 800; cursor: pointer; flex: none; }
.mt-b { position: relative; height: 10px; border-radius: 5px; background: var(--soft, #FCEAF2); overflow: visible; }
.mt-b i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #F6A9CC, var(--pink)); }
.mt-b u { position: absolute; top: -4px; width: 3px; height: 18px; border-radius: 2px; background: var(--ink); transform: translateX(-1px); }
@media (max-width: 860px) {
  .vbar { display: none; }
  .vc { right: 0; left: 0; bottom: 0; top: 0; width: auto; max-width: none; height: auto; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .subabas { overflow-x: auto; flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; } .subabas a { flex: none; }
  body[data-view="resumo"] .subabas, body[data-view="estat"] .subabas, body[data-view="fecha"] .subabas { display: none; }
}
@media (min-width: 861px) {
  body[data-view="metas"] .topbar .f:has(#fComp), body[data-view="metas"] .topbar .f:has(#fPreset), body[data-view="metas"] .topbar .f:has(#fDe), body[data-view="metas"] .topbar .f:has(#fAte),
  body[data-view="financeiro"] .topbar .f:has(#fComp), body[data-view="financeiro"] .topbar .f:has(#fPreset), body[data-view="financeiro"] .topbar .f:has(#fDe), body[data-view="financeiro"] .topbar .f:has(#fAte), body[data-view="financeiro"] .topbar .f:has(#fUnidade),
  body[data-view="contabil"] .topbar .f, body[data-view="juridico"] .topbar .f { display: none; }
}
@media (max-width: 860px) { .eq .pc-kpis.eq-k, .eq .pc-row { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; } .eq .pc-kpis.eq-k { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* ---------- ao vivo ---------- */
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #35D07F; box-shadow: 0 0 0 4px rgba(53,208,127,.25); animation: livep 1.6s ease-in-out 5; }
@keyframes livep { 50% { box-shadow: 0 0 0 7px rgba(53,208,127,0); } }
.wl-live { display: flex; justify-content: center; color: #fff; background: rgba(255,255,255,.16); border-radius: 99px; padding: 5px 12px; width: fit-content; margin: 0 auto 8px; }
.wl-agora { margin-top: 10px; font-size: 12.5px; opacity: .92; line-height: 1.45; }
.pc-live { color: var(--up); margin-right: 4px; }
.pc-at em { font-style: normal; }
.pc-at i { display: none; } .pc-at .live i { display: inline-block; }

/* ---------- Financeiro: saídas ---------- */
.eq .pc-k.bom b { color: var(--up); } .eq .pc-k.ruim b { color: #D93A3A; }
.eq .pc-lst span i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.fi-cat { display: grid; gap: 10px; }
.fi-cat > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13.5px; }
.fi-cat span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.fi-cat b { font-variant-numeric: tabular-nums; }
.fi-cat i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--soft, #FCEAF2); display: block; }
.fi-cat u { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #F6A9CC, var(--pink)); }
@media (min-width: 861px) { body[data-view="financeiro"] .topbar .f:has(#fUnidade) { display: block; } }

/* ---------- fluxo do mês com saídas por grupo ---------- */
.rs-tbl .r.sub { padding: 3px 0 3px 16px; font-size: 12.5px; color: var(--muted); }
.rs-nota a { color: var(--pink); font-weight: 600; text-decoration: none; }
@media (min-width: 861px) {
  .pc-kpis:has(> :nth-child(6)) { grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); }
  .pc-k.bom b { color: var(--up); } .pc-k.ruim b { color: #D93A3A; }
  .pc-row.r3 > .rs-card { margin-top: 0; padding: 20px; border-radius: 18px; }
  .pc-kpis:has(> :nth-child(6)) .pc-k b { font-size: 22px; } .pc-kpis:has(> :nth-child(6)) .pc-k.destaque b { font-size: 27px; }
}
@media (min-width: 861px) and (max-width: 1280px) { .pc-kpis:has(> :nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pc-kpis:has(> :nth-child(6)) .pc-k.destaque { grid-column: span 3; } }

/* ---------- celular: listas em cartões no lugar de tabelas ---------- */
.eq-cards { display: grid; gap: 10px; }
.eq-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg); }
.eq-c1 { display: flex; align-items: baseline; gap: 6px; }
.eq-c1 b { flex: 1; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-c1 strong { font: 800 15.5px var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eq-c2 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.eq-c2 > span:first-child { min-width: 0; }
.eq-pbar { height: 6px; border-radius: 3px; background: var(--soft, #FCEAF2); margin-top: 8px; }
.eq-pbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #F6A9CC, var(--pink)); }
.eq-card .mt-b { margin-top: 10px; }
@media (max-width: 860px) {
  .eq .pc-bar { gap: 8px; }
  .eq .pc-mes b { font-size: 18px; white-space: nowrap; }
  .eq .pc-tag { display: none; }
  .eq .pc-at { margin-left: 0; width: 100%; font-size: 12px; }
  .eq .pc-k b { font-size: 20px; }
  .eq .pc-kpis.eq-k > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .eq .pc-c { padding: 16px; border-radius: 16px; }
  .eq .pc-c > header small { width: 100%; }
}
@media (max-width: 860px) {
  .eq { overflow: hidden; }
  .eq .pc-at { display: block; white-space: normal; overflow-wrap: anywhere; }
  .eq .pc-bar { max-width: 100%; }
}
@media (max-width: 860px) {
  .view, .view > .eq, .view > .rs { min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
  .eq .pc-kpis, .eq .pc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .eq .pc-row { grid-template-columns: minmax(0, 1fr); }
  .eq .pc-c, .eq .pc-k { min-width: 0; }
}
.eq-cards { grid-template-columns: minmax(0, 1fr); }
.eq-card { min-width: 0; }
.eq-c2 > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Estatísticas: alternador dos dois cruzamentos, e "Escolher atalhos" no Início */
.es-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--panel); border-radius: 16px; padding: 5px; margin: 0 0 14px; box-shadow: 0 1px 2px rgba(20,16,20,.05); }
.es-seg button { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: 700 13.5px var(--text); padding: 6px 8px; }
.es-seg button[aria-pressed="true"] { background: linear-gradient(135deg, var(--pink), var(--pink-3)); color: #fff; }
.wl-acts a span { text-align: center; line-height: 1.2; }
.wl-esc { display: block; margin: 8px auto 0; min-height: 36px; border: 0; background: transparent; color: var(--pink); font: 600 12.5px var(--text); }
.at-it { width: 100%; }
.at-it svg { width: 22px; height: 22px; color: var(--pink); flex: none; }
.at-it em { min-width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12.5px; font-weight: 700; }
.at-it[aria-pressed="true"] em { background: var(--pink); color: #fff; }
.es-porta { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; margin-top: 10px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.es-porta > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.es-porta b { font: 700 16px var(--display); }
.es-porta span { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.es-porta strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.es-porta em { font-style: normal; font-size: 24px; color: var(--pink); }

/* ===== formas de gráfico: minigráfico, barra dividida, cascata, etapas e calendário ===== */
.spk { display: block; width: 100%; height: 30px; margin-top: auto; padding-top: 8px; }
.pc-k .spk { margin: 8px -4px 0; width: calc(100% + 8px); }
.sgb { display: flex; gap: 2px; height: 28px; margin: 4px 0 12px; }
.sgb i { min-width: 3px; border-radius: 4px; display: flex; align-items: center; padding-left: 8px; font: 700 12px var(--text); font-style: normal; overflow: hidden; white-space: nowrap; }
.csc { display: grid; gap: 8px; margin: 4px 0 14px; }
.csc-r { display: grid; grid-template-columns: minmax(84px, 30%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.csc-r > span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csc-r > b { font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.csc-t { position: relative; height: 18px; }
.csc-t u { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--line); }
.csc-t i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: #E58B8B; }
.csc-r.up .csc-t i { background: var(--up); }
.csc-r.fim .csc-t i { background: var(--pink); }
.csc-r.neg .csc-t i { background: #D93A3A; }
.csc-r.up > span, .csc-r.fim > span, .csc-r.neg > span { color: var(--ink); font-weight: 700; }
.csc-r.neg > b { color: #C22B2B; }
.etp { display: grid; }
.etp-s { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.etp-s i { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--pink-3)); color: #fff; display: grid; place-items: center; font: 700 13px var(--text); font-style: normal; }
.etp-s span { font-size: 14px; }
.etp-s b { font: 800 17px var(--display); font-variant-numeric: tabular-nums; }
.etp-e { margin-left: 14px; border-left: 2px solid var(--line); min-height: 22px; padding: 6px 0 6px 24px; }
.etp-e span { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 99px; padding: 3px 10px; }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h span { text-align: center; font-size: 11px; color: var(--muted); padding-bottom: 4px; }
.cal-d { aspect-ratio: 1; border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; justify-content: space-between; padding: 5px 6px; min-width: 0; }
.cal-d small { font-size: 10px; color: var(--muted); line-height: 1; }
.cal-d b { font: 700 14px var(--display); text-align: right; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-d.n1, .cal-l .n1 { background: color-mix(in srgb, var(--pink) 12%, var(--panel)); }
.cal-d.n2, .cal-l .n2 { background: color-mix(in srgb, var(--pink) 28%, var(--panel)); }
.cal-d.n3, .cal-l .n3 { background: color-mix(in srgb, var(--pink) 48%, var(--panel)); }
.cal-d.n4, .cal-l .n4 { background: color-mix(in srgb, var(--pink) 72%, var(--panel)); }
.cal-d.n5, .cal-l .n5 { background: var(--pink); }
.cal-d.n4, .cal-d.n5, .cal-d.n4 small, .cal-d.n5 small { color: #fff; }
.cal-d.hoje { outline: 2px solid var(--ink); outline-offset: 1px; }
.cal-l { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.cal-l i { width: 16px; height: 10px; border-radius: 3px; }
.cal-l em { flex-basis: 100%; font-style: normal; }
.ch-t { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
.ch-t i { width: 10px; height: 10px; border-radius: 3px; }

/* ===== botão +, formulário de lançamento, contas e relatório do profissional ===== */
.fab { position: fixed; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 95; width: 56px; height: 56px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--pink), var(--pink-3)); color: #fff; font: 300 34px/1 var(--text); box-shadow: 0 12px 24px -10px rgba(143, 22, 80, .7); cursor: pointer; }
@media (min-width: 861px) { .fab { bottom: 28px; right: 28px; }
  .folha { display: block; position: fixed; inset: 0; z-index: 200; }
  .folha[hidden] { display: none !important; }
  .fo-bg { position: absolute; inset: 0; background: rgba(20, 16, 20, .38); }
  .fo-sh { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); max-height: 86vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 18px; }
  .fo-gr { display: none; }
  .fo-hd { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 20px; }
  .fo-hd b { font: 700 17px var(--display); }
  .fo-hd button { justify-self: start; background: none; border: 0; color: var(--pink); font: 600 15px var(--text); min-height: 40px; cursor: pointer; }
  .fo-hd .fo-ok { justify-self: end; }
  .fo-bd { overflow-y: auto; padding: 0 20px 22px; }
  .mais-it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; min-height: 50px; background: var(--panel); border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: 400 15px var(--text); text-align: left; cursor: pointer; }
  .mais-it svg { width: 22px; height: 22px; color: var(--pink); flex: none; }
  .mais-it span { flex: 1; }
  .mais-it em { font-style: normal; color: var(--muted); font-size: 20px; }
}
.ln-op span b { display: block; font-weight: 600; }
.ln-op span small { color: var(--muted); font-size: 12.5px; }
.ln-f { display: grid; gap: 12px; }
.ln-c { display: grid; gap: 5px; }
.ln-c span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ln-c input, .ln-c select, .pf-com input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: 400 16px var(--text); padding: 0 14px; box-sizing: border-box; }
.ln-seg { margin: 0; }
.ln-erro { color: #C22B2B; font-size: 13.5px; margin: 0; }
.ln-ac { display: flex; gap: 8px; margin-top: 10px; }
.ln-ac button { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--pink); font: 600 13px var(--text); cursor: pointer; }
.ln-ac .apg { color: var(--muted); }
.toc { cursor: pointer; }
.pf-k { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-k > div { background: var(--panel); border-radius: 14px; padding: 12px 14px; }
.pf-k small { display: block; color: var(--muted); font-size: 12px; }
.pf-k b { font: 800 19px var(--display); }
.pf-t { font: 700 14px var(--display); margin: 20px 0 10px; }
.pf-com { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.pf-com label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.pf-com button { min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--pink); color: #fff; font: 700 14px var(--text); cursor: pointer; }
.fi-cat b em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; }
#folha .pc-lst > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
#folha .pc-lst span { color: var(--muted); }
#folha .pc-lst b { font: 800 17px var(--display); text-align: right; }
#folha .pc-lst em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--muted); }

/* fluxo do mês no celular: sobrou/faltou, entrou × saiu, para onde foi */
.fxc { display: grid; gap: 14px; margin: 4px 0 14px; }
.fxc-h small { display: block; color: var(--muted); font-size: 13px; }
.fxc-h strong { font-size: 30px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.fxc-h.up strong { color: var(--up); }
.fxc-h.neg strong { color: #C22B2B; }
.fxc-l > div { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; margin-bottom: 6px; }
.fxc-l span { color: var(--muted); }
.fxc-l b { font-variant-numeric: tabular-nums; }
.fxc-l > i { display: block; height: 14px; border-radius: 4px; background: var(--up); }
.fxc-l.dn > i { background: #E58B8B; }
.fxc-p { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.fxc-p small { color: var(--muted); font-size: 12px; }
.fxc-g { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.fxc-g span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxc-g em { display: block; height: 6px; border-radius: 3px; background: var(--soft); }
.fxc-g em i { display: block; height: 100%; border-radius: 3px; background: #E58B8B; }
.fxc-g b { font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
