/* ==========================================================
   PROSALUD INTRANET — Design System
   Inspirado en el layout de la referencia adjunta
   Tipografía: Plus Jakarta Sans (display + UI)
   Paleta: Teal institucional de salud
   ========================================================== */

:root {
  /* Paleta primaria — Teal salud */
  --teal-50:  #eff6ff;
  --teal-100: #dbeafe;
  --teal-200: #bfdbfe;
  --teal-400: #38bdf8;
  --teal-500: #0ea5e9;
  --teal-600: #2563eb;
  --teal-700: #1e40af;
  --teal-800: #1e3a8a;
  --teal-900: #172554;

  /* Neutros */
  --ink-50:   #fafaf9;
  --ink-100:  #f5f5f4;
  --ink-200:  #e7e5e4;
  --ink-300:  #d6d3d1;
  --ink-400:  #a8a29e;
  --ink-500:  #78716c;
  --ink-600:  #57534e;
  --ink-700:  #44403c;
  --ink-800:  #292524;
  --ink-900:  #1c1917;

  /* Accents */
  --accent-amber: #f59e0b;
  --accent-rose:  #db2777;
  --accent-blue:  #2563eb;
  --accent-green: #10b981;
  --accent-red:   #dc2626;

  /* Superficies */
  --surface-0: #ffffff;
  --surface-1: #fafafa;
  --surface-2: #f4f4f3;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.06), 0 2px 4px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 12px 28px rgba(28, 25, 23, 0.08), 0 4px 8px rgba(28, 25, 23, 0.04);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;

  /* Layout */
  --sidebar-w: 240px;
  --header-h: 68px;

  /* Type — sidebar dark navy palette + unified sans */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Sidebar (dark navy) */
  --sb-bg-1: #0e2c79;
  --sb-bg-2: #0a2266;
  --sb-text:    rgba(255,255,255,0.78);
  --sb-text-strong: #ffffff;
  --sb-hover-bg: rgba(255,255,255,0.08);
  --sb-active-bg-1: #1e40af;
  --sb-active-bg-2: #2563eb;
  --sb-divider: rgba(255,255,255,0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink-800);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ==========================================================
   BRAND
   ========================================================== */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo {
  display: grid;
  place-items: center;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.brand-tag {
  font-size: 11px;
  color: var(--ink-500);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal-700);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--teal-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  padding: 8px 14px;
}
.btn-ghost:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}
.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
}
.btn-full { width: 100%; justify-content: center; }
.btn-small {
  padding: 6px 12px;
  background: var(--teal-50);
  color: var(--teal-700);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.btn-small:hover { background: var(--teal-100); }

/* ==========================================================
   ==========  PUBLIC LAYOUT  ==========
   ========================================================== */
.public-layout {
  background: var(--surface-1);
}

.public-topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 48px;
  background: #fff;
  border-bottom: 1px solid var(--ink-200);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-xs);
}
.public-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  margin-left: 24px;
}
.public-nav .nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-600);
  transition: all 0.15s;
}
.public-nav .nav-link:hover { background: var(--ink-100); color: var(--ink-900); }
.public-nav .nav-link.active {
  background: var(--teal-50);
  color: var(--teal-800);
}
.public-actions { display: flex; gap: 10px; }

.public-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 48px 60px;
}

/* ==== CARRUSEL HERO ==== */
.hero-carousel {
  position: relative;
  margin-bottom: 56px;
  border-radius: var(--r-2xl);
  overflow: hidden;
}
.carousel-track {
  position: relative;
  height: 380px;
}
.slide {
  position: absolute;
  inset: 0;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.slide.active { opacity: 1; pointer-events: auto; }

.slide-1 { background: linear-gradient(135deg, #ecfeff 0%, #ccfbf1 55%, #a7f3d0 100%); }
.slide-2 { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 55%, #bfdbfe 100%); }
.slide-3 { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 55%, #fcd34d 100%); }

.slide-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal-800);
  background: rgba(255,255,255,0.6);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  margin-bottom: 16px;
}
.slide-2 .slide-badge { color: var(--accent-blue); }
.slide-3 .slide-badge { color: #92400e; }

.slide-title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ink-900);
  margin: 0 0 14px;
  max-width: 560px;
}
.slide-desc {
  font-size: 16px;
  color: var(--ink-700);
  line-height: 1.55;
  margin: 0 0 24px;
  max-width: 540px;
}
.slide-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-600);
  background: rgba(255,255,255,0.7);
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.meta-public { background: rgba(15, 118, 110, 0.1); color: var(--teal-800); font-weight: 600; }

.slide-cta {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  padding: 4px 0;
  border-bottom: 2px solid var(--ink-900);
  transition: all 0.15s;
}
.slide-cta:hover { color: var(--teal-700); border-color: var(--teal-700); }

.slide-visual {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
}
.slide-visual-1 { background: radial-gradient(circle, var(--teal-500), transparent 70%); }
.slide-visual-2 { background: radial-gradient(circle, var(--accent-blue), transparent 70%); }
.slide-visual-3 { background: radial-gradient(circle, var(--accent-amber), transparent 70%); }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--ink-800);
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: all 0.15s;
  z-index: 2;
}
.carousel-btn:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(28,25,23,0.25);
  transition: all 0.2s;
}
.dot.active { background: var(--ink-900); width: 24px; border-radius: 4px; }

