/*
 * ========================================
 * AZUL COBALTO - SISTEMA DE DISEÑO
 * ========================================
 * Sistema de monitoreo de mortalidad policial
 * y vulnerabilidad institucional en México
 * 
 * Archivo de estilos centralizado - v2.1
 * Actualizado: 2026-01-31
 * Mejoras: Contraste WCAG 2.1 AA, Tipografía consistente, Layout corregido
 * ========================================
 */

/* ========================================
   VARIABLES CSS
======================================== */
:root {
  /* Paleta de colores principal */
  --azul-cobalto: #0047ab;
  --azul-oscuro: #003380;
  --azul-claro: #5b9bd5;
  --gris-oscuro: #2c3e50;
  --gris-medio: #6c757d;
  --gris-claro: #ecf0f1;
  --blanco: #ffffff;

  /* Colores de estado */
  --exito: #28a745;
  --advertencia: #ffc107;
  --peligro: #dc3545;
  --info: #17a2b8;

  /* Tipografía */
  --fuente-principal: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --fuente-monospace: "Courier New", monospace;

  /* Espaciado */
  --espaciado-xs: 0.25rem;
  --espaciado-sm: 0.5rem;
  --espaciado-md: 1rem;
  --espaciado-lg: 1.5rem;
  --espaciado-xl: 2rem;

  /* Sombras */
  --sombra-suave: 0 2px 8px rgba(0, 0, 0, 0.1);
  --sombra-media: 0 4px 12px rgba(0, 0, 0, 0.15);
  --sombra-fuerte: 0 8px 24px rgba(0, 0, 0, 0.2);

  /* Bordes */
  --border-radius: 8px;
  --border-radius-lg: 12px;

  /* Transiciones */
  --transicion-rapida: 0.2s ease;
  --transicion-media: 0.3s ease;
  --transicion-lenta: 0.5s ease;
}

/* ========================================
 RESET Y ESTILOS BASE
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--fuente-principal);
  color: var(--gris-oscuro);
  background-color: var(--gris-claro);
  line-height: 1.6;
}

/* ========================================
 JERARQUÍA TIPOGRÁFICA CONSISTENTE
======================================== */

/* Títulos de Sección Principal */
.section-title,
h2.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--azul-cobalto);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

/* Subtítulos de Card */
.card-title,
h5.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--azul-cobalto);
  margin-bottom: 1rem;
  line-height: 1.3;
}

/* Títulos internos de Card Body */
h6.text-secondary,
.card-body h6 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gris-oscuro);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Texto de etiquetas/labels */
.text-muted,
small.text-muted {
  font-size: 0.875rem;
  color: var(--gris-medio) !important;
  line-height: 1.5;
}

/* Números destacados */
h3,
h4 {
  font-weight: 700;
  color: var(--gris-oscuro);
  line-height: 1.2;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h1,
h2,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--gris-oscuro);
}

/* ========================================
 NAVBAR / HEADER
======================================== */
.navbar {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  );
  box-shadow: var(--sombra-media);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  color: var(--blanco) !important;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: all var(--transicion-rapida);
}

.navbar-brand i {
  margin-right: 0.75rem;
  font-size: 2rem;
  color: var(--azul-claro);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border-radius: var(--border-radius);
  transition: all var(--transicion-rapida);
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--blanco) !important;
}

.navbar-nav .nav-link.active {
  background-color: var(--azul-claro);
  color: var(--blanco) !important;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========================================
 HERO SECTION
======================================== */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  );
  color: var(--blanco);
  padding: 4rem 0;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  min-width: 150px;
  transition: all var(--transicion-rapida);
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--azul-claro);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

.period-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hero Stat - Versión compacta para datos principales */
.hero-stat {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stat h3 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.hero-stat p {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  opacity: 0.95;
  font-weight: 500;
}

.hero-stat small {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Responsive Hero */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }

  .hero-section h1 {
    font-size: 1.75rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-item {
    min-width: 120px;
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

/* ========================================
 SISTEMA DE TARJETAS (CARDS)
======================================== */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--sombra-suave);
  transition: all var(--transicion-media);
  background: var(--blanco);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--sombra-media);
  transform: translateY(-4px);
}

