/* ==========================================================================
   CSS DESIGN SYSTEM - HOSPITAL PENCO LIRQUÉN RISK DASHBOARD 2026
   ========================================================================== */

:root {
  /* Color Palette - Dark Glassmorphism */
  --bg-dark: #090d16;
  --bg-surface: #111827;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.95);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(59, 130, 246, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Brand Accent Colors */
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.25);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.25);
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shadows & Glass */
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.15);
  --glass-blur: blur(16px);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   NAVBAR & BRANDING
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.4));
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-text .hospital-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-blue);
  display: block;
}

.brand-text .system-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-text .unit-credit {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.breadcrumb-item {
  color: var(--text-secondary);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item:hover, .breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 500;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-update {
  background: rgba(59, 130, 246, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* ==========================================================================
   MAIN WRAPPER & VIEWS
   ========================================================================== */
.main-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* ==========================================================================
   HERO BANNER & HOME HUB (TARJETAS COMPACTAS CON EVALUACIÓN EJECUTIVA DIRECCIÓN)
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-subtitle {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-blue);
  display: block;
  margin-bottom: 6px;
}

.hero-content h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 760px;
}

/* Subdirections Grid Compacta & Vistosa */
.subdirection-grid.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.subdirection-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

.subdirection-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-accent, var(--accent-blue));
  box-shadow: 0 0 25px var(--card-glow, var(--accent-blue-glow));
  background: rgba(30, 41, 59, 0.95);
}

.card-sdm {
  --card-accent: #38bdf8;
  --card-glow: rgba(56, 189, 248, 0.3);
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.85));
}

.card-sda {
  --card-accent: #f59e0b;
  --card-glow: rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(15, 23, 42, 0.85));
}

.card-sdp {
  --card-accent: #10b981;
  --card-glow: rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.85));
}

.subdirection-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.card-header-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--card-accent, var(--accent-blue));
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.subdirection-title-wrapper {
  display: flex;
  flex-direction: column;
}

.subdirection-badge-name {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--card-accent, var(--accent-blue));
  display: flex;
  align-items: center;
  gap: 6px;
}

.subdirection-title-wrapper h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.card-body p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* CAJA DE EVALUACIÓN EJECUTIVA PARA DIRECCIÓN EN INICIO */
.executive-eval-container {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  width: 100%;
}

.executive-eval-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.executive-gauges-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.exec-gauge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.exec-gauge.gauge-green {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.exec-gauge.gauge-purple {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.06);
}

.exec-gauge .gauge-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.exec-gauge.gauge-green .gauge-lbl { color: #34d399; }
.exec-gauge.gauge-purple .gauge-lbl { color: #c084fc; }

.exec-gauge .gauge-val {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 2px;
}

.exec-gauge.gauge-green .gauge-val { color: #10b981; }
.exec-gauge.gauge-purple .gauge-val { color: #8b5cf6; }

.executive-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-link-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.alert-link-pill.pill-alert-red {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.15);
}

.alert-link-pill.pill-alert-red:hover {
  background: rgba(244, 63, 94, 0.3);
  transform: translateX(3px);
}

.alert-link-pill.pill-alert-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.alert-link-pill.pill-alert-amber:hover {
  background: rgba(245, 158, 11, 0.3);
  transform: translateX(3px);
}

.alert-link-pill.pill-alert-green {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.card-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.stat-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-pill.highlight {
  background: rgba(255, 255, 255, 0.08);
  color: var(--card-accent, var(--accent-blue));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--card-accent, var(--accent-blue));
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   DASHBOARD SECTION TITLE & KPIS
   ========================================================================== */
.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.section-title-bar h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
}

.quick-kpis {
  display: flex;
  gap: 14px;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 110px;
}

.kpi-box.opportunity-kpi {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.kpi-box.indicator-kpi {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-blue);
  display: block;
  line-height: 1;
}

.kpi-value.glow-green {
  color: #10b981;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.kpi-value.glow-purple {
  color: #8b5cf6;
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   BANNER CONJUNTO DE MEDICIONES NIVEL 1 REDISEÑADO (COMPACTO Y GRÁFICO)
   ========================================================================== */
.opportunity-level1-banner.compact-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  flex-wrap: wrap;
}

.opportunity-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.level-icon.dual-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #c084fc;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.3);
}

.level-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-purple);
  text-transform: uppercase;
  display: block;
}

