/* Layout: app shell — barra lateral escura (o "espaço") à esquerda, área de trabalho clara;
   no celular vira barra inferior com botão central "+". O sol âmbar é a família no centro. */
:root {
  --bg: #EDF0F6;
  --surface: #FFFFFF;
  --surface-2: #F5F7FB;
  --line: #DCE2EC;
  --ink: #121A2B;
  --ink-2: #47536A;
  --ink-3: #78849A;
  --accent: #E38B22;
  --accent-ink: #1C1205;
  --accent-soft: #FCEAD2;
  --orbit: #2C3B6B;
  --orbit-soft: #E2E7F5;
  --casa: #11806F;
  --casa-soft: #D5EFEA;
  --pessoal: #C9466F;
  --pessoal-soft: #F9DDE6;
  --good: #19905A;
  --good-soft: #D9F2E5;
  --warn: #B87406;
  --warn-soft: #FCEFD3;
  --bad: #CF3B3B;
  --bad-soft: #FBE0E0;
  --nav-bg: #111829;
  --nav-ink: #C3CBE0;
  --nav-ink-strong: #FFFFFF;
  --nav-hover: #1C2540;
  --shadow: 0 1px 2px rgba(18, 26, 43, .06), 0 6px 20px rgba(18, 26, 43, .06);
  --shadow-lg: 0 20px 60px rgba(10, 16, 32, .28);
  --scrim: rgba(9, 13, 26, .52);

  --f-display: "Unbounded", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0F1D; --surface: #121A2D; --surface-2: #172036; --line: #242F4C;
    --ink: #E8ECF6; --ink-2: #A7B1C9; --ink-3: #76829E;
    --accent: #F2A848; --accent-ink: #1C1205; --accent-soft: #3A2911;
    --orbit: #93A5E2; --orbit-soft: #1E2847;
    --casa: #3CC0AB; --casa-soft: #0F302C; --pessoal: #F07C9C; --pessoal-soft: #3A1826;
    --good: #3DD68C; --good-soft: #10301F; --warn: #F5B640; --warn-soft: #3A2B0C;
    --bad: #FF6B6B; --bad-soft: #3B1717;
    --nav-bg: #070B16; --nav-ink: #A7B1C9; --nav-ink-strong: #FFFFFF; --nav-hover: #141C33;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0F1D; --surface: #121A2D; --surface-2: #172036; --line: #242F4C;
  --ink: #E8ECF6; --ink-2: #A7B1C9; --ink-3: #76829E;
  --accent: #F2A848; --accent-ink: #1C1205; --accent-soft: #3A2911;
  --orbit: #93A5E2; --orbit-soft: #1E2847;
  --casa: #3CC0AB; --casa-soft: #0F302C; --pessoal: #F07C9C; --pessoal-soft: #3A1826;
  --good: #3DD68C; --good-soft: #10301F; --warn: #F5B640; --warn-soft: #3A2B0C;
  --bad: #FF6B6B; --bad-soft: #3B1717;
  --nav-bg: #070B16; --nav-ink: #A7B1C9; --nav-ink-strong: #FFFFFF; --nav-hover: #141C33;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--orbit); }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.2; }
.num, .money { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.side {
  background: var(--nav-bg); color: var(--nav-ink); padding: 22px 14px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--nav-ink-strong); }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: .06em; }
