/* ===== Gestão Financeira — visual moderno (sem bibliotecas, sem internet) =====
   Tema: automático (segue o sistema) · claro · escuro (botão no topo). Tudo por variáveis CSS, inclusive os gráficos. */
:root { --bg:#f3f4f7; --card:#ffffff; --ink:#0f2347; --muted:#5d6b8a; --line:#dde2ec; --line2:#eceff5; --brand:#17315f; --brand2:#0f2347; --brand-soft:#e7ecf6; --on-brand:#ffffff; --fab:#c59b27; --gold:#b8892a; --gold-soft:#faf1d8; --ok:#0b7a4b; --ok-soft:#e6f6ee; --warn:#9a6a00; --warn-soft:#fff4dc; --bad:#c2271d; --bad-soft:#feeceb; --rec:#0b7a4b; --desp:#c2271d; --catbg:#f0f2f7; --totbg:#e5e9f2; --parcial:#fff8d6;
  --dr:#c2271d; --dp:#f08c00; --do:#ffa8a8; --rr:#0b7a4b; --rp:#40c057; --ro:#b2f2bb; --shadow:0 1px 2px rgba(15,35,71,.06), 0 6px 18px rgba(15,35,71,.07); --radius:14px; --tip:#0f2347; --tipink:#f8fafc; --side:#0f2347; --side-ink:#d5dcec; --side-mute:#8e9bb9; --side-line:rgba(255,255,255,.09); --side-on:#f1cb70; --side-on-bg:rgba(241,203,112,.15); --sidew:252px; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="light"]) { --bg:#050508; --card:#12121a; --ink:#f1f1f6; --muted:#9a9aae; --line:#24242f; --line2:#1b1b25; --brand:#dfb15b; --brand2:#c59b27; --brand-soft:#271f0e; --on-brand:#1a1203; --fab:#dfb15b; --gold:#dfb15b; --gold-soft:#271f0e; --ok:#51d68e; --ok-soft:#10301f; --warn:#f5bd4f; --warn-soft:#352a0e; --bad:#ff8f86; --bad-soft:#3b1b19; --rec:#51d68e; --desp:#ff8f86; --catbg:#171722; --totbg:#1f1f2b; --parcial:#2e2a12; --dr:#ff7b72; --dp:#ffa94d; --do:#7a3a37; --rr:#51d68e; --rp:#2f9e5b; --ro:#1d4a31; --shadow:0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35); --tip:#f1f1f6; --tipink:#050508; --side:#0a0a0f; --side-ink:#c9c9d6; --side-mute:#757589; --side-line:rgba(255,255,255,.07); --side-on:#dfb15b; --side-on-bg:rgba(223,177,91,.12); color-scheme: dark; } }
:root[data-tema="dark"] { --bg:#050508; --card:#12121a; --ink:#f1f1f6; --muted:#9a9aae; --line:#24242f; --line2:#1b1b25; --brand:#dfb15b; --brand2:#c59b27; --brand-soft:#271f0e; --on-brand:#1a1203; --fab:#dfb15b; --gold:#dfb15b; --gold-soft:#271f0e; --ok:#51d68e; --ok-soft:#10301f; --warn:#f5bd4f; --warn-soft:#352a0e; --bad:#ff8f86; --bad-soft:#3b1b19; --rec:#51d68e; --desp:#ff8f86; --catbg:#171722; --totbg:#1f1f2b; --parcial:#2e2a12; --dr:#ff7b72; --dp:#ffa94d; --do:#7a3a37; --rr:#51d68e; --rp:#2f9e5b; --ro:#1d4a31; --shadow:0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35); --tip:#f1f1f6; --tipink:#050508; --side:#0a0a0f; --side-ink:#c9c9d6; --side-mute:#757589; --side-line:rgba(255,255,255,.07); --side-on:#dfb15b; --side-on-bg:rgba(223,177,91,.12); color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
.app { display: flex; min-height: 100vh; } .page { flex: 1; min-width: 0; max-width: 1680px; margin: 0 auto; padding: 18px 20px 60px; }
a { color: var(--brand); text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); } a:hover { text-decoration-color: currentColor; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* cabeçalho */
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-bottom: 16px; }
.tit { display: flex; align-items: center; gap: 12px; min-width: 0; } .menu-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; flex: none; }
.marca { display: flex; align-items: center; gap: 12px; min-width: 0; } .logo-app { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--on-brand); background: linear-gradient(135deg, var(--brand), var(--brand2)); flex: none; } .logo-app .ico { width: 24px; height: 24px; }
h1 { font-size: 21px; margin: 0; letter-spacing: -.02em; } h3 { font-size: 14px; margin: 0 0 8px; letter-spacing: -.01em; }
.sub { color: var(--muted); font-size: 12.5px; }
header.top .sub { margin-top: 1px; max-width: 70ch; }
/* menu lateral (Patrimônium): fixo à esquerda, recolhível; no celular vira gaveta */
aside#side { flex: none; width: var(--sidew); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--side); color: var(--side-ink); border-right: 1px solid var(--side-line); z-index: 40; transition: width .18s ease; }
.side-top { padding: 16px 14px 12px; border-bottom: 1px solid var(--side-line); } .brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 0 0 1px rgba(223,177,91,.5); overflow: hidden; } .brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; } .brand-t b { font-size: 18px; font-weight: 700; letter-spacing: .01em; background: linear-gradient(135deg, #fcebc2 0%, #dfb15b 55%, #b3871f 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #dfb15b; } .brand-t small { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--side-mute); font-weight: 600; margin-top: 3px; }
nav#tabs { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
nav#tabs .grp { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--side-mute); font-weight: 700; padding: 14px 12px 5px; white-space: nowrap; } nav#tabs .grp:first-child { padding-top: 6px; }
nav#tabs button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; white-space: nowrap; border: 0; background: none; padding: 9px 12px; border-radius: 10px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--side-ink); cursor: pointer; position: relative; transition: background .15s, color .15s; } nav#tabs button .ico { width: 18px; height: 18px; opacity: .85; }
nav#tabs button:hover { background: rgba(255,255,255,.07); color: #fff; }
nav#tabs button[aria-current="page"] { background: var(--side-on-bg); color: var(--side-on); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--side-on) 22%, transparent); } nav#tabs button[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--side-on); } nav#tabs button[aria-current="page"] .ico { opacity: 1; }
.side-foot { padding: 10px 14px 14px; border-top: 1px solid var(--side-line); display: flex; align-items: center; justify-content: space-between; gap: 8px; } .assina { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; } .assina small { font-size: 9.5px; color: var(--side-mute); letter-spacing: .06em; } .assina b { font-size: 11.5px; color: var(--side-on); font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.side-tg { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--side-line); background: rgba(255,255,255,.05); color: var(--side-ink); display: grid; place-items: center; cursor: pointer; flex: none; } .side-tg:hover { background: rgba(255,255,255,.12); color: #fff; } .side-tg .ico { width: 16px; height: 16px; transition: transform .18s; }
body.side-min { --sidew: 68px; } body.side-min .brand-t, body.side-min nav#tabs .grp, body.side-min nav#tabs button span, body.side-min .assina { display: none; } body.side-min .side-top { padding: 16px 13px 12px; } body.side-min nav#tabs button { justify-content: center; padding: 10px 0; } body.side-min .side-foot { justify-content: center; padding: 10px 6px 14px; } body.side-min .side-tg .ico { transform: rotate(180deg); } body.side-min nav#tabs button[aria-current="page"]::before { left: -10px; }
.side-back { display: none; }
@media (max-width: 900px) { aside#side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 8px 0 30px rgba(0,0,0,.45); } body.side-open aside#side { transform: none; } body.side-open .side-back { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 39; } .menu-btn { display: flex; } .side-tg { display: none; } body.side-min { --sidew: 252px; } body.side-min .brand-t, body.side-min .assina { display: flex; } body.side-min nav#tabs .grp { display: block; } body.side-min nav#tabs button span { display: inline; } body.side-min nav#tabs button { justify-content: flex-start; padding: 9px 12px; } }
#conteudo { animation: entra .22s ease both; } @keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* cartões, grades, botões */
.cartao { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.cartoes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 14px; } .cartoes.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @media (max-width: 800px) { .cartoes.g2 { grid-template-columns: 1fr; } }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }
.big { font-size: 23px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; } .rec { color: var(--rec); } .desp { color: var(--desp); } .neg { color: var(--bad); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .row.between { justify-content: space-between; } .stack > * + * { margin-top: 12px; }
button.btn, label.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: var(--on-brand); border: 0; border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 2px 6px color-mix(in srgb, var(--brand) 28%, transparent); transition: filter .15s, transform .05s; }
button.btn:hover, label.btn:hover { filter: brightness(1.08); } button.btn:active { transform: translateY(1px); }
button.btn.sec, label.btn.sec { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; } button.btn.sec:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); filter: none; } button.btn.danger { background: var(--bad); box-shadow: none; }
button.mini { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; } button.mini:hover { border-color: var(--brand); color: var(--brand); } button.mini.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); font-weight: 600; }
button.x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 3px; font-size: 12px; } button.x:hover { color: var(--bad); }
.ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
input, select, textarea { font: inherit; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input.n { text-align: right; } input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); } input[type=range] { accent-color: var(--brand); padding: 0; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; } .pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.info { background: var(--brand-soft); color: var(--brand); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.tag { font-size: 10.5px; padding: 0 6px; border-radius: 5px; margin-left: 4px; font-weight: 600; } .tag.planilha { background: var(--brand-soft); color: var(--brand); } .tag.manual { background: var(--ok-soft); color: var(--ok); } .tag.ajuste { background: var(--warn-soft); color: var(--warn); } .tag.fixo { background: var(--brand-soft); color: var(--brand); } .mx td.fx { font-style: italic; color: var(--brand); }
.chip { display: inline-block; background: var(--line2); border: 1px solid var(--line); border-radius: 99px; padding: 1px 10px; margin: 2px; font-size: 12.5px; }
.note { background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; } .note.warn { background: var(--warn-soft); } .note.bad { background: var(--bad-soft); } .note.ok { background: var(--ok-soft); }
.drop { display: block; border: 2px dashed var(--line); border-radius: 14px; padding: 20px 10px; margin: 8px 0; text-align: center; cursor: pointer; color: var(--muted); transition: all .15s; } .drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); } .drop input { display: none; }