/* CARD HEADERS - CONTRASTE GARANTIZADO */
.card-header {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  ) !important;
  color: var(--blanco) !important;
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-bottom: none;
}

.card-header h5,
.card-header h6,
.card-header .h5,
.card-header .h6 {
  color: var(--blanco) !important;
  margin-bottom: 0;
  font-weight: 600;
}

.card-header small {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.875rem;
}

.card-header i {
  margin-right: 0.5rem;
  color: var(--azul-claro) !important;
}

.card-header.bg-primary {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  ) !important;
}

.card-header.text-white {
  color: var(--blanco) !important;
}

.card-header.bg-white {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  ) !important;
  color: var(--blanco) !important;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  color: var(--azul-cobalto);
  font-weight: 600;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--gris-oscuro);
  line-height: 1.6;
}

.card-footer {
  padding: 1rem 1.5rem;
  background-color: var(--gris-claro);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
}

/* Separación entre cards */
.card + .card,
.card.mt-4 {
  margin-top: 1.5rem;
}

/* Tarjetas con bordes de color */
.card-primary {
  border-left: 4px solid var(--azul-cobalto);
}

.card-success {
  border-left: 4px solid var(--exito);
}

.card-warning {
  border-left: 4px solid var(--advertencia);
}

.card-danger {
  border-left: 4px solid var(--peligro);
}

.card-info {
  border-left: 4px solid var(--info);
}

/* Stat Cards */
.stat-card {
  transition: all var(--transicion-media);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sombra-fuerte);
}

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
}

.icon-primary {
  background: linear-gradient(
    135deg,
    rgba(0, 71, 171, 0.1) 0%,
    rgba(0, 51, 128, 0.1) 100%
  );
  color: var(--azul-cobalto);
}

.icon-success {
  background: linear-gradient(
    135deg,
    rgba(40, 167, 69, 0.1) 0%,
    rgba(33, 136, 56, 0.1) 100%
  );
  color: var(--exito);
}

.icon-info {
  background: linear-gradient(
    135deg,
    rgba(23, 162, 184, 0.1) 0%,
    rgba(19, 132, 150, 0.1) 100%
  );
  color: var(--info);
}

/* ========================================
 CORRECCIONES PARA LAYOUT DE CARDS
======================================== */

/* Cards anidadas dentro de otras cards */
.card .card {
  background: var(--blanco);
  border: 1px solid var(--gris-claro);
  border-radius: var(--border-radius);
  box-shadow: none;
  transition: all var(--transicion-rapida);
}

.card .card:hover {
  box-shadow: var(--sombra-suave);
  transform: none;
}

/* Reducir padding en cards anidadas para mejor uso del espacio */
.card .card-body {
  padding: 1.25rem;
}

/* Asegurar grid correcto en pantallas grandes */
@media (min-width: 768px) {
  .card-body .row .col-md-6 {
    flex: 0 0 auto;
    width: 50%;
  }
}

/* Forzar altura completa */
.h-100 {
  height: 100% !important;
}

/* ========================================
 TABLAS
======================================== */
.table {
  background: var(--blanco);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--sombra-suave);
}

.table thead {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  ) !important;
}

.table thead th {
  color: var(--blanco) !important;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: none;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: all var(--transicion-rapida);
  border-bottom: 1px solid var(--gris-claro);
}

.table tbody tr:hover {
  background-color: rgba(91, 155, 213, 0.05);
  transform: scale(1.01);
}

.table tbody td {
  padding: 0.75rem 1rem;
  color: var(--gris-oscuro);
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(236, 240, 241, 0.5);
}

.table-sm thead th,
.table-sm tbody td {
  padding: 0.5rem 0.75rem;
}

/* Table Dark - Bootstrap override */
.table-dark,
.table-dark thead th,
.table-dark tbody th,
.table-dark tfoot th {
  background-color: var(--azul-oscuro) !important;
  color: var(--blanco) !important;
}