.brand-tag { font-size: 11.5px; color: var(--nav-ink); letter-spacing: .04em; }
.fam-pill {
  margin: 0 4px; padding: 10px 12px; border-radius: var(--r); background: var(--nav-hover);
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.fam-pill b { color: var(--nav-ink-strong); display: block; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; padding: 12px 12px 4px; color: var(--nav-ink); opacity: .7; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--nav-ink); text-decoration: none; font-weight: 500; font-size: 14.5px;
}
.nav a:hover { background: var(--nav-hover); color: var(--nav-ink-strong); }
.nav a.on { background: var(--nav-hover); color: var(--nav-ink-strong); box-shadow: inset 3px 0 0 var(--accent); }
.nav a .badge { margin-left: auto; }
.side-foot { margin-top: auto; font-size: 12px; padding: 0 8px; opacity: .75; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.top h1 { font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: .01em; margin-right: auto; }
.top .sub { color: var(--ink-3); font-size: 13px; font-weight: 400; font-family: var(--f-body); display: block; letter-spacing: 0; }
.content { padding: 24px 28px 110px; display: flex; flex-direction: column; gap: 20px; max-width: 1320px; width: 100%; }

.mobile-brand { display: none; }
.bottom-nav { display: none; }

/* ---------- Controles ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.seg button.on { background: var(--ink); color: var(--surface); }
.seg button.on.casa { background: var(--casa); color: #fff; }
.seg button.on.pessoal { background: var(--pessoal); color: #fff; }
.seg button.person.on { background: var(--pc); color: #fff; }
.seg button.on .pdot { background: #fff !important; }
.pdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.person-card { display: flex; flex-direction: column; gap: 14px; }
.stack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.stack i { display: block; height: 100%; }
.pnums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pnums div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.pnums .k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pnums .v { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px; }
.people-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pm { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r); background: var(--surface-2); cursor: pointer; border: 1px solid transparent; text-align: left; }
.pm:hover { border-color: var(--line); }
.pm-h { display: flex; gap: 10px; align-items: center; }
.pm-h b { display: block; }
.ratio { margin-left: auto; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .pnums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.month-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.month-nav span { min-width: 118px; text-align: center; font-weight: 600; font-size: 13.5px; text-transform: capitalize; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); padding: 9px 15px; font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s, transform .1s; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  display: inline-grid; place-items: center; color: var(--ink-2); position: relative; flex: none;
}
.icon-btn:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-weight: 700; font-size: 13px; color: #fff; background: var(--orbit);
}
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 11px;
  padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 70px; }
.hint { font-size: 12.5px; color: var(--ink-3); }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search .input { padding-left: 36px; }

/* ---------- Cartões / blocos ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2 { font-size: 16px; font-weight: 700; margin-right: auto; }
.card-h .link { font-size: 13px; font-weight: 600; color: var(--orbit); text-decoration: none; background: none; border: 0; padding: 0; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); font-weight: 600; }

.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }

/* Hero da órbita */
.orbit-hero {
  background: var(--nav-bg); color: var(--nav-ink); border-radius: var(--r-lg); padding: 22px 24px;
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: center;
  border: 1px solid var(--line); overflow: hidden; position: relative;
}
.orbit-hero h2 { font-family: var(--f-display); color: var(--nav-ink-strong); font-size: 22px; font-weight: 600; }
.orbit-hero .greet { font-size: 14px; }
.orbit-svg { width: 100%; max-width: 300px; aspect-ratio: 1; display: block; margin: 0 auto; }
.orbit-svg .planet { cursor: pointer; transition: transform .2s; transform-box: fill-box; transform-origin: center; }
.orbit-svg .planet:hover { transform: scale(1.35); }
.orbit-svg .spin { animation: spin 120s linear infinite; transform-origin: 150px 150px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.hero-stat { background: var(--nav-hover); border-radius: var(--r); padding: 12px 14px; }
.hero-stat .k { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.hero-stat .v { font-size: 20px; font-weight: 700; color: var(--nav-ink-strong); font-variant-numeric: tabular-nums; }
.hero-stat .s { font-size: 12px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; margin-top: 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .k { font-size: 12.5px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .s { font-size: 12.5px; color: var(--ink-3); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--good); }

/* Listas */
.list { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 11px 6px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 10px;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .m { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cat-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.rec { color: var(--good); }
.amt.desp { color: var(--ink); }

.day-head { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; padding: 14px 6px 4px; display: flex; justify-content: space-between; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.pago { background: var(--good-soft); color: var(--good); }
.pill.pendente { background: var(--warn-soft); color: var(--warn); }
.pill.vencida { background: var(--bad-soft); color: var(--bad); }
.pill.prevista { background: var(--orbit-soft); color: var(--orbit); }
.pill.cancelado { background: var(--surface-2); color: var(--ink-3); text-decoration: line-through; }
.pill.parcial { background: var(--accent-soft); color: var(--accent); }
.pill.aberta { background: var(--orbit-soft); color: var(--orbit); }
.pill.fechada { background: var(--warn-soft); color: var(--warn); }
.rec-box { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface-2); }
.prev { display: flex; flex-direction: column; gap: 8px; }
.prev-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.prev-dates { display: flex; gap: 6px; flex-wrap: wrap; }
.prev-t td { padding: 5px 8px; }
.prev-t .input { padding: 6px 9px; }
.cc { border-radius: var(--r-lg); padding: 18px; color: #fff; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; min-height: 170px; }
.cc::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 2px solid currentColor; opacity: .18; }
.cc::before { content: ""; position: absolute; left: -30px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; background: currentColor; opacity: .05; }
.cc .nm { font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.cc .num { font-size: 13px; letter-spacing: .16em; opacity: .85; }
.cc .lim { height: 6px; border-radius: 99px; background: color-mix(in srgb, currentColor 25%, transparent); overflow: hidden; }
.cc .lim i { display: block; height: 100%; background: currentColor; border-radius: 99px; }
.cc small { opacity: .85; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.inv-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.inv-cell { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); text-align: left; display: flex; flex-direction: column; gap: 2px; }
.inv-cell:hover { border-color: var(--ink-3); }
.inv-cell b { font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 6px; }
.tag.casa { background: var(--casa-soft); color: var(--casa); }
.tag.pessoal { background: var(--pessoal-soft); color: var(--pessoal); }
.badge { background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 18px; }

/* Insights */
.insight { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface-2); align-items: start; }
.insight + .insight { margin-top: 10px; }
.insight .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }
.insight p { margin: 0; font-size: 14px; }
.insight small { color: var(--ink-3); }

/* Gráficos */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--f-body); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.catbar { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; }
.catbar .nm { font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.catbar .nm small { color: var(--ink-3); font-weight: 500; }
.catbar .track { height: 8px; border-radius: 99px; background: var(--surface-2); margin-top: 5px; position: relative; overflow: hidden; }
.catbar .track i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; }

/* Atalhos */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick button {
  border: 1px dashed var(--line); background: var(--surface-2); border-radius: var(--r); padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.quick button:hover { border-style: solid; border-color: var(--accent); color: var(--ink); }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.neg td.bal { color: var(--bad); font-weight: 700; }

/* Filtros */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters select { width: auto; min-width: 140px; padding: 8px 11px; }
.filters .search { flex: 1 1 220px; }
.filters .search .input { width: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2);
}
.chip.on { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; }

.totals { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.totals b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; text-align: center; padding-bottom: 4px; letter-spacing: .06em; }
.cal .day {
  min-height: 104px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; text-align: left;
}
.cal .day:hover { border-color: var(--ink-3); }
.cal .day.out { opacity: .4; }
.cal .day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal .day.sel { background: var(--accent-soft); }
.cal .dn { font-size: 12.5px; font-weight: 700; }
.cal .ev { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.desp { background: var(--bad-soft); color: var(--bad); }
.ev.rec { background: var(--good-soft); color: var(--good); }
.ev.tarefa { background: var(--orbit-soft); color: var(--orbit); }
.ev.evento { background: var(--accent-soft); color: var(--accent); }
.ev.pago { opacity: .55; text-decoration: line-through; }
.cal .more { font-size: 11px; color: var(--ink-3); }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; }

/* Compras */
.shop-sec { margin-top: 6px; }
.shop-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--line); }
.shop-item.done .t { text-decoration: line-through; color: var(--ink-3); }
.shop-item input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--casa); }
.shop-item .t { font-weight: 600; }
.shop-item .m { font-size: 12px; color: var(--ink-3); }

