:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #1a2234;
  --bg-card-hover: #222d44;
  --border-color: #2b3853;
  --text-primary: #f3f4f6;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.user-info-box {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Period Selector */
.period-selector-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
}

.btn-icon {
  background: transparent !important;
  border: none !important;
  padding: 0.4rem 0.6rem !important;
  font-size: 0.8rem !important;
  color: var(--text-secondary) !important;
  cursor: pointer;
}

.btn-icon:hover {
  color: #fff !important;
}

.select-periodo {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  cursor: pointer;
  padding: 0.35rem 0.6rem !important;
  outline: none;
}

.select-periodo option {
  background: var(--bg-secondary);
  color: #fff;
}

/* Buttons */
.btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: #3e4f74;
}

.btn-primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-sm {
  font-size: 0.72rem !important;
  padding: 0.25rem 0.55rem !important;
}

/* Main Container */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  width: 100%;
  flex: 1;
}

/* Period info bar */
.period-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.period-highlight {
  font-weight: 700;
  color: #fff;
  background: rgba(59, 130, 246, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.period-sub {
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.api-meta-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* KPIs Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.15rem;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-receitas { border-left: 4px solid var(--accent-green); }
.card-despesas { border-left: 4px solid var(--accent-red); }
.card-saldo { border-left: 4px solid var(--accent-blue); }
.card-resultado { border-left: 4px solid var(--accent-purple); }
.card-inadimplencia { border-left: 4px solid var(--accent-amber); }

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}

.kpi-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Saldos Bar */
.saldos-bar {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.saldos-bar-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.saldos-pills-container {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.saldo-pill {
  background: var(--bg-card);
  border: 1px solid #334155;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.saldo-pill strong {
  color: #60a5fa;
  margin-left: 0.35rem;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.chart-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.chart-subtitle-text {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.chart-body {
  position: relative;
  height: 270px;
  width: 100%;
}

/* Painel de Dados e Tabela */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.panel-header {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.tab-btn.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.4);
}

.search-box-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-count-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.search-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  color: #fff;
  font-size: 0.82rem;
  min-width: 280px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--accent-blue);
}

.table-responsive {
  max-height: 520px;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.83rem;
}

thead th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  z-index: 10;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

td {
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  vertical-align: middle;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-receita {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-despesa {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-paga {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-prevista {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-grupo {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 0.72rem;
}

.val-receita {
  color: #34d399;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.val-despesa {
  color: #f87171;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Modal / API Explorer */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 90%;
  max-width: 850px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.json-box {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1rem;
  color: #58a6ff;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 380px;
  overflow-y: auto;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  font-size: 0.85rem;
  color: #fff;
  animation: slideIn 0.25s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Relatório Hierárquico por Categoria (Accordion / Dropdown)
   ========================================================================== */
.category-report-wrapper {
  padding: 1.25rem;
}

.report-loading-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
  font-size: 0.9rem;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.report-summary-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.report-summary-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.report-summary-badge strong {
  color: #fff;
  font-size: 0.9rem;
}

.report-group-section {
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.group-ordinaria {
  border-left: 4px solid var(--accent-blue);
}

.group-extraordinaria {
  border-left: 4px solid var(--accent-amber);
}

.report-group-header {
  background: var(--bg-secondary);
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.group-title-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.group-icon {
  font-size: 1.15rem;
}

.group-title-text {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.group-count-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  margin-left: 0.3rem;
}

.group-total-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.group-total-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.group-pct-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Category Accordion Item */
.category-accordion-list {
  display: flex;
  flex-direction: column;
}

.category-accordion-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s ease;
}

.category-accordion-item:last-child {
  border-bottom: none;
}

.category-header-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  user-select: none;
}

.category-header-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

.category-accordion-item.expanded > .category-header-btn {
  background: rgba(59, 130, 246, 0.06);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.category-left-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.chevron-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  width: 16px;
  text-align: center;
}

.category-accordion-item.expanded .chevron-icon {
  transform: rotate(90deg);
  color: var(--accent-blue);
}

.category-name-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f1f5f9;
}

.category-items-badge {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}

.category-right-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.category-progress-wrap {
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

@media (max-width: 640px) {
  .category-progress-wrap {
    display: none;
  }
}

.category-progress-bar {
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 9999px;
  overflow: hidden;
}

.category-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), #60a5fa);
  border-radius: 9999px;
}

.category-progress-fill-extra {
  background: linear-gradient(90deg, var(--accent-amber), #fbbf24);
}

.category-progress-text {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.category-total-text {
  font-size: 1rem;
  font-weight: 700;
  color: #f87171;
  font-variant-numeric: tabular-nums;
  min-width: 110px;
  text-align: right;
}

/* Category Dropdown Details Body */
.category-dropdown-body {
  display: none;
  background: rgba(11, 15, 25, 0.85);
  padding: 0.5rem 1.25rem 1rem 2.5rem;
  animation: fadeIn 0.2s ease-in-out;
}

.category-accordion-item.expanded > .category-dropdown-body {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nested-item-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.nested-item-table th {
  background: transparent;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.45rem 0.6rem;
  letter-spacing: 0.4px;
}

.nested-item-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
}

.nested-item-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Painel de Auditoria Financeira & Compliance
   ========================================================================== */
.auditoria-wrapper {
  padding: 1.25rem;
}

.audit-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.audit-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--accent-red);
}

.audit-hero-info {
  flex: 1;
  min-width: 280px;
}

.audit-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.audit-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 0.4rem;
}

.audit-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 600px;
}

.audit-score-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.5rem;
  border-radius: 12px;
}

.score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
}

.score-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.score-max {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.score-text-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.score-text-desc {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

/* Auditoria Alertas Grid */
.audit-alerts-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .audit-alerts-summary {
    grid-template-columns: 1fr;
  }
}

.audit-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audit-summary-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.audit-summary-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.audit-summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Alert Item Card */
.alert-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.alert-card-item:hover {
  border-color: #3e4f74;
}

.alert-item-critico {
  border-left: 5px solid var(--accent-red);
}

.alert-item-atencao {
  border-left: 5px solid var(--accent-amber);
}

.alert-item-regular {
  border-left: 5px solid var(--accent-green);
}

.alert-card-header {
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.alert-card-title-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.alert-level-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  width: fit-content;
}

.tag-critico {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.tag-atencao {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.tag-regular {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.alert-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.alert-category-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}

.alert-card-body {
  padding: 1rem 1.25rem;
}

.alert-desc-text {
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.alert-evidence-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
}

.alert-recommendation-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #93c5fd;
  line-height: 1.4;
}

/* Auditoria Grid de Módulos */
.audit-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .audit-modules-grid {
    grid-template-columns: 1fr;
  }
}

.audit-module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
}

.audit-module-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Novos Indicadores Estratégicos & Governança (Mini KPIs)
   ========================================================================== */
.strategic-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.strategic-kpi-card {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: transform 0.15s, border-color 0.15s;
}

.strategic-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
}

.strategic-kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.strategic-icon {
  font-size: 0.95rem;
}

.strategic-kpi-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0.25rem 0 0.15rem 0;
  letter-spacing: -0.3px;
}

.strategic-kpi-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Seção de Gráficos Expandida
   ========================================================================== */
.chart-evolution-container {
  margin-bottom: 1.25rem;
}

.chart-body-tall {
  height: 310px !important;
}

.charts-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .charts-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .charts-grid-4 {
    grid-template-columns: 1fr;
  }
}

.btn-audit-glow {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.btn-audit-glow:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   Barra de Filtros Multicritério
   ========================================================================== */
.advanced-filter-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 150px;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-select-input {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.filter-select-input:focus {
  border-color: var(--accent-blue);
}

.filter-select-input option {
  background: var(--bg-card);
  color: #fff;
}

.filter-actions-group {
  flex: 0 0 auto;
  min-width: auto;
}

.btn-clear-filters {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-color) !important;
  padding: 0.45rem 0.75rem !important;
}

.btn-clear-filters:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* =====================================================================
   ESTILOS DE CONTROLE MULTIPERÍODO & PRESETS
   ===================================================================== */
.period-control-panel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.period-presets {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.preset-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.preset-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.preset-btn.active {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.custom-range-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.range-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.badge-period-months {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-left: 0.5rem;
}

.period-badge-glow {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

/* Linha de Gráficos de Evolução */
.charts-evolution-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .charts-evolution-row {
    grid-template-columns: 1fr;
  }
}

.chart-card-wide {
  min-height: 380px;
}

/* =====================================================================
   MATRIZ COMPARATIVA MÊS A MÊS (EVOLUÇÃO DAS CATEGORIAS)
   ===================================================================== */
.matrix-report-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.matrix-table th {
  background: #1e293b;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.75rem 0.9rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.matrix-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.matrix-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.matrix-cat-name {
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.matrix-col-month {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
}

.matrix-col-total {
  text-align: right;
  font-weight: 700;
  color: #f87171;
  font-variant-numeric: tabular-nums;
}

.matrix-col-media {
  text-align: right;
  font-weight: 600;
  color: #60a5fa;
  font-variant-numeric: tabular-nums;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.trend-badge-alta {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.trend-badge-queda {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.trend-badge-estavel {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.category-tag-ord {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.category-tag-extra {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.matrix-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: #111827;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.matrix-summary-pill {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.matrix-summary-pill strong {
  color: #fff;
}

/* ==========================================================================
   REFORMULAÇÃO COMPLETA: DETALHAMENTO POR CATEGORIA (DROPDOWN HIERÁRQUICO)
   ========================================================================== */
.category-report-wrapper {
  padding: 0.5rem 0;
}

/* Barra Superior de Ações do Relatório */
.category-top-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.category-toolbar-info {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.category-toolbar-info strong {
  color: #fff;
}

.category-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-action-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-pill:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

/* Cards de Resumo Geral: Ordinárias vs Extraordinárias */
.category-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.cat-sum-card {
  background: linear-gradient(135deg, rgba(26, 34, 52, 0.9), rgba(17, 24, 39, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.cat-sum-card-ord {
  border-left: 5px solid var(--accent-blue);
}

.cat-sum-card-extra {
  border-left: 5px solid var(--accent-amber);
}

.cat-sum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.cat-sum-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cat-sum-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.cat-sum-badge-ord {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.cat-sum-badge-extra {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.cat-sum-val {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}

.cat-sum-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.cat-sum-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.cat-sum-bar-fill-ord {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 9999px;
}

.cat-sum-bar-fill-extra {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 9999px;
}

/* Card Principal de Grupo (Accordion Nível 1) */
.group-accordion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.group-header-clickable {
  background: #151e2f;
  padding: 1.1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.group-header-clickable:hover {
  background: #1b263b;
}

.group-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.group-chevron {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  display: inline-block;
  width: 20px;
  text-align: center;
}

.group-title-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.group-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.group-total-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #f87171;
  font-variant-numeric: tabular-nums;
}

.group-body-container {
  padding: 0.85rem 1rem 1.25rem 1rem;
  background: rgba(11, 15, 25, 0.6);
}

/* Sub-card da Categoria / Classe (Accordion Nível 2) */
.category-item-card {
  background: #162032;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: all 0.15s ease;
}

.category-item-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.category-header-clickable {
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background-color 0.15s ease;
}

.category-header-clickable:hover {
  background: rgba(255, 255, 255, 0.03);
}

.category-left-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  display: inline-block;
  width: 16px;
  text-align: center;
}

.category-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.category-name-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.category-count-chip {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.category-right-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.category-progress-cluster {
  width: 130px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

@media (max-width: 650px) {
  .category-progress-cluster {
    display: none;
  }
}

.category-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.category-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 9999px;
}

.category-progress-bar-fill-extra {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.category-progress-label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.category-total-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f87171;
  font-variant-numeric: tabular-nums;
  min-width: 110px;
  text-align: right;
}

/* Tabela Interna dos Lançamentos Expansíveis */
.category-dropdown-table-wrap {
  display: none;
  padding: 0.5rem 1rem 1rem 1rem;
  background: rgba(9, 13, 21, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.category-dropdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.category-dropdown-table th {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.category-dropdown-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.category-dropdown-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges de Comprovante Fiscal e Status */
.voucher-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.voucher-ok {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.voucher-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.voucher-none {
  color: var(--text-muted);
}

/* ==========================================================================
   REFORMULAÇÃO COMPLETA: RELATÓRIO DE AUDITORIA CONTÁBIL & GOVERNANÇA
   ========================================================================== */
.auditoria-container {
  padding: 0.5rem 0;
}

.audit-hero-card {
  background: linear-gradient(135deg, #131c2d, #0b111c);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.audit-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
}

.audit-hero-left {
  flex: 1;
  min-width: 300px;
}

.audit-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.6rem;
}

.audit-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  margin-bottom: 0.4rem;
}

.audit-hero-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 650px;
}

.audit-score-widget {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem 1.6rem;
  border-radius: 14px;
}

.audit-score-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--accent-red);
  background: rgba(239, 68, 68, 0.08);
}

.audit-score-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.audit-score-sub {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

.audit-score-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.audit-score-status-text {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

/* Grid de Métricas de Auditoria */
.audit-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 900px) {
  .audit-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .audit-kpi-row {
    grid-template-columns: 1fr;
  }
}

.audit-kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.audit-kpi-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.audit-kpi-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.audit-kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* Cards de Apontamento da Auditoria */
.audit-section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audit-card-finding {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left-width: 6px;
  border-radius: var(--radius);
  padding: 1.35rem 1.6rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.audit-card-finding:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.audit-card-critico {
  border-left-color: #ef4444;
}

.audit-card-atencao {
  border-left-color: #f59e0b;
}

.audit-card-regular {
  border-left-color: #10b981;
}

.audit-finding-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.audit-level-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}

.badge-critico-pill {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-atencao-pill {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-regular-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.audit-cat-tag {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
}

.audit-finding-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  margin-bottom: 0.45rem;
}

.audit-finding-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 0.95rem;
}

/* Sub-tabela de itens afetados dentro do apontamento */
.audit-items-subtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.audit-items-subtable th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.audit-items-subtable td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
}

.audit-items-subtable tr:last-child td {
  border-bottom: none;
}

.audit-recommendation-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  font-size: 0.84rem;
  color: #93c5fd;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.audit-recommendation-box strong {
  color: #60a5fa;
  font-weight: 700;
}

/* =====================================================================
   PAINEL DE 8 INDICADORES QUANTITATIVOS DE AUDITORIA & COMPLIANCE
   ===================================================================== */
.audit-indicators-grid-section {
  margin-bottom: 2rem;
}

.audit-kpi-grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .audit-kpi-grid-8 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .audit-kpi-grid-8 {
    grid-template-columns: 1fr;
  }
}

.audit-indicator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.audit-indicator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.audit-indicator-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.audit-indicator-icon {
  font-size: 1.4rem;
}

.audit-indicator-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.audit-indicator-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.audit-indicator-val {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.audit-indicator-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.65rem;
}

.audit-indicator-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
}

.audit-indicator-benchmark {
  color: #94a3b8;
  font-weight: 600;
}

/* =====================================================================
   TELA & MODAL DE LOGIN / CREDENCIAIS
   ===================================================================== */
.btn-login-glow {
  background: rgba(14, 165, 233, 0.15) !important;
  border-color: rgba(14, 165, 233, 0.5) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

.btn-login-glow:hover {
  background: rgba(14, 165, 233, 0.25) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.btn-logout-mini {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout-mini:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #f87171;
}

.modal-login-box {
  max-width: 440px !important;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(14, 165, 233, 0.15);
}

.login-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.login-form-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.login-alert-box {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.login-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 0.85rem 0.75rem 2.6rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

.login-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: rgba(15, 23, 42, 1);
}

.btn-toggle-eye {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
}

.login-form-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn-submit-login {
  width: 100%;
  padding: 0.85rem !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  justify-content: center;
  border-radius: 8px !important;
}

/* =====================================================================
   MÓDULO DE MORADORES POR UNIDADE / CASA
   ===================================================================== */
.moradores-wrapper {
  padding: 1.5rem;
}

.moradores-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
  .moradores-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .moradores-kpis-grid {
    grid-template-columns: 1fr;
  }
}

.moradores-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.moradores-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.moradores-kpi-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.moradores-kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.moradores-toolbar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.moradores-search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.moradores-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 0.85rem 0.6rem 2.4rem;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}

.moradores-search-input:focus {
  border-color: #38bdf8;
}

.moradores-filter-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pill-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
}

.pill-filter-btn.active, .pill-filter-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Grid de Casas */
.moradores-casas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .moradores-casas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .moradores-casas-grid {
    grid-template-columns: 1fr;
  }
}

.casa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}

.casa-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.casa-card-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.casa-badge-pill {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.casa-count-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.casa-card-body {
  padding: 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.morador-item-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: background 0.15s;
}

.morador-item-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.morador-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.morador-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
}

.morador-role-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.role-titular {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.role-familiar {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.morador-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.morador-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-whatsapp-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.72rem;
  transition: all 0.15s;
}

.btn-whatsapp-mini:hover {
  background: rgba(34, 197, 94, 0.3);
  border-color: #4ade80;
  color: #fff;
}

/* =====================================================================
   DEMONSTRATIVO DO RESULTADO DO EXERCÍCIO (DRE CONDOMINIAL)
   ===================================================================== */
.btn-dre-glow {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  color: #c084fc !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.btn-dre-glow:hover {
  background: rgba(168, 85, 247, 0.25) !important;
  border-color: #c084fc !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.dre-wrapper {
  padding: 1.5rem;
}

.dre-hero-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.6rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.dre-title-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dre-title-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.dre-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-print-dre {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}

.btn-print-dre:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #94a3b8;
}

/* Cards de Resumo Executivo do DRE */
.dre-summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
  .dre-summary-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.dre-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.dre-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.dre-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dre-card-val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.3rem;
  letter-spacing: -0.5px;
}

.dre-card-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* Tabela Formal do DRE */
.dre-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.dre-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.dre-table th {
  background: #090d16;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
}

.dre-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

/* Tipos de Linha */
.dre-row-grupo-principal {
  background: rgba(15, 23, 42, 0.85);
  font-weight: 800;
  color: #fff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.dre-row-grupo-principal td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  font-size: 0.9rem;
}

.dre-row-subgrupo {
  background: rgba(255, 255, 255, 0.015);
  font-weight: 700;
  color: #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
}

.dre-row-subgrupo:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dre-row-conta-filha {
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.8rem;
  color: #94a3b8;
}

.dre-row-conta-filha td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.dre-row-subtotal-destaque {
  background: rgba(56, 189, 248, 0.08);
  font-weight: 800;
  color: #38bdf8;
  border-top: 1.5px solid rgba(56, 189, 248, 0.3);
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.3);
}

.dre-row-subtotal-operacional {
  background: rgba(16, 185, 129, 0.1);
  font-weight: 800;
  color: #34d399;
  border-top: 2px solid rgba(16, 185, 129, 0.4);
  border-bottom: 2px solid rgba(16, 185, 129, 0.4);
}

.dre-row-subtotal-operacional td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.dre-row-resultado-final {
  background: rgba(16, 185, 129, 0.15);
  font-weight: 900;
  color: #fff;
  border-top: 2.5px solid #10b981;
  border-bottom: 2.5px solid #10b981;
}

.dre-row-resultado-final-neg {
  background: rgba(239, 68, 68, 0.15) !important;
  border-top: 2.5px solid #ef4444 !important;
  border-bottom: 2.5px solid #ef4444 !important;
}

.dre-row-resultado-final td {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  font-size: 1.05rem;
}

.natureza-pos {
  color: #34d399;
  font-weight: 800;
}

.natureza-neg {
  color: #f87171;
  font-weight: 800;
}

.natureza-eq {
  color: #60a5fa;
  font-weight: 800;
}

.toggle-dre-icon {
  display: inline-block;
  width: 14px;
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: transform 0.15s;
}

/* Estilo de Impressão do Relatório DRE */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .header, .strategic-kpis-grid, .period-info-bar, .panel-header, .advanced-filter-bar, .dre-hero-bar .btn-print-dre {
    display: none !important;
  }
  .dre-wrapper {
    padding: 0 !important;
  }
  .dre-table-container {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  .dre-table th {
    background: #f1f5f9 !important;
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
  }
  .dre-table td {
    color: #000 !important;
    border-bottom: 1px solid #ddd !important;
  }
}






