/* ============================================================
   Financeiro · nudge — sistema visual
   Segue o contrato do design system da nudge V2 (DESIGN.md, paleta da marca):
   navy no chrome e no texto, coral como única ação, Sora nos títulos e números,
   Open Sans no texto, pílulas em botão e selo, overline como assinatura.
   ============================================================ */

@font-face { font-family: "Sora"; src: url("/static/fonts/sora.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/static/fonts/open-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* ── marca (manual Fernanda Hakme, como o design system traduziu) ── */
  --brand-navy: #15395e;  /* era #031630 (06/11/2026: Arthur pediu o azul mais leve); o texto continua #031630 */
  --brand-laranja: #ef8555;
  --brand-laranja-escuro: #b4501c;
  --brand-laranja-suave: #fdeee6;
  --brand-azul: #0f3559;

  /* ── semânticos ── */
  --background: #ffffff;
  --foreground: #031630;
  --surface: #f4f6f8;
  --panel: #edf1f4;
  --card: #ffffff;
  --popover: #ffffff;
  --primary: #ef8555;
  --primary-hover: #e9744a;
  --primary-foreground: #031630;
  --muted: #edf1f4;
  --muted-foreground: #56636f;
  --accent: #fdeee6;
  --accent-foreground: #b4501c;
  --destructive: #b8362a;
  --border: #e3e8ed;
  --input: #9aa6b1;
  --ring: #b4501c;
  --overlay: rgb(3 22 48 / 0.8);

  --status-ok: #10634e;        --status-ok-soft: #e3f3ec;
  --status-warn: #7a4f05;      --status-warn-soft: #fbf0da;
  --status-error: #a32e23;     --status-error-soft: #fbe7e4;
  --status-info: #1a5178;      --status-info-soft: #e4eff7;
  --status-neutral: #56636f;   --status-neutral-soft: #edf1f4;
  --status-attention: #b4501c; --status-attention-soft: #fdeee6;

  --nav-surface: #15395e;
  --nav-ink: #e9eff6;
  --nav-ink-muted: #9db0c4;
  --nav-surface-active: #224d78;
  --nav-indicator: #ef8555;
  --nav-border: rgb(255 255 255 / 0.1);

  --chart-1: #e4703a;
  --chart-2: #3179a8;
  --chart-3: #7f9a2e;
  --chart-grid: #e3e8ed;
  --chart-axis: #56636f;

  --font-body: "Open Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", var(--font-body);
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, monospace;

  --radius: 12px;      /* cartão, tabela, alerta */
  --radius-sm: 8px;    /* campo, menu */
  --radius-pill: 9999px;
  --shadow-card: 0 2px 8px -2px rgb(3 22 48 / 0.1);
  --shadow-menu: 0 8px 24px -4px rgb(3 22 48 / 0.18), 0 2px 6px rgb(3 22 48 / 0.06);

  /* densidade Cockpit */
  --text-base: 13.5px;
  --page-pad: 28px;
  --card-pad: 18px;
  --control-h: 36px;
  --control-h-sm: 30px;
  --row-h: 42px;

  /* ── nomes antigos, usados por templates e pelo gráfico ── */
  --bg: var(--surface);
  --surface-2: var(--panel);
  --hover: var(--panel);
  --border-strong: var(--input);
  --text: var(--foreground);
  --text-2: #1f3650;
  --faint: #8794a0;
  --brand: var(--chart-1);
  --brand-hover: var(--primary-hover);
  --brand-soft: var(--accent);
  --brand-text: var(--accent-foreground);
  --on-brand: var(--primary-foreground);
  --pos: var(--status-ok);   --pos-soft: var(--status-ok-soft);
  --neg: var(--status-error); --neg-soft: var(--status-error-soft);
  --warn: var(--status-warn); --warn-soft: var(--status-warn-soft);
  --info: var(--status-info); --info-soft: var(--status-info-soft);
  --side-bg: var(--nav-surface);
  --shadow: var(--shadow-card);
  --shadow-lg: var(--shadow-menu);
  --linha: var(--border);

  color-scheme: light;
}

/* ------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  background: var(--surface);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-foreground); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--foreground); font-family: var(--font-display); letter-spacing: -0.01em; }
h1 { font-size: 21px; line-height: 28px; font-weight: 600; }
h2 { font-size: 15.5px; line-height: 22px; font-weight: 600; }
h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
p { margin: 0; }
code { font-family: var(--font-mono); font-size: 0.92em; }
.num, .valor { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted-foreground); }
.faint { color: var(--faint); }
.pos { color: var(--status-ok); }
.neg { color: var(--status-error); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
.overline, .lateral .grupo, th, .quadro .rot, .kpi .topo, .painel-contas .mini .rot {
  font-family: var(--font-body); font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------ esqueleto: barra lateral navy + conteúdo */

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app > .principal { min-width: 0; }
.lateral {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  background: var(--nav-surface); color: var(--nav-ink);
  display: flex; flex-direction: column; padding: 22px 16px 16px;
}
.lateral .marca { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 8px 18px; margin: 0; color: var(--nav-ink); }
.lateral .marca:hover { text-decoration: none; }
.marca .logo { display: none; }
.marca img.marca-larga { height: 22px; width: auto; display: block; }
.marca img.marca-icone { display: none; width: 30px; height: 30px; border-radius: 8px; }
.marca .nome { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nav-ink-muted); }

.lateral .novo-menu { margin: 0 0 10px; position: relative; }
.lateral .novo-menu > summary { width: 100%; justify-content: center; height: var(--control-h); }
.lateral .novo-menu[open] > .painel-menu { display: block; position: absolute; left: 0; top: calc(100% + 6px); z-index: 50; min-width: 250px; }
.lateral .grupo { color: var(--nav-ink-muted); padding: 14px 12px 6px; white-space: nowrap; }
.lateral nav { display: flex; flex-direction: column; gap: 2px; }
.lateral nav a, .lateral .rodape-lateral button {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: auto;
  padding: 9px 14px; border-radius: var(--radius-pill); border: 0; background: none; justify-content: flex-start;
  color: var(--nav-ink-muted); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; text-align: left;
  transition: background .12s, color .12s;
}
.lateral nav a .ic, .lateral .rodape-lateral button .ic { width: 18px; height: 18px; color: currentColor; }
.lateral nav a:hover, .lateral .rodape-lateral button:hover { background: var(--nav-surface-active); color: var(--nav-ink); text-decoration: none; }
.lateral nav a.ativo { background: var(--nav-surface-active); color: var(--nav-ink); font-weight: 600; }
.lateral nav a.ativo::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; border-radius: 3px; background: var(--nav-indicator); }
.lateral nav a .badge { margin-left: auto; }
.lateral .rodape-lateral { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--nav-border); display: flex; flex-direction: column; gap: 2px; }
.lateral .rodape-lateral form { display: contents; }
.lateral .recolher { color: var(--nav-ink-muted) !important; }
.lateral :focus-visible { outline-color: var(--nav-indicator); }

