/* 
   Variables globales
 */

:root {
    --color-bg: #f5faf7;
    --color-bg-soft: #eef7f2;
    --color-surface: #ffffff;
    --color-surface-soft: #f8fbf9;
  
    --color-text: #10201c;
    --color-text-soft: #33423d;
    --color-muted: #6b7b75;
  
    --color-primary: #0f766e;
    --color-primary-dark: #0b5f59;
    --color-primary-soft: #dff4ef;
    --color-primary-extra-soft: #eefaf7;
  
    --color-secondary: #2563eb;
    --color-secondary-soft: #e7efff;
  
    --color-ambiental: #3f7d2a;
    --color-ambiental-soft: #eaf6e5;
  
    --color-social: #c6533d;
    --color-social-soft: #fdece7;
  
    --color-gobernanza: #2563eb;
    --color-gobernanza-soft: #e8f0ff;
  
    --color-alineamiento: #d99522;
    --color-alineamiento-soft: #fff3d8;
  
    --color-border: #dfe9e4;
    --color-border-strong: #c8d8d0;
  
    --shadow-soft: 0 20px 55px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 16px 38px rgba(15, 23, 42, 0.07);
    --shadow-small: 0 8px 22px rgba(15, 23, 42, 0.06);
  
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;
  
    --container-width: 1180px;
  
    --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  
    --transition-fast: 160ms ease;
    --transition-normal: 220ms ease;
  }
  
  /* 
     Reset básico
   */
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-main);
    color: var(--color-text);
    background:
      radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 34rem),
      radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 30rem),
      var(--color-bg);
    line-height: 1.5;
  }
  
  button,
  select,
  input,
  textarea {
    font: inherit;
  }
  
  button {
    cursor: pointer;
  }
  
  a {
    color: inherit;
    text-decoration: none;
  }
  
  code {
    padding: 0.12rem 0.35rem;
    border-radius: 6px;
    background: #edf2f0;
    color: var(--color-primary-dark);
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.92em;
  }
  
  /* 
     Layout general
   */
  
  .app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .container {
    width: min(100% - 2rem, var(--container-width));
    margin-inline: auto;
  }
  
  main {
    flex: 1;
  }
  
  /* 
     Header
   */
  
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 250, 247, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(223, 233, 228, 0.9);
  }
  
  .header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }
  
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
  }
  
  .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background:
      linear-gradient(135deg, var(--color-primary), #16a394);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
  }
  
  .brand-mark span {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }
  
  .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }
  
  .brand-text strong {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  
  .brand-text span {
    margin-top: 0.18rem;
    font-size: 0.76rem;
    color: var(--color-muted);
    font-weight: 600;
  }
  
  .main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(223, 233, 228, 0.9);
    box-shadow: var(--shadow-small);
  }
  
  .nav-link {
    border: 0;
    background: transparent;
    color: var(--color-text-soft);
    padding: 0.62rem 0.95rem;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 700;
    transition:
      background var(--transition-fast),
      color var(--transition-fast),
      box-shadow var(--transition-fast),
      transform var(--transition-fast);
  }
  
  .nav-link:hover {
    background: var(--color-primary-extra-soft);
    color: var(--color-primary-dark);
  }
  
  .nav-link.active {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
  }
  
  .header-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }
  
  /* 
     Botones
   */
  
  .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    font-weight: 800;
    transition:
      background var(--transition-fast),
      border-color var(--transition-fast),
      color var(--transition-fast),
      transform var(--transition-fast),
      box-shadow var(--transition-fast);
  }
  
  .btn:hover {
    transform: translateY(-1px);
  }
  
  .btn:active {
    transform: translateY(0);
  }
  
  .btn-outline {
    color: var(--color-primary-dark);
    background: #ffffff;
    border-color: var(--color-border);
    box-shadow: var(--shadow-small);
  }
  
  .btn-outline:hover {
    background: var(--color-primary-extra-soft);
    border-color: var(--color-primary);
  }
  
  .btn-light {
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
    border-color: transparent;
  }
  
  .btn-light:hover {
    background: #cceee6;
  }
  
  /* 
     Hero
   */
  
  .hero-section {
    padding: 3.25rem 0 1.8rem;
  }
  
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 2rem;
    align-items: end;
  }
  
  .hero-copy {
    max-width: 760px;
  }
  
  .eyebrow {
    margin: 0 0 0.65rem;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }
  
  .hero-copy h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.15rem, 4.8vw, 4.7rem);
    line-height: 0.98;
    letter-spacing: -0.075em;
    color: var(--color-text);
  }
  
  .hero-description {
    margin: 1.2rem 0 0;
    max-width: 660px;
    color: var(--color-text-soft);
    font-size: 1.05rem;
  }
  
  .hero-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(223, 233, 228, 0.95);
    box-shadow: var(--shadow-card);
  }
  
  .status-label {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 700;
  }
  
  .hero-status-card strong {
    display: block;
    color: var(--color-text);
    font-size: 0.98rem;
  }
  
  .status-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 7px rgba(245, 158, 11, 0.16);
    flex: 0 0 auto;
  }
  
  .status-dot.is-ok {
    background: #10b981;
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.16);
  }
  
  .status-dot.is-error {
    background: #ef4444;
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0.16);
  }
  
  /* 
     Bloques y cabeceras de sección
   */
  
  .filters-section,
  .dashboard-section {
    padding: 1.2rem 0;
  }
  
  .dashboard-section {
    padding-bottom: 3rem;
  }
  
  .section-heading {
    margin-bottom: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
  }
  
  .section-heading h2 {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1.45rem, 2.4vw, 2.25rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
  }
  
  .section-description {
    max-width: 430px;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.95rem;
  }
  
  /* 
     Filtros
   */
  
  .filters-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1rem;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(223, 233, 228, 0.95);
    box-shadow: var(--shadow-card);
  }
  
  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }
  
  .filter-group label {
    color: var(--color-text-soft);
    font-size: 0.78rem;
    font-weight: 800;
  }
  
  .filter-group select {
    width: 100%;
    min-height: 45px;
    padding: 0 2.4rem 0 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background-color: var(--color-surface-soft);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 650;
    outline: none;
    transition:
      background var(--transition-fast),
      border-color var(--transition-fast),
      box-shadow var(--transition-fast);
    appearance: none;
    background-image:
      linear-gradient(45deg, transparent 50%, var(--color-primary) 50%),
      linear-gradient(135deg, var(--color-primary) 50%, transparent 50%);
    background-position:
      calc(100% - 18px) 19px,
      calc(100% - 12px) 19px;
    background-size:
      6px 6px,
      6px 6px;
    background-repeat: no-repeat;
  }
  
  .filter-group select:hover {
    border-color: var(--color-border-strong);
    background-color: #ffffff;
  }
  
  .filter-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.11);
    background-color: #ffffff;
  }
  
  /* 
     Vistas dashboard
   */
  
  .dashboard-view {
    display: none;
    animation: fadeInUp 220ms ease both;
  }
  
  .dashboard-view.active {
    display: block;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(7px);
    }
  
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* 
     KPIs
   */
  
  .kpi-grid {
    display: grid;
    grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.1rem;
  }
  
  .kpi-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 1.15rem;
    border-radius: var(--radius-lg);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
    border: 1px solid rgba(223, 233, 228, 0.96);
    box-shadow: var(--shadow-card);
  }
  
  .kpi-card::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -42px;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    background: rgba(15, 118, 110, 0.08);
  }
  
  .kpi-card-main {
    background:
      radial-gradient(circle at top right, rgba(15, 118, 110, 0.17), transparent 12rem),
      #ffffff;
  }
  
  .kpi-ambiental::after {
    background: rgba(63, 125, 42, 0.13);
  }
  
  .kpi-social::after {
    background: rgba(198, 83, 61, 0.13);
  }
  
  .kpi-gobernanza::after {
    background: rgba(37, 99, 235, 0.13);
  }
  
  .kpi-label {
    position: relative;
    z-index: 1;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 800;
  }
  
  .kpi-value {
    position: relative;
    z-index: 1;
    margin-top: 0.35rem;
    color: var(--color-text);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    font-weight: 850;
    letter-spacing: -0.06em;
  }
  
  .kpi-caption {
    position: relative;
    z-index: 1;
    margin-top: 0.8rem;
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 550;
  }
  
  .kpi-ambiental .kpi-label,
  .kpi-ambiental .kpi-value {
    color: var(--color-ambiental);
  }
  
  .kpi-social .kpi-label,
  .kpi-social .kpi-value {
    color: var(--color-social);
  }
  
  .kpi-gobernanza .kpi-label,
  .kpi-gobernanza .kpi-value {
    color: var(--color-gobernanza);
  }
  
  /* 
     Cards de gráficos
   */
  
  .charts-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .charts-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .chart-card,
  .map-card {
    margin-bottom: 1rem;
    padding: 1.15rem;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(223, 233, 228, 0.96);
    box-shadow: var(--shadow-card);
  }
  
  .card-heading {
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .card-heading h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.06rem;
    letter-spacing: -0.03em;
  }
  
  .card-heading p {
    margin: 0.25rem 0 0;
    color: var(--color-muted);
    font-size: 0.88rem;
  }
  
  .chart {
    width: 100%;
    height: 360px;
    min-height: 320px;
  }
  
  .chart-wide {
    height: 420px;
  }
  
  /* 
     Mapas
   */
  
  .map-card {
    overflow: hidden;
  }
  
  .map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1rem;
    align-items: stretch;
  }
  
  .map {
    width: 100%;
    min-height: 460px;
    height: 460px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
      radial-gradient(circle at 20% 20%, rgba(15, 118, 110, 0.08), transparent 18rem),
      #e8f1ed;
    border: 1px solid var(--color-border);
    z-index: 1;
  }
  
  .map-side-panel {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background:
      linear-gradient(180deg, rgba(248, 251, 249, 0.98), rgba(255, 255, 255, 0.92));
    border: 1px solid var(--color-border);
  }
  
  .map-side-panel h4 {
    margin: 0;
    color: var(--color-text);
    font-size: 0.98rem;
    letter-spacing: -0.02em;
  }
  
  .map-side-panel p {
    margin: 0.55rem 0 1rem;
    color: var(--color-muted);
    font-size: 0.88rem;
  }
  
  .map-legend {
    margin-top: 1rem;
  }
  
  .legend-title {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--color-text-soft);
    font-size: 0.78rem;
    font-weight: 800;
  }
  
  .legend-gradient {
    width: 100%;
    height: 12px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, #e8f5e9, var(--color-primary), #064e3b);
    border: 1px solid rgba(15, 118, 110, 0.16);
  }
  
  .map-legend-ambiental .legend-gradient {
    background: linear-gradient(90deg, #eaf6e5, #76b852, var(--color-ambiental));
  }
  
  .map-legend-social .legend-gradient {
    background: linear-gradient(90deg, #fdece7, #e3816e, var(--color-social));
  }
  
  .map-legend-gobernanza .legend-gradient {
    background: linear-gradient(90deg, #e8f0ff, #7da7f7, var(--color-gobernanza));
  }
  
  .map-legend-alineamiento .legend-gradient {
    background: linear-gradient(90deg, #fff3d8, #f0b44a, var(--color-alineamiento));
  }
  
  .legend-values {
    margin-top: 0.35rem;
    display: flex;
    justify-content: space-between;
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 700;
  }
  
  /* Leaflet: adaptación visual al estilo de la web */
  
  .leaflet-container {
    font-family: var(--font-main);
    color: var(--color-text);
    background: #e8f1ed;
  }
  
  .leaflet-control-zoom {
    border: 0 !important;
    box-shadow: var(--shadow-small);
  }
  
  .leaflet-control-zoom a {
    color: var(--color-primary-dark) !important;
    border-color: var(--color-border) !important;
  }
  
  .leaflet-control-attribution {
    border-radius: var(--radius-pill) 0 0 0;
    background: rgba(255, 255, 255, 0.82) !important;
    color: var(--color-muted) !important;
    font-size: 0.68rem;
  }
  
  .leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: var(--shadow-card);
  }
  
  .leaflet-popup-content {
    margin: 0.8rem 0.9rem;
    color: var(--color-text);
    font-family: var(--font-main);
  }
  
  .map-popup {
    min-width: 170px;
  }
  
  .map-popup strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--color-text);
    font-size: 0.95rem;
  }
  
  .map-popup span {
    display: block;
    color: var(--color-muted);
    font-size: 0.78rem;
  }
  
  .map-popup .map-popup-value {
    margin-top: 0.55rem;
    color: var(--color-primary-dark);
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -0.04em;
  }
  
  .map-popup .map-popup-count {
    margin-top: 0.15rem;
    color: var(--color-text-soft);
    font-size: 0.82rem;
    font-weight: 700;
  }
  
  .map-empty-message {
    display: grid;
    place-items: center;
    min-height: 460px;
    height: 460px;
    border-radius: var(--radius-lg);
    background: var(--color-surface-soft);
    border: 1px dashed var(--color-border-strong);
    color: var(--color-muted);
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
  }
  
  /* 
     Empty states
   */
  
  .empty-state {
    margin-bottom: 1rem;
    padding: 2rem;
    border-radius: var(--radius-xl);
    background:
      radial-gradient(circle at top right, rgba(217, 149, 34, 0.14), transparent 18rem),
      rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(223, 233, 228, 0.96);
    box-shadow: var(--shadow-card);
    text-align: center;
  }
  
  .empty-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--color-alineamiento);
    background: var(--color-alineamiento-soft);
    font-size: 1.4rem;
    font-weight: 900;
  }
  
  .empty-state h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
  }
  
  .empty-state p {
    max-width: 650px;
    margin: 0.7rem auto 0;
    color: var(--color-muted);
  }
  
  /* 
     Footer
   */
  
  .site-footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid rgba(223, 233, 228, 0.95);
    background: rgba(255, 255, 255, 0.6);
  }
  
  .footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
  }
  
  .footer-inner strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
  }
  
  .footer-inner p,
  .footer-meta {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.86rem;
  }
  
  .footer-meta {
    text-align: right;
  }
  
  /* 
     Estados de carga/error
   */
  
  .is-loading {
    opacity: 0.68;
    pointer-events: none;
  }
  
  .error-message {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.92rem;
    font-weight: 650;
  }
  
  .success-message {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #065f46;
    font-size: 0.92rem;
    font-weight: 650;
  }
  
  /* 
     Tablas futuras
   */
  
  .table-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
  }
  
  .table-wrapper {
    width: 100%;
    overflow-x: auto;
  }
  
  .data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    font-size: 0.9rem;
  }
  
  .data-table th {
    color: var(--color-text-soft);
    background: var(--color-surface-soft);
    font-weight: 800;
  }
  
  .data-table td {
    color: var(--color-text);
  }
  
  .data-table tr:last-child td {
    border-bottom: 0;
  }
  
  /* 
     Responsive
   */
  
  @media (max-width: 1120px) {
    .header-inner {
      flex-wrap: wrap;
      padding: 0.75rem 0;
    }
  
    .main-nav {
      order: 3;
      width: 100%;
      overflow-x: auto;
      justify-content: flex-start;
      border-radius: 18px;
    }
  
    .nav-link {
      white-space: nowrap;
    }
  
    .hero-grid {
      grid-template-columns: 1fr;
      align-items: stretch;
    }
  
    .hero-status-card {
      max-width: 430px;
    }
  
    .filters-panel {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  
    .kpi-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  
    .kpi-card-main {
      grid-column: span 1;
    }
  
    .map-layout {
      grid-template-columns: 1fr;
    }
  
    .map-side-panel {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 260px;
      gap: 1rem;
      align-items: center;
    }
  
    .map-side-panel p {
      margin-bottom: 0;
    }
  
    .map-legend {
      margin-top: 0;
    }
  }
  
  @media (max-width: 860px) {
    .container {
      width: min(100% - 1.25rem, var(--container-width));
    }
  
    .hero-section {
      padding-top: 2rem;
    }
  
    .hero-copy h1 {
      letter-spacing: -0.055em;
    }
  
    .section-heading {
      align-items: flex-start;
      flex-direction: column;
    }
  
    .filters-panel {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      border-radius: var(--radius-lg);
    }
  
    .kpi-grid,
    .kpi-grid-compact,
    .charts-grid-2 {
      grid-template-columns: 1fr;
    }
  
    .chart {
      height: 320px;
    }
  
    .chart-wide {
      height: 360px;
    }
  
    .map {
      min-height: 390px;
      height: 390px;
    }
  
    .map-empty-message {
      min-height: 390px;
      height: 390px;
    }
  
    .map-side-panel {
      grid-template-columns: 1fr;
    }
  
    .footer-inner {
      flex-direction: column;
    }
  
    .footer-meta {
      text-align: left;
    }
  }
  
  @media (max-width: 620px) {
    .header-inner {
      gap: 0.85rem;
    }
  
    .brand-mark {
      width: 42px;
      height: 42px;
    }
  
    .brand-text strong {
      font-size: 0.95rem;
    }
  
    .header-actions {
      width: 100%;
    }
  
    .header-actions .btn {
      width: 100%;
    }
  
    .main-nav {
      padding: 0.25rem;
    }
  
    .nav-link {
      padding: 0.56rem 0.8rem;
      font-size: 0.82rem;
    }
  
    .hero-copy h1 {
      font-size: 2.2rem;
    }
  
    .hero-description {
      font-size: 0.98rem;
    }
  
    .filters-panel {
      grid-template-columns: 1fr;
      padding: 0.85rem;
    }
  
    .kpi-card {
      min-height: 132px;
    }
  
    .kpi-value {
      font-size: 2.15rem;
    }
  
    .chart-card,
    .map-card {
      padding: 0.95rem;
      border-radius: var(--radius-lg);
    }
  
    .chart {
      height: 300px;
      min-height: 280px;
    }
  
    .map {
      min-height: 330px;
      height: 330px;
      border-radius: var(--radius-md);
    }
  
    .map-empty-message {
      min-height: 330px;
      height: 330px;
      border-radius: var(--radius-md);
    }
  
    .empty-state {
      padding: 1.5rem 1rem;
    }
  }
  
  /* 
     Preferencias de accesibilidad
   */
  
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      transition: none !important;
      animation: none !important;
    }
  }