/* =====================================================================
   SeuDin — sd-app.css: sistema visual do layout novo da área logada (App/)
   Gerado a partir do protótipo aprovado em 2026-09-08. Tokens em :root,
   tema escuro via prefers-color-scheme e [data-theme]. Sem Bootstrap, sem
   dependência da MasterPage antiga.
   ===================================================================== */
/* =====================================================================
   SeuDin — Nova Plataforma (protótipo navegável)
   Direção visual: "Sinais Vitais" — a metáfora médica do produto
   (Médico Financeiro, Check-up, Raio-X, Score) vira linguagem visual.
   ===================================================================== */

/* ---------- Tokens: tema claro (base) ---------- */
:root {
  --roxo: #820AD1;
  --roxo-2: #A23BEA;
  --roxo-3: #5B0794;
  --rosa: #F94777;
  --rosa-2: #FF7A9C;
  --azul: #3641ED;
  --azul-2: #6B74FF;

  --ok: #1FA971;
  --warn: #D99A12;
  --bad: #E2552F;
  --ok-soft: rgba(31,169,113,.14);
  --warn-soft: rgba(217,154,18,.16);
  --bad-soft: rgba(226,85,47,.14);

  --bg: #F6F4FB;
  --bg-2: #EFEBF8;
  --surface: #FFFFFF;
  --surface-2: #F4F1FA;
  --surface-3: #ECE7F6;
  --ink-panel: linear-gradient(135deg, #FFFFFF 0%, #F3EEFC 100%);  /* no tema claro o painel também é claro */
  --ink-panel-2: #EFE9F9;
  --on-ink: #17102E;
  --on-ink-muted: #6D6690;

  --text: #17102E;
  --text-2: #4E4768;
  --text-3: #7E7797;
  --border: #E5E0F1;
  --border-2: #D6CFEA;
  --ring: rgba(130,10,209,.35);

  --glow-roxo: 0 0 0 1px rgba(130,10,209,.18), 0 18px 48px -18px rgba(130,10,209,.55);
  --shadow-1: 0 1px 2px rgba(23,16,46,.06), 0 8px 24px -12px rgba(23,16,46,.18);
  --shadow-2: 0 2px 6px rgba(23,16,46,.08), 0 24px 60px -24px rgba(23,16,46,.28);
  --aurora-a: rgba(130,10,209,.32);
  --aurora-b: rgba(249,71,119,.26);
  --aurora-c: rgba(54,65,237,.28);
  --grid-line: rgba(23,16,46,.06);

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "DM Mono", "SFMono-Regular", Consolas, monospace;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --rail-w: 292px;
  --topbar-h: 68px;
  --tabbar-h: 72px;

  --ease-out: cubic-bezier(.2,.75,.2,1);
  --ease-spring: cubic-bezier(.34,1.4,.44,1);
  --t-fast: 160ms;
  --t-med: 280ms;
  --t-slow: 520ms;

  color-scheme: light;
}

/* ---------- Tokens: tema escuro ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0716;
    --bg-2: #100A22;
    --surface: #150D2B;
    --surface-2: #1C1339;
    --surface-3: #251A48;
    --ink-panel: #120B26;
    --ink-panel-2: #1C1239;
    --on-ink: #F5F1FD;
    --on-ink-muted: #A99FCB;
    --text: #F3EFFB;
    --text-2: #BDB4D8;
    --text-3: #8B82AA;
    --border: rgba(255,255,255,.08);
    --border-2: rgba(255,255,255,.14);
    --ring: rgba(162,59,234,.5);
    --ok: #2ED597; --warn: #F5B335; --bad: #FF7A55;
    --ok-soft: rgba(46,213,151,.14); --warn-soft: rgba(245,179,53,.16); --bad-soft: rgba(255,122,85,.16);
    --shadow-1: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px -14px rgba(0,0,0,.6);
    --shadow-2: 0 2px 8px rgba(0,0,0,.4), 0 30px 70px -30px rgba(0,0,0,.7);
    --glow-roxo: 0 0 0 1px rgba(162,59,234,.28), 0 18px 60px -16px rgba(130,10,209,.75);
    --aurora-a: rgba(130,10,209,.55);
    --aurora-b: rgba(249,71,119,.38);
    --aurora-c: rgba(54,65,237,.5);
    --grid-line: rgba(255,255,255,.06);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0716;
  --bg-2: #100A22;
  --surface: #150D2B;
  --surface-2: #1C1339;
  --surface-3: #251A48;
  --ink-panel: #120B26;
  --ink-panel-2: #1C1239;
  --on-ink: #F5F1FD;
  --on-ink-muted: #A99FCB;
  --text: #F3EFFB;
  --text-2: #BDB4D8;
  --text-3: #8B82AA;
  --border: rgba(255,255,255,.08);
  --border-2: rgba(255,255,255,.14);
  --ring: rgba(162,59,234,.5);
  --ok: #2ED597; --warn: #F5B335; --bad: #FF7A55;
  --ok-soft: rgba(46,213,151,.14); --warn-soft: rgba(245,179,53,.16); --bad-soft: rgba(255,122,85,.16);
  --shadow-1: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px -14px rgba(0,0,0,.6);
  --shadow-2: 0 2px 8px rgba(0,0,0,.4), 0 30px 70px -30px rgba(0,0,0,.7);
  --glow-roxo: 0 0 0 1px rgba(162,59,234,.28), 0 18px 60px -16px rgba(130,10,209,.75);
  --aurora-a: rgba(130,10,209,.55);
  --aurora-b: rgba(249,71,119,.38);
  --aurora-c: rgba(54,65,237,.5);
  --grid-line: rgba(255,255,255,.06);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; line-height: 1.08; }
h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; line-height: 1.15; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.25; }
h4 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--text-2); }
.muted-2 { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--roxo-2); outline-offset: 2px; border-radius: 6px; }

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "rail top" "rail main";
  height: 100dvh;
  background: var(--bg);
}
.rail {
  grid-area: rail;
  background: var(--ink-panel);
  color: var(--on-ink);
  display: flex; flex-direction: column;
  padding: 18px 14px;
  gap: 8px;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.rail::before {
  content: ""; position: absolute; inset: -40% -60% auto -30%; height: 60%;
  background: radial-gradient(60% 60% at 30% 40%, var(--aurora-a), transparent 70%),
              radial-gradient(40% 50% at 80% 20%, var(--aurora-c), transparent 70%);
  filter: blur(30px); opacity: .55; pointer-events: none;
}
.rail > * { position: relative; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand svg { width: 118px; height: auto; }
.brand svg .cls-1 { fill: var(--on-ink); }
.brand svg .cls-2 { fill: var(--rosa); }
.brand .tag { margin-left: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--r-pill); background: rgba(255,255,255,.08); color: var(--on-ink-muted); }
.rail-group { display: flex; flex-direction: column; gap: 2px; }
.rail-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); padding: 14px 12px 6px; }
.rail a {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; color: var(--on-ink-muted);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.rail a > span:not(.pill) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; letter-spacing: -.005em; }   /* item do menu sempre em uma linha */
.rail a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail a:hover { background: rgba(255,255,255,.06); color: var(--on-ink); transform: translateX(2px); }
.rail a.active { background: linear-gradient(90deg, rgba(130,10,209,.55), rgba(54,65,237,.35)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.rail a .pill { font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: var(--r-pill); background: var(--rosa); color: #fff; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
/* Card do usuário: a regra geral ".rail a" (grade 22px 1fr auto) é mais específica que ".rail-user" e punha a foto de 40 px numa
   coluna de 22 px, com o nome por cima. Aqui a grade tem a coluna da foto do tamanho dela. */
.rail a.rail-user { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.05); }
.rail a.rail-user .avatar { width: 40px; height: 40px; overflow: hidden; }
.rail a.rail-user .who { min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--roxo), var(--rosa)); flex: none; }
.rail-user .who { display: flex; flex-direction: column; line-height: 1.15; }
.rail-user .who b { font-weight: 600; font-size: 14px; color: var(--on-ink); }
.rail-user .who span { font-size: 12px; color: var(--on-ink-muted); }

.topbar {
  grid-area: top;
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  position: relative; z-index: 5;
}
.topbar .crumb { display: flex; align-items: baseline; gap: 10px; }
.topbar .crumb .mono { color: var(--text-3); }
.topbar .crumb h1 { font-size: 20px; }
.topbar .spacer { flex: 1; }
.month-pick { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); padding: 4px; }
.month-pick button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.month-pick button:hover { background: var(--surface-2); color: var(--text); }
.month-pick b { font-family: var(--font-display); font-weight: 600; font-size: 14px; padding: 0 8px; min-width: 130px; text-align: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); position: relative; transition: transform var(--t-fast), background var(--t-fast); }
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--rosa); box-shadow: 0 0 0 2px var(--surface); }


.main { grid-area: main; overflow: auto; overscroll-behavior: contain; position: relative; }
.page { padding: 28px 28px 120px; max-width: 1360px; margin: 0 auto; }


.tabbar { display: none; }
.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--roxo), var(--rosa));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 14px 40px -10px rgba(130,10,209,.7);
  transition: transform var(--t-med) var(--ease-spring);
}
.fab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fab:hover { transform: scale(1.06) rotate(-6deg); }
.fab::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--rosa); opacity: 0; animation: pulse-ring 2.4s ease-out infinite; }
@keyframes pulse-ring { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }

/* ---------- Motion primitives ---------- */
[data-reveal] { will-change: transform, opacity; }
[data-reveal].in { animation: rise var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
.page .stagger > * { animation: rise .55s var(--ease-out) both; }
.page .stagger > *:nth-child(1) { animation-delay: 40ms; }
.page .stagger > *:nth-child(2) { animation-delay: 90ms; }
.page .stagger > *:nth-child(3) { animation-delay: 140ms; }
.page .stagger > *:nth-child(4) { animation-delay: 190ms; }
.page .stagger > *:nth-child(5) { animation-delay: 240ms; }
.page .stagger > *:nth-child(6) { animation-delay: 290ms; }
.page .stagger > *:nth-child(7) { animation-delay: 340ms; }
.page .stagger > *:nth-child(8) { animation-delay: 390ms; }
.page .stagger > *:nth-child(n+9) { animation-delay: 440ms; }

/* ---------- Hero "monitor" (parallax) ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--ink-panel);
  color: var(--on-ink);
  padding: 30px 32px;
  min-height: 250px;
  box-shadow: var(--glow-roxo);
  isolation: isolate;
}
.hero .aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero .aurora i {
  position: absolute; border-radius: 50%; filter: blur(46px); opacity: .95;
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform .12s linear;
}
.hero .aurora i:nth-child(1) { width: 520px; height: 420px; left: -120px; top: -160px; background: var(--aurora-a); }
.hero .aurora i:nth-child(2) { width: 460px; height: 360px; right: -160px; top: -100px; background: var(--aurora-c); }
.hero .aurora i:nth-child(3) { width: 380px; height: 300px; right: 15%; bottom: -200px; background: var(--aurora-b); }
.hero .grid-bg { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(80% 90% at 60% 40%, #000 30%, transparent 100%); }
.hero > .hero-body { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; }
.hero .eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-muted); display: inline-flex; align-items: center; gap: 8px; }
.hero .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rosa); box-shadow: 0 0 12px var(--rosa); animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hero h1 { margin-top: 10px; color: var(--on-ink); }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--rosa-2), var(--roxo-2) 55%, var(--azul-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 12px; color: var(--on-ink-muted); max-width: 52ch; font-size: 16px; }
.hero .actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.vitals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vital { background: color-mix(in srgb, var(--on-ink) 6%, transparent); border: 1px solid color-mix(in srgb, var(--on-ink) 12%, transparent); border-radius: 16px; padding: 12px 14px; backdrop-filter: blur(8px); }
.vital .mono { color: var(--on-ink-muted); }
.vital b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-top: 4px; color: var(--on-ink); }
.vital small { color: var(--on-ink-muted); font-size: 12px; }
.vital.up b { color: var(--ok); } .vital.down b { color: var(--bad); }
/* O traçado fica numa faixa própria, abaixo do rótulo e do valor: nunca passa por cima deles. */
.ecg { grid-column: 1 / -1; height: 104px; border-radius: 16px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.ecg-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 14px 2px; }
.ecg svg { flex: 1 1 auto; width: 100%; min-height: 0; display: block; }
.ecg path { fill: none; stroke: var(--rosa-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(249,71,119,.8)); }
.ecg .traco { transform-box: view-box; transform-origin: 0 0; will-change: transform; }
.ecg .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecg .val { font-family: var(--font-display); font-weight: 700; color: var(--on-ink); font-size: 14px; white-space: nowrap; flex: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 14.5px; transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast), background var(--t-fast), filter var(--t-fast); white-space: nowrap; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--roxo) 0%, var(--rosa) 130%); color: #fff; box-shadow: 0 10px 28px -12px rgba(130,10,209,.8); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 14px 34px -12px rgba(130,10,209,.9); transform: translateY(-1px); }
.btn-ghost { background: color-mix(in srgb, var(--on-ink) 8%, transparent); color: var(--on-ink); border: 1px solid color-mix(in srgb, var(--on-ink) 18%, transparent); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-outline { border: 1px solid var(--border-2); color: var(--text); background: var(--surface); }
.btn-outline:hover { background: var(--surface-2); }
.btn-soft { background: color-mix(in srgb, var(--roxo) 12%, var(--surface)); color: var(--roxo); }
.btn-soft:hover { background: color-mix(in srgb, var(--roxo) 18%, var(--surface)); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---------- Layout helpers ---------- */
.section { margin-top: 28px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; }
.section-head .link { color: var(--roxo); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.section-head .link:hover { text-decoration: underline; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 20px; box-shadow: var(--shadow-1); position: relative;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--roxo) 12%, transparent); color: var(--roxo); }
.card-head .ico svg, .ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .more { color: var(--text-3); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.card .more svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* botao de acao com icone (renda e afins): sem isto o svg sai sem tamanho */
.tx-list .more svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tx-list .more:hover { background: var(--surface-2); color: var(--text); }
.tx-list .more[data-renda-excluir]:hover { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.tx-list .more[data-renda-editar]:hover { background: color-mix(in srgb, var(--roxo) 16%, transparent); color: var(--roxo); }
.card .more:hover { background: var(--surface-2); color: var(--text); }
.card-ink { background: var(--ink-panel); color: var(--on-ink); border-color: transparent; }
.card-ink .muted, .card-ink .muted-2 { color: var(--on-ink-muted); }
.card-grad { background: linear-gradient(135deg, var(--roxo) 0%, #5A19C9 45%, var(--azul) 100%); color: #fff; border-color: transparent; }
.card-grad .muted { color: rgba(255,255,255,.75); }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .mono { color: var(--text-3); }
.kpi .val { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.02em; line-height: 1.05; }
.kpi .val small { font-size: .55em; font-weight: 600; color: var(--text-3); margin-right: 4px; letter-spacing: 0; }
.kpi .delta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.kpi .delta.up { color: var(--ok); } .kpi .delta.down { color: var(--bad); } .kpi .delta.flat { color: var(--text-3); }
.kpi .delta .chip { padding: 2px 8px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
.delta.up .chip { background: var(--ok-soft); } .delta.down .chip { background: var(--bad-soft); } .delta.flat .chip { background: var(--surface-2); }
.spark { height: 46px; margin-top: 10px; }
.spark svg { width: 100%; height: 100%; overflow: visible; }
.spark .line { fill: none; stroke: var(--roxo-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .area { fill: url(#sparkFill); opacity: .9; }
.spark .end { fill: var(--rosa); stroke: var(--surface); stroke-width: 2.5; }

/* progress */
.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; position: relative; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--roxo), var(--rosa)); width: var(--w, 0%); transition: width 1.2s var(--ease-out); }
.progress.ok > i { background: linear-gradient(90deg, var(--ok), #7BE3B9); }
.progress.warn > i { background: linear-gradient(90deg, var(--warn), #FFD37A); }
.progress.bad > i { background: linear-gradient(90deg, var(--bad), #FF9A7A); }
.progress .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .5; left: var(--m, 80%); }
.progress-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 13.5px; }
.progress-row .progress { grid-column: 1 / -1; }

/* badges / chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.roxo { background: color-mix(in srgb, var(--roxo) 14%, transparent); color: var(--roxo); }
.chip.azul { background: color-mix(in srgb, var(--azul) 14%, transparent); color: var(--azul); }
.chip.rosa { background: color-mix(in srgb, var(--rosa) 14%, transparent); color: var(--rosa); }
.chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* quick actions (barra-acoes) */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 8px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); text-align: center; font-size: 13px; font-weight: 600; color: var(--text-2); transition: transform var(--t-fast) var(--ease-spring), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.quick a i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(145deg, color-mix(in srgb, var(--roxo) 16%, var(--surface)), color-mix(in srgb, var(--azul) 12%, var(--surface))); color: var(--roxo); transition: transform var(--t-med) var(--ease-spring); }
.quick a i svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.quick a:hover { transform: translateY(-3px); color: var(--text); border-color: var(--border-2); box-shadow: var(--shadow-1); }
.quick a:hover i { transform: scale(1.1) rotate(-4deg); }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 500; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl td.r, .tbl th.r { text-align: right; }
.tx { display: flex; align-items: center; gap: 12px; }
.tx .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.tx .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tx .ico.roxo { background: color-mix(in srgb, var(--roxo) 14%, transparent); color: var(--roxo); }
.tx .ico.rosa { background: color-mix(in srgb, var(--rosa) 14%, transparent); color: var(--rosa); }
.tx .ico.azul { background: color-mix(in srgb, var(--azul) 14%, transparent); color: var(--azul); }
.tx .ico.ok { background: var(--ok-soft); color: var(--ok); }
.tx .ico.warn { background: var(--warn-soft); color: var(--warn); }
.tx .t { display: flex; flex-direction: column; line-height: 1.2; }
.tx .t b { font-weight: 600; } .tx .t span { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.amount { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.amount.neg { color: var(--text); } .amount.pos { color: var(--ok); }
.list { display: flex; flex-direction: column; }
.list > li { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
ul.list { margin: 0; padding: 0; }
.mic-badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: color-mix(in srgb, var(--rosa) 16%, transparent); color: var(--rosa); margin-left: 6px; vertical-align: middle; }
.mic-badge svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- Tabs / segmented ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.seg button { padding: 7px 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.seg button.on { background: linear-gradient(135deg, var(--roxo), var(--rosa)); color: #fff; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--roxo) 90%, transparent); font-weight: 700; }
.seg button:hover:not(.on) { color: var(--text); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--text-3); position: relative; white-space: nowrap; }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px; background: linear-gradient(90deg, var(--roxo), var(--rosa)); }
.tabpanel { display: none; } .tabpanel.on { display: block; }

/* ---------- Charts ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--grid-line); }
.chart .axis text { fill: var(--text-3); font-family: var(--font-mono); font-size: 10px; }
.chart .bar { fill: color-mix(in srgb, var(--roxo) 60%, var(--surface)); transition: fill var(--t-fast); }
.chart .bar.hi { fill: var(--roxo); }
.chart .bar.rosa { fill: var(--rosa); }
.chart .bar.azul { fill: var(--azul); }
.chart .bar:hover { fill: var(--rosa); }
.chart .line { fill: none; stroke: var(--roxo); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .line.rosa { stroke: var(--rosa); }
.chart .line.azul { stroke: var(--azul); }
.chart .line.draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 2.2s var(--ease-out) forwards; }
.chart .area { opacity: .9; }
.chart .pt { fill: var(--surface); stroke: var(--roxo); stroke-width: 2.5; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 13px; color: var(--text-2); margin-top: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.donut { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.donut svg { width: 150px; height: 150px; }
.donut .seg-arc { fill: none; stroke-width: 16; stroke-linecap: butt; transition: stroke-width var(--t-fast); }
.donut .seg-arc:hover { stroke-width: 20; }
.donut .center { text-anchor: middle; font-family: var(--font-display); font-weight: 700; fill: var(--text); font-size: 20px; }
.donut .center2 { text-anchor: middle; font-family: var(--font-mono); fill: var(--text-3); font-size: 9px; letter-spacing: .1em; }
.gauge { position: relative; width: 100%; max-width: 300px; margin: 0 auto; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge .track { fill: none; stroke: var(--surface-3); stroke-width: 18; stroke-linecap: round; }
.gauge .fill { fill: none; stroke: url(#gaugeGrad); stroke-width: 18; stroke-linecap: round; stroke-dasharray: 0 1000; transition: stroke-dasharray 1.6s var(--ease-out); filter: drop-shadow(0 0 8px rgba(249,71,119,.45)); }
.gauge .needle { transform-origin: 150px 150px; transition: transform 1.6s var(--ease-spring); }
.gauge .score { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; }
.gauge .score b { font-family: var(--font-display); font-size: clamp(40px, 5vw, 58px); font-weight: 800; letter-spacing: -.03em; line-height: 1; display: block; }
.gauge .score span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.ring .bg { fill: none; stroke: var(--surface-3); stroke-width: 8; }
.ring .fg { fill: none; stroke: var(--roxo); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 0 1000; transition: stroke-dasharray 1.4s var(--ease-out); }
.ring.ok .fg { stroke: var(--ok); } .ring.warn .fg { stroke: var(--warn); } .ring.bad .fg { stroke: var(--bad); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 17px; }

/* ---------- Skeleton / states ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 8px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.empty { text-align: center; padding: 32px 20px; border: 1px dashed var(--border-2); border-radius: var(--r-md); color: var(--text-2); }
.empty .ill { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--roxo) 10%, var(--surface)); color: var(--roxo); }
.empty .ill svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty h4 { color: var(--text); margin-bottom: 4px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 14px; }
.alert svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alert.warn { background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.alert.warn svg { color: var(--warn); }
.alert.bad { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); } .alert.bad svg { color: var(--bad); }
.alert.ok { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); } .alert.ok svg { color: var(--ok); }
.alert.info { background: color-mix(in srgb, var(--azul) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--azul) 35%, transparent); } .alert.info svg { color: var(--azul); }

/* ---------- Sheet (novo gasto) + toast ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8,4,20,.55); backdrop-filter: blur(4px); z-index: 40; opacity: 0; pointer-events: none; transition: opacity var(--t-med); }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 110%); width: min(560px, 100%); background: var(--surface); border-radius: 28px 28px 0 0; padding: 12px 22px 28px; z-index: 41; box-shadow: var(--shadow-2); transition: transform var(--t-slow) var(--ease-spring); }
.sheet.on { transform: translate(-50%, 0); }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 0 auto 14px; }
.sheet h3 { font-size: 20px; }
.sheet > div > .more { color: var(--text-3); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.sheet > div > .more svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* cartão digitado na folha de pagamento */
.pg-cartao .field { margin-top: 10px; }
.pg-cartao .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pg-cartao input { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pg-cartao .btn svg { width: 16px; height: 16px; }
.sheet-pagamento { max-height: 92vh; overflow-y: auto; }
/* Suas Assinaturas: grade de detalhes */
.as-det { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; margin-top: 12px; }
.as-det div span { display: block; font-size: 12px; color: var(--text-3); }
.as-det div b { display: block; font-size: 15px; margin-top: 2px; }
/* agenda: dia em que a conta foi paga */
.ag-ev .t .ag-pago-em { display: block; color: var(--ok); font-size: 12px; font-weight: 600; margin-top: 2px; }

/* ---------- ajustes pós-lançamento (28/09/2026) ---------- */
/* opções de escolha (Sim/Não, tipos, períodos): cada opção separada da outra */
.seg { gap: 6px; }
.seg button:not(.on) { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
/* faixas que rolam de lado (temas das vídeo-aulas) */
.seg-scroll { min-width: 0; touch-action: pan-x; -webkit-overflow-scrolling: touch; }
/* cotação do seguro na Proteção */
.pf-cotacao { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--roxo) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--roxo) 30%, transparent); }
.pf-cotacao .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--roxo) 16%, transparent); color: var(--roxo); }
.pf-cotacao .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.pf-cotacao b { display: block; font-size: 14.5px; } .pf-cotacao p { margin: 4px 0 10px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
/* poupança negativa (resgates) */
.lim-modo { margin-top: 12px; }
.lim-pergunta { font-size: 13.5px; font-weight: 600; margin: 0 0 8px; }
.lim-modo .seg { display: flex; flex-wrap: wrap; }
.lim-modo .seg button { flex: 1 1 auto; }
#limIa { margin-top: 12px; display: grid; gap: 12px; }
#limIa[hidden] { display: none; }
.lim-sugestao { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-md, 14px); background: var(--surface-2); border: 1px solid var(--border); }
.lim-sugestao b { font-family: var(--font-display); font-size: 24px; }
.lim-sugestao small { color: var(--text-2); font-size: 12.5px; }
.meta-resgate { margin: 2px 0 0; font-size: 12.5px; color: var(--warn); font-weight: 600; }
/* Seus Bens: tipo em cima, valor embaixo */
.form-bem-topo { display: grid; grid-template-columns: 1fr; gap: 0; }
/* check-ups: no celular os botões descem para baixo do texto */
.ck-lista > li { flex-wrap: wrap; row-gap: 10px; }
.ck-lista > li > .tx { flex: 1 1 220px; min-width: 0; }
@media (max-width: 620px) {
  .ck-lista > li > span:last-child { width: 100%; justify-content: flex-end; }
  /* Home: quadro do plano grátis em coluna */
  .home-gratis { grid-template-columns: 1fr !important; gap: 14px !important; }
  .home-gratis .btn { justify-self: start; }
  /* tipo da consulta: no máximo duas linhas */
  #csTipos { display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; }
  #csTipos button { white-space: normal; text-align: center; line-height: 1.25; padding: 9px 8px; }
}

/* ---------- Bioimpedância: gerar, scanner, histórico e evolução ---------- */
.bio-gerar { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 26px 28px; border-radius: 24px; margin-bottom: 22px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--roxo) 22%, var(--surface)) 0%, var(--surface) 60%); border: 1px solid color-mix(in srgb, var(--roxo) 30%, var(--border)); }
.bio-gerar h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 4px; } .bio-gerar h2 em { font-style: normal; color: var(--roxo); }
.bio-gerar p { font-size: 14.5px; margin-top: 6px; max-width: 60ch; }
.bio-gerar-visor { position: relative; width: 84px; height: 84px; display: grid; place-items: center; color: var(--roxo); }
.bio-gerar-visor svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.bio-gerar-visor i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--roxo) 55%, transparent); animation: bio-onda 2.6s ease-out infinite; }
.bio-gerar-visor i:nth-child(2) { animation-delay: .85s; } .bio-gerar-visor i:nth-child(3) { animation-delay: 1.7s; }
@keyframes bio-onda { from { transform: scale(.45); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
.bio-gerar-btn { white-space: nowrap; }
@media (max-width: 760px) { .bio-gerar { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 22px 18px; } .bio-gerar-btn { width: 100%; } }

.bio-scan { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(8, 4, 20, .72); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s ease; }
.bio-scan.on { opacity: 1; }
html.bio-scan-aberto { overflow: hidden; }
.bio-scan-caixa { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 22px 24px; border-radius: 28px; text-align: center;
  background: linear-gradient(180deg, #160a2e, #0c0619); border: 1px solid rgba(160, 90, 255, .35); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(130, 10, 209, .25); color: #f3ecff; }
.bio-scan-visor { position: relative; width: 290px; height: 290px; max-width: 78vw; max-height: 78vw; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, rgba(130, 10, 209, .28) 0%, rgba(20, 8, 40, .9) 62%), repeating-radial-gradient(circle, rgba(190, 140, 255, .14) 0 1px, transparent 1px 36px); border: 1px solid rgba(190, 140, 255, .35); }
.bio-scan-radar { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(249, 71, 119, .0) 0deg, rgba(249, 71, 119, .35) 40deg, rgba(249, 71, 119, 0) 70deg); animation: bio-giro 2.4s linear infinite; }
.bio-scan-aneis i { position: absolute; left: 50%; top: 50%; width: 60%; height: 60%; margin: -30% 0 0 -30%; border-radius: 50%; border: 1px solid rgba(190, 140, 255, .5); animation: bio-onda 2.2s ease-out infinite; }
.bio-scan-aneis i:nth-child(2) { animation-delay: .73s; } .bio-scan-aneis i:nth-child(3) { animation-delay: 1.46s; }
.bio-scan-linha { position: absolute; left: 0; right: 0; height: 2px; top: 10%; background: linear-gradient(90deg, transparent, #F94777, #fff, #F94777, transparent); box-shadow: 0 0 18px #F94777; animation: bio-varre 2.8s ease-in-out infinite alternate; }
.bio-scan-nucleo { position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #820AD1, #3a0766); box-shadow: 0 0 34px rgba(130, 10, 209, .9); animation: bio-pulso 1.1s ease-in-out infinite; }
.bio-scan-nucleo svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 2; }
.bio-scan-no { --r: 112px; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--a))); }
.bio-scan-no .bola { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(40, 20, 70, .95); border: 1px solid rgba(190, 140, 255, .35); color: rgba(243, 236, 255, .45); transition: all .35s ease; }
.bio-scan-no .bola svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.bio-scan-no em { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); font-style: normal; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; color: rgba(243, 236, 255, .45); transition: color .35s; }
.bio-scan-no.lendo .bola { background: #F94777; border-color: #fff; color: #fff; box-shadow: 0 0 0 6px rgba(249, 71, 119, .25), 0 0 24px #F94777; transform: scale(1.15); }
.bio-scan-no.lendo em { color: #fff; }
.bio-scan-no.lido .bola { background: #3641ED; border-color: rgba(255, 255, 255, .6); color: #fff; }
.bio-scan-no.lido em { color: rgba(243, 236, 255, .85); }
.bio-scan-titulo { font-family: var(--font-display); font-size: 20px; margin-top: 6px; }
.bio-scan-msg { font-size: 14.5px; color: rgba(243, 236, 255, .78); min-height: 1.5em; margin: 0; }
.bio-scan-barra { width: 100%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bio-scan-barra i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #820AD1, #F94777); transition: width .3s ease; }
.bio-scan-pct { font-size: 12.5px; color: rgba(243, 236, 255, .6); letter-spacing: .06em; }
@keyframes bio-giro { to { transform: rotate(360deg); } }
@keyframes bio-varre { from { top: 8%; } to { top: 90%; } }
@keyframes bio-pulso { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .bio-scan-radar, .bio-scan-aneis i, .bio-scan-linha, .bio-scan-nucleo, .bio-gerar-visor i { animation: none; } .bio-scan-linha { top: 50%; } }

.bio-hist { margin-top: 26px; }
.bio-hist-item.sel { background: color-mix(in srgb, var(--roxo) 8%, transparent); border-radius: 12px; padding-left: 8px; padding-right: 8px; }

.bio-evo { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-top: 12px; background: var(--surface); }
.bio-evo-rots { background: var(--surface-2); border-right: 1px solid var(--border); }
.bio-evo-rot { display: flex; flex-direction: column; justify-content: center; padding: 0 14px; border-bottom: 1px solid var(--border); }
.bio-evo-rot b { font-size: 13.5px; line-height: 1.25; white-space: nowrap; } .bio-evo-rot span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; margin-top: 2px; }
.bio-evo-rot em { font-style: normal; font-weight: 700; color: var(--text-3); } .bio-evo-rot em.ok { color: var(--ok); } .bio-evo-rot em.bad { color: var(--bad); }
.bio-evo-rot.base { height: 46px; border-bottom: 0; }
.bio-evo-graf { overflow-x: auto; }
.bio-evo-svg { display: block; }
.bio-evo-svg .sep { stroke: var(--border-2); stroke-dasharray: 2 4; }
.bio-evo-svg .div { stroke: var(--border); }
.bio-evo-svg .col-atual { fill: color-mix(in srgb, var(--roxo) 9%, transparent); }
.bio-evo-svg .linha { fill: none; stroke: var(--text-2); stroke-width: 2; }
.bio-evo-svg .pt { fill: var(--text); } .bio-evo-svg .pt.atual { fill: var(--roxo); }
.bio-evo-svg .v { fill: var(--text); font: 600 13px var(--font-body, sans-serif); font-variant-numeric: tabular-nums; } .bio-evo-svg .v.atual { fill: var(--roxo); font-weight: 800; }
.bio-evo-svg .mes { fill: var(--text-2); font: 700 12px var(--font-body, sans-serif); text-transform: uppercase; } .bio-evo-svg .mes.atual { fill: var(--roxo); }
.bio-evo-svg .data { fill: var(--text-3); font: 500 10.5px var(--font-body, sans-serif); }
.bio-evo-vazio { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border: 1px dashed var(--border-2); border-radius: 14px; margin-top: 12px; color: var(--text-2); font-size: 14px; }
.bio-evo-vazio svg { width: 22px; height: 22px; flex: none; stroke: var(--roxo); fill: none; stroke-width: 1.8; } .bio-evo-vazio p { margin: 0; }
@media (max-width: 620px) { .bio-evo { grid-template-columns: 124px minmax(0, 1fr); } .bio-evo-rot { padding: 0 8px; } .bio-evo-rot b { font-size: 11.5px; } .bio-evo-rot span { font-size: 10.5px; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea { height: 46px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface-2); padding: 0 14px; color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.field input:focus, .field select:focus { outline: none; border-color: var(--roxo); box-shadow: 0 0 0 4px var(--ring); }
.field .help { font-size: 12.5px; color: var(--text-3); }
.field .err { font-size: 12.5px; color: var(--bad); display: none; }
.field.invalid input, .field.invalid select { border-color: var(--bad); } .field.invalid .err { display: block; }
.money-input { display: flex; align-items: center; gap: 8px; height: 60px; border-radius: 16px; border: 1px solid var(--border-2); background: var(--surface-2); padding: 0 16px; font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.money-input span { color: var(--text-3); font-size: 18px; }
.money-input input { flex: 1; border: 0; background: none; font: inherit; min-width: 0; outline: none; }
.mic-live { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--ink-panel); color: var(--on-ink); margin-top: 14px; }
.mic-live .waves { display: flex; align-items: center; gap: 3px; height: 28px; }
.mic-live .waves i { width: 4px; border-radius: 2px; background: var(--rosa); height: 8px; animation: wave 1s ease-in-out infinite; animation-delay: calc(var(--i) * .08s); }
@keyframes wave { 50% { height: 26px; } }
.mic-live small { color: var(--on-ink-muted); }
.toast-host { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ink-panel); color: var(--on-ink); box-shadow: var(--shadow-2); font-size: 14px; font-weight: 500; animation: toast-in .4s var(--ease-spring) both; }
.toast.out { animation: toast-out .25s ease-in forwards; }
.toast svg { width: 18px; height: 18px; stroke: var(--ok); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Componentes específicos ---------- */
.dim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dim { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.dim:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.dim .t b { display: block; font-weight: 600; } .dim .t span { font-size: 13px; color: var(--text-3); }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--roxo), var(--rosa)); border-radius: 2px; opacity: .5; }
.timeline .ev { position: relative; padding: 6px 0 14px; }
.timeline .ev::before { content: ""; position: absolute; left: -22px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--roxo); }
.timeline .ev.done::before { background: var(--ok); border-color: var(--ok); }
.timeline .ev b { display: block; font-weight: 600; } .timeline .ev span { font-size: 13px; color: var(--text-3); }
.trail { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.day { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; min-height: 130px; transition: transform var(--t-fast); }
.day:hover { transform: translateY(-2px); }
.day .n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); display: flex; justify-content: space-between; align-items: center; }
.day .n i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.day .n i svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; }
.day.done { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.day.done .n i { background: var(--ok); }
.day.now { border-color: var(--roxo); box-shadow: 0 0 0 4px var(--ring); }
.day.now .n i { background: var(--roxo); }
.day.lock { opacity: .55; }
.day p { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.day .btn { margin-top: auto; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.video { border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.video:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.video .thumb { aspect-ratio: 16/9; position: relative; display: grid; place-items: center; background: linear-gradient(135deg, var(--c1, var(--roxo)), var(--c2, var(--azul))); }
.video .thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 30% 20%, rgba(255,255,255,.28), transparent 70%); }
.video .thumb .play { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--roxo); position: relative; z-index: 1; transition: transform var(--t-fast) var(--ease-spring); }
.video:hover .play { transform: scale(1.12); }
.video .thumb .play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }
.video .thumb .dur { position: absolute; right: 8px; bottom: 8px; font-family: var(--font-mono); font-size: 10.5px; color: #fff; background: rgba(0,0,0,.55); padding: 3px 6px; border-radius: 6px; z-index: 1; }
.video .body { padding: 12px 14px 14px; }
.video .body b { display: block; font-weight: 600; font-size: 14px; }
.video .body span { font-size: 12.5px; color: var(--text-3); }
.product { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.product:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.product .logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: #fff; flex: none; }
.product .t { flex: 1; } .product .t b { display: block; font-weight: 600; } .product .t span { font-size: 13px; color: var(--text-3); }
.bank { display: flex; align-items: center; gap: 12px; }
.bank .lg { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 14px; flex: none; }
.sync { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--azul) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--azul) 30%, transparent); font-size: 13.5px; }
.sync .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--azul) 25%, transparent); border-top-color: var(--azul); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync .progress { flex: 1; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar span { font-family: var(--font-mono); font-size: 10px; text-align: center; color: var(--text-3); padding-bottom: 4px; }
.calendar button { aspect-ratio: 1; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); border: 1px solid transparent; }
.calendar button:hover { background: var(--surface-2); }
.calendar button.has { border-color: var(--border-2); color: var(--text); }
.calendar button.sel { background: linear-gradient(135deg, var(--roxo), var(--rosa)); color: #fff; }
.calendar button.off { opacity: .35; pointer-events: none; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slots button { padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--border-2); font-weight: 600; font-size: 13.5px; }
.slots button.on { background: var(--roxo); border-color: var(--roxo); color: #fff; }
.tilt { transform-style: preserve-3d; transition: transform var(--t-med) var(--ease-out); }
.coin { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE58A, #E4A51A 60%, #9C6A00); color: #5A3B00; font-family: var(--font-display); font-weight: 800; box-shadow: inset 0 -2px 4px rgba(0,0,0,.25), 0 4px 10px rgba(228,165,26,.4); }
.avatar-lg { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 26px; color: #fff; background: linear-gradient(135deg, var(--roxo), var(--rosa)); box-shadow: var(--glow-roxo); }
.switch { width: 44px; height: 26px; border-radius: 13px; background: var(--surface-3); position: relative; transition: background var(--t-fast); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform var(--t-fast) var(--ease-spring); }
.switch.on { background: var(--roxo); } .switch.on::after { transform: translateX(18px); }
.xray { position: relative; border-radius: var(--r-md); background: var(--ink-panel); color: var(--on-ink); padding: 20px; overflow: hidden; min-height: 200px; }
.xray .scan { position: absolute; left: 0; right: 0; height: 40%; top: -40%; background: linear-gradient(180deg, transparent, rgba(54,65,237,.35), rgba(249,71,119,.25), transparent); animation: scan 3.4s linear infinite; pointer-events: none; }
@keyframes scan { to { top: 110%; } }
.xray .rings { position: absolute; right: -40px; top: -40px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 0 0 40px transparent, inset 0 0 0 41px rgba(255,255,255,.06), inset 0 0 0 80px transparent, inset 0 0 0 81px rgba(255,255,255,.06), inset 0 0 0 120px transparent, inset 0 0 0 121px rgba(255,255,255,.06); }
.xray .rows { position: relative; display: grid; gap: 8px; margin-top: 12px; }
.xray .rows div { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 13.5px; align-items: center; }
.xray .rows .progress { grid-column: 1 / -1; background: rgba(255,255,255,.1); height: 6px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-ink-muted); padding: 8px 10px; border-radius: 12px; }
.theme-toggle:hover { background: rgba(255,255,255,.06); color: var(--on-ink); }
.theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .span-3 { grid-column: span 6; } .span-4 { grid-column: span 6; } .span-5, .span-7, .span-8 { grid-column: span 12; }
  .hero > .hero-body { grid-template-columns: 1fr; }
  .dim-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --topbar-h: 60px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .rail { display: none; }
  .topbar { padding: 0 16px; }
  .topbar .crumb .mono { display: none; }
  .month-pick b { min-width: 0; font-size: 13px; }
  .page { padding: 16px 16px calc(var(--tabbar-h) + 90px); }
  .bento { gap: 12px; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .hero { padding: 22px 20px; border-radius: 22px; }
  .vitals { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .vital { padding: 10px; } .vital b { font-size: 17px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); z-index: 30;
    background: color-mix(in srgb, var(--ink-panel) 92%, transparent); backdrop-filter: blur(16px);
    border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--on-ink-muted); border-radius: 12px; position: relative; }
  .tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-fast) var(--ease-spring); }
  .tabbar a.active { color: #fff; }
  .tabbar a.active svg { transform: translateY(-2px) scale(1.08); }
  .tabbar a.active::before { content: ""; position: absolute; top: -8px; width: 26px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--roxo-2), var(--rosa)); }
  .fab { bottom: calc(var(--tabbar-h) + 16px); right: 16px; width: 56px; height: 56px; }
  .donut { grid-template-columns: 120px 1fr; } .donut svg { width: 120px; height: 120px; }
  .dim-grid { grid-template-columns: 1fr; }
  .doc .intro, .compare { grid-template-columns: 1fr; }
  .sheet { border-radius: 22px 22px 0 0; }

  .toast-host { bottom: calc(var(--tabbar-h) + 14px); }
}
@media (max-width: 480px) {
  .vitals { grid-template-columns: repeat(3, 1fr); }
  .quick { grid-template-columns: repeat(3, 1fr); }
  h1 { font-size: 26px; }
}