/* ==== SECTIONS ==== */
.section { margin-bottom: 56px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--ink-900);
}
.section-subtitle {
  font-size: 14px;
  color: var(--ink-500);
  margin: 0;
}

/* ==== LINK CARDS ==== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  border: 1px solid #eef2f7;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* Acento lateral cyan animado al hover */
.link-card::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 0;
  background: linear-gradient(180deg, #22d3ee, #2563eb);
  border-radius: 0 4px 4px 0;
  transform: translateY(-50%);
  transition: height .25s ease;
}
/* Flecha indicadora a la derecha (aparece al hover) */
.link-card::after {
  content: '→';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  color: #cbd5e1;
  font-size: 16px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease, color .2s ease;
  pointer-events: none;
}
.link-card:hover {
  transform: translateY(-2px);
  border-color: #22d3ee;
  box-shadow:
    0 10px 22px rgba(34, 211, 238, 0.14),
    0 2px 6px rgba(15, 23, 42, 0.04);
}
.link-card:hover::before { height: 60%; }
.link-card:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  color: #06b6d4;
}
.link-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.link-info { flex: 1; min-width: 0; }
.link-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.link-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-source {
  font-size: 12px;
  color: var(--ink-500);
}
.verified-badge {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ==== BIRTHDAY STRIP ==== */
.birthday-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.bday-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--ink-200);
}
.bday-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.bday-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.bday-info strong { font-size: 14px; color: var(--ink-900); }
.bday-info span { font-size: 12px; color: var(--ink-500); }

/* ==== FOOTER ==== */
.public-footer {
  margin-top: 32px;
  padding: 24px 32px 18px;
  border-top: 1px solid #e7eaf3;
  background: #ffffff;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.footer-brand strong {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.footer-brand span {
  font-size: 12px;
  color: #64748b;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: #1e3a8a; }
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #dbe4ff;
  border-radius: 999px;
  background: #f5f9ff;
  color: #1e3a8a !important;
  font-weight: 600;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.footer-cta:hover {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.20);
}
.footer-meta {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
  text-align: center;
  font-size: 11.5px;
  color: #94a3b8;
}

/* Responsive: en pantallas pequeñas el footer se apila */
@media (max-width: 640px) {
  .public-footer { padding: 20px 20px 16px; }
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer-links { gap: 14px; }
}

/* ==========================================================
   ==========  APP LAYOUT (LOGEADO)  ==========
   ========================================================== */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100vh;
  background: var(--surface-2);
}

