/* ============================================
   ESTILOS DEL DASHBOARD SINERGIA UNGRD
   Dashboard profesional para indicadores
   ============================================ */

/* === VARIABLES CSS === */
:root {
  /* Colores principales - Paleta Institucional UNGRD */
  --primary-700: #213362;
  --primary-600: #1B4472;
  --primary-500: #07519D;
  --primary-400: #00AEE3;
  --primary-300: #76A2BE;
  --primary-200: #B2C9DA;
  --primary-100: #C8DCF0;
  --primary-50:  #E5F0F9;

  /* Colores de estado */
  --success-600: #74952B;
  --success-500: #A8CF45;
  --success-400: #C3E070;
  --success-100: #E5F4BE;
  --success-50:  #F2F9E0;

  --warning-600: #DCA732;
  --warning-500: #FFCD00;
  --warning-400: #FFE183;
  --warning-100: #FFF6CC;
  --warning-50:  #FFFAEA;

  --danger-600: #A24646;
  --danger-500: #C55555;
  --danger-100: #F0D2D2;
  --danger-50:  #F8EAEA;

  --info-600: #07519D;
  --info-500: #00AEE3;
  --info-100: #CCF0FA;
  --info-50:  #E5F8FE;
  
  /* Colores neutros */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  
  /* Fondos y superficies */
  --surface-primary: #ffffff;
  --surface-secondary: #f8fafc;
  --surface-tertiary: #f1f5f9;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
}

/* === LAYOUT PRINCIPAL === */
.dashboard {
  display: grid;
  position: relative;
  grid-template-columns: 1fr;
  grid-template-areas:
    "filters"
    "map"
    "content"
    "table";
  gap: 24px;
  padding: 24px;
  max-width: 1920px;
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .dashboard {
    grid-template-columns: minmax(350px, 400px) 1fr;
    grid-template-areas:
      "filters filters"
      "map content"
      "table table";
    gap: 28px;
    padding: 28px;
  }
}

@media (min-width: 1600px) {
  .dashboard {
    grid-template-columns: minmax(380px, 420px) 1fr;
    gap: 32px;
    padding: 32px;
  }
}

/* === HEADER DEL DASHBOARD === */
.dashboard__header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #213362;
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  border-bottom: 3px solid #FFCD00;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 70px;
}

.dashboard__brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Logo image (reemplaza el ícono cuadrado) */
.dashboard__logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(1.05);
}

.dashboard__titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dashboard__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard__title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0.2px;
}

.dashboard__live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(168, 207, 69, 0.18);
  color: #A8CF45;
  border: 1px solid rgba(168, 207, 69, 0.6);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.dashboard__live-dot {
  width: 7px;
  height: 7px;
  background: #A8CF45;
  border-radius: 50%;
  flex-shrink: 0;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* === FOOTER INSTITUCIONAL === */
.dashboard__footer {
  width: 100%;
  flex-shrink: 0;
  background: #213362;
  border-top: 3px solid #FFCD00;
  padding: 16px 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.18);
  margin-top: auto;
}

.dashboard__footer-social {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.dashboard__social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  transition: opacity 0.2s ease;
}

.dashboard__social-link:hover {
  opacity: 0.72;
}

.dashboard__social-icon {
  width: 38px;
  height: 38px;
  background: #FFCD00;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #213362;
}

.dashboard__social-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
}

.dashboard__footer-office {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.dashboard__footer-office .material-icons {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
}

.dashboard__subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  font-weight: 400;
}

.dashboard__period-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.dashboard__period-badge .material-icons {
  font-size: 18px;
  color: #FFCD00;
}

/* === SECCIÓN DE FILTROS === */
.filters-section {
  grid-area: filters;
  background: var(--surface-primary);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: center;
}

@media (min-width: 1600px) {
  .filters-grid {
    gap: 20px;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.filter-group--actions {
  min-width: fit-content;
}

.filter-group__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group__select {
  appearance: none;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 11px 40px 11px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2307519D' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-group__select:hover {
  border-color: var(--primary-500);
  background-color: var(--primary-50);
  box-shadow: 0 4px 6px rgba(27, 68, 114, 0.12);
  transform: translateY(-1px);
}

.filter-group__select:focus {
  outline: none;
  border-color: var(--primary-600);
  background-color: white;
  box-shadow: 0 0 0 4px var(--primary-100), 0 2px 4px rgba(27, 68, 114, 0.2);
}

.filters-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(27, 68, 114, 0.3), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-400) 100%);
  box-shadow: 0 6px 12px rgba(27, 68, 114, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(27, 68, 114, 0.3);
}