/* simulações */
.simlin { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; } .simlin span { font-weight: 700; } .simlin b { font-weight: 400; white-space: nowrap; }
.simliq { margin-top: 12px; font-size: 20px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .simliq b { font-size: 24px; } #simFx tr.on td { background: var(--warn-soft); font-weight: 700; }
.sim3 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .sim3 .fld { margin-top: 0; }
.mx td.simf { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); font-weight: 700; color: var(--brand); } .tag.simf { background: var(--brand); color: var(--on-brand); }
.simorc { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; } .simorc .fld { margin-top: 6px; }
.fld { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; } .fld input, .fld select { display: block; width: 100%; margin-top: 3px; font-size: 14px; color: var(--ink); } .fld small { display: block; font-size: 11.5px; } .fld[hidden] { display: none; }

/* tabela horizontal (Consolidado, Despesas, Receitas, Orçamento) */
.topsc { overflow-x: auto; overflow-y: hidden; height: 15px; margin-bottom: 4px; } .topsc > div { height: 1px; }
.mxw { overflow: auto; max-height: calc(100vh - 190px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table.mx { border-collapse: separate; border-spacing: 0; font-size: 12.8px; table-layout: fixed; width: max-content; }
.mx th, .mx td { padding: 5px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; background: var(--card); }
.mx thead th { position: sticky; top: 0; z-index: 3; text-align: right; color: var(--muted); font-weight: 600; width: 92px; min-width: 92px; border-bottom: 1px solid var(--line); } .mx thead th.atual { color: var(--brand); }
.mx th.rot { position: sticky; left: 0; z-index: 2; width: 310px; min-width: 310px; max-width: 310px; text-align: left; overflow: hidden; text-overflow: ellipsis; font-weight: inherit; } .mx thead th.rot { z-index: 5; }
.mx td.tot { position: sticky; left: 310px; z-index: 2; width: 104px; min-width: 104px; border-right: 2px solid var(--line); font-weight: 600; } .mx thead th.tot { position: sticky; left: 310px; z-index: 5; width: 104px; min-width: 104px; border-right: 2px solid var(--line); }
.mx td.n { text-align: right; width: 92px; min-width: 92px; font-variant-numeric: tabular-nums; } .mx td.z { color: var(--muted); opacity: .55; }
.mx tr.barra th { position: sticky; left: 0; text-align: left; color: #fff; font-weight: 700; background: #5b6472; padding: 7px 12px; letter-spacing: .01em; } .mx tr.barra.desp th { background: #9b1c1c; } .mx tr.barra.rec th { background: #166534; } .mx tr.barra.azul th { background: #1e40af; } .mx tr.barra.rec2 th { background: #0f766e; } .mx tr.barra.rec2 { } .mx tr.barra.cinza th { background: #475569; }
.mx tr.cat th, .mx tr.cat td { background: var(--catbg); font-weight: 600; } .mx tr.clic { cursor: pointer; } .mx tr.clic:hover th, .mx tr.clic:hover td { filter: brightness(.97); }
.mx tr.sub th { padding-left: 30px; font-weight: 400; } .mx tr.sub:hover th, .mx tr.sub:hover td { background: color-mix(in srgb, var(--brand-soft) 55%, var(--card)); } .seta { display: inline-block; width: 14px; color: var(--muted); }
.mx tr.tot th, .mx tr.tot td { background: var(--totbg); font-weight: 700; border-top: 1px solid var(--muted); } .mx tr.tot.desp th, .mx tr.tot.desp td { background: var(--bad-soft); } .mx tr.tot.rec th, .mx tr.tot.rec td { background: var(--ok-soft); } .mx tr.tot.azul th, .mx tr.tot.azul td { background: var(--brand-soft); } .mx tr.tot.saldo th, .mx tr.tot.saldo td { background: #334155; color: #fff; }
.mx tr.ref th, .mx tr.ref td { color: var(--muted); }
.mx td[data-acao="det"] { cursor: pointer; } .mx td[data-acao="det"]:hover { background: var(--brand-soft); }
.mx td.ed { cursor: text; } .mx td.ed:hover { background: var(--brand-soft); } .mx td small { display: block; font-size: 10.5px; color: var(--muted); } .acoes { opacity: .5; margin-left: 6px; white-space: nowrap; } tr:hover .acoes, .acoes:focus-within { opacity: 1; } .acoes button.x { font-size: 14px; padding: 0 4px; }
input.cedit { width: 82px; text-align: right; padding: 2px 4px; } .mx td.adj { background: var(--warn-soft); font-weight: 700; }

/* listas */
table.lista { border-collapse: collapse; width: 100%; font-size: 12.8px; } .lista th, .lista td { padding: 5px 9px; border-bottom: 1px solid var(--line2); text-align: left; white-space: nowrap; } .lista th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--card); border-bottom: 1px solid var(--line); }
.lista td.n, .lista th.n { text-align: right; font-variant-numeric: tabular-nums; } .lista td.w { white-space: normal; min-width: 170px; } .lista tr.off { opacity: .5; } .lista tr.parcial td { background: var(--parcial); } .lista td.z { color: var(--muted); } .lista td.pos { color: var(--rec); } .lista tr:hover td { background: color-mix(in srgb, var(--brand-soft) 45%, var(--card)); }
.lista.ed input { padding: 2px 5px; } .lista.conf tr.dif td, .lista tr.dif td { background: var(--warn-soft); } .scroll { overflow: auto; max-height: 420px; border: 1px solid var(--line); border-radius: 12px; }

/* painel / gráficos */
.painel { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); margin-bottom: 14px; } .painel h3, .cartao > h3 { font-size: 13.5px; }
.painel .larga, .larga { grid-column: 1 / -1; } .painel3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); margin-bottom: 14px; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; } svg.gauge { width: 100%; max-width: 330px; display: block; margin: 0 auto; }
.eix { font-size: 11px; fill: var(--muted); } .grade { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; } .grade.zero { stroke: var(--muted); stroke-dasharray: none; } .gv { font-size: 27px; font-weight: 700; }
.leg { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; font-size: 12px; color: var(--muted); margin-top: 8px; } .leg span { display: inline-flex; align-items: center; cursor: pointer; padding: 1px 8px; border-radius: 99px; border: 1px solid transparent; user-select: none; } .leg span:hover { border-color: var(--line); background: var(--line2); } .leg span.off { opacity: .4; text-decoration: line-through; } .leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.bar-in { transform-box: fill-box; transform-origin: 50% 100%; animation: cresce .5s cubic-bezier(.2,.8,.2,1) both; } @keyframes cresce { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.hbar-in { transform-box: fill-box; transform-origin: 0 50%; animation: cresceH .5s cubic-bezier(.2,.8,.2,1) both; } @keyframes cresceH { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.draw-in { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: tra .9s ease forwards; } @keyframes tra { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .bar-in, .hbar-in, .draw-in, #conteudo { animation: none !important; stroke-dashoffset: 0; } }
.slot { fill: transparent; cursor: pointer; transition: fill .12s; } .slot:hover { fill: color-mix(in srgb, var(--brand) 9%, transparent); } .slot.foco { fill: color-mix(in srgb, var(--brand) 14%, transparent); }
svg.chart rect[data-tip]:hover, svg.chart circle[data-tip]:hover, svg.chart path[data-tip]:hover { filter: brightness(1.12); }
.donut-wrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; } .donut-leg { display: grid; gap: 3px; font-size: 12.5px; min-width: 190px; } .donut-leg div { display: flex; align-items: center; gap: 7px; padding: 2px 6px; border-radius: 8px; cursor: pointer; } .donut-leg div:hover { background: var(--line2); } .donut-leg i { width: 10px; height: 10px; border-radius: 3px; flex: none; } .donut-leg b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* KPIs */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); margin-bottom: 14px; }
.kpi { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 12px; box-shadow: var(--shadow); overflow: hidden; }
.kpi .lbl { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding-right: 40px; } .kpi .val { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 5px 0 2px; font-variant-numeric: tabular-nums; } .kpi .det { font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
.kpi .ic { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); } .kpi .ic.g { background: var(--ok-soft); color: var(--ok); } .kpi .ic.r { background: var(--bad-soft); color: var(--bad); } .kpi .ic.y { background: var(--warn-soft); color: var(--warn); }
.kpi svg.spark { display: block; width: 100%; height: 34px; margin-top: 8px; opacity: .95; pointer-events: none; }
.delta { font-size: 12px; font-weight: 600; } .delta.up { color: var(--rec); } .delta.dn { color: var(--desp); }
.sec-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 2px 10px; } .sec-t h2 { font-size: 15px; margin: 0; letter-spacing: -.01em; }
.prog { height: 9px; border-radius: 99px; background: var(--line2); overflow: hidden; position: relative; } .prog i { display: block; height: 100%; border-radius: 99px; background: var(--ok); transition: width .5s cubic-bezier(.2,.8,.2,1); } .prog i.warn { background: #f59f00; } .prog i.bad { background: var(--bad); }
.pl { display: grid; grid-template-columns: minmax(120px, 1.1fr) 2fr auto; gap: 10px; align-items: center; padding: 6px 2px; font-size: 13px; } .pl .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pl .vl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx { display: grid; grid-template-columns: minmax(110px, 210px) 1fr minmax(88px, auto); gap: 10px; align-items: center; padding: 6px 6px; border-radius: 9px; cursor: pointer; font-size: 13px; } .cx:hover { background: var(--brand-soft); } .cx .nm { display: flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cx .vl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.cx .bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line2); } .cx .bar i { display: block; height: 100%; transition: width .5s cubic-bezier(.2,.8,.2,1); min-width: 0; }
.cx.sub { cursor: default; font-size: 12.5px; padding-left: 28px; } .cx.sub:hover { background: var(--line2); } .cx.sub .bar { height: 9px; } .cx.sub .vl { font-weight: 500; }
.cx .pc { color: var(--muted); font-weight: 500; font-size: 11.5px; margin-left: 6px; }
.parc { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 9px 2px; border-bottom: 1px solid var(--line2); font-size: 13px; } .parc:last-child { border-bottom: 0; } .parc .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .parc .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; } .parc .s { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: 12px; } .parc .s .prog { flex: 1 1 90px; min-width: 90px; height: 6px; }
.ins { display: flex; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line2); font-size: 13px; align-items: flex-start; } .ins:last-child { border-bottom: 0; } .ins .e { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; font-size: 15px; background: var(--brand-soft); } .ins.bad .e { background: var(--bad-soft); } .ins.ok .e { background: var(--ok-soft); } .ins.warn .e { background: var(--warn-soft); }