/* recolhido: só ícones */
.app.recolhido { grid-template-columns: 72px minmax(0, 1fr); }
.app.recolhido .lateral { padding-left: 10px; padding-right: 10px; }
.app.recolhido .lateral .rotulo-menu, .app.recolhido .lateral .grupo, .app.recolhido .lateral .marca .nome,
.app.recolhido .lateral .novo-menu .rotulo-menu, .app.recolhido .marca img.marca-larga { display: none; }
.app.recolhido .marca img.marca-icone { display: block; }
.app.recolhido .lateral .marca { align-items: center; padding: 0 0 14px; }
.app.recolhido .lateral .grupo { display: block; height: 12px; padding: 0; margin: 8px 10px 4px; font-size: 0; border-top: 1px solid var(--nav-border); }
.app.recolhido .lateral nav a, .app.recolhido .lateral .rodape-lateral button { justify-content: center; padding: 10px 0; }
.app.recolhido .lateral nav a .badge { position: absolute; top: 2px; right: 6px; height: 17px; min-width: 17px; font-size: 10px; padding: 0 4px; }
.app.recolhido .lateral .novo-menu > summary { padding: 0; }
.app.recolhido .recolher .ic { transform: rotate(180deg); }

.topo-celular { display: none; }
.conteudo { min-width: 0; }
.conteudo > .wrap { max-width: 1320px; margin: 0 auto; padding: var(--page-pad) var(--page-pad) 80px; }
.migalha { font-size: 12.5px; color: var(--muted-foreground); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.migalha a { color: var(--muted-foreground); }

/* menu flutuante (botão Novo) */
.painel-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 250px; padding: 6px;
  background: var(--popover); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-menu); color: var(--foreground);
}
.painel-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--foreground); font-weight: 500; font-size: 14px; }
.painel-menu a:hover { background: var(--panel); text-decoration: none; }
.painel-menu a .ic { color: var(--muted-foreground); width: 17px; height: 17px; }
.novo-menu > summary { list-style: none; }
.novo-menu > summary::-webkit-details-marker { display: none; }
.botao-icone { position: relative; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 0; background: none; color: var(--foreground); display: grid; place-items: center; }
.botao-icone:hover { background: var(--panel); text-decoration: none; }
.botao-icone .badge { position: absolute; top: 1px; right: -1px; }

/* ------------------------------------------------------------ cabeçalho de página (Topbar) */

.cabecalho { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cabecalho .sub { color: var(--muted-foreground); margin-top: 4px; font-size: 14px; }
.cabecalho .acoes { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ cartões */

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.card.pad { padding: var(--card-pad); }
.card-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--card-pad); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-cab .sub { color: var(--muted-foreground); font-size: 12.5px; margin-top: 2px; }
.card-corpo { padding: var(--card-pad); }
.card-rodape { padding: 12px var(--card-pad); border-top: 1px solid var(--border); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mb { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.mt { margin-top: 16px; }

/* KPI (StatCard): overline, número em Sora tabular, âncora em caption */
.kpi { padding: 16px var(--card-pad) 18px; display: flex; flex-direction: column; gap: 10px; }
.kpi .topo { display: flex; align-items: center; justify-content: space-between; color: var(--muted-foreground); }
.kpi .val { font-family: var(--font-display); font-size: 23px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi .rodape { font-size: 12px; line-height: 18px; color: var(--muted-foreground); }
.chip { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.chip .ic { width: 16px; height: 16px; }
.chip.brand { background: var(--accent); color: var(--accent-foreground); }
.chip.pos { background: var(--status-ok-soft); color: var(--status-ok); }
.chip.neg { background: var(--status-error-soft); color: var(--status-error); }
.chip.warn { background: var(--status-warn-soft); color: var(--status-warn); }

/* ------------------------------------------------------------ botões (pílula) */

.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h); padding: 0 16px; border-radius: var(--radius-pill);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  color: var(--foreground); background: var(--card); border: 1px solid var(--input);
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover, button:hover { background: var(--panel); text-decoration: none; }
.btn .ic, button .ic { width: 16px; height: 16px; }
.primario { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.primario:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.fantasma { background: transparent; border-color: transparent; color: var(--muted-foreground); }
.fantasma:hover { background: var(--panel); color: var(--foreground); }
.perigo { color: var(--destructive); }
.perigo:hover { background: var(--status-error-soft); border-color: var(--status-error-soft); }
.peq { height: var(--control-h-sm); padding: 0 12px; font-size: 13px; }
.icone-so { width: var(--control-h-sm); padding: 0; }
.bloco { width: 100%; }
form.inline { display: inline; }
.acoes { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
td.acoes { display: table-cell; text-align: right; white-space: nowrap; width: 1%; }
td.acoes > * + * { margin-left: 6px; }
td.acoes details { display: inline-block; position: relative; vertical-align: middle; }
td.acoes details > .painel { position: absolute; right: 0; top: 40px; z-index: 15; width: 340px; background: var(--popover); box-shadow: var(--shadow-menu); }
td.acoes details > summary.btn { border-color: transparent; }

/* ------------------------------------------------------------ formulários (Field) */

label { display: block; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--foreground); margin-bottom: 6px; }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--foreground);
  background: var(--background); border: 1px solid var(--input); border-radius: var(--radius-sm);
  height: var(--control-h); padding: 0 12px; min-width: 0; width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 9px 12px; resize: vertical; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2356636f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:hover, select:hover, textarea:hover { border-color: var(--muted-foreground); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ring); outline-offset: 1px; border-color: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand-navy); padding: 0; margin: 0 8px 0 0; flex: none; }
input[type="file"] { padding: 5px; height: auto; }
input[type="file"]::file-selector-button { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--input); background: var(--card); color: var(--foreground); border-radius: var(--radius-pill); padding: 5px 12px; margin-right: 10px; cursor: pointer; }
.campo { margin-bottom: 16px; }
.ajuda { font-size: 12px; line-height: 18px; color: var(--muted-foreground); margin-top: 6px; }
.linha { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.linha > * { flex: 1 1 160px; min-width: 0; }
.linha > .fixo { flex: 0 0 auto; }
.check { display: flex; align-items: center; font-weight: 500; margin: 0; cursor: pointer; color: var(--foreground); }
.com-icone { position: relative; }
.com-icone .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; width: 16px; height: 16px; }
.com-icone input { padding-left: 38px; }
.prefixo { position: relative; }
.prefixo span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); font-size: 14px; pointer-events: none; }
.prefixo input { padding-left: 38px; font-variant-numeric: tabular-nums; }
.secao-form { padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--border); }
.secao-form h3 { margin-bottom: 14px; }

/* ------------------------------------------------------------ filtros, período e abas */