.btn--secondary {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn--secondary:hover {
  background: var(--gray-50);
  color: var(--gray-800);
  border-color: var(--gray-400);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.btn--secondary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn--small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn--small .material-icons {
  font-size: 16px;
}

.btn .material-icons {
  font-size: 18px;
}

/* Botón tipo icono */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background: var(--surface-primary);
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--gray-100);
  color: var(--primary-600);
  border-color: var(--primary-300);
  transform: rotate(15deg);
}

.btn-icon--reset:hover {
  color: var(--primary-600);
}

.btn-icon.spinning {
  animation: spin 0.5s ease-out;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === ACCIONES DEL MAPA === */
.map-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === PANEL IZQUIERDO (MAPA) === */
.map-panel {
  grid-area: map;
  background: var(--surface-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: flex-start; /* evita estirar el mapa cuando crece el contenido derecho */
}

.map-panel__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.map-panel__title {
  display: flex;
  align-items: center;

.col-map__canvas .shape--disabled {
  opacity: 0.35;
  filter: grayscale(0.6) saturate(0.6);
  cursor: not-allowed;
  pointer-events: none;
}

.col-map__canvas .shape--disabled:hover,
.col-map__canvas .shape--disabled:focus {
  transform: none;
  filter: grayscale(0.6) saturate(0.6);
}

.col-map__canvas .depts .shape.shape--available {
  fill: #B2C9DA;
  stroke: #76A2BE;
}

.col-map__canvas .depts .shape.shape--available:hover,
.col-map__canvas .depts .shape.shape--available:focus {
  fill: #76A2BE;
  stroke: #1B4472;
}

.col-map__canvas .munis .shape.shape--available {
  fill: #B2C9DA;
  stroke: #76A2BE;
}

.col-map__canvas .munis .shape.shape--available:hover,
.col-map__canvas .munis .shape.shape--available:focus {
  fill: #76A2BE;
  stroke: #1B4472;
}
  gap: 10px;
}

.map-panel__title h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.map-panel__title .material-icons {
  color: var(--primary-500);
  font-size: 22px;
}

.map-panel__body {
  flex: none;
  height: clamp(320px, 45vh, 480px); /* altura fija/responsiva para evitar que crezca con el resto del layout */
  position: relative;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
}

.map-panel__body #colombia-map-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-panel__body svg {
  width: 100%;
  height: 100%;
  max-width: 320px;
}

.map-panel__footer {
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, #EAF2FA 0%, #D4E6F1 100%);
  border-top: 1px solid var(--gray-200);
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}

.map-legend__label {
  color: var(--gray-700);
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.8125rem;
}

.map-legend__gradient {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 300px;
}

.map-legend__bar {
  flex: 1;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, #B2C9DA 0%, #1B4472 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.map-legend__marker {
  color: var(--gray-600);
  font-size: 0.75rem;
  white-space: nowrap;
  font-weight: 500;
}

.map-legend__marker--min {
  text-align: left;
}

.map-legend__marker--max {
  text-align: right;
}

.map-panel__filters {
  padding: 12px 16px 4px;
  background: white;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* === DROPDOWNS DEL MAPA === */
.map-dropdowns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.map-dropdown {
  position: relative;
  min-width: 0;
}

.map-dropdown__label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.map-dropdown__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-800);
  text-align: left;
  min-width: 0;
}

.map-dropdown__toggle:hover:not(:disabled) {
  border-color: var(--primary-400);
  background: var(--gray-50);
}

.map-dropdown__toggle:disabled {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
}

.map-dropdown__toggle .material-icons:first-child {
  font-size: 16px;
  color: var(--primary-500);
  flex-shrink: 0;
}

.map-dropdown__toggle:disabled .material-icons:first-child {
  color: var(--gray-400);
}

.map-dropdown__text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.map-dropdown__arrow {
  font-size: 18px;
  color: var(--gray-400);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.map-dropdown.open .map-dropdown__arrow {
  transform: rotate(180deg);
}

.map-dropdown.open .map-dropdown__toggle {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(7, 81, 157, 0.1);
}

.map-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 100%;
  box-sizing: border-box;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
  z-index: 9999;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.map-dropdown.open .map-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.map-dropdown__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-200);
  width: 100%;
  box-sizing: border-box;
}

