/* financeiro.css - estilos compartilhados das páginas /financeiro/* */
/* Tokens canonicos REVO_PORTAL_STANDARD v2.0 */

:root {
  /* Layout */
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 80px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all .3s cubic-bezier(.4,0,.2,1);

  /* Surfaces */
  --bg: #0B0B0B;
  --bg-sidebar: #050505;
  --bg-card: #121212;
  --bg-card-alt: #1A1A1A;

  /* Text */
  --text: #FFFFFF;
  --text-muted: rgba(255,255,255,.55);
  --text-mid: rgba(255,255,255,.75);

  /* Borders */
  --border: rgba(255,255,255,.05);
  --border-color: rgba(255,255,255,.08);
  --border-hover: rgba(255,255,255,.15);

  /* REVO Red */
  --revo-red: rgb(224,0,0);
  --revo-red-dark: rgb(38,4,4);
  --revo-red-border: rgb(168,14,0);
  --revo-red-glow: rgba(224,0,0,.18);
  --accent: rgb(224,0,0);

  /* Status */
  --green: #22c55e;
  --red: #ef4444;

  /* Fonts - Inter unica (REVO_PORTAL_STANDARD v2.0.1) */
  --font: 'Inter', -apple-system, system-ui, sans-serif;
  --font-serif: 'Inter', -apple-system, system-ui, sans-serif;

  /* Aliases legacy para compat */
  --bg-dark: var(--bg);
  --clean-surface-dark: var(--bg-card);
  --clean-surface-hover: var(--bg-card-alt);
  --text-main: var(--text);
  --font-main: var(--font);
  --revo-red-base: var(--revo-red);
  --revo-red-shadow: var(--revo-red-dark);
}