.table-dark tbody td {
  background-color: var(--gris-oscuro);
  color: var(--blanco);
}

/* Table Light */
.table-light thead {
  background: var(--gris-claro) !important;
}

.table-light thead th {
  color: var(--gris-oscuro) !important;
}

/* Custom table styling */
.table-custom thead {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  ) !important;
}

.table-custom thead th {
  color: var(--blanco) !important;
}

/* Responsive Tables */
@media (max-width: 768px) {
  .table-responsive {
    border-radius: var(--border-radius);
    box-shadow: var(--sombra-suave);
  }

  .table thead th {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .table tbody td {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }
}

/* ========================================
 BADGES Y ALERTS
======================================== */
.badge {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-primary {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  );
  color: var(--blanco);
}

.badge-success {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  color: var(--blanco);
}

.badge-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: var(--gris-oscuro);
}

.badge-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: var(--blanco);
}

.badge-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: var(--blanco);
}

.badge-secondary {
  background: linear-gradient(135deg, var(--gris-medio) 0%, #5a6268 100%);
  color: var(--blanco);
}

/* Badges con transparencia - contraste mejorado */
.bg-primary.bg-opacity-10 {
  background-color: rgba(0, 71, 171, 0.1) !important;
  color: var(--azul-cobalto) !important;
  font-weight: 600;
}

.bg-success.bg-opacity-10 {
  background-color: rgba(40, 167, 69, 0.1) !important;
  color: #1e7e34 !important;
  font-weight: 600;
}

.bg-danger.bg-opacity-10 {
  background-color: rgba(220, 53, 69, 0.1) !important;
  color: #c82333 !important;
  font-weight: 600;
}

.bg-secondary.bg-opacity-10 {
  background-color: rgba(108, 117, 125, 0.1) !important;
  color: #495057 !important;
  font-weight: 600;
}

.bg-info.bg-opacity-10 {
  background-color: rgba(23, 162, 184, 0.1) !important;
  color: #117a8b !important;
  font-weight: 600;
}

/* Alerts */
.alert {
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border: none;
  box-shadow: var(--sombra-suave);
  display: flex;
  align-items: center;
}

.alert i {
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.alert-primary {
  background: linear-gradient(
    135deg,
    rgba(0, 71, 171, 0.1) 0%,
    rgba(0, 51, 128, 0.1) 100%
  );
  color: var(--azul-oscuro);
  border-left: 4px solid var(--azul-cobalto);
}

.alert-success {
  background: linear-gradient(
    135deg,
    rgba(40, 167, 69, 0.1) 0%,
    rgba(33, 136, 56, 0.1) 100%
  );
  color: #155724;
  border-left: 4px solid var(--exito);
}

.alert-warning {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.1) 0%,
    rgba(224, 168, 0, 0.1) 100%
  );
  color: #856404;
  border-left: 4px solid var(--advertencia);
}

.alert-danger {
  background: linear-gradient(
    135deg,
    rgba(220, 53, 69, 0.1) 0%,
    rgba(200, 35, 51, 0.1) 100%
  );
  color: #721c24;
  border-left: 4px solid var(--peligro);
}

.alert-info {
  background: linear-gradient(
    135deg,
    rgba(23, 162, 184, 0.1) 0%,
    rgba(19, 132, 150, 0.1) 100%
  );
  color: #0c5460;
  border-left: 4px solid var(--info);
}

.alert-secondary {
  background: linear-gradient(
    135deg,
    rgba(108, 117, 125, 0.1) 0%,
    rgba(90, 98, 104, 0.1) 100%
  );
  color: #383d41;
  border-left: 4px solid var(--gris-medio);
}

/* ========================================
 TABS VERTICALES CON SIDEBAR
======================================== */
.sidebar-nav {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 1rem;
}

.nav-pills {
  display: flex;
  flex-direction: column;
}