.map-dropdown__search .material-icons {
  font-size: 18px;
  color: var(--gray-400);
}

.map-dropdown__search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--gray-800);
  background: transparent;
}

.map-dropdown__search input::placeholder {
  color: var(--gray-400);
}

.map-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
}

.map-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-700);
  transition: all var(--transition-fast);
}

.map-dropdown__item:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.map-dropdown__item.selected {
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 600;
}

.map-dropdown__item .material-icons {
  font-size: 16px;
  color: var(--primary-500);
}

.map-dropdown__item--empty {
  color: var(--gray-400);
  font-style: italic;
  cursor: default;
  justify-content: center;
  padding: 20px;
}

.map-dropdown__item--empty:hover {
  background: transparent;
  color: var(--gray-400);
}

.map-dropdown__item.hidden {
  display: none;
}

.map-dropdown__item--disabled {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

/* === PANEL DERECHO (CONTENIDO) === */
.content-panel {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: stretch;
}

/* === TARJETAS DE MÉTRICAS === */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

@media (min-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--metric-color, var(--primary-500));
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.metric-card--primary { --metric-color: var(--primary-500); }
.metric-card--success { --metric-color: var(--success-500); }
.metric-card--warning { --metric-color: var(--warning-500); }
.metric-card--info { --metric-color: var(--info-500); }

.metric-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.metric-card--primary .metric-card__icon {
  background: var(--primary-100);
  color: var(--primary-600);
}

.metric-card--success .metric-card__icon {
  background: var(--success-100);
  color: var(--success-600);
}

.metric-card--warning .metric-card__icon {
  background: var(--warning-100);
  color: var(--warning-600);
}

.metric-card--info .metric-card__icon {
  background: var(--info-100);
  color: var(--info-600);
}

.metric-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 50px;
}

.metric-card__trend--up {
  background: var(--success-50);
  color: var(--success-600);
}

.metric-card__trend--down {
  background: var(--danger-50);
  color: var(--danger-600);
}

.metric-card__trend .material-icons {
  font-size: 14px;
}

.metric-card__value {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}

.metric-card__subvalue {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 6px;
}

.metric-card__label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

/* === SECCIÓN DE INDICADOR SELECCIONADO === */
.indicator-detail {
  background: var(--surface-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.indicator-detail__header {
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
  color: white;
}

.indicator-detail__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.indicator-detail__tag .material-icons {
  font-size: 14px;
}

.indicator-detail__name {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
}

.indicator-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  opacity: 0.9;
}

.indicator-detail__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.indicator-detail__meta-item .material-icons {
  font-size: 16px;
}

.indicator-detail__body {
  padding: 24px;
}

/* === BARRAS DE PROGRESO === */
.progress-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .progress-section {
    grid-template-columns: 1fr;
  }
}

.progress-card {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
}

.progress-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.progress-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-card__title .material-icons {
  font-size: 18px;
  color: var(--primary-500);
}

.progress-card__percentage {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
}

.progress-bar {
  height: 12px;
  background: var(--gray-200);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-400) 100%);
  position: relative;
  overflow: hidden;
}

.progress-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateX(-100%);
  animation: progressShimmer 2s ease-in-out infinite;
  animation-delay: 0.8s;
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-bar__fill--success {
  background: linear-gradient(90deg, var(--success-500) 0%, var(--success-400) 100%);
}

.progress-bar__fill--warning {
  background: linear-gradient(90deg, var(--warning-500) 0%, var(--warning-400) 100%);
}

.progress-card__details {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray-600);
}

.progress-card__details span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* === SECCIÓN NARRATIVA CONTENEDOR === */
.narrative-section-container {
  background: var(--surface-primary);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.narrative-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.narrative-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.narrative-section__title .material-icons {
  color: var(--primary-500);
  font-size: 24px;
}

.narrative-section__title h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.narrative-section__indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-50);
  color: var(--primary-600);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
}

.narrative-section__indicator-badge .material-icons {
  font-size: 16px;
}

/* === GRID NARRATIVO === */
.narrative-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

.narrative-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.narrative-card:hover {
  box-shadow: var(--shadow-md);
}