/* ---------- v2: hierarquia categoria → subcategoria + responsividade rígida ---------- */
.main { overflow-x: hidden; min-width: 0; }
.page, .bento > *, .card, .hero, .hero-body > * { min-width: 0; }
.page img, .page svg, .page canvas { max-width: 100%; }

/* Accordion de categoria */
.acc { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); margin-bottom: 10px; overflow: hidden; transition: box-shadow var(--t-med), border-color var(--t-med); }
.acc[open] { box-shadow: var(--shadow-1); border-color: var(--border-2); }
.acc > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px 1fr auto 24px; grid-template-areas: "ico t v chev" "ico bar bar chev"; gap: 4px 12px; align-items: center; padding: 14px 16px; user-select: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--surface-2); }
.acc-ico { grid-area: ico; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--roxo)) 14%, transparent); color: var(--c, var(--roxo)); }
.acc-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.acc-t { grid-area: t; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.acc-t b { font-weight: 600; font-size: 15px; } .acc-t span { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.acc-v { grid-area: v; font-family: var(--font-display); font-weight: 700; font-size: 16px; white-space: nowrap; }
.acc-v small { font-size: 12px; font-weight: 500; }
.acc-bar { grid-area: bar; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.acc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--roxo); transition: width 1s var(--ease-out); }
.acc-bar i.ok { background: var(--ok); } .acc-bar i.warn { background: var(--warn); } .acc-bar i.bad { background: var(--bad); }
.acc-chev { grid-area: chev; color: var(--text-3); transition: transform var(--t-med) var(--ease-spring); display: grid; place-items: center; }
.acc-chev svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.acc[open] > summary .acc-chev { transform: rotate(90deg); }
.acc-body { border-top: 1px solid var(--border); padding: 6px 16px 10px 16px; animation: rise .35s var(--ease-out) both; }

/* Subcategoria */
.sub { border-bottom: 1px solid var(--border); }
.sub:last-child { border-bottom: 0; }
.sub > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "t n v" "lim lim lim"; gap: 4px 12px; align-items: center; padding: 10px 0 10px 12px; position: relative; }
.sub > summary::-webkit-details-marker { display: none; }
.sub > summary::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--border-2); }
.sub[open] > summary::before { background: var(--roxo); }
.sub-t { grid-area: t; display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; } .sub-t b { font-weight: 600; font-size: 14px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sub-n { grid-area: n; font-size: 12.5px; white-space: nowrap; }
.sub-v { grid-area: v; font-family: var(--font-display); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.sub-lim { grid-area: lim; display: flex; align-items: center; gap: 10px; } .sub-lim .progress { flex: 1; height: 5px; max-width: 320px; } .sub-lim small { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.tx-list { padding: 4px 0 8px 12px; } .tx-list > li { padding: 8px 0; }
/* linha que nao cabe (descricao longa do banco): o texto quebra e as acoes descem, sem cortar o botao */
.tx-list > li { flex-wrap: wrap; row-gap: 6px; }
.tx-list > li > .tx { flex: 1 1 170px; min-width: 0; }
.tx-list > li > .tx .t { min-width: 0; } .tx-list > li > .tx .t b { overflow-wrap: anywhere; }
.tx-acoes { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }

/* Limites */
.lim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding-top: 12px; }
.lim { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 8px; background: var(--surface-2); }
.lim.none { opacity: .7; } .lim.none-gasto { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.lim.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: var(--bad-soft); }
.lim-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .lim-h b { font-size: 13.5px; font-weight: 600; }
.lim-v { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }

/* Evolução */
.evo-tbl { display: grid; gap: 2px; margin-top: 10px; font-size: 13.5px; }
.evo-row { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr) .8fr; gap: 8px; padding: 8px 10px; border-radius: 10px; align-items: center; }
.evo-row:nth-child(even) { background: var(--surface-2); }
.evo-row.evo-head { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); background: none; }
.evo-row .r { text-align: right; }
.evo-lim .evo-row { grid-template-columns: 1.4fr repeat(3, 1fr); }
.evo-lim .r b { display: block; font-size: 13px; }
.evo-lim .r small { display: block; font-size: 11px; color: var(--text-3); }
.evo-lim .r.dentro b { color: var(--ok); } .evo-lim .r.estourou b { color: var(--bad); }
@media (max-width: 620px) { .evo-lim .evo-row { grid-template-columns: 1fr; gap: 4px; } .evo-lim .evo-row.evo-head { display: none; } .evo-lim .r { text-align: left; display: flex; gap: 8px; align-items: baseline; } .evo-lim .r b::before { content: attr(data-mes) " · "; color: var(--text-3); font-weight: 500; } }

/* Objetivos por tipo */
.grp { margin-bottom: 18px; }
.grp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.obj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
/* Cadeado do plano gratuito: entra no lugar de um numero pago. */
.cadeado { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: linear-gradient(135deg, var(--roxo), var(--rosa)); color: #fff; text-decoration: none; font-family: var(--font-display); font-size: 14px; font-weight: 700; line-height: 1.4; }
.cadeado:hover { filter: brightness(1.08); }
.cadeado svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.vital .cadeado { align-self: flex-start; margin: 2px 0; }

.obj { overflow: hidden; }
.obj-cover { height: 96px; margin: -20px -20px 14px; position: relative; display: flex; align-items: flex-end; padding: 12px 16px; color: #fff; }
.obj-cover svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 1.6; position: absolute; top: 12px; left: 16px; }
.obj-cover .chip { position: absolute; top: 10px; right: 10px; }
.obj-cover b { font-family: var(--font-display); font-size: 17px; }
.obj-kv { display: flex; justify-content: space-between; font-size: 13.5px; margin-top: 8px; }

/* Parceiros do objetivo: fechado por padrao, para nao competir com o progresso. */
.obj-parc { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.obj-parc > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 600; color: var(--roxo); }
.obj-parc > summary::-webkit-details-marker { display: none; }
.obj-parc > summary > span { display: flex; align-items: center; gap: 6px; }
.obj-parc summary svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; transition: transform var(--t-fast); }
.obj-parc[open] > summary > svg:last-child { transform: rotate(180deg); }
.obj-parc-lista { display: grid; gap: 2px; margin-top: 8px; }
.obj-parc-lista a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); text-decoration: none; font-size: 13px; }
.obj-parc-lista a:hover { background: var(--surface-3); color: var(--text); }
.obj-parc-lista svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.obj.done { opacity: .85; }