body.light-mode {
  --bg: #F2F2F2;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-alt: #E8E8E8;
  --text: #111;
  --text-muted: rgba(0,0,0,.50);
  --text-mid: #444;
  --border: rgba(0,0,0,.06);
  --border-color: rgba(0,0,0,.08);
  --border-hover: rgba(0,0,0,.20);
  --revo-red-dark: #6a0000;
  --revo-red-glow: rgba(224,0,0,.08);
  --green: #16a34a;
  --red: #dc2626;
  /* legacy overrides */
  --bg-dark: var(--bg);
  --clean-surface-dark: var(--bg-card);
  --clean-surface-hover: var(--bg-card-alt);
  --text-main: var(--text);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* Layout - canonical /metas pattern: left-aligned, full-width, no max-width */
.revo-content-wrap {
  flex: 1;
  margin-left: var(--sidebar-collapsed-width, 80px);
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 32px 40px;
  min-height: 100vh;
}
/* Sidebar v6.0 hover-based: content stays at collapsed width.
   Sidebar expand is visual-only (position:fixed), doesn't push content. */
@media (min-width: 1500px) {
  .revo-content-wrap { padding: 40px 56px; }
}

/* Container: full-width left-aligned. Sem max-width, sem margin auto.
   Conteudo flui esquerda->direita aproveitando o espaco disponivel. */
.financeiro-container { width: 100%; }

/* Header */
.financeiro-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.financeiro-header.compact {
  margin-bottom: 22px;
  padding-bottom: 20px;
}
.financeiro-header h1 {
  font-family: var(--font);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.financeiro-header .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.financeiro-title-block {
  min-width: min(520px, 100%);
}
.financeiro-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.financeiro-action-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(34,197,94,0.28);
  border-radius: var(--radius-sm);
  background: rgba(34,197,94,0.12);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: var(--transition);
}
.financeiro-action-link:hover,
.financeiro-action-link:focus {
  border-color: rgba(34,197,94,0.46);
  color: var(--green);
  filter: brightness(1.08);
  outline: none;
  transform: translateY(-1px);
}

/* KPI Grid */
.kpi-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.kpi-card {
  background: var(--clean-surface-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px 24px;
  min-width: 160px;
  cursor: default;
  transition: var(--transition);
}
.kpi-card:hover {
  background: var(--clean-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
body.light-mode .kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}
.kpi-value.accent { color: var(--revo-red-base); }

/* Tab navigation */
.financeiro-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.financeiro-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active {
  color: var(--revo-red-base);
  border-bottom-color: var(--revo-red-base);
}

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Section titles */
.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Card container */
.card {
  background: var(--clean-surface-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
body.light-mode .card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* Chart card accent bar */
.chart-card {
  position: relative;
  overflow: hidden;
}
.chart-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--revo-red-base);
}
.chart-card canvas { max-height: 300px; }

/* Tables */
.financeiro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.financeiro-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}
.financeiro-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}
.financeiro-table tr:last-child td { border-bottom: none; }
.financeiro-table tr:hover td { background: var(--clean-surface-hover); }
.financeiro-table .col-num { text-align: right; font-variant-numeric: tabular-nums; }
/* DRE table: Bloomberg Terminal density */
.financeiro-table.dre-table {
  font-size: 11.5px;
}
.financeiro-table.dre-table th,
.financeiro-table.dre-table td {
  text-align: right;
  padding: 7px 8px;
}
.financeiro-table.dre-table th:first-child,
.financeiro-table.dre-table td:first-child {
  text-align: left;
  padding-left: 16px;
  padding-right: 12px;
}
.financeiro-table.dre-table .dre-month-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.financeiro-table.dre-table .dre-pct-cell {
  text-align: right;
}
.financeiro-table.dre-table .dre-expand-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.financeiro-table.dre-table .dre-toggle-btn {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-card-alt);
  color: var(--text-mid);
  padding: 0;
  cursor: pointer;
}
.financeiro-table.dre-table .dre-toggle-btn:hover,
.financeiro-table.dre-table .dre-toggle-btn[aria-expanded="true"] {
  color: var(--text);
  border-color: rgba(34,197,94,.45);
  background: rgba(34,197,94,.10);
}
.financeiro-table.dre-table .dre-toggle-btn i {
  font-size: 13px;
  line-height: 1;
}
.financeiro-table.dre-table .dre-detail-row td {
  color: var(--text-muted);
  font-size: 11px;
  background: rgba(255,255,255,0.018);
}
body.light-mode .financeiro-table.dre-table .dre-detail-row td {
  background: rgba(0,0,0,0.018);
}
.financeiro-table.dre-table .dre-detail-row td:first-child {
  padding-left: 46px;
}
.financeiro-table.dre-table .dre-detail-row.dre-micro-row td:first-child {
  padding-left: 34px;
  font-weight: 700;
}
.financeiro-table.dre-table .dre-detail-row.dre-micro-row td {
  color: var(--text-mid);
  background: rgba(255,255,255,0.026);
}
.financeiro-table.dre-table .dre-source-label {
  color: var(--text-mid);
}
.financeiro-table.dre-table .dre-card-item-label {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.financeiro-table.dre-table .dre-pct-row td {
  color: var(--text-mid);
}
.financeiro-table.dre-table .dre-pct-row td:first-child {
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.financeiro-table.dre-table .dre-net-row td {
  font-weight: 800;
}
.financeiro-table.dre-table .dre-net-positive {
  color: #22c55e;
}
.financeiro-table.dre-table .dre-net-negative {
  color: #f87171;
}
.financeiro-table.dre-table .dre-net-strong {
  color: #39ff88;
  text-shadow: 0 0 14px rgba(57,255,136,.42);
}
body.light-mode .financeiro-table.dre-table .dre-net-positive {
  color: #15803d;
}
body.light-mode .financeiro-table.dre-table .dre-net-negative {
  color: #dc2626;
}
body.light-mode .financeiro-table.dre-table .dre-net-strong {
  color: #00b84a;
  text-shadow: 0 0 12px rgba(0,184,74,.24);
}
.financeiro-table.dre-table .dre-pct-amber { color: #f59e0b; font-weight: 700; }
body.light-mode .financeiro-table.dre-table .dre-pct-amber { color: #d97706; }
.financeiro-table .col-muted { color: var(--text-muted); }
.financeiro-table tfoot td {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  border-bottom: none;
  font-weight: 600;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-neutral { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.pill-alert   { background: rgba(224,0,0,0.12); color: rgb(255,80,80); }
.pill-ok      { background: rgba(0,200,80,0.12); color: rgb(0,200,80); }
body.light-mode .pill-neutral { background: rgba(0,0,0,0.06); }
body.light-mode .pill-alert   { color: rgb(200,0,0); }

/* Month filter buttons (Lançamentos) */
.month-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.month-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.month-btn:hover, .month-btn.active {
  background: rgba(224,0,0,0.08);
  border-color: var(--revo-red-border);
  color: var(--revo-red-base);
}

/* Contas Fixas cards */
.fixas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.fixa-card {
  background: var(--clean-surface-dark);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition);
}
.fixa-card:hover {
  background: var(--clean-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.fixa-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}
.fixa-dia {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.fixa-valor {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* Metas: progress bars */
.meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.meta-row:last-child { border-bottom: none; }
.meta-categoria { flex: 0 0 160px; font-size: 13px; font-weight: 500; }
.meta-bar-wrap {
  flex: 1;
  background: var(--border-color);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}
.meta-bar {
  height: 100%;
  background: var(--revo-red-base);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.meta-bar.ok { background: rgb(0,200,80); }
.meta-valores {
  flex: 0 0 180px;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Projeção mode toggle */
.mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.mode-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.mode-btn.active {
  background: rgba(224,0,0,0.08);
  border-color: var(--revo-red-border);
  color: var(--revo-red-base);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 40px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state i { font-size: 48px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--clean-surface-dark) 25%, var(--clean-surface-hover) 50%, var(--clean-surface-dark) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  height: 16px;
  margin-bottom: 10px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Inline skeleton for number cells */
.dre-skel {
  display: inline-block;
  width: 52px;
  height: 11px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-card-alt) 25%, var(--border-hover) 50%, var(--bg-card-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  vertical-align: middle;
}
.dre-year-card .dre-skel { width: 80px; height: 20px; border-radius: 6px; display: block; margin-bottom: 8px; }
.dre-year-card.dre-skel-card { opacity: 0.7; }

/* Saldos overview */
.saldos-total-card {
  background: linear-gradient(135deg, var(--revo-red-shadow), #1a0a0a);
  border: 1px solid rgba(224,0,0,0.2);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
  transition: var(--transition);
}
.saldos-total-card:hover {
  border-color: rgba(224,0,0,0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(224,0,0,0.15);
}
.saldos-total-card .total-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; }
.saldos-total-card .total-value { font-family: var(--font); font-size: 48px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.saldos-total-card .total-date  { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
body.light-mode .saldos-total-card .total-value { color: #fff; }

/* Entity sub-nav (topo do conteudo: Mozini / REVO / Pessoal) */
.entity-subnav {
  display: flex;
  gap: 4px;
  margin-bottom: 36px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.entity-subnav::-webkit-scrollbar { display: none; }
.entity-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}
.entity-tab i { font-size: 17px; flex-shrink: 0; }
.entity-tab:hover {
  background: var(--bg-card-alt);
  color: var(--text);
}
.entity-tab.active {
  background: rgba(224,0,0,0.08);
  border-color: rgba(224,0,0,0.2);
  color: var(--revo-red);
  font-weight: 600;
}
.entity-tab.active i { color: var(--revo-red); }
body.light-mode .entity-tab.active { background: rgba(224,0,0,0.06); }

/* DRE inline notes (dentro das abas DRE) */
.dre-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-color);
  line-height: 1.55;
}
body.light-mode .dre-note { background: rgba(0,0,0,0.02); }
.dre-note i { color: var(--text-muted); margin-right: 4px; }
.dre-note strong { color: var(--text); font-weight: 600; }

.financeiro-table tr.subtotal td {
  font-weight: 600;
  border-top: 1px solid var(--border-color);
  color: var(--text);
}
.financeiro-table tr.warning td {
  color: var(--red);
  background: rgba(239,68,68,0.04);
}
.financeiro-table tr.result td {
  font-weight: 700;
  font-size: 14px;
  border-top: 2px solid var(--border-hover);
  padding-top: 14px;
  padding-bottom: 14px;
  color: var(--text);
}

.dre-variance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dre-variance-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 14px;
}

.dre-variance-card.material {
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.04);
}

.dre-variance-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.dre-variance-value {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  margin-top: 6px;
}

.dre-variance-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.dre-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: -2px 0 14px;
}
.dre-filter-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.dre-year-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dre-year-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-mid);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.dre-year-btn:hover,
.dre-year-btn.active {
  color: var(--text);
  border-color: rgba(34,197,94,.45);
  background: rgba(34,197,94,.10);
}
.dre-year-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.dre-year-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 12px;
  min-width: 0;
}
.dre-year-card.is-positive,
.dre-year-card.is-strong-positive {
  border-color: rgba(34,197,94,.42);
  background: rgba(34,197,94,.075);
}
.dre-year-card.is-negative {
  border-color: rgba(248,113,113,.36);
  background: rgba(248,113,113,.06);
}
.dre-year-card.is-strong-positive {
  box-shadow: 0 0 22px rgba(57,255,136,.13);
}
.dre-year-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}
.dre-year-value {
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
  margin-top: 6px;
  white-space: nowrap;
}
.dre-year-card.is-positive .dre-year-value { color: #22c55e; }
.dre-year-card.is-negative .dre-year-value { color: #f87171; }
.dre-year-card.is-strong-positive .dre-year-value {
  color: #39ff88;
  text-shadow: 0 0 14px rgba(57,255,136,.42);
}

/* DRE scroll container — fallback se tela muito pequena */
.dre-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  border-radius: var(--radius);
}
.dre-scroll-wrap::-webkit-scrollbar { height: 3px; }
.dre-scroll-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 4px; }
.financeiro-table.dre-table th,
.financeiro-table.dre-table td {
  white-space: nowrap;
  min-width: 58px;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 12px;
}
.financeiro-table.dre-table th:first-child,
.financeiro-table.dre-table td:first-child { min-width: 128px; position: sticky; left: 0; background: var(--bg-card); z-index: 1; box-shadow: 2px 0 6px rgba(0,0,0,0.25); }
body.light-mode .financeiro-table.dre-table th:first-child,
body.light-mode .financeiro-table.dre-table td:first-child { background: var(--bg-card); box-shadow: 2px 0 6px rgba(0,0,0,0.06); }

@media (max-width: 768px) {
  .revo-content-wrap { padding: 72px 16px 24px; margin-left: 0 !important; }
  .financeiro-header { flex-direction: column; align-items: flex-start; }
  .financeiro-header h1 { font-size: 26px; }
  .kpi-grid { flex-wrap: nowrap; overflow-x: auto; }
  .kpi-card { min-width: 140px; }
  .fixas-grid { grid-template-columns: 1fr; }
  .meta-categoria { flex: 0 0 100px; font-size: 12px; }
  .entity-subnav { width: 100%; }
  .dre-variance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dre-toolbar { justify-content: flex-start; flex-wrap: wrap; }
  .dre-year-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .dre-variance-grid { grid-template-columns: 1fr; }
  .dre-year-summary { grid-template-columns: 1fr; }
}
