/* ==========================================================================
   PLAN DECENAL DE CULTURA DE SAN JERÓNIMO - DESIGN SYSTEM & STYLES
   Paleta institucional: Esmeralda colonial, Dorado cultural y Azul de gestión
   Soporte nativo Dark/Light, Micro-animaciones y Diseño Responsivo
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Primitives (Light Mode Default) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-card: rgba(255, 255, 255, 0.95);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  
  /* Institutional Cultural Brand Colors */
  --primary: #059669; /* Verde esmeralda institucional */
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --color-primary: #059669;
  --color-primary-dark: #047857;
  
  --accent-gold: #d97706; /* Oro colonial / patrimonio */
  --accent-gold-light: #fffbeb;
  
  --accent-blue: #2563eb;
  --accent-blue-light: #eff6ff;

  /* Semáforos y Estados */
  --status-over-text: #6d28d9;
  --status-over-bg: #f5f3ff;
  --status-over-border: #ddd6fe;

  --status-success-text: #15803d;
  --status-success-bg: #f0fdf4;
  --status-success-border: #bbf7d0;

  --status-progress-text: #0369a1;
  --status-progress-bg: #f0f9ff;
  --status-progress-border: #bae6fd;

  --status-warning-text: #b45309;
  --status-warning-bg: #fffbeb;
  --status-warning-border: #fde68a;

  --status-danger-text: #be123c;
  --status-danger-bg: #fff1f2;
  --status-danger-border: #fecdd3;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Fonts */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', var(--font-body);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-glass: rgba(17, 24, 39, 0.88);
  --bg-glass-card: rgba(17, 24, 39, 0.95);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  --border-color: #1f2937;
  --border-subtle: #182234;
  
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-light: rgba(16, 185, 129, 0.12);
  --primary-border: rgba(16, 185, 129, 0.25);
  --color-primary: #10b981;
  --color-primary-dark: #059669;
  
  --accent-gold: #f59e0b;
  --accent-gold-light: rgba(245, 158, 11, 0.12);
  
  --accent-blue: #3b82f6;
  --accent-blue-light: rgba(59, 130, 246, 0.12);

  --status-over-text: #c4b5fd;
  --status-over-bg: rgba(139, 92, 246, 0.15);
  --status-over-border: rgba(139, 92, 246, 0.3);

  --status-success-text: #86efac;
  --status-success-bg: rgba(34, 197, 94, 0.15);
  --status-success-border: rgba(34, 197, 94, 0.3);

  --status-progress-text: #7dd3fc;
  --status-progress-bg: rgba(14, 165, 233, 0.15);
  --status-progress-border: rgba(14, 165, 233, 0.3);

  --status-warning-text: #fcd34d;
  --status-warning-bg: rgba(245, 158, 11, 0.15);
  --status-warning-border: rgba(245, 158, 11, 0.3);

  --status-danger-text: #fda4af;
  --status-danger-bg: rgba(244, 63, 94, 0.15);
  --status-danger-border: rgba(244, 63, 94, 0.3);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Base Reset & Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-family: var(--font-heading);
}

/* Top Institutional Ribbon */
.top-ribbon {
  background: linear-gradient(90deg, #047857 0%, #059669 35%, #d97706 70%, #b45309 100%);
  height: 4px;
  width: 100%;
}

/* Header Component */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: var(--shadow-sm);
  background: white;
  padding: 2px;
  border: 1px solid var(--border-color);
}

.brand-info h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.brand-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Header Actions & Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.year-switcher {
  display: flex;
  background-color: var(--bg-body);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.year-btn {
  background: none;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.year-btn:hover {
  color: var(--text-main);
}

.year-btn.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.35);
}

.year-btn.special-year.active {
  background: linear-gradient(135deg, #059669, #0d9488);
}

/* Dual Metric Toggle */
.metric-pill-toggle {
  display: flex;
  align-items: center;
  background-color: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
}

.metric-toggle-btn {
  border: none;
  background: none;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.metric-toggle-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
  border: 1px solid var(--primary);
}

/* Cap Toggle Switch */
.cap-switch-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border-color);
  transition: 0.3s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