/* Dívidas: parcelas */
.parc { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 10px 12px; }
.parc-i { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--border-2); color: var(--text-3); cursor: pointer; }
.parc-i.paga { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.parc-i.prox { border-color: var(--roxo); color: var(--roxo); box-shadow: 0 0 0 3px var(--ring); }

/* Tabelas → cards no celular (sem scroll lateral) */
@media (max-width: 900px) {
  .tabs { flex-wrap: wrap; overflow: visible; gap: 4px; }
  .tabs button { padding: 8px 10px; font-size: 13px; }
  .seg { flex-wrap: wrap; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero { min-height: 0; }
  .hero h1 { font-size: 24px; }
  .hero p.lead { font-size: 14px; }
  .hero .actions .btn { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .ecg { height: 92px; }
  .table-wrap { border: 0; background: none; overflow: visible; }
  table.tbl { min-width: 0; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: 10px; padding: 6px 12px; }
  .tbl td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left !important; }
  .tbl td[data-l]::before { content: attr(data-l); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
  .tbl td:empty { display: none; }
  .tbl-contas td:nth-child(2)::before { content: "Conta"; } .tbl-contas td:nth-child(3)::before { content: "Status"; } .tbl-contas td:nth-child(4)::before { content: "Saldo"; } .tbl-contas td:nth-child(5)::before { content: "Atualizado"; }
  .tbl-contas td::before { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
  .acc > summary { grid-template-columns: 34px 1fr 24px; grid-template-areas: "ico t chev" "ico v chev" "ico bar chev"; padding: 12px; }
  .acc-ico { width: 34px; height: 34px; border-radius: 10px; }
  .sub > summary { grid-template-columns: 1fr auto; grid-template-areas: "t v" "n n" "lim lim"; }
  .sub-lim .progress { max-width: none; }
  .evo-row { grid-template-columns: 1.3fr repeat(3, 1fr); font-size: 12.5px; padding: 8px 6px; }
  .evo-row > :last-child { display: none; }
  .lim-grid { grid-template-columns: 1fr; }
  .obj-grid { grid-template-columns: 1fr; }
  .donut { grid-template-columns: 110px 1fr; }
  .card { padding: 16px; }
  .kpi .val { font-size: 26px; }
  .quick { grid-template-columns: repeat(4, 1fr); gap: 8px; } .quick a { padding: 12px 4px 10px; font-size: 12px; } .quick a i { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .quick { grid-template-columns: repeat(3, 1fr); }
  .vital b { font-size: 15px; } .vital { padding: 8px; } .vital small { display: none; }
  .month-pick b { min-width: 0; }
  .topbar .crumb h1 { font-size: 16px; }
}

/* ---------- Ajustes específicos do App (fora do protótipo) ---------- */
.month-pick a { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.month-pick a:hover { background: var(--surface-2); color: var(--text); }
.month-pick a svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.brand { text-decoration: none; }
.brand svg { width: 118px; height: auto; }
.sheet[hidden] { display: none; }
.field select { appearance: auto; }
.field select optgroup { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.field select option { font-family: var(--font-body); font-size: 14px; text-transform: none; letter-spacing: 0; }
[data-reveal] { opacity: 1; }

/* ---------- v1.1: rail com scroll, logo legível ---------- */
.rail { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.rail a.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; border-radius: 0; background: none; }
.rail a.brand:hover { background: none; transform: none; }
.rail a.brand svg { width: 150px; height: auto; stroke: none; fill: none; stroke-width: 0; }
.rail a.brand svg .cls-1 { fill: var(--on-ink); }
.rail a.brand svg .cls-2 { fill: var(--rosa); }
.rail .brand .tag { margin-left: auto; }
.rail-foot { margin-top: auto; padding-top: 12px; }

/* ======================================================================
   v1.2 - mobile: gaveta, logo no topo, tab ativa neon; loading da moeda;
   limites; evolucao; [hidden] respeitado
   ====================================================================== */
[hidden] { display: none !important; }
/* barra de progresso fina (navegação entre páginas do app e atualização em silêncio) */
.sd-progresso { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 210; background: linear-gradient(90deg, var(--roxo), var(--rosa)); opacity: 0; pointer-events: none; transition: width .3s ease, opacity .25s ease; }
.sd-progresso.on { opacity: 1; animation: sd-progresso 6s cubic-bezier(.1,.6,.2,1) forwards; }
.sd-progresso.on.fim { animation: none; width: 100%; opacity: 0; transition: width .2s ease, opacity .3s ease .15s; }
@keyframes sd-progresso { 0% { width: 0; } 30% { width: 55%; } 70% { width: 82%; } 100% { width: 92%; } }
/* skeleton automático (A.skeletonAuto): texto em linha e sobras */
.skeleton.sk-txt { display: inline-block; width: 6em; max-width: 100%; height: 1em; vertical-align: middle; border-radius: 6px; }
b.skeleton.sk-txt, h1 .skeleton.sk-txt { height: 1.1em; }
[aria-busy="true"] > .vital { pointer-events: none; }
.skel-block { display: grid; gap: 10px; }
.skel-block .skeleton { height: 64px; border-radius: var(--r-md); }

/* Limites: cartao compacto e alinhado */
.lim-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); align-items: start; }
.lim { align-content: start; gap: 10px; padding: 14px; background: var(--surface); border-radius: 14px; }
.lim-h { align-items: flex-start; } .lim-h b { font-size: 14px; line-height: 1.25; }
.lim-v { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.lim-v .num { white-space: nowrap; color: var(--text-2); }
.lim-v .lim-pct { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.lim-acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.lim .more svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.lim.bad .lim-pct { color: var(--bad); } .lim.warn .lim-pct { color: var(--warn); } .lim.ok .lim-pct { color: var(--ok); }
.lim.none { background: var(--surface-2); opacity: 1; }

/* Evolucao: navegacao de janela de 3 meses */
.evo-nav { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); padding: 3px; }
.evo-nav button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.evo-nav button:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.evo-nav button:disabled { opacity: .35; cursor: default; }
.evo-nav button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.evo-nav b { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; padding: 0 8px; white-space: nowrap; }

/* Contas: linha clicavel abre o extrato daquela conta */
.tx-link { cursor: pointer; border-radius: 10px; margin: 0 -8px; padding: 10px 8px !important; transition: background var(--t-fast); }
.tx-link:hover { background: var(--surface-2); }
.filtro-conta { display: inline-flex; align-items: center; gap: 6px; }
.filtro-conta button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.12); }
.filtro-conta button svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2.6; }

/* Tab bar: icone ativo neon */
.tabbar a.active svg { color: #fff; filter: drop-shadow(0 0 6px var(--rosa)) drop-shadow(0 0 14px rgba(249,71,119,.75)); }
.tabbar a.active::before { box-shadow: 0 0 10px var(--rosa), 0 0 22px rgba(130,10,209,.8); }
.tabbar a.active { text-shadow: 0 0 10px rgba(249,71,119,.6); }

/* Topbar mobile: botao da gaveta e logo */
.topbar .menu-btn { display: none; }
.topbar .top-logo { display: none; }
.topbar .top-logo svg { width: 96px; height: auto; fill: none; stroke: none; }
.topbar .top-logo svg .cls-1 { fill: var(--text); } .topbar .top-logo svg .cls-2 { fill: var(--rosa); }
.rail .rail-close { display: none; }
.rail-scrim { display: none; }

@media (max-width: 900px) {
  .topbar .menu-btn { display: grid; }
  .topbar .crumb { display: none; }
  .topbar .top-logo { display: flex; align-items: center; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } /* logo no centro da barra */
  .topbar .icon-btn[href="/Saida"] { display: none; }
  .rail { display: flex; position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); z-index: 60; -webkit-transform: translate3d(-104%, 0, 0); transform: translate3d(-104%, 0, 0); -webkit-transition: -webkit-transform .38s cubic-bezier(.2,.75,.2,1); transition: transform .38s cubic-bezier(.2,.75,.2,1); box-shadow: 0 0 0 1px var(--border), 24px 0 80px rgba(0,0,0,.45); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .rail.open { -webkit-transform: none; transform: none; }
  .rail .rail-close { display: grid; place-items: center; position: absolute; top: 14px; right: 12px; width: 36px; height: 36px; border-radius: 50%; color: var(--on-ink-muted); background: rgba(255,255,255,.06); z-index: 2; }
  .rail .rail-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
  .rail a.brand { padding-right: 48px; }
  .rail-scrim { display: block; position: fixed; inset: 0; background: rgba(8,4,20,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 55; opacity: 0; pointer-events: none; -webkit-transition: opacity .3s; transition: opacity .3s; }
  .rail-scrim.on { opacity: 1; pointer-events: auto; }
}

/* ---------- Sair e puxar para atualizar ---------- */
.rail-sair { color: var(--bad) !important; }
.rail-sair svg { stroke: var(--bad); }
.rail-sair:hover { background: color-mix(in srgb, var(--bad) 14%, transparent) !important; }

.ptr { position: fixed; left: 0; right: 0; top: calc(var(--topbar-h) - 8px); z-index: 40;
  display: none; justify-content: center; pointer-events: none; opacity: 0; }
.ptr.voltando { transition: transform .3s cubic-bezier(.2,.75,.2,1), opacity .3s ease; }
.ptr-roda { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-2); box-shadow: var(--shadow-1); }
.ptr-roda svg { width: 18px; height: 18px; stroke: var(--roxo); fill: none; stroke-width: 2.2; stroke-linecap: round; }
.ptr.pronto .ptr-roda { background: linear-gradient(135deg, var(--roxo), var(--rosa)); border-color: transparent; }
.ptr.pronto .ptr-roda svg { stroke: #fff; }
.ptr.girando .ptr-roda svg { animation: ptr-gira .8s linear infinite; transform-origin: 50% 50%; }
@keyframes ptr-gira { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .ptr { display: flex; } }

/* ---------- Loading do layout novo: a moeda da tela de espera ----------
   So transform/opacity animam; camadas proprias (translateZ) e prefixos
   -webkit- para o iOS manter o giro durante a troca de pagina. */
.sd-load { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 50% 10%, #2A0F5E 0%, #14082E 45%, #0B0716 100%); color: #fff; opacity: 0; pointer-events: none; -webkit-transition: opacity .22s ease; transition: opacity .22s ease; }
.sd-load.on { opacity: 1; pointer-events: auto; }
.sd-load .moeda { position: relative; width: 96px; height: 96px; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transform: translateZ(0); transform: translateZ(0); will-change: transform; -webkit-animation: sd-virar 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite; animation: sd-virar 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.sd-load .moeda__face { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #ffffff 0%, #F5EAFF 55%, #E5D0F7 100%); box-shadow: 0 0 0 3px rgba(255,255,255,.65), 0 0 0 5px rgba(130,10,209,.55), inset 0 -6px 14px rgba(130,10,209,.18), inset 0 6px 12px rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; -webkit-backface-visibility: visible; backface-visibility: visible; }
.sd-load .moeda__face--verso { -webkit-transform: rotateY(180deg); transform: rotateY(180deg); }
.sd-load .moeda__logo { width: 68%; height: 68%; display: block; filter: drop-shadow(0 2px 4px rgba(130,10,209,.35)); }
.sd-load .moeda__borda { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; background: #820AD1; background: conic-gradient(from 0deg, #F94777, #820AD1, #3641ED, #820AD1, #F94777); -webkit-transform: translateZ(-1px); transform: translateZ(-1px); -webkit-backface-visibility: visible; backface-visibility: visible; }
.sd-load .pontos { display: flex; align-items: center; gap: 10px; margin-top: 30px; height: 26px; }
.sd-load .ponto { width: 10px; height: 10px; border-radius: 50%; background: #fff; -webkit-transform: translateZ(0); transform: translateZ(0); will-change: transform, opacity; -webkit-animation: sd-onda 1.5s cubic-bezier(0.45, 0, 0.35, 1) infinite; animation: sd-onda 1.5s cubic-bezier(0.45, 0, 0.35, 1) infinite; }
.sd-load .ponto:nth-child(1) { background: #3641eb; -webkit-animation-delay: 0s; animation-delay: 0s; }
.sd-load .ponto:nth-child(2) { background: #F94777; -webkit-animation-delay: .09s; animation-delay: .09s; }
.sd-load .ponto:nth-child(3) { background: #3641eb; -webkit-animation-delay: .18s; animation-delay: .18s; }
.sd-load .ponto:nth-child(4) { background: #F94777; -webkit-animation-delay: .27s; animation-delay: .27s; }
.sd-load .ponto:nth-child(5) { background: #3641eb; -webkit-animation-delay: .36s; animation-delay: .36s; }
.sd-load .ponto:nth-child(6) { background: #F94777; -webkit-animation-delay: .45s; animation-delay: .45s; }
.sd-load .ponto:nth-child(7) { background: #3641eb; -webkit-animation-delay: .54s; animation-delay: .54s; }
@-webkit-keyframes sd-virar { 0% { -webkit-transform: rotateY(0deg); } 100% { -webkit-transform: rotateY(360deg); } }
@keyframes sd-virar { 0% { -webkit-transform: rotateY(0deg); transform: rotateY(0deg); } 100% { -webkit-transform: rotateY(360deg); transform: rotateY(360deg); } }
@-webkit-keyframes sd-onda { 0%, 65%, 100% { -webkit-transform: translateY(0) scale(.65); opacity: .4; } 30% { -webkit-transform: translateY(-11px) scale(1.15); opacity: 1; } }
@keyframes sd-onda { 0%, 65%, 100% { -webkit-transform: translateY(0) scale(.65); transform: translateY(0) scale(.65); opacity: .4; } 30% { -webkit-transform: translateY(-11px) scale(1.15); transform: translateY(-11px) scale(1.15); opacity: 1; } }

/* v1.3: hero de Gastos empilhado, donut grande, legenda em grade, seta das contas */
.hero-body--stack { grid-template-columns: 1fr; gap: 20px; }
.hero-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.hero-kpis .vital b { font-size: 20px; }
.donut.donut-lg { grid-template-columns: 230px 1fr; gap: 26px; align-items: center; }
.donut.donut-lg svg { width: 230px; height: 230px; }
.donut.donut-lg .center { font-size: 22px; }
.legend.legend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; font-size: 13.5px; }
.legend.legend-grid span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.legend.legend-grid span b { margin-left: auto; font-family: var(--font-display); font-size: 16px; }
.legend.legend-grid i { flex: none; }
.hero .legend.legend-grid { color: var(--on-ink-muted); }
.hero .legend.legend-grid b { color: var(--on-ink); }
.donut.donut-stack { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
.donut.donut-stack svg { width: 210px; height: 210px; }
.donut.donut-stack .legend { width: 100%; }
.tx-link .chev { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); flex: none; }
.tx-link .chev svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tx-link:hover .chev { background: var(--roxo); color: #fff; }
.list > li.tx-link > span svg { max-width: 14px; }
@media (max-width: 900px) {
  .donut.donut-lg { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .donut.donut-lg svg { width: 190px; height: 190px; }
  .legend.legend-grid { width: 100%; font-size: 13px; }
  .hero-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* v1.3b: valores monetarios nunca quebram linha; fonte se ajusta a largura */
.vital { min-width: 0; }
.vital b, .kpi .val, .amount, .acc-v, .sub-v, .lim-v .num, .evo-row .num { white-space: nowrap; }
.vital b { font-size: clamp(15px, 1.35vw, 22px); overflow: hidden; }
.hero-kpis .vital b { font-size: clamp(16px, 1.3vw, 21px); }
.kpi .val { font-size: clamp(22px, 2vw, 32px); }
.vitals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .vital b, .hero-kpis .vital b { font-size: clamp(14px, 4.6vw, 19px); }
  .vital .mono { font-size: 10px; letter-spacing: .1em; }
}

/* v1.4: loading imune a suspensao do iOS (so opacity anima) + logo da gaveta */
.sd-load .moeda { -webkit-animation: none; animation: none; will-change: auto; -webkit-transform: none; transform: none; -webkit-transform-style: flat; transform-style: flat; }
.sd-load .moeda > .moeda__face, .sd-load .moeda > .moeda__borda { display: none; }
.sd-load .moeda .q { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; -webkit-animation: sd-quadro 1.8s steps(1, end) infinite; animation: sd-quadro 1.8s steps(1, end) infinite; }
.sd-load .moeda .q .moeda__face { display: flex; }
.sd-load .moeda .q .moeda__face.verso { background: radial-gradient(circle at 30% 25%, #F3E7FF 0%, #E2CBF6 55%, #CDB0EC 100%); }
.sd-load .moeda .q .moeda__borda { display: block; -webkit-transform: scaleX(.14); transform: scaleX(.14); }
.sd-load .ponto { position: relative; background: none !important; -webkit-animation: none; animation: none; will-change: auto; -webkit-transform: none; transform: none; }
.sd-load .ponto i { position: absolute; top: 0; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--pc, #fff); display: block; }
.sd-load .ponto i.a { -webkit-animation: sd-ponto-a 1.5s cubic-bezier(0.45, 0, 0.35, 1) infinite; animation: sd-ponto-a 1.5s cubic-bezier(0.45, 0, 0.35, 1) infinite; }
.sd-load .ponto i.b { -webkit-transform: translateY(-11px) scale(1.15); transform: translateY(-11px) scale(1.15); opacity: 0; -webkit-animation: sd-ponto-b 1.5s cubic-bezier(0.45, 0, 0.35, 1) infinite; animation: sd-ponto-b 1.5s cubic-bezier(0.45, 0, 0.35, 1) infinite; }
.sd-load .ponto:nth-child(odd) { --pc: #3641eb; } .sd-load .ponto:nth-child(even) { --pc: #F94777; }
.sd-load .ponto:nth-child(1) i { -webkit-animation-delay: 0s; animation-delay: 0s; }
.sd-load .ponto:nth-child(2) i { -webkit-animation-delay: .09s; animation-delay: .09s; }
.sd-load .ponto:nth-child(3) i { -webkit-animation-delay: .18s; animation-delay: .18s; }
.sd-load .ponto:nth-child(4) i { -webkit-animation-delay: .27s; animation-delay: .27s; }
.sd-load .ponto:nth-child(5) i { -webkit-animation-delay: .36s; animation-delay: .36s; }
.sd-load .ponto:nth-child(6) i { -webkit-animation-delay: .45s; animation-delay: .45s; }
.sd-load .ponto:nth-child(7) i { -webkit-animation-delay: .54s; animation-delay: .54s; }
@-webkit-keyframes sd-quadro { 0%, 8.3% { opacity: 1; } 8.34%, 100% { opacity: 0; } }
@keyframes sd-quadro { 0%, 8.3% { opacity: 1; } 8.34%, 100% { opacity: 0; } }
@-webkit-keyframes sd-ponto-a { 0%, 65%, 100% { opacity: .45; } 30% { opacity: 0; } }
@keyframes sd-ponto-a { 0%, 65%, 100% { opacity: .45; } 30% { opacity: 0; } }
@-webkit-keyframes sd-ponto-b { 0%, 65%, 100% { opacity: 0; } 30% { opacity: 1; } }
@keyframes sd-ponto-b { 0%, 65%, 100% { opacity: 0; } 30% { opacity: 1; } }
@media (max-width: 900px) {
  .rail { padding-top: calc(16px + env(safe-area-inset-top)); }
  .rail a.brand svg { width: 118px; }
  .rail .rail-close { top: calc(12px + env(safe-area-inset-top)); }
}

/* v1.5: loading aparece na hora (o iOS congela antes de um fade terminar); microfone na sheet */
.sd-load { -webkit-transition: none; transition: none; }
.sd-load:not(.on) { -webkit-transition: opacity .2s ease; transition: opacity .2s ease; }
.mic-box { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--ink-panel); color: var(--on-ink); margin-top: 14px; border: 1px solid transparent; -webkit-transition: border-color .3s, box-shadow .3s; transition: border-color .3s, box-shadow .3s; }
.mic-box.destaque { border-color: var(--rosa); box-shadow: 0 0 0 4px rgba(249,71,119,.25); }
.mic-btn { position: relative; width: 60px; height: 60px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--roxo), var(--rosa)); box-shadow: 0 10px 28px -10px rgba(130,10,209,.8); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mic-btn svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mic-btn .mic-ring { position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--rosa); opacity: 0; }
.mic-btn.gravando { background: linear-gradient(135deg, var(--rosa), #FF3B3B); }
.mic-btn.gravando .mic-ring { -webkit-animation: pulse-ring 1.1s ease-out infinite; animation: pulse-ring 1.1s ease-out infinite; }
.mic-btn:disabled { opacity: .6; }
.mic-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mic-txt b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.mic-txt small { color: var(--on-ink-muted); font-size: 12.5px; }
.mic-txt .waves { height: 22px; margin-top: 2px; }
.mic-txt .waves i { width: 4px; border-radius: 2px; background: var(--rosa); height: 8px; -webkit-animation: wave 1s ease-in-out infinite; animation: wave 1s ease-in-out infinite; -webkit-animation-delay: calc(var(--i) * .08s); animation-delay: calc(var(--i) * .08s); display: inline-block; margin-right: 3px; }

/* v1.6: moeda de volta ao giro suave (a pagina nao navega mais no iOS); hero de Gastos; legenda; sugestoes */
.sd-load .moeda { -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transform: translateZ(0); transform: translateZ(0); will-change: transform; -webkit-animation: sd-virar 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite; animation: sd-virar 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.sd-load .moeda > .moeda__face { display: flex; } .sd-load .moeda > .moeda__borda { display: block; }
.sd-load .moeda .q { display: none; }
.sd-load .ponto { background: var(--pc, #fff) !important; -webkit-transform: translateZ(0); transform: translateZ(0); will-change: transform, opacity; -webkit-animation: sd-onda 1.5s cubic-bezier(0.45, 0, 0.35, 1) infinite; animation: sd-onda 1.5s cubic-bezier(0.45, 0, 0.35, 1) infinite; }
.sd-load .ponto i { display: none; }
.sd-load .ponto:nth-child(1) { -webkit-animation-delay: 0s; animation-delay: 0s; }
.sd-load .ponto:nth-child(2) { -webkit-animation-delay: .09s; animation-delay: .09s; }
.sd-load .ponto:nth-child(3) { -webkit-animation-delay: .18s; animation-delay: .18s; }
.sd-load .ponto:nth-child(4) { -webkit-animation-delay: .27s; animation-delay: .27s; }
.sd-load .ponto:nth-child(5) { -webkit-animation-delay: .36s; animation-delay: .36s; }
.sd-load .ponto:nth-child(6) { -webkit-animation-delay: .45s; animation-delay: .45s; }
.sd-load .ponto:nth-child(7) { -webkit-animation-delay: .54s; animation-delay: .54s; }

.hero > .hero-body.hero-body--stack { grid-template-columns: 1fr; gap: 22px; }
.hero .actions { flex-wrap: nowrap; }
.hero .actions .btn { white-space: nowrap; }
.hero-resumo { display: grid; justify-items: center; gap: 18px; }
.hero-resumo .donut.donut-lg { grid-template-columns: 1fr; justify-items: center; }
.hero-resumo .donut.donut-lg svg { width: 250px; height: 250px; }
.hero-resumo .hero-kpis { width: 100%; margin: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.hero-resumo .legend.legend-grid { width: 100%; max-width: 760px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 32px; }
.legend.legend-grid > span { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.legend.legend-grid > span i { margin: 0; width: 12px; height: 12px; border-radius: 4px; }
.legend.legend-grid > span .lg-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend.legend-grid > span b { margin: 0; font-family: var(--font-display); font-size: 15px; }
.donut .seg-arc:hover { stroke-width: 13; }
.sugestoes { position: relative; margin-top: -6px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-2); overflow: hidden; max-height: 220px; overflow-y: auto; }
.sugestoes button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; font-size: 14px; border-bottom: 1px solid var(--border); }
.sugestoes button:last-child { border-bottom: 0; }
.sugestoes button:hover, .sugestoes button:focus { background: var(--surface-2); }
.sugestoes button small { color: var(--text-3); font-size: 12px; white-space: nowrap; }
@media (max-width: 900px) {
  .hero .actions { flex-wrap: wrap; }
  .hero .actions .btn { flex: 1 1 calc(50% - 5px); padding: 0 10px; font-size: 13px; }
  .hero-resumo .donut.donut-lg svg { width: 210px; height: 210px; }
  .hero-resumo .hero-kpis { grid-template-columns: repeat(2, 1fr); }
  .hero-resumo .legend.legend-grid { grid-template-columns: 1fr; gap: 2px; }
}

/* v1.7: modal de confirmacao, botao de perigo */
.sheet-confirm { width: min(440px, 100%); text-align: center; padding-bottom: 24px; }
.sheet-confirm h3 { margin-top: 6px; }
.confirm-ico { width: 56px; height: 56px; border-radius: 18px; margin: 4px auto 0; display: grid; place-items: center; background: color-mix(in srgb, var(--roxo) 14%, transparent); color: var(--roxo); }
.confirm-ico.perigo { background: var(--bad-soft); color: var(--bad); }
.confirm-ico svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-perigo { background: var(--bad); color: #fff; box-shadow: 0 10px 28px -12px rgba(226,85,47,.7); }
.btn-perigo:hover { filter: brightness(1.08); transform: translateY(-1px); }
@media (min-width: 901px) { .sheet-confirm { bottom: auto; top: 50%; transform: translate(-50%, -40%) scale(.98); border-radius: 22px; opacity: 0; transition: transform .28s var(--ease-out), opacity .28s; } .sheet-confirm.on { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* v1.9: hubs novos (video, grupos) */
.sheet-video { width: min(760px, 100%); }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin-top: 12px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.day { text-decoration: none; color: inherit; }
.day .btn { pointer-events: none; }
a.card { text-decoration: none; color: inherit; display: block; }
a.dim { text-decoration: none; color: inherit; }
.dim .t span { display: block; }
.obj .more svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.parc-i.paga::after { content: ""; }
@media (min-width: 901px) { .sheet-video { bottom: auto; top: 50%; transform: translate(-50%, -40%) scale(.98); border-radius: 22px; opacity: 0; transition: transform .28s var(--ease-out), opacity .28s; } .sheet-video.on { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* v1.10: seletor de mês/ano do hub (o bloco da v1.8 não chegou ao arquivo) e sync travado */
.mes-sel { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: nowrap; margin: 6px 0 14px; }
.mes-sel > button:not(.btn) { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); transition: background .15s, color .15s, transform .15s; }
.mes-sel > button:not(.btn):hover { color: var(--text); background: var(--surface); }
.mes-sel > button:not(.btn):active { transform: scale(.94); }
.mes-sel > button:not(.btn) svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mes-sel .sel { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.mes-sel select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--text); font: 600 14px/1 var(--font-display); padding: 0 26px 0 14px; height: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B82AA' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.mes-sel select:focus-visible { outline: 2px solid var(--roxo); outline-offset: -2px; }
.mes-sel select option { color: #000; background: #fff; }
[data-theme="dark"] .mes-sel select option, :root:not([data-theme="light"]) .mes-sel select option { color: #fff; background: #1c1436; }
.mes-sel select + select { border-left: 1px solid var(--border); }
.mes-sel .btn-sm { height: 36px; padding: 0 14px; white-space: nowrap; }
@media (max-width: 560px) { .mes-sel { gap: 5px; } .mes-sel select { font-size: 13px; padding: 0 22px 0 10px; background-position: right 6px center; } .mes-sel .btn-sm { padding: 0 10px; font-size: 12.5px; } }
@media (max-width: 380px) { .mes-sel .btn-sm { display: none; } }
.sync.travado { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.sync.travado .progress i { background: var(--warn); }

/* v1.11: Saúde (dimensões) e Seu Dinheiro (sheets) */
.dim-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .dim-grid { grid-template-columns: 1fr; } }
.dim { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
.dim-h { display: flex; align-items: center; gap: 12px; }
.dim-h .t { flex: 1; min-width: 0; }
.dim-h .t b { font-size: 15px; } .dim-h .t span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.dim .ring, .dim .ring svg { width: 60px; height: 60px; }
.dim .ring b { font-size: 15px; }
.dim-msg { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dim.open .dim-msg { display: block; -webkit-line-clamp: unset; overflow: visible; }
.dim-more { align-self: flex-start; font-size: 12.5px; font-weight: 600; color: var(--azul); padding: 0; }
.dim-more:hover { text-decoration: underline; }
#saudeChips a.chip { text-decoration: none; }
#saudeChips .chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.field { min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.field input[type="date"] { -webkit-appearance: none; appearance: none; }
.field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }
[data-theme="light"] .field input[type="date"]::-webkit-calendar-picker-indicator { filter: none; }
.sheet .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .sheet .grid-2 { grid-template-columns: 1fr; } }

/* Rede de seguranca: gaveta nenhuma pode passar da tela. Sem isto o conteudo
   que nao cabe sai pela borda de cima e fica inalcancavel. So entra em acao
   quando o formulario realmente e mais alto que a tela. */
.sheet { max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; }

/* Cadastro de divida: no celular o formulario empilhava sete campos e o topo
   da gaveta saia da tela. Os pares continuam lado a lado em qualquer largura;
   so o tipo da divida e o valor da parcela ficam sozinhos na linha. */
.form-divida .grid-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) {
  .form-divida .field { margin-top: 10px; }
  .form-divida .money-input { height: 52px; font-size: 22px; }
  .form-divida .field input, .form-divida .field select { height: 42px; }
}
.sheet-invest { width: min(640px, 100%); max-height: 88vh; overflow: auto; }
.sheet-invest .hero-kpis { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 520px) { .sheet-invest .hero-kpis { grid-template-columns: repeat(2, 1fr); } }
.sheet-invest .tbl td.r { text-align: right; }
@media (min-width: 901px) { .sheet-invest { bottom: auto; top: 50%; transform: translate(-50%, -40%) scale(.98); border-radius: 22px; opacity: 0; transition: transform .28s var(--ease-out), opacity .28s; } .sheet-invest.on { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* v1.12: selo "assistida" na capa do vídeo (ícone sem tamanho virava um triângulo preto) */
.video .thumb .dur { display: inline-flex; align-items: center; gap: 4px; left: auto; right: 8px; bottom: 8px; }
.video .thumb .dur svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* v1.13: Educação (tópicos, progresso, player) e Manual do Investidor */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.topic { text-align: left; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c, var(--roxo)); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-fast); color: inherit; }
.topic:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.topic.on { border-color: var(--c, var(--roxo)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--roxo)) 25%, transparent); }
.topic.done { background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.topic-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.topic-h b { font-size: 14.5px; font-weight: 600; }
.topic .progress i { background: var(--c, var(--roxo)); }
.topic.done .progress i { background: var(--ok); }
.topic-f { display: flex; justify-content: space-between; font-size: 12.5px; }
.topic-f .num { font-weight: 700; }
.topic .chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.seg-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll button { white-space: nowrap; flex: none; }
.seg-scroll button .num { opacity: .7; font-size: 11.5px; margin-left: 4px; }
.video .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video .thumb::after { background: linear-gradient(to top, rgba(0,0,0,.45), transparent 55%); }
.video .thumb .play { z-index: 2; }
.video .thumb .dur { z-index: 2; }
.video .vprog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); z-index: 2; }
.video .vprog i { display: block; height: 100%; background: var(--rosa); }
.video.watched .thumb img { opacity: .7; }
.video.watched .body b { color: var(--text-2); }
.cap-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.cap-list li a { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); text-decoration: none; padding: 4px 0; }
.cap-list li a:hover { color: var(--text); }
.cap-list .cap-n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; flex: none; }
.cap-list li.done .cap-n { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.cap-list .cap-n svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.trail-compact .day { padding: 10px 12px; }
.trail-compact .day p { font-size: 12px; }
@media (max-width: 640px) { .cap-list { grid-template-columns: 1fr; } }
.sheet-video { width: min(860px, 100%); max-height: 92vh; overflow: auto; }
.sheet-video .video-frame { margin-top: 8px; }
.sheet-video .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
/* manual */
.manual { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; margin-top: 18px; }
.cap-nav { position: sticky; top: 76px; }
.cap-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cap-nav button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 13.5px; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.cap-nav button:hover { color: var(--text); background: var(--surface-2); }
.cap-nav button.on { color: var(--text); border-color: var(--roxo); background: color-mix(in srgb, var(--roxo) 10%, var(--surface)); }
.cap-nav .cap-n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11.5px; flex: none; }
.cap-nav .cap-t { flex: 1; min-width: 0; line-height: 1.3; }
.cap-nav .cap-ok { display: none; color: var(--ok); }
.cap-nav .cap-ok svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.cap-nav li.done .cap-n { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.cap-nav li.done .cap-ok { display: block; }
.cap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 28px 20px; }
.cap-head h2 { font-size: 24px; margin-top: 4px; }
.cap-head p { margin-top: 6px; font-size: 14px; }
.cap-body { margin-top: 18px; font-size: 15px; line-height: 1.7; color: var(--text-2); max-width: 72ch; }
.cap-body h3, .cap-body h5 { color: var(--text); font-size: 17px; margin: 22px 0 8px; font-weight: 700; }
.cap-body h5 { font-size: 15px; }
.cap-body p { margin: 0 0 12px; }
.cap-body p span, .cap-body b { color: var(--text); font-weight: 600; }
.cap-body ul { margin: 0 0 12px 20px; }
.cap-body li { margin-bottom: 6px; }
.cap-body a { color: var(--azul); font-weight: 600; }
.cap-body img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0 14px; border: 1px solid var(--border); }
.cap-body .imgs img, .cap-body .imgsB img { max-width: 420px; }
.cap-body .imgs_icones img, .cap-body .imgs_iconesB img, .cap-body .imgs_iconesC img, .cap-body .imgs_iconesD img { display: inline-block; width: 44px; height: 44px; margin: 0 8px 8px 0; border: 0; vertical-align: middle; }
.cap-body .botão_manual, .cap-body .botão_links { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-2); text-decoration: none; margin: 4px 6px 8px 0; font-size: 13.5px; }
.cap-body br + br { display: none; }
.cap-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.cap-foot .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
/* v1.43: o capítulo nunca empurra a página para o lado. A célula da grade
   herdava min-width:auto e uma URL comprida ou uma imagem de 420px alargava
   o artigo inteiro no celular, que passava a rolar na horizontal. */
.manual > * { min-width: 0; max-width: 100%; }
.cap { overflow-wrap: anywhere; }
.cap-body { max-width: min(72ch, 100%); }
.cap-body .imgs img, .cap-body .imgsB img { max-width: min(420px, 100%); }
.cap-body table { display: block; max-width: 100%; overflow-x: auto; }
.cap-body iframe, .cap-body video { max-width: 100%; }

@media (max-width: 900px) {
  .manual { grid-template-columns: minmax(0, 1fr); }
  .cap-nav { position: sticky; top: 56px; z-index: 5; background: var(--bg); padding: 8px 0; margin: 0 -4px; }
  .cap-nav ul { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 0 4px; }
  .cap-nav ul::-webkit-scrollbar { display: none; }
  .cap-nav li { flex: none; }
  .cap-nav button { width: auto; padding: 8px 12px; }
  .cap-nav .cap-t { display: none; }
  .cap-nav button.on .cap-t { display: block; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cap { padding: 18px 16px; }
  .cap-body { font-size: 14.5px; }
  .cap-body ul { margin-left: 16px; }
  .cap-foot { flex-direction: column; }
}

/* v1.14: Dicas, Independência, Jogos, Proteção, Cashback, Cursos */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.topic-grid--dicas .topic { padding: 12px 14px; }
.dica-ico { width: 22px; height: 22px; object-fit: contain; margin-right: 8px; vertical-align: middle; }
.acc-list { display: flex; flex-direction: column; gap: 10px; }
.dica .acc-ico img { width: 22px; height: 22px; object-fit: contain; }
.dica-resumo { font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.parceiros { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.parceiro { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-decoration: none; color: inherit; font-weight: 600; font-size: 13.5px; transition: transform var(--t-fast), border-color var(--t-fast); }
.parceiro:hover { transform: translateY(-1px); border-color: var(--roxo); }
.parceiro img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; }
.parceiro svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; color: var(--text-3); }
.jogo-grid, .curso-grid, .cash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.jogo, .curso, .cash { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: inherit; }
.jogo-capa { height: 110px; display: grid; place-items: center; position: relative; background: linear-gradient(135deg, var(--c, var(--roxo)), color-mix(in srgb, var(--c, var(--roxo)) 40%, #17102E)); }
.jogo-capa svg { width: 40px; height: 40px; stroke: #fff; fill: none; stroke-width: 1.8; }
.jogo-capa .chip { position: absolute; top: 10px; right: 10px; font-size: 11px; }
.jogo-body, .curso-body, .cash-body { padding: 14px 16px 16px; display: flex; flex-direction: column; }
.jogo-body b, .curso-body b, .cash-body b { font-size: 15px; font-weight: 600; display: block; margin-bottom: 4px; }
.jogo-body .btn, .curso-body .btn, .cash-body .btn { align-self: flex-start; }
.curso-capa { aspect-ratio: 16/8; overflow: hidden; }
.curso-capa img { width: 100%; height: 100%; object-fit: cover; }
.curso--breve { opacity: .75; }
.cash-logo { height: 110px; display: grid; place-items: center; background: #fff; padding: 14px; }
.cash-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cash-body .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; margin-left: 4px; }
.prot-grid .prot { text-decoration: none; color: inherit; }
.prot.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.prot.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.prot .btn { align-self: flex-start; }
.card-ink .hero-kpis .vital { background: color-mix(in srgb, var(--on-ink) 7%, transparent); }
.card-ink .hero-kpis .vital b, .card-ink .hero-kpis .vital .mono { color: var(--on-ink); }
.card-ink .hero-kpis .vital small { color: var(--on-ink-muted); }
.chart[data-kind="area"] { min-height: 200px; }

/* v1.15: ajustes Educação/Manual/Dicas/Independência/Proteção/Cashback */
#videos.fechado .video-grid { display: block; }
.video-dica { padding: 28px 16px; }
#eduFechar svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.dica-bloco + .dica-bloco { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.prot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.prot-grid .card { display: flex; flex-direction: column; min-width: 0; }
.prot-grid .card-head { flex-wrap: wrap; }
.prot-grid .card-head h3 { font-size: 15.5px; min-width: 0; }
.prot-grid .card-head .chip { flex: none; }
.prot-grid .btn { margin-top: auto !important; }
.cash-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cash { min-width: 0; }
.cash-logo { height: 130px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 16px; border-bottom: 1px solid var(--border); }
.cash-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cash-body { flex: 1; }
.cash-body .mono { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.cash-body b { margin-top: 4px; font-size: 14.5px; line-height: 1.35; }
.jogo-grid .card, .curso-grid .card, .cash-grid .card { padding: 0; }
/* independência */
.calc { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: start; }
.calc-form { position: sticky; top: 76px; }
.calc-result { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.calc-vazio { min-height: 260px; display: grid; place-items: center; }
.calc-result[hidden] + .calc-vazio { display: grid; }
.calc-result:not([hidden]) + .calc-vazio { display: none; }
.money-input--sm { height: 46px; font-size: 18px; border-radius: 12px; }
.chart[data-kind="area"] { height: auto; min-height: 0; }
.chart[data-kind="area"] svg { width: 100%; height: auto; max-height: 260px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cenarios .tbl tr.on td { background: color-mix(in srgb, var(--roxo) 10%, transparent); }
.sim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sim .more svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.tabs .chip { vertical-align: middle; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } .calc-form { position: static; } .calc-vazio { min-height: 160px; } }

/* v1.16: páginas do Score */
.dim-score { display: flex; align-items: center; gap: 16px; }
.dim-score .ring, .dim-score .ring svg { width: 96px; height: 96px; }
.dim-score .ring b { font-size: 24px; }
.dim-score-t b { display: block; font-family: var(--font-display); font-size: 16px; margin-top: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.check-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.check-item .t { flex: 1; min-width: 0; } .check-item .t b { display: block; font-size: 14px; } .check-item .t > span { font-size: 12.5px; color: var(--text-3); }
.check-item .chev svg, .check-item .ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.capa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.capa img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.capa b { display: block; font-size: 13px; margin-top: 8px; font-weight: 600; line-height: 1.3; }
.fatos { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fatos li { display: flex; flex-direction: column; } .fatos b { font-family: var(--font-display); font-size: 20px; color: var(--on-ink); } .card:not(.card-ink) .fatos b { color: var(--text); font-size: 16px; } .fatos small { color: var(--on-ink-muted); font-size: 12px; } .card:not(.card-ink) .fatos small { color: var(--text-3); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text-2); font-size: 13.5px; }
.link-list a:hover { color: var(--text); } .link-list svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
@media (max-width: 640px) { .link-list { grid-template-columns: 1fr; } }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.meta .meta-v { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 8px; flex-wrap: wrap; }
.meta .meta-v b { font-family: var(--font-display); font-size: 22px; }
.meta-aviso { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.cg-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.cg-hero b { font-family: var(--font-display); font-size: clamp(22px, 3vw, 34px); color: var(--on-ink); display: block; } .cg-hero span { font-size: 12.5px; color: var(--on-ink-muted); }
@media (max-width: 520px) { .cg-hero { grid-template-columns: 1fr; } }
.passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; counter-reset: p; }
.passos li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.passo-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--roxo), var(--rosa)); color: #fff; font-family: var(--font-display); font-weight: 700; flex: none; }
.passos b { display: block; font-size: 14px; } .passos li > div > span { font-size: 12.5px; color: var(--text-3); }
.perguntas li { gap: 12px; } .perguntas .btn { flex: none; }
.desafio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.desafio { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c); color: inherit; transition: background var(--t-fast); }
.desafio b { font-size: 14px; font-weight: 600; }
.desafio-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-2); display: grid; place-items: center; flex: none; color: transparent; transition: background var(--t-fast), color var(--t-fast); }
.desafio-check svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 3; }
.desafio.on { background: color-mix(in srgb, var(--c) 10%, var(--surface)); } .desafio.on .desafio-check { background: var(--c); border-color: var(--c); color: #fff; } .desafio.on b { text-decoration: line-through; opacity: .7; }

/* v1.17: ajustes de layout (Organização, Segurança, Dívidas, Dicas, Independência) */
.passos { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .passos { grid-template-columns: repeat(3, 1fr); } .passos li:nth-child(4) { grid-column: 1 / 2; } .passos li:nth-child(4), .passos li:nth-child(5) { grid-column: span 1; } }
@media (max-width: 640px) { .passos { grid-template-columns: 1fr; } }
.desafio-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .desafio-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .desafio-grid { grid-template-columns: 1fr; } }
#divDiag .hero-kpis { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) {
  #segKpis { grid-template-columns: 1fr 1fr; }
  #segKpis .vital:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; }
}
.parceiros { gap: 10px; }
.parceiro { flex: 0 1 auto; }
@media (max-width: 640px) { .parceiros { flex-direction: column; } .parceiro { width: 100%; justify-content: space-between; } .parceiro span { flex: 1; } }
.field label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#efVideosBtn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .2s; }
#efVideosBtn.on svg { transform: rotate(180deg); }
.msg-card { display: flex; gap: 14px; align-items: center; }
.msg-card img { width: 56px; height: 56px; object-fit: contain; flex: none; }

/* v1.18: Perfil e formulários de Proteção */
.perfil-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.perfil-foto { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avatar-xl { width: 112px; height: 112px; font-size: 40px; border-radius: 32px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--roxo), var(--rosa)); color: #fff; font-family: var(--font-display); font-weight: 700; position: relative; }
.avatar-xl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.perfil-foto-acoes { display: flex; gap: 6px; }
.perfil-foto-acoes .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.perfil-salvar { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 16px; padding: 10px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); z-index: 5; }
.perfil-salvar .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
@media (max-width: 900px) { .perfil-salvar { bottom: 74px; } }
.seg-sn { margin-top: 10px; }
.seg-sn button { min-width: 96px; }
#pfSalvar svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* v1.19: tópicos visíveis, checklist 3+2, grades de 2 por linha */
@media (min-width: 901px) { .seg-scroll { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 900px) { .seg-scroll { mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 24px; } }
.check-grid { grid-template-columns: repeat(6, 1fr); }
.check-item { grid-column: span 2; }
.check-item:nth-child(4) { grid-column: 2 / span 2; }
.check-item:nth-child(5) { grid-column: 4 / span 2; }
@media (max-width: 900px) { .check-grid { grid-template-columns: 1fr 1fr; } .check-item, .check-item:nth-child(4), .check-item:nth-child(5) { grid-column: span 1; } .check-item:nth-child(5) { grid-column: 1 / -1; } }
@media (max-width: 560px) { .check-grid { grid-template-columns: 1fr; } .check-item:nth-child(5) { grid-column: span 1; } }
.meta-grid--2 { grid-template-columns: 1fr 1fr; }
#segAreas { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .meta-grid--2, #segAreas { grid-template-columns: 1fr; } }

/* v1.20: tema claro completo, tópicos 3 por linha, seletor numa linha, Proteção 3+2 */
.hero { border: 1px solid var(--border); }
:root[data-theme="light"] .hero .grid-bg, :root:not([data-theme="dark"]) .hero .grid-bg { opacity: .35; }
:root[data-theme="light"] .hero .aurora i, :root:not([data-theme="dark"]) .hero .aurora i { opacity: .55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero .grid-bg { opacity: 1; } :root:not([data-theme="light"]) .hero .aurora i { opacity: 1; } }
.hero .lead, .card-ink .lead { color: var(--on-ink-muted); }
.hero .eyebrow { color: var(--on-ink-muted); }
.hero .btn-outline { color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 25%, transparent); }
.hero .chip, .card-ink .chip { background: color-mix(in srgb, var(--on-ink) 8%, transparent); color: var(--on-ink); }
.hero .chip.ok, .card-ink .chip.ok { color: var(--ok); } .hero .chip.warn, .card-ink .chip.warn { color: var(--warn); } .hero .chip.bad, .card-ink .chip.bad { color: var(--bad); }
.hero .mono, .card-ink .mono, .dim-score-t .muted-2 { color: var(--on-ink-muted); }
.dim-score-t b { color: var(--on-ink); }
.hero .donut .center { fill: var(--on-ink); }
.hero .legend, .hero .legend b, .hero .legend .lg-n { color: var(--on-ink); }
.hero .progress, .card-ink .progress { background: color-mix(in srgb, var(--on-ink) 12%, transparent); }
.hero .field input, .hero .field select { background: color-mix(in srgb, var(--on-ink) 6%, transparent); color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 18%, transparent); }
.hero .field input::placeholder { color: var(--on-ink-muted); }
.hero .muted, .card-ink .muted { color: var(--on-ink-muted); }
.hero .empty, .card-ink .empty { color: var(--on-ink-muted); border-color: color-mix(in srgb, var(--on-ink) 20%, transparent); }
.topic-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .topic-grid { grid-template-columns: 1fr; } }
@media (min-width: 901px) {
  .seg-scroll { flex-wrap: nowrap; overflow: hidden; width: 100%; max-width: none; }
  .seg-scroll button { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 8px 8px; font-size: 12.5px; text-align: center; }
  .seg-scroll button .num { font-size: 11px; margin-left: 3px; }
  #videos .section-head { flex-wrap: nowrap !important; }
  #videos .section-head > div { flex: 1; min-width: 0; }
}
@media (min-width: 901px) and (max-width: 1240px) { .seg-scroll button .num { display: none; } }
[data-hub="protecao"] .prot-grid { grid-template-columns: repeat(6, 1fr); }
[data-hub="protecao"] .prot-grid .prot { grid-column: span 2; }
[data-hub="protecao"] .prot-grid .prot:nth-child(4) { grid-column: 2 / span 2; }
[data-hub="protecao"] .prot-grid .prot:nth-child(5) { grid-column: 4 / span 2; }
@media (max-width: 900px) { [data-hub="protecao"] .prot-grid { grid-template-columns: 1fr 1fr; } [data-hub="protecao"] .prot-grid .prot, [data-hub="protecao"] .prot-grid .prot:nth-child(4), [data-hub="protecao"] .prot-grid .prot:nth-child(5) { grid-column: span 1; } [data-hub="protecao"] .prot-grid .prot:nth-child(5) { grid-column: 1 / -1; } }
@media (max-width: 560px) { [data-hub="protecao"] .prot-grid { grid-template-columns: 1fr; } [data-hub="protecao"] .prot-grid .prot:nth-child(5) { grid-column: span 1; } }

/* v1.21: agenda de pagamentos (Home) */
.ag-resumo { margin-bottom: 14px; }
.ag-resumo .vital { background: var(--surface); border-color: var(--border); }
.ag-resumo .vital b { color: var(--text); } .ag-resumo .vital .mono, .ag-resumo .vital small { color: var(--text-3); }
.ag-resumo .vital.warn b { color: var(--warn); } .ag-resumo .vital.bad b { color: var(--bad); } .ag-resumo .vital.ok b { color: var(--ok); }
.ag-wrap { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ag-wrap { grid-template-columns: 1fr; } }
.ag-novo { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.ag-novo .btn { width: 100%; justify-content: center; }
.ag-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ag-nav b { font-family: var(--font-display); font-size: 16px; text-transform: capitalize; }
.ag-nav .more svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.ag-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ag-dow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); text-align: center; padding: 4px 0 6px; }
.ag-dia { aspect-ratio: 1; border-radius: 12px; border: 1px solid transparent; background: var(--surface-2); color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 13.5px; font-weight: 600; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.ag-dia:hover { background: var(--surface-3); transform: translateY(-1px); }
.ag-dia.tem { color: var(--text); }
.ag-dia.hoje { border-color: var(--roxo); }
.ag-dia.sel { background: linear-gradient(135deg, var(--roxo), var(--rosa)); color: #fff; border-color: transparent; }
.ag-dia.sel .ag-pt { background: #fff !important; }
.ag-pts { display: flex; gap: 3px; height: 6px; }
.ag-pt { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--text-3); }
.ag-pt.aberto { background: var(--roxo); } .ag-pt.hoje { background: var(--warn); } .ag-pt.vencido { background: var(--bad); } .ag-pt.pago { background: var(--ok); }
.ag-legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.ag-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.ag-ev { flex-wrap: wrap; gap: 8px; }
.ag-ev.vencido .ico { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.ag-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.ag-acoes .more svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.ag-empty { padding: 18px 12px; }
@media (max-width: 560px) { .ag-acoes { width: 100%; justify-content: space-between; } }

/* v1.22: consultas, agenda do médico, notificações e sino */
.seg-wrap { flex-wrap: wrap; }
.eyebrow-2 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--roxo); }
.field textarea { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.cs-steps { display: grid; gap: 16px; }
.cs-step.off { opacity: .45; pointer-events: none; filter: saturate(.6); }
.cs-num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--roxo), var(--rosa)); margin-right: 8px; }
.cs-medicos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cs-med { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast); position: relative; }
.cs-med:hover { transform: translateY(-1px); border-color: var(--border-2); }
.cs-med.on { border-color: var(--roxo); background: color-mix(in srgb, var(--roxo) 8%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--roxo) 18%, transparent); }
.cs-med .avatar-lg { width: 56px; height: 56px; border-radius: 18px; font-size: 18px; overflow: hidden; position: relative; flex: none; }
.cs-med .avatar-lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; border-radius: inherit; }
.cs-med-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.cs-med-t b { font-weight: 700; } .cs-med-t > span { font-size: 12.5px; color: var(--text-3); }
.cs-med-vaga { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2) !important; margin-top: 4px; }
.cs-med-vaga svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.cs-med-check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--roxo); color: #fff; opacity: 0; transform: scale(.6); transition: opacity var(--t-fast), transform var(--t-fast); flex: none; }
.cs-med.on .cs-med-check { opacity: 1; transform: scale(1); }
.cs-med-check svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.cs-cal { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .cs-cal { grid-template-columns: 1fr; } }
.cs-grade .ag-dia.sem { opacity: .4; cursor: default; } .cs-grade .ag-dia.sem:hover { transform: none; background: var(--surface-2); }
.cs-grade .ag-dia.skel { animation: skel 1.2s ease-in-out infinite; }
.cs-dia-titulo { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.cs-vazio { grid-column: 1 / -1; }
.cs-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.cs-slot { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 14.5px; transition: border-color var(--t-fast), background var(--t-fast); }
.cs-slot small { font-size: 11px; color: var(--text-3); font-weight: 500; margin-top: 2px; }
.cs-slot:hover { border-color: var(--border-2); }
.cs-slot.on { background: linear-gradient(135deg, var(--roxo), var(--rosa)); color: #fff; border-color: transparent; } .cs-slot.on small { color: rgba(255,255,255,.8); }
.cs-resumo { margin-top: 14px; }
.cs-resumo-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--roxo) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--roxo) 25%, transparent); }
.cs-resumo-box b { display: block; } .cs-resumo-box .muted { font-size: 13px; }
.cs-confirm { border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 10%, var(--surface)), var(--surface)); }
.cs-confirm-grid { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 18px; align-items: center; }
@media (max-width: 860px) { .cs-confirm-grid { grid-template-columns: 1fr; } }
.cs-confirm-quando b { display: block; font-family: var(--font-display); font-size: 20px; margin: 4px 0 2px; text-transform: capitalize; }
.cs-confirm-quando .muted { font-size: 13.5px; }
.cs-confirm-medico { display: flex; align-items: center; gap: 12px; } .cs-confirm-medico .avatar-lg { width: 52px; height: 52px; border-radius: 16px; font-size: 17px; }
.cs-confirm-medico b { display: block; }
.cs-confirm-acoes { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.cs-confirm p svg { width: 14px; height: 14px; vertical-align: -2px; stroke: currentColor; fill: none; stroke-width: 2; }
.am-semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
@media (max-width: 1100px) { .am-semana { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .am-semana { grid-template-columns: repeat(2, 1fr); } }
.am-dia { padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 96px; }
.am-dia > b { font-family: var(--font-display); font-size: 14px; color: var(--text-3); }
.am-dia.tem > b { color: var(--roxo); }
.am-regra { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--roxo) 10%, var(--surface)); font-size: 13px; font-weight: 600; }
.am-regra small { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; }
.am-regra .more { width: 24px; height: 24px; } .am-regra .more svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.am-consulta.breve { background: color-mix(in srgb, var(--warn) 8%, transparent); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 12px; }
.am-obs { font-style: italic; color: var(--text-2) !important; margin-top: 4px !important; }
.bell-wrap { position: relative; }
.bell-badge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rosa); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px var(--bg); }
.bell-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow-2); z-index: 60; overflow: hidden; }
.bell-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.bell-pop-head b { font-family: var(--font-display); font-size: 15px; }
.bell-pop .link { color: var(--roxo); font-weight: 600; font-size: 12.5px; }
.bell-pop-lista { max-height: 380px; overflow: auto; padding: 0 8px; }
.bell-pop-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-top: 1px solid var(--border); color: var(--roxo); font-weight: 600; font-size: 13.5px; }
.bell-pop-foot svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.bell-pop-cta { display: flex; align-items: center; gap: 10px; margin: 8px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--roxo) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--roxo) 25%, transparent); }
.bell-pop-cta > span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--roxo); color: #fff; flex: none; }
.bell-pop-cta > span svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.bell-pop-cta > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .bell-pop-cta > div b { font-size: 13px; } .bell-pop-cta > div span { font-size: 12px; color: var(--text-3); }
.bell-pop-cta .more { width: 26px; height: 26px; } .bell-pop-cta .more svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.nt-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 8px; border-radius: 12px; color: var(--text); position: relative; transition: background var(--t-fast); }
.nt-item:hover { background: var(--surface-2); }
.nt-item .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.nt-item .ico.roxo { background: color-mix(in srgb, var(--roxo) 14%, transparent); color: var(--roxo); } .nt-item .ico.warn { background: var(--warn-soft); color: var(--warn); } .nt-item .ico.bad { background: var(--bad-soft); color: var(--bad); } .nt-item .ico.azul { background: color-mix(in srgb, var(--azul) 14%, transparent); color: var(--azul); }
.nt-item .ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.nt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.nt-t b { font-size: 14px; font-weight: 600; } .nt-t > span { font-size: 13px; color: var(--text-2); line-height: 1.4; } .nt-t small { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.nt-item.nova b { color: var(--text); } .nt-item:not(.nova) { opacity: .78; }
.nt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rosa); flex: none; margin-top: 6px; box-shadow: 0 0 10px var(--rosa); }
.nt-grupo { padding: 4px 0 8px; } .nt-grupo + .nt-grupo { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; }
.nt-grupo-t { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 6px 8px; }
.nt-topo { margin-bottom: 16px; }
.nt-push { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.nt-push .tx { flex: 1; min-width: 240px; } .nt-push .t > span { white-space: normal; line-height: 1.4; }
.nt-push-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@keyframes skel { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* v1.23: questionário da consulta e panorama do médico */
.cs-perg-grid { margin-top: 4px; }
.cs-perg-grid .field { margin-top: 10px; }
.cs-panorama { margin-top: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; background: var(--surface-2); }
.cs-panorama summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--roxo); list-style: none; display: flex; align-items: center; gap: 6px; }
.cs-panorama summary::before { content: "▸"; font-size: 11px; transition: transform var(--t-fast); }
.cs-panorama[open] summary::before { transform: rotate(90deg); }
.cs-resp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin-top: 10px; }
.cs-resp { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.cs-resp span { color: var(--text-3); font-size: 12px; line-height: 1.3; } .cs-resp b { font-weight: 600; }
.am-consulta .t .cs-panorama { margin-top: 8px; }

/* v1.24: apagar notificações, botão desabilitado */
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; filter: saturate(.5); transform: none !important; box-shadow: none !important; }
.nt-x { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); flex: none; opacity: 0; transition: opacity var(--t-fast), background var(--t-fast), color var(--t-fast); align-self: center; }
.nt-x svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.nt-item:hover .nt-x, .nt-x:focus-visible { opacity: 1; } .nt-x:hover { background: var(--bad-soft); color: var(--bad); }
@media (hover: none) { .nt-x { opacity: 1; } }
.bell-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13.5px; }
.bell-pop-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--roxo); font-weight: 600; }

