/* =====================================================
   FONDO GENERAL DE LA APP
   Fondo oscuro con brillo dorado sutil estilo CAP
===================================================== */

body {
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.05), transparent 18%),
    linear-gradient(180deg, #08111f 0%, #0b1020 100%);
}


/* =====================================================
   ESTRUCTURA PRINCIPAL DE APP
   Layout general con sidebar + contenido
===================================================== */

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(10, 15, 28, 0.95);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  backdrop-filter: blur(10px);
}

.main {
  padding: 28px;
}


/* =====================================================
   TOPBAR / ENCABEZADO GENERAL
   Encabezado principal reutilizable
===================================================== */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.page-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}


/* =====================================================
   TOPBAR DEL DASHBOARD
   Barra superior fija con acciones y navegación
===================================================== */

.app-topbar {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* =====================================================
   CONTENEDOR CENTRAL
   Ancho máximo y padding principal de pantallas
===================================================== */

.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
}


/* =====================================================
   GRILLAS GENERALES
   Distribución de columnas para paneles y módulos
===================================================== */

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: 1fr;
}


/* =====================================================
   GRID DE ESTADISTICAS
   Tarjetas superiores del dashboard
   Pendientes / Usados / Monto pendiente
===================================================== */

.wrap .stats-grid {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.wrap .stats-grid .stat-card {
  flex: 1 1 0;
  min-width: 0;
}


/* =====================================================
   RESPONSIVE
   Ajustes para pantallas grandes
===================================================== */

@media (min-width: 960px) {

  .grid-2 {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    align-items: start;
  }

}