/* ═══════════════════════════════════════════════════════════
   FINANÇAS · JDN — estilos
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #0a0c0f;
  --bg2: #0f1216;
  --card: #14181d;
  --card2: #1a1f26;
  --line: #232a32;
  --line2: #2e3640;
  --tx: #eef2f5;
  --tx2: #a4afba;
  --tx3: #6c7885;
  --acc: #34e0a1;
  --acc-ink: #04130d;
  --acc-soft: rgba(52, 224, 161, .12);
  --in: #34e0a1;
  --out: #ff6b7a;
  --tr: #5cc8ff;
  --warn: #ffc24b;
  --violet: #b18cff;
  --orange: #ff7a45;
  --red: #ff5d6c;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --num: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --side: 236px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font-family: var(--font); font-size: 15px; line-height: 1.45; }
body { min-height: 100vh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; }
a { color: var(--acc); }
code { background: var(--card2); padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
::selection { background: var(--acc); color: var(--acc-ink); }
.muted { color: var(--tx2); }
.dim { color: var(--tx3); }
.center { text-align: center; }
.num, .money { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.c-in { color: var(--in); } .c-out { color: var(--out); } .c-tr { color: var(--tr); } .c-warn { color: var(--warn); }
body.priv .money { filter: blur(9px); transition: filter .2s; }
body.priv .money:hover { filter: none; }

/* ─────────── Layout ─────────── */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: var(--bg2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 14px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; padding: 0 8px 20px; }
.brand img { width: 34px; height: 34px; object-fit: contain; border-radius: 9px; }
.brand.sm { padding: 0; font-size: 18px; }
.brand.sm img { width: 28px; height: 28px; }
.side-add { margin: 0 0 18px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .nav-btn {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--tx2); text-decoration: none; font-weight: 600; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav a:hover, .nav-btn:hover { background: var(--card); color: var(--tx); }
.nav a.on { background: var(--acc-soft); color: var(--acc); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.sync-chip:empty { display: none; }
.sync-chip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--tx3); padding: 9px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.sync-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--tx3); flex: none; }
.sync-chip.ok i { background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.sync-chip.busy i { background: var(--warn); animation: blink 1s infinite; }
.sync-chip.err i { background: var(--red); }
@keyframes blink { 50% { opacity: .3; } }

.top {
  display: none; position: sticky; top: 0; z-index: 15;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: rgba(10, 12, 15, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between;
}
.top-right { display: flex; align-items: center; gap: 8px; }
.main { margin-left: var(--side); padding: 28px 32px 70px; max-width: calc(1220px + var(--side)); }
.view { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.fab { display: none; }

@media (max-width: 860px) {
  .side { inset: auto 0 0 0; width: auto; height: calc(66px + var(--safe-b)); flex-direction: row; padding: 6px 8px var(--safe-b); border-right: 0; border-top: 1px solid var(--line); background: rgba(15, 18, 22, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .side .brand, .side .side-foot, .side .side-add { display: none; }
  .hide-m { display: none !important; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 3px; font-size: 11px; padding: 7px 2px; flex: 1; align-items: center; }
  .nav a.on { background: none; }
  .nav a.on svg { filter: drop-shadow(0 0 8px rgba(52, 224, 161, .55)); }
  .top { display: flex; }
  .main { margin-left: 0; padding: 16px 16px calc(110px + var(--safe-b)); }
  .fab {
    display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(80px + var(--safe-b)); z-index: 25;
    width: 58px; height: 58px; border-radius: 19px; border: 0; background: var(--acc); color: var(--acc-ink);
    box-shadow: 0 12px 30px rgba(52, 224, 161, .35), 0 4px 10px rgba(0, 0, 0, .4);
  }
  .fab svg { width: 26px; height: 26px; }
  .fab:active { transform: scale(.94); }
}

/* ─────────── Elementos ─────────── */
.h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--tx3); margin: 0 0 12px; }
.sec { margin-top: 26px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head .h3 { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card.flush { padding: 6px 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.sp { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--card2); font-weight: 650; font-size: 14px; transition: transform .1s, background .15s, border-color .15s;
  white-space: nowrap; text-decoration: none; color: var(--tx);
}
.btn:hover { border-color: var(--tx3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 15px 22px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--tx2); flex: none; padding: 0; }
.icon-btn:hover { color: var(--tx); border-color: var(--line2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.link { background: none; border: 0; color: var(--tx2); text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.link:hover { color: var(--tx); }

.inp, .sel, textarea.inp {
  width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 11px;
  padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.sel { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c7885' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.inp:focus, .sel:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.inp.big { padding: 14px 16px; font-size: 17px; }
input[type=date].inp { color-scheme: dark; }
textarea.inp { resize: vertical; min-height: 72px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--tx2); margin: 0 0 6px; }
.field { margin-bottom: 14px; min-width: 0; }
.fg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fg3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .fg3 { grid-template-columns: 1fr 1fr; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--tx2); white-space: nowrap; }
.pill svg { width: 13px; height: 13px; }
.pill.warn { color: var(--warn); border-color: rgba(255, 194, 75, .3); background: rgba(255, 194, 75, .07); }
.pill.bad { color: var(--out); border-color: rgba(255, 107, 122, .3); background: rgba(255, 107, 122, .07); }
.pill.ok { color: var(--acc); border-color: rgba(52, 224, 161, .3); background: var(--acc-soft); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--acc); flex: none; }

.progress { height: 8px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--acc); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* Segmentos / chips */
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 13px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 10px; font-weight: 650; font-size: 13px; color: var(--tx2); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--card2); color: var(--tx); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 2px 8px rgba(0, 0, 0, .3); }
.seg button svg { width: 15px; height: 15px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--tx2); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--acc-soft); color: var(--acc); border-color: rgba(52, 224, 161, .35); }
.chip .n { font-family: var(--num); font-size: 11px; opacity: .75; }

/* ─────────── Painel ─────────── */
.greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.greet .date { color: var(--tx3); font-weight: 600; font-size: 13px; }
.greet .sub { color: var(--tx2); margin-top: 4px; }

.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 24px 26px 18px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(52, 224, 161, .20) 0%, transparent 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(92, 200, 255, .10) 0%, transparent 60%),
    var(--card);
  border: 1px solid rgba(52, 224, 161, .22);
}
.hero .kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); display: flex; align-items: center; gap: 8px; }
.hero .big { font-family: var(--num); font-size: 46px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin: 6px 0 4px; }
.hero .big small { font-size: 22px; color: var(--tx2); font-weight: 500; }
.hero .delta { font-size: 13px; color: var(--tx2); display: flex; gap: 12px; flex-wrap: wrap; }
.hero .spark { margin: 14px -8px 0; }
.hero .accs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; position: relative; z-index: 1; }
.hero .accs span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); padding: 5px 10px; border-radius: 99px; color: var(--tx2); }
.hero .accs span i { width: 8px; height: 8px; border-radius: 3px; }
.hero .accs span b { color: var(--tx); font-family: var(--num); font-weight: 600; }
@media (max-width: 520px) { .hero { padding: 20px 18px 14px; } .hero .big { font-size: 36px; } }

