/* Dashboard Theme (global)
   - Seções com fundo #F0F2F5
   - Sombra leve padronizada em cards e superfícies de gráfico
*/

:root {
  --df-bg: #F0F2F5;
  --df-radius: 16px;
  --df-radius-sm: 12px;
  --df-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --df-text: #111827;
  --df-muted: #6b7280;
}

/* Estrutura base */
.dashboard-theme .df-filter-bar,
.dashboard-theme .df-section,
.dashboard-theme .overview-section {
  background: var(--df-bg);
  border-radius: var(--df-radius);
  box-shadow: var(--df-shadow);
}

.dashboard-theme .df-filter-bar {
  padding: 0.65rem 1rem;
  margin: 0 0 1.5rem 0;
  align-items: center;
}

.dashboard-theme .df-section,
.dashboard-theme .overview-section {
  padding: 1.35rem 1.5rem;
  margin: 0 .25rem 1.0rem .25rem;
  overflow: visible; /* não cortar ícones (mt-n4) dos cards */
}

.dashboard-theme .df-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--df-text);
  letter-spacing: -0.02em;
  margin: 0 0 1rem 0;
}

/* Cards e painéis */
.dashboard-theme .dashboard-panel {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

.dashboard-theme .dashboard-panel .card {
  border-radius: var(--df-radius);
  box-shadow: var(--df-shadow);
}

/* Superfície do gráfico (wrapper e canvas) */
.dashboard-theme .bg-gradient-card-header {
  background: #fff !important;
  background-image: none !important;
  box-shadow: var(--df-shadow) !important;
  border-radius: var(--df-radius-sm);
}

.dashboard-theme .bg-gradient-card-header .chart-canvas,
.dashboard-theme #cashflowProjectionChart,
.dashboard-theme #revenueExpenseChart {
  background: #fff;
  border-radius: var(--df-radius-sm);
  /* sem sombra aqui para evitar “duas layers”; a sombra fica no wrapper (.bg-gradient-card-header) */
  box-shadow: none;
}

/* Evita sombra duplicada no wrapper do gráfico */
.dashboard-theme .card.z-index-2 {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Tipografia auxiliar */
.dashboard-theme .card-body h6 {
  color: var(--df-text);
  font-weight: 600;
}

.dashboard-theme .card-body .text-sm {
  color: var(--df-muted);
}

/* Visão Geral: badges, subtítulos e cards do topo */
.dashboard-theme .dashboard-subtitle {
  color: #4b5563;
}

.dashboard-theme .dashboard-list-row + .dashboard-list-row {
  border-top: 1px solid #f0f2f5;
}

.dashboard-theme .dashboard-list-badge {
  border-radius: 15px;
  font-size: .72rem;
  font-weight: 600;
  padding: .35rem .65rem;
}

.dashboard-theme .dashboard-list-badge.warning {
  background-color: rgba(251, 140, 0, .12);
  color: #fb8c00;
}

.dashboard-theme .dashboard-list-badge.info {
  background-color: rgba(26, 115, 232, .12);
  color: #1a73e8;
}

.dashboard-theme .dashboard-list-badge.secondary {
  background-color: rgba(103, 116, 142, .12);
  color: #67748e;
}

.dashboard-theme .dashboard-card-top .card-header {
  padding-bottom: 0.5rem;
}

.dashboard-theme .dashboard-card-top .card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
}

.dashboard-theme .dashboard-card-top .card-header:only-child {
  padding-bottom: 1rem;
}

/* Ícone Saldo: azul royal vibrante */
.dashboard-theme .icon-saldo-royal {
  background-image: linear-gradient(195deg, #3b82f6 0%, #1e40af 100%);
  box-shadow: 0 8px 22px 0 rgba(59, 130, 246, 0.35);
}

/* Equal height only on large screens (avoid squeezing on mobile) */
@media (min-width: 992px) {
  .dashboard-theme .equal-height-lg {
    display: flex;
  }
  .dashboard-theme .equal-height-lg > .overview-section,
  .dashboard-theme .equal-height-lg > .df-section {
    width: 100%;
    height: 100%;
  }
}

/* Mobile refinements */
@media (max-width: 576px) {
  .dashboard-theme .df-section,
  .dashboard-theme .overview-section {
    padding: 1rem 1rem;
    margin: 0 0 0.85rem 0;
  }

  .dashboard-theme .df-section-title {
    font-size: 1.05rem;
  }

  .dashboard-theme .bg-gradient-card-header {
    border-radius: 12px;
  }

  .dashboard-theme .bg-gradient-card-header .chart {
    min-height: 260px !important;
  }
}

