/* Finanças Gui & Helo — visual inspirado no macOS: SF Pro, vidro fosco, cartões macios.
   Cores de gráfico validadas (dataviz validator): claro #007aff/#f25c05, escuro #0a84ff/#e8590c. */

:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-grad: radial-gradient(1200px 600px at 85% -10%, #e6efff 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #fdeee6 0%, transparent 55%), #f5f5f7;
  --card: #ffffff;
  --card-2: #fbfbfd;
  --fill: #f2f2f7;
  --fill-2: #e9e9ef;
  --line: rgba(0, 0, 0, 0.07);
  --line-2: rgba(0, 0, 0, 0.12);
  --fg: #1d1d1f;
  --fg-2: #424245;
  --muted: #86868b;
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.10);
  --pos: #1f9d4c;
  --neg: #e5352b;
  --warn-soft: rgba(255, 159, 10, 0.14);
  --pend: rgba(255, 159, 10, 0.08);
  --side: rgba(246, 246, 248, 0.72);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.03), 0 6px 24px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.04), 0 18px 48px rgba(0, 0, 0, 0.08);
  --radius: 18px;

  --series-1: #007aff;
  --series-2: #f25c05;
  --good-f: #007aff;
  --bad-f: #ff3b30;
  --grid: #ececf0;
  --axis: #d2d2d7;
  --ink-2: #424245;
  --ink-m: #8e8e93;
  --h1: #e3efff; --h2: #c6ddff; --h3: #99c2ff; --h4: #5ea2ff; --h5: #1f7fff; --h6: #0060d6; --h7: #003f8f;

  --hero: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 55%, #bf5af2 110%);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #000000;
    --bg-grad: radial-gradient(1200px 600px at 85% -10%, #0b1a33 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #2a1409 0%, transparent 55%), #000;
    --card: #1c1c1e;
    --card-2: #232326;
    --fill: #2c2c2e;
    --fill-2: #3a3a3c;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --fg: #f5f5f7;
    --fg-2: #d1d1d6;
    --muted: #98989d;
    --accent: #0a84ff;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --pos: #30d158;
    --neg: #ff6961;
    --pend: rgba(255, 159, 10, 0.10);
    --side: rgba(28, 28, 30, 0.62);
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.4), 0 8px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);

    --series-1: #0a84ff;
    --series-2: #e8590c;
    --good-f: #0a84ff;
    --bad-f: #ff453a;
    --grid: #2c2c2e;
    --axis: #48484a;
    --ink-2: #d1d1d6;
    --ink-m: #8e8e93;
    --h1: #0f2340; --h2: #12325f; --h3: #15468a; --h4: #1a5fb8; --h5: #0a84ff; --h6: #5eaeff; --h7: #b3d7ff;
  }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #000000;
    --bg-grad: radial-gradient(1200px 600px at 85% -10%, #0b1a33 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #2a1409 0%, transparent 55%), #000;
    --card: #1c1c1e;
    --card-2: #232326;
    --fill: #2c2c2e;
    --fill-2: #3a3a3c;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --fg: #f5f5f7;
    --fg-2: #d1d1d6;
    --muted: #98989d;
    --accent: #0a84ff;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --pos: #30d158;
    --neg: #ff6961;
    --pend: rgba(255, 159, 10, 0.10);
    --side: rgba(28, 28, 30, 0.62);
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.4), 0 8px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);

    --series-1: #0a84ff;
    --series-2: #e8590c;
    --good-f: #0a84ff;
    --bad-f: #ff453a;
    --grid: #2c2c2e;
    --axis: #48484a;
    --ink-2: #d1d1d6;
    --ink-m: #8e8e93;
    --h1: #0f2340; --h2: #12325f; --h3: #15468a; --h4: #1a5fb8; --h5: #0a84ff; --h6: #5eaeff; --h7: #b3d7ff;
  }


* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0; min-height: 100vh;
  font: 14px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  letter-spacing: -0.01em;
  color: var(--fg); background: var(--bg-grad); background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Estrutura ── */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px 18px;
  display: flex; flex-direction: column; gap: 22px;
  background: var(--side); border-right: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px; }
.brand strong { display: block; font: 600 17px/1.1 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -0.02em; }
.brand small { color: var(--muted); font-size: 12px; }
.logo {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--hero); box-shadow: 0 6px 16px rgba(94, 92, 230, 0.35), inset 0 1px 0 rgba(255,255,255,.35);
}
.logo svg { width: 22px; height: 22px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px;
  color: var(--fg-2); font-weight: 500; text-decoration: none; transition: background .15s, color .15s;
}
.side nav a:hover { background: var(--fill); }
.side nav a.on { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(0, 122, 255, 0.28); }
.side nav a.on .ic { color: #fff; }
.ic { width: 20px; height: 20px; flex: none; color: var(--accent); }
.ic.sm { width: 15px; height: 15px; color: var(--muted); }
.badge {
  margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; min-width: 22px; text-align: center;
  padding: 1px 7px; border-radius: 999px; background: #ff9f0a; color: #fff;
}
.side nav a.on .badge { background: rgba(255,255,255,.25); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--muted); font-size: 12px; }

.content { padding: 26px 40px 80px; max-width: 1440px; width: 100%; }
.topline { color: var(--muted); font-size: 12.5px; margin-bottom: 2px; }
.topline::first-letter { text-transform: uppercase; }

/* ── Tipografia ── */
h1 { font: 700 32px/1.12 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -0.028em; margin: 2px 0 18px; }
h2 { font: 600 17px/1.3 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -0.02em; margin: 30px 0 12px; color: var(--fg); }
.muted, small.muted { color: var(--muted); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
/* em tabelas, saída fica neutra (estilo Carteira); só entrada ganha cor */
table td.num.neg { color: var(--fg); } table td.num.pos { color: var(--pos); }
table td.num strong { font-weight: 600; }
.ok { color: var(--pos); font-weight: 500; } .bad { color: var(--neg); font-weight: 600; }
code { font: 12px ui-monospace, "SF Mono", Menlo, monospace; background: var(--fill); padding: 2px 6px; border-radius: 6px; }

/* ── Cartões e tabelas ── */
.aviso {
  background: var(--card); border-radius: 14px; padding: 14px 18px; margin: 6px 0 18px;
  box-shadow: var(--shadow); border-left: 4px solid var(--accent);
}
.aviso ul { margin: 0; padding-left: 18px; }
table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
th, td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
thead th {
  font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  background: var(--card-2);
}
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--fill); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.desc { max-width: 520px; word-break: break-word; color: var(--fg); }
td.desc small { color: var(--muted); }
tr.pend td { background: var(--pend); }
tr.transferencia td:first-child a, tr.investimento td:first-child a { color: var(--muted); }
table.cats td:first-child a { color: var(--fg); font-weight: 500; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 18px 0; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.card span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.card b { font: 600 24px/1.2 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -0.02em; }
.card small { color: var(--muted); }

.mesnav { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.mesnav h1 { margin: 0; text-transform: capitalize; }
.mesnav a {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; font-size: 13px;
}
.mesnav a:hover { background: var(--fill); }

/* ── Formulários ── */
input, select, button, textarea { font: inherit; letter-spacing: inherit; }
input, select {
  padding: 7px 11px; border-radius: 10px; border: 1px solid transparent; background: var(--fill); color: var(--fg);
  outline: none; transition: box-shadow .15s, background .15s;
}
input:focus, select:focus { background: var(--card); box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; padding: 0; }
input[type=file] { padding: 6px; }
button {
  padding: 7px 16px; border-radius: 999px; border: none; cursor: pointer; font-weight: 600;
  background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25); transition: transform .08s, filter .15s;
}
button:hover { filter: brightness(1.08); }
button:active { transform: scale(.97); }
button.link { background: none; box-shadow: none; color: var(--neg); padding: 0 4px; font-weight: 500; }
form.grade {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 14px 0 22px;
  background: var(--card); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow);
}
form.grade label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); }
form.filtros {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px;
  background: var(--card); padding: 12px 14px; border-radius: 14px; box-shadow: var(--shadow);
}
form.filtros label { color: var(--fg-2); display: flex; align-items: center; gap: 6px; }
form.classif { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
form.classif select { max-width: 240px; }
form.classif label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
form.classif button { padding: 5px 12px; }
form.inline { display: inline; }
details { margin-top: 18px; }
summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "›"; display: inline-block; margin-right: 6px; transition: transform .15s; }
details[open] summary::before { transform: rotate(90deg); }
details > table, details > form { margin-top: 12px; }