input:checked + .slider {
  background-color: var(--accent-gold);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Icon Action Buttons */
.btn-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon-circle:hover {
  color: var(--text-main);
  background-color: var(--bg-body);
  border-color: var(--text-light);
}

.btn-secondary {
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: var(--bg-body);
  border-color: var(--text-muted);
}

.btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
  transition: all 0.2s;
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Sub-Nav Module Tabs */
.subnav-tabs-wrapper {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}

.subnav-tabs {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.85rem 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  white-space: nowrap;
  font-family: var(--font-heading);
  transition: color 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  background-color: var(--primary);
  border-radius: 2px 2px 0 0;
}

.tab-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-body);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.tab-btn.active .tab-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Main Container */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
  flex: 1;
}

/* App View Containers */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* Section Header */
.section-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* KPI Summary Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon.primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.kpi-icon.gold {
  background-color: var(--accent-gold-light);
  color: var(--accent-gold);
}

.kpi-icon.blue {
  background-color: var(--accent-blue-light);
  color: var(--accent-blue);
}

.kpi-icon.danger {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-text);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.kpi-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.progress-track {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar-fill.emerald {
  background: linear-gradient(90deg, #10b981, #059669);
}

.progress-bar-fill.gold {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-bar-fill.blue {
  background: linear-gradient(90deg, #38bdf8, #0284c7);
}

/* Rescued Goals Banner */
.rescued-goals-banner {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.rescued-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.rescued-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}

.rescued-text h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rescued-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rescued-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rescued-chip {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s;
}

.rescued-chip:hover {
  border-color: var(--accent-gold);
  background-color: var(--accent-gold-light);
}

.rescued-chip .check-icon {
  color: var(--primary);
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

.chart-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.chart-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--bg-body);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.chart-container {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 280px;
}

/* Secondary Charts Row */
.secondary-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

/* Filters & Toolbar Component */
.filter-toolbar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.filter-row {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-box-wrapper {
  position: relative;
  flex: 2;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.filter-select {
  flex: 1;
  min-width: 160px;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 0.82rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.view-layout-toggle {
  display: flex;
  gap: 4px;
  background-color: var(--bg-body);
  border: 1px solid var(--border-color);
  padding: 2px;
  border-radius: var(--radius-sm);
}

.layout-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.layout-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.35);
}

/* Indicators Cards View */
.indicators-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.indicator-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  position: relative;
}

.indicator-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.ind-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.ind-code-pill {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-body);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.ind-project-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ind-meta-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ind-progress-section {
  background-color: var(--bg-body);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.ind-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.ind-progress-percent {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
}

.ind-progress-units {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ind-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ind-resp-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 65%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Semaphore Status Badges */
.badge-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-status.overachieved {
  background-color: var(--status-over-bg);
  color: var(--status-over-text);
  border: 1px solid var(--status-over-border);
}

.badge-status.success {
  background-color: var(--status-success-bg);
  color: var(--status-success-text);
  border: 1px solid var(--status-success-border);
}

.badge-status.progress {
  background-color: var(--status-progress-bg);
  color: var(--status-progress-text);
  border: 1px solid var(--status-progress-border);
}

.badge-status.warning {
  background-color: var(--status-warning-bg);
  color: var(--status-warning-text);
  border: 1px solid var(--status-warning-border);
}

.badge-status.danger {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-text);
  border: 1px solid var(--status-danger-border);
}

.badge-status.neutral {
  background-color: var(--bg-body);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Evidence Badges */
.badge-evidence {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-evidence.si {
  background-color: var(--status-success-bg);
  color: var(--status-success-text);
}

.badge-evidence.parcial {
  background-color: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.badge-evidence.no {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-text);
}

.badge-evidence.none {
  background-color: var(--bg-body);
  color: var(--text-light);
}

/* Indicators Table View */
.indicators-table-view {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.data-table th {
  background-color: var(--bg-body);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover {
  color: var(--text-main);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.15s;
}

.data-table tbody tr:hover {
  background-color: var(--primary-light);
  cursor: pointer;
}

/* Team & Evidence Audit Module */
.audit-overview-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--primary-light));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.team-member-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.team-member-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.member-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.member-info h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.member-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.member-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background-color: var(--bg-body);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
}

.member-stat-box {
  text-align: center;
}

.member-stat-val {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-main);
}

.member-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.member-evidence-row {
  display: flex;
  justify-content: space-around;
  font-size: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

/* PDD Alignment Module */
.pdd-category-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pdd-header {
  padding: 1rem 1.25rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.pdd-header:hover {
  background-color: var(--bg-body);
}

.pdd-code-badge {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
}

/* Dialog Modal Component */
dialog.indicator-modal {
  border: none;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-xl);
  max-width: 680px;
  width: 90%;
  margin: auto;
  padding: 0;
  overflow: hidden;
}

dialog.indicator-modal::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background-color: var(--bg-body);
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-meta-item {
  background-color: var(--bg-body);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.modal-meta-item .lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.modal-meta-item .val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.modal-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modal-history-table th {
  background-color: var(--bg-body);
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.modal-history-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

/* Site Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-banner-img {
  max-width: 100%;
  height: auto;
  max-height: 80px;
  object-fit: contain;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   ESTILOS: PESTAÑA PROSPECTIVA 2027-2037
   ========================================================================== */

.prospectiva-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Sub-navegación modular interna */
.prospectiva-subnav-container {
  margin-bottom: 1.75rem;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.prospectiva-subnav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.prospectiva-subnav::-webkit-scrollbar {
  display: none;
}

.prospectiva-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.prospectiva-subnav-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-surface-elevated);
}

.prospectiva-subnav-btn.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover)) !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35) !important;
  border-color: var(--primary-hover) !important;
}

/* Paneles de los sub-módulos */
.prospectiva-module-pane {
  display: none;
}

.prospectiva-module-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

/* Gráficas 2 columnas */
.charts-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

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

/* Barra de control de la Matriz de Auditoría */
.audit-toolbar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.audit-pills-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.audit-pill-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audit-pill-filter:hover {
  border-color: var(--color-primary);
}

.audit-pill-filter.active {
  background-color: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
}

.audit-pill-filter.filter-eliminar.active {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.audit-pill-filter.filter-reformular.active {
  background-color: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.audit-pill-filter.filter-mantener.active {
  background-color: #10b981;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.audit-pill-filter.filter-nuevo.active {
  background-color: #6366f1;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.audit-inputs-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.audit-count-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Cuadrícula de Tarjetas de Auditoría */
.audit-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.audit-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

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

.audit-card.eliminar {
  border-left: 5px solid #ef4444;
}

.audit-card.reformular {
  border-left: 5px solid #f59e0b;
}

.audit-card.mantener {
  border-left: 5px solid #10b981;
}

.audit-card.nuevo {
  border-left: 5px solid #6366f1;
}

.audit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.audit-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.audit-code-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  flex-shrink: 0;
}

.audit-project-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.audit-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.badge-audit-eliminar {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.badge-audit-reformular {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-audit-mantener {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-audit-nuevo {
  background-color: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

[data-theme="dark"] .badge-audit-eliminar {
  background-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .badge-audit-reformular {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .badge-audit-mantener {
  background-color: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .badge-audit-nuevo {
  background-color: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.4);
}

.audit-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.audit-section-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.audit-block-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.audit-meta-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

.audit-stat-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
}

.audit-stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.audit-diagnostico-box {
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-color);
}

.audit-proposal-box {
  background-color: rgba(5, 150, 105, 0.06);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(5, 150, 105, 0.22);
}

[data-theme="dark"] .audit-proposal-box {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.audit-box-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.audit-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
}

.text-xxs {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Ejes Estratégicos Modernos */
.ejes-intro-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 1.75rem;
}

.ejes-intro-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ejes-intro-banner h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.ejes-intro-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ejes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.eje-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.eje-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eje-number-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
}

.eje-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.eje-resumen {
  color: var(--text-main);
  font-size: 0.86rem;
  line-height: 1.5;
}

.eje-details-block {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.eje-sub-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.eje-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.eje-policy-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.eje-indicators-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.eje-ind-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

/* Sección de Innovación y Gobernanza Digital (GovTech) */
.jaga-section-header {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.jaga-tag-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background-color: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .jaga-tag-pill {
  background-color: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.jaga-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.jaga-section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 850px;
  line-height: 1.5;
}

.jaga-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.jaga-tech-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.jaga-tech-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.12);
}

.jaga-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #4f46e5;
}

[data-theme="dark"] .jaga-card-badge {
  color: #a5b4fc;
}

.jaga-card-header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.jaga-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-color: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .jaga-icon-wrap {
  background-color: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

.jaga-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.jaga-problem-solved {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background-color: rgba(5, 150, 105, 0.08);
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}

.jaga-features-list ul {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-main);
}

.jaga-features-list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Conclusiones */
.conclusiones-intro-card {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.conclusiones-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.conclusiones-header-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.conclusiones-header-text p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.conclusiones-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.conclusion-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  align-items: flex-start;
}

.conclusion-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.conclusion-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.conclusion-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Print Stylesheet for Official Reports */
@media print {
  body {
    background-color: white !important;
    color: black !important;
    font-size: 11pt !important;
  }
  .site-header, .subnav-tabs-wrapper, .prospectiva-subnav-container, .audit-toolbar-card, .filter-toolbar, .year-switcher, .metric-pill-toggle, .btn-icon-circle, .btn-secondary, .btn-primary, .layout-btn, .prospectiva-header-actions {
    display: none !important;
  }
  .main-content {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .tab-pane {
    display: none !important;
  }
  .tab-pane#tab-prospectiva {
    display: block !important;
  }
  .prospectiva-module-pane {
    display: block !important;
    margin-bottom: 2rem;
    page-break-after: auto;
  }
  .audit-overview-card, .charts-grid-two, .chart-card, .eje-card, .conclusion-card {
    break-inside: avoid;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    margin-bottom: 1rem !important;
  }
  .data-table {
    border: 1px solid #999 !important;
    font-size: 9pt !important;
  }
  .data-table th, .data-table td {
    border: 1px solid #ccc !important;
    color: black !important;
  }
  .audit-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
  }
  .audit-card {
    break-inside: avoid !important;
    border: 1px solid #aaa !important;
    font-size: 8.5pt !important;
  }
}

/* ==========================================================================
   ENHANCEMENTS: Minimalist Header, Analytical Bar, Help Tooltips, Normatividad, Mobile
   ========================================================================== */

/* Header Actions Group */
.header-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-compact {
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-md);
}

.btn-template-excel {
  background: linear-gradient(135deg, #107c41, #0f6c38);
  color: #ffffff;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 5px rgba(16, 124, 65, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-template-excel:hover {
  background: linear-gradient(135deg, #0f6c38, #0b532b);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 124, 65, 0.4);
}

.badge-strategic {
  background: rgba(99, 102, 241, 0.15);
  color: #4f46e5;
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .badge-strategic {
  background: rgba(129, 140, 248, 0.2);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
}

/* Analytical Parameters Bar */
.analytical-params-bar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.analytical-params-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.analytical-params-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.param-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.param-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.param-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
}

/* Help Buttons (?) */
.help-btn {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(100, 116, 139, 0.25);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.help-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.18);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
}

.help-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Tooltip Flotante Global */
.help-tooltip-bubble {
  position: fixed;
  z-index: 10000;
  max-width: 330px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.82rem;
  line-height: 1.48;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

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

.help-tooltip-title {
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.88rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.help-tooltip-legal {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  color: #a5f3fc;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.help-tooltip-body {
  color: #e2e8f0;
}

/* Modal / Bottom Sheet Accesible de Ayuda */
.help-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.help-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.help-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.help-modal-backdrop.open .help-modal-card {
  transform: scale(1) translateY(0);
}

.help-modal-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-modal-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.help-badge-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.help-modal-header h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.help-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.help-modal-close:hover {
  color: var(--text-main);
  background: var(--bg-body);
}

.help-modal-body {
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.6;
}

.help-modal-legal-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Normatividad Module Styles */
.normativa-intro-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(5, 150, 105, 0.08));
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.normativa-intro-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.normativa-intro-banner h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
}

.normativa-intro-banner p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.normativa-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}

.normativa-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

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

.normativa-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.normativa-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.normativa-code-pill {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-body);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.normativa-category-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--norma-color, var(--primary));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.normativa-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.normativa-entity {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

.normativa-section-subtitle {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0.85rem 0 0.45rem;
}

.normativa-mandatos-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.normativa-mandatos-list li {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.normativa-mandatos-list li i {
  color: var(--primary);
  min-width: 14px;
  margin-top: 3px;
}

.normativa-diag-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.normativa-diag-box strong {
  color: #b45309;
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  margin-bottom: 2px;
}

[data-theme="dark"] .normativa-diag-box strong {
  color: #fcd34d;
}

.normativa-art-box {
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.normativa-art-box strong {
  color: #047857;
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  margin-bottom: 2px;
}

[data-theme="dark"] .normativa-art-box strong {
  color: #34d399;
}

.normativa-tags-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
}

.normativa-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-body);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   MOBILE & RESPONSIVE DESIGN ENHANCEMENTS
   ========================================================================== */
@media (max-width: 900px) {
  .header-inner {
    padding: 0.75rem 1rem;
    gap: 1rem;
  }
  
  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .subnav-tabs {
    padding: 0 1rem;
    gap: 1.25rem;
  }

  .normativa-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-brand {
    gap: 0.75rem;
  }

  .header-logo {
    width: 42px;
    height: 42px;
  }

  .brand-info h1 {
    font-size: 1.1rem;
  }

  .brand-info p {
    font-size: 0.72rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .header-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .year-switcher {
    width: 100%;
    justify-content: center;
  }

  .year-btn {
    flex: 1;
    text-align: center;
    padding: 0.35rem 0.5rem;
    font-size: 0.76rem;
  }

  .header-actions-group {
    width: 100%;
    justify-content: space-between;
  }

  .btn-template-excel span,
  .btn-secondary span,
  .btn-primary span {
    font-size: 0.75rem;
  }

  .analytical-params-bar {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .analytical-params-left {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .param-divider {
    display: none;
  }

  .metric-pill-toggle {
    width: 100%;
  }

  .metric-toggle-btn {
    flex: 1;
    justify-content: center;
  }

  .subnav-tabs {
    gap: 1rem;
  }

  .tab-btn {
    padding: 0.75rem 0;
    font-size: 0.8rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .audit-overview-card {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1rem;
  }

  .charts-grid,
  .charts-grid-two,
  .secondary-charts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .chart-card {
    padding: 1rem;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .search-box-wrapper,
  .filter-select {
    width: 100%;
    min-width: 100%;
  }

  .audit-inputs-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .audit-inputs-group .search-input-wrapper,
  .audit-inputs-group select {
    width: 100% !important;
    min-width: 100% !important;
  }

  .indicators-grid-view,
  .team-grid,
  .jaga-tech-grid,
  .ejes-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .indicator-modal {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }

  .help-modal-card {
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    padding-bottom: env(safe-area-inset-bottom, 1rem);
  }
  
  .help-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .brand-info h1 {
    font-size: 0.98rem;
  }

  .brand-badge {
    display: none;
  }

  .audit-overview-card {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.85rem;
  }

  .rescued-goals-banner {
    padding: 0.85rem;
  }

  .rescued-pills {
    flex-direction: column;
  }

  .rescued-chip {
    width: 100%;
    justify-content: flex-start;
  }

  .prospectiva-header-actions {
    width: 100%;
  }

  .prospectiva-header-actions button {
    width: 100%;
    justify-content: center;
  }

  .footer-banner-img {
    max-height: 50px;
  }
}