/* dica flutuante dos gráficos */
#tip { position: fixed; z-index: 200; pointer-events: none; background: var(--tip); color: var(--tipink); padding: 8px 11px; border-radius: 10px; font-size: 12px; line-height: 1.45; max-width: 320px; box-shadow: 0 10px 28px rgba(0,0,0,.3); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; } #tip.on { opacity: 1; transform: none; } #tip b { font-weight: 700; } #tip .tr { display: flex; justify-content: space-between; gap: 14px; } #tip .tr i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* saldos */
#autoInfo { margin: 0 0 12px; } #autoInfo:empty { display: none; } #autoInfo .ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--brand); }
[hidden] { display: none !important; }   /* o display do cartão (grid) não pode anular o atributo hidden da busca */
.contas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.conta { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; transition: border-color .15s, transform .15s; } .conta:hover { border-color: var(--brand); transform: translateY(-1px); } .conta.fora { opacity: .78; }
.conta .topo { display: flex; gap: 12px; align-items: center; } .conta .nome { flex: 1; min-width: 0; } .conta .nome input { width: 100%; font-weight: 600; border-color: transparent; background: transparent; padding: 3px 6px; margin-left: -6px; } .conta .nome input:hover, .conta .nome input:focus { border-color: var(--line); background: var(--card); } .conta .nome input.tp { font-weight: 400; font-size: 12px; color: var(--muted); }
.conta .saldo { display: flex; align-items: center; gap: 8px; } .conta .saldo input { flex: 1; font-size: 20px; font-weight: 700; text-align: right; padding: 7px 10px; font-variant-numeric: tabular-nums; } .conta .saldo span { color: var(--muted); font-weight: 600; }
.conta .rod { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); } .conta .rod label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.logo { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: -.03em; color: #fff; flex: none; overflow: hidden; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,.18); user-select: none; } .logo img { width: 100%; height: 100%; object-fit: cover; display: block; } .logo .ico { width: 24px; height: 24px; stroke-width: 1.7; }
.logo button { position: absolute; inset: 0; opacity: 0; border: 0; cursor: pointer; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; transition: opacity .15s; } .logo:hover button { opacity: 1; }
.busca { position: relative; flex: 1; min-width: 220px; max-width: 420px; } .busca input { width: 100%; padding: 9px 12px 9px 36px; border-radius: 12px; font-size: 14px; } .busca .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }

/* viagens / compras */
.vgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, 1fr); gap: 14px; align-items: start; } @media (max-width: 1050px) { .vgrid { grid-template-columns: 1fr; } }
.vsum { position: sticky; top: 16px; } @media (max-width: 1050px) { .vsum { position: static; } }
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; } .vcard > .ht { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .vcard > .ht .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; } .vcard > .ht b { font-size: 14.5px; } .vcard > .ht .tot { margin-left: auto; text-align: right; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; } .vcard > .ht .tot small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.vcard .campos { display: grid; gap: 8px 10px; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); } .vcard .campos .fld { margin-top: 0; }
/* Alertas do mês (visual 08/11/2026): cartões com status em palavras, barra com a marca do limite e o detalhe em reais */
.alsec h3 { margin: 6px 0 8px; font-size: 14px; } .algrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.alc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); } .alc.warn { border-left: 4px solid var(--warn, #f08c00); } .alc.bad { border-left: 4px solid var(--dr, #e03131); }
.alh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; } .alh b { flex: 1 1 120px; min-width: 0; overflow-wrap: break-word; } .ali { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.alc.warn .ali { background: rgba(240,140,0,.15); color: #c77700; } .alc.bad .ali { background: rgba(224,49,49,.14); color: var(--dr, #e03131); } .als { font-weight: 700; font-size: 13px; white-space: nowrap; } .alc.warn .als { color: #c77700; } .alc.bad .als { color: var(--dr, #e03131); }
.alb2 { position: relative; height: 8px; border-radius: 4px; background: var(--line); margin: 8px 0 5px; } .alb2 > i { display: block; height: 100%; border-radius: 4px; } .alc.warn .alb2 > i { background: var(--warn, #f08c00); } .alc.bad .alb2 > i { background: var(--dr, #e03131); }
.alm { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); border-radius: 1px; } .ald { font-size: 12.5px; color: var(--muted); }
#pmedia tr.mds[data-acao], #pmediaR tr.mds[data-acao] { cursor: pointer; } #pmedia tr.mds[data-acao]:hover td, #pmediaR tr.mds[data-acao]:hover td { background: var(--soft, rgba(127,127,127,.07)); }
/* Alertas de gasto (80% do orçamento ou da média) */
.alertas { border-left: 4px solid var(--warn, #f08c00); } .alr { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); } .alr:last-of-type { border-bottom: 0; }
.alr .t { font-size: 13.5px; } .alb { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; } .alb i { display: block; height: 100%; border-radius: 4px; } .alb i.warn { background: var(--warn, #f08c00); } .alb i.bad { background: var(--dr, #e03131); }
/* Painel › Evolução dos gastos e Plano de ação (js/analise.js) */
.evog h3 { margin: 0 0 6px; font-size: 14px; } .evr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 10px; padding: 7px 9px; cursor: pointer; color: var(--ink); font: inherit; }
.pltr { cursor: pointer; } .pltr:hover td { background: var(--soft, rgba(127,127,127,.07)); }
svg.chart text.bval { fill: var(--ink); font-weight: 700; pointer-events: none; }
.evtab { margin-top: 12px; } .evtab summary { cursor: pointer; padding: 6px 0; } .evt tr[data-acao] { cursor: pointer; } .evt tr.evc td { background: var(--soft, rgba(127,127,127,.05)); } .evt tr.evs td:first-child { padding-left: 22px; color: var(--muted); }
.evbar { display: block; width: 120px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .evbar i { display: block; height: 100%; background: var(--dr, #e03131); opacity: .75; }
.evr:hover, .evr.on { background: var(--soft, rgba(127,127,127,.08)); border-color: var(--line); } .evr .nm { font-weight: 600; min-width: 0; overflow-wrap: anywhere; } .evr .vv { font-size: 12.5px; color: var(--muted); text-align: right; } .evr .pill { grid-column: 1 / -1; justify-self: start; }
.pldc { text-align: left; border: 1px solid transparent; font: inherit; color: var(--ink); cursor: pointer; width: 100%; } .pldc:hover { border-color: var(--brand); } .pldet { font-size: 11px; padding: 1px 8px; margin-left: 4px; }
.pldiag { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; } .pldiag > div, .pldiag > .pldc { background: var(--soft, rgba(127,127,127,.06)); border-radius: 12px; padding: 10px 12px; } .pldiag small { display: block; color: var(--muted); font-size: 12px; } .pldiag b { font-size: 18px; }
.plfases { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; } .plf { border: 1px solid var(--line); border-radius: 12px; padding: 12px; } .plf h3 { margin: 2px 0 8px; font-size: 15px; } .plq { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); font-weight: 700; }
.pli { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-size: 13.5px; line-height: 1.45; cursor: pointer; } .pli input { margin-top: 3px; width: 18px; height: 18px; flex: none; } .pli.ok > span { color: var(--muted); text-decoration: line-through; } .pli .mini { margin-left: 4px; }
.vcard .pag { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.vcard .vauto { display: block; padding: 9px 0 0; color: var(--brand); }   /* noites/diárias calculadas pelas datas */
.calcE { width: 100%; font-size: 20px; text-align: right; padding: 10px 12px; } .calcR { text-align: right; font-size: 22px; font-weight: 700; min-height: 30px; margin: 6px 2px; color: var(--brand); }
.calcG { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .calcG button { min-height: 44px; font-size: 17px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; } .calcG button.op { background: var(--brand); color: #fff; border-color: transparent; } .calcG button:hover { filter: brightness(1.08); }
.vcard .calc { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; } .vcard .calc b { color: var(--ink); }
.addbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; } .addbar button { display: inline-flex; align-items: center; gap: 6px; }
.vlin { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line2); font-size: 13px; } .vlin b { font-variant-numeric: tabular-nums; }
.vtot { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* diálogos, avisos e detalhes */
.toast { position: fixed; right: 16px; bottom: 16px; background: var(--tip); color: var(--tipink); padding: 11px 15px; border-radius: 12px; max-width: 400px; box-shadow: 0 10px 28px rgba(0,0,0,.3); z-index: 99; }
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); padding: 20px; min-width: min(500px, 92vw); box-shadow: 0 24px 60px rgba(0,0,0,.35); } dialog::backdrop { background: rgba(15,23,42,.45); backdrop-filter: blur(2px); }
details > summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: 8px 0; } code { background: var(--line2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
ul, ol { margin: 6px 0; padding-left: 20px; } li + li { margin-top: 4px; }
::-webkit-scrollbar { height: 11px; width: 11px; } ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 70%, transparent); background-clip: content-box; border: 2px solid transparent; } ::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 640px) { .page { padding: 12px 10px 50px; } h1 { font-size: 18px; } .kpi .val { font-size: 21px; } }

/* ===== celular (≤ 700 px): tabelas com coluna de rótulo estreita, cartões em 1–2 colunas, botões do topo em linha ===== */
@media (max-width: 700px) {
  .mx th.rot { width: 148px; min-width: 148px; max-width: 148px; font-size: 12px; white-space: normal; line-height: 1.2; }
  .mx td.tot, .mx thead th.tot { left: 148px; width: 84px; min-width: 84px; }
  .mx thead th, .mx td.n { width: 80px; min-width: 80px; }
  .mx tr.sub th { padding-left: 14px; } .mx th, .mx td { padding: 5px 6px; }
  .mxw { max-height: calc(100vh - 210px); }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; } .kpi { padding: 12px; } .kpi .val { font-size: 19px; } .kpi .det { font-size: 11px; } .kpi .ic { width: 28px; height: 28px; right: 8px; top: 8px; } .kpi .lbl { padding-right: 30px; font-size: 10.5px; }
  .painel, .painel3, .grid2, .vgrid, .contas { grid-template-columns: 1fr !important; }
  header.top .row { width: 100%; } header.top .row .btn { flex: 1; justify-content: center; padding: 8px 6px; font-size: 12.5px; }
  .cartao, .vcard { padding: 12px; } .big { font-size: 20px; } .cx { grid-template-columns: minmax(90px, 130px) 1fr minmax(66px, auto); gap: 6px; }
  .cartoes { grid-template-columns: 1fr 1fr; gap: 8px; } .cartoes .cartao { padding: 10px 12px; } .cartoes .big { font-size: 17px; } .cartoes .sub { font-size: 11.5px; }
  .vtot { font-size: 24px; } .conta .saldo input { font-size: 18px; }
}
/* impressão: só o relatório aberto (diálogo) sai no papel/PDF */
@media print { body > *:not(dialog) { display: none !important; } dialog#dlg { display: block !important; position: static !important; width: 100% !important; max-width: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; background: #fff !important; } dialog#dlg::backdrop { display: none; } .no-print { display: none !important; } #relatCorpo { max-height: none !important; overflow: visible !important; } }

/* média mensal por categoria › subcategoria (Painel) */
table.md { font-size: 13px; } table.md td.bar { width: 28%; min-width: 110px; } .mdbar { height: 8px; border-radius: 99px; background: var(--line2); overflow: hidden; } .mdbar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
table.md tr.mdc { cursor: pointer; } table.md tr.mdc td:first-child { font-weight: 600; } table.md tr.mdc:hover td { background: var(--brand-soft); } table.md tr.mds td { color: var(--ink); font-size: 12.5px; background: color-mix(in srgb, var(--catbg) 55%, var(--card)); } table.md tr.mds td:first-child { padding-left: 30px; }
table.md tr.mdt td { font-weight: 700; background: var(--totbg); border-top: 2px solid var(--muted); border-bottom: 2px solid var(--muted); } .msp { width: 84px; height: 22px; display: block; overflow: visible; } table.md td, table.md th { vertical-align: middle; }
/* cartões de crédito e lançamentos digitados */
.ccs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 4px; }
.cc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; cursor: pointer; transition: border-color .15s, transform .15s; } .cc:hover { border-color: var(--brand); transform: translateY(-1px); } .cc.sel { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent), var(--shadow); } .cc.arq { opacity: .65; }
.cc-top { display: flex; gap: 12px; align-items: center; } .cc-nome { flex: 1; min-width: 0; } .cc-nome b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cc-fat { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 13px; padding-top: 8px; border-top: 1px solid var(--line2); }
.emb { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; letter-spacing: -.03em; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.18); } .emb .ico { width: 22px; height: 22px; stroke-width: 1.7; }
.lista tr.conf-ok td { background: var(--ok-soft); } .lista td.pos { color: var(--ok); }
.flag { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); cursor: pointer; user-select: none; } .flag:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; } .flag input { margin: 0; }
.mx input.fora { margin: 0 7px 0 0; vertical-align: -3px; cursor: pointer; }

.acoes button.bx { font-size: 11px; border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; color: var(--brand); background: var(--card); margin-right: 3px; }

/* ===== camada de UX (13/10/2026): foco visível, alvos de toque, navegação agrupada, movimento reduzido ===== */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 75%, transparent); outline-offset: 2px; border-radius: 8px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
button, a, summary, label.btn, [data-acao] { touch-action: manipulation; }
.skip { position: absolute; left: 12px; top: -56px; z-index: 300; background: var(--brand); color: var(--on-brand); padding: 9px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: top .15s; } .skip:focus { top: 10px; }
#conteudo:focus { outline: none; }
h1, h2, h3, .sec-t h2 { text-wrap: balance; } .big, .kpi .val, .vtot { font-variant-numeric: tabular-nums; }
/* navegação: grupos separados + sombras nas pontas quando há mais abas para rolar */
@media (min-width: 701px) {
  .cartoes { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .grp-flags { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
}
/* alvos de toque ≥ 44px em telas de toque / celular; campos com 16px (iOS não dá zoom) */
@media (pointer: coarse), (max-width: 700px) {
  button.btn, label.btn, button.mini, .flag, nav#tabs button, summary { min-height: 44px; }
  button.mini { padding: 8px 14px; } .flag { padding: 8px 14px; }
  input:not([type=checkbox]):not([type=radio]):not(.cedit), select { min-height: 44px; font-size: 16px; }
  input[type=checkbox] { width: 22px; height: 22px; } .mx input.fora { width: 20px; height: 20px; }
  button.x { min-width: 32px; min-height: 32px; font-size: 16px; } .acoes { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
/* ===== botão "+" (igual ao do app), estado da nuvem e modo compacto/moderno (14/10/2026) ===== */
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab.on::before { content: ''; position: fixed; inset: 0; background: rgba(8,8,16,.5); z-index: -1; backdrop-filter: blur(1.5px); }
.fab-btn { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--fab); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 22px color-mix(in srgb, var(--fab) 55%, transparent); transition: transform .2s, background .2s; } .fab-btn .ico { width: 26px; height: 26px; stroke-width: 2.2; } .fab.on .fab-btn { transform: rotate(45deg); }
.fab-itens { display: none; flex-direction: column; gap: 10px; align-items: flex-end; } .fab.on .fab-itens { display: flex; animation: fabIn .16s ease both; } @keyframes fabIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fab-it { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; color: var(--ink); font: inherit; font-weight: 600; padding: 0; }
.fab-lbl { background: var(--card); border: 1px solid var(--line); padding: 5px 12px; border-radius: 99px; font-size: 13px; box-shadow: var(--shadow); }
.fab-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); } .fab-it.rec .fab-ic { background: #17794d; } .fab-it.desp .fab-ic { background: #c2271d; } .fab-it.cc .fab-ic { background: #0f766e; } .fab-it.tr .fab-ic { background: #6b46c1; }
.toast { bottom: 90px; }
#bNuvem[data-st="ok"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); } #bNuvem[data-st="erro"] { color: var(--bad); border-color: var(--bad); } #bNuvem[data-st="sync"] .ico { animation: giro 1s linear infinite; } @keyframes giro { to { transform: rotate(360deg); } }
@media (min-width: 701px) {
  .page { padding: 10px 16px 80px; max-width: 1680px; }
  header.top { margin-bottom: 8px; gap: 6px 14px; } header.top .sub { font-size: 11.5px; margin-top: 0; } .marca { gap: 10px; } .logo-app { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; } .logo-app .ico { width: 19px; height: 19px; } h1 { font-size: 17px; }
  header.top .btn { padding: 5px 11px; font-size: 12.5px; }
  nav#tabs button { padding: 7px 11px; font-size: 13px; }
  .cartao { padding: 12px 14px; border-radius: 14px; } .cartoes { gap: 10px; margin-bottom: 10px; } .big { font-size: 20px; margin: 1px 0; }
  .kpis { gap: 10px; margin-bottom: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } .kpi { padding: 10px 13px 9px; border-radius: 14px; } .kpi .val { font-size: 21px; margin: 3px 0 1px; } .kpi .ic { width: 30px; height: 30px; right: 10px; top: 10px; }
  .ctrl { margin-bottom: 8px; gap: 6px; } button.btn, label.btn { padding: 6px 12px; font-size: 13px; border-radius: 9px; } button.mini { padding: 3px 10px; font-size: 12px; } .flag { padding: 3px 10px; font-size: 12.5px; }
  table.mx, table.lista { font-size: 12.3px; } .mx th, .mx td { padding: 3px 8px; } .lista th, .lista td { padding: 3px 9px; }
  .painel, .painel3 { gap: 10px; margin-bottom: 10px; } .sec-t { margin: 2px 2px 8px; } dialog { padding: 16px; border-radius: 16px; }
}
/* ---------------- Cartões de crédito no estilo do Mobills (cartoes_mb.js) ---------------- */
.mbhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 14px; } .mbhead h2 { margin: 0; font-size: 22px; }
.mbtools { display: flex; align-items: center; gap: 8px; }
.mbseg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 3px; } .mbseg button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 12.5px; padding: 8px 16px; border-radius: 99px; min-height: 36px; cursor: pointer; } .mbseg button.on { background: var(--brand); color: var(--on-brand); }
.mbrnd { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 18px; line-height: 1; display: inline-grid; place-items: center; cursor: pointer; list-style: none; } .mbrnd::-webkit-details-marker { display: none; } .mbrnd:disabled { opacity: .35; cursor: default; } .mbrnd:hover:not(:disabled) { background: var(--brand-soft); }
.mbmenu { position: relative; } .mbmenu-box { position: absolute; right: 0; top: 44px; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 250px; display: flex; flex-direction: column; } .mbmenu-box button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink); cursor: pointer; min-height: 40px; } .mbmenu-box button:hover { background: var(--brand-soft); }
.mbgrid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.mbtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.mbcc { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 16px 10px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; } .mbcc:hover { border-color: var(--brand); } .mbcc.arq { opacity: .6; }
.mbcc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; } .mbcc-nome { flex: 1; min-width: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.mbdots { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: 50%; } .mbdots:hover { background: var(--brand-soft); }
.mbbnd { color: var(--ink); height: 22px; width: 38px; flex: none; } .mbbnd.visa { font-weight: 900; font-style: italic; font-size: 15px; letter-spacing: -.5px; width: auto; line-height: 22px; } .mbbnd.txt { font-size: 10px; font-weight: 800; width: auto; line-height: 22px; }
.mbst { font-weight: 800; font-size: 13.5px; margin-top: 2px; } .mbln { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; } .mbln span { color: var(--muted); } .mbln b { font-variant-numeric: tabular-nums; }
.mblim { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; } .mbtx { font-size: 11.5px; color: var(--muted); }
.mbbar { position: relative; height: 15px; border-radius: 99px; background: var(--line2); overflow: hidden; } .mbbar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 8px; } .mbbar span { position: absolute; right: 8px; top: 0; font-size: 10.5px; line-height: 15px; color: var(--ink); font-weight: 700; }
.mbact { border-top: 1px solid var(--line2); margin-top: 8px; padding-top: 4px; text-align: right; min-height: 38px; } .mbact button, .mbact .paga { border: 0; background: none; color: var(--brand); font-weight: 800; font-size: 12.5px; letter-spacing: .04em; padding: 8px 4px; cursor: pointer; } .mbact .paga { color: var(--ok); cursor: default; }
.mbnovo { border: 2px dashed var(--line); background: transparent; border-radius: 20px; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--brand); font-weight: 700; font-size: 15px; cursor: pointer; } .mbnovo:hover { border-color: var(--brand); background: var(--brand-soft); } .mbplus { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--brand); display: grid; place-items: center; font-size: 28px; line-height: 1; }
.mbside { display: flex; flex-direction: column; gap: 12px; } .mbstat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: var(--shadow); } .mbstat span { display: block; font-size: 12.5px; color: var(--muted); } .mbstat b { display: block; font-size: 17px; margin-top: 3px; font-variant-numeric: tabular-nums; } .mbico { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-style: normal; font-weight: 800; flex: none; }
/* tela do cartão */
.mbbar2 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; } .mbgrow { flex: 1; }
.mbpill { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: var(--on-brand); border-radius: 99px; padding: 6px 16px; font-weight: 800; font-size: 15px; } .mbpill select { background: transparent; border: 0; color: inherit; font: inherit; font-weight: 800; max-width: 260px; cursor: pointer; } .mbpill select option { color: #111; }
.mbbusca { max-width: 220px; border-radius: 99px; }
.mbdet { margin-top: 4px; } .mbtab { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.mbmes { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; } .mbmes-pill { border: 1px solid var(--brand); color: var(--ink); border-radius: 99px; padding: 6px 18px; font-size: 14px; } .mbmes-pill b { color: var(--brand); }
.mbt td, .mbt th { padding: 9px 10px; } .mbt tr:hover td { background: var(--brand-soft); }
.mbsit { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; } .mbsit.ok { background: var(--ok-soft); color: var(--ok); } .mbsit.pend { background: var(--warn-soft); color: var(--warn); }
.mbcat { display: inline-flex; align-items: center; gap: 8px; } .mbcat i { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-style: normal; font-weight: 800; font-size: 9.5px; flex: none; }
.mbacts { white-space: nowrap; } .mbord { border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: pointer; padding: 0; }
.mbfoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line2); }
.mbimp { max-width: 960px; } .mbimp tr.dup td { background: var(--bad-soft); } .mbimp tr.novo td { background: var(--brand-soft); }
@media (max-width: 900px) { .mbgrid { grid-template-columns: 1fr; } .mbside { flex-direction: row; flex-wrap: wrap; } .mbside .mbstat { flex: 1 1 220px; } }
@media (max-width: 700px) { .mbnovo { min-height: 110px; flex-direction: row; } .mbplus { width: 40px; height: 40px; font-size: 22px; } .mbcc { padding: 14px 14px 8px; } .mbbusca { max-width: 100%; flex: 1; } }
/* logos dos bancos (imagens em app_celular/img/bancos/) */
.emb { overflow: hidden; } .emb img { width: 100%; height: 100%; object-fit: cover; display: block; } .logo.ct img, .emb.ct img { width: 76%; height: 76%; object-fit: contain; margin: auto; }
.mbcc .emb { width: 36px; height: 36px; border-radius: 50%; box-shadow: none; border: 1px solid var(--line); }