/* v1.27: Sua Receita */
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 620px) { .rc-grid { grid-template-columns: 1fr; } }
.rc-card { display: flex; flex-direction: column; gap: 12px; }
.rc-card.feita { opacity: .72; }
.rc-topo { display: flex; align-items: flex-start; gap: 12px; }
.rc-topo .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.rc-topo .ico.roxo { background: color-mix(in srgb, var(--roxo) 14%, transparent); color: var(--roxo); }
.rc-topo .ico.warn { background: var(--warn-soft); color: var(--warn); }
.rc-topo .ico.ok { background: var(--ok-soft); color: var(--ok); }
.rc-topo .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.rc-cab { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-cab b { font-family: var(--font-display); font-size: 16px; line-height: 1.25; }
.rc-cab .muted { font-size: 12.5px; }
.rc-texto { font-size: 14.5px; line-height: 1.55; color: var(--text-2); margin: 0; white-space: pre-line; }
.rc-card.feita .rc-texto { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 60%, transparent); }
.rc-links { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-links .chip { text-decoration: none; }
.rc-links .chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.rc-thread { display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--border-2); padding-left: 12px; }
.rc-msg { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.rc-msg b { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.rc-msg span { color: var(--text); line-height: 1.45; }
.rc-msg small { font-size: 11.5px; color: var(--text-3); }
.rc-msg.medico b { color: var(--roxo); }
.rc-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
/* mover e excluir (médico): juntos, à direita, em botões redondos iguais */
.rc-ferramentas { display: inline-flex; gap: 6px; margin-left: auto; }
.rc-ferramentas .more { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; }
.rc-ferramentas .more:hover { border-color: var(--roxo); color: var(--roxo); }
.rc-ferramentas .more svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rc-resposta { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.rc-resposta .field { margin-top: 0; } .rc-resposta textarea { min-height: 80px; width: 100%; box-sizing: border-box; resize: vertical; }
.rc-resposta .field + div { margin-top: 10px; }
.rc-cliente .avatar-lg { width: 52px; height: 52px; border-radius: 16px; font-size: 17px; }
.rc-atalhos { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-atalho { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 600; }
.rc-atalho:hover { border-color: var(--roxo); background: color-mix(in srgb, var(--roxo) 8%, var(--surface)); }
.sheet-receita { width: min(620px, 100%); max-height: 92vh; overflow: auto; }
.rc-resultados { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; max-height: 240px; overflow: auto; }
.rc-res { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; }
.rc-res:hover { border-color: var(--roxo); }
.rc-res b { font-size: 14px; } .rc-res span { font-size: 12px; color: var(--text-3); margin-left: auto; } .rc-res i { font-style: normal; }
.rc-escolhido { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--roxo) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--roxo) 22%, transparent); }
.rc-link-linha { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.rc-link-linha input { flex: 1; height: 44px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); padding: 0 12px; }
.rc-link-linha .more svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* v1.28: perfil de investidor */
.st-card { max-width: 780px; margin-inline: auto; }
.st-progresso { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.st-barra { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.st-barra i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--roxo), var(--rosa)); transition: width var(--t-med) var(--ease-spring); }
.st-progresso .mono { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.st-card h2 { font-size: 21px; line-height: 1.25; text-wrap: balance; }
.st-opcoes { display: flex; flex-direction: column; gap: 10px; }
.st-opcao { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 14.5px; line-height: 1.45; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.st-opcao:hover { border-color: var(--border-2); transform: translateY(-1px); }
.st-opcao.on { border-color: var(--roxo); background: color-mix(in srgb, var(--roxo) 9%, var(--surface)); }
.st-marca { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-2); display: grid; place-items: center; flex: none; margin-top: 1px; color: transparent; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.st-marca svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 3; }
.st-opcao.on .st-marca { background: var(--roxo); border-color: var(--roxo); color: #fff; }
.st-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.st-nav .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.st-resultado { border: 1px solid color-mix(in srgb, var(--perfil) 40%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--perfil) 10%, var(--surface)), var(--surface) 60%); }
.st-res-topo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.st-selo { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--perfil); color: #fff; flex: none; }
.st-selo svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; }
.st-res-topo h2 { font-size: 26px; margin: 2px 0; color: var(--perfil); }
.st-res-topo .muted { font-size: 14px; }
.st-pontos { text-align: center; }
.st-pontos b { display: block; font-family: var(--font-display); font-size: 28px; color: var(--perfil); }
.st-pontos small { font-size: 11.5px; color: var(--text-3); }
.st-res-texto { font-size: 15px; line-height: 1.6; color: var(--text-2); margin: 18px auto; max-width: 66ch; text-align: center; }
.st-carteira { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; justify-content: center; }
.st-carteira .chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.st-video { max-width: 640px; margin: 0 auto; }
.st-proximos { margin-top: 22px; }
.st-proximos > b { display: block; font-family: var(--font-display); font-size: 15px; margin-bottom: 10px; }
.st-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.st-links .card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.st-links .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--roxo) 12%, transparent); color: var(--roxo); }
.st-links .ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.st-links b { display: block; font-size: 14px; } .st-links .muted { font-size: 12.5px; }