/* Sidebar (dark navy) */
.sidebar {
  grid-row: 1 / -1;
  background: linear-gradient(180deg, var(--sb-bg-1) 0%, var(--sb-bg-2) 100%);
  border-right: none;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  color: var(--sb-text);
}
/* Sutil patrón de puntos al fondo */
.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}
.sidebar > * { position: relative; z-index: 1; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  margin-bottom: 18px;
}
.sidebar-brand .brand-name { color: var(--sb-text-strong); font-weight: 700; }
.sidebar-brand .brand-tag  { color: rgba(255,255,255,0.65); }
.sidebar-brand .brand-logo {
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sb-text);
  transition: background .12s, color .12s, transform .12s;
  position: relative;
}
.nav-item:hover {
  background: var(--sb-hover-bg);
  color: var(--sb-text-strong);
}
.nav-item.active {
  background: linear-gradient(135deg, var(--sb-active-bg-1) 0%, var(--sb-active-bg-2) 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}
.nav-item.active svg { color: #fff; }
.nav-item svg { flex-shrink: 0; opacity: 0.92; }

.nav-badge {
  margin-left: auto;
  background: #fbbf24;
  color: #78350f;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.nav-divider {
  margin: 18px 8px 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 14px;
  border-top: 1px solid var(--sb-divider);
}

/* Sublink (analítica): un poco más tenue */
.sidebar-sublink {
  color: rgba(255,255,255,0.65) !important;
}
.sidebar-sublink:hover { color: #fff !important; }
.sidebar-sublink.active {
  background: rgba(255,255,255,0.10) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.nav-admin svg { color: #fbbf24; }
.nav-admin.active svg { color: #fff; }

.sidebar-footer {
  border-top: 1px solid var(--ink-200);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Header */
.app-header {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid var(--ink-200);
  position: sticky;
  top: 0;
  z-index: 30;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
}
.bread-muted { color: var(--ink-500); font-weight: 500; }
.breadcrumb svg { color: var(--ink-400); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-600);
  transition: all 0.12s;
  position: relative;
}
.icon-btn:hover { background: var(--ink-100); color: var(--ink-900); }
.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  border: 2px solid #fff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--ink-200);
  cursor: pointer;
  transition: all 0.12s;
}
.user-chip:hover { background: var(--ink-100); }
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.user-info { display: flex; flex-direction: column; line-height: 1.15; }
.user-info strong { font-size: 13px; color: var(--ink-900); }
.user-info span { font-size: 11px; color: var(--ink-500); }

/* ==========================================================
   SIDEBAR · TARJETA DE SOPORTE TÉCNICO (footer)
   ========================================================== */
.sidebar-support {
  margin-top: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(2px);
}
.sidebar-support-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-support-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: #fbbf24;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sidebar-support-titles { display: flex; flex-direction: column; line-height: 1.25; }
.sidebar-support-titles strong { font-size: 13px; font-weight: 600; }
.sidebar-support-titles span { font-size: 11px; color: rgba(255,255,255,0.65); }
.sidebar-support-btn {
  display: block;
  text-align: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.20);
  text-decoration: none;
  transition: background .15s, transform .15s, border-color .15s;
}
.sidebar-support-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-1px);
}

/* ==========================================================
   HEADER · SELECTOR DE REGIONAL
   ========================================================== */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.regional-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-800);
  white-space: nowrap;
}
.regional-pill svg { color: var(--teal-700); }
.regional-cambiar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.regional-cambiar-btn:hover {
  background: var(--teal-50);
  border-color: #c7d2fe;
  color: var(--teal-800);
}

/* ==========================================================
   HEADER · BÚSQUEDA
   ========================================================== */
.header-search {
  flex: 1;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  transition: background .15s, border-color .15s;
}
.header-search:focus-within {
  background: #fff;
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(99,102,241,.10);
}
.header-search svg { color: var(--ink-400); flex-shrink: 0; }
.header-search input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 100%;
  font-size: 13px;
  color: var(--ink-800);
  font-family: inherit;
}
.header-search input::placeholder { color: var(--ink-400); }

/* ==========================================================
   HEADER · NOTIFICACIONES Y APP LAUNCHER
   ========================================================== */
.notif-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink-600);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.notif-btn:hover {
  background: var(--ink-100);
  color: var(--teal-800);
  border-color: var(--ink-200);
}
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  line-height: 1;
}
.app-launcher-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink-600);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.app-launcher-btn:hover {
  background: var(--ink-100);
  color: var(--teal-800);
  border-color: var(--ink-200);
}

/* Header responsive: ocultar búsqueda en pantallas pequeñas */
@media (max-width: 1100px) {
  .header-search { display: none; }
}
@media (max-width: 820px) {
  .regional-cambiar-btn { display: none; }
}

/* Main */
.app-main {
  grid-column: 2;
  padding: 14px 28px 48px;
  max-width: 1440px;
  width: 100%;
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink-900);
}
.page-subtitle {
  font-size: 14px;
  color: var(--ink-500);
  margin: 0;
}