.spark svg, svg.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--tx3); font-size: 11px; font-family: var(--num); }
.chart .gl { stroke: var(--line); stroke-width: 1; }

.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; overflow: hidden; }
.kpi .k { font-size: 12px; font-weight: 600; color: var(--tx3); display: flex; align-items: center; gap: 7px; }
.kpi .k .ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; }
.kpi .k .ic svg { width: 14px; height: 14px; }
.kpi .v { font-family: var(--num); font-size: clamp(19px, 1.9vw, 26px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 12px; color: var(--tx2); }
.kpi.in .ic { background: rgba(52, 224, 161, .14); color: var(--in); }
.kpi.out .ic { background: rgba(255, 107, 122, .14); color: var(--out); }
.kpi.net .ic { background: rgba(92, 200, 255, .14); color: var(--tr); }
.kpi.due .ic { background: rgba(255, 194, 75, .14); color: var(--warn); }
.kpi .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--card2); }
.kpi .bar i { display: block; height: 100%; }

.alert-card { border-radius: var(--r); padding: 14px 16px; border: 1px solid rgba(255, 107, 122, .35); background: linear-gradient(90deg, rgba(255, 107, 122, .10), rgba(255, 107, 122, .03)); display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.alert-card svg { color: var(--out); }
.alert-card b { color: var(--out); }

/* Linhas de movimento */
.txr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 16px; cursor: pointer; transition: background .12s; position: relative; }
.txr:hover { background: rgba(255, 255, 255, .025); }
.txr + .txr { border-top: 1px solid var(--line); }
.txr .t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txr .m { font-size: 12px; color: var(--tx3); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.txr .m .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--tx3); flex: none; }
.txr .m svg { width: 12px; height: 12px; }
.txr .amt { font-family: var(--num); font-weight: 700; font-size: 16px; text-align: right; white-space: nowrap; }
.txr .amt small { display: block; font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--tx3); }
.txr.pending .amt { opacity: .95; }
.txr.overdue .amt small { color: var(--out); }
.txr .tick { width: 32px; height: 32px; border-radius: 10px; border: 2px dashed var(--line2); background: none; display: grid; place-items: center; color: transparent; padding: 0; transition: all .15s; }
.txr .tick svg { width: 15px; height: 15px; }
.txr .tick:hover { border-color: var(--acc); color: var(--acc); border-style: solid; }
.txr .tick.on { background: var(--acc-soft); border: 2px solid transparent; color: var(--acc); }
.txr.tr .tick { visibility: hidden; }
@media (max-width: 520px) { .txr { padding: 10px 12px; gap: 10px; } .txr .amt { font-size: 15px; } }