/* Metas */
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.goal { display: flex; flex-direction: column; gap: 12px; }
.goal-top { display: flex; gap: 14px; align-items: center; }
.ring { width: 74px; height: 74px; flex: none; }
.ring text { font-size: 15px; font-weight: 700; fill: var(--ink); font-family: var(--f-body); }

/* Tarefas */
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 6px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task.done .t { text-decoration: line-through; color: var(--ink-3); }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: transparent; display: grid; place-items: center; color: transparent; padding: 0; }
.task.done .tick { background: var(--good); border-color: var(--good); color: #fff; }

/* Integrantes */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.member { display: flex; flex-direction: column; gap: 12px; }
.member-h { display: flex; gap: 12px; align-items: center; }
.member-h .t { font-weight: 700; }
.perm-list { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-list span { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.role { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.role.admin { background: var(--accent-soft); color: var(--accent); }
.role.familiar { background: var(--casa-soft); color: var(--casa); }
.role.consulta { background: var(--orbit-soft); color: var(--orbit); }

/* Histórico */
.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: start; }
.tl:first-child { border-top: 0; }
.tl .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* Modal e gaveta */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: var(--r-lg); width: min(560px, 100%); max-height: calc(100% - 20px); overflow: auto;
  box-shadow: var(--shadow-lg); animation: pop .18s ease; border: 1px solid var(--line);
}
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.modal-h h3 { font-size: 18px; font-weight: 700; margin-right: auto; }
.modal-b { padding: 12px 20px 8px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; flex-wrap: wrap; }
.scrim.drawer { place-items: stretch end; padding: 0; }
.scrim.drawer .modal { width: min(460px, 100%); max-height: 100%; height: 100%; border-radius: 0; animation: slide .2s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

.type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-toggle button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); }
.type-toggle button.on.desp { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.type-toggle button.on.rec { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.type-toggle button.on.casa { background: var(--casa-soft); border-color: var(--casa); color: var(--casa); }
.type-toggle button.on.pessoal { background: var(--pessoal-soft); border-color: var(--pessoal); color: var(--pessoal); }
.big-money { display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--line); padding: 4px 2px; }
.big-money:focus-within { border-color: var(--accent); }
.big-money span { font-size: 20px; font-weight: 700; color: var(--ink-3); }
.big-money input { border: 0; outline: none; background: transparent; font-size: 34px; font-weight: 700; width: 100%; font-variant-numeric: tabular-nums; min-width: 0; }
.suggest { font-size: 12.5px; background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 8px 11px; display: flex; gap: 8px; align-items: center; }
.suggest button { margin-left: auto; }

.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; }

/* Toast */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: pop .2s ease; pointer-events: auto; }

