/* ===================== Tema preto + verde (carregado por último) ===================== */
body {
  background:
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(163, 230, 53, .07), transparent 70%),
    #000;
  background-attachment: fixed;
}
.app { gap: 0; padding: 14px; }

/* Barras de rolagem: escondidas nas listas internas, finas e escuras no resto */
.ledger-list, .ask-log, .table-wrap { scrollbar-width: none; }
.ledger-list::-webkit-scrollbar, .ask-log::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { display: none; }
::-webkit-scrollbar-button { display: none; }
/* tabelas mais compactas para caber sem rolagem lateral */
.glass-table { min-width: 0 !important; }
.glass-table th, .glass-table td { padding: 11px 8px; }
.glass-table td:nth-child(3) > div { white-space: nowrap; }
@media (max-width: 900px) {
  .glass-table .tx-ico { display: none; }
  .glass-table td:nth-child(3) > div { font-size: 0; gap: 0 !important; } /* só o avatar, sem o nome */
}
html { color-scheme: dark; scrollbar-width: thin; scrollbar-color: #2a2e25 #000; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2e25; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a4033; }

/* Texto escuro sobre o verde */
.btn.primary { color: var(--on-accent); box-shadow: 0 6px 20px rgba(163, 230, 53, .18); background: var(--accent); }
.btn.primary:hover { background: var(--accent-soft); }
.seg button.on, .cal .d.today, .bc-d.today .num { color: var(--on-accent); }
.chip.active { color: var(--accent); }
.b-blue { color: var(--accent); }
.bar i { background: var(--accent); }

/* ---------- Menu lateral (trilho) ---------- */
.sidebar {
  width: 68px; border-radius: 0; padding: 16px 0; margin-right: 22px;
  background: transparent; border: 0; border-right: 1px solid var(--line); box-shadow: none;
  top: 14px; height: calc(100vh - 28px);
}
.brand { margin-bottom: 22px; width: auto; height: auto; }
.brand-logo {
  display: block; width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  border: 1px solid #2a2e25; box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.brand:hover .brand-logo { border-color: rgba(163, 230, 53, .5); }
.brand-mark {
  position: relative; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: #141612; border: 1px solid #2a2e25; color: #fff; font-weight: 800; font-size: 16px;
}
.brand-mark i { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
nav, .sidebar-bottom { gap: 12px; }
.nav-item {
  width: 42px; height: 42px; border-radius: 11px;
  background: #0f110d; border: 1px solid #24271f; color: #8f9487;
}
.nav-item .ico { width: 19px; height: 19px; }
.nav-item:hover, .nav-item:focus-visible { background: #171a14; color: #e6e9e0; border-color: #33382c; }
.nav-item.active { background: rgba(163, 230, 53, .13); border-color: rgba(163, 230, 53, .35); color: var(--accent); }
.nav-item.active::before { left: -14px; width: 3px; height: 20px; margin-top: -10px; background: var(--accent); box-shadow: 0 0 10px rgba(163, 230, 53, .7); }

/* ---------- Barra do topo ---------- */
.topbar { gap: 10px; padding: 4px 0 6px; }
.page-title { flex: 1; min-width: 0; }
.page-title h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.page-title p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.search { flex: 0 1 300px; background: #0d0e0c; border-color: var(--line); border-radius: 10px; }
.search input { padding: 10px 0; font-size: 13px; }
kbd { background: transparent; border-color: #2e3229; color: var(--muted); }
.icon-btn { background: #0d0e0c; border-color: var(--line); }
.bell { position: relative; }
.bell i { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.bell i[hidden] { display: none; }
.profile { margin-left: 0; background: #0d0e0c; border-color: var(--line); border-radius: 10px; padding: 4px 10px 4px 4px; }
.profile .avatar { width: 30px; height: 30px; border-radius: 8px; border: 0; }
.profile small { font-size: 10.5px; }

/* cards gerais em preto */
.card { background: var(--panel); border-color: var(--line); }

/* ---------- Dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: 10px; }
.dcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.dcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dcard-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.dcard-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.sq-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #2a2e25; background: #141612; color: #cfd3c8; display: grid; place-items: center; padding: 0; }
.sq-btn:hover { color: var(--accent); border-color: rgba(163, 230, 53, .4); }
.sq-btn .ico { width: 16px; height: 16px; }

/* selos de variação */
.dbadge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.dbadge.good { color: var(--accent); background: rgba(163, 230, 53, .12); border: 1px solid rgba(163, 230, 53, .25); }
.dbadge.bad { color: #ff6b5e; background: rgba(240, 68, 56, .13); border: 1px solid rgba(240, 68, 56, .3); }
.dbadge.flat { color: var(--muted); background: #151712; border: 1px solid #262a21; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 18px; min-width: 0; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #b6bbad; font-weight: 500; }
.kpi-label .ico { width: 14px; height: 14px; color: var(--muted); }
.kpi-go { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex-shrink: 0; }
.kpi-go .ico { width: 15px; height: 15px; }
.kpi-go:hover { background: var(--accent-soft); }
.kpi-val { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.kpi-val b { font-size: 28px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }

/* linha do meio */
.dash-mid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 10px; }
.ledger { display: flex; flex-direction: column; }
.ledger-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 300px; padding-right: 2px; }
.ledger-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #121410; border: 1px solid #22251e; border-radius: 9px; padding: 9px 11px; }
.ld-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #c9cdc1; }
.ld-label i { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.ledger-item b { display: block; font-size: 15px; font-weight: 600; margin-top: 4px; }
.ledger-item > div { min-width: 0; }
.ld-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chart-card { display: flex; flex-direction: column; }
.chart-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #10120e; border: 1px solid #22251e; border-radius: 11px; padding: 10px 12px; }
.chart-val { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-val small { display: block; width: 100%; color: var(--muted); font-size: 11px; }
.chart-val b { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.chart-val b.neg { color: #ff6b5e; }
.chart-ctrls { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-seg { display: inline-flex; border: 1px solid #2a2e25; border-radius: 9px; padding: 3px; background: #0b0c0a; }
.pill-seg button { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 5px 10px; border-radius: 6px; font-weight: 500; }
.pill-seg button:hover { color: var(--text); }
.pill-seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.bars { display: flex; gap: 10px; margin-top: 18px; flex: 1; min-height: 230px; }
.yaxis { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); padding-bottom: 24px; text-align: right; min-width: 30px; }
.bar-area { flex: 1; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; align-items: end; }
.bar-col { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; background: none; border: 0; padding: 0; color: var(--muted); min-width: 0; }
.bar-col small { font-size: 11px; }
.dbar {
  position: relative; width: 100%; max-width: 40px; border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 7px),
    #1a1d17;
  border-top: 3px solid var(--accent);
  transition: background-color .15s;
}
.bar-col:hover .dbar { background-color: #23271f; }
.bar-col.bad .dbar { border-top-color: var(--red); }
.bar-col.on { color: var(--text); font-weight: 700; }
.bar-col.on .dbar { background: var(--accent); border-top-color: #e2ffb0; box-shadow: 0 0 22px rgba(163, 230, 53, .3); }
.bar-col.on.bad .dbar { background: var(--red); border-top-color: #ffb3ab; box-shadow: 0 0 22px rgba(240, 68, 56, .3); }
.bar-pill { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 700; white-space: nowrap; padding: 4px 8px; border-radius: 7px; background: var(--accent); color: var(--on-accent); }
.bar-col.bad .bar-pill { background: var(--red); color: #fff; }
.dbar i { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; font-weight: 700; color: var(--on-accent); white-space: nowrap; }
.bar-col.bad .dbar i { color: #fff; }
.chart-note { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg { width: 10px; height: 3px; border-radius: 2px; display: inline-block; margin-left: 4px; }
.lg.good { background: var(--accent); } .lg.bad { background: var(--red); }

.lime-select { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 8px; padding: 6px 8px; font-size: 12px; font-weight: 600; outline: 0; }
.lime-select option { background: #111; color: #fff; }
.donut-wrap { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.donut-box { position: relative; background: #10120e; border: 1px solid #22251e; border-radius: 12px; padding: 30px 14px 14px; }
.donut-svg { display: block; width: 100%; max-width: 150px; margin: 0 auto; }
.donut-center { position: absolute; left: 0; right: 0; top: 30px; bottom: 14px; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center b { font-size: 15px; font-weight: 700; }
.donut-center small { color: var(--muted); font-size: 11px; }
.donut-pill { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 12px; color: #c9cdc1; }
.donut-legend li { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.donut-legend i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.spend-note { margin: 14px 0 0; background: #10120e; border: 1px solid #22251e; border-radius: 10px; padding: 11px 12px; font-size: 12.5px; line-height: 1.55; color: #c9cdc1; }
.spend-note b { color: var(--text); }

/* linha de baixo */
.dash-bottom { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.05fr); gap: 10px; }
.insight {
  position: relative; overflow: hidden; border-radius: 14px; padding: 18px;
  background: radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .3), transparent 30%), linear-gradient(135deg, #c8f560, #a3e635 50%, #84cc16);
  color: #0b1004; display: flex; flex-direction: column; gap: 14px; min-height: 210px;
}
.insight.bad { background: radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .25), transparent 30%), linear-gradient(135deg, #ff7a6b, #f04438 55%, #c92a1e); color: #1a0402; }
.ins-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: #0b0c0a; color: var(--accent); font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.insight.bad .ins-pill { color: #ff8a7d; }
.ins-pill .ico { width: 14px; height: 14px; }
.ins-star { position: absolute; top: 18px; right: 22px; font-size: 26px; opacity: .55; }
.insight p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; flex: 1; }
.ins-num { display: inline-block; border: 2px solid currentColor; border-radius: 999px; padding: 0 9px; }
.ins-blocks { display: flex; gap: 5px; }
.ins-blocks i { width: 22px; height: 9px; border-radius: 3px; background: rgba(0, 0, 0, .18); }
.ins-blocks i.on { background: #0b0c0a; }

.hm-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.hm-grid { display: flex; flex-direction: column; gap: 4px; }
.hm-row { display: grid; grid-template-columns: 32px repeat(12, minmax(0, 1fr)); gap: 4px; align-items: center; }
.hm-row > span { font-size: 11px; color: var(--muted); }
.hm-row > span.cur { color: var(--text); font-weight: 700; }
.hm-head span { font-size: 10px; }
.hm { display: block; height: 14px; border-radius: 3px; background: #1a1d17; }
.hm-legend .hm { width: 11px; height: 11px; }
.hm.l1 { background: #3a5313; } .hm.l2 { background: #5b8418; } .hm.l3 { background: #84cc16; } .hm.l4 { background: #b6f34a; }
.hm.lf { background: #10120e; }
.hm.now { outline: 2px solid #fff; outline-offset: -1px; }
.hm-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; background: #10120e; border: 1px solid #22251e; border-radius: 10px; padding: 10px 12px; }
.hm-foot small { display: block; color: var(--muted); font-size: 11px; }
.hm-foot b { display: block; font-size: 14px; margin-top: 3px; }

.ask { display: flex; flex-direction: column; }
.ask-log { flex: 1; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 150px; margin-bottom: 10px; }
.msg { font-size: 12.5px; line-height: 1.5; background: #141612; border: 1px solid #23271f; border-radius: 10px 10px 10px 3px; padding: 8px 10px; color: #d5d9cd; max-width: 92%; }
.msg.me { align-self: flex-end; background: rgba(163, 230, 53, .12); border-color: rgba(163, 230, 53, .28); border-radius: 10px 10px 3px 10px; color: var(--text); }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip-q { background: #121410; border: 1px solid #2a2e25; color: #c9cdc1; border-radius: 999px; padding: 5px 10px; font-size: 11.5px; }
.chip-q:hover { border-color: rgba(163, 230, 53, .45); color: var(--text); }
.ask-form { display: flex; gap: 8px; }
.ask-form input { flex: 1; min-width: 0; background: #0b0c0a; border: 1px solid #2a2e25; border-radius: 9px; padding: 10px 12px; outline: 0; font-size: 13px; }
.ask-form input:focus { border-color: rgba(163, 230, 53, .5); }
.send-btn { width: 40px; border-radius: 9px; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.send-btn .ico { width: 17px; height: 17px; }

/* ---------- Anotações ---------- */
.notes-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 6px 2px -2px; }
.notes-grid { columns: 280px; column-gap: 12px; }
.note {
  break-inside: avoid; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--nc);
  border-radius: 14px; padding: 14px 16px; cursor: pointer;
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--nc) 7%, transparent), transparent 60%);
}
.note:hover, .note:focus-visible { border-color: color-mix(in srgb, var(--nc) 45%, var(--line)); border-top-color: var(--nc); outline: 0; }
.note.pinned { box-shadow: 0 0 0 1px color-mix(in srgb, var(--nc) 25%, transparent); }
.note-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.note-tag { font-size: 11px; font-weight: 600; color: var(--nc); background: color-mix(in srgb, var(--nc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--nc) 30%, transparent); padding: 3px 8px; border-radius: 6px; }
.note .card-actions { opacity: 0; transition: opacity .12s; }
.note:hover .card-actions, .note:focus-within .card-actions, .note .card-actions:has(.on) { opacity: 1; }
.note .card-actions button.on { color: var(--nc); }
.note h4 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.note p { margin: 0; color: #c9cdc1; line-height: 1.6; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical; overflow: hidden; }
.note-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }
.note-foot .avatar { width: 24px; height: 24px; font-size: 9px; border: 0; }
@media (hover: none) { .note .card-actions { opacity: 1; } }

.note-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.note-colors label { cursor: pointer; }
.note-colors input { position: absolute; opacity: 0; pointer-events: none; }
.note-colors span { display: block; width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 2px var(--panel); }
.note-colors input:checked + span { border-color: #fff; }
.note-colors input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pin-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c9cdc1; margin: 2px 0 8px; cursor: pointer; }
.pin-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.modal textarea { min-height: 180px; line-height: 1.55; }

/* ---------- Páginas criadas pelo usuário ---------- */
.sidebar { height: auto; min-height: calc(100vh - 28px); align-self: flex-start; }
.nav-sep { width: 26px; height: 1px; background: var(--line); margin: 2px 0; }
.nav-add { border-style: dashed; color: var(--muted); background: transparent; }
.nav-add:hover { color: var(--accent); border-color: rgba(163, 230, 53, .45); background: rgba(163, 230, 53, .06); }

.cp-head { justify-content: space-between; flex-wrap: wrap; }
.cp-add, .cp-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.btn .ico { width: 16px; height: 16px; }
.btn.ghost { background: #10120e; border-color: #2a2e25; }
.btn.ghost:hover { border-color: rgba(163, 230, 53, .4); color: var(--accent); }
.btn.danger:hover { border-color: rgba(240, 68, 56, .5); color: #ff6b5e; }
.cp-empty { display: flex; flex-direction: column; gap: 6px; padding: 60px 20px; }
.cp-empty b:first-child { color: var(--text); font-size: 16px; }

.blocks { columns: 340px; column-gap: 12px; }
.blk { break-inside: avoid; margin-bottom: 12px; }
.blk .dcard-head h3 { display: flex; align-items: center; gap: 8px; }
.blk .dcard-head h3 .ico { width: 16px; height: 16px; color: var(--accent); }
.blk .card-actions { opacity: .35; transition: opacity .12s; }
.blk:hover .card-actions, .blk:focus-within .card-actions { opacity: 1; }
.card-actions button:disabled { opacity: .3; cursor: default; }
.blk-text { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.65; color: #d5d9cd; }
.blk-prog { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.blk-prog .bar { flex: 1; width: auto; }
.blk-list, .blk-links { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; }
.blk-list li, .blk-links li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.blk-list li:last-child, .blk-links li:last-child { border-bottom: 0; }
.blk-list label { flex: 1; display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.blk-list input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.blk-list li.done span { color: var(--muted); text-decoration: line-through; }
.blk-links li .ico { width: 15px; height: 15px; color: var(--muted); }
.blk-links a { flex: 1; color: var(--accent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.blk-links a:hover { text-decoration: underline; }
.x { background: none; border: 0; color: var(--muted); padding: 3px; border-radius: 6px; display: grid; place-items: center; opacity: 0; }
.x .ico { width: 14px; height: 14px; }
li:hover .x, .x:focus-visible { opacity: 1; }
.x:hover { color: #ff6b5e; background: rgba(240, 68, 56, .1); }
@media (hover: none) { .x { opacity: 1; } .blk .card-actions { opacity: 1; } }
.blk-add { display: flex; gap: 6px; }
.blk-add input { flex: 1; min-width: 0; background: #0b0c0a; border: 1px solid #2a2e25; border-radius: 8px; padding: 8px 10px; outline: 0; font-size: 13px; }
.blk-add input:focus { border-color: rgba(163, 230, 53, .5); }
.blk-add button { width: 34px; border-radius: 8px; border: 1px solid #2a2e25; background: #141612; color: var(--accent); display: grid; place-items: center; }
.blk-add button .ico { width: 15px; height: 15px; }

.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.icon-pick label { cursor: pointer; }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick span { height: 42px; display: grid; place-items: center; border-radius: 10px; background: #10120e; border: 1px solid #2a2e25; color: #a9ae9f; }
.icon-pick span .ico { width: 19px; height: 19px; }
.icon-pick label:hover span { color: #fff; }
.icon-pick input:checked + span { background: rgba(163, 230, 53, .14); border-color: rgba(163, 230, 53, .5); color: var(--accent); }
.icon-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Elementos clicáveis ---------- */
button.ledger-item, button.glass-row, .gm-link, .gm-metrics button, .donut-legend button, button.hm, .day-row {
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
button.ledger-item { width: 100%; }
button.ledger-item:hover { border-color: rgba(163, 230, 53, .35); background: #161912; }
button.glass-row { width: 100%; }
.fin-page button.glass-row:hover { border-color: rgba(163, 230, 53, .4); background: #13160f; }
.gr-val small { font-size: 13px; color: var(--ink-2); margin-right: 2px; }
.gm-link { background: none; border: 0; padding: 0; }
.gm-link .ico:last-child { width: 14px; height: 14px; opacity: .5; }
.gm-link:hover { color: var(--accent); }
.gm-link:hover .ico:last-child { opacity: 1; }
.gm-metrics button { background: none; border: 0; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; color: inherit; display: inline-flex; align-items: center; gap: 5px; }
.gm-metrics button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.donut-legend button { background: none; border: 0; padding: 3px 6px; margin: -3px -6px; border-radius: 6px; display: flex; align-items: center; gap: 7px; width: calc(100% + 12px); white-space: nowrap; }
.donut-legend button:hover { background: #161912; color: var(--text); }
.donut-legend small { margin-left: auto; padding-left: 10px; color: var(--muted); font-size: 11px; }
button.hm { border: 0; padding: 0; width: 100%; }
button.hm:hover { outline: 1px solid rgba(255, 255, 255, .6); outline-offset: -1px; }
.insight { cursor: pointer; transition: transform .12s; }
.insight:hover { transform: translateY(-2px); }

.pill-select { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.pill-select select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: inherit; font: inherit; padding: 0 2px; cursor: pointer; outline: 0; }
.pill-select select option { background: #111; color: #fff; }
.pill-select .ico { width: 13px; height: 13px; pointer-events: none; }
.pill-select:hover { border-color: rgba(163, 230, 53, .45) !important; }

.fin-search { display: flex; align-items: center; gap: 6px; background: #0f110d; border: 1px solid #2a2e25; border-radius: 999px; padding: 0 12px; color: var(--ink-2); }
.fin-search .ico { width: 14px; height: 14px; }
.fin-search input { background: none; border: 0; outline: 0; color: #fff; padding: 7px 0; width: 210px; font-size: 12.5px; }
.fin-search:focus-within { border-color: rgba(163, 230, 53, .5); }

.day-list { display: flex; flex-direction: column; gap: 4px; }
.day-row { display: flex; align-items: center; gap: 10px; background: #10120e; border: 1px solid #22251e; border-radius: 9px; padding: 9px 11px; width: 100%; }
.day-row:hover { border-color: rgba(163, 230, 53, .4); }
.section-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 2px 0 8px; }

/* busca geral */
.search { position: relative; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; z-index: 80;
  background: #0d0f0b; border: 1px solid #2a2e25; border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6); max-height: 420px; overflow-y: auto; scrollbar-width: none;
}
.search-results[hidden] { display: none; }
.sr-group { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 8px 4px; }
.sr-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 8px; padding: 8px; text-align: left; color: var(--text); }
.sr-item .ico { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.sr-item b { display: block; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.sr-item .grow { min-width: 0; flex: 1; }
.sr-item:hover, .sr-item:focus-visible, .sr-item.first { background: #171a14; outline: 0; }
.sr-empty { padding: 14px 10px; color: var(--muted); font-size: 13px; }

/* ---------- Nuvem: painel aberto, status, compartilhar ---------- */
.ws-box { display: flex; align-items: center; gap: 6px; }
.ws-box[hidden] { display: none; }
.ws-box select {
  background: #0d0e0c; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-size: 13px;
  max-width: 220px; outline: 0; cursor: pointer;
}
.ws-box select:focus { border-color: rgba(163, 230, 53, .5); }
.ws-box select option { background: #111; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; padding: 0 4px; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: #5f6458; flex-shrink: 0; }
.sync[data-s="ok"] i { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.sync[data-s="saving"] i, .sync[data-s="loading"] i { background: #fbbf24; animation: pulse 1s ease-in-out infinite; }
.sync[data-s="error"] i, .sync[data-s="setup"] i { background: var(--red); }
.sync[data-s="error"], .sync[data-s="setup"] { color: #ff8a7d; }
.sync[data-s="viewer"] i { background: #60a5fa; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sync i { animation: none !important; } }

.share-list { display: flex; flex-direction: column; gap: 6px; }
.share-row { display: flex; align-items: center; gap: 8px; background: #10120e; border: 1px solid #22251e; border-radius: 9px; padding: 8px 10px; }
.share-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row b { font-weight: 600; font-size: 13px; }
.share-row select, .share-add select { background: #0b0c0a; border: 1px solid #2a2e25; border-radius: 8px; padding: 6px 8px; font-size: 12px; outline: 0; }
.share-add { display: flex; gap: 6px; }
.share-add input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: 0; }
.share-add input:focus { border-color: var(--accent); }
.x.show { opacity: 1; }
@media (max-width: 1000px) { .sync span { display: none; } .ws-box select { max-width: 140px; } }

/* ---------- Confirmação e avisos ---------- */
.btn.primary.danger-solid { background: var(--red); color: #fff; box-shadow: 0 6px 20px rgba(240, 68, 56, .25); }
.btn.primary.danger-solid:hover { background: #ff5a4d; }
.confirm-msg { margin: 0 0 6px; font-size: 15px; line-height: 1.5; }
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200;
  background: #141612; border: 1px solid #2f3429; color: var(--text); padding: 11px 16px; border-radius: 10px;
  font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Financeiro em preto ---------- */
.fin-page { background: #050605; border-color: var(--line); }
.fin-page::before {
  background:
    radial-gradient(ellipse 50% 35% at 45% 12%, rgba(163, 230, 53, .10), transparent 70%),
    radial-gradient(ellipse 40% 30% at 90% 70%, rgba(163, 230, 53, .06), transparent 70%),
    #050605;
}
.fin-page::after { display: none; }
.fin-page .glass, .fin-page .round-btn, .fin-page .glass-seg, .fin-page .glass-pill { background: #0f110d; border-color: #24281f; box-shadow: none; }
.fin-page .glass-seg button.on { background: var(--accent); color: var(--on-accent); }
.fin-page .glass-pill { color: var(--accent); }
.fin-page .amount-in { color: var(--accent); }
.fin-page .amount-out { color: #ff6b5e; }
.fin-page .tx-ico.in { background: rgba(163, 230, 53, .14); color: var(--accent); }
.fin-page .tx-ico.out { background: rgba(240, 68, 56, .15); color: #ff6b5e; }
.fin-page .tag.ok { background: rgba(163, 230, 53, .14); color: var(--accent); border-color: rgba(163, 230, 53, .35); }
.fin-page .tag.bad { background: rgba(240, 68, 56, .14); color: #ff8a7d; border-color: rgba(240, 68, 56, .35); }
.fin-page .fin-filters select { background: #0f110d; border-color: #2a2e25; }
.fin-page .fin-filters select option { background: #111; }
.fin-top > div:first-child { visibility: hidden; }

/* ---------- Responsivo ---------- */
@media (max-width: 1250px) {
  .dash-mid { grid-template-columns: 230px minmax(0, 1fr); }
  .spend { grid-column: 1 / -1; }
  .donut-wrap { grid-template-columns: 220px auto 1fr; }
  .dash-bottom { grid-template-columns: 1fr 1fr; }
  .ask { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-mid, .dash-bottom { grid-template-columns: 1fr; }
  .ledger-list { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .donut-wrap { grid-template-columns: 1fr auto; }
  .search { display: none; }
}
@media (max-width: 760px) {
  .app { padding: 8px; }
  .sidebar { margin-right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
  .kpis { grid-template-columns: 1fr; }
  .page-title p { display: none; }
  .profile select { max-width: 90px; }
  .bar-area { gap: 4px; }
  .bar-col small { font-size: 9px; }
  .bar-pill { font-size: 9px; padding: 3px 5px; }
  .dbar i { display: none; }
  .hm-foot { grid-template-columns: 1fr 1fr; }
}