.av { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; position: relative; color: #0a0c0f; letter-spacing: -.02em; }
.av .emo { font-size: 19px; line-height: 1; }
.av .kb { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 7px; display: grid; place-items: center; border: 2px solid var(--card); }
.av .kb svg { width: 10px; height: 10px; color: #0a0c0f; }
.kb.in { background: var(--in); } .kb.out { background: var(--out); } .kb.transfer { background: var(--tr); }

.day-h { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 6px; font-size: 12px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .07em; }
.day-h .money { text-transform: none; letter-spacing: 0; font-size: 12px; }
.when { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--card2); color: var(--tx2); }
.when.today { background: var(--acc); color: var(--acc-ink); }
.when.late { background: rgba(255, 107, 122, .15); color: var(--out); }
.when.soon { background: rgba(255, 194, 75, .14); color: var(--warn); }

/* Donut */
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut { position: relative; width: 150px; height: 150px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut .c b { font-family: var(--num); font-size: 20px; display: block; line-height: 1.1; }
.donut .c span { font-size: 11px; color: var(--tx3); }
.donut circle { transition: stroke-dasharray .6s cubic-bezier(.2, .8, .2, 1); }
.legend-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.legend-l div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-l i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-l span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx2); }
.legend-l b { font-family: var(--num); font-weight: 600; font-size: 13px; }
@media (max-width: 420px) { .donut-wrap { flex-direction: column; align-items: stretch; } .donut { margin: 0 auto; } }

/* Orçamentos */
.bud { padding: 10px 0; }
.bud + .bud { border-top: 1px solid var(--line); }
.bud .row { margin-bottom: 7px; font-size: 14px; }
.bud .row b { font-weight: 650; }
.bud .progress i.over { background: var(--out); }
.bud .progress i.near { background: var(--warn); }