.narrative-card__header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--gray-100);
}

.narrative-card__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.narrative-card__icon .material-icons {
  font-size: 18px;
}

.narrative-card--avances .narrative-card__icon {
  background: var(--success-100);
  color: var(--success-600);
}

.narrative-card--justificacion .narrative-card__icon {
  background: var(--info-100);
  color: var(--info-600);
}

.narrative-card--cuellos .narrative-card__icon {
  background: var(--warning-100);
  color: var(--warning-600);
}

.narrative-card--observaciones .narrative-card__icon {
  background: var(--primary-100);
  color: var(--primary-600);
}

.narrative-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.narrative-card__body {
  padding: 16px;
  max-height: 150px;
  overflow-y: auto;
}

.narrative-card__body::-webkit-scrollbar {
  width: 4px;
}

.narrative-card__body::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 2px;
}

.narrative-card__body::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 2px;
}

.narrative-card__body::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

.narrative-card__text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-600);
  margin: 0;
}

.narrative-card__empty {
  font-size: 13px;
  color: var(--gray-400);
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* === TABLA DE INDICADORES === */
.indicators-table-section {
  grid-area: table;
  background: var(--surface-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.indicators-table-section__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.indicators-table-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.indicators-table-section__title h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.indicators-table-section__title .material-icons {
  color: var(--primary-500);
  font-size: 24px;
}

.table-container {
  overflow-x: auto;
}

.indicators-table {
  width: 100%;
  border-collapse: collapse;
}

.indicators-table th {
  background: var(--gray-50);
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.indicators-table__year {
  background: var(--gray-50);
  color: var(--gray-600);
}

.indicators-table__year--vigencia {
  background: var(--gray-50);
  color: var(--gray-700);
  border-bottom: 3px solid var(--success-500);
}

.indicators-table__year--cuatrenio {
  background: var(--gray-50);
  color: var(--gray-700);
  border-bottom: 3px solid var(--info-500);
}

.indicators-table td {
  padding: 16px;
  font-size: 14px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.indicators-table tbody tr {
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  border-left: 4px solid transparent;
}

/* Colores de fondo sutil + borde lateral por posición - Paleta UNGRD */
.indicators-table tbody tr:nth-child(10n+1) {
  border-left-color: #07519D;
  background: linear-gradient(90deg, rgba(7, 81, 157, 0.08) 0%, rgba(7, 81, 157, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+2) {
  border-left-color: #A8CF45;
  background: linear-gradient(90deg, rgba(168, 207, 69, 0.08) 0%, rgba(168, 207, 69, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+3) {
  border-left-color: #FFCD00;
  background: linear-gradient(90deg, rgba(255, 205, 0, 0.08) 0%, rgba(255, 205, 0, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+4) {
  border-left-color: #EE7C00;
  background: linear-gradient(90deg, rgba(238, 124, 0, 0.08) 0%, rgba(238, 124, 0, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+5) {
  border-left-color: #1B4472;
  background: linear-gradient(90deg, rgba(27, 68, 114, 0.08) 0%, rgba(27, 68, 114, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+6) {
  border-left-color: #00AEE3;
  background: linear-gradient(90deg, rgba(0, 174, 227, 0.08) 0%, rgba(0, 174, 227, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+7) {
  border-left-color: #CD2180;
  background: linear-gradient(90deg, rgba(205, 33, 128, 0.08) 0%, rgba(205, 33, 128, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+8) {
  border-left-color: #DCA732;
  background: linear-gradient(90deg, rgba(220, 167, 50, 0.08) 0%, rgba(220, 167, 50, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+9) {
  border-left-color: #A24646;
  background: linear-gradient(90deg, rgba(162, 70, 70, 0.08) 0%, rgba(162, 70, 70, 0.03) 100%);
}
.indicators-table tbody tr:nth-child(10n+10) {
  border-left-color: #6C7175;
  background: linear-gradient(90deg, rgba(108, 113, 117, 0.08) 0%, rgba(108, 113, 117, 0.03) 100%);
}

/* Hover: intensifica ligeramente el color de la fila */
.indicators-table tbody tr:nth-child(10n+1):hover { background: linear-gradient(90deg, rgba(7, 81, 157, 0.14) 0%, rgba(7, 81, 157, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+2):hover { background: linear-gradient(90deg, rgba(168, 207, 69, 0.14) 0%, rgba(168, 207, 69, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+3):hover { background: linear-gradient(90deg, rgba(255, 205, 0, 0.14) 0%, rgba(255, 205, 0, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+4):hover { background: linear-gradient(90deg, rgba(238, 124, 0, 0.14) 0%, rgba(238, 124, 0, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+5):hover { background: linear-gradient(90deg, rgba(27, 68, 114, 0.14) 0%, rgba(27, 68, 114, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+6):hover { background: linear-gradient(90deg, rgba(0, 174, 227, 0.14) 0%, rgba(0, 174, 227, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+7):hover { background: linear-gradient(90deg, rgba(205, 33, 128, 0.14) 0%, rgba(205, 33, 128, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+8):hover { background: linear-gradient(90deg, rgba(220, 167, 50, 0.14) 0%, rgba(220, 167, 50, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+9):hover { background: linear-gradient(90deg, rgba(162, 70, 70, 0.14) 0%, rgba(162, 70, 70, 0.06) 100%); }
.indicators-table tbody tr:nth-child(10n+10):hover { background: linear-gradient(90deg, rgba(108, 113, 117, 0.14) 0%, rgba(108, 113, 117, 0.06) 100%); }

.indicators-table tbody tr.active {
  background: linear-gradient(90deg, var(--primary-100) 0%, var(--primary-50) 100%) !important;
  border-left-color: var(--primary-600) !important;
  box-shadow: inset 0 0 0 1px var(--primary-200);
}

.indicators-table__name {
  font-weight: 600;
  color: var(--gray-900);
  max-width: 340px;
  font-size: 13px;
  line-height: 1.4;
  padding-left: 12px;
}

.indicators-table__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.indicators-table__tag--conocimiento {
  background: var(--info-100);
  color: var(--info-600);
}

.indicators-table__tag--reduccion {
  background: var(--success-100);
  color: var(--success-600);
}

.indicators-table__tag--manejo {
  background: var(--warning-100);
  color: var(--warning-600);
}

.indicators-table__progress {
  width: 120px;
}

.indicators-table__progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 4px;
}

.indicators-table__progress-fill {
  height: 100%;
  border-radius: 50px;
  transition: width var(--transition-normal);
}

.indicators-table__progress-text {
  font-size: 12px;
  color: var(--gray-500);
}

.indicators-table__grouped-cell {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
  white-space: nowrap;
  background-color: transparent;
  transition: background-color var(--transition-fast);
  padding: 12px 14px;
  text-align: center;
}

.indicators-table__grouped-cell--vigencia {
  background: transparent;
  border-right: 1px solid var(--gray-200);
}

.indicators-table__grouped-cell--cuatrenio {
  background: var(--gray-50);
}

.indicators-table tbody tr:hover .indicators-table__grouped-cell--vigencia {
  background: rgba(16, 185, 129, 0.06);
}

.indicators-table tbody tr:hover .indicators-table__grouped-cell--cuatrenio {
  background: rgba(14, 165, 233, 0.06);
}

.indicators-table__grouped-label {
  display: block;
  font-size: 11px;
  color: var(--gray-500);
}

.indicators-table__value {
  font-weight: 700;
  color: var(--gray-900);
  font-size: 14px;
}

.indicators-table__value--avance {
  color: var(--gray-900);
}

.indicators-table__value--meta {
  color: var(--gray-500);
  font-weight: 500;
  font-size: 13px;
}

.indicators-table__value-separator {
  display: inline-block;
  margin: 0 5px;
  color: var(--gray-400);
  font-weight: 500;
}

/* Colores de avance en vigencia - verde */
.indicators-table__grouped-cell--vigencia .indicators-table__value--avance {
  color: var(--success-600);
}

/* Colores de avance en cuatrienio - azul */
.indicators-table__grouped-cell--cuatrenio .indicators-table__value--avance {
  color: var(--info-600);
}

.indicators-table__year {
  text-align: center;
  font-weight: 500;
  color: var(--gray-600);
}

/* === ESTADO VACÍO === */
.empty-state {
  padding: 60px 40px;
  text-align: center;
}

.empty-state__icon {
  width: 80px;
  height: 80px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.empty-state__icon .material-icons {
  font-size: 40px;
  color: var(--gray-400);
}

.empty-state__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-700);
  margin: 0 0 8px;
}

.empty-state__text {
  font-size: 14px;
  color: var(--gray-500);
  margin: 0;
}

/* === LOADER === */
.dashboard-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  gap: 16px;
}

.dashboard-loader__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.dashboard-loader__text {
  font-size: 14px;
  color: var(--gray-500);
}

/* === SKELETONS DE CARGA INICIAL POR SECCION === */
body.dashboard-initial-loading .filters-section,
body.dashboard-initial-loading .map-panel,
body.dashboard-initial-loading .metrics-grid,
body.dashboard-initial-loading .narrative-section-container,
body.dashboard-initial-loading .indicators-table-section,
body.dashboard-initial-loading .mapa-stage,
body.dashboard-initial-loading .mapa-sidepanel,
body.dashboard-initial-loading .mapa-filters-panel {
  position: relative;
}

body.dashboard-initial-loading .filter-group__select,
body.dashboard-initial-loading .map-dropdown__toggle,
body.dashboard-initial-loading .mapa-filter-group__select {
  color: transparent;
  pointer-events: none;
}

body.dashboard-initial-loading .filter-group,
body.dashboard-initial-loading .mapa-filter-group {
  position: relative;
}

body.dashboard-initial-loading .filter-group::after,
body.dashboard-initial-loading .mapa-filter-group::after,
body.dashboard-initial-loading .metric-card__value,
body.dashboard-initial-loading .metric-card__subvalue,
body.dashboard-initial-loading .narrative-card__text {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
}

body.dashboard-initial-loading .filter-group::after,
body.dashboard-initial-loading .mapa-filter-group::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  pointer-events: none;
}

body.dashboard-initial-loading .metric-card__value {
  min-height: 34px;
  width: 68%;
}

body.dashboard-initial-loading .metric-card__subvalue {
  min-height: 18px;
  width: 46%;
}

body.dashboard-initial-loading .narrative-card__text {
  min-height: 70px;
}

body.dashboard-initial-loading .map-panel__body::after,
body.dashboard-initial-loading .mapa-viewport-fullscreen::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, rgba(243, 244, 246, 0.78) 25%, rgba(229, 231, 235, 0.95) 50%, rgba(243, 244, 246, 0.78) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}

body.dashboard-initial-loading .mapa-viewport-fullscreen {
  position: relative;
}

/* === TOOLTIP PERSONALIZADO === */
.dashboard-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--gray-900);
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition-fast);
  max-width: 250px;
  box-shadow: var(--shadow-lg);
}

.dashboard-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === ANIMACIONES === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* === RESPONSIVO MÓVIL === */
@media (max-width: 767px) {
  /* Header compacto */
  .dashboard__header {
    padding: 10px 12px;
    gap: 8px;
    min-height: 56px;
    flex-wrap: nowrap;
    align-items: center;
  }

  .dashboard__brand {
    gap: 10px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .dashboard__logo-img {
    height: 34px;
  }

  .dashboard__title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Ocultar subtítulo y badge de periodo — demasiado texto para móvil */
  .dashboard__subtitle {
    display: none;
  }

  .dashboard__period-badge {
    display: none;
  }

  /* Grid: padding reducido */
  .dashboard {
    padding: 12px;
    gap: 12px;
  }

  /* Filtros: una columna */
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .filter-group--actions {
    min-width: 100%;
  }

  .filters-actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }

  .filters-actions .btn {
    flex: 1;
  }

  /* Métricas: 2 columnas */
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-card {
    padding: 14px 12px;
  }

  .metric-card__value {
    font-size: 24px;
  }

  /* Narrativa: 1 columna */
  .narrative-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Tabla: vista de tarjetas en móvil — sin scroll horizontal */
  .indicators-table-section {
    overflow-x: visible;
  }

  .table-container {
    overflow-x: visible;
    min-width: 0;
  }

  /* Convertir tabla a lista de tarjetas */
  .indicators-table,
  .indicators-table tbody {
    display: block;
    width: 100%;
  }

  /* Ocultar encabezado — las tarjetas muestran etiquetas propias */
  .indicators-table thead {
    display: none;
  }

  /* Cada fila = tarjeta con grid 2 columnas */
  .indicators-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
    /* border-left: 4px solid [color] heredado de las reglas nth-child */
  }

  /* Nombre: ocupa todo el ancho */
  .indicators-table__name {
    grid-column: 1 / -1;
    max-width: none;
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-100);
    line-height: 1.4;
  }

  /* Celdas de datos: bloque para que avance / meta queden inline en una línea */
  .indicators-table__grouped-cell {
    display: block;
    padding: 6px 10px 8px;
    white-space: normal;
    text-align: left;
    min-width: 0;
  }

  .indicators-table__grouped-cell--vigencia {
    border-right: 1px solid var(--gray-200);
  }

  /* Etiquetas de contexto via pseudo-element (bloque explícito) */
  .indicators-table__grouped-cell--vigencia::before {
    content: "Vigencia " attr(data-year);
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--success-600, #059669);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
  }

  .indicators-table__grouped-cell--cuatrenio::before {
    content: "Cuatrienio " attr(data-year);
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--info-600, #0284c7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
  }

  /* Ocultar "Avance / Meta" — los valores hablan por sí solos */
  .indicators-table__grouped-label {
    display: none;
  }

  /* Valores: inline para que 5.542 / 3.000 quede en una sola línea */
  .indicators-table__value {
    display: inline;
    font-size: 13px;
    font-weight: 700;
  }

  .indicators-table__value-separator {
    display: inline;
  }

  .indicators-table__value--meta {
    font-size: 12px;
    font-weight: 500;
  }

  .indicators-table-section__header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px;
  }

  /* Detalles */
  .indicator-detail__header {
    padding: 16px;
  }

  .indicator-detail__name {
    font-size: 16px;
  }

  .progress-section {
    grid-template-columns: 1fr;
  }

  /* Header del mapa */
  .dashboard__header--map {
    padding: 8px 12px;
    min-height: 52px;
  }

  .dashboard__header--map .dashboard__logo-img {
    height: 30px;
  }

  .dashboard__header--map .dashboard__title {
    font-size: 14px;
  }

  /* Ocultar badge "En vivo" — demasiado texto para móvil */
  .dashboard__live-badge {
    display: none;
  }

  /* Ocultar botones de pantalla completa y refrescar en móvil */
  .dashboard__map-actions {
    display: none;
  }

  /* Asegurar truncado correcto del título */
  .dashboard__titles {
    min-width: 0;
    overflow: hidden;
  }

  .dashboard__title-row {
    min-width: 0;
    overflow: hidden;
  }
}

@media (max-width: 400px) {
  /* Métricas: 1 columna en pantallas muy pequeñas */
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}


/* === UTILIDADES === */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =====================================================
   ANIMACIONES Y EFECTOS VISUALES
   ===================================================== */

/* Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

/* Clases de animación */
.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease-out forwards;
}

/* Delays escalonados para efecto cascada */
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }
.animate-delay-5 { animation-delay: 0.5s; opacity: 0; }
.animate-delay-6 { animation-delay: 0.6s; opacity: 0; }

/* Efectos hover mejorados para tarjetas métricas */
.metric-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.metric-card:active {
  transform: translateY(-2px);
}

/* Efecto brillo en hover para el valor de la métrica */
.metric-card:hover .metric-card__value {
  background: linear-gradient(
    90deg,
    var(--primary-500) 0%,
    var(--primary-400) 50%,
    var(--primary-500) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2s ease-in-out infinite;
}

/* Efectos para narrative cards */
.narrative-card {
  transition: all 0.3s ease;
}

.narrative-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.12);
}

/* Efectos para tabla */
.data-table tbody tr {
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background: linear-gradient(90deg, var(--primary-50) 0%, transparent 100%);
  transform: scale(1.005);
}

/* Panel de mapa con sombra mejorada */
.map-panel {
  transition: box-shadow 0.3s ease;
}

.map-panel:hover {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.12);
}

/* Botones con efectos */
.filter-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.15);
}

.filter-btn.active {
  animation: pulse 2s ease-in-out infinite;
}

/* Progress bar con animación */
.progress-fill {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efecto de carga skeleton */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-100) 25%,
    var(--surface-200) 50%,
    var(--surface-100) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-value {
  height: 32px;
  width: 60%;
}

/* Tooltip mejorado */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface-900);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Badge de estado con brillo */
.badge--success {
  position: relative;
  overflow: hidden;
}

.badge--success::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
}

/* Focus states mejorados para accesibilidad */
.filter-select:focus,
.filter-btn:focus-visible,
.btn-icon:focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
}

/* Reducir movimiento para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