.opportunity-banner-left h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

.opportunity-banner-left p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Tarjetas Gráficas Mini de Medición Dual con Separación entre Título y Porcentaje */
.level1-dual-cards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-width: 480px;
}

.level1-metric-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.level1-metric-card.card-green {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.85));
}

.level1-metric-card.card-purple {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(15, 23, 42, 0.85));
}

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.metric-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.metric-card-title.title-purple {
  color: #c084fc;
}

.metric-card-value {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  margin-left: auto;
}

.metric-bar-wrapper {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.metric-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.metric-bar.bar-green {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.metric-bar.bar-purple {
  background: linear-gradient(90deg, #8b5cf6, #c084fc);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.metric-card-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stat-pill-sm {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-pill-sm.pill-green {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.stat-pill-sm.pill-red {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.stat-pill-sm.pill-blue {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.stat-pill-sm.pill-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

/* ==========================================================================
   PROCESS SELECTOR (HUB COMPACTO EN DASHBOARD SDP - TARJETAS NIVEL 2 RESTRINGIDAS)
   ========================================================================== */
.process-selector-container.compact-hub {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
}

.selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.selector-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint-text {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.process-cards-grid.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

/* TARJETAS NIVEL 2 MÁS COMPACTAS PERO SIN PERDER INFORMACIÓN */
.process-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.process-card:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--card-accent, var(--accent-blue));
  box-shadow: 0 0 20px var(--card-glow, var(--accent-blue-glow));
}

.process-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--card-accent, var(--accent-blue));
  transition: transform 0.25s;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
}

.process-card:hover .process-icon-wrapper {
  transform: scale(1.1);
}

.process-name {
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
  line-height: 1.3;
}

.process-desc-short {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gauges Dobles Nivel 2 en Tarjetas de Proceso Compactas */
.process-dual-gauges {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  width: 100%;
}

.process-opportunity-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.process-opportunity-pill.op-good {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.process-opportunity-pill.op-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.process-count-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
}

.process-card-footer {
  margin-top: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--card-accent, var(--accent-blue));
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  justify-content: center;
}

/* Dynamic Process Theme Colors */
.p-salud { --card-accent: #10b981; --card-glow: rgba(16, 185, 129, 0.3); }
.p-polizas { --card-accent: #38bdf8; --card-glow: rgba(56, 189, 248, 0.3); }
.p-reclutamiento { --card-accent: #8b5cf6; --card-glow: rgba(139, 92, 246, 0.3); }
.p-bienestar { --card-accent: #f59e0b; --card-glow: rgba(245, 158, 11, 0.3); }
.p-vals { --card-accent: #f43f5e; --card-glow: rgba(244, 63, 94, 0.3); }

/* ==========================================================================
   BACK NAV BAR (HOJA DEDICADA)
   ========================================================================== */
.back-nav-bar {
  margin-bottom: 20px;
}

.back-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.2s;
}

.back-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

/* ==========================================================================
   SINGLE PROCESS HEADER (MEDICIONES CONJUNTAS EN CABECERA NIVEL 2)
   ========================================================================== */
.single-process-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
}

.single-process-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  gap: 20px;
}

.process-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.process-title-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--proc-color, var(--accent-blue));
  box-shadow: 0 0 20px var(--proc-glow, var(--accent-blue-glow));
}

.process-title-text .process-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--proc-color, var(--accent-blue));
  text-transform: uppercase;
  display: block;
}

.process-title-text h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.process-stats-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.process-stats-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.process-stats-badge strong {
  color: var(--proc-color, var(--accent-blue));
  font-size: 16px;
}

/* ==========================================================================
   SUPERVISION SUBDIVISION BAR (PESTAÑAS DE SUPERVISIÓN 1 Y 2)
   ========================================================================== */
.supervision-subdivision-bar {
  margin-bottom: 24px;
}

.subdivision-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.subdivision-tab {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  color: var(--text-secondary);
}

.subdivision-tab:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.subdivision-tab.active {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border-color: var(--accent-blue);
  color: var(--text-primary);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.subdivision-tab.active#tabIndicador {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.subdivision-tab i {
  font-size: 24px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.subdivision-tab.active i {
  color: var(--accent-blue);
}

.subdivision-tab.active#tabIndicador i {
  color: var(--accent-purple);
}