/* ─────────── Movimentos ─────────── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav .lbl-m { font-weight: 800; font-size: 20px; letter-spacing: -.02em; min-width: 170px; text-align: center; text-transform: capitalize; }
@media (max-width: 520px) { .month-nav .lbl-m { font-size: 17px; min-width: 0; flex: 1; } .month-nav { width: 100%; } }
.search { position: relative; flex: 1; min-width: 180px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--tx3); }
.search .inp { padding-left: 34px; }
.sumstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.sumstrip div { background: var(--card); padding: 12px 14px; min-width: 0; }
.sumstrip span { font-size: 11px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; display: block; }
.sumstrip b { font-family: var(--num); font-size: 19px; font-weight: 700; white-space: nowrap; }
@media (max-width: 640px) { .sumstrip { grid-template-columns: 1fr 1fr; } }
.empty { text-align: center; color: var(--tx3); padding: 36px 12px; font-size: 14px; }
.empty .big-emo { font-size: 36px; display: block; margin-bottom: 8px; }

/* ─────────── Calendário ─────────── */
.calg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calg .wh { font-size: 11px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .07em; text-align: center; padding: 4px 0; }
.cd { background: var(--card); border: 1px solid var(--line); border-radius: 13px; min-height: 104px; padding: 7px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.cd:hover { border-color: var(--line2); }
.cd.other { opacity: .35; }
.cd.today { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.cd.sel { background: var(--card2); border-color: var(--tx3); }
.cd .dn { font-family: var(--num); font-weight: 700; font-size: 14px; color: var(--tx2); display: flex; justify-content: space-between; align-items: center; }
.cd.today .dn { color: var(--acc); }
.cd .ev { font-size: 11px; font-weight: 650; border-radius: 6px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--num); }
.cd .ev.out { background: rgba(255, 107, 122, .14); color: #ff97a2; }
.cd .ev.in { background: rgba(52, 224, 161, .13); color: var(--in); }
.cd .ev.transfer { background: rgba(92, 200, 255, .12); color: var(--tr); }
.cd .ev.done { opacity: .45; }
.cd .more { font-size: 10px; color: var(--tx3); font-weight: 700; padding-left: 4px; }
.cd .dots { display: none; gap: 3px; justify-content: center; margin-top: auto; flex-wrap: wrap; }
.cd .dots i { width: 6px; height: 6px; border-radius: 50%; }
.cd .heat { height: 3px; border-radius: 3px; margin-top: auto; background: var(--out); }
@media (max-width: 760px) {
  .calg { gap: 4px; }
  .cd { min-height: 58px; padding: 6px 4px; border-radius: 10px; align-items: center; }
  .cd .ev, .cd .more, .cd .heat, .cd .dn .money { display: none; }
  .cd .dots { display: flex; }
  .cd .dn { justify-content: center; font-size: 13px; }
}
.cal-layout { grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); align-items: start; }
@media (max-width: 1080px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-side { position: sticky; top: 20px; }
@media (max-width: 1080px) { .cal-side { position: static; } }

/* ─────────── Contas ─────────── */
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.acard {
  --c: var(--acc);
  position: relative; overflow: hidden; border-radius: 22px; padding: 20px; min-height: 168px; cursor: pointer;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--c) 42%, transparent) 0%, transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--card2)) 0%, var(--card) 100%);
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
  display: flex; flex-direction: column; transition: transform .2s;
}
.acard:hover { transform: translateY(-2px); }
.acard::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; border: 30px solid color-mix(in srgb, var(--c) 10%, transparent); pointer-events: none; }
.acard .top-l { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.acard .an { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.acard .ab { font-size: 12px; color: var(--tx2); }
.acard .chipi { width: 38px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, #e9d18a, #b8964a); opacity: .85; flex: none; }
.acard .chipi.cash { background: linear-gradient(135deg, #b7f5d8, #3fae83); }
.acard .bal { font-family: var(--num); font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-top: auto; position: relative; z-index: 1; }
.acard .foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--tx2); font-family: var(--num); position: relative; z-index: 1; gap: 10px; }
.acard.archived { opacity: .45; }
.acard.add { background: transparent; border: 2px dashed var(--line2); align-items: center; justify-content: center; color: var(--tx3); gap: 8px; font-weight: 700; }
.acard.add::after { display: none; }
.acard.add:hover { color: var(--acc); border-color: var(--acc); }

.ent { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 16px; cursor: pointer; }
.ent + .ent { border-top: 1px solid var(--line); }
.ent:hover { background: rgba(255, 255, 255, .025); }
.ent .t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent .m { font-size: 12px; color: var(--tx3); }
.ent .r { text-align: right; font-family: var(--num); font-size: 13px; }

/* ─────────── Plano ─────────── */
.rule { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 16px; }
.rule + .rule { border-top: 1px solid var(--line); }
.rule.off { opacity: .45; }
.rule .t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.rule .m { font-size: 12px; color: var(--tx3); }
.rule .amt { font-family: var(--num); font-weight: 700; text-align: right; white-space: nowrap; }
.rule .amt small { display: block; font-family: var(--font); font-size: 11px; color: var(--tx3); font-weight: 600; }
.fixed-hero { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.fixed-hero .v { font-family: var(--num); font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.fixed-hero .l { font-size: 12px; color: var(--tx3); font-weight: 600; margin-top: 4px; }

.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.goal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; gap: 14px; align-items: center; cursor: pointer; }
.goal:hover { border-color: var(--line2); }
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; }
.goal .t { font-weight: 750; }
.goal .v { font-family: var(--num); font-size: 14px; color: var(--tx2); }
.goal .p { font-family: var(--num); font-size: 22px; font-weight: 700; }

.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 170px; }
.bars .b { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; cursor: default; }
.bars .pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars .pair i { width: 42%; max-width: 16px; border-radius: 5px 5px 2px 2px; min-height: 2px; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.bars .pair i.in { background: var(--in); }
.bars .pair i.out { background: var(--out); opacity: .85; }
.bars .b span { font-size: 10px; color: var(--tx3); font-weight: 700; text-transform: uppercase; }
.bars .b.cur span { color: var(--tx); }

/* ─────────── Modal ─────────── */
#overlay:empty { display: none; }
.modal-bg { position: fixed; inset: 0; background: rgba(4, 6, 8, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); overscroll-behavior: contain; }
.modal.wide { max-width: 620px; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal-foot .sp { flex: 1; }
@media (max-width: 560px) {
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal { max-width: none; border-radius: 24px 24px 0 0; max-height: 94vh; padding: 18px 16px calc(18px + var(--safe-b)); animation: sheet .3s cubic-bezier(.2, .9, .3, 1); }
  @keyframes sheet { from { transform: translateY(40%); opacity: .5; } }
}

/* Formulário de movimento */
.kind-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--bg2); padding: 4px; border-radius: 15px; border: 1px solid var(--line); margin-bottom: 16px; }
.kind-seg button { border: 0; background: none; padding: 10px 6px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--tx2); display: flex; align-items: center; justify-content: center; gap: 7px; transition: all .15s; }
.kind-seg button svg { width: 16px; height: 16px; }
@media (max-width: 480px) { .kind-seg button { font-size: 12.5px; padding: 10px 2px; gap: 4px; } .kind-seg button svg { display: none; } }
.kind-seg button.on[data-k=out] { background: var(--out); color: #1a0508; }
.kind-seg button.on[data-k=in] { background: var(--in); color: var(--acc-ink); }
.kind-seg button.on[data-k=transfer] { background: var(--tr); color: #04121a; }
.amount-in { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 6px 0 16px; }
.amount-in input { background: none; border: 0; outline: none; font-family: var(--num); font-size: 48px; font-weight: 700; letter-spacing: -.03em; text-align: right; width: 5ch; max-width: 80%; color: var(--kc, var(--tx)); padding: 0; }
.amount-in input::placeholder { color: var(--line2); }
.amount-in span { font-family: var(--num); font-size: 26px; color: var(--tx3); font-weight: 600; }
.cat-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 128px; overflow: auto; padding: 2px; }
.cat-grid button { border: 1px solid var(--line2); background: var(--bg2); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--tx2); display: inline-flex; align-items: center; gap: 6px; }
.cat-grid button.on { border-color: var(--cc); color: var(--tx); background: color-mix(in srgb, var(--cc) 16%, var(--bg2)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cc) 25%, transparent); }
.status-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.status-seg button { border: 1px solid var(--line2); background: var(--bg2); border-radius: 11px; padding: 10px; font-weight: 650; font-size: 13px; color: var(--tx2); display: flex; align-items: center; justify-content: center; gap: 6px; }
.status-seg button svg { width: 15px; height: 15px; }
.status-seg button.on[data-s=pending] { border-color: var(--warn); color: var(--warn); background: rgba(255, 194, 75, .08); }
.status-seg button.on[data-s=done] { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }
details.more { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin-bottom: 14px; }
details.more summary { cursor: pointer; padding: 12px 0; font-weight: 650; font-size: 14px; color: var(--tx2); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: '+'; margin-left: auto; font-size: 18px; color: var(--tx3); }
details.more[open] summary::after { content: '−'; }
details.more[open] { padding-bottom: 4px; }
.mb-box { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.opt-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; padding: 0; }
.swatches button.on { border-color: var(--tx); }