/* categorias com cor e ícone (cartoes_mb.js) e relatório de conferência da fatura */
.mbcat i svg.i { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cpcores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; } .cpc { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; } .cpc.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card) inset; }
.cpicones { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; margin-top: 6px; max-height: 200px; overflow-y: auto; padding: 2px; } .cpi { height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; font-weight: 700; } .cpi svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .cpi.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.so-print { display: none; } @media print { .so-print { display: table-cell; } div.so-print { display: block; } .no-print { display: none !important; } }
/* aba Categorias (js/categorias.js) */
table.catm td.acoes { white-space: nowrap; text-align: right; } table.catm td.acoes .mini { margin-left: 4px; }
table.catm tr.catrow td { background: color-mix(in srgb, var(--brand-soft) 40%, transparent); border-top: 1px solid var(--line); } table.catm tr.subrow td { font-size: .95em; }
@media (max-width: 700px) { table.catm td.acoes { white-space: normal; } }
.fld .catnova { display: inline-flex; margin-top: 6px; font-size: 12.5px; } .fld .catnova[hidden] { display: none; }   /* + Criar categoria/subcategoria nos formulários */
.sobc { background: color-mix(in srgb, #f59e0b 10%, transparent); font-style: italic; } th.sobc { white-space: nowrap; } .sobn { color: #b45309; } .sobav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; } tr.sobfoco td { background: color-mix(in srgb, #f59e0b 18%, transparent); }   /* sobras do orçamento (meses que passaram) */
/* acabamento (revisão visual 01/11/2026) */
.mbbar.cheio span { color: var(--on-brand); }   /* % legível quando a barra do limite está quase cheia */
@media (min-width: 701px) { .kpis:has(> .kpi:nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); } .kpis:has(> .kpi:nth-child(7):last-child) { grid-template-columns: repeat(4, 1fr); } }   /* 7 cartões (Painel com média de receitas): 4 + 3 */   /* 6 cartões: 3 + 3 (sem um sozinho na 2ª linha) */
@media (min-width: 1380px) { .kpis:has(> .kpi:nth-child(6):last-child) { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 700px) {   /* celular: a barra de ações do topo vira uma fileira que rola para o lado, e o conteúdo aparece logo */
  header.top .row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, #000 88%, transparent); }
  header.top .row::-webkit-scrollbar { display: none; }
  header.top .row .btn { flex: none; white-space: nowrap; padding: 7px 11px; }
}