.tab-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  display: block;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tab-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   CONTROLS BAR & SEARCH
   ========================================================================== */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.process-indicator-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 38px 10px 38px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font-size: 14px;
}

.search-box input:not(:placeholder-shown) ~ .clear-search-btn {
  display: block;
}

/* ==========================================================================
   NUMERATED STRATEGIES LIST & AJUSTE DE DESBORDE EN FÓRMULAS
   ========================================================================== */
.numerated-strategies-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.numerated-strategy-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr 320px;
  gap: 24px;
  align-items: start;
}

.numerated-strategy-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.8);
}

.strategy-number-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.strategy-number-badge {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.strategy-number-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
}

.strategy-content-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.strategy-title-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.strategy-tag-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.subproceso-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

/* DESCRIPCIÓN DE ESTRATEGIA CON TAMAÑO DE FUENTE IGUAL AL RESPONSABLE (13PX) */
.strategy-desc-text.font-prominent {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-blue);
  letter-spacing: 0.1px;
}

/* Responsables Boxes */
.responsables-dual-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.responsable-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.responsable-box .box-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}

.responsable-box .box-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Supervision Section & Perfectly Sized Month Grid */
.strategy-supervision-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid var(--border-color);
  padding-left: 20px;
  height: 100%;
}

.supervision-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-legend {
  display: flex;
  gap: 6px;
}

.legend-dot {
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dot-green {
  background: rgba(16, 185, 129, 0.25);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.dot-red {
  background: rgba(244, 63, 94, 0.25);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.5);
}

/* PERFECT EQUAL SIZE 4x3 MONTH GRID */
.months-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.month-badge {
  font-family: var(--font-heading);
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 4px;
}

.month-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.month-status-code {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  margin-top: 3px;
}

/* S = GREEN (Cumplido) */
.month-badge.status-yes {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

/* N = RED (No Cumplido) */
.month-badge.status-no {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

/* X = BLUE (Programado) */
.month-badge.status-scheduled {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

/* CUMPLIMIENTO UBICADO ABAJO DEL CALENDARIO O PANEL DE INDICADOR */
.opportunity-below-calendar-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  text-align: center;
}

.opportunity-below-calendar-badge.op-100 {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.opportunity-below-calendar-badge.op-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.opportunity-below-calendar-badge.op-partial {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.15);
}

/* Subdivisión 2: Medición del Indicador con Datos del Anexo y SOLUCIÓN A DESBORDE DE FÓRMULAS */
.annex-indicator-panel {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  max-width: 100%;
  overflow: hidden;
}

.annex-indicator-panel .annex-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* CAJA DE FÓRMULA CON WORD-BREAK, OVERFLOW CORTADO Y SCROLLBAR SI ES MUY LARGA */
.annex-formula-text.no-overflow {
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 10px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  max-height: 115px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.annex-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 6px;
}

.annex-q1-box {
  margin-bottom: 8px;
}

.indicator-q1-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  text-align: center;
  word-break: break-word;
}

.indicator-q1-badge.q1-success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.indicator-q1-badge.q1-custom {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.indicator-q1-badge.q1-pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.annex-obs-note {
  font-size: 11px;
  color: var(--accent-amber);
  margin-top: 6px;
  line-height: 1.3;
  word-break: break-word;
}

.btn-detail {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-detail:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

/* ==========================================================================
   MODAL FICHA DE ESTRATEGIA
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  padding: 32px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border-color: var(--accent-rose);
}

.modal-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}

.detail-section {
  margin-bottom: 20px;
  background: rgba(15, 23, 42, 0.6);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.detail-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-blue);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-section p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  word-break: break-word;
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Responsive Media Queries */
@media (max-width: 960px) {
  .numerated-strategy-card {
    grid-template-columns: 1fr;
  }

  .strategy-number-col {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
  }
  
  .strategy-supervision-col {
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-left: 0;
    padding-top: 16px;
  }
  
  .subdivision-tabs {
    grid-template-columns: 1fr;
  }

  .responsables-dual-box {
    grid-template-columns: 1fr;
  }

  .modal-grid-2 {
    grid-template-columns: 1fr;
  }

  .opportunity-level1-banner.compact-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .level1-dual-cards-container {
    width: 100%;
    min-width: 100%;
    grid-template-columns: 1fr;
  }
}