.barra { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.barra > input, .barra > select { width: auto; }
.barra .com-icone { flex: 1 1 220px; }
.barra .sub { color: var(--muted-foreground); font-size: 13.5px; }
.segmento { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel); border-radius: var(--radius-pill); flex-wrap: wrap; align-items: center; }
.segmento a { padding: 6px 14px; border-radius: var(--radius-pill); color: var(--muted-foreground); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; line-height: 18px; }
.segmento a:hover { color: var(--foreground); text-decoration: none; }
.segmento a.ativo { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-card); }
.segmento a.periodo { color: var(--foreground); font-family: var(--font-display); font-weight: 600; min-width: 160px; justify-content: center; }
.segmento a.periodo:hover { color: var(--foreground); }
.segmento .cont { font-size: 11px; font-weight: 700; background: var(--card); color: var(--foreground); padding: 1px 7px; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.segmento a.ativo .cont { background: var(--accent); color: var(--accent-foreground); border-color: transparent; }

/* ------------------------------------------------------------ tabelas (DataTable) */

.tabela { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted-foreground); padding: 12px 16px; border-bottom: 1px solid var(--border); background: transparent; white-space: nowrap; }
td { padding: 10px 16px; height: var(--row-h); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface); }
th.num, td.num { text-align: right; }
td.num, .c-valor { font-variant-numeric: tabular-nums; font-weight: 500; }
td .titulo { font-weight: 600; color: var(--foreground); }
td a.titulo:hover { color: var(--accent-foreground); }
td .sub { font-size: 12px; line-height: 18px; color: var(--muted-foreground); margin-top: 1px; }
tfoot td, tfoot th { font-weight: 600; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 0; text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--foreground); padding: 11px 16px; height: auto; }
.card > .tabela:last-child tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
.card > .tabela:last-child tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }
.data { display: flex; flex-direction: column; line-height: 1.25; }
.data .d { font-weight: 600; font-variant-numeric: tabular-nums; }
.data .s { font-size: 12px; color: var(--muted-foreground); }
.linha-tabela-acoes { opacity: .5; transition: opacity .12s; }
tr:hover .linha-tabela-acoes { opacity: 1; }
tr:has(> td.grupo-tabela) { background: var(--surface); }
td.grupo-tabela { padding: 8px 16px; height: auto; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); }
td.grupo-tabela strong { font-weight: 700; }
td.sel, th.sel { width: 36px; padding-right: 0; }
td.sel input, th.sel input { margin: 0; }

/* ------------------------------------------------------------ selos (Badge): pílula, ponto e palavra */

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: var(--radius-pill); font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; background: var(--status-neutral-soft); color: var(--status-neutral); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.sem-ponto { padding: 2px 10px; }
.pill.sem-ponto::before { display: none; }
.pill.ok { background: var(--status-ok-soft); color: var(--status-ok); }
.pill.info { background: var(--status-info-soft); color: var(--status-info); }
.pill.azul { background: var(--status-info-soft); color: var(--status-info); }
.pill.erro { background: var(--status-error-soft); color: var(--status-error); }
.pill.alerta { background: var(--status-warn-soft); color: var(--status-warn); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--primary); color: var(--primary-foreground); font-size: 11px; font-weight: 700; line-height: 1; }

/* ------------------------------------------------------------ avisos (Alert) e mensagens */

.aviso { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--radius); background: var(--status-warn-soft); color: var(--status-warn); border: 1px solid color-mix(in srgb, var(--status-warn) 22%, transparent); font-weight: 500; margin-bottom: 16px; flex-wrap: wrap; }
.aviso.info { background: var(--status-info-soft); color: var(--status-info); border-color: color-mix(in srgb, var(--status-info) 22%, transparent); }
.aviso .ic { flex: none; }
.aviso > span { flex: 1 1 240px; min-width: 0; }
.aviso a { color: inherit; font-weight: 700; }
.aviso .acao { margin-left: auto; }
.aviso form.inline { margin-left: auto; }

.toasts { position: fixed; top: 20px; right: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(440px, calc(100vw - 32px));
  pointer-events: none; }  /* a caixa das mensagens nunca segura clique: só a mensagem visível (botão fechar) */
.toasts .toast { pointer-events: auto; }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: var(--radius);
  background: var(--popover); border: 1px solid var(--border); box-shadow: var(--shadow-menu); font-weight: 500; font-size: 13.5px;
  animation: entra .2s ease-out, sai .3s ease-in 8s forwards;
}
.toast > .ic { color: var(--status-ok); margin-top: 1px; }
.toast.erro > .ic { color: var(--status-error); }
.toast.erro { animation: entra .2s ease-out; }
.toast button { height: 22px; width: 22px; padding: 0; border: 0; margin-left: auto; color: var(--muted-foreground); background: none; flex: none; }
@keyframes entra { from { opacity: 0; transform: translateY(-6px); } }
@keyframes sai { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.vazio { text-align: center; padding: 56px 24px 52px; color: var(--muted-foreground); max-width: 520px; margin: 0 auto; }
.vazio .circ { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; margin: 0 auto 16px; color: var(--accent-foreground); }
.vazio .circ .ic { width: 26px; height: 26px; }
.vazio .circ.ok { background: var(--status-ok-soft); color: var(--status-ok); }
.vazio strong { display: block; color: var(--foreground); font-family: var(--font-display); font-size: 17px; line-height: 24px; font-weight: 600; margin-bottom: 4px; }
.vazio p { font-size: 14px; line-height: 22px; }
.vazio-acoes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ------------------------------------------------------------ itens em lista (extrato, documentos) */

.item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 18px; margin-bottom: 12px; }
.item .cab { display: flex; gap: 14px; align-items: center; }
.item .cab .info { flex: 1; min-width: 0; }
.item .cab .titulo { font-weight: 600; overflow-wrap: anywhere; }
.item .cab .meta { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; overflow-wrap: anywhere; }
.item .valor { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--panel); color: var(--muted-foreground); }
.avatar.pos { background: var(--status-ok-soft); color: var(--status-ok); }
.avatar.neg { background: var(--status-error-soft); color: var(--status-error); }
.avatar.brand { background: var(--accent); color: var(--accent-foreground); }
.avatar.warn { background: var(--status-warn-soft); color: var(--status-warn); }

.sugestao { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-top: 10px; flex-wrap: wrap; }
.sugestao.melhor { border-color: color-mix(in srgb, var(--accent-foreground) 35%, var(--border)); background: var(--accent); }
.sugestao .info { flex: 1; min-width: 200px; }
.medidor { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); }
.medidor i { display: inline-block; width: 44px; height: 5px; border-radius: 9px; background: var(--border); overflow: hidden; position: relative; }
.medidor i b { position: absolute; inset: 0 auto 0 0; background: var(--brand-navy); border-radius: 9px; }

.lista-resumo { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lista-resumo li { display: flex; gap: 8px; align-items: flex-start; color: var(--foreground); font-size: 13.5px; }
.lista-resumo li .ic { color: var(--status-ok); margin-top: 2px; width: 15px; height: 15px; }
.nota-alerta { display: flex; gap: 10px; align-items: flex-start; background: var(--status-warn-soft); color: var(--status-warn); padding: 10px 12px; border-radius: var(--radius-sm); margin-top: 12px; font-size: 13.5px; font-weight: 500; white-space: pre-line; }
.nota-alerta .ic { margin-top: 1px; width: 16px; height: 16px; }
.mini-tabela { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.mini-tabela td { padding: 8px 12px; font-size: 13.5px; height: auto; }
.mini-tabela tbody tr:hover { background: none; }
.rodape-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.rodape-item .anexos { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.anexo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-pill); background: var(--panel); color: var(--foreground); font-size: 12.5px; font-weight: 500; }
.anexo:hover { background: var(--accent); color: var(--accent-foreground); text-decoration: none; }
.anexo .ic { width: 14px; height: 14px; }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.expansor { margin-top: 12px; }
.expansor > summary { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent-foreground); }
.painel { margin-top: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }

/* gráfico */
.grafico { position: relative; height: 260px; }
.legenda { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted-foreground); flex-wrap: wrap; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* barra de proporção (categorias) */
.prop { height: 6px; border-radius: 9px; background: var(--panel); overflow: hidden; margin-top: 7px; }
.prop b { display: block; height: 100%; border-radius: 9px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--nav-surface); }
.login .card { width: 100%; max-width: 380px; padding: 32px; }

/* ------------------------------------------------------------ quadros de resumo das listas (abas com número) */

.quadros { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: 16px; }
.quadro { display: block; padding: 16px 20px 18px; color: var(--foreground); position: relative; transition: background .12s; }
.quadro + .quadro { border-left: 1px solid var(--border); }
.quadro:hover { background: var(--surface); text-decoration: none; }
.quadro .rot { color: var(--muted-foreground); display: flex; align-items: center; gap: 7px; }
.quadro .rot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cor, var(--input)); flex: none; }
.quadro .val { font-family: var(--font-display); font-size: 19px; line-height: 26px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.quadro .val.zero { color: var(--muted-foreground); font-weight: 500; }
.quadro.vencidos .val.com-contas { color: var(--status-error); }
.quadro.hoje .val.com-contas { color: var(--status-warn); }
.quadro.a-vencer .val.com-contas { color: var(--status-info); }
.quadro.pagos .val.com-contas { color: var(--status-ok); }
.quadro .qtd { font-size: 12px; line-height: 18px; color: var(--muted-foreground); margin-top: 2px; }
.quadro.ativo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--nav-indicator); }
.quadro.vencidos { --cor: var(--status-error); }
.quadro.hoje { --cor: var(--status-warn); }
.quadro.a-vencer { --cor: var(--status-info); }
.quadro.pagos { --cor: var(--status-ok); }
.quadro.total { --cor: var(--brand-navy); }
.quadro.aberto { --cor: var(--brand-coral, var(--nav-indicator)); }

/* barra de ações em massa */
.selecao { position: sticky; bottom: 16px; z-index: 30; display: none; align-items: center; gap: 14px; margin-top: 12px;
  background: var(--nav-surface); color: var(--nav-ink); padding: 10px 12px 10px 18px; border-radius: var(--radius); box-shadow: var(--shadow-menu); }
.selecao.visivel { display: flex; }
.selecao .info { margin-right: auto; font-weight: 600; }
.selecao input { width: 160px; height: 34px; background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .25); color: #fff; color-scheme: dark; }
.selecao button.primario { height: 34px; }
.selecao button.fantasma { color: var(--nav-ink-muted); height: 34px; }
.selecao button.fantasma:hover { background: var(--nav-surface-active); color: var(--nav-ink); }