.nav-pills .nav-link {
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gris-oscuro);
  transition: all var(--transicion-rapida);
  display: flex;
  align-items: center;
  font-weight: 500;
}

.nav-pills .nav-link i {
  margin-right: 0.75rem;
  font-size: 1.125rem;
  transition: all var(--transicion-rapida);
}

.nav-pills .nav-link:hover {
  background-color: var(--gris-claro);
  color: var(--azul-cobalto);
  transform: translateX(5px);
}

.nav-pills .nav-link.active {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  );
  color: var(--blanco);
  box-shadow: var(--sombra-suave);
}

.nav-pills .nav-link.active:hover {
  transform: translateX(0);
}

.tab-content {
  min-height: 200px;
}

.tab-pane {
  animation: fadeIn var(--transicion-media) ease-in;
}

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

/* Responsive Tabs */
@media (max-width: 768px) {
  .sidebar-nav {
    position: static;
    max-height: none;
    padding-right: 0;
    margin-bottom: 1.5rem;
  }

  .nav-pills {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-pills .nav-link:hover {
    transform: translateX(0);
  }
}

/* ========================================
 FOOTER
======================================== */
.footer {
  background: linear-gradient(135deg, var(--gris-oscuro) 0%, #1a252f 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer h5 {
  color: var(--blanco);
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all var(--transicion-rapida);
}

.footer a:hover {
  color: var(--azul-claro);
  transform: translateX(5px);
}

.footer-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-brand i {
  font-size: 2rem;
  color: var(--azul-claro);
  margin-right: 0.75rem;
}

.footer-brand span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blanco);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  display: flex;
  align-items: center;
}

.footer-links i {
  margin-right: 0.5rem;
  color: var(--azul-claro);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--transicion-rapida);
}

.social-links a:hover {
  background: var(--azul-cobalto);
  color: var(--blanco);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0.5rem;
}

.footer-bottom a:hover {
  color: var(--azul-claro);
  transform: none;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem;
    margin-top: 2rem;
  }

  .footer h5 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .footer-links li {
    margin-bottom: 0.5rem;
  }

  .social-links {
    justify-content: center;
  }
}

/* ========================================
 BOTONES
======================================== */
.btn {
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all var(--transicion-rapida);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.9375rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--azul-cobalto) 0%,
    var(--azul-oscuro) 100%
  );
  color: white;
  box-shadow: var(--sombra-suave);
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    var(--azul-oscuro) 0%,
    var(--azul-cobalto) 100%
  );
  box-shadow: var(--sombra-media);
  transform: translateY(-2px);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--sombra-suave);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--azul-claro) 0%, #4a9fd8 100%);
  color: white;
  box-shadow: var(--sombra-suave);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #4a9fd8 0%, var(--azul-claro) 100%);
  box-shadow: var(--sombra-media);
  transform: translateY(-2px);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  color: white;
  box-shadow: var(--sombra-suave);
}

.btn-success:hover {
  background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
  box-shadow: var(--sombra-media);
  transform: translateY(-2px);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  box-shadow: var(--sombra-suave);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  box-shadow: var(--sombra-media);
  transform: translateY(-2px);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: var(--gris-oscuro);
  box-shadow: var(--sombra-suave);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
  box-shadow: var(--sombra-media);
  transform: translateY(-2px);
  color: var(--gris-oscuro);
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
  box-shadow: var(--sombra-suave);
}

.btn-info:hover {
  background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
  box-shadow: var(--sombra-media);
  transform: translateY(-2px);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--azul-cobalto);
  color: var(--azul-cobalto);
}

.btn-outline-primary:hover {
  background: var(--azul-cobalto);
  color: white;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn i {
  margin-right: 0.5rem;
  font-size: 1.125em;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }
}

/* ========================================
 UTILIDADES DE TEXTO Y ESPACIADO
======================================== */

/* Tamaños de fuente estandarizados */
.fs-xl {
  font-size: 1.25rem !important;
}

.fs-lg {
  font-size: 1.125rem !important;
}

.fs-md {
  font-size: 1rem !important;
}