/* Popover de notificações */
.pop {
  position: fixed; top: 64px; right: 20px; width: min(380px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 50; max-height: 70vh; overflow: auto; padding: 8px;
}
.notif { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--accent-soft); }
.notif p { margin: 0; font-size: 13.5px; }
.notif small { color: var(--ink-3); }

/* Vazio / dica */
.empty { text-align: center; padding: 34px 16px; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty b { color: var(--ink); font-size: 15px; }
.tip { display: flex; gap: 10px; align-items: flex-start; background: var(--orbit-soft); color: var(--ink); border-radius: var(--r); padding: 12px 14px; font-size: 13.5px; }
.tip svg { color: var(--orbit); flex: none; margin-top: 2px; }
.tip p { margin: 0; }

/* Primeiros passos */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.step { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 600; background: var(--surface-2); text-align: left; }
.step.done { color: var(--ink-3); }
.step .tick { flex: none; }
.step.done .tick { background: var(--good); border-color: var(--good); color: #fff; }

/* Simulação */
.sim { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.range-row { display: flex; flex-direction: column; gap: 6px; }
.range-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- Autenticação ---------- */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art { background: var(--nav-bg); color: var(--nav-ink); padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; position: relative; overflow: hidden; }
.auth-art h1 { font-family: var(--f-display); color: var(--nav-ink-strong); font-size: clamp(30px, 4vw, 46px); font-weight: 600; letter-spacing: .02em; }
.auth-art p { max-width: 40ch; font-size: 16px; }
.auth-art .feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.auth-art .feat div { background: var(--nav-hover); border-radius: var(--r); padding: 12px 14px; font-size: 13.5px; }
.auth-art .feat b { color: var(--nav-ink-strong); display: block; }
.auth-orbit { position: absolute; right: -120px; top: 50%; transform: translateY(-50%); width: 460px; opacity: .55; pointer-events: none; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(410px, 100%); display: flex; flex-direction: column; gap: 16px; }
.auth-card h2 { font-family: var(--f-display); font-size: 24px; font-weight: 600; }
.auth-card .sub { color: var(--ink-2); margin-top: -8px; }
.auth-card .row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.linkbtn { background: none; border: 0; color: var(--orbit); font-weight: 600; padding: 0; }
.demo-note { font-size: 12.5px; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 10px; padding: 9px 11px; }
.err { color: var(--bad); font-size: 13.5px; font-weight: 600; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-brand { display: flex; align-items: center; }
  .mobile-brand b { display: none; }
  .top { padding: 10px 16px; gap: 8px; }
  .top h1 { display: block; font-size: 19px; margin-right: auto; min-width: 0; flex: 1 1 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .top > .icon-btn, .top > .mobile-brand { flex: none; }
  .top h1 .sub { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #scope-seg { order: 10; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  #scope-seg::-webkit-scrollbar { display: none; }
  #scope-seg button { flex: none; }
  .top .wide-only { display: none; }
  .content { padding: 16px 16px 120px; }
  .orbit-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .orbit-svg { max-width: 250px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--nav-bg); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--nav-ink); text-decoration: none; background: none; border: 0; padding: 6px 0; }
  .bottom-nav a.on { color: var(--accent); }
  .bottom-nav .fab { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: -22px auto 0; box-shadow: 0 6px 18px rgba(0,0,0,.35); padding: 0; }
  .grid3, .sim { grid-template-columns: minmax(0, 1fr); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: 28px 20px; }
  .auth-art .feat { display: none; }
  .auth-orbit { width: 260px; right: -70px; }
  .cal .day { min-height: 56px; }
  .cal .ev, .cal .more { display: none; }
  .cal-dots { display: flex; }
  .scrim:not(.drawer) { place-items: end center; padding: 0; }
  .scrim:not(.drawer) .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; width: 100%; max-height: 92%; }
  .pop { top: 58px; right: 16px; }
  .fab-desk { display: none; }
}
@media (max-width: 520px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .kpi .v { font-size: 18px; }
  .hero-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .seg button { padding: 6px 10px; font-size: 12.5px; }
  .month-nav span { min-width: 92px; font-size: 12.5px; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .shop-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .shop-item .hide-sm { display: none; }
}
@media (max-width: 860px) { .toasts { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 440px) { .top .icon-btn { width: 34px; height: 34px; } .top { gap: 6px 2px; } }

@media (min-width: 861px) and (max-width: 1280px) {
  .top { flex-wrap: wrap; row-gap: 10px; }
  #scope-seg { order: 10; flex: 0 1 auto; }
}

/* ---------- Modo app no celular ---------- */
@media (max-width: 860px) {
  body { -webkit-tap-highlight-color: transparent; }
  .top { padding: 10px 14px 8px; gap: 6px 4px; }
  .input, select.input, textarea.input { font-size: 16px; } /* evita zoom automático no iPhone */
  .row { padding: 13px 4px; }
  .card { border-radius: 18px; padding: 16px; }
  .bottom-nav { grid-template-columns: repeat(5, 1fr); align-items: end; border-top: 1px solid color-mix(in srgb, var(--nav-ink) 18%, transparent); }
  .bottom-nav a, .bottom-nav button { position: relative; }
  .bottom-nav a.on::before { content: ""; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent); }
  .bottom-nav .fab span { display: none; }
  .scrim:not(.drawer) .modal { padding-top: 10px; }
  .scrim:not(.drawer) .modal::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 2px; }
  .modal-f { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .modal-f .btn { flex: 1 1 auto; }
  .scrim.drawer .modal { width: 100%; }
  .filters .input, .filters select { flex: 1 1 140px; }
  .seg { max-width: 100%; overflow-x: auto; }
  .day-head { padding-top: 16px; }
}

/* Menu do celular, lançar e busca */
.me-card { display: flex; gap: 12px; align-items: center; width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r); padding: 12px; }
.me-card > div { flex: 1; display: flex; flex-direction: column; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.app-grid button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 6px 2px; text-align: center; border-radius: 12px; }
.app-grid button:hover { background: var(--surface-2); }
.ag-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.launch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.launch button { display: flex; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 12px; }
.launch button:hover { border-color: var(--accent); }
.launch b { display: block; font-size: 14.5px; }
.launch small { color: var(--ink-3); font-size: 12.5px; }
.l-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
@media (max-width: 520px) { .launch { grid-template-columns: minmax(0, 1fr); } .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Formulário: seção recolhível */
details.more { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 600; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .hint { margin-left: auto; }
details.more[open] > summary > svg:last-child { transform: rotate(180deg); }
details.more .rec-box { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }

/* Personalizar */
.pz { display: flex; flex-direction: column; gap: 18px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px 5px 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.swatches button span { width: 20px; height: 20px; border-radius: 50%; display: block; }
.swatches button.on { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink); }
.swatches.dots button { padding: 5px; }
.swatches.dots button span { width: 26px; height: 26px; }
.switch-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; }
.switch-row small { color: var(--ink-3); font-size: 12.5px; }
.switch { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
.pz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pz-prev { display: grid; grid-template-columns: 54px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-height: 170px; }
.pz-side { background: var(--nav-bg); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; color: var(--nav-ink); }
.pz-side i { width: 26px; height: 6px; border-radius: 9px; background: var(--nav-hover); }
.pz-side i.on { background: var(--accent); }
.pz-main { padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }

/* Personalização aplicada */
:root[data-menu="claro"] .side { border-right: 1px solid var(--line); }
:root[data-menu="claro"] .bottom-nav { border-top: 1px solid var(--line); }
:root[data-font="grande"] .content, :root[data-font="grande"] .modal, :root[data-font="grande"] .bottom-nav { zoom: 1.12; }
:root[data-density="compacta"] .content { gap: 12px; padding-top: 14px; }
:root[data-density="compacta"] .dash { gap: 12px; }
:root[data-density="compacta"] .card { padding: 13px 15px; }
:root[data-density="compacta"] .row { padding: 7px 4px; }
:root[data-density="compacta"] .cat-ic { width: 32px !important; height: 32px !important; }
:root.reduce-motion *, :root.reduce-motion *::before, :root.reduce-motion *::after { animation: none !important; transition: none !important; }
:root.hide-values :is(.amt, .money, .kpi .v, .hero-stat .v, .pnums .v, .catbar .nm small, .totals b, .sun-txt, .inv-cell b, .cc .lim, table.t:not(.prev-t) td.r) { filter: blur(7px); }
:root.hide-values .orbit-hero h2 { filter: blur(6px); }

/* ---------- Saldos ---------- */
.accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.acc { display: flex; flex-direction: column; gap: 14px; }
.acc-h { display: flex; gap: 12px; align-items: center; }
.acc-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.acc-b { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.acc-v { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.acc-f { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.acc-f .icon-btn { margin-left: auto; }
.hero-bal { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 12px; border-radius: 99px; background: var(--nav-hover); color: var(--nav-ink-strong); text-decoration: none; font-size: 13.5px; }
.hero-bal b { font-variant-numeric: tabular-nums; }

/* ---------- Ler conta ---------- */
.read-cta { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--ink); border-radius: var(--r); padding: 10px 14px; font-size: 13.5px; }
.read-cta span { flex: 1; }
.reader-drop { border: 2px dashed var(--line); border-radius: var(--r-lg); padding: 26px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: var(--surface-2); color: var(--ink-2); transition: border-color .15s, background .15s; }
.reader-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.reader-drop b { color: var(--ink); }
.reading { display: flex; gap: 10px; align-items: center; padding: 14px; color: var(--ink-2); font-weight: 600; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
.read-res { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); }
.read-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--good); }
.read-h b { color: var(--ink); }
.read-h .hint { margin-left: auto; }
.read-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.read-grid > div { border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.read-grid > div span { display: flex; gap: 5px; align-items: center; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.read-grid > div b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-grid .ok { background: var(--good-soft); }
.read-grid .ok span { color: var(--good); }
.read-grid .miss { background: var(--surface-2); color: var(--ink-3); }
.read-grid .miss b { font-weight: 500; font-style: italic; }
.cand { display: flex; gap: 10px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.filled-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--good-soft); color: var(--ink); border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; }
.filled-banner svg { color: var(--good); flex: none; margin-top: 2px; }
.input.filled, .big-money.filled, .chip.filled { background: var(--good-soft) !important; border-color: var(--good) !important; }
.barcode-box { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface-2); }
.barcode-box code { font-size: 13px; word-break: break-all; font-variant-numeric: tabular-nums; color: var(--ink); }
.barcode-box .btn { align-self: flex-start; }

/* ---------- Importar ---------- */
.imp-list { display: flex; flex-direction: column; margin-top: 12px; }
.imp-row { display: grid; grid-template-columns: auto minmax(180px, 1fr) 110px 170px 160px 120px; gap: 10px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); }
.imp-row.off { opacity: .45; }
.imp-row .input { padding: 7px 10px; }
.imp-row .amt { text-align: right; }
.imp-row .pill { justify-self: start; }
.imp-chk { width: 18px; height: 18px; accent-color: var(--accent); }
.imp-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 1100px) {
  .imp-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "c m a" "c cat cat" "c own st"; }
  .imp-row .imp-chk { grid-area: c; align-self: start; margin-top: 10px; }
  .imp-row .imp-main { grid-area: m; } .imp-row .amt { grid-area: a; } .imp-row .imp-cat { grid-area: cat; } .imp-row .imp-own { grid-area: own; } .imp-row .pill { grid-area: st; align-self: center; }
}

/* ---------- Assistente ---------- */
.wz-cta { display: flex; gap: 16px; align-items: center; background: linear-gradient(120deg, var(--accent-soft), var(--surface)); }
.wz-cta > div:nth-child(2) { flex: 1; }
.wz-prog { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; }
.wz-prog span { flex: 1; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.wz-prog span::before { content: ""; display: block; height: 4px; width: 100%; border-radius: 9px; background: var(--line); }
.wz-prog span.on, .wz-prog span.done { color: var(--ink); }
.wz-prog span.on::before, .wz-prog span.done::before { background: var(--accent); }
.wz-prog em { font-style: normal; font-weight: 500; font-size: 11px; white-space: nowrap; }
.wz-body { display: flex; flex-direction: column; gap: 10px; min-height: 260px; }
.wz-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 20px 10px; }
.wz-hero h3 { font-family: var(--f-display); font-size: 21px; font-weight: 600; }
.wz-hero p { max-width: 52ch; color: var(--ink-2); margin: 0; }
.wz-t { font-size: 18px; font-weight: 700; }
.wz-body > p.hint { margin: -4px 0 6px; }
.wz-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wz-row > .input:not(.wz-money):not([type=number]) { flex: 1 1 180px; }
.wz-money { width: 130px; flex: none; text-align: right; }
.wz-day { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.wz-day .input { width: 64px; padding: 8px; }
.wz-card select { width: auto; flex: 0 1 140px; }
.wz-bills { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.wz-bill { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.wz-bill.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wz-bill-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: transparent; font-weight: 600; text-align: left; color: var(--ink); }
.wz-bill-h span { flex: 1; }
.wz-bill-h svg:last-child { color: var(--ink-3); }
.wz-bill.on .wz-bill-h svg:last-child { color: var(--accent); }
.wz-bill-b { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 12px; }
.wz-bill-b .wz-money { width: 100px; }
.wz-bill-b select { width: auto; flex: 1; padding: 8px; }
@media (max-width: 520px) { .wz-money { width: 110px; } .wz-cta { flex-wrap: wrap; } }

/* ---------- carregando e sincronização ---------- */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink); background: var(--bg); }
.boot b { font-family: var(--f-display); font-size: 22px; letter-spacing: .06em; }
#sync-badge { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: 1px; }
#sync-badge[data-st="saving"] { background: var(--warn); animation: fade 1s ease infinite alternate; }
#sync-badge[data-st="error"] { background: var(--bad); }
.imp-inv { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 14px; align-items: end; padding: 12px 14px; border-radius: 14px; background: var(--orbit-soft); }
@media (max-width: 760px) { .imp-inv { grid-template-columns: 1fr; } }

.cf-look { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: center; }
.cc-mini { min-height: 112px; padding: 14px; gap: 22px; transition: background .3s; }
.cc-mini .nm { font-size: 15px; }
@media (max-width: 520px) { .cf-look { grid-template-columns: 1fr; } }