/* painéis do início: a receber / a pagar */
.painel-contas .cab-cor { display: flex; align-items: center; gap: 10px; padding: 14px var(--card-pad); border-bottom: 1px solid var(--border); }
.painel-contas .cab-cor h2 { margin-right: auto; }
.painel-contas .mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.painel-contas .mini a { padding: 12px var(--card-pad); color: var(--foreground); }
.painel-contas .mini a + a { border-left: 1px solid var(--border); }
.painel-contas .mini a:hover { background: var(--surface); text-decoration: none; }
.painel-contas .mini .rot { color: var(--muted-foreground); display: flex; align-items: center; gap: 7px; }
.painel-contas .mini .rot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cor, var(--input)); flex: none; }
.painel-contas .mini .val { font-family: var(--font-display); font-size: 17px; line-height: 24px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.painel-contas .lista { max-height: 340px; overflow-y: auto; }
.painel-contas .lista table { table-layout: fixed; }
.painel-contas .lista table td { padding: 9px var(--card-pad); overflow-wrap: anywhere; }
.painel-contas .lista table td.num { width: 1%; min-width: 110px; }

/* ------------------------------------------------------------ revisão de lote */

.editor td { padding: 6px 8px; height: auto; }
.editor th { padding: 10px 8px; }
.editor td:first-child, .editor th:first-child { padding-left: 16px; }
.editor td:last-child, .editor th:last-child { padding-right: 12px; }
.editor input, .editor select { height: 34px; font-size: 13.5px; border-color: transparent; background: transparent; padding: 0 8px; }
.editor select { padding-right: 28px; background-position: right 6px center; }
.editor tr:hover input, .editor tr:hover select, .editor input:focus, .editor select:focus { border-color: var(--input); background: var(--card); }
.editor .valor-in { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.editor tr.sem-categoria select.cat-in { border-color: color-mix(in srgb, var(--status-warn) 50%, transparent); background: var(--status-warn-soft); }
.editor tr.negativo .valor-in { color: var(--status-ok); }
.editor .data-in { width: 128px; }
.editor .parcela { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.barra-fixa {
  position: sticky; bottom: 0; z-index: 10; margin: 16px -1px -1px; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
}
.barra-fixa .somas { display: flex; gap: 24px; flex-wrap: wrap; margin-right: auto; }
.barra-fixa .somas div { display: flex; flex-direction: column; }
.barra-fixa .somas span { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); }
.barra-fixa .somas strong { font-family: var(--font-display); font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 600; }
.cat-lista { display: flex; flex-direction: column; gap: 12px; }

/* ------------------------------------------------------------ responsivo */

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1 { grid-template-columns: 1fr; }
  .grid[style*="0.8fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 860px) {
  .app, .app.recolhido { grid-template-columns: 1fr; }
  .lateral { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-menu); }
  .app.menu-aberto .lateral { transform: none; }
  .app.menu-aberto::after { content: ""; position: fixed; inset: 0; background: var(--overlay); z-index: 55; }
  .lateral .recolher { display: none !important; }
  .topo-celular { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; height: 56px; padding: 0 12px;
    background: var(--nav-surface); color: var(--nav-ink); }
  .topo-celular .marca { margin: 0; display: flex; align-items: center; color: var(--nav-ink); }
  .topo-celular .marca img.marca-larga { height: 20px; }
  .topo-celular .marca .nome { display: none; }
  .topo-celular .botao-icone { color: var(--nav-ink); }
  .topo-celular .botao-icone:hover { background: var(--nav-surface-active); }
  .topo-celular .direita-topo { margin-left: auto; display: flex; gap: 4px; }

  body { overflow-x: hidden; }
  .conteudo > .wrap { padding: 16px 16px 72px; }
  .cabecalho .acoes { width: 100%; }
  .cabecalho .acoes > * { flex: 1 1 auto; min-width: 0; white-space: normal; height: auto; min-height: var(--control-h); padding: 8px 14px; line-height: 1.2; }
  .painel-contas .mini a { padding: 10px 12px; }
  .painel-contas .mini .val { font-size: 15px; line-height: 20px; }
  .painel-contas .mini .rot { font-size: 10px; letter-spacing: .08em; }
  /* listas do início viram linhas: data | descrição | valor */
  .painel-contas .lista table, .painel-contas .lista tbody { display: block; }
  .painel-contas .lista tbody tr { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; column-gap: 10px; align-items: start; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .painel-contas .lista tbody tr:last-child { border-bottom: 0; }
  .painel-contas .lista table td { display: block; padding: 0; border: 0; height: auto; width: auto !important; min-width: 0; }
  .painel-contas .lista table td.num { text-align: right; }
  .barra .sub { flex: 1 1 100%; }
  h1 { font-size: 21px; line-height: 26px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .cabecalho { margin-bottom: 18px; align-items: flex-start; }
  .esconde-mobile { display: none !important; }
  td.acoes .rotulo { display: none; }
  td.acoes button.peq { width: 34px; padding: 0; }
  .lista-mobile thead { display: none; }
  .lista-mobile tbody tr { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "data desc valor" "data desc acao"; column-gap: 12px; row-gap: 6px; padding: 14px 14px; border-bottom: 1px solid var(--border); }
  .lista-mobile tbody tr:last-child { border-bottom: 0; }
  .lista-mobile td { padding: 0; border: 0; height: auto; }
  .lista-mobile .c-data { grid-area: data; }
  .lista-mobile .c-desc { grid-area: desc; min-width: 0; }
  .lista-mobile .c-valor { grid-area: valor; text-align: right; }
  .lista-mobile td.acoes { grid-area: acao; display: block; width: auto; justify-self: end; }
  .aviso { padding: 10px 12px; gap: 8px 10px; font-size: 13.5px; }
  .aviso > span { flex: 1 1 200px; }
  .aviso .acao { margin-left: 0; }
  th, td { padding-left: 12px; padding-right: 12px; }
  .kpi .val { font-size: 22px; line-height: 28px; }
  .item { padding: 14px; }
  .toasts { top: auto; bottom: 16px; right: 16px; left: 16px; max-width: none; }
  .quadros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quadro + .quadro { border-left: 0; }
  .quadro { border-bottom: 1px solid var(--border); }
  .selecao { flex-wrap: wrap; }
  .editor thead { display: none; }
  .editor tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 6px 8px; padding: 12px; border-bottom: 1px solid var(--border); }
  .editor td { padding: 0 !important; border: 0; }
  .editor td.acoes { grid-column: 2; grid-row: 1; text-align: right; width: auto; }
  .editor td.c-data, .editor td.c-cli { grid-column: 1; grid-row: 1; }
  .editor td.c-desc, .editor td.c-ref, .editor td.c-proj { grid-column: 1 / -1; }
  .editor input, .editor select { border-color: var(--input); background: var(--card); }
  .editor .data-in { width: 100%; }
  .barra-fixa { bottom: 0; gap: 10px; padding: 12px 14px; }
  .barra-fixa .somas { gap: 14px; width: 100%; }
  .barra-fixa .somas strong { font-size: 15px; }
  .barra-fixa button { flex: 1; }
}

@media (max-width: 520px) {
  .g3.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .g3.kpis .kpi { padding: 12px; gap: 4px; }
  .g3.kpis .kpi .val { font-size: 15px; line-height: 20px; }
  .g3.kpis .kpi .topo { font-size: 10px; letter-spacing: .08em; }
  .g3.kpis .kpi .chip, .g3.kpis .kpi .rodape { display: none; }
  td.acoes details > .painel { position: fixed; left: 12px; right: 12px; top: 80px; width: auto; min-width: 0 !important; max-height: 80vh; overflow-y: auto; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .g4 .kpi { padding: 14px; gap: 6px; }
  .g4 .kpi .val { font-size: 18px; line-height: 24px; }
  .g4 .kpi .chip { display: none; }
  .barra > input, .barra > select { flex: 1 1 140px; }
}

@media (min-width: 861px) { .so-mobile { display: none !important; } }

button.copiado { color: var(--status-ok) !important; background: var(--status-ok-soft) !important; }

/* janela de confirmação (excluir, enviar, desfazer) */
dialog.confirmar { border: 0; padding: 0; border-radius: var(--radius); box-shadow: var(--shadow-menu); width: min(560px, calc(100vw - 32px)); background: var(--card); color: var(--foreground); }
dialog.confirmar::backdrop { background: rgb(3 22 48 / 0.45); }
.confirmar-cab { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.confirmar-cab h2 { font-size: 20px; margin: 0; }
.confirmar-corpo { padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.confirmar-corpo p { margin: 0; line-height: 1.5; }
.confirmar-rodape { display: flex; justify-content: space-between; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--border); }
button.perigo-cheio { background: var(--status-error); border-color: var(--status-error); color: #fff; font-weight: 600; }
button.perigo-cheio:disabled { opacity: .45; cursor: not-allowed; }

/* lista de contas do início: fechada até clicar */
.lista-dobravel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px var(--card-pad); color: var(--muted-foreground); font-size: 13px; font-weight: 600; }
.lista-dobravel > summary::-webkit-details-marker { display: none; }
.lista-dobravel > summary:hover { background: var(--surface); color: var(--foreground); }
.lista-dobravel > summary .ic { transition: transform .15s; }
.lista-dobravel[open] > summary .ic { transform: rotate(180deg); }
.lista-dobravel[open] > summary { border-bottom: 1px solid var(--border); }

/* "Mais filtros" da lista de contas: abre por cima da lista */
.filtros-mais { position: relative; }
.filtros-mais > summary { list-style: none; }
.filtros-mais > summary::-webkit-details-marker { display: none; }
.filtros-mais > .painel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(620px, 92vw); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-menu); padding: 14px 16px; }

/* ------------------------------------------------------------ campo de data (static/datas.js) */
input.campo-data {
  padding-right: 34px; font-variant-numeric: tabular-nums;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2356636f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; cursor: pointer;
}
input.campo-data:focus { cursor: text; }
.calendario {
  position: fixed; z-index: 60; width: 272px; padding: 12px; background: var(--popover);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-menu);
  font-family: var(--font-body); color: var(--foreground); user-select: none;
}
.calendario button { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; }
.calendario .cal-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendario .cal-titulo { font-family: var(--font-display); font-weight: 600; font-size: 14px; text-transform: capitalize; }
.calendario .cal-titulo span { color: var(--muted-foreground); font-weight: 500; }
.calendario .cal-nav { width: 30px; height: 30px; border-radius: var(--radius-pill); font-size: 20px; line-height: 28px; color: var(--muted-foreground); }
.calendario .cal-nav:hover { background: var(--panel); color: var(--foreground); }
.calendario .cal-semana, .calendario .cal-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendario .cal-semana span { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted-foreground); padding: 4px 0; }
.calendario .cal-dias button { height: 34px; border-radius: var(--radius-pill); font-size: 13px; font-variant-numeric: tabular-nums; }
.calendario .cal-dias button:hover { background: var(--panel); }
.calendario .cal-dias button.fora { color: var(--input); }
.calendario .cal-dias button.hoje { box-shadow: inset 0 0 0 1.5px var(--brand-laranja); font-weight: 700; }
.calendario .cal-dias button.sel { background: var(--brand-navy); color: #fff; font-weight: 700; box-shadow: none; }
.calendario .cal-rodape { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.calendario .cal-rodape button { padding: 5px 10px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--accent-foreground); }
.calendario .cal-rodape button:hover { background: var(--accent); }
.calendario .cal-rodape .cal-limpar { color: var(--muted-foreground); }
.calendario .cal-rodape .cal-limpar:hover { background: var(--panel); }

/* ------------------------------------------------------------ escolha em segmentos (situação do lançamento) */
.segmento.escolha { margin-bottom: 4px; }
.segmento.escolha label { margin: 0; padding: 7px 16px; border-radius: var(--radius-pill); color: var(--muted-foreground); font-weight: 600; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; line-height: 18px; }
.segmento.escolha label:hover { color: var(--foreground); }
.segmento.escolha input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.segmento.escolha label:has(input:checked) { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-card); }
.segmento.escolha label:has(input[value="pago"]:checked) { background: var(--status-ok-soft); color: var(--status-ok); }
.segmento.escolha label:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 1px; }
.situacao > label { display: block; }
.situacao .campos-pago { margin-top: 12px; align-items: flex-start; }
.situacao .campos-pago[hidden] { display: none; }