/* v1.29: Seu Tutorial e Cartoes */
.tu-anel { display: grid; place-items: center; }
.tu-ring { position: relative; width: 190px; height: 190px; }
.tu-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tu-ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.tu-ring .trilho { stroke: color-mix(in srgb, var(--on-ink) 14%, transparent); }
.tu-ring .valor { stroke: var(--rosa-2); transition: stroke-dasharray var(--t-slow) var(--ease-spring); }
.tu-ring .ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; line-height: 1.1; }
.tu-ring .ring-txt b { position: static; inset: auto; display: block; font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--on-ink); }
.tu-ring .ring-txt span { font-size: 12.5px; color: var(--on-ink-muted); }
.tu-continuar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tu-cap { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--roxo), var(--rosa)); color: #fff; flex: none; }
.tu-cap svg { width: 22px; height: 22px; stroke: currentColor; fill: currentColor; }
.tu-cont-txt { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.tu-cont-txt b { font-family: var(--font-display); font-size: 17px; }
.tu-cont-txt .muted { font-size: 13px; }
.tu-modulo { padding: 0; overflow: hidden; }
.tu-modulo summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; }
.tu-modulo summary::-webkit-details-marker { display: none; }
.tu-modulo + .tu-modulo { margin-top: 12px; }
.tu-num { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.tu-modulo.ok .tu-num { background: var(--ok-soft); color: var(--ok); }
.tu-num svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.6; }
.tu-mod-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tu-mod-txt b { font-family: var(--font-display); font-size: 16px; } .tu-mod-txt .muted { font-size: 12.5px; }
.tu-aulas { padding: 0 18px 12px; }
.tu-aulas > li { gap: 14px; padding-right: 4px; }
.tu-aulas > li > .btn { flex: none; margin-left: 8px; }
.tu-aulas > li.vista .tu-check { background: var(--ok-soft); color: var(--ok); }
.tu-aula { display: flex; align-items: center; gap: 12px; text-align: left; flex: 1; min-width: 0; }
.tu-check { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--roxo) 12%, transparent); color: var(--roxo); }
.tu-check svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.tu-aula .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tu-aula .t b { font-size: 14px; font-weight: 600; } .tu-aula .t span { font-size: 12.5px; color: var(--text-3); }
.tu-aula-acoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.tu-aula-acoes .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.ct-wizard { max-width: 820px; }
.ct-passo h2 { font-size: 20px; margin: 6px 0 16px; }
.ct-escolhas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ct-escolha { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-align: left; transition: border-color var(--t-fast), transform var(--t-fast); }
.ct-escolha:hover { border-color: var(--roxo); transform: translateY(-2px); }
.ct-escolha.on { border-color: var(--roxo); background: color-mix(in srgb, var(--roxo) 8%, var(--surface)); }
.ct-escolha .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--roxo) 14%, transparent); color: var(--roxo); margin-bottom: 8px; }
.ct-escolha .ico svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.ct-escolha b { font-size: 15.5px; } .ct-escolha span { font-size: 12.5px; color: var(--text-3); }
.ct-nav { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ct-nav .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ct-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; }
.ct-capa { width: 62px; height: 40px; border-radius: 8px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--surface-3); }
.ct-capa img { width: 100%; height: 100%; object-fit: cover; }
.ct-capa.sem { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #fff; background: linear-gradient(135deg, var(--roxo), var(--azul)); }
.ct-capa.g { width: 108px; height: 70px; border-radius: 12px; font-size: 22px; }
.ct-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ct-txt b { font-size: 14.5px; } .ct-txt .muted { font-size: 12.5px; }
.ct-reco { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.ct-reco-txt { flex: 1; min-width: 260px; }
.ct-reco-txt h2 { font-size: 22px; margin-bottom: 4px; }
.ct-dados { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.ct-linha { display: flex; gap: 14px; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed var(--border); padding-bottom: 6px; font-size: 13.5px; }
.ct-linha span { color: var(--text-3); flex: none; } .ct-linha b { text-align: right; font-weight: 600; }
.ct-reco-acoes { display: flex; gap: 10px; flex-wrap: wrap; }
.ct-reco-acoes .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.sheet-cartao { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.ct-det-topo { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.ct-det-topo h3 { font-size: 19px; }

/* v1.30: Seus Documentos */
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.dc-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.dc-capa { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.dc-capa img { width: 100%; height: 100%; object-fit: cover; }
.dc-ext { font-family: var(--font-mono); font-weight: 600; font-size: 15px; letter-spacing: .08em; color: var(--roxo); }
.dc-txt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.dc-txt b { font-size: 14px; line-height: 1.3; }
.dc-acoes { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.dc-acoes .btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.dc-acoes .more { margin-left: auto; } .dc-acoes .more svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.dc-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border-radius: 14px; border: 1.5px dashed var(--border-2); background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color var(--t-fast), background var(--t-fast); }
.dc-drop:hover { border-color: var(--roxo); background: color-mix(in srgb, var(--roxo) 6%, var(--surface)); }
.dc-drop svg { width: 22px; height: 22px; stroke: var(--roxo); fill: none; stroke-width: 2; margin-bottom: 4px; }
.dc-drop b { font-size: 14.5px; } .dc-drop span { font-size: 12.5px; }

/* v1.31: Seu Extrato Futuro */
.ef-grafico { margin-bottom: 18px; padding: 14px 10px 6px; }
.ef-svg { width: 100%; height: auto; display: block; }
.ef-linha { fill: none; stroke: var(--roxo); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ef-area { fill: color-mix(in srgb, var(--roxo) 16%, transparent); stroke: none; }
.ef-zero { stroke: var(--border-2); stroke-width: 1; stroke-dasharray: 4 4; }
.ef-neg { fill: var(--bad); }
.ef-eixo { fill: var(--text-3); font-family: var(--font-mono); font-size: 10.5px; }
.ef-dias { display: flex; flex-direction: column; gap: 12px; }
.ef-dia { padding: 14px 16px; }
.ef-dia.negativo { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.ef-dia-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ef-dia-topo b { font-family: var(--font-display); font-size: 15px; text-transform: capitalize; }
.ef-saldo { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--text-2); }
.ef-saldo.bad { color: var(--bad); }
.ef-dia .list > li { padding: 10px 0; }
.ef-dia .amount.ok { color: var(--ok); }
.ef-dia-rodape { display: flex; gap: 16px; justify-content: flex-end; font-family: var(--font-mono); font-size: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.ef-dia-rodape .ok { color: var(--ok); } .ef-dia-rodape .bad { color: var(--bad); }
.alert .link { color: var(--roxo); font-weight: 600; text-decoration: underline; }
/* v1.33: modal de aula e vitrine de cartoes */
.sheet-video .card-head { margin-bottom: 4px; }
.sheet-video .card-head h3 { font-size: 17px; line-height: 1.3; }
.sheet-video > .muted { margin: 0 0 12px !important; }
.sheet-video .video-frame { margin-top: 0; }
.ct-wizard { max-width: 820px; margin: 0 auto; }
.ct-passo { text-align: center; }
.ct-passo h2 { font-size: 20px; margin: 6px auto 18px; max-width: 34ch; }
.ct-escolhas { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 620px; margin: 0 auto; }
.ct-escolha { align-items: center; text-align: center; }
.ct-escolha .ico { margin: 0 auto 8px; }
.ct-nav { justify-content: center; }
.ct-passo .field { margin-left: auto; margin-right: auto; text-align: left; }
.ct-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .ct-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ct-grid { grid-template-columns: 1fr; } }
.ct-card { flex-direction: column; align-items: stretch; gap: 12px; text-align: left; padding: 16px; }
.ct-card .ct-capa { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; }
.ct-card .ct-capa img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }
.ct-card .ct-capa.sem { font-size: 26px; }
.ct-nome { font-family: var(--font-display); font-size: 15.5px; line-height: 1.25; }
.ct-desc { font-size: 12.5px; color: var(--text-3); line-height: 1.4; min-height: 2.8em; }
.ct-valor { margin-top: auto; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--roxo); background: color-mix(in srgb, var(--roxo) 10%, transparent); border-radius: var(--r-pill); padding: 6px 12px; align-self: flex-start; }

/* v1.35: Sua Receita em pastas */
.rc-trilha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13.5px; color: var(--text-3); }
.rc-trilha[hidden] { display: none; }
.rc-trilha span { color: var(--text-3); }
.rc-trilha b { color: var(--text); font-weight: 600; }
.rc-trilha-item { display: inline-flex; align-items: center; gap: 6px; color: var(--roxo); font-weight: 600; }
.rc-trilha-item:hover { text-decoration: underline; }
.rc-trilha-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.rc-pastas { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 18px; }
.rc-pasta { position: relative; padding-top: 14px; text-align: left; display: block; transition: transform var(--t-fast) var(--ease-spring); }
.rc-pasta:hover { transform: translateY(-4px); }
.rc-pasta-aba { position: absolute; top: 0; left: 10px; width: 46%; height: 20px; border-radius: 10px 12px 0 0; background: linear-gradient(135deg, color-mix(in srgb, var(--roxo) 70%, var(--surface-3)), var(--surface-3)); }
.rc-pasta.alerta .rc-pasta-aba { background: linear-gradient(135deg, var(--roxo), var(--rosa)); }
.rc-pasta-papel { position: absolute; left: 12px; right: 12px; top: 20px; height: 74px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); transition: transform var(--t-med) var(--ease-spring); }
.rc-pasta-papel.p2 { left: 18px; right: 18px; background: var(--surface-3); }
.rc-pasta:hover .rc-pasta-papel.p1 { transform: translateY(-12px) rotate(-1.6deg); }
.rc-pasta:hover .rc-pasta-papel.p2 { transform: translateY(-20px) rotate(2.2deg); }
.rc-pasta-corpo { position: relative; display: flex; flex-direction: column; gap: 5px; height: 152px; padding: 14px; border-radius: 4px 14px 14px 14px; background: var(--surface); border: 1px solid var(--border-2); box-shadow: var(--shadow-1); }
.rc-pasta.alerta .rc-pasta-corpo { border-color: color-mix(in srgb, var(--roxo) 40%, transparent); }
.rc-pasta-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.rc-pasta-topo svg { width: 20px; height: 20px; stroke: var(--roxo); fill: none; stroke-width: 1.9; }
.rc-pasta-topo .avatar { width: 32px; height: 32px; font-size: 12.5px; }
.rc-pasta-corpo > b { font-family: var(--font-display); font-size: 15.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-pasta-sub, .rc-pasta-conta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-pasta-sub { font-size: 12.5px; color: var(--text-3); }
.rc-pasta-conta { margin-top: auto; font-size: 12.5px; color: var(--text-3); }
.rc-pasta-conta b { font-family: var(--font-display); font-size: 20px; color: var(--roxo); margin-right: 4px; }
@media (prefers-reduced-motion: reduce) { .rc-pasta, .rc-pasta-papel { transition: none; } }

/* ============================================================
   v1.36: telas públicas (entrar, criar conta, nova senha).
   A tela inteira é um monitor de sinais vitais ao vivo: o canvas #pubCena
   desenha aurora, grade em fuga, traçados de ECG e partículas atrás de tudo,
   e o formulário flutua num cartão de vidro. Mesma cena no celular e no
   computador, muda só a composição. Movimento desligado em
   prefers-reduced-motion e com a aba em segundo plano.
   ============================================================ */
@property --sd-ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

.pub-body {
  --cena-a: #08041A; --cena-b: #150733; --cena-c: #24094A;
  --cena-g1: 130, 10, 209; --cena-g2: 249, 71, 119; --cena-g3: 54, 65, 237;
  --cena-linha: 255, 255, 255; --cena-linha-op: 0.055;
  --cena-ecg: 249, 71, 119; --cena-ecg2: 118, 168, 255; --cena-po: 255, 255, 255;
  --vidro: rgba(16, 8, 36, 0.56); --vidro-solido: rgba(14, 7, 32, 0.94);
  --vidro-borda: rgba(255, 255, 255, 0.14);
  --cena-txt: #F7F3FF; --cena-txt-2: rgba(247, 243, 255, 0.70); --cena-txt-3: rgba(247, 243, 255, 0.50);
  --campo-bg: rgba(255, 255, 255, 0.055); --campo-borda: rgba(255, 255, 255, 0.16);
  background: var(--cena-a);
}
html[data-theme="light"] .pub-body {
  --cena-a: #F3EEFF; --cena-b: #E4DAFB; --cena-c: #D6C6F7;
  --cena-linha: 60, 20, 110; --cena-linha-op: 0.07;
  --cena-ecg: 194, 30, 90; --cena-ecg2: 54, 65, 237; --cena-po: 90, 40, 150;
  --vidro: rgba(255, 255, 255, 0.72); --vidro-solido: rgba(255, 255, 255, 0.95);
  --vidro-borda: rgba(90, 40, 150, 0.16);
  --cena-txt: #1B0B33; --cena-txt-2: rgba(27, 11, 51, 0.72); --cena-txt-3: rgba(27, 11, 51, 0.55);
  --campo-bg: rgba(255, 255, 255, 0.66); --campo-borda: rgba(90, 40, 150, 0.20);
}

/* --- a cena --- */
#pubCena { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.pub-veu { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, color-mix(in srgb, var(--cena-a) 70%, transparent) 100%); }
.pub { position: relative; z-index: 2; min-height: 100dvh; display: flex; flex-direction: column; color: var(--cena-txt); }

/* --- cabeçalho da marca --- */
.pub-topo { position: relative; display: flex; align-items: center; justify-content: center; padding: 20px 20px 8px; }
.pub-marca { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; }
.pub-marca .brand-logo { margin: 0 auto; }
.pub-topo .icon-btn { position: absolute; right: 18px; top: 16px; }
.pub-marca .brand-logo { height: 30px; width: auto; display: block; }
.pub-marca .cls-1 { fill: var(--cena-txt); } .pub-marca .cls-2 { fill: var(--rosa-2); }
.pub-marca span { font-size: 12px; color: var(--cena-txt-2); }
.pub-topo .icon-btn, .pub-barra .icon-btn { color: var(--cena-txt); background: color-mix(in srgb, var(--cena-txt) 10%, transparent); border: 1px solid var(--vidro-borda); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pub-topo .icon-btn:hover, .pub-barra .icon-btn:hover { background: color-mix(in srgb, var(--cena-txt) 18%, transparent); }

/* --- corpo --- */
.pub-main { flex: 1; display: flex; flex-direction: column; }
.pub-conteudo { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 16px 16px 20px; }
.pub-barra { display: none; }
.pub-rodape { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; padding: 12px 20px 18px; font-size: 12px; color: var(--cena-txt-3); }
.pub-rodape a { color: var(--cena-txt-3); text-decoration: underline; text-underline-offset: 2px; }

/* --- cartão de vidro --- */
.pub-card { position: relative; display: flex; flex-direction: column;
  width: min(470px, 100%); padding: 26px 22px 22px; border-radius: 26px;
  background: var(--vidro); border: 1px solid var(--vidro-borda);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 34px 90px -34px rgba(0, 0, 0, .82), inset 0 1px 0 rgba(255, 255, 255, .08); }
.pub-card::before { content: ""; position: absolute; inset: -1px; border-radius: 27px; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--sd-ang), transparent 0deg, rgba(var(--cena-g2), .85) 38deg, rgba(var(--cena-g1), .9) 82deg, transparent 130deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; animation: sd-borda 7s linear infinite; }
@keyframes sd-borda { to { --sd-ang: 360deg; } }

.pub-card h1 { font-size: clamp(25px, 6.6vw, 31px); line-height: 1.12; margin: 0 0 6px; text-wrap: balance; color: var(--cena-txt); }
.pub-card .lead { color: var(--cena-txt-2); font-size: 14.5px; line-height: 1.5; margin: 0 0 16px; }
.pub-card .muted, .pub-card .muted-2 { color: var(--cena-txt-3); }
.pub-card .field { margin-top: 14px; }
.pub-card .field > label { font-size: 12.5px; color: var(--cena-txt-2); font-weight: 600; }
.pub-card .field input, .pub-card .field select {
  height: 52px; font-size: 16px; border-radius: 15px; width: 100%; box-sizing: border-box;
  color: var(--cena-txt); border: 1px solid var(--campo-borda);
  background-color: var(--campo-bg);
  background-image: radial-gradient(150px circle at var(--mx, -200px) var(--my, -200px), rgba(var(--cena-g2), .22), transparent 72%);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast); }
.pub-card .field input::placeholder { color: var(--cena-txt-3); }
.pub-card .field select { padding: 0 14px; }
.pub-card .field select option { color: #16082e; background: #fff; }
.pub-card .field input:focus, .pub-card .field select:focus, .pub-card textarea:focus {
  outline: none; border-color: transparent;
  box-shadow: 0 0 0 1.5px rgba(var(--cena-g1), .85), 0 0 0 5px rgba(var(--cena-g1), .16), 0 8px 26px -12px rgba(var(--cena-g2), .7); }
.pub-card .field.invalid input, .pub-card .field.invalid select { border-color: var(--bad); }
.pub-card .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 430px) { .pub-card .grid-2 { grid-template-columns: 1fr; } }

/* --- senha em quadrinhos: um campo por quadro --- */
.pub-otp { position: relative; display: flex; align-items: center; gap: 10px; }
.pub-otp > input.otp-espelho { position: absolute; left: 12px; bottom: 0; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0; background: none; }
.otp-caixas { flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.pub-otp input.otp-quadro { width: 100%; height: 52px; padding: 0; text-align: center; border-radius: 14px;
  border: 1px solid var(--campo-borda); background: var(--campo-bg); color: var(--cena-txt);
  font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: 0;
  caret-color: var(--rosa-2); background-image: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast), background var(--t-fast); }
/* a bolinha precisa do tamanho de uma bolinha de senha, nao do tamanho do numero */
.pub-otp input.otp-quadro.mascarado { font-size: 34px; }
.pub-otp input.otp-quadro.cheio { border-color: color-mix(in srgb, var(--roxo) 55%, transparent);
  background: color-mix(in srgb, var(--roxo) 12%, var(--campo-bg)); }
.pub-otp input.otp-quadro:focus { outline: none; border-color: transparent; transform: translateY(-2px);
  box-shadow: 0 0 0 1.5px rgba(var(--cena-g1), .9), 0 0 0 5px rgba(var(--cena-g1), .16), 0 8px 22px -12px rgba(var(--cena-g2), .8); }
.pub-otp .olho { position: static; transform: none; flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--cena-txt-3); z-index: 3; }
.pub-otp .olho:hover, .pub-otp .olho.on { background: color-mix(in srgb, var(--cena-txt) 12%, transparent); color: var(--rosa-2); }
.pub-otp .olho svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.field.invalid .pub-otp input.otp-quadro { border-color: var(--bad); }
@media (max-width: 420px) {
  .otp-caixas { gap: 6px; }
  .pub-otp input.otp-quadro { height: 48px; font-size: 20px; border-radius: 12px; }
  .pub-otp .olho { width: 34px; height: 34px; }
}

/* campo de dinheiro no cartão público: mesma altura dos outros campos */
.pub-card .money-input { height: 52px; border-radius: 15px; font-size: 21px;
  border-color: var(--campo-borda); background: var(--campo-bg); color: var(--cena-txt); }
.pub-card .money-input span { font-size: 15px; color: var(--cena-txt-3); }
.pub-card .money-input input { color: var(--cena-txt); }
.pub-card .money-input:focus-within { border-color: transparent;
  box-shadow: 0 0 0 1.5px rgba(var(--cena-g1), .85), 0 0 0 5px rgba(var(--cena-g1), .16); }
.pag-passos .pub-card .money-input { height: 46px; font-size: 19px; border-radius: 13px; }
@media (max-width: 999px) { .pag-passos .pub-card .money-input { height: 46px; font-size: 18px; border-radius: 13px; } }
.field.invalid .money-input { border-color: var(--bad); }

.pub-senha { position: relative; }
.pub-senha input { padding-right: 50px; letter-spacing: .16em; }
.pub-senha input::placeholder { letter-spacing: normal; }
.pub-senha .olho { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--cena-txt-3); z-index: 2; }
.pub-senha .olho:hover, .pub-senha .olho.on { background: color-mix(in srgb, var(--cena-txt) 12%, transparent); color: var(--rosa-2); }
.pub-senha .olho svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

.pub-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13.5px; flex-wrap: wrap; }
.pub-linha a, .pub-link { color: var(--rosa-2); font-weight: 600; }
html[data-theme="light"] .pub-linha a, html[data-theme="light"] .pub-link { color: var(--roxo); }
/* A caixinha dos termos: precisa vencer ".pub-card .field input" (que dá 100% x 52px a todo input do card) e
   ".field label" (nowrap + overflow hidden, que engolia o texto). */
.pub-check, .pub-card .field > label.pub-check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; color: var(--cena-txt-2); font-weight: 500; font-size: 13px; line-height: 1.45; white-space: normal; overflow: visible; text-overflow: clip; }
.pub-check > span { flex: 1 1 auto; min-width: 0; }   /* o texto num só item flex: quebra linha como parágrafo, não em colunas */
.pub-check input, .pub-card .field .pub-check input[type="checkbox"], .pag-passos .pub-card .field .pub-check input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; flex: none; accent-color: var(--roxo); border-radius: 4px; background: none; box-shadow: none; }
.pub-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--cena-txt-2); }
.pub-alt a { color: var(--rosa-2); font-weight: 700; }
html[data-theme="light"] .pub-alt a { color: var(--roxo); }
.pub-erro { margin-top: 14px; }
.pub-card .alert { color: var(--cena-txt); }

/* --- corpo do cartão: aparece inteiro, sem rolagem própria. Quem rola, se
       precisar, é a página. O rodapé vem depois dele no fluxo, então nunca cobre
       campo nenhum. --- */
.pub-corpo-card { flex: 0 0 auto; }

/* --- barra de ação: colada no rodapé do cartão, nunca encoberta --- */
.pub-acao, .pub-btns { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 10px;
  margin: 20px -22px -22px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
  border-radius: 0 0 25px 25px;
  background: linear-gradient(to top, var(--vidro-solido) 64%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pub-acao .btn, .pub-btns .btn { flex: 1; height: 52px; font-size: 16px; }
/* Botões e a linha de "criar conta / entrar" viajam juntos: o link nunca fica embaixo da barra. */
.pub-rodape-card { position: relative; flex: none; z-index: 6; margin: 14px -22px -22px; padding: 14px 22px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--vidro-borda);
  border-radius: 0 0 25px 25px; background: linear-gradient(to top, var(--vidro-solido) 72%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pub-rodape-card .pub-acao, .pub-rodape-card .pub-btns { position: static; margin: 0; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
.pub-rodape-card .pub-alt { margin-top: 18px; margin-bottom: 2px; }
.pub-btns .btn.btn-outline { flex: 0 0 40%; color: var(--cena-txt); border-color: var(--vidro-borda); background: color-mix(in srgb, var(--cena-txt) 7%, transparent); }
.pub-btns .btn svg, .pub-acao .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.pub-acao .btn-primary, .pub-btns .btn-primary { position: relative; overflow: hidden;
  box-shadow: 0 16px 40px -16px rgba(var(--cena-g1), .95), 0 0 0 1px rgba(255, 255, 255, .08) inset; }
.pub-acao .btn-primary::after, .pub-btns .btn-primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent);
  transform: skewX(-18deg); animation: sd-brilho 3.4s ease-in-out infinite; }
@keyframes sd-brilho { 0%, 62% { left: -60%; } 88%, 100% { left: 130%; } }

/* --- força da senha --- */
.forca { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.forca i { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--cena-txt) 14%, transparent); transition: background var(--t-fast); }
.forca[data-n="1"] i:nth-child(-n+1) { background: var(--bad); } .forca[data-n="2"] i:nth-child(-n+2) { background: var(--warn); }
.forca[data-n="3"] i:nth-child(-n+3) { background: var(--ok); } .forca[data-n="4"] i { background: var(--ok); }

/* --- passos do cadastro --- */
.pub-steps-txt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cena-txt-3); margin-bottom: 8px; }
.pub-steps { display: flex; gap: 5px; margin: 0 0 16px; }
.pub-steps span { flex: 1; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--cena-txt) 14%, transparent); transition: background var(--t-med); }
.pub-steps span.on { background: linear-gradient(90deg, var(--roxo), var(--rosa)); box-shadow: 0 0 12px -2px rgba(var(--cena-g2), .8); }
.pub-passo[hidden] { display: none; }
.pub-card .seg { flex-wrap: wrap; }
.pub-card .seg button { color: var(--cena-txt-2); }
.pub-card .seg button.on { color: #fff; }

/* --- reCAPTCHA --- */
.g-recaptcha { margin-top: 4px; min-height: 78px; }
.field.invalid .g-recaptcha { outline: 1px solid var(--bad); border-radius: 6px; outline-offset: 3px; }
.pub-captcha-aviso { font-size: 12.5px; color: var(--cena-txt-3); margin-top: 6px; }

/* --- coluna da marca (computador) --- */
.pub-lado { display: none; }
.pub-lado h2 { font-size: clamp(30px, 3vw, 42px); line-height: 1.06; margin: 0 0 14px; text-wrap: balance; color: var(--cena-txt); }
.pub-lado h2 em { font-style: normal; background: linear-gradient(90deg, var(--rosa-2), var(--roxo-2) 55%, var(--azul-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pub-lado p { color: var(--cena-txt-2); font-size: 15.5px; line-height: 1.55; max-width: 42ch; margin: 0; }
.pub-brand .brand-logo { height: 40px; width: auto; display: block; }
.pub-brand .cls-1 { fill: var(--cena-txt); } .pub-brand .cls-2 { fill: var(--rosa-2); }

/* --- traçado de pulso (assinatura da marca) --- */
.pub-pulso { position: relative; z-index: 1; width: 100%; height: 38px; margin-top: 14px; }
.pub-pulso path { fill: none; stroke: var(--rosa-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(var(--cena-g2), .75)); }
.pub-pulso-tr { transform-box: view-box; transform-origin: 0 0; will-change: transform; }

/* --- órbita das áreas da plataforma --- */
.pub-orbita { position: relative; width: 100%; aspect-ratio: 1; max-width: min(300px, 38vh); margin: 0 auto; display: none; }
.pub-nucleo { position: absolute; inset: 0; margin: auto; width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; z-index: 2;
  background: radial-gradient(circle at 30% 25%, #fff 0%, #F5EAFF 55%, #E5D0F7 100%);
  box-shadow: 0 0 0 3px rgba(255,255,255,.6), 0 0 0 5px rgba(var(--cena-g1), .55), 0 0 52px -4px rgba(var(--cena-g1), .95);
  animation: sd-batida 2.6s ease-in-out infinite; }
.pub-nucleo svg { width: 66%; height: 66%; display: block; filter: drop-shadow(0 2px 4px rgba(var(--cena-g1), .35)); }
@keyframes sd-batida { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.09); } 24% { transform: scale(1); } 36% { transform: scale(1.05); } 48% { transform: scale(1); } }
.pub-onda { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; opacity: 0;
  border: 1.5px solid rgba(var(--cena-g2), .55); animation: sd-onda 3.4s ease-out infinite; }
.pub-onda:nth-of-type(2) { animation-delay: 1.1s; } .pub-onda:nth-of-type(3) { animation-delay: 2.2s; }
@keyframes sd-onda { 0% { transform: scale(1); opacity: .7; } 80% { opacity: 0; } 100% { transform: scale(4); opacity: 0; } }
.pub-anel { position: absolute; inset: 0; margin: auto; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--cena-txt) 15%, transparent); }
.pub-anel.a1 { width: 60%; height: 60%; }
.pub-anel.a2 { width: 100%; height: 100%; }
.pub-icone { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cena-txt) 9%, transparent); border: 1px solid var(--vidro-borda); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  will-change: transform; }
.pub-icone svg { width: 19px; height: 19px; stroke: var(--cena-txt); fill: none; stroke-width: 1.9; }