.fs-sm {
  font-size: 0.875rem !important;
}

.fs-xs {
  font-size: 0.75rem !important;
}

/* Pesos de fuente consistentes */
.fw-light {
  font-weight: 300 !important;
}

.fw-normal {
  font-weight: 400 !important;
}

.fw-medium {
  font-weight: 500 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

/* Colores de texto */
.text-azul-cobalto {
  color: var(--azul-cobalto) !important;
}

.text-azul-claro {
  color: var(--azul-claro) !important;
}

/* Backgrounds */
.bg-azul-cobalto {
  background-color: var(--azul-cobalto) !important;
}

.bg-azul-claro {
  background-color: var(--azul-claro) !important;
}

/* Sombras */
.shadow-soft {
  box-shadow: var(--sombra-suave) !important;
}

.shadow-medium {
  box-shadow: var(--sombra-media) !important;
}

.shadow-strong {
  box-shadow: var(--sombra-fuerte) !important;
}

/* Separación en rows */
.row.g-2 > * {
  padding-right: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  padding-left: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  margin-top: var(--bs-gutter-y, 0.5rem);
}

.row.g-3 > * {
  padding-right: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  padding-left: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  margin-top: var(--bs-gutter-y, 1rem);
}

.row.g-4 > * {
  padding-right: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  padding-left: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  margin-top: var(--bs-gutter-y, 1.5rem);
}

/* ========================================
 ACCESIBILIDAD - WCAG 2.1 AA
======================================== */

/* Focus visible */
a:focus,
button:focus,
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--azul-cobalto);
  outline-offset: 2px;
}

/* Contraste asegurado */
.text-muted {
  color: #6c757d !important;
}

/* ========================================
 RESPONSIVE - AJUSTES GLOBALES
======================================== */
@media (max-width: 768px) {
  .section-title,
  h2.section-title {
    font-size: 1.5rem;
  }

  .card-title,
  h5.card-title {
    font-size: 1.125rem;
  }

  h6.text-secondary,
  .card-body h6 {
    font-size: 0.9375rem;
  }

  .card-body {
    padding: 1rem;
  }

  .card-header {
    padding: 0.875rem 1rem;
  }

  .card-footer {
    padding: 0.75rem 1rem;
  }
}

/* ========================================
 COMPONENTES ADICIONALES
======================================== */

/* Info Cards */
.info-card {
  background: var(--blanco);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--sombra-suave);
  margin-bottom: 1.5rem;
}

.info-card h5 {
  color: var(--azul-cobalto);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.info-card h5 i {
  margin-right: 0.75rem;
}

/* Chart Container */
.chart-container {
  background: var(--blanco);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--sombra-suave);
  margin-bottom: 1.5rem;
}

.chart-container h5 {
  color: var(--azul-cobalto);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.chart-container h5 i {
  margin-right: 0.75rem;
}

/* Títulos en hero section - garantizar blanco puro */
.hero-section h1,
.hero-section .display-1,
.hero-section .display-2,
.hero-section .display-3,
.hero-section .display-4,
.hero-section .display-5,
.hero-section .display-6 {
  color: var(--blanco) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Párrafos lead en hero section */
.hero-section .lead {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Párrafos normales en hero section */
.hero-section p {
  color: rgba(255, 255, 255, 0.9);
}

.navbar-white {
  background: var(--blanco) !important;
  box-shadow: var(--sombra-suave);
}

.navbar-white .navbar-brand {
  color: var(--gris-oscuro) !important;
}

.navbar-white .navbar-brand:hover {
  color: var(--azul-cobalto) !important;
}

.navbar-white .nav-link {
  color: var(--gris-oscuro) !important;
}

.navbar-white .nav-link:hover {
  background-color: var(--gris-claro);
  color: var(--azul-cobalto) !important;
}

.navbar-white .nav-link.active {
  background-color: var(--azul-cobalto);
  color: var(--blanco) !important;
}

/* ========================================
 FIN DEL ARCHIVO
======================================== */