/* Detalhe */
.detail-amt { font-family: var(--num); font-size: 40px; font-weight: 700; letter-spacing: -.03em; text-align: center; margin: 4px 0; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 14px; margin: 14px 0; }
.kv dt { color: var(--tx3); font-weight: 600; font-size: 13px; }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.mbref { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line2); border: 1px solid var(--line2); margin: 10px 0; }
.mbref div { background: var(--bg2); padding: 10px 12px; cursor: pointer; }
.mbref span { display: block; font-size: 11px; color: var(--tx3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.mbref b { font-family: var(--num); font-size: 17px; letter-spacing: .04em; }
.notes-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; font-size: 14px; color: var(--tx2); }

/* Google */
.gbox { border: 1px solid var(--line2); border-radius: 16px; padding: 14px; background: linear-gradient(135deg, rgba(92, 200, 255, .06), transparent 60%); }
.gbox .row b { font-weight: 700; }
.stat-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.set-sec { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.set-sec:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.daypick { display: flex; gap: 6px; flex-wrap: wrap; }
.daypick button { border: 1px solid var(--line2); background: var(--bg2); border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 650; color: var(--tx2); }
.daypick button.on { background: var(--acc-soft); color: var(--acc); border-color: rgba(52, 224, 161, .4); }
.list-edit > div { display: flex; align-items: center; gap: 8px; padding: 7px 0; }
.list-edit > div + div { border-top: 1px solid var(--line); }

/* ─────────── Toast / loader ─────────── */
.toast { position: fixed; top: 18px; left: 50%; transform: translate(-50%, -160%); z-index: 90; background: var(--card2); border: 1px solid var(--line2); padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .9, .3, 1.1); max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px; }
.toast.show { transform: translate(-50%, 0); }
.toast.err { border-color: var(--red); color: var(--red); }
.toast .undo { background: none; border: 0; color: var(--acc); font-weight: 700; padding: 0 0 0 6px; }
.loader { display: grid; place-items: center; height: 60vh; }
.loader div { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--acc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ─────────── Login ─────────── */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; position: relative; overflow: hidden; }
.login-bg span { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .35; animation: float 14s ease-in-out infinite alternate; }
.login-bg span:nth-child(1) { width: 420px; height: 420px; background: var(--acc); top: -160px; left: -120px; opacity: .18; }
.login-bg span:nth-child(2) { width: 360px; height: 360px; background: var(--tr); bottom: -140px; right: -100px; animation-delay: -5s; opacity: .15; }
.login-bg span:nth-child(3) { width: 260px; height: 260px; background: var(--violet); top: 40%; left: 55%; animation-delay: -9s; opacity: .12; }
@keyframes float { to { transform: translate(40px, 30px) scale(1.1); } }
.login-card { position: relative; width: 100%; max-width: 400px; background: rgba(20, 24, 29, .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line2); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 12px; }
.login-title { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.login-sub { font-size: 13px; color: var(--tx3); }
.login-form .btn { margin-top: 16px; }
.pw-wrap { position: relative; }
.pw-wrap .inp { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--tx3); padding: 8px; }
.steps { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 12px; font-weight: 600; color: var(--tx3); }
.step { display: flex; align-items: center; gap: 7px; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); border: 1px solid var(--line2); font-size: 11px; }
.step.on { color: var(--tx); }
.step.on i { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.step.done i { background: var(--acc-soft); color: var(--acc); border-color: transparent; }
.step-line { flex: 1; height: 1px; background: var(--line2); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.otp input { width: 100%; aspect-ratio: 1 / 1.15; text-align: center; font-family: var(--num); font-size: 24px; font-weight: 700; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; outline: none; }
.otp input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
.login-links form { margin: 0; }
.login-foot { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--tx3); margin: 0; }
.alert { padding: 11px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; border: 1px solid; }
.alert.err { background: rgba(255, 93, 108, .08); border-color: rgba(255, 93, 108, .35); color: #ff9aa4; }
.alert.ok { background: var(--acc-soft); border-color: rgba(52, 224, 161, .3); color: var(--acc); }
.alert.warn { background: rgba(255, 194, 75, .08); border-color: rgba(255, 194, 75, .35); color: #ffd98f; line-height: 1.6; }
.alert.info { background: rgba(92, 200, 255, .07); border-color: rgba(92, 200, 255, .3); color: #a9dcff; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