/* --- entrada em cascata + cortina que revela cada bloco --- */
@keyframes sd-entra { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes sd-cortina { 0% { left: 0; right: 0; } 100% { left: 100%; right: 0; } }
.pub-card > *, .pub-corpo-card > *, .pub-passo > * { position: relative; animation: sd-entra .5s var(--ease-spring, cubic-bezier(.34,1.4,.5,1)) both; }
.pub-corpo-card { animation: none !important; }
.pub-card > *::after, .pub-corpo-card > *::after, .pub-passo > *::after { content: ""; position: absolute; inset: -3px 0; z-index: 5; pointer-events: none; border-radius: 8px;
  background: linear-gradient(90deg, var(--roxo), var(--rosa)); animation: sd-cortina .66s cubic-bezier(.72,0,.28,1) both; }
.pub-corpo-card > *:nth-child(1), .pub-corpo-card > *:nth-child(1)::after { animation-delay: .02s }
.pub-corpo-card > *:nth-child(2), .pub-corpo-card > *:nth-child(2)::after { animation-delay: .07s }
.pub-corpo-card > *:nth-child(3), .pub-corpo-card > *:nth-child(3)::after { animation-delay: .12s }
.pub-corpo-card > *:nth-child(4), .pub-corpo-card > *:nth-child(4)::after { animation-delay: .17s }
.pub-corpo-card > *:nth-child(5), .pub-corpo-card > *:nth-child(5)::after { animation-delay: .22s }
.pub-corpo-card > *:nth-child(n+6), .pub-corpo-card > *:nth-child(n+6)::after { animation-delay: .27s }
.pub-card > *:nth-child(1), .pub-card > *:nth-child(1)::after { animation-delay: .02s }
.pub-card > *:nth-child(2), .pub-card > *:nth-child(2)::after { animation-delay: .07s }
.pub-card > *:nth-child(3), .pub-card > *:nth-child(3)::after { animation-delay: .12s }
.pub-card > *:nth-child(4), .pub-card > *:nth-child(4)::after { animation-delay: .17s }
.pub-card > *:nth-child(5), .pub-card > *:nth-child(5)::after { animation-delay: .22s }
.pub-card > *:nth-child(6), .pub-card > *:nth-child(6)::after { animation-delay: .27s }
.pub-card > *:nth-child(n+7), .pub-card > *:nth-child(n+7)::after { animation-delay: .32s }
.pub-passo > *:nth-child(1), .pub-passo > *:nth-child(1)::after { animation-delay: .02s }
.pub-passo > *:nth-child(2), .pub-passo > *:nth-child(2)::after { animation-delay: .06s }
.pub-passo > *:nth-child(3), .pub-passo > *:nth-child(3)::after { animation-delay: .10s }
.pub-passo > *:nth-child(4), .pub-passo > *:nth-child(4)::after { animation-delay: .14s }
.pub-passo > *:nth-child(5), .pub-passo > *:nth-child(5)::after { animation-delay: .18s }
.pub-passo > *:nth-child(n+6), .pub-passo > *:nth-child(n+6)::after { animation-delay: .22s }
.pub-card > .pub-acao::after, .pub-card > .pub-btns::after, .pub-card > .pub-rodape-card::after,
.pub-card > .pub-corpo-card::after { display: none; }
.pub-card > .pub-acao, .pub-card > .pub-btns { position: sticky; }
.pub-lado-conteudo > * { animation: sd-entra .6s var(--ease-spring, cubic-bezier(.34,1.4,.5,1)) both; }
.pub-lado-conteudo > *:nth-child(2) { animation-delay: .1s } .pub-lado-conteudo > *:nth-child(3) { animation-delay: .18s }

/* --- troca de passo no cadastro --- */
@keyframes sd-passo-entra { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes sd-passo-volta { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.pub-passo.entra { animation: sd-passo-entra .34s ease both; }
.pub-passo.volta { animation: sd-passo-volta .34s ease both; }

/* --- computador: duas colunas sobre a mesma cena --- */
@media (min-width: 1000px) {
  .pub { display: grid; grid-template-columns: 1.05fr 1fr; grid-template-rows: 1fr auto;
    align-items: center; gap: 0 40px; width: min(1240px, 100%); margin: 0 auto; padding: 26px 40px; box-sizing: border-box; }
  .pub-topo { display: none; }
  .pub-lado { display: flex; grid-column: 1; grid-row: 1; align-self: center; }
  .pub-lado-conteudo { display: flex; flex-direction: column; justify-content: center; gap: 26px; width: 100%; max-width: 470px; }
  .pub-main { grid-column: 2; grid-row: 1; min-height: 0; align-self: center; }
  .pub-barra { display: flex; justify-content: flex-end; padding: 0 0 12px; }
  .pub-conteudo { align-items: center; padding: 0; }
  .pub-card { padding: 30px 28px 26px; }
  .pub-acao, .pub-btns, .pub-rodape-card { margin: 16px -28px -26px; padding: 16px 28px 18px; border-radius: 0 0 25px 25px; }
  .pub-conteudo { align-items: center; padding: 8px 0; }

  .pub-rodape-card .pub-acao, .pub-rodape-card .pub-btns { margin: 0; padding: 0; }
  .pub-rodape { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; padding: 20px 0 0; }
  .pub-orbita { display: block; }
}
@media (min-width: 1000px) and (max-height: 760px) { .pub-lado-conteudo { gap: 16px; } }

/* Cadastro: a coluna da esquerda sobe e o formulário encolhe o suficiente para
   caber inteiro na tela. Só aqui, para o login ficar exatamente como está. */
@media (min-width: 1000px) {
  .pag-passos .pub-lado { align-self: start; padding-top: 4px; }
  .pag-passos .pub-lado-conteudo { justify-content: flex-start; }
}
@media (min-width: 1000px) and (max-height: 780px) {
  .pag-passos .pub { padding: 10px 40px; }
  .pag-passos .pub-barra { padding: 0 0 4px; }
  .pag-passos .pub-barra .icon-btn { width: 32px; height: 32px; }
  .pag-passos .pub-conteudo { padding: 0; }
  .pag-passos .pub-rodape { padding: 6px 0 0; font-size: 11px; }
  .pag-passos .pub-orbita { max-width: min(260px, 33vh); }
  .pag-passos .pub-pulso { height: 26px; margin-top: 8px; }

  .pag-passos .pub-card { padding: 16px 26px 16px; }
  .pag-passos .pub-steps-txt { margin-bottom: 4px; }
  .pag-passos .pub-steps { margin-bottom: 6px; }
  .pag-passos .pub-card h1 { font-size: 21px; margin-bottom: 2px; }
  .pag-passos .pub-card .lead { font-size: 12.5px; line-height: 1.35; margin-bottom: 6px; }
  .pag-passos .pub-card .field { margin-top: 7px; }
  .pag-passos .pub-card .field > label { font-size: 12px; }
  .pag-passos .pub-card .field input, .pag-passos .pub-card .field select { height: 42px; font-size: 15.5px; border-radius: 12px; }
  .pag-passos .pub-otp input.otp-quadro { height: 42px; font-size: 19px; border-radius: 11px; }
  .pag-passos .pub-card .seg button { padding: 9px 13px; font-size: 13px; }
  .pag-passos .pub-rodape-card { margin: 6px -26px -16px; padding: 10px 26px 10px; }
  .pag-passos .pub-acao .btn, .pag-passos .pub-btns .btn { height: 44px; font-size: 15px; }
  .pag-passos .pub-rodape-card .pub-alt { margin-top: 8px; font-size: 13px; }
}

/* Tela baixa: tudo encolhe junto para caber sem rolagem nenhuma. */
@media (min-width: 1000px) and (max-height: 660px) {
  .pub { padding: 14px 40px; }
  .pub-barra { padding: 0 0 6px; }
  .pub-card { padding: 20px 26px 18px; }
  .pub-card h1 { font-size: 24px; margin-bottom: 4px; }
  .pub-card .lead { font-size: 13.5px; line-height: 1.45; margin-bottom: 10px; }
  .pub-card .field { margin-top: 10px; }
  .pub-card .field input, .pub-card .field select { height: 46px; border-radius: 13px; }
  .pub-senha .olho { width: 34px; height: 34px; }
  .pub-linha { margin-top: 10px; }
  .pub-acao .btn, .pub-btns .btn { height: 46px; font-size: 15px; }
  .pub-acao, .pub-btns, .pub-rodape-card { margin: 10px -26px -18px; padding: 12px 26px 12px; }
  .pub-rodape-card .pub-alt { margin-top: 12px; }
  .pub-rodape { padding: 10px 0 0; font-size: 11px; }
  .pub-lado h2 { font-size: 27px; margin-bottom: 8px; }
  .pub-lado p { font-size: 14px; line-height: 1.45; }
  .pub-pulso { height: 30px; margin-top: 8px; }
  .pub-steps { margin-bottom: 10px; }
}
@media (max-width: 999px) { .pub-lado { display: none; } .pub-card { margin-block: auto; } }

/* Formulário em passos (cadastro e boas-vindas) no celular: cabe inteiro na
   tela, sem rolagem. Os pares de campos voltam a dividir a linha e todo o
   espaçamento encolhe junto. */
@media (max-width: 999px) {
  .pag-passos .pub-topo { padding: 10px 18px 2px; }
  .pag-passos .pub-marca .brand-logo { height: 26px; }
  .pag-passos .pub-marca span { display: none; }
  .pag-passos .pub-conteudo { padding: 6px 14px 4px; }
  .pag-passos .pub-card { padding: 15px 16px 13px; border-radius: 22px; }
  .pag-passos .pub-steps-txt { font-size: 10px; margin-bottom: 4px; }
  .pag-passos .pub-steps { margin-bottom: 8px; gap: 4px; }
  .pag-passos .pub-card h1 { font-size: 22px; margin-bottom: 2px; }
  .pag-passos .pub-card .lead { font-size: 12.5px; line-height: 1.35; margin-bottom: 8px; }
  .pag-passos .pub-card .field { margin-top: 8px; }
  .pag-passos .pub-card .field > label { font-size: 11.5px; }
  .pag-passos .pub-card .field input,
  .pag-passos .pub-card .field select { height: 46px; font-size: 15.5px; border-radius: 13px; }
  .pag-passos .pub-card .grid-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pag-passos .pub-card .seg { gap: 3px; }
  .pag-passos .pub-card .seg button { padding: 9px 9px; font-size: 12.5px; }
  .pag-passos .otp-caixas { gap: 6px; }
  .pag-passos .pub-otp input.otp-quadro { height: 44px; font-size: 19px; border-radius: 12px; }
  .pag-passos .pub-otp input.otp-quadro.mascarado { font-size: 30px; }
  .pag-passos .pub-rodape-card { margin: 8px -16px -13px; padding: 10px 16px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .pag-passos .pub-acao .btn, .pag-passos .pub-btns .btn { height: 46px; font-size: 15px; }
  .pag-passos .pub-rodape-card .pub-alt { margin-top: 8px; font-size: 12.5px; }
  .pag-passos .pub-rodape { padding: 4px 18px 8px; font-size: 10.5px; }
  .pag-passos .g-recaptcha { height: 72px; min-height: 0; overflow: hidden; transform: scale(.9); transform-origin: left top; }
  .pag-passos .pub-check { font-size: 12.5px; }
  .pag-passos .pub-captcha-aviso { font-size: 11px; margin-top: 4px; }
}

/* --- respeitar quem pediu menos movimento --- */
@media (prefers-reduced-motion: reduce) {
  .pub-card > *, .pub-corpo-card > *, .pub-passo > *, .pub-lado-conteudo > * { animation: none; }
  .pub-card > *::after, .pub-corpo-card > *::after, .pub-passo > *::after { display: none; }
  .pub-card::before { animation: none; }
  .pub-nucleo, .pub-onda { animation: none; }
  .pub-onda { opacity: .22; }
  .pub-pulso path { animation: none; stroke-dashoffset: 0; }
  .pub-acao .btn-primary::after, .pub-btns .btn-primary::after { display: none; }
  .pub-passo.entra, .pub-passo.volta { animation: none; }
}

/* ============================================================
   v1.37: Bioimpedância financeira.
   Uma folha com duas faces: a frente é a rede neural do mês, o verso é o
   laudo escrito. A virada é uma rotação em 3D e a altura acompanha.
   Regras de ouro desta tela: nada de texto encostando em texto (o JS calcula
   o espaçamento e encolhe o nó se faltar espaço) e todo nó tem ícone.
   ============================================================ */
.bio { perspective: 2400px; margin-bottom: 8px; }
.bio-folha { position: relative; height: 620px; transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.2,.75,.2,1), height .95s cubic-bezier(.2,.75,.2,1); }
.bio.virado .bio-folha { transform: rotateY(180deg); }
.bio-face { position: absolute; inset: 0; border-radius: var(--r-md); overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; }
.bio-frente { background: var(--ink-panel, linear-gradient(160deg, #1B0A3E, #0B0716 72%)); color: var(--on-ink);
  border: 1px solid rgba(255,255,255,.10); box-shadow: var(--shadow-1); }
.bio-verso { transform: rotateY(180deg); background: var(--surface); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-1); overflow: hidden; }
/* A face que esta de costas continua no documento e, sem isto, ela fica por cima
   engolindo o arrasto do dedo (o usuario so conseguia rolar pelas bordas) e ainda
   se comporta como area rolavel invisivel. Fora do foco, ela e inerte. */
.bio-face { pointer-events: none; }
.bio:not(.virado) .bio-frente, .bio.virado .bio-verso { pointer-events: auto; }
.bio:not(.virado) .bio-verso, .bio.virado .bio-frente { overflow: hidden; }

/* ---------- topo da rede ---------- */
.bio-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.bio-marca { display: flex; align-items: center; gap: 11px; min-width: 0; }
.bio-selo { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--roxo), var(--rosa)); box-shadow: 0 0 24px -8px var(--roxo); }
.bio-selo svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bio-marca b { display: block; font-family: var(--font-display); font-size: 15.5px; line-height: 1.15; }
.bio-marca span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink-muted); }
.bio-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); font-size: 12px; color: var(--on-ink-muted); }
.bio-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 8px var(--ok); }
.bio-nota { display: flex; align-items: center; gap: 11px; }
.bio-arco { position: relative; width: 54px; height: 54px; flex: none; }
.bio-arco svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.bio-arco circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.bio-arco .trilho { stroke: rgba(255,255,255,.13); }
.bio-arco .valor { stroke: url(#gaugeGrad); stroke: var(--rosa-2); stroke-dasharray: 0 999; transition: stroke-dasharray 1.4s var(--ease-out); }
.bio-arco b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.bio-nota-txt b { display: block; font-family: var(--font-display); font-size: 13.5px; line-height: 1.2; }
.bio-nota-txt b.e-ok { color: var(--ok); } .bio-nota-txt b.e-atencao { color: var(--warn); } .bio-nota-txt b.e-critico { color: var(--bad); }
.bio-nota-txt span { font-size: 11.5px; color: var(--on-ink-muted); }

/* ---------- corpo: palco + inspetor ---------- */
.bio-corpo { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 292px; min-height: 0; }
/* Sem rolagem interna: a altura da folha ja acompanha o conteudo (ajustarAltura). Com overflow auto o dedo
   caia numa area rolavel que engolia o gesto e a pagina so rolava pelas bordas (celular). */
.bio-palco { position: relative; overflow: hidden; min-height: 0; touch-action: auto; }
.bio-palco > canvas { position: absolute; top: 0; left: 0; width: 100%; display: block; }
.bio-nos { position: absolute; top: 0; left: 0; right: 0; }

.bio-vazio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; text-align: center; padding: 24px; }
.bio-vazio > svg { width: 40px; height: 40px; stroke: var(--rosa-2); fill: none; stroke-width: 1.6; }
.bio-vazio b { font-family: var(--font-display); font-size: 17px; }
.bio-vazio .muted { color: var(--on-ink-muted); font-size: 13.5px; max-width: 38ch; }
.bio-vazio .btn { margin-top: 6px; }

/* ---------- neurônios ---------- */
.bio-no { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 0; text-align: center; width: 132px; margin-left: -66px; margin-top: 0;
  transform: scale(var(--escala, 1)); transform-origin: 50% 50%;
  transition: opacity .4s ease, filter .4s ease; }
.bio-bolha { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.20), rgba(255,255,255,.03) 62%),
              color-mix(in srgb, var(--tom, #820AD1) 22%, transparent);
  border: 1.5px solid var(--tom, #820AD1);
  transition: transform .35s var(--ease-spring), border-color .3s ease; }
.bio-bolha::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--tom, #820AD1);
  opacity: 0; transform: scale(.85); }
.bio-no.pulsa .bio-bolha::before, .bio-bolha::before { animation: bio-halo 3.4s ease-in-out infinite; animation-delay: var(--atraso, 0s); }
@keyframes bio-halo { 0%, 100% { opacity: 0; transform: scale(.86); } 45% { opacity: .55; transform: scale(1.12); } }
.bio-bolha svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bio-no.grande .bio-bolha { width: 62px; height: 62px; border-width: 2px; }
.bio-no.grande .bio-bolha svg { width: 27px; height: 27px; }
.bio-no.t-compartimento .bio-bolha { width: 48px; height: 48px; }
.bio-no.t-compartimento .bio-bolha svg { width: 21px; height: 21px; }
.bio-no.t-ramo .bio-bolha { width: 38px; height: 38px; }
.bio-no.t-ramo .bio-bolha svg { width: 17px; height: 17px; }
.bio-rot { font-size: 12.5px; font-weight: 600; line-height: 1.15; max-width: 128px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bio-no.grande .bio-rot { font-family: var(--font-display); font-size: 14.5px; }
.bio-val { font-family: var(--font-mono); font-size: 11px; color: var(--on-ink-muted); white-space: nowrap;
  max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
.bio-no:hover .bio-bolha, .bio-no.ativo .bio-bolha { transform: scale(1.1); }
.bio-no.ativo .bio-bolha { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tom) 26%, transparent); }
.bio-no.apagado { opacity: .13; filter: saturate(.3); }
.bio-sinal-alerta { position: absolute; right: -2px; top: -2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--warn); border: 2px solid #16082e; }
.bio-no.e-critico .bio-sinal-alerta { background: var(--bad); }

/* ---------- inspetor ---------- */
.bio-inspetor { border-left: 1px solid rgba(255,255,255,.09); padding: 18px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 13px; }
.bio-tag { align-self: flex-start; padding: 5px 11px; border-radius: var(--r-pill); font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  background: color-mix(in srgb, var(--tom) 18%, transparent); border: 1px solid var(--tom); color: #fff; }
.bio-inspetor h3 { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.12; letter-spacing: -.02em; }
.bio-num { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.bio-num b { font-family: var(--font-display); font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.bio-num span { font-family: var(--font-mono); font-size: 11.5px; color: var(--on-ink-muted); }
.bio-como { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--on-ink-muted); }
.bio-como b { color: var(--on-ink); }
.bio-leitura { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--on-ink); }
.bio-receita { display: flex; gap: 10px; padding: 12px; border-radius: 13px; align-items: flex-start;
  background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 34%, transparent); }
.bio-receita svg { width: 16px; height: 16px; stroke: var(--ok); fill: none; stroke-width: 2; flex: none; margin-top: 2px; }
.bio-receita p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.bio-receita em { display: block; font-style: normal; font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ok); margin-bottom: 3px; }
.bio-filhos h4 { margin: 0 0 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--on-ink-muted); }
.bio-filho { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; width: 100%; padding: 8px 9px;
  border-radius: 11px; text-align: left; transition: background var(--t-fast); }
.bio-filho:hover { background: rgba(255,255,255,.07); }
.bio-filho .nome { display: flex; align-items: center; gap: 7px; font-size: 13px; min-width: 0; }
.bio-filho .nome svg { width: 14px; height: 14px; stroke: var(--tom); fill: none; stroke-width: 2; flex: none; }
.bio-filho .cifra { font-family: var(--font-mono); font-size: 12px; color: var(--on-ink-muted); }
.bio-filho .trilha { grid-column: 1 / -1; height: 4px; border-radius: var(--r-pill); background: rgba(255,255,255,.1); overflow: hidden; }
.bio-filho .trilha i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--tom); transition: width .8s var(--ease-out); }

/* ---------- faixa com zona saudável ---------- */
.bio-faixa { display: flex; flex-direction: column; gap: 5px; }
.bio-faixa-trilho { position: relative; display: block; height: 8px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.12); overflow: hidden; }
.bio-faixa-trilho .zona { position: absolute; top: 0; bottom: 0; background: rgba(255,255,255,.18); }
.bio-faixa-trilho .preenche { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill);
  transition: width .9s var(--ease-out); }
.bio-faixa-agulha { position: relative; height: 12px; margin-top: -3px; }
.bio-faixa-agulha i { position: absolute; top: 0; width: 3px; height: 11px; border-radius: 2px; background: currentColor;
  transform: translateX(-50%); transition: left .8s var(--ease-out); }
.bio-faixa-txt { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9.5px;
  color: var(--on-ink-muted); }

/* ---------- rodapé da rede ---------- */
.bio-rodape { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 11px 16px; border-top: 1px solid rgba(255,255,255,.09); }
.bio-legenda { display: flex; gap: 13px; flex-wrap: wrap; font-size: 11.5px; color: var(--on-ink-muted); }
.bio-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.bio-legenda i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.bio-controles { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bio-frente .seg { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.bio-frente .seg button { color: var(--on-ink-muted); }
.bio-frente .seg button.on { color: #fff; }
.bio-frente .icon-btn { color: var(--on-ink); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.bio-frente .icon-btn:hover { background: rgba(255,255,255,.16); }
.bio-virar svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.bio-virar .bio-seta { transition: transform var(--t-fast); }
.bio-virar:hover .bio-seta { transform: translateX(3px); }

/* ---------- laudo (verso) ---------- */
.bio-laudo-topo { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 4; }
.bio-laudo-topo .bio-marca b { color: var(--text); }
.bio-laudo-topo .bio-marca span { color: var(--text-3); }
.bio-laudo-acoes { display: flex; gap: 9px; flex-wrap: wrap; }
.bio-laudo-acoes .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.bio-laudo { padding: 20px 22px 26px; }
.bio-laudo-ident, .bio-qualidade { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 4px; }
.bio-campo { padding: 11px 13px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); }
.bio-campo span { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.bio-campo b { font-family: var(--font-display); font-size: 15px; }

.bio-secao { margin: 26px 0 12px; }
.bio-secao h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 5px;
  font-family: var(--font-display); font-size: 18px; letter-spacing: -.015em; }
.bio-secao h3 .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--roxo) 12%, transparent); }
.bio-secao h3 .ico svg { width: 16px; height: 16px; stroke: var(--roxo); fill: none; stroke-width: 2; }
.bio-secao-txt { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); max-width: 78ch; }

.bio-tabela { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
.bio-tabela table { width: 100%; border-collapse: collapse; min-width: 620px; }
.bio-tabela th { text-align: left; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .11em;
  text-transform: uppercase; color: var(--text-3); padding: 9px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap; }
.bio-tabela td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.bio-tabela tr:last-child td { border-bottom: 0; }
.bio-tabela .n { text-align: right; white-space: nowrap; }
.bio-tabela .muted { color: var(--text-3); font-size: 12.5px; }
.bio-tabela td b { font-family: var(--font-display); }
.bio-tabela .soma td { background: var(--surface-2); }
.bio-ponto { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 8px; background: var(--ok); vertical-align: middle; }
.bio-tabela tr.e-atencao .bio-ponto { background: var(--warn); }
.bio-tabela tr.e-critico .bio-ponto { background: var(--bad); }

.bio-barras { display: flex; flex-direction: column; gap: 9px; }
.bio-barra-linha { display: grid; grid-template-columns: 108px 1fr 60px; gap: 12px; align-items: center; color: var(--ok); }
.bio-barra-linha.e-atencao { color: var(--warn); } .bio-barra-linha.e-critico { color: var(--bad); }
.bio-barra-linha .rot { font-size: 13.5px; font-weight: 600; color: var(--text); }
.bio-barra-linha .bio-faixa-trilho { height: 14px; background: var(--surface-3); overflow: visible; border-radius: var(--r-pill); }
.bio-barra-linha .zona { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.bio-barra-linha .preenche { background: currentColor; opacity: .85; }
.bio-barra-linha .agulha { position: absolute; top: -3px; width: 3px; height: 20px; border-radius: 2px;
  background: var(--text); transform: translateX(-50%); }
.bio-barra-linha .cifra { font-family: var(--font-mono); font-size: 13px; font-weight: 600; text-align: right; }

.bio-sinais { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 14px; }
.bio-sinal { padding: 15px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px; color: var(--ok); }
.bio-sinal.e-atencao { color: var(--warn); } .bio-sinal.e-critico { color: var(--bad); }
.bio-sinal header { display: flex; align-items: center; gap: 10px; }
.bio-sinal header .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, currentColor 15%, transparent); }
.bio-sinal header .ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.bio-sinal header div { flex: 1; min-width: 0; }
.bio-sinal header b { display: block; font-size: 14.5px; color: var(--text); }
.bio-sinal header span { font-size: 11.5px; color: var(--text-3); }
.bio-sinal header strong { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.bio-sinal .bio-faixa-trilho { background: var(--surface-3); }
.bio-sinal .bio-faixa-trilho .zona { background: color-mix(in srgb, var(--ok) 24%, transparent); }
.bio-sinal .bio-faixa-txt { color: var(--text-3); }
.bio-sinal .bio-como, .bio-sinal .bio-leitura { color: var(--text-2); }
.bio-sinal .bio-como b, .bio-sinal .bio-leitura b { color: var(--text); }
.bio-sinal .bio-receita p { color: var(--text); }

.bio-segmentos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.bio-segmento { padding: 15px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.bio-segmento h4 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-family: var(--font-display); font-size: 15px; }
.bio-segmento h4 .ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--tom) 15%, transparent); }
.bio-segmento h4 .ico svg { width: 15px; height: 15px; stroke: var(--tom); fill: none; stroke-width: 2; }
.bio-segmento h4 em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); }
.bio-seg-linha { display: grid; grid-template-columns: 1fr auto auto; gap: 3px 10px; align-items: center;
  padding: 7px 0; border-top: 1px solid var(--border); }
.bio-seg-linha:first-of-type { border-top: 0; }
.bio-seg-linha .nome { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.bio-seg-linha .nome svg { width: 15px; height: 15px; stroke: var(--tom); fill: none; stroke-width: 2; flex: none; }
.bio-seg-linha .cifra { font-family: var(--font-mono); font-size: 13px; font-weight: 600; white-space: nowrap; }
.bio-seg-linha .pct { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; min-width: 42px; text-align: right; }
.bio-seg-linha .trilha { grid-column: 1 / -1; height: 4px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.bio-seg-linha .trilha i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--tom); }

.bio-plano { display: grid; grid-template-columns: 176px 1fr; gap: 16px; align-items: start; }
.bio-plano-nota { padding: 18px; border-radius: var(--r-md); text-align: center; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--ok); }
.bio-plano-nota.e-atencao { color: var(--warn); } .bio-plano-nota.e-critico { color: var(--bad); }
.bio-plano-nota b { display: block; font-family: var(--font-display); font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.bio-plano-nota span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-top: 2px; }
.bio-plano-nota em { display: block; font-style: normal; font-weight: 700; font-size: 14px; margin-top: 8px; }
.bio-plano-lista { display: flex; flex-direction: column; gap: 9px; }
.bio-plano-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 13px;
  background: color-mix(in srgb, var(--ok) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 26%, transparent); }
