/* ============================================
   🎨 Variables base
============================================ */
:root {
  --color-fondo: #1e293b;
  --color-texto: #f1f5f9;
  --color-header: #0f172a;
  --color-tarjeta: #334155;
  --color-divisor: #94a3b8;
}

/* ============================================
   🧱 Layout general del dashboard
============================================ */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--color-fondo);
  color: var(--color-texto);
  margin: 0;
  padding: 0;
}

.header {
  background-color: var(--color-header);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: bold;
}

.dashboard-title {
  font-size: 2rem;
  margin-top: 1rem;
  text-align: center;
  color: #f8fafc;
}

.dashboard-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2rem;
  justify-content: center;
  align-items: stretch;
}

/* ============================================
   🧩 Tarjetas base
============================================ */
.tarjeta {
  background-color: var(--color-tarjeta);
  width: 320px;
  min-height: 220px;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 8px solid #64748b; /* color por defecto, sobrescrito por clase dinámica */
  flex-shrink: 0;
}

.tarjeta h3 {
  font-size: 1.2rem;
  text-align: center;
  margin: 0.5rem 0;
  font-weight: bold;
}

.tarjeta em {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.tarjeta ul {
  padding-left: 1rem;
  margin: 0.5rem 0;
}

.tarjeta ul li {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

/* ============================================
   🚦 Colores dinámicos de estado
============================================ */
.bg-red-500    { border-top-color: #ef4444; }
.bg-yellow-500 { border-top-color: #facc15; }
.bg-green-500  { border-top-color: #22c55e; }
.bg-gray-500   { border-top-color: #64748b; }

/* ============================================
   🧭 Botón de estado
============================================ */
.estado-boton {
  background-color: #ef4444; /* se sobrescribe dinámicamente */
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* ============================================
   📊 Bloques KPI y comparativos
============================================ */
.kpi-bloque,
.comparativos {
  background-color: #1e293b;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.kpi-bloque p,
.comparativos p {
  margin: 0.3rem 0;
}

/* ============================================
   🧩 Línea divisoria y pie de tarjeta
============================================ */
.divisor {
  border-top: 1px solid var(--color-divisor);
  margin: 0.5rem 0;
}

.footer {
  text-align: center;
  padding: 1rem;
  background-color: var(--color-header);
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* ============================================
   🧠 Estados especiales de tarjeta
============================================ */

/* Tarjeta con pocos datos (compacta) */
.tarjeta.compacta {
  min-height: 220px;
  padding: 1rem;
  gap: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Tarjeta vacía (sin datos heredados) */
.tarjeta.vacia {
  background-color: #475569;
  color: #cbd5e1;
  font-style: italic;
  text-align: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Tarjeta inactiva (activo = F) */
.tarjeta.inactiva {
  opacity: 0.5;
  pointer-events: none;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Contenido interno para tarjetas vacías */
.contenido-vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
 