/* Hero banner (dashboard) */
.hero-banner {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-2xl);
  padding: 44px 48px;
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 90% 20%, rgba(20, 184, 166, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(245, 158, 11, 0.06) 0%, transparent 40%);
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--teal-700);
  margin-bottom: 10px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 12px;
}
.hero-desc {
  font-size: 15px;
  color: var(--ink-600);
  line-height: 1.55;
  margin: 0 0 22px;
}
.hero-illust svg { display: block; }

.dashboard-section { margin-bottom: 40px; }

/* Info cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.info-card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: all 0.15s;
}
.info-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 4px;
  line-height: 1.25;
}
.card-date {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0 0 12px;
}
.card-footer { border-top: 1px solid var(--ink-100); padding-top: 12px; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-public { background: #ecfdf5; color: var(--accent-green); }
.status-private { background: #fef3c7; color: #92400e; }

/* ==========================================================
   ==========  LOGIN  ==========
   ========================================================== */
.login-layout {
  background: var(--surface-2);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-container {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--ink-200);
  min-height: 640px;
}
.login-panel {
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.login-hero h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 10px;
  color: var(--ink-900);
}
.login-hero p {
  font-size: 15px;
  color: var(--ink-500);
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-form label > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-1);
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  transition: all 0.15s;
}
.input-wrap:focus-within {
  border-color: var(--teal-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}
.input-wrap svg { color: var(--ink-400); }
.input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-900);
}
.input-wrap input::placeholder { color: var(--ink-400); }

.login-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-600);
  cursor: pointer;
}
.checkbox input { accent-color: var(--teal-700); }
.link-muted { font-size: 13px; color: var(--teal-700); font-weight: 500; }
.link-muted:hover { text-decoration: underline; }

.login-help {
  text-align: center;
  font-size: 13px;
  color: var(--ink-500);
  margin: 8px 0 0;
}
.login-help a { color: var(--teal-700); font-weight: 600; }

/* Login visual */
.login-visual {
  background: linear-gradient(135deg, var(--teal-800) 0%, var(--teal-700) 60%, var(--teal-900) 100%);
  position: relative;
  overflow: hidden;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}
.visual-glow {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.4) 0%, transparent 70%);
  pointer-events: none;
}
.login-quote {
  margin: 0;
  position: relative;
  z-index: 1;
}
.login-quote p {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.login-quote em {
  font-style: italic;
  color: var(--teal-200);
}
.login-quote cite {
  font-size: 13px;
  font-style: normal;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.02em;
}

.visual-stats {
  display: flex;
  gap: 32px;
  position: relative;
  z-index: 1;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}
.stat span {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.03em;
}

/* ==========================================================
   ==========  ADMIN — USUARIOS  ==========
   ========================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  gap: 14px;
}
.stat-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.stat-body { flex: 1; }
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
  margin-bottom: 4px;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.stat-delta {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
}
.stat-up { color: var(--accent-green); }

/* Panel */
.data-panel {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-200);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--surface-1);
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  min-width: 320px;
  flex: 1;
  max-width: 480px;
}
.search-bar input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-900);
}
.search-bar svg { color: var(--ink-400); }

.filters { display: flex; gap: 6px; }
.filter-chip {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-600);
  background: transparent;
  transition: all 0.12s;
}
.filter-chip:hover { background: var(--ink-100); }
.filter-chip.active {
  background: var(--ink-900);
  color: #fff;
}

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--surface-1);
  border-bottom: 1px solid var(--ink-200);
}
.data-table td {
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-800);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-1); }

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.user-cell strong { display: block; font-size: 14px; color: var(--ink-900); }
.user-cell span { font-size: 12px; color: var(--ink-500); }

.regional-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--ink-100);
  color: var(--ink-700);
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.role-admin { background: #fef3c7; color: #92400e; }
.role-editor { background: #dbeafe; color: #1e40af; }
.role-user { background: var(--ink-100); color: var(--ink-700); }

.action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--ink-500);
  transition: all 0.12s;
}
.action-btn:hover { background: var(--ink-100); color: var(--ink-900); }
.action-danger:hover { background: #fee2e2; color: var(--accent-red); }

.panel-footer {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--ink-200);
  background: var(--surface-1);
}
.table-info { font-size: 13px; color: var(--ink-500); }
.pagination { display: flex; gap: 4px; }
.page-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-600);
  padding: 0 8px;
  transition: all 0.12s;
}
.page-btn:hover { background: var(--ink-100); }
.page-btn.active { background: var(--ink-900); color: #fff; }

/* ==========================================================
   ==========  RESPONSIVE  ==========
   ========================================================== */
@media (max-width: 1024px) {
  .login-container { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .public-main { padding: 24px; }
  .public-topbar { padding: 14px 24px; }
  .slide-title { font-size: 34px; }
  .slide { padding: 36px 32px; }
}

@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    width: 260px;
    z-index: 50;
    transition: left 0.3s;
  }
  .app-header { grid-column: 1; padding: 0 16px; }
  .app-main { grid-column: 1; padding: 20px 16px 60px; }
  .user-info { display: none; }
  .public-nav { display: none; }
  .hero-banner { flex-direction: column; text-align: center; padding: 32px 24px; }
  .hero-illust { margin-top: 20px; }
  .hero-title { font-size: 30px; }
  .slide-title { font-size: 26px; }
  .slide { padding: 28px 24px; }
  .carousel-track { height: 340px; }
  .section-title, .page-title { font-size: 26px; }
  .login-panel { padding: 32px 24px; }
  .login-hero h1 { font-size: 32px; }
  .filters { flex-wrap: wrap; }
}

/* ==========================================================
   ==========  FORMULARIOS  ==========
   ========================================================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-col-2 { grid-column: 1 / -1; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="url"],
.form-field input[type="date"],
.form-field input[type="datetime-local"],
.form-field input[type="number"],
.form-field input[type="file"],
.form-field input[type="search"],
.form-field input[type="color"],
.form-field input[type="time"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-900);
  background: #fff;
  transition: all 0.15s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
/* El select necesita su propia flecha tras quitar el appearance nativo */
.form-field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2.5'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
/* Quitar la X nativa del input search en WebKit (la podemos manejar por el form) */
.form-field input[type="search"]::-webkit-search-decoration,
.form-field input[type="search"]::-webkit-search-cancel-button,
.form-field input[type="search"]::-webkit-search-results-button,
.form-field input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}
.form-field input:disabled { background: var(--surface-1); color: var(--ink-500); }
.form-field textarea { resize: vertical; min-height: 90px; }
.form-field small { font-size: 12px; color: var(--ink-500); }
.form-error { font-size: 12px; color: #dc2626; margin: 0; font-weight: 500; }

.select-inline {
  padding: 9px 14px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--surface-1);
  cursor: pointer;
}

/* Chips de checkbox para selección múltiple de regionales */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-checkbox {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  transition: all 0.15s;
}
.chip-checkbox input { display: none; }
.chip-checkbox:hover { border-color: var(--teal-400); }
.chip-checkbox:has(input:checked) {
  background: var(--teal-700);
  color: #fff;
  border-color: var(--teal-700);
}

/* ==========================================================
   ==========  FLASH MESSAGES  ==========
   ========================================================== */
.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}
.flash-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.flash-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.flash-success svg, .flash-error svg { flex-shrink: 0; margin-top: 1px; }

.flash-box {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.flash-box code {
  background: var(--ink-100);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: var(--ink-900);
}
.password-copy { cursor: pointer; background: #fef3c7 !important; }
.password-copy:hover { background: #fde68a !important; }

/* ==========================================================
   ==========  EMPTY STATE  ==========
   ========================================================== */
.empty-state {
  padding: 60px 40px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--ink-200);
  border-radius: var(--r-lg);
  color: var(--ink-500);
}

/* ==========================================================
   ==========  PAGINACIÓN LARAVEL  ==========
   ========================================================== */
.pagination nav { display: flex; gap: 4px; align-items: center; }
.pagination svg { display: none; }
.pagination span[aria-disabled="true"],
.pagination span[aria-current="page"] span,
.pagination a {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-600);
  text-decoration: none;
  transition: all 0.12s;
}
.pagination a:hover { background: var(--ink-100); }
.pagination span[aria-current="page"] span {
  background: var(--ink-900);
  color: #fff;
}
.pagination span[aria-disabled="true"] { color: var(--ink-300); cursor: not-allowed; }
.pagination p { margin: 0; font-size: 13px; color: var(--ink-500); }

/* ==========================================================
   ==========  SIDEBAR RESPONSIVE  ==========
   ========================================================== */
.sidebar-toggle { display: none; }

@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -260px;
    width: 260px;
    z-index: 50;
    transition: left 0.3s;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { left: 0; }
  .app-header { grid-column: 1; padding: 0 16px; }
  .app-main { grid-column: 1; padding: 20px 16px 60px; }
  .sidebar-toggle { display: grid; }
  .user-info { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-col-2 { grid-column: 1; }
}

/* === AJUSTES PARA LOGO PROSALUD === */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tamaño específico en topbar público y sidebar */
.public-topbar .brand-logo,
.sidebar-brand .brand-logo {
  width: 40px;
  height: 40px;
}

/* Tamaño en login (más grande) */
.login-panel .brand-logo {
  width: 48px;
  height: 48px;
}

/* === AJUSTES PARA LOGO PROSALUD === */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tamaño específico en topbar público y sidebar */
.public-topbar .brand-logo,
.sidebar-brand .brand-logo {
  width: 40px;
  height: 40px;
}

/* Tamaño en login (más grande) */
.login-panel .brand-logo {
  width: 48px;
  height: 48px;
}

/* === AVATAR CON FOTO O INICIALES === */
.avatar-dir {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #06b6d4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-dir .avatar-img,
.avatar-sidebar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-sidebar {
  overflow: hidden;
}

/* === BADGES DE ROLES === */
.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.role-badge.role-admin {
  background: #1e3a8a;
  color: #fff;
}
.role-badge.role-editor {
  background: #dbeafe;
  color: #1e40af;
}
.role-badge.role-bibliotecario {
  background: #ede9fe;
  color: #6d28d9;
}
.role-badge.role-soporte {
  background: #fef3c7;
  color: #92400e;
}
.role-badge.role-user {
  background: #f5f5f4;
  color: #57534e;
}

/* ===========================================
   HEADER INTEGRADO CON INDICADOR DE REGIONAL
   =========================================== */

/* Sección central del topbar para el indicador */
.public-topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

/* Pill de regional dentro del header */
.regional-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.regional-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

.regional-header-pill strong {
  font-weight: 700;
}

.regional-header-cambiar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #57534e;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  padding: 7px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.regional-header-cambiar:hover {
  background: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}

/* Responsive: en pantallas pequeñas el header se apila */
@media (max-width: 900px) {
  .public-topbar {
    flex-wrap: wrap;
  }
  .public-topbar-center {
    order: 3;
    width: 100%;
    margin-top: 10px;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .regional-header-pill {
    font-size: 12px;
    padding: 6px 12px;
  }
  .regional-header-cambiar {
    font-size: 12px;
    padding: 6px 10px;
  }
  .regional-header-cambiar svg {
    display: none;
  }
}

/* ===========================================
   HEADER INTEGRADO CON INDICADOR DE REGIONAL
   =========================================== */

/* Sección central del topbar para el indicador */
.public-topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

/* Pill de regional dentro del header */
.regional-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.regional-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

.regional-header-pill strong {
  font-weight: 700;
}

.regional-header-cambiar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #57534e;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  padding: 7px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.regional-header-cambiar:hover {
  background: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}

/* Responsive: en pantallas pequeñas el header se apila */
@media (max-width: 900px) {
  .public-topbar {
    flex-wrap: wrap;
  }
  .public-topbar-center {
    order: 3;
    width: 100%;
    margin-top: 10px;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .regional-header-pill {
    font-size: 12px;
    padding: 6px 12px;
  }
  .regional-header-cambiar {
    font-size: 12px;
    padding: 6px 10px;
  }
  .regional-header-cambiar svg {
    display: none;
  }
}

/* ===========================================
   HEADER INTEGRADO CON INDICADOR DE REGIONAL
   =========================================== */

/* Sección central del topbar para el indicador */
.public-topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

/* Pill de regional dentro del header */
.regional-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.regional-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

.regional-header-pill strong {
  font-weight: 700;
}

.regional-header-cambiar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #57534e;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  padding: 7px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.regional-header-cambiar:hover {
  background: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}

/* Responsive: en pantallas pequeñas el header se apila */
@media (max-width: 900px) {
  .public-topbar {
    flex-wrap: wrap;
  }
  .public-topbar-center {
    order: 3;
    width: 100%;
    margin-top: 10px;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .regional-header-pill {
    font-size: 12px;
    padding: 6px 12px;
  }
  .regional-header-cambiar {
    font-size: 12px;
    padding: 6px 10px;
  }
  .regional-header-cambiar svg {
    display: none;
  }
}
