/* ==========================================================================
   FaturaMes - Estilos de Painéis e Cards de Métricas (Dashboard)
   ========================================================================== */

/* Cartões de Conteúdo Gerais (Painéis) */
.panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  transition: box-shadow 0.25s, border-color 0.25s;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #3574d4 0%, #2455b8 100%);
  color: #ffffff;
}

.panel-header h2,
.panel-header .h5 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0;
}

.panel-header-icon {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.92;
}

.panel-body {
  padding: 22px;
}

.panel h2 {
  color: var(--fm-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.crud-summary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e8edf5;
}

/* Grid de Estatísticas / Métricas */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* Cards de Estatísticas Individuais */
.stat {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 22px 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Ícone do stat card */
.stat-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.stat-icon {
  font-size: 1.35rem;
  line-height: 1;
}

/* Label */
.stat span:not(.stat-icon):not(.stat-icon-wrap) {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}

/* Valor */
.stat strong {
  display: block;
  color: var(--fm-heading);
  font-size: 1.52rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* Elevação ao hover */
.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.11);
  border-color: #cbd5e8;
}

/* ==========================================================================
   Variantes de Stat Cards (ícone + cor do valor)
   ========================================================================== */
.stat--primary .stat-icon-wrap { background: #dbeafe; }
.stat--primary strong { color: #2563eb; }

.stat--success .stat-icon-wrap { background: #dcfce7; }
.stat--success strong { color: #16a34a; }

.stat--danger .stat-icon-wrap { background: #fee2e2; }
.stat--danger strong { color: #dc2626; }

.stat--teal .stat-icon-wrap { background: #ccfbf1; }
.stat--teal strong { color: #0d9488; }

.stat--warning .stat-icon-wrap { background: #fef9c3; }
.stat--warning strong { color: #b45309; }

.stat--blue .stat-icon-wrap { background: #e0f2fe; }
.stat--blue strong { color: #0369a1; }

.stat--purple .stat-icon-wrap { background: #f3e8ff; }
.stat--purple strong { color: #7c3aed; }

.stat--slate .stat-icon-wrap { background: #f1f5f9; }
.stat--slate strong { color: #475569; }

/* ==========================================================================
   Responsividade
   ========================================================================== */
@media (max-width: 992px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .panel-body {
    padding: 18px;
  }
}

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

  .panel-body {
    padding: 16px;
  }

  .stat {
    padding: 16px 18px;
  }
}