.bio-plano-item svg { width: 16px; height: 16px; stroke: var(--ok); fill: none; stroke-width: 2.4; flex: none; margin-top: 2px; }
.bio-plano-item p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.bio-resumo { margin: 4px 0 0; font-family: var(--font-display); font-size: 15px; color: var(--roxo); line-height: 1.4; }
/* painel da nota no topo do laudo: nota + controle do mês + dados adicionais; depois pontos fortes e ajustes */
.bio-nota-painel { display: grid; grid-template-columns: 190px 1fr 1fr; gap: 14px; align-items: stretch; margin-top: 12px; }
.bio-nota-painel .bio-plano-nota { display: flex; flex-direction: column; justify-content: center; }
.bio-nota-painel .bio-plano-nota b { font-size: 58px; }
.bio-nota-delta { display: inline-block; margin-top: 10px; font-style: normal; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--text-2); align-self: center; }
.bio-nota-delta.ok { color: var(--ok); } .bio-nota-delta.bad { color: var(--bad); }
.bio-nota-bloco { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.bio-nota-bloco h4, .bio-fortes h4, .bio-plano-tit { margin: 0 0 8px; font-family: var(--font-display); font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.bio-dado { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.bio-dado:last-child { border-bottom: 0; }
.bio-dado span { font-size: 13px; color: var(--text-2); } .bio-dado b { font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.bio-dado em { grid-column: 1 / -1; font-style: normal; font-size: 11.5px; color: var(--text-3); }
.bio-dado.ok b { color: var(--ok); } .bio-dado.desce b { color: var(--bad); } .bio-dado.sobe b { color: var(--warn); }
.bio-nota-retornos { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; margin-top: 14px; }
.bio-fortes { padding: 14px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--roxo) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--roxo) 32%, transparent); }
.bio-fortes h4 svg { width: 16px; height: 16px; stroke: var(--roxo); fill: none; stroke-width: 2; }
.bio-fortes p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; padding-left: 14px; position: relative; } .bio-fortes p:last-child { margin-bottom: 0; }
.bio-fortes p::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--rosa, #F94777); }
@media (max-width: 900px) { .bio-nota-painel { grid-template-columns: 1fr 1fr; } .bio-nota-painel .bio-plano-nota { grid-column: 1 / -1; } .bio-nota-retornos { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .bio-nota-painel { grid-template-columns: 1fr; } }
/* imagem para os Stories */
.bio-story { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(8, 4, 20, .78); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s ease; }
.bio-story.on { opacity: 1; }
.bio-story-caixa { width: min(420px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bio-story-caixa { position: relative; padding-top: 44px; }
.bio-story-x { position: absolute; top: 0; right: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.bio-story-x svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.bio-story-acoes .btn-ghost { color: #fff; }
.bio-story-caixa img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.bio-story-acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.bio-story-acoes .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.bio-story-dica { margin: 0; font-size: 12.5px; color: rgba(243, 236, 255, .7); text-align: center; line-height: 1.5; }

.bio-interp { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.bio-interp-item b { display: block; font-family: var(--font-display); font-size: 14.5px; margin-bottom: 3px; }
.bio-interp-item p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.bio-avisos { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.bio-avisos li { font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.bio-rodape-nota { margin: 14px 0 0; font-size: 11.5px; color: var(--text-3); }

/* ---------- celular ---------- */
@media (max-width: 1180px) { .bio-corpo { grid-template-columns: minmax(0, 1fr) 258px; } }
@media (max-width: 940px) {
  .bio-folha { height: 780px; }
  .bio-corpo { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .bio-inspetor { border-left: 0; border-top: 1px solid rgba(255,255,255,.09); max-height: 232px; }
}
@media (max-width: 900px) {
  .bio-inspetor { max-height: none; overflow: visible; }
  .bio-topo { padding: 12px 14px; gap: 10px; }
  .bio-aferido { order: 3; width: 100%; }
  .bio-rodape { padding: 10px 12px; }
  .bio-legenda { display: none; }
  .bio-controles { width: 100%; }
  .bio-controles .bio-virar { flex: 1; }
  .bio-laudo { padding: 16px 14px 22px; }
  .bio-plano { grid-template-columns: 1fr; }
  .bio-barra-linha { grid-template-columns: 84px 1fr 52px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .bio-folha { transition: none; }
  .bio-bolha::before { animation: none; opacity: .3; }
  .bio-faixa-trilho .preenche, .bio-faixa-agulha i, .bio-filho .trilha i { transition: none; }
}

/* ============================================================
   v1.38: Raio-X Financeiro (passos) e o resultado dele
   ============================================================ */

/* ---------- Raio-X: os seis passos ---------- */
.rx-card h2 { display: flex; align-items: center; gap: 10px; }
.rx-ic { width: 22px; height: 22px; stroke: var(--roxo); fill: none; stroke-width: 2; flex: none; }

.rx-linha { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.rx-linha + .rx-linha { margin-top: 10px; }
.rx-dado { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.rx-dado > span { font-size: 12.5px; color: var(--text-3); }
.rx-valor { font-size: 22px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rx-texto { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.rx-linha .btn { flex: none; }
.rx-linha .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.rx-escolha { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.rx-cat { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 14.5px;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.rx-cat:hover { border-color: var(--border-2); transform: translateY(-1px); }
.rx-cat.on { border-color: var(--roxo); background: color-mix(in srgb, var(--roxo) 9%, var(--surface)); }
.rx-cat .st-marca { width: 20px; height: 20px; margin-top: 0; }
.rx-cat.on .st-marca { background: var(--roxo); border-color: var(--roxo); color: #fff; }

#rxCorpo.entra { animation: rxEntra .34s var(--ease-spring) both; }
@keyframes rxEntra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.rx-trilha { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px auto 0; max-width: 780px; padding: 0; list-style: none; }
.rx-trilha li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3); font-size: 12.5px; }
.rx-trilha li svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.4; flex: none; }
.rx-trilha li.on { color: var(--text); border-color: color-mix(in srgb, var(--roxo) 40%, var(--border)); }
.rx-trilha li.atual { background: color-mix(in srgb, var(--roxo) 10%, var(--surface)); border-color: var(--roxo); font-weight: 600; }

@media (max-width: 640px) {
  .rx-linha { align-items: flex-start; }
  .rx-linha .btn { width: 100%; justify-content: center; }
  .rx-escolha { grid-template-columns: 1fr; }
  .rx-trilha li span { display: none; }
  .rx-trilha li { padding: 8px 10px; }
}

/* ---------- Raio-X: o resultado ---------- */
.rr-secao + .rr-secao { margin-top: 16px; }
.rr-cabeca { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.rr-cabeca h2 { font-size: 19px; line-height: 1.2; }
.rr-cabeca .muted { font-size: 13.5px; margin-top: 3px; }
.rr-selo { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--roxo) 12%, var(--surface-2)); color: var(--roxo); }
.rr-selo svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.rr-atencao .rr-selo { background: color-mix(in srgb, var(--bad) 12%, var(--surface-2)); color: var(--bad); }

.rr-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.rr-grade.rr-3 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.rr-grade + .rr-grade, .rr-grade + .rr-acoes, .rr-perfil + .rr-grade { margin-top: 10px; }
.rr-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.rr-item > span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); line-height: 1.3; }
.rr-item > b { font-size: 21px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere; line-height: 1.2; }
.rr-duvida { width: 16px; height: 16px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1px solid var(--border-2); background: transparent; color: var(--text-3); font-size: 10px; font-weight: 700; line-height: 1; }
.rr-duvida:hover { border-color: var(--roxo); color: var(--roxo); }

.rr-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 20px 0 10px; }
.rr-perfil { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rr-perfil .chip svg, .rr-perfil .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.rr-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rr-acoes .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.rr-secao > .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.rr-texto { font-size: 14.5px; line-height: 1.6; }
.rr-texto a, .rr-dicas a { color: var(--azul); font-weight: 600; }

/* As dicas chegam como HTML da página antiga: cabem recolhidas até o cliente pedir tudo. */
.rr-dicas { max-height: 260px; overflow: hidden; position: relative; font-size: 14px; line-height: 1.6; }
.rr-dicas::after { content: ""; position: absolute; inset: auto 0 0 0; height: 70px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--surface)); }
.rr-dicas.aberto { max-height: none; }
.rr-dicas.aberto::after { display: none; }
.rr-dicas p { margin: 0 0 10px; }
.rr-dicas img { max-width: 120px; height: auto; vertical-align: middle; border-radius: 8px; }
.rr-secao > .rr-mais { margin-top: 12px; }

.rr-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px;
  max-height: 300px; overflow: hidden; }
.rr-videos.aberto { max-height: none; }
.rr-video-cartao { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 13.5px; line-height: 1.35;
  transition: border-color var(--t-fast), transform var(--t-fast); }
.rr-video-cartao:hover { border-color: var(--roxo); transform: translateY(-1px); }
.rr-play { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--roxo) 14%, var(--surface-3)); color: var(--roxo); }
.rr-play svg { width: 14px; height: 14px; stroke: currentColor; fill: currentColor; stroke-width: 1.5; }

.rr-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.rr-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sheet .rr-video { margin-top: 12px; }

@media (max-width: 640px) {
  .rr-grade, .rr-grade.rr-3, .rr-videos { grid-template-columns: 1fr; }
  .rr-item > b { font-size: 19px; }
  .rr-acoes .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  #rxCorpo.entra { animation: none; }
  .rx-cat, .rr-video-cartao { transition: none; }
}

/* ============================================================
   v1.39: Atalhos da Home dentro de um bloco recolhivel
   ============================================================ */
/* investimento de conta conectada, na mesma arvore: ao tocar, abre os dados que o banco informa */
.of-linha { flex-wrap: wrap; cursor: pointer; }
.of-linha.aberta .chev svg { transform: rotate(180deg); }
.of-mais { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 6px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.of-mais div { min-width: 0; } .of-mais div.largo { grid-column: 1 / -1; }   /* texto longo (emissor, contrato) ocupa a linha inteira */
.of-det { flex: 1 1 100%; cursor: default; padding: 2px 0 6px; } .of-det .of-mais { margin: 4px 0 0; }
.of-tit { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 14px 2px 0; }
.emp-corpo { padding: 6px 2px 10px; } .of-mais dt { font-size: 11.5px; color: var(--text-3); } .of-mais dd { margin: 1px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
/* pagamento pela Asaas (sd-pagamento.js): escolha da forma, QR Pix, valor */
.pg-formas { display: grid; gap: 10px; }
.pg-forma { display: grid; grid-template-columns: 22px 1fr; column-gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; transition: border-color var(--t-fast), transform var(--t-fast); }
.pg-forma:hover, .pg-forma:focus-visible { border-color: var(--roxo); transform: translateY(-1px); }
.pg-forma svg { width: 22px; height: 22px; grid-row: 1 / span 2; stroke: var(--roxo); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-forma b { font-size: 15px; } .pg-forma span { font-size: 12.5px; color: var(--text-2); }
.pg-valor { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; } .pg-valor b { font-family: var(--font-display); font-size: 26px; } .pg-valor small { color: var(--text-2); font-size: 12.5px; }
.pg-pix { display: grid; grid-template-columns: 168px 1fr; gap: 14px; align-items: start; }
.pg-pix img { width: 168px; height: 168px; border-radius: 12px; background: #fff; padding: 6px; box-sizing: border-box; }
.pg-copia { width: 100%; box-sizing: border-box; font: 12px/1.4 ui-monospace, Consolas, monospace; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 8px 0; resize: none; word-break: break-all; }
.pg-espera { display: flex; gap: 8px; align-items: center; } .pg-espera svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
@media (max-width: 480px) { .pg-pix { grid-template-columns: 1fr; justify-items: center; } .pg-pix > div { width: 100%; } }
.sdoc-plano { display: flex; flex-direction: column; }
.pl-itens { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.pl-itens li { display: flex; gap: 8px; align-items: flex-start; } .pl-itens svg { width: 15px; height: 15px; flex: none; margin-top: 2px; stroke: var(--ok); fill: none; stroke-width: 2.4; }
.pl-motivo { font-size: 12.5px; color: var(--text-3); margin: 0 0 12px; } .pl-motivo a { color: var(--azul); font-weight: 600; } .sdoc-plano.destaque { border-color: color-mix(in srgb, var(--roxo) 55%, var(--border)); }
/* oportunidades (Suas Dívidas e Seu Dinheiro) e o vínculo do bem com o financiamento do banco */
.oport a { font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bem-vinc { display: flex; gap: 8px; align-items: flex-start; margin: -2px 0 10px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; background: color-mix(in srgb, var(--azul) 10%, transparent); color: var(--text-2); }
.bem-vinc svg { width: 15px; height: 15px; flex: none; margin-top: 1px; stroke: var(--azul); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* "Comparar com o mercado" (Suas Dívidas): régua do Banco Central com a faixa p25–p75, a mediana e a taxa do cliente */
.merc { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); flex-basis: 100%; }
.sub > .merc { padding: 12px 2px 6px; }
.merc-regua { position: relative; height: 10px; margin: 26px 4px 4px; border-radius: var(--r-pill); background: var(--surface-3); }
.merc-regua i { position: absolute; top: 0; display: block; }
.merc-faixa { height: 100%; border-radius: var(--r-pill); background: color-mix(in srgb, var(--azul) 38%, transparent); }
.merc-med { width: 2px; height: 16px; top: -3px !important; margin-left: -1px; background: var(--azul); }
.merc-voce { width: 14px; height: 14px; top: -2px !important; margin-left: -7px; border-radius: 50%; border: 2px solid var(--surface); background: var(--text-3); }
.merc-voce.ok { background: var(--ok); } .merc-voce.warn { background: var(--warn); } .merc-voce.bad { background: var(--bad); }
.merc-voce em { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.merc-sim { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.merc-sim a { font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* "Comparar com o mercado" de um investimento (Seu Dinheiro): barras de rendimento líquido ao ano */
.merc-inv { display: grid; gap: 8px; margin: 8px 2px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.merc-l { display: grid; grid-template-columns: minmax(96px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.merc-l i { display: block; height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.merc-l i b { display: block; height: 100%; border-radius: var(--r-pill); background: color-mix(in srgb, var(--azul) 45%, transparent); }
.merc-l em { font-style: normal; font-weight: 600; min-width: 56px; text-align: right; }
.merc-l.eu { color: var(--text); font-weight: 600; } .merc-l.eu i b { background: var(--roxo); }
/* emprestimo de banco conectado em atraso */
.emp.emp-atraso { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.emp .list > li { padding: 6px 0; }

/* Seus Bens: barra pago x falta, numeros, rosca geral e aviso no menu */
.bem-barra { display: flex; height: 12px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-3); margin-top: 12px; }
.bem-barra i { display: block; height: 100%; transition: width var(--t-med); }
.bem-barra .pago { background: var(--ok); }
.bem-barra .falta { background: var(--rosa); }
.bem-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bem-nums span { display: grid; gap: 2px; min-width: 0; }
.bem-nums small { color: var(--text-3); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.bem-nums b { font-family: var(--font-display); font-size: 17px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.bem-nums .pt { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.bem-nums .pt.pago { background: var(--ok); } .bem-nums .pt.falta { background: var(--rosa); }
.bem-geral { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.bem-rosca { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--rosa) 0); position: relative; }
.bem-rosca::before { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--surface); }
.bem-rosca b, .bem-rosca small { position: relative; }
.bem-rosca b { font-family: var(--font-display); font-size: 26px; line-height: 1; }
.bem-rosca small { color: var(--text-3); font-size: 12px; }
.form-bem { display: grid; gap: 2px; }
.rail a .rail-badge { display: inline-grid; place-items: center; padding: 3px; margin-left: auto; }
.rail a .rail-badge svg { width: 12px; height: 12px; stroke: #fff; }
@media (max-width: 620px) {
  .bem-geral { grid-template-columns: 1fr; justify-items: center; } .bem-geral-info { width: 100%; }
  .bem-nums { grid-template-columns: 1fr 1fr; } .bem-nums span:first-child { grid-column: 1 / -1; }
  .form-bem .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* quadro-aba das contas: uma orelha em cima do bloco dos atalhos */
/* v1.45: a orelha pendurada no hero ficava torta no celular (o hero tem os cantos
   arredondados e a aurora por cima). Agora é um quadrinho próprio, alinhado com os
   demais blocos da Home, logo abaixo do hero. */
.conta-aba { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--roxo) 28%, var(--border)); border-radius: 18px;
  background: color-mix(in srgb, var(--roxo) 7%, var(--surface)); position: relative; z-index: 1; box-shadow: var(--shadow-1); }
.conta-aba p b { font-weight: 700; color: var(--text); }
.conta-aba .ca-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--roxo) 16%, transparent); color: var(--roxo); }
.conta-aba .ca-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.conta-aba p { flex: 1 1 220px; min-width: 0; margin: 0; display: grid; gap: 1px; font-size: 14px; }
.conta-aba p small { color: var(--text-3); font-size: 12.5px; }
.conta-aba .btn { flex: none; }
.conta-aba .ca-ico.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.conta-aba .ca-lista { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.conta-aba .ca-lista span { display: inline-flex; align-items: center; gap: 5px; }
.conta-aba .ca-lista i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.conta-aba .ca-lista .ok i { background: var(--ok); } .conta-aba .ca-lista .bad i { background: var(--bad); } .conta-aba .ca-lista .run i { background: var(--roxo); animation: ca-pulso 1s ease-in-out infinite; }
.conta-aba .ca-lista a { color: var(--roxo); font-weight: 600; }
.conta-aba .progress { flex-basis: 100%; height: 5px; }
@keyframes ca-pulso { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .conta-aba .ca-lista .run i { animation: none; } }
@media (max-width: 560px) { .conta-aba { margin: 12px 0 0; padding: 14px; } .conta-aba .btn { width: 100%; justify-content: center; } }
.quick-box { position: relative; border-radius: 20px; border: 1px solid var(--border); background: var(--surface);
  overflow: hidden; transition: border-color var(--t-med), box-shadow var(--t-med); }
.quick-box.aberto { border-color: color-mix(in srgb, var(--roxo) 38%, var(--border)); box-shadow: var(--shadow-1); }

/* fio de luz que corre na borda de cima toda vez que o bloco abre */
.quick-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--roxo), var(--rosa), transparent); transform: translateX(-100%); }
.quick-box.aberto::before { animation: qkFio 1.1s var(--ease-out) forwards; }
@keyframes qkFio { 0% { transform: translateX(-100%); opacity: .95; } 100% { transform: translateX(100%); opacity: 0; } }

.quick-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 18px;
  background: transparent; border: 0; color: var(--text); text-align: left; cursor: pointer; }
.quick-head:hover .qh-ico { transform: translateY(-1px) scale(1.05); }
.quick-head:focus-visible { outline: 2px solid var(--roxo); outline-offset: -2px; border-radius: 20px; }

.qh-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--roxo);
  background: linear-gradient(145deg, color-mix(in srgb, var(--roxo) 18%, var(--surface)), color-mix(in srgb, var(--azul) 13%, var(--surface)));
  transition: transform var(--t-med) var(--ease-spring); }
.qh-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.qh-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.qh-txt b { font-size: 16px; letter-spacing: -.01em; }
.qh-txt small { font-size: 12.5px; color: var(--text-3); }
.qh-n { font-weight: 700; color: var(--roxo); font-variant-numeric: tabular-nums; }

/* equalizador: dá o pulso de "tem coisa viva aqui dentro" */
.qh-eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; flex: none; }
.qh-eq i { width: 3px; height: 5px; border-radius: 2px; background: linear-gradient(180deg, var(--rosa), var(--roxo));
  animation: qkEq 1.4s var(--ease-out) infinite; }
.qh-eq i:nth-child(2) { animation-delay: .16s; }
.qh-eq i:nth-child(3) { animation-delay: .32s; }
.qh-eq i:nth-child(4) { animation-delay: .48s; }
.qh-eq i:nth-child(5) { animation-delay: .64s; }
@keyframes qkEq { 0%, 100% { height: 5px; opacity: .5; } 50% { height: 17px; opacity: 1; } }
.quick-box.aberto .qh-eq i { animation-duration: .8s; }

.qh-seta { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--text-3); transition: transform var(--t-med) var(--ease-spring), background var(--t-fast), color var(--t-fast); }
.qh-seta svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.quick-box.aberto .qh-seta { transform: rotate(180deg); background: color-mix(in srgb, var(--roxo) 14%, var(--surface-2)); color: var(--roxo); }

/* o recolhe de verdade: 0fr → 1fr, sem altura fixa e sem medir nada no JS */
.quick-corpo { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-spring); }
.quick-corpo.aberto { grid-template-rows: 1fr; }
.quick-corpo-in { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s linear .45s; }
.quick-corpo.aberto .quick-corpo-in { visibility: visible; transition-delay: 0s; }
.quick-corpo .quick { padding: 2px 18px 18px; }

/* os quadradinhos entram em onda a cada abertura */
.quick-corpo .quick > * { opacity: 0; }
.quick-corpo.aberto .quick > * { opacity: 1; animation: qkTile .5s var(--ease-spring) backwards; }
@keyframes qkTile { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.quick-corpo.aberto .quick > *:nth-child(1) { animation-delay: 20ms; }
.quick-corpo.aberto .quick > *:nth-child(2) { animation-delay: 50ms; }
.quick-corpo.aberto .quick > *:nth-child(3) { animation-delay: 80ms; }
.quick-corpo.aberto .quick > *:nth-child(4) { animation-delay: 110ms; }
.quick-corpo.aberto .quick > *:nth-child(5) { animation-delay: 140ms; }
.quick-corpo.aberto .quick > *:nth-child(6) { animation-delay: 170ms; }
.quick-corpo.aberto .quick > *:nth-child(7) { animation-delay: 200ms; }
.quick-corpo.aberto .quick > *:nth-child(8) { animation-delay: 230ms; }
.quick-corpo.aberto .quick > *:nth-child(9) { animation-delay: 260ms; }
.quick-corpo.aberto .quick > *:nth-child(10) { animation-delay: 290ms; }
.quick-corpo.aberto .quick > *:nth-child(11) { animation-delay: 320ms; }
.quick-corpo.aberto .quick > *:nth-child(12) { animation-delay: 350ms; }
.quick-corpo.aberto .quick > *:nth-child(n+13) { animation-delay: 380ms; }

@media (max-width: 640px) {
  .quick-head { padding: 13px 14px; gap: 11px; }
  .qh-eq { display: none; }
  .quick-corpo .quick { padding: 2px 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .quick-box::before, .qh-eq i { animation: none; }
  .quick-corpo { transition: none; }
  .quick-corpo.aberto .quick > * { animation: none; }
  .quick-corpo .quick > * { opacity: 1; }
  .qh-seta, .qh-ico { transition: none; }
}

/* v1.40: perguntas da revisão mensal do Raio-X */
.rx-pergunta { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 18px 0 10px; }
.rx-linha + .rx-pergunta { margin-top: 20px; }
.rx-escolha-larga { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* v1.41: quadrinho com lápis (média mensal de gastos)
   A edição acontece na gaveta #sheetMedia, no mesmo padrão da de limites:
   tentar editar dentro do quadrinho estourava a caixa por cima dos vizinhos. */
.vital-edit .mono { display: flex; align-items: flex-start; gap: 6px; justify-content: space-between; }
.vital-lapis { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--on-ink) 22%, transparent);
  background: color-mix(in srgb, var(--on-ink) 8%, transparent);
  color: var(--on-ink-muted); padding: 0; margin-top: -2px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.vital-lapis svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.vital-lapis:hover { background: color-mix(in srgb, var(--on-ink) 18%, transparent); color: var(--on-ink); border-color: transparent; }
.vital-edit .skeleton { background: color-mix(in srgb, var(--on-ink) 14%, transparent); border-radius: 7px; margin-top: 4px; }
.vital-edit.salvou > b { animation: vtSalvou .9s var(--ease-out) both; }
@keyframes vtSalvou { 0% { color: var(--ok); transform: scale(1.04); } 100% { color: var(--on-ink); transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .vital-edit.salvou > b { animation: none; }
  .vital-lapis { transition: none; }
}

/* ============================================================
   v1.42: Desafio 30 Dias (a antiga Trilha Financeira)
   ============================================================ */
.ds-barra { padding: 18px 20px; }
.ds-barra-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ds-barra-topo b { font-family: var(--font-display); font-size: 17px; }
.ds-barra .st-barra { height: 8px; border-radius: 4px; }

.ds-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ds-passo { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast); }
.ds-passo:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.ds-passo.agora { border-color: var(--roxo); box-shadow: 0 0 0 1px color-mix(in srgb, var(--roxo) 30%, transparent); }
.ds-passo.feito { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 26%, var(--border)); }

.ds-cabeca { display: flex; align-items: center; gap: 11px; }
.ds-cabeca > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.ds-cabeca .mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.ds-ic { width: 44px; height: 44px; flex: none; border-radius: 13px; object-fit: contain;
  background: var(--surface-2); padding: 5px; }

.ds-selo { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ds-selo svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.6; }
.ds-selo.feito { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.ds-selo.agora { background: color-mix(in srgb, var(--roxo) 14%, transparent); color: var(--roxo); }

.ds-texto { font-size: 14.5px; line-height: 1.45; flex: 1; margin: 0; }
.ds-passo.feito .ds-texto { color: var(--text-2); }
.ds-ir { width: 100%; justify-content: center; }
.ds-ir svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 640px) {
  .ds-grade { grid-template-columns: 1fr; }
  .ds-barra { padding: 15px 16px; }
}

@media (prefers-reduced-motion: reduce) { .ds-passo { transition: none; } }

/* ============================================================
   v1.43: vitrines de produto de parceiro (/App/Produto)
   ============================================================ */
.pd-fato { font-size: 15px !important; line-height: 1.35; }
#pdFatos .vital .mono svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.6; }

.pd-bloco + .pd-bloco { margin-top: 14px; }
.pd-texto { font-size: 14.5px; line-height: 1.6; color: var(--text-2); margin: 0 0 14px; max-width: 68ch; }
.pd-bloco .card-head h3 .ico svg { width: 17px; height: 17px; }

.pd-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pd-oferta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast); }
.pd-oferta:hover { border-color: var(--roxo); transform: translateY(-2px); box-shadow: var(--shadow-1); }

.pd-img { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); overflow: hidden; }
.pd-img img { max-width: 40px; max-height: 40px; object-fit: contain; }
.pd-img-vazia { color: var(--roxo); background: color-mix(in srgb, var(--roxo) 12%, var(--surface)); }
.pd-img-vazia svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

.pd-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pd-txt b { font-size: 15px; line-height: 1.25; }
.pd-txt small { font-size: 12.5px; color: var(--text-3); line-height: 1.35; }

.pd-cta { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12.5px; font-weight: 600;
  color: var(--roxo); white-space: nowrap; }
.pd-cta svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; }

@media (max-width: 640px) {
  .pd-grade { grid-template-columns: 1fr; }
  .pd-oferta { flex-wrap: wrap; }
  .pd-cta { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) { .pd-oferta { transition: none; } }

/* v1.44: ajustes pedidos — S.O.S com duas ações, quanto ainda cabe no limite */
.sos-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sos-acoes .btn { flex: 1 1 auto; justify-content: center; }
.sos-acoes .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
/* O cartão do limite nunca estoura a grade: o item da grade aceita encolher, o texto longo quebra e a barra fica dentro */
.lim-grid .lim { min-width: 0; overflow: hidden; }
.lim-grid .lim-h { min-width: 0; } .lim-grid .lim-h b { min-width: 0; overflow-wrap: anywhere; } .lim-grid .lim-h .chip { flex: none; }
.lim-grid .lim-v { grid-template-columns: minmax(0, 1fr) auto; }
.lim-grid .lim-v .num { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.lim-grid .lim .progress { max-width: 100%; }
/* Central de avisos: usuários escolhidos como chips com o x para tirar */
.av-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.av-chips .chip button { display: inline-flex; align-items: center; margin-left: 2px; padding: 0; color: inherit; opacity: .8; }
.av-chips .chip button:hover { opacity: 1; }
.av-perfis .chip { cursor: pointer; border: 1px solid var(--border); user-select: none; }
.av-perfis .chip.on { background: color-mix(in srgb, var(--roxo) 16%, transparent); color: var(--roxo); border-color: var(--roxo); }
.tx-banco { width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 2px; background: #fff; object-fit: contain; }
.lim-resta { font-weight: 600; color: var(--text-2); }
.lim.warn .lim-resta { color: var(--warn); }
.lim.bad .lim-resta { color: var(--bad); }
@media (max-width: 480px) { .sos-acoes .btn { flex: 1 1 100%; } }

/* ============================================================
   v1.44: Blog SeuDin no layout novo (App/Blog)
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.blog-busca { display: flex; gap: 8px; align-items: flex-end; margin-top: 16px; max-width: 560px; flex-wrap: wrap; }
.blog-busca .field { min-width: 200px; }
/* Campo e botão sempre com respiro entre si (o botão chegou a aparecer colado embaixo do campo). */
.hero .blog-busca { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: end; max-width: 640px; }
.hero .blog-busca .field { min-width: 0; }
@media (max-width: 520px) { .hero .blog-busca { grid-template-columns: 1fr; } .hero .blog-busca .btn { width: 100%; } }
.blog-busca .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.blog-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.blog-capa { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.blog-capa img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t-med); }
.blog-card:hover .blog-capa img { transform: scale(1.03); }
.blog-corpo { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.blog-corpo h3 { font-size: 17px; line-height: 1.3; }
.blog-corpo h3 a { color: var(--text); text-decoration: none; }
.blog-corpo h3 a:hover { color: var(--roxo); }
.blog-corpo p { font-size: 13.5px; }
.blog-acoes { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.blog-acoes .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.blog-acoes form { margin-left: auto; }
.blog-paginas { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.blog-paginas .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.blog-post { max-width: 820px; margin: 0 auto; }
.blog-post-topo { margin-top: 14px; }
.blog-post-capa { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--border); display: block; margin-bottom: 14px; background: var(--surface-2); }
.blog-post-topo h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.15; margin-top: 6px; }
.blog-post-corpo { margin-top: 16px; font-size: 15.5px; line-height: 1.75; color: var(--text-2); overflow-wrap: anywhere; }
.blog-post-corpo h1, .blog-post-corpo h2, .blog-post-corpo h3 { color: var(--text); margin: 20px 0 8px; line-height: 1.3; }
.blog-post-corpo h1 { font-size: 24px; } .blog-post-corpo h2 { font-size: 20px; } .blog-post-corpo h3 { font-size: 17px; }
.blog-post-corpo p { margin: 0 0 12px; }
.blog-post-corpo ul, .blog-post-corpo ol { margin: 0 0 12px 20px; }
.blog-post-corpo li { margin-bottom: 6px; }
.blog-post-corpo a { color: var(--azul); font-weight: 600; }
.blog-post-corpo img, .blog-post-corpo video, .blog-post-corpo iframe { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 10px 0 14px; }
.blog-post-corpo blockquote { border-left: 3px solid var(--roxo); padding: 4px 14px; margin: 0 0 12px; color: var(--text); background: color-mix(in srgb, var(--roxo) 6%, transparent); border-radius: 0 10px 10px 0; }
.blog-post-corpo table { display: block; max-width: 100%; overflow-x: auto; }
.blog-post-corpo b, .blog-post-corpo strong { color: var(--text); }
.blog-post-acoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.blog-post-acoes .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.blog-editor > summary { list-style: none; }
.blog-editor > summary::-webkit-details-marker { display: none; }
.blog-editor > summary h3 { margin: 0; }
.blog-form { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.blog-form .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.blog-quill { background: var(--surface); color: var(--text); border-radius: 0 0 12px 12px; min-height: 220px; }
.blog-quill .ql-editor { min-height: 200px; font-size: 15px; line-height: 1.6; }
.ql-toolbar.ql-snow { border-radius: 12px 12px 0 0; border-color: var(--border) !important; background: var(--surface-2); }
.ql-container.ql-snow { border-color: var(--border) !important; border-radius: 0 0 12px 12px; }
.ql-snow .ql-stroke { stroke: var(--text-2); } .ql-snow .ql-fill { fill: var(--text-2); } .ql-snow .ql-picker { color: var(--text-2); }
.blog-fallback { width: 100%; min-height: 220px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; }
.sheet-blog { width: min(860px, 100%); max-height: 92vh; overflow: auto; }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } .blog-post-capa { max-height: 220px; } }

/* Previsão: rótulo do saldo do dia e cartão de fechamento do período */
.ef-saldo small { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 500; color: var(--text-3); text-align: right; line-height: 1.1; }
.ef-fim { margin-top: 14px; border: 1px dashed var(--border-2); }
.ef-fim .ef-saldo { font-size: 18px; color: var(--text); }
.ef-fim.negativo .ef-saldo { color: var(--bad); }

/* ============ Chat com a equipe de Médicos Financeiros (App/Conversa e App/Conversas) ============
   Visual no padrão do WhatsApp (pedido do Anderson em 06/10/2026): fundo com textura, balão branco à esquerda
   para quem recebe, balão verde-claro à direita para quem envia, pontinha no balão, hora dentro do balão,
   ✓ enviada / ✓✓ azul lida, data em pílula, aviso do sistema em amarelo, lista lateral com avatar, nome, hora,
   prévia e bolinha verde de não lidas. Tokens --wa-* para o tema claro e o escuro. */
:root {
  --wa-fundo: #efeae2; --wa-textura: rgba(0,0,0,.035); --wa-recebida: #ffffff; --wa-enviada: #d9fdd3; --wa-sistema: #ffeecd;
  --wa-texto: #111b21; --wa-texto-2: #667781; --wa-hora: #667781; --wa-lida: #53bdeb; --wa-verde: #25d366; --wa-verde-escuro: #008069;
  --wa-painel: #ffffff; --wa-painel-2: #f0f2f5; --wa-borda: #e9edef; --wa-selecionada: #f0f2f5; --wa-hover: #f5f6f6; --wa-pilula: #ffffff; --wa-link: #027eb5;
}
:root[data-theme="dark"] {
  --wa-fundo: #0b141a; --wa-textura: rgba(255,255,255,.04); --wa-recebida: #202c33; --wa-enviada: #005c4b; --wa-sistema: #182229;
  --wa-texto: #e9edef; --wa-texto-2: #8696a0; --wa-hora: #8696a0; --wa-lida: #53bdeb; --wa-verde: #00a884; --wa-verde-escuro: #00a884;
  --wa-painel: #111b21; --wa-painel-2: #202c33; --wa-borda: #222d34; --wa-selecionada: #2a3942; --wa-hover: #202c33; --wa-pilula: #182229; --wa-link: #53bdeb;
}
.rail a .rail-badge-num { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 2px 7px; background: var(--wa-verde); color: #fff; }

/* ---- a conversa ---- */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 150px); min-height: 420px; background: var(--wa-fundo); border: 1px solid var(--wa-borda); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; color: var(--wa-texto); }
.chat-topo { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--wa-painel-2); border-bottom: 1px solid var(--wa-borda); min-height: 60px; }
.chat-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: inline-grid; place-items: center; background: #dfe5e7; color: #fff; font-weight: 700; font-size: 15px; overflow: hidden; }
:root[data-theme="dark"] .chat-avatar { background: #6b7c85; }
.chat-avatar svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; }
.chat-quem { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.chat-quem b { font-size: 16px; font-weight: 500; color: var(--wa-texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status { font-size: 13px; color: var(--wa-texto-2); display: inline-flex; align-items: center; gap: 6px; }
.chat-status.on { color: var(--wa-texto-2); }
.chat-topo .icon-btn { color: var(--wa-texto-2); background: transparent; border: 0; }
.chat-topo .btn-outline { border-color: var(--wa-verde-escuro); color: var(--wa-verde-escuro); background: transparent; gap: 6px; }
.chat-topo .btn-outline svg { width: 15px; height: 15px; }
/* foto de perfil por cima das iniciais (some se não existir) */
.chat-avatar, .caixa-item .avatar, .chat-msg-avatar { position: relative; overflow: hidden; }
.chat-avatar img, .caixa-item .avatar img, .chat-msg-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.chat-msg-avatar { width: 28px; height: 28px; flex: 0 0 28px; margin: 0 12px 0 0; border-radius: 50%; display: inline-grid; place-items: center; align-self: flex-start; background: #dfe5e7; color: #fff; font-size: 10.5px; font-weight: 700; font-family: var(--font-display); }
:root[data-theme="dark"] .chat-msg-avatar { background: #6b7c85; }
.chat-msg.outro + .chat-msg.outro .chat-msg-avatar { visibility: hidden; }
.chat-voltar { display: none; }
.chat-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 6% 10px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain;
  background-color: var(--wa-fundo);
  background-image: radial-gradient(var(--wa-textura) 1.2px, transparent 1.2px), radial-gradient(var(--wa-textura) 1.2px, transparent 1.2px);
  background-size: 26px 26px; background-position: 0 0, 13px 13px; }
.chat-dia { display: flex; justify-content: center; margin: 10px 0 8px; }
.chat-dia span { font-size: 12.5px; text-transform: uppercase; color: var(--wa-texto-2); background: var(--wa-pilula); border-radius: 8px; padding: 5px 12px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.chat-msg { display: flex; max-width: min(65%, 560px); margin-bottom: 2px; }
.chat-msg.minha { align-self: flex-end; }
.chat-msg.outro { align-self: flex-start; }
.chat-msg.sistema { align-self: center; max-width: min(90%, 620px); margin: 6px 0; }
.chat-msg.outro + .chat-msg.outro, .chat-msg.minha + .chat-msg.minha { margin-top: 0; }
.chat-balao { position: relative; padding: 6px 8px 8px 9px; border-radius: 7.5px; font-size: 14.2px; line-height: 19px; word-break: break-word; box-shadow: 0 1px .5px rgba(11,20,26,.13); color: var(--wa-texto); }
.chat-msg.outro .chat-balao { background: var(--wa-recebida); border-top-left-radius: 0; }
.chat-msg.minha .chat-balao { background: var(--wa-enviada); border-top-right-radius: 0; }
/* a pontinha: só na primeira bolha de uma sequência do mesmo lado */
.chat-msg.outro .chat-balao::before, .chat-msg.minha .chat-balao::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.chat-msg.outro .chat-balao::before { left: -8px; background: var(--wa-recebida); clip-path: polygon(100% 0, 100% 100%, 0 0); }
.chat-msg.minha .chat-balao::before { right: -8px; background: var(--wa-enviada); clip-path: polygon(0 0, 0 100%, 100% 0); }
.chat-msg.outro + .chat-msg.outro .chat-balao { border-top-left-radius: 7.5px; } .chat-msg.outro + .chat-msg.outro .chat-balao::before { display: none; }
.chat-msg.minha + .chat-msg.minha .chat-balao { border-top-right-radius: 7.5px; } .chat-msg.minha + .chat-msg.minha .chat-balao::before { display: none; }
.chat-msg.sistema .chat-balao { background: var(--wa-sistema); color: var(--wa-texto); font-size: 12.5px; line-height: 17px; text-align: center; padding: 6px 12px 7px; border-radius: 7.5px; }
.chat-msg.sistema .chat-hora { display: none; }
.chat-balao a { color: var(--wa-link); text-decoration: underline; }
.chat-msg.pendente .chat-balao { opacity: .75; }
.chat-msg.falhou .chat-balao { background: #ffd6d6; }
:root[data-theme="dark"] .chat-msg.falhou .chat-balao { background: #4a1f1f; }
.chat-nome { display: block; font-size: 12.8px; font-weight: 600; color: var(--wa-verde-escuro); margin-bottom: 2px; }
.chat-texto { padding-right: 62px; }
.chat-texto:has(+ .chat-hora) { min-width: 0; }
.chat-hora { float: right; margin: 6px -4px -4px 8px; font-size: 11px; color: var(--wa-hora); display: inline-flex; gap: 3px; align-items: center; line-height: 15px; position: relative; }
.chat-balao::after { content: ""; display: block; clear: both; }
.chat-ticks { font-size: 12px; letter-spacing: -3px; color: var(--wa-hora); }
.chat-ticks.lida { color: var(--wa-lida); }
.chat-estado { font-size: 11px; background: none; border: 0; color: var(--wa-hora); padding: 0; cursor: default; font-family: inherit; }
.chat-reenviar { cursor: pointer; text-decoration: underline; color: #b00020; }
.chat-img img { display: block; max-width: 100%; max-height: 330px; border-radius: 6px; margin: -2px -3px 4px; }
.chat-arquivo { display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; background: rgba(0,0,0,.06); color: var(--wa-texto); text-decoration: none; margin-bottom: 6px; min-width: 220px; }
:root[data-theme="dark"] .chat-arquivo { background: rgba(255,255,255,.06); }
.chat-arquivo svg { width: 26px; height: 26px; stroke: #e11; fill: none; stroke-width: 1.8; }
.chat-arquivo small { color: var(--wa-texto-2); font-size: 11.5px; margin-left: auto; }
.chat-plano { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 6px; border-left: 4px solid var(--wa-verde-escuro); background: rgba(0,0,0,.05); margin-bottom: 6px; }
:root[data-theme="dark"] .chat-plano { background: rgba(255,255,255,.06); }
.chat-plano .eyebrow { color: var(--wa-verde-escuro); font-size: 11px; }
.chat-plano b { font-size: 14.5px; }
.chat-plano p { margin: 0; font-size: 13.5px; }
.chat-plano ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.chat-plano-meta { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.chat-plano-meta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.chat-vazio { margin: auto; text-align: center; color: var(--wa-texto-2); max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; background: var(--wa-sistema); border-radius: 8px; font-size: 13.5px; }
.chat-vazio svg { width: 30px; height: 30px; stroke: var(--wa-verde-escuro); fill: none; stroke-width: 1.6; }
.chat-vazio p { margin: 0; }
.chat-novas { position: sticky; bottom: 8px; align-self: flex-end; margin: -40px 0 0; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: var(--wa-painel); color: var(--wa-texto-2); box-shadow: 0 2px 5px rgba(11,20,26,.26); cursor: pointer; z-index: 2; font-size: 0; }
.chat-novas svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.chat-aviso { padding: 8px 14px; font-size: 13px; color: var(--wa-texto-2); background: var(--wa-painel-2); border-top: 1px solid var(--wa-borda); }
.chat-compor { background: var(--wa-painel-2); padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-linha { display: flex; align-items: flex-end; gap: 8px; }
.chat-linha textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; padding: 10px 14px; border-radius: 8px; border: 0; background: var(--wa-painel); color: var(--wa-texto); font: inherit; font-size: 15px; line-height: 1.4; box-shadow: none; }
.chat-linha textarea::placeholder { color: var(--wa-texto-2); }
.chat-linha textarea:focus { outline: none; box-shadow: none; }
.chat-anexar { cursor: pointer; flex: 0 0 auto; color: var(--wa-texto-2); background: transparent; border: 0; width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; }
.chat-anexar:hover { background: rgba(0,0,0,.06); }
.chat-anexar svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }
.chat-enviar { width: 42px; height: 42px; padding: 0; border-radius: 50%; flex: 0 0 42px; background: var(--wa-verde-escuro); box-shadow: none; }
.chat-enviar:hover { background: var(--wa-verde-escuro); filter: brightness(1.08); transform: none; }
.chat-enviar svg { width: 20px; height: 20px; }
.chat-anexo-previa { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; background: var(--wa-painel); font-size: 13px; color: var(--wa-texto); }
.chat-anexo-previa img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.chat-anexo-previa svg { width: 20px; height: 20px; stroke: var(--wa-verde-escuro); fill: none; stroke-width: 2; }
.chat-anexo-previa span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-prontas { display: flex; align-items: center; gap: 4px; }
.chat-prontas-rolo { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chat-prontas-rolo::-webkit-scrollbar { display: none; }
.chat-prontas-rolo.arrastando { cursor: grabbing; user-select: none; }
.chat-prontas-rolo.arrastando .chip { pointer-events: none; }
.chat-prontas .chip { cursor: pointer; white-space: nowrap; border: 1px solid var(--wa-borda); background: var(--wa-painel); color: var(--wa-texto); font-weight: 500; flex: 0 0 auto; }
.chat-prontas-seta { display: none; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 0; background: var(--wa-painel); color: var(--wa-texto-2); place-items: center; cursor: pointer; box-shadow: 0 1px 2px rgba(11,20,26,.2); }
.chat-prontas-seta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.chat-prontas-seta:disabled { opacity: .35; cursor: default; }
@media (hover: hover) and (min-width: 901px) { .chat-prontas.rola .chat-prontas-seta { display: inline-grid; } .chat-prontas-rolo { cursor: grab; } }
.chat-aviso svg { width: 16px; height: 16px; stroke: var(--wa-verde-escuro); fill: none; stroke-width: 2.4; vertical-align: -3px; margin-right: 6px; }
.caixa-item-meta .chip.fim { background: var(--wa-painel-2); color: var(--wa-texto-2); border: 1px solid var(--wa-borda); }

/* ---- caixa de entrada do Médico (lista à esquerda, conversa à direita) ---- */
.caixa { display: grid; grid-template-columns: 400px minmax(0, 1fr); height: calc(100dvh - 150px); min-height: 480px; background: var(--wa-painel); border: 1px solid var(--wa-borda); border-radius: var(--r-md); overflow: hidden; }
.caixa-lista { display: flex; flex-direction: column; background: var(--wa-painel); border-right: 1px solid var(--wa-borda); min-width: 0; min-height: 0; }
.caixa-topo { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--wa-painel-2); min-height: 60px; }
.caixa-topo h2 { font-size: 16px; font-weight: 500; margin: 0; color: var(--wa-texto); }
.caixa-busca { display: flex; align-items: center; gap: 10px; margin: 8px 12px; padding: 0 12px; height: 36px; border-radius: 8px; background: var(--wa-painel-2); color: var(--wa-texto-2); }
.caixa-busca svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex: 0 0 18px; }
.caixa-busca input { flex: 1; border: 0; background: transparent; color: var(--wa-texto); font: inherit; font-size: 14px; min-width: 0; }
.caixa-busca input:focus { outline: none; }
.caixa-filtros { display: flex; gap: 6px; padding: 2px 12px 8px; border-bottom: 1px solid var(--wa-borda); }
.caixa-filtros button { border: 0; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; background: var(--wa-painel-2); color: var(--wa-texto-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.caixa-filtros button.on { background: #e7fce3; color: #008069; }
:root[data-theme="dark"] .caixa-filtros button.on { background: #0a332c; color: #00a884; }
.caixa-filtros button::after { display: none; }
.caixa-filtros .pill { background: var(--wa-verde); color: #fff; font-size: 11px; padding: 1px 6px; }
.caixa-itens { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; }
.caixa-item { display: flex; gap: 14px; align-items: center; padding: 0 16px 0 14px; height: 72px; cursor: pointer; }
.caixa-item:hover, .caixa-item:focus-visible { background: var(--wa-hover); outline: none; }
.caixa-item.on { background: var(--wa-selecionada); }
.caixa-item .avatar { flex: 0 0 49px; width: 49px; height: 49px; border-radius: 50%; background: #dfe5e7; color: #fff; font-weight: 600; font-size: 16px; display: inline-grid; place-items: center; }
:root[data-theme="dark"] .caixa-item .avatar { background: #6b7c85; }
.caixa-item-corpo { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; height: 100%; justify-content: center; border-bottom: 1px solid var(--wa-borda); padding-right: 0; }
.caixa-item:last-child .caixa-item-corpo { border-bottom: 0; }
.caixa-item-topo { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.caixa-item-topo b { font-size: 16.5px; font-weight: 400; color: var(--wa-texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caixa-item.nova .caixa-item-topo b { font-weight: 500; }
.caixa-item-topo small { font-size: 12px; color: var(--wa-texto-2); flex: 0 0 auto; }
.caixa-item.nova .caixa-item-topo small { color: var(--wa-verde); }
.caixa-item-linha2 { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.caixa-item-resumo { font-size: 14px; color: var(--wa-texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.caixa-item-resumo i { font-style: normal; }
.caixa-item-resumo .chat-ticks { font-size: 12px; flex: 0 0 auto; }
.caixa-item-meta { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.caixa-item-meta .chip { font-size: 10.5px; padding: 1px 7px; background: var(--wa-painel-2); color: var(--wa-texto-2); border: 0; }
.caixa-item-meta .chip.rosa { background: #fde8ee; color: #c0264e; }
.caixa-item-meta .chip.roxo { background: #e7fce3; color: #008069; }
:root[data-theme="dark"] .caixa-item-meta .chip.rosa { background: #3a1c25; color: #ff8fab; }
:root[data-theme="dark"] .caixa-item-meta .chip.roxo { background: #0a332c; color: #00a884; }
.caixa-nao-lidas { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--wa-verde); color: #fff; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.caixa-nada { padding: 24px; text-align: center; color: var(--wa-texto-2); font-size: 14px; }
.caixa-conversa { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; background: var(--wa-fundo); }
.caixa-conversa .chat { height: auto; flex: 1; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.caixa-vazia { margin: auto; text-align: center; color: var(--wa-texto-2); max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; }
.caixa-vazia svg { width: 64px; height: 64px; stroke: var(--wa-texto-2); fill: none; stroke-width: 1.2; }
.caixa-vazia p { margin: 0; font-size: 14px; }
@media (max-width: 900px) {
  .chat { height: calc(100dvh - 128px); border-radius: var(--r-sm); }
  .chat-corpo { padding: 10px 10px 8px; }
  .chat-msg { max-width: 85%; }
  .caixa { display: block; height: auto; min-height: 0; }
  .caixa-conversa { display: none; }
  .caixa.aberta .caixa-lista { display: none; }
  .caixa.aberta .caixa-conversa { display: flex; height: calc(100dvh - 128px); min-height: 420px; }
  .chat-voltar { display: inline-grid; }
}
@media (max-width: 520px) { .chat-topo .btn-outline span { display: none; } .chat-topo .btn-outline { padding: 0 10px; } }
/* contato espontâneo: pergunta do sistema + opções em chips */
.chat-perguntas { display: flex; flex-direction: column; gap: 8px; align-items: center; margin: 8px 0; }
.chat-opcoes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 560px; }
.chat-opcoes .chip { cursor: pointer; border: 1px solid var(--wa-borda); background: var(--wa-painel); color: var(--wa-texto); font-weight: 500; padding: 7px 12px; font-size: 13.5px; }
.chat-opcoes .chip:hover { border-color: var(--wa-verde-escuro); color: var(--wa-verde-escuro); }
/* topo da conversa (médico): origem e assunto */
.chat-contexto { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.chat-contexto .chip { font-size: 11px; padding: 2px 8px; border: 0; }
.chat-contexto .chip.rosa { background: #fde8ee; color: #c0264e; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.chat-contexto .chip.rosa svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.chat-contexto .chip.azul, .caixa-item-meta .chip.azul { background: #e3f0ff; color: #1d4ed8; }
:root[data-theme="dark"] .chat-contexto .chip.rosa { background: #3a1c25; color: #ff8fab; }
:root[data-theme="dark"] .chat-contexto .chip.azul, :root[data-theme="dark"] .caixa-item-meta .chip.azul { background: #15284a; color: #8ab4ff; }

/* Home: o gráfico por categoria é um link para Seus Gastos; no celular a legenda fica em uma coluna com o nome inteiro */
.donut-link { display: block; color: inherit; text-decoration: none; border-radius: 14px; }
.donut-link:hover .seg-arc, .donut-link:focus-visible .seg-arc { stroke-width: 20; }
.donut-link:focus-visible { outline: 2px solid var(--roxo); outline-offset: 4px; }
@media (max-width: 640px) {
  .card .donut { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .card .donut .legend.legend-grid { grid-template-columns: 1fr; width: 100%; }
  .legend.legend-grid > span .lg-n { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
}

/* Perfil: enquadrar a foto antes de enviar */
.sheet-foto { width: min(420px, 100%); }
.pf-crop { position: relative; width: 280px; height: 280px; margin: 14px auto 10px; border-radius: 50%; overflow: hidden; background: #111; touch-action: none; cursor: grab; box-shadow: 0 0 0 4px var(--surface-2), 0 0 0 5px var(--border); }
.pf-crop.arrastando { cursor: grabbing; }
.pf-crop img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; pointer-events: none; -webkit-user-drag: none; }
.pf-zoom { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); margin-top: 6px; }
.pf-zoom input { flex: 1; accent-color: var(--roxo); }
/* busca de pessoas na caixa (clientes sem conversa) e disparo em grupo */
.caixa-pessoas { list-style: none; margin: 0 12px 6px; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; border: 1px solid var(--wa-borda); border-radius: 10px; background: var(--wa-painel); }
.caixa-pessoas-t { font-size: 11px; color: var(--wa-texto-2); text-transform: uppercase; letter-spacing: .04em; padding: 6px 10px 2px; }
.caixa-pessoas > li:not(.caixa-pessoas-t):not(.caixa-nada) { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.caixa-pessoas .avatar { flex: 0 0 36px; width: 36px; height: 36px; font-size: 12px; background: #dfe5e7; color: #fff; position: relative; overflow: hidden; }
.caixa-pessoas .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.caixa-pessoas .pessoa-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.caixa-pessoas .pessoa-txt b { font-size: 14px; font-weight: 500; color: var(--wa-texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caixa-pessoas .pessoa-txt small { font-size: 12px; color: var(--wa-texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caixa-pessoas > li.sem-chat { opacity: .65; }
.caixa-topo .btn-outline { border-color: var(--wa-verde-escuro); color: var(--wa-verde-escuro); background: transparent; gap: 6px; }
.caixa-topo .btn-outline svg { width: 15px; height: 15px; }
.sheet-disparo { width: min(640px, 100%); max-height: 94dvh; overflow-y: auto; }
.dp-alvo { margin-top: 10px; }
.dp-seg { margin-bottom: 10px; }
.dp-painel { display: none; } .dp-painel.on { display: block; }
.dp-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; }
.dp-opcao { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13.5px; cursor: pointer; }
.dp-opcao span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dp-opcao small { color: var(--text-3); font-family: var(--font-mono); }
.dp-opcao:has(input:checked) { border-color: var(--roxo); background: color-mix(in srgb, var(--roxo) 8%, var(--surface)); }
.dp-busca { margin: 0 0 8px; background: var(--surface-2); color: var(--text-2); }
.dp-busca input { color: var(--text); }
.sheet-disparo .caixa-pessoas { margin: 0 0 8px; background: var(--surface); border-color: var(--border); }
.sheet-disparo .caixa-pessoas .pessoa-txt b { color: var(--text); } .sheet-disparo .caixa-pessoas .pessoa-txt small { color: var(--text-3); }
.dp-escolhidos { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; }
.dp-escolhidos .chip.azul { background: #e3f0ff; color: #1d4ed8; display: inline-flex; align-items: center; gap: 4px; }
:root[data-theme="dark"] .dp-escolhidos .chip.azul { background: #15284a; color: #8ab4ff; }
.dp-x { border: 0; background: transparent; color: inherit; font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px; }
.dp-rodape { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 520px) { .caixa-topo .btn-outline span { display: none; } }

/* ============ Panorama do cliente (folha com abas, só Médico) ============ */
.sheet-panorama { width: min(900px, 100%); max-height: 94dvh; display: flex; flex-direction: column; }
.pn-topo { display: flex; align-items: flex-start; gap: 10px; }
.pn-topo h3 { font-size: 19px; line-height: 1.25; margin-top: 2px; }
.pn-tabs { margin: 12px 0 10px; flex: 0 0 auto; }
.pn-tabs .pn-n { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
#pnCorpo { overflow-y: auto; min-height: 0; flex: 1; padding-bottom: 6px; }
.pn-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pn-kpis > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.pn-kpis .mono { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.pn-kpis b { font-family: var(--font-display); font-size: 17px; }
.pn-kpis small { font-size: 11.5px; color: var(--text-3); min-height: 14px; }
.pn-kpis small i { font-style: normal; font-weight: 700; } .pn-kpis small i.sobe { color: var(--bad); } .pn-kpis small i.desce { color: var(--ok); }
.pn-kpis > div.ok b { color: var(--ok); } .pn-kpis > div.bad b { color: var(--bad); } .pn-kpis > div.warn b { color: var(--warn); }
.pn-bloco { margin-top: 14px; } .pn-bloco h4 { font-size: 14.5px; margin-bottom: 8px; }
.pn-tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pn-tabela th { text-align: left; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.pn-tabela td { padding: 6px; border-bottom: 1px solid var(--border); } .pn-tabela .num { text-align: right; font-variant-numeric: tabular-nums; }
.pn-tabela td.ok { color: var(--ok); } .pn-tabela td.bad { color: var(--bad); }
.pn-vazio { font-size: 14px; padding: 18px 0; text-align: center; }
.pn-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pn-lista > li { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.pn-lista > li.destaque { border-color: var(--rosa); background: color-mix(in srgb, var(--rosa) 8%, var(--surface)); }
.pn-lista > li.vencida { border-color: color-mix(in srgb, var(--bad) 40%, transparent); } .pn-lista > li.paga { opacity: .6; }
.pn-lista.simples > li { display: grid; grid-template-columns: 48px 1fr auto auto; gap: 10px; align-items: center; }
.pn-lista.simples > li .mono { font-size: 12px; color: var(--text-3); }
.pn-lista summary { display: grid; grid-template-columns: minmax(90px, 180px) 1fr auto; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.pn-lista summary::-webkit-details-marker { display: none; }
.pn-lista summary small { grid-column: 1 / -1; font-size: 11.5px; color: var(--text-3); } .pn-lista summary small i { font-style: normal; font-weight: 700; } .pn-lista summary small i.sobe { color: var(--bad); } .pn-lista summary small i.desce { color: var(--ok); }
.pn-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pn-barra { display: block; height: 8px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; min-width: 60px; }
.pn-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--roxo), var(--rosa)); }
.pn-barra.warn i { background: var(--warn); } .pn-barra.bad i { background: var(--bad); }
.pn-sub { list-style: none; margin: 8px 0 0; padding: 0 0 0 8px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.pn-sub li { display: flex; justify-content: space-between; gap: 10px; }
.pn-lim { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(80px, 160px) auto 40px; gap: 10px; align-items: center; }
.pn-lim small { text-align: right; color: var(--text-3); font-size: 12px; }
.pn-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pn-cards > li { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.pn-cards > li.quitada { opacity: .6; }
.pn-bancos { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pn-contas { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pn-contas > li { padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.pn-conta-topo { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; } .pn-conta-topo > span { min-width: 0; } .pn-conta-topo b.num { white-space: nowrap; }
.pn-contas .pn-grid:empty { display: none; }
.pn-card-topo { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 4px; }
.pn-grid > div { display: flex; flex-direction: column; } .pn-grid .mono { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; } .pn-grid b { font-size: 13.5px; } .pn-grid b.bad { color: var(--bad); }
.num.ok { color: var(--ok); } .num.bad { color: var(--bad); }
@media (max-width: 640px) { .pn-kpis { grid-template-columns: 1fr 1fr; } .pn-lista.simples > li { grid-template-columns: 44px 1fr auto; } .pn-lista.simples > li .chip { display: none; } .pn-lim { grid-template-columns: 1fr auto; } .pn-lim .pn-barra, .pn-lim small { display: none; } }

/* ============ Gasto fora do padrão: folha do alerta e card na Home ============ */
.sheet-alerta { width: min(640px, 100%); }
.ag-topo { display: flex; align-items: flex-start; gap: 10px; }
.ag-topo h3 { font-size: 19px; line-height: 1.25; margin-top: 2px; }
.ag-msg { margin-top: 10px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.ag-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.ag-kpis div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.ag-kpis .mono { font-size: 11px; color: var(--text-3); }
.ag-kpis b { font-family: var(--font-display); font-size: 16px; }
.ag-grafico { width: 100%; height: auto; margin-top: 12px; }
.ag-grafico rect { fill: color-mix(in srgb, var(--roxo) 35%, transparent); }
.ag-grafico rect.atual { fill: var(--rosa); }
.ag-grafico .val { font-family: var(--font-mono); font-size: 11px; fill: var(--text-2); }
.ag-grafico .lbl { font-size: 12px; fill: var(--text-3); text-transform: uppercase; }
.ag-grafico .limite { stroke: var(--bad); stroke-width: 2; stroke-dasharray: 6 5; }
.ag-grafico .lim { font-size: 11px; fill: var(--bad); font-weight: 700; }
.ag-grafico .habitual { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 3 5; }
.ag-lanc { margin-top: 14px; }
.ag-lanc .section-head { margin-bottom: 6px; }
.ag-lanc .section-head h2 { font-size: 15px; }
.ag-lanc .list > li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.ag-lanc .list > li > span:first-child { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.ag-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-pergunta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.ag-pergunta h4 { font-size: 16px; margin-bottom: 10px; }
.ag-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ag-opcoes .btn { justify-content: flex-start; text-align: left; height: auto; min-height: 44px; padding: 10px 14px; font-size: 14px; white-space: normal; }
.ag-opcoes .btn-ghost { grid-column: 1 / -1; justify-content: center; color: var(--text-3); }
.ag-limite { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border-2); }
.ag-limite-linha { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-top: 6px; }
.ag-respondido { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.ag-respondido > p svg { width: 16px; height: 16px; stroke: var(--ok); fill: none; stroke-width: 2.4; vertical-align: -3px; }
.ag-plano { margin-top: 10px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--roxo) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--roxo) 25%, transparent); display: flex; flex-direction: column; gap: 8px; }
.ag-plano h4 { font-size: 16px; }
.ag-plano p { margin: 0; font-size: 14px; line-height: 1.5; }
.ag-meta { display: flex; align-items: center; gap: 8px; }
.ag-meta svg { width: 18px; height: 18px; stroke: var(--roxo); fill: none; stroke-width: 2; flex: 0 0 18px; }
.ag-plano ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.ag-plano-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ag-card .card-head .chip.warn { background: var(--warn-soft); color: var(--warn); }
.ag-lista > li { padding: 0; }
.ag-item { display: grid; grid-template-columns: 1fr auto 20px; gap: 12px; align-items: center; width: 100%; padding: 12px 4px; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.ag-item:hover { color: var(--roxo); }
.ag-item-txt, .ag-item-num { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-item-txt b { font-size: 15px; }
.ag-item-txt small, .ag-item-num small { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-item-num { text-align: right; }
.ag-item-num b { font-size: 15px; }
.ag-item svg { width: 18px; height: 18px; stroke: var(--text-3); fill: none; stroke-width: 2; }
@media (max-width: 640px) { .ag-kpis { grid-template-columns: 1fr 1fr; } .ag-opcoes { grid-template-columns: 1fr; } }

/* ============ Fechamento mensal: card na Home e aba em Seus Gastos ============ */
.fm-numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.fm-numeros > div { display: flex; flex-direction: column; gap: 3px; padding: 14px 14px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.fm-numeros .mono { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.fm-numeros b { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.fm-numeros small { font-size: 12px; color: var(--text-3); min-height: 15px; }
.fm-numeros small i { font-style: normal; font-weight: 700; }
.fm-numeros small i.sobe { color: var(--bad); } .fm-numeros small i.desce { color: var(--ok); }
.fm-numeros > div.azul { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.fm-numeros > div.azul b { color: var(--ok); }
.fm-numeros > div.vermelho { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.fm-numeros > div.vermelho b { color: var(--bad); }
.fm-metas { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fm-metas li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.fm-metas li svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke-width: 2.4; margin-top: 1px; }
.fm-metas li.ok svg { stroke: var(--ok); } .fm-metas li.nao svg { stroke: var(--bad); }
.fm-acoes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.fm-acoes .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.fm-card .card-head .chip.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.fm-card .card-head .chip.warn { background: var(--warn-soft); color: var(--warn); }
.fm-full { padding: 18px 20px; }
.fm-bloco { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.fm-bloco h4 { font-size: 15px; margin-bottom: 10px; }
.fm-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-cats li { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.fm-cat-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-barra { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.fm-barra i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--roxo), var(--rosa)); }
.fm-full .ag-item .ag-item-txt b { font-size: 14.5px; font-weight: 600; }
.fm-porque { margin-top: 10px; font-size: 13.5px; }
.fm-porque summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
.fm-porque ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--text-2); }
@media (max-width: 640px) { .fm-numeros { grid-template-columns: 1fr; } .fm-numeros b { font-size: 20px; } .fm-cats li { grid-template-columns: 1fr auto; } .fm-cats li .fm-barra { grid-column: 1 / -1; } }