/* ── Visão geral ── */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.dash-head h1 { margin-bottom: 4px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.seg {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--fill-2);
}
.seg a { padding: 6px 14px; border-radius: 8px; color: var(--fg-2); font-weight: 500; font-size: 13px; text-decoration: none; }
.seg a.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 2fr); gap: 16px; margin-bottom: 18px; }
.hero-main {
  position: relative; overflow: hidden; border-radius: 22px; padding: 22px 24px; color: #fff;
  background: var(--hero); box-shadow: 0 16px 40px rgba(94, 92, 230, 0.30);
  display: flex; flex-direction: column; justify-content: space-between; min-height: 190px;
}
.hero-main::after {
  content: ""; position: absolute; inset: auto -60px -80px auto; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%);
}
.hero-main span { font-size: 13px; font-weight: 500; opacity: .85; }
.hero-main b { display: block; font: 700 46px/1.05 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -0.035em; margin: 8px 0 6px; }
.hero-main .chip {
  align-self: flex-start; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; gap: 14px; align-items: center; }
.tile .dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.tile .dot svg { width: 20px; height: 20px; }
.tile .dot.azul { background: rgba(0,122,255,.12); color: #007aff; }
.tile .dot.laranja { background: rgba(242,92,5,.12); color: #f25c05; }
.tile .dot.verde { background: rgba(52,199,89,.14); color: #28a745; }
.tile .dot.roxo { background: rgba(175,82,222,.14); color: #af52de; }
.tile span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tile b { display: block; font: 600 22px/1.2 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -0.02em; }
.tile small { color: var(--muted); font-size: 12px; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.painel { background: var(--card); border-radius: 22px; padding: 18px 22px 16px; margin: 0 0 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.painel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.painel h2 { margin: 0; font-size: 16px; }
.painel p.muted { margin: 2px 0 10px; font-size: 12.5px; }
.painel details table { box-shadow: none; border: 1px solid var(--line); }
.legenda { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.legenda span { display: flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); }

svg.viz { width: 100%; height: auto; display: block; overflow: visible; }
svg.viz .s1 { fill: var(--series-1); } svg.viz .s2 { fill: var(--series-2); }
svg.viz .pos-f { fill: var(--good-f); } svg.viz .neg-f { fill: var(--bad-f); }
svg.viz path { transition: opacity .15s; }
svg.viz:hover path { opacity: .55; } svg.viz path:hover { opacity: 1; }
svg.viz .grid { stroke: var(--grid); stroke-width: 1; } svg.viz .base { stroke: var(--axis); stroke-width: 1; }
svg.viz .tick { fill: var(--ink-m); font-size: 12px; font-variant-numeric: tabular-nums; }
svg.viz .lbl { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
svg.viz .muted-t { fill: var(--ink-m); font-weight: 400; }
svg.viz .cat { fill: var(--fg); font-size: 13px; font-weight: 500; }

.heat-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
table.heat { font-size: 12px; box-shadow: none; border-radius: 0; background: transparent; border-spacing: 3px; border-collapse: separate; }
table.heat thead th { background: transparent; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
table.heat th[scope=row] { white-space: nowrap; font-weight: 500; color: var(--fg); font-size: 12.5px; background: transparent; border: none; padding-left: 0; }
table.heat td { padding: 6px 7px; border: none; border-radius: 7px; background: var(--fill); color: var(--fg-2); min-width: 46px; }
table.heat tbody tr:hover td { filter: brightness(.97); }
table.heat td.h0 { background: transparent; }
table.heat td:last-child { background: transparent; }
.h1 { background: var(--h1) !important; } .h2 { background: var(--h2) !important; } .h3 { background: var(--h3) !important; }
.h4 { background: var(--h4) !important; color: #fff !important; } .h5 { background: var(--h5) !important; color: #fff !important; }
.h6 { background: var(--h6) !important; color: #fff !important; } .h7 { background: var(--h7) !important; color: #fff !important; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .h1, :root[data-theme="system"] .h2, :root[data-theme="system"] .h3 { color: var(--fg) !important; }
  :root[data-theme="system"] .h6, :root[data-theme="system"] .h7 { color: #0b0b0b !important; }
}
:root[data-theme="dark"] .h1, :root[data-theme="dark"] .h2, :root[data-theme="dark"] .h3 { color: var(--fg) !important; }
:root[data-theme="dark"] .h6, :root[data-theme="dark"] .h7 { color: #0b0b0b !important; }


/* ── Responsivo ── */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; z-index: 5; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .brand div, .side-foot { display: none; }
  .side nav { flex-direction: row; }
  .side nav a span { display: none; }
  .content { padding: 18px 16px 60px; }
  h1 { font-size: 26px; }
  .hero-main b { font-size: 36px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  td.desc { max-width: 200px; }
}

.hero-main.neg-hero { background: linear-gradient(135deg, #ff9f0a 0%, #ff6b35 50%, #ff375f 110%); box-shadow: 0 16px 40px rgba(255, 55, 95, 0.28); }
/* linha de classificação compacta, numa linha só */
table.lanc td { padding-top: 9px; padding-bottom: 9px; }
table.lanc td.desc { max-width: 420px; font-size: 13.5px; }
form.classif { flex-wrap: nowrap; }
form.classif select { max-width: 200px; padding: 5px 9px; }
form.classif input[name=padrao] { width: 150px; padding: 5px 9px; font-size: 12.5px; }
form.classif label { white-space: nowrap; }

/* ── Refinamento Apple ── */
.num-r, .hero-main b, .tile b, .card b, .mini-tiles b, .anel-card b { font-family: ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; }
.side nav a.on { background: var(--accent-soft); color: var(--accent); box-shadow: none; font-weight: 600; }
.side nav a.on .ic { color: var(--accent); }
.side nav a.on .badge { background: #ff9f0a; }
.side-foot { flex-direction: column; align-items: stretch; gap: 12px; }
.side-foot .local { display: flex; align-items: center; gap: 7px; }
.tema { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--fill-2); }
.tema a { flex: 1; display: grid; place-items: center; padding: 5px 0; border-radius: 7px; color: var(--muted); }
.tema a:hover { text-decoration: none; background: var(--fill); }
.tema .ic { color: var(--muted); }
:root[data-theme="system"] .tema a[data-v="sistema"], :root[data-theme="light"] .tema a[data-v="claro"], :root[data-theme="dark"] .tema a[data-v="escuro"] {
  background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.14);
}
:root[data-theme="system"] .tema a[data-v="sistema"] .ic, :root[data-theme="light"] .tema a[data-v="claro"] .ic, :root[data-theme="dark"] .tema a[data-v="escuro"] .ic { color: var(--fg); }
.sub { color: var(--muted); margin: -10px 0 22px; max-width: 760px; }
.mesnav { flex-wrap: wrap; margin-bottom: 18px; }
.mesnav h1 { text-transform: none; }
.mesnav h1::first-letter { text-transform: uppercase; }
.mesnav a { font-size: 22px; line-height: 1; padding-bottom: 3px; }
.ir-mes { margin-left: auto; display: flex; gap: 8px; }
select.sel-mes { min-width: 190px; }
.barra-acao { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; margin-top: 18px; }
.barra-acao button { padding: 10px 22px; font-size: 15px; box-shadow: 0 8px 24px rgba(0,122,255,.35); }
input.valor { width: 130px; text-align: right; font-variant-numeric: tabular-nums; }
.painel.vazio p { margin: 4px 0 2px; }
.painel p.rodape { margin: 8px 0 0; }

/* fluxo de caixa */
.mini-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.mini-tiles > div { background: var(--fill); border-radius: 14px; padding: 10px 14px; }
.mini-tiles span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.mini-tiles b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.mini-tiles .destaque { background: var(--accent-soft); }
.mini-tiles .destaque b { color: var(--accent); }
svg.viz .linha { fill: none; stroke: var(--series-1); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
svg.viz .linha.proj { stroke-dasharray: 2 6; opacity: .9; }
svg.viz .area { opacity: 1; }
svg.viz .stop-a { stop-color: var(--series-1); stop-opacity: .22; }
svg.viz .stop-b { stop-color: var(--series-1); stop-opacity: 0; }
svg.viz .ponto { fill: var(--series-1); stroke: var(--card); stroke-width: 3; }
svg.viz .ponto.proj { fill: var(--card); stroke: var(--series-1); stroke-width: 2.5; }
svg.viz .hoje { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
svg.viz .zero { stroke: var(--neg); stroke-width: 1; opacity: .5; }
svg.viz .hit { fill: transparent; }
svg.viz .hit:hover { fill: var(--accent-soft); }
svg.viz:hover path.linha, svg.viz:hover path.area { opacity: 1; }
.legenda .ln { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--series-1); border-radius: 2px; }
.legenda .ln.tracejada { border-top-style: dotted; }

/* previsto × realizado */
.aneis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 14px; }
.anel-card { display: flex; align-items: center; gap: 14px; background: var(--fill); border-radius: 16px; padding: 12px 14px; }
.anel-card span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.anel-card b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; display: block; }
.anel-card small { color: var(--muted); font-size: 12px; }
svg.anel { width: 52px; height: 52px; flex: none; }
.anel-fundo { fill: none; stroke: var(--fill-2); stroke-width: 7; }
.anel-valor { fill: none; stroke-width: 7; stroke-linecap: round; }
.anel-valor.s1 { stroke: var(--series-1); } .anel-valor.s2 { stroke: var(--series-2); } .anel-valor.cinza { stroke: var(--muted); }
svg.viz .trilho { fill: var(--fill-2); }
svg.viz .ritmo { stroke: var(--fg); stroke-width: 2; stroke-linecap: round; opacity: .55; }
.sw.trilho { background: var(--fill-2); }
.ritmo-k { display: inline-block; width: 2px; height: 12px; background: var(--fg); opacity: .55; border-radius: 1px; }
svg.viz:hover rect { opacity: .6; } svg.viz rect:hover, svg.viz rect.hit { opacity: 1; }

/* investimentos */
.hero-main.verde-hero { background: linear-gradient(135deg, #30b0c7 0%, #34c759 60%, #a3e635 120%); box-shadow: 0 16px 40px rgba(52, 199, 89, 0.28); }
.metas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.meta-card { background: var(--card); border-radius: 22px; padding: 18px 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.meta-card header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.meta-card h3 { margin: 0; font: 600 16px/1.25 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -0.02em; }
.meta-card header small { color: var(--muted); }
.meta-card p { margin: 8px 0 0; font-size: 13.5px; }
.meta-card p.pequeno { font-size: 12px; }
.meta-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.meta-card.sem-meta .meta-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meta-nums span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.meta-nums b { font: 600 15px/1.3 ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; }
svg.barra { width: 100%; height: 6px; display: block; margin: 12px 0 4px; }
svg.barra .trilho { fill: var(--fill-2); } svg.barra .valor { fill: var(--series-1); } svg.barra .cheio { fill: #34c759; }
svg.anel.grande { width: 60px; height: 60px; }
.anel-pct { font: 600 15px ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; fill: var(--fg); }
.anel-valor.verde { stroke: #34c759; }
svg.viz .meta-l { stroke: #34c759; stroke-width: 1.5; stroke-dasharray: 6 5; }
input.valor.curto { width: 70px; }

.dash-head .sub { margin: 0 0 22px; }
.metas.compactas { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.meta-card.compacta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.meta-card.compacta svg.anel.grande { width: 48px; height: 48px; }
.meta-card.compacta .anel-pct { font-size: 13px; }
.meta-card.compacta h3 { font-size: 14.5px; }
.meta-card.compacta small { color: var(--muted); font-size: 12px; }

.tag { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-right: 4px; white-space: nowrap; }
form.linha-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.linha-form input.largo { min-width: 300px; flex: 1; }

/* login e segurança */
body.tela-login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-box { width: 100%; max-width: 360px; text-align: center; background: var(--card); border-radius: 26px; padding: 34px 30px 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.login-box h1 { margin: 14px 0 0; font-size: 28px; }
.login-box > p.muted { margin: 2px 0 20px; }
.logo.grande { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto; }
.logo.grande svg { width: 36px; height: 36px; }
.form-login { display: flex; flex-direction: column; gap: 10px; }
.form-login input { padding: 12px 14px; font-size: 15px; border-radius: 12px; }
.form-login button { padding: 12px; font-size: 15px; border-radius: 12px; margin-top: 4px; }
.erro-login { background: rgba(255,59,48,.1); color: var(--neg); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; font-weight: 500; }
.login-box p.pequeno { font-size: 12px; margin: 16px 0 0; }
.side-foot a.local { color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 8px; }
.side-foot a.local:hover, .side-foot a.local.on { background: var(--fill); color: var(--fg); }
form.sair { padding: 0 10px; }
button.link-sair { background: none; box-shadow: none; color: var(--muted); padding: 0; font-weight: 500; font-size: 12.5px; }
button.link-sair:hover { color: var(--neg); filter: none; }

/* sugestões */
table.sug td { vertical-align: top; }
table.sug td b { font-weight: 600; }
table.sug select { max-width: 240px; }
table.sug tr.conf-alta td:first-child { box-shadow: inset 3px 0 0 #34c759; }
table.sug tr.conf-media td:first-child { box-shadow: inset 3px 0 0 #ff9f0a; }
table.sug tr.conf-nenhuma { opacity: .85; }

/* drill-down */
svg.viz a.alvo { cursor: pointer; }
svg.viz a.alvo:hover path { opacity: 1; filter: brightness(1.08); }
svg.viz a.alvo rect.hit { fill: transparent; }
svg.viz a.alvo:hover rect.hit { fill: var(--accent-soft); }
svg.viz a.alvo:hover text.cat { fill: var(--accent); }
table.heat td a { color: inherit; text-decoration: none; display: block; }
table.heat th a { color: var(--fg); text-decoration: none; }
table.heat th a:hover { color: var(--accent); }
table.heat td:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
a.tile { text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
a.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -8px 0 14px; }
.chip-f { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12.5px; padding: 4px 11px; border-radius: 999px; }
.chips a.limpar { font-size: 12.5px; color: var(--muted); }

/* leva 1: administração */
.side { overflow-y: auto; }
.nav-grupo { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 4px; }
button.secundario { background: var(--fill-2); color: var(--fg); box-shadow: none; }
button.perigo { background: var(--neg); box-shadow: none; }
code.senha { font-size: 15px; padding: 4px 10px; background: var(--card); border: 1px solid var(--line-2); user-select: all; }
form.massa { position: sticky; top: 8px; z-index: 3; }
form.linha-form label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
form.grade label.cresce { flex: 1; min-width: 240px; }
form.grade label.cresce input { width: 100%; }
table.lanc td:first-child { width: 28px; }
td a { font-weight: 500; }