/* ------------------------------------------------------------ contas captadas × confirmadas */
.quadros.seis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 860px) { .quadros.seis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quadro.confirmar { --cor: var(--status-attention); }
.quadro.confirmar .val.com-contas { color: var(--status-attention); }
.pill.atencao { background: var(--status-attention-soft); color: var(--status-attention); }
button.confirmar, .btn.confirmar { border-color: var(--status-attention); color: var(--status-attention); }
button.confirmar:hover, .btn.confirmar:hover { background: var(--status-attention-soft); }
.a-confirmar-aviso { display: flex; align-items: center; gap: 10px; padding: 10px var(--card-pad); background: var(--status-attention-soft);
  color: var(--status-attention); font-size: 13px; border-bottom: 1px solid var(--border); }
.a-confirmar-aviso strong { font-weight: 700; }
.a-confirmar-aviso a { margin-left: auto; font-weight: 700; color: var(--status-attention); white-space: nowrap; }
.segmento.escolha label:has(input[value="captado"]:checked) { background: var(--status-attention-soft); color: var(--status-attention); }
summary.resumo-dados { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted-foreground); }
summary.resumo-dados::-webkit-details-marker { display: none; }
summary.resumo-dados u { color: var(--accent-foreground); font-weight: 600; text-decoration: none; }
details[open] > summary.resumo-dados { margin-bottom: 12px; }
/* o aceite de exclusão só aparece em ação perigosa (o display do label.check anulava o [hidden]) */
#confirmar-aceite[hidden] { display: none; }

/* ------------------------------------------------------------ escala geral (o Arthur achou tudo grande: 80%) */
:root { --escala: 0.8; }
html { zoom: var(--escala); }
/* com zoom, 100vh encolhe junto: compensa para o menu e a página irem até o fim da tela */
.app { min-height: calc(100vh / var(--escala)); }
.lateral { height: calc(100vh / var(--escala)); }
.login { min-height: calc(100vh / var(--escala)); }
.item.doc .lancar-doc { margin: 10px 0 4px; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }

/* ------------------------------------------------------------ pizza (rosca) de partes de um todo */
.pizza { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pizza-grafico { position: relative; width: 210px; height: 210px; flex: none; }
.pizza-centro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.pizza-centro strong { font-family: var(--font-display); font-size: 14px; }
.pizza-legenda { flex: 1; min-width: 220px; border-collapse: collapse; }
.pizza-legenda td { padding: 9px 6px; border-bottom: 1px solid var(--border); }
.pizza-legenda tr:last-child td { border-bottom: 0; }
.pizza-legenda .ponto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.pizza-legenda tr { transition: background .12s; }
.pizza-legenda tr.ativo td { background: var(--surface); }
.pizza-legenda tr.ativo td:first-child { font-weight: 700; }

/* "Não esqueça" recolhível no início */
details.nao-esqueca > summary { cursor: pointer; list-style: none; }
details.nao-esqueca > summary::-webkit-details-marker { display: none; }
details.nao-esqueca:not([open]) > summary { border-bottom: 0; }
details.nao-esqueca h2 .badge { position: static; display: inline-flex; vertical-align: 2px; margin-left: 6px; background: var(--warn, var(--status-warn)); color: #fff; }
details.nao-esqueca .abrir { color: var(--muted-foreground); transition: transform .15s; }
details.nao-esqueca[open] .abrir { transform: rotate(180deg); }
a.card.clicavel { display: block; color: inherit; transition: box-shadow .12s, transform .12s; }
a.card.clicavel:hover { text-decoration: none; box-shadow: var(--shadow-menu); }
a.card.clicavel .link { color: var(--accent-foreground); font-weight: 700; }
.item.sem-cliente { padding: 14px var(--card-pad); border-bottom: 1px solid var(--border); }
.item.sem-cliente:last-child { border-bottom: 0; }
.acoes-sem-cliente { margin-top: 10px; gap: 10px; align-items: flex-start; }
.acoes-sem-cliente details.dividir > summary { list-style: none; cursor: pointer; display: inline-flex; }
.acoes-sem-cliente details.dividir > summary::-webkit-details-marker { display: none; }
.acoes-sem-cliente details.dividir[open] { flex-basis: 100%; }
.form-dividir { margin-top: 10px; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
/* ajustes da tela "Recebimentos sem cliente": tudo compacto, numa linha */
.acoes-sem-cliente { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acoes-sem-cliente.linha > *, .form-dividir .linha > * { flex: none; }
.acoes-sem-cliente form.inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acoes-sem-cliente select, .form-dividir select { width: auto; min-width: 230px; }
.acoes-sem-cliente select[name=tipo], .form-dividir select[name=tipo] { min-width: 150px; }
.form-dividir .prefixo { width: 160px; }
.form-dividir .soma { margin-left: 4px; }
.form-dividir .linha > button.primario { margin-left: auto; }
#demonstrativo { scroll-margin-top: 16px; }
.selecao select { height: 34px; background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .25); color: #fff; color-scheme: dark; }
.selecao button.fantasma-claro { height: 34px; background: transparent; color: #fff; border-color: rgb(255 255 255 / .35); }
.selecao button.fantasma-claro:hover { background: rgb(255 255 255 / .1); }
.selecao .separa { width: 1px; height: 22px; background: rgb(255 255 255 / .2); }

/* quadro de confirmar pagamento */
#pagar-dlg .confirmar-corpo .campo { margin-bottom: 12px; }
#pagar-dlg .confirmar-corpo .campo:last-child { margin-bottom: 0; }
#pagar-dlg .campo[hidden] { display: none; }
/* conciliação: em vez de "87%", quanto a sugestão é provável, em palavras */
.confianca { font-size: 12px; font-weight: 600; white-space: nowrap; padding: 2px 10px; border-radius: var(--radius-pill); }
.confianca.alta { background: var(--status-ok-soft); color: var(--status-ok); }
.confianca.media { background: var(--status-neutral-soft); color: var(--status-neutral); }
.confianca.baixa { background: none; color: var(--muted-foreground); border: 1px dashed var(--border); }
/* cartão "por nota fiscal": a nota e todos os recebimentos dela */
.item.por-nota { border-color: var(--status-info); }
.recebimentos-nota { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.recebimentos-nota td { padding: 6px 8px; border-top: 1px solid var(--border); vertical-align: middle; }
.recebimentos-nota td.num { text-align: right; }
.recebimentos-nota td.nowrap { white-space: nowrap; }
.recebimentos-nota tr.historico td, .recebimentos-nota tr.conciliado td { color: var(--muted-foreground); }
.recebimentos-nota tr.agora td { font-weight: 600; }
.recebimentos-nota tr.agora td { background: var(--status-info-soft); }
.recebimentos-nota tr.total td { font-weight: 700; border-top: 2px solid var(--border); color: var(--foreground); }
.recebimentos-nota td:first-child { width: 52px; }

/* ---------- conciliação lado a lado (banco | botão | Financeiro), como no Conta Azul ---------- */
.conc-filtros { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.busca-conc { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; max-width: 460px; color: var(--muted-foreground); }
.busca-conc input { border: 0; box-shadow: none; background: none; padding: 9px 0; }
.busca-conc input:focus { outline: none; }
.conc-abas { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.conc-abas button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 6px; font-size: 13px; color: var(--muted-foreground); border-bottom: 3px solid transparent; }
.conc-abas button + button { border-left: 1px solid var(--border); }
.conc-abas button b { font-size: 18px; color: var(--foreground); }
.conc-abas button b.pos { color: var(--status-ok); }
.conc-abas button b.neg { color: var(--status-critical, #b42318); }
.conc-abas button.ativo { color: var(--foreground); border-bottom-color: var(--brand-navy); background: var(--muted, #f6f7f9); }

.conc-colunas { display: grid; grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1.25fr); gap: 14px; font-weight: 700; font-size: 14px; margin: 6px 0 8px; }
.conc-colunas > div { display: flex; align-items: center; gap: 6px; }
.conc-par { display: grid; grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1.25fr); gap: 14px; align-items: stretch; margin-bottom: 14px; }
.conc-par[hidden] { display: none; }
.conc-banco, .conc-sistema { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); min-width: 0; }
.conc-banco { display: flex; flex-direction: column; }
.conc-banco-cab { display: flex; align-items: baseline; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.conc-banco-cab .num { font-size: 15px; }
.conc-banco-desc { padding: 12px 14px; font-size: 13px; flex: 1; overflow-wrap: anywhere; }
.conc-banco-pe { padding: 8px 14px; border-top: 1px solid var(--border); }
.conc-meio { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; }
.conc-encontramos { white-space: nowrap; }
.conc-botao { width: 100%; justify-content: center; padding: 10px 8px; }
.conc-sistema { padding: 12px 14px; }
.conc-abas-sis { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; width: fit-content; max-width: 100%; }
.conc-abas-sis button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; color: var(--muted-foreground); }
.conc-abas-sis button + button { border-left: 1px solid var(--border); }
.conc-abas-sis button.ativo { background: var(--brand-navy); color: #fff; }
.conc-opcao { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; font-weight: 400; }
.conc-opcao .info { flex: 1; min-width: 0; }
.conc-opcao input[type=radio] { width: auto; margin-top: 3px; }
.conc-opcao:has(input:checked) { border-color: var(--accent, #e8835a); background: var(--accent-soft, #fdf1ec); }
.conc-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.conc-campos .largo { grid-column: 1 / -1; }
.conc-mais { margin-top: 8px; }
.conc-mais button.link, .conc-sistema button.link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--accent-foreground, #b9532c); }
.conc-feito .small { margin-top: 2px; }
@media (max-width: 900px) {
  .conc-colunas { display: none; }
  .conc-par { grid-template-columns: 1fr; }
  .conc-meio { order: 3; }
}
/* campos da sugestão marcada, para acertar antes de conciliar */
.conc-editar { display: none; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: -2px 0 8px; padding: 10px; border: 1px solid var(--accent, #e8835a); border-top: 0; border-radius: 0 0 8px 8px; background: var(--card); }
.conc-editar .largo { grid-column: 1 / -1; }
.conc-opcao:has(input:checked) + .conc-editar { display: grid; }
.conc-opcao:has(input:checked):has(+ .conc-editar) { border-radius: 8px 8px 0 0; margin-bottom: 0; }
/* "Buscar lançamento": marcar uma ou várias contas, com a soma ao vivo */
.conc-busca-filtro { margin-bottom: 6px; }
.conc-busca-lista { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.conc-busca-grupo { position: sticky; top: 0; background: var(--muted, #f6f7f9); font-size: 11.5px; font-weight: 700; color: var(--muted-foreground); padding: 5px 10px; border-bottom: 1px solid var(--border); }
.conc-busca-item { display: grid; grid-template-columns: auto 44px 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; font-size: 12.5px; font-weight: 400; cursor: pointer; border-bottom: 1px solid var(--border); }
.conc-busca-item[hidden] { display: none; }
.conc-busca-item input { width: auto; margin: 0; }
.conc-busca-item .desc { min-width: 0; overflow-wrap: anywhere; }
.conc-busca-item.marcado { background: var(--accent-soft, #fdf1ec); }
.conc-busca-soma { margin-top: 6px; font-weight: 600; }
/* valor do banco ≠ valor da conta: líquido × bruto × retido */
.conc-dif { margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: var(--status-attention-soft, #fff4e5); color: var(--foreground); }
/* "Buscar lançamento" com valor diferente: confirmar o que é a diferença */
.conc-busca-dif { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--status-attention-soft, #fff4e5); }
.conc-busca-dif[hidden], .conc-busca-motivos label[hidden] { display: none; }
.conc-busca-motivos { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.conc-busca-motivos label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.conc-busca-motivos input { width: auto; margin: 0; }
.conc-busca-motivos label { margin: 0; line-height: 1.4; }
.conc-busca-motivos { flex-direction: column; gap: 4px; } .conc-busca-motivos label { min-height: 0; padding: 0; }
/* conciliação: a conta escolhida em laranja, para chamar atenção */
.contas-conc a.ativo { background: var(--primary); color: var(--primary-foreground); font-weight: 700; box-shadow: var(--shadow-card); }
.contas-conc a.ativo .cont { background: var(--primary-foreground); color: #fff; }
.contas-conc a:not(.ativo) .cont { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
/* barra de seleção (fundo escuro): botão Excluir */
.selecao button.perigo-claro { background: transparent; border-color: rgba(255, 120, 120, .55); color: #ffb4b4; }
.selecao button.perigo-claro:hover { background: rgba(255, 120, 120, .15); }
/* extrato da operadora na tela de emissão: a 1ª coluna é o cliente (não a data) */
.extrato-op .recebimentos-nota td:first-child { width: auto; }

/* regra de emissão do tomador, à vista na tela de emissão */
.regra-tomador { margin: 0 0 12px; padding: 7px 10px; border-radius: 8px; background: var(--status-info-soft, #eef4fb); }

/* DRE */
.dre-tabela table { min-width: 900px; }
.dre-tabela .fixa { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 240px; }
.dre-tabela th.fixa { background: var(--surface, var(--card)); }
.dre-grupo td { font-weight: 700; border-top: 1px solid var(--border); }
.dre-categoria td.fixa { padding-left: 32px; color: var(--muted-foreground); }
.dre-categoria td { font-size: 13px; }
.dre-total td { font-weight: 700; background: var(--surface); }
.dre-total td.fixa { background: var(--surface); }
.dre-tabela .neg { color: var(--status-error); }
.so-grupos .dre-categoria { display: none; }
.dre-link { color: inherit; text-decoration: none; border-bottom: 1px dotted transparent; }
.dre-link:hover { text-decoration: none; border-bottom-color: currentColor; color: var(--accent-foreground); }
.painel-menu kbd { margin-left: auto; font-family: var(--font-body); font-size: 11px; color: var(--muted-foreground); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }
/* densidade (estudo de UX do Conta Azul, 06/11/2026): valor do quadro sem quebrar e linhas mais baixas */
.quadro .val { white-space: nowrap; }
.quadros.seis .quadro { padding: 14px 16px 15px; }
@media (max-width: 1280px) { .quadros.seis .quadro .val { font-size: 16.5px; } .quadros.seis .quadro .rot { font-size: 10px; letter-spacing: .08em; } }
td .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
td .sub .icone, td .sub svg { vertical-align: -2px; }
.c-cat span { display: block; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-desc .titulo { display: inline-block; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* dia na lista: a data no meio das setas é o próprio campo (abre o calendário) */
.periodo-dia { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 12px; border-radius: var(--radius-pill); cursor: pointer;
  color: var(--foreground); font-family: var(--font-display); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.periodo-dia:hover { background: var(--card); }
.periodo-dia svg { color: var(--muted-foreground); flex: none; }
.periodo-dia .campo-data { width: 10.5ch; min-width: 0; height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; cursor: pointer;
  font: inherit; color: inherit; text-align: center; }
.periodo-dia .campo-data:focus { outline: none; box-shadow: none; }
.dia-semana { font-family: var(--font-body); font-size: 11.5px; font-weight: 600; color: var(--muted-foreground); padding: 1px 8px; border-radius: var(--radius-pill); background: var(--card); border: 1px solid var(--border); }
.dia-semana.hoje { background: var(--accent); color: var(--accent-foreground); border-color: transparent; }

/* ============================================================
   Visual arejado (09/11/2026) — o Arthur achou que cansava a vista e
   mostrou o Conta Azul como referência: fundo cinza claro com cartões
   brancos soltos, menu claro, letra um pouco maior e mais espaço.
   Para voltar ao visual anterior, é só apagar este bloco inteiro.
   ============================================================ */
:root {
  --escala: 0.9;            /* era 0.8: o texto ficava com ~11px na tela */
  --text-base: 14px;

  --surface: #eef1f5;       /* fundo cinza claro: o cartão branco "solta" dele */
  --panel: #e7ebf0;
  --border: #e5e9ee;
  --foreground: #1d2b3a;    /* texto um pouco menos preto */
  --text-2: #33475b;
  --muted-foreground: #5d6a77;
  --shadow-card: 0 1px 3px rgb(16 24 40 / 0.05), 0 1px 2px rgb(16 24 40 / 0.03);

  /* menu lateral claro (antes azul-escuro) */
  --nav-surface: #ffffff;
  --nav-ink: #15395e;
  --nav-ink-muted: #4f5d6b;
  --nav-surface-active: #edf2f8;
  --nav-border: #e5e9ee;

  /* balão do gráfico continua escuro */
  --dica-fundo: #15395e;
  --dica-texto: #ffffff;
  --dica-texto-2: #d5e0eb;

  /* mais espaço */
  --page-pad: 36px;
  --card-pad: 24px;
  --row-h: 48px;
}
body { line-height: 1.55; }
h1 { font-size: 24px; line-height: 32px; }
h2 { font-size: 16.5px; line-height: 24px; }

/* rótulos: sem CAIXA ALTA miúda, que cansa de ler */
.overline, .lateral .grupo, th, .quadro .rot, .kpi .topo, .painel-contas .mini .rot,
td.grupo-tabela, .barra-fixa .somas span {
  font-size: 12.5px; line-height: 16px; font-weight: 600; letter-spacing: 0; text-transform: none;
}

/* menu lateral */
.lateral { border-right: 1px solid var(--border); }
.lateral .grupo { padding-top: 16px; }
.lateral nav a, .lateral .rodape-lateral button { padding: 7px 14px; }
.lateral nav a.ativo { color: var(--nav-ink); }
.marca .nome { color: var(--muted-foreground); }
.topo-celular { border-bottom: 1px solid var(--border); }

/* o que precisa continuar escuro */
.login { background: #15395e; }
.selecao { background: #15395e; color: #e9eff6; }
.selecao button.fantasma { color: #9db0c4; }
.selecao button.fantasma:hover { background: #224d78; color: #e9eff6; }

/* página mais larga e com mais respiro */
.conteudo > .wrap { max-width: 1600px; }
.cabecalho { margin-bottom: 28px; }
.grid { gap: 24px; }
.mb { margin-bottom: 24px; }
.mb-lg { margin-bottom: 32px; }
.mt { margin-top: 24px; }

/* cartões */
.card-cab { padding: 18px var(--card-pad); }
.card-rodape { padding: 14px var(--card-pad); }
.kpi { padding: 22px var(--card-pad) 24px; gap: 12px; }
.kpi .val { font-size: 26px; line-height: 34px; }
.item { padding: 20px 24px; margin-bottom: 16px; }
.aviso { padding: 14px 18px; margin-bottom: 24px; }

/* início: a receber / a pagar */
.painel-contas .cab-cor { padding: 18px var(--card-pad); }
.painel-contas .mini a { padding: 18px var(--card-pad) 20px; }
.painel-contas .mini .val { font-size: 21px; line-height: 28px; margin-top: 8px; }
.painel-contas .lista { overflow-x: hidden; }
.painel-contas .lista table td { padding: 12px 12px; }
.painel-contas .lista table td:first-child { padding-left: var(--card-pad); }
.painel-contas .lista table td:last-child { padding-right: var(--card-pad); }
.painel-contas .lista table td.c-data { width: 84px; white-space: nowrap; }      /* "13/11" sem quebrar */
.painel-contas .lista table td.num { width: 150px; }                           /* o valor sempre à vista */

/* barras de rolagem finas e claras (as do Windows ficavam grossas e cinza-escuro) */
* { scrollbar-width: thin; scrollbar-color: #c3ccd6 transparent; }
.lista-dobravel > summary { padding: 14px var(--card-pad); }

/* quadros das listas */
.quadros { margin-bottom: 24px; }
.quadro { padding: 20px 24px 22px; }
.quadro .val { font-size: 21px; line-height: 28px; margin-top: 8px; }
.quadros.seis .quadro { padding: 18px 20px 20px; }

/* tabelas */
th { padding: 14px 18px; }
td { padding: 12px 18px; }
tfoot td, tfoot th { padding: 14px 18px; }
td.grupo-tabela { padding: 10px 18px; }
.barra { gap: 12px; margin-bottom: 20px; }

/* período no topo das listas (dia ou mês) em destaque: é a primeira coisa a conferir */
.periodo-dia { font-size: 18px; padding: 6px 14px; gap: 8px; }
.periodo-dia .ic, .periodo-dia svg { width: 18px; height: 18px; }
.periodo-dia .dia-semana { font-size: 12.5px; padding: 2px 10px; }
.segmento a.periodo { font-size: 18px; padding: 7px 16px; }

@media (max-width: 860px) {
  :root { --page-pad: 16px; --card-pad: 16px; }
  .grid { gap: 14px; }
  th, td { padding-left: 12px; padding-right: 12px; }
  .kpi .val { font-size: 22px; line-height: 28px; }
  .painel-contas .mini a { padding: 12px; }
  .painel-contas .lista table td, .painel-contas .lista table td:first-child, .painel-contas .lista table td:last-child { padding: 0; }
  .painel-contas .mini .val { font-size: 16px; line-height: 22px; margin-top: 4px; }
  .quadro { padding: 14px 16px; }
  .quadro .val { font-size: 18px; line-height: 24px; }
  .item { padding: 16px; }
}
