/* ==========================================================================
   HUELLA — Sistema Integral de Trayectorias para Niños con Discapacidad
   Sistema de Diseño Mobile-First, Inclusivo, Empático y Juvenil
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Identidad de Marca Oficial HUELLA (conforme a logotipo del usuario) */
  --h-brand-navy: #082f49;      /* Azul petróleo profundo de "Huell" */
  --h-brand-green: #00c853;     /* Verde esmeralda vibrante de la "a" */
  --h-brand-blue: #0284c7;      /* Arco de pisada y escuela */
  --h-brand-orange: #fb8c00;    /* Camino y familia */
  --h-brand-magenta: #d81b60;   /* Dedo fucsia */
  --h-brand-purple: #7e57c2;    /* Dedo violeta / clínico */
  --h-brand-cyan: #29b6f6;      /* Dedo celeste */

  /* Tipografías Oficiales */
  --h-font-brand: 'Nunito', sans-serif;
  --h-font-title: 'Nunito', sans-serif;
  --h-font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Paleta Cálida, Inclusiva y Empática */
  --h-primary: #0284c7;          /* Azul camino institucional */
  --h-primary-dark: #082f49;     /* Petróleo profundo */
  --h-primary-light: #e0f2fe;    /* Fondo suave */
  
  --h-teal: #00c853;             /* Verde vibrante de avance y logros */
  --h-teal-light: #dcfce7;       
  
  --h-amber: #fb8c00;            /* Ámbar / naranja del camino */
  --h-amber-light: #ffedd5;
  
  --h-coral: #fb7185;            /* Rosa/Coral empático */
  --h-coral-light: #ffe4e6;
  
  --h-emerald: #10b981;          /* Logros / Presentismo */
  --h-emerald-light: #d1fae5;
  
  --h-purple: #7e57c2;           /* Creatividad / Terapia */
  --h-purple-light: #ede9fe;

  /* Superficies y Fondos */
  --h-bg-page: #f8fafc;
  --h-bg-card: #ffffff;
  --h-border: #e2e8f0;
  --h-border-focus: #7dd3fc;
  
  /* Textos */
  --h-text-main: #082f49;
  --h-text-muted: #64748b;
  --h-text-light: #94a3b8;
  
  /* Radios suaves y amigables (Squircle) */
  --h-radius-sm: 10px;
  --h-radius-md: 16px;
  --h-radius-lg: 24px;
  --h-radius-full: 9999px;
  
  /* Sombras Táctiles */
  --h-shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
  --h-shadow-md: 0 6px 14px -2px rgba(8, 47, 73, 0.08), 0 2px 6px -1px rgba(0,0,0,0.03);
  --h-shadow-lg: 0 14px 28px -6px rgba(8, 47, 73, 0.12), 0 4px 10px -2px rgba(0,0,0,0.04);
  --h-shadow-glow: 0 8px 20px rgba(2, 132, 199, 0.22);

  --h-transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --bottom-nav-height: 68px;
}

/* Reset y base mobile */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--h-font-body);
  background-color: var(--h-bg-page);
  color: var(--h-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: var(--h-font-title);
  letter-spacing: -0.015em;
}

/* Barra Superior Móvil */
.huella-navbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid #e0f2fe;
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* Bloque de Identidad de Marca Oficial en Navbar (Logo 2) */
.huella-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.75s cubic-bezier(0.25, 1, 0.5, 1), transform 0.75s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

/* Oculto en el tope inicial de la portada */
.huella-brand.navbar-brand-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(0.88);
  pointer-events: none;
}

/* Revelado suave y cinematográfico conforme se hace scroll */
.huella-brand.navbar-brand-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.huella-brand-symbol {
  width: 44px;
  height: 48px;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 2px 5px rgba(8, 47, 73, 0.12));
}

.huella-brand:hover .huella-brand-symbol {
  transform: scale(1.08) rotate(-2deg);
}

.huella-brand-text-block {
  display: flex;
  flex-direction: column;
}

.huella-brand-title {
  font-family: var(--h-font-brand);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--h-brand-navy);
  line-height: 1;
  letter-spacing: -0.025em;
}

.huella-brand-title .brand-a {
  color: var(--h-brand-green);
  font-weight: 900;
}

.huella-brand-subtitle {
  font-family: var(--h-font-brand);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--h-brand-navy);
  letter-spacing: 0.01em;
  margin-top: 1px;
}

/* ========================================================
   BARRA DE NAVEGACIÓN INFERIOR (BOTTOM NAV BAR) - MOBILE
   ======================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--h-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.25rem 0.5rem;
  z-index: 1040;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--h-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  gap: 0.2rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--h-radius-md);
  transition: var(--h-transition);
  cursor: pointer;
  flex: 1;
}

.bottom-nav-item i {
  font-size: 1.25rem;
  transition: var(--h-transition);
}

.bottom-nav-item:hover, .bottom-nav-item.active {
  color: var(--h-primary);
}

.bottom-nav-item.active i {
  transform: translateY(-2px) scale(1.1);
  color: var(--h-primary);
}

/* Botón Flotante Central (FAB) */
.bottom-nav-fab {
  width: 50px;
  height: 50px;
  border-radius: var(--h-radius-full);
  background: linear-gradient(135deg, var(--h-primary) 0%, var(--h-purple) 100%);
  color: white;
  border: 3px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: var(--h-shadow-glow);
  transform: translateY(-14px);
  transition: var(--h-transition);
  cursor: pointer;
}

.bottom-nav-fab:hover, .bottom-nav-fab:active {
  transform: translateY(-16px) scale(1.08);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35);
  color: white;
}

/* ========================================================
   SISTEMA DE AVATARES INFANTILES Y ADOLESCENTES
   ======================================================== */
.avatar-child {
  width: 58px;
  height: 58px;
  border-radius: var(--h-radius-full);
  object-fit: cover;
  background: var(--h-purple-light);
  border: 2.5px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  flex-shrink: 0;
  transition: var(--h-transition);
}

.avatar-child-lg {
  width: 82px;
  height: 82px;
  border-radius: var(--h-radius-full);
  border: 4px solid white;
  box-shadow: var(--h-shadow-md);
  background: linear-gradient(135deg, var(--h-primary-light), var(--h-purple-light));
}

.avatar-badge-wrapper {
  position: relative;
  display: inline-block;
}

.avatar-badge-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--h-emerald);
  border: 2px solid white;
}

/* ========================================================
   TARJETAS MÓVILES INTERACTIVAS
   ======================================================== */
.card-huella {
  background: var(--h-bg-card);
  border-radius: var(--h-radius-lg);
  border: 1px solid var(--h-border);
  box-shadow: var(--h-shadow-sm);
  transition: var(--h-transition);
  position: relative;
  overflow: hidden;
}

.card-child-mobile {
  padding: 1.15rem;
  border-radius: var(--h-radius-lg);
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--h-shadow-sm);
  transition: var(--h-transition);
  cursor: pointer;
  position: relative;
}

.card-child-mobile:active {
  transform: scale(0.985);
  box-shadow: var(--h-shadow-md);
}

.card-child-mobile:hover {
  border-color: var(--h-border-focus);
  box-shadow: var(--h-shadow-md);
}

/* Píldoras de Diagnóstico y Salud */
.tag-diagnostico {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: var(--h-radius-full);
  background: var(--h-primary-light);
  color: var(--h-primary-dark);
}

.tag-diagnostico.tea {
  background: #ede9fe;
  color: #6d28d9;
}

.tag-diagnostico.motora {
  background: #fef3c7;
  color: #b45309;
}

.tag-diagnostico.auditiva {
  background: #ccfbf1;
  color: #0f766e;
}

/* Píldora de Asistencia Táctil */
.attendance-chip {
  padding: 0.5rem 0.9rem;
  border-radius: var(--h-radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1.5px solid var(--h-border);
  background: white;
  cursor: pointer;
  transition: var(--h-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.attendance-chip:hover, .attendance-chip.selected-presente {
  background: var(--h-emerald-light);
  border-color: var(--h-emerald);
  color: #065f46;
}

.attendance-chip.selected-justificada {
  background: var(--h-amber-light);
  border-color: var(--h-amber);
  color: #92400e;
}

.attendance-chip.selected-injustificada {
  background: var(--h-coral-light);
  border-color: var(--h-coral);
  color: #9f1239;
}

/* ========================================================
   NOTAS DE EVOLUCIÓN TIPO "FEED" INTERACTIVO
   ======================================================== */
.feed-note-card {
  background: white;
  border-radius: var(--h-radius-md);
  padding: 1rem 1.15rem;
  border: 1px solid var(--h-border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  margin-bottom: 0.85rem;
  transition: var(--h-transition);
}

.feed-note-card:hover {
  border-color: var(--h-border-focus);
  box-shadow: var(--h-shadow-md);
}

.feed-specialty-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--h-radius-full);
}

.badge-fono { background: #e0e7ff; color: #4338ca; }
.badge-pediatria { background: #ccfbf1; color: #0f766e; }
.badge-to { background: #fef3c7; color: #b45309; }
.badge-psico { background: #ede9fe; color: #6d28d9; }

/* Botones con sensación háptica táctil */
.btn-huella {
  background: linear-gradient(135deg, var(--h-primary) 0%, var(--h-primary-dark) 100%);
  color: white;
  border: none;
  font-weight: 600;
  border-radius: var(--h-radius-md);
  padding: 0.65rem 1.25rem;
  transition: var(--h-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-huella:active {
  transform: scale(0.97);
}

.btn-huella:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: white;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.btn-huella-outline {
  background: white;
  color: var(--h-primary);
  border: 1.5px solid var(--h-primary-light);
  font-weight: 600;
  border-radius: var(--h-radius-md);
  padding: 0.65rem 1.25rem;
  transition: var(--h-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-huella-outline:active {
  transform: scale(0.97);
}

.btn-huella-outline:hover {
  background: var(--h-primary-light);
  color: var(--h-primary-dark);
  border-color: var(--h-primary);
}

/* Tabs Mobile (Horizontal Scrollable) */
.nav-pills-huella {
  display: flex;
  gap: 0.4rem;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: var(--h-radius-md);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-pills-huella::-webkit-scrollbar {
  display: none;
}

.nav-pills-huella .nav-link {
  color: var(--h-text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--h-radius-sm);
  transition: var(--h-transition);
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-pills-huella .nav-link.active {
  background: white;
  color: var(--h-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Modal estilo Bottom Sheet en móviles */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
  }

  .modal-content {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    max-height: 90vh;
  }

  .hero-title {
    font-size: 2rem !important;
  }
}

/* Selector simulador de roles */
.role-simulator-bar {
  background: #1e1b4b;
  color: white;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.role-simulator-bar select {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--h-radius-sm);
  padding: 0.15rem 0.5rem;
  font-size: 0.78rem;
}

.role-simulator-bar select option {
  background: #1e1b4b;
  color: white;
}

/* Micro-animaciones */
@keyframes popIn {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-pop-in {
  animation: popIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================================
   BARRA DE NAVEGACIÓN INFERIOR (MÓVIL / SMARTPHONE)
   ======================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
  z-index: 1030;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--h-text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  gap: 3px;
  flex: 1;
  padding: 6px 0;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--h-radius-sm);
}

.bottom-nav-item i {
  font-size: 1.25rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--h-primary);
}

.bottom-nav-item.active i {
  transform: translateY(-2px);
  color: var(--h-primary);
}

.bottom-nav-fab {
  position: relative;
  top: -16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--h-primary) 0%, #4338ca 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
  border: 3px solid white;
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.bottom-nav-fab:hover,
.bottom-nav-fab:active {
  transform: scale(1.08) translateY(-2px);
  color: white;
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.55);
}

@media (max-width: 768px) {
  #vista-app {
    padding-bottom: 85px !important;
  }
  .huella-footer {
    padding-bottom: 80px !important;
  }
}

@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
}

/* ========================================================
   SELECTOR DE AVATARES INTERACTIVO
   ======================================================== */
.avatar-picker-preview {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid var(--h-primary-light);
  box-shadow: var(--h-shadow-sm);
  background: #f8fafc;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.avatar-picker-preview:hover {
  transform: rotate(6deg) scale(1.05);
}

.avatar-preset-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  padding: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-preset-btn.active,
.avatar-preset-btn:hover {
  border-color: var(--h-primary);
  transform: scale(1.12);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

.avatar-preset-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* ========================================================
   SISTEMA DE ROLES Y PÍLDORAS INSTITUCIONALES (EL TRIÁNGULO)
   ======================================================== */
.role-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--h-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.role-superadmin { background: #e0e7ff; color: #4338ca; }
.role-coordinador { background: #e0f2fe; color: #0369a1; }
.role-docente     { background: #dbeafe; color: #1d4ed8; }
.role-salud       { background: #ccfbf1; color: #0f766e; }
.role-familia     { background: #ffe4e6; color: #e11d48; }

.badge-familia { background: #ffe4e6; color: #e11d48; }
.badge-escuela { background: #dbeafe; color: #1d4ed8; }
.badge-salud   { background: #ccfbf1; color: #0f766e; }
.badge-hito    { background: #fef3c7; color: #b45309; }
.badge-alerta  { background: #fee2e2; color: #b91c1c; }

.text-teal { color: #0d9488 !important; }
.bg-teal-subtle { background-color: #ccfbf1 !important; color: #0f766e !important; }
.btn-teal { background-color: #0d9488; color: white; border: none; }
.btn-teal:hover { background-color: #0f766e; color: white; }

/* ========================================================
   LÍNEA DE TRAYECTORIA UNIFICADA (TIMELINE)
   ======================================================== */
.trajectory-timeline {
  position: relative;
  padding-left: 2rem;
}

.trajectory-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 17px;
  width: 3px;
  background: linear-gradient(180deg, var(--h-primary) 0%, var(--h-teal) 50%, var(--h-coral) 100%);
  border-radius: 4px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  z-index: 2;
  transition: transform 0.2s ease;
}

.timeline-marker:hover {
  transform: scale(1.15);
}

.avatar-timeline-author {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ========================================================
   NUBES DE CONVERSACIONES Y CHAT MULTIDISCIPLINARIO
   ======================================================== */
.cloud-topic-card {
  background: white;
  border: 1px solid var(--h-border);
  border-radius: var(--h-radius-lg);
  box-shadow: var(--h-shadow-sm);
  transition: var(--h-transition);
  cursor: pointer;
  position: relative;
}

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

.cloud-comunicacion { background: #ede9fe; color: #6d28d9; }
.cloud-sensorial    { background: #fef3c7; color: #b45309; }
.cloud-pedagogico   { background: #dbeafe; color: #1d4ed8; }
.cloud-rutinas      { background: #ffe4e6; color: #e11d48; }
.cloud-general      { background: #ccfbf1; color: #0f766e; }

.avatar-chat-bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.chat-bubble-wrapper {
  display: flex;
  width: 100%;
}

.chat-mine {
  justify-content: flex-end;
}

.chat-theirs {
  justify-content: flex-start;
}

.chat-bubble-content {
  max-width: 82%;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.chat-mine .chat-bubble-content {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-theirs .chat-bubble-content {
  background: #f1f5f9;
  color: var(--h-text-main);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--h-border);
}

.chat-mine .chat-author-name {
  color: #e0e7ff;
  font-weight: 700;
  font-size: 0.8rem;
}

.chat-theirs .chat-author-name {
  color: var(--h-text-main);
  font-weight: 700;
  font-size: 0.8rem;
}

.chat-mine .chat-time {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.7rem;
}

.chat-theirs .chat-time {
  color: var(--h-text-muted);
  font-size: 0.7rem;
}

.chat-messages-container {
  height: 380px;
  overflow-y: auto;
  padding: 1rem;
  background: #fafafa;
  border-radius: var(--h-radius-md);
  scroll-behavior: smooth;
}

/* ========================================================
   VISTA DE FILAS INTERACTIVAS CON ACORDEÓN DESPLEGABLE
   ======================================================== */
.child-row-card {
  background: var(--h-bg-card);
  border-radius: var(--h-radius-md);
  border: 1px solid var(--h-border);
  box-shadow: var(--h-shadow-sm);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.child-row-card:hover {
  border-color: var(--h-border-focus);
  box-shadow: var(--h-shadow-md);
}

.child-row-header {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: white;
  transition: background-color 0.2s ease;
  user-select: none;
}

.child-row-header:hover {
  background-color: #f8fafc;
}

.child-row-header.is-open {
  background-color: #f8faff;
  border-bottom: 1px solid var(--h-border);
}

.child-row-details {
  display: none;
  padding: 1.25rem;
  background: #fafcff;
  border-top: 1px dashed var(--h-border);
  animation: fadeInRow 0.25s ease-out;
}

.child-row-details.is-open {
  display: block;
}

@keyframes fadeInRow {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.avatar-child-sm {
  width: 50px;
  height: 50px;
  border-radius: var(--h-radius-full);
  object-fit: cover;
  background: var(--h-purple-light);
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.chevron-expand-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--h-text-muted);
  transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.child-row-header.is-open .chevron-expand-icon {
  transform: rotate(180deg);
  background-color: var(--h-primary-light);
  color: var(--h-primary-dark);
}

/* Pastillas compactas de usuarios asociados en la fila */
.team-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: var(--h-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.team-pill-familia {
  background: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.team-pill-escuela {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.team-pill-salud {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

@media (max-width: 768px) {
  .child-row-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .child-row-team-col {
    width: 100%;
  }
}

/* ========================================================
   ADJUNTOS EN LÍNEA DE TRAYECTORIA (FOTOS Y PDFS)
   ======================================================== */
.timeline-attachment-img-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: var(--h-radius-md);
  overflow: hidden;
  border: 1px solid var(--h-border);
  box-shadow: var(--h-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 260px;
}

.timeline-attachment-img-wrapper:hover {
  transform: scale(1.02);
  box-shadow: var(--h-shadow-md);
}

.timeline-attachment-img {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  display: block;
}

.attachment-zoom-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  text-align: center;
  backdrop-filter: blur(4px);
}

.timeline-attachment-pdf-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: white;
  border: 1.5px solid #fecdd3;
  border-radius: var(--h-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 480px;
}

.timeline-attachment-pdf-card:hover {
  background: #fff1f2;
  border-color: #fb7185;
  transform: translateY(-1px);
  box-shadow: var(--h-shadow-sm);
}

.pdf-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: var(--h-radius-sm);
  background: #ffe4e6;
  color: #e11d48;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ========================================================
   ESTILOS DE LOS 4 EJES DE TRAYECTORIA Y BADGES
   ======================================================== */
.team-pill-medico {
  background: #ede9fe;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.badge-familia {
  background: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.badge-escuela {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-salud, .badge-terapeuta {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.badge-medico {
  background: #ede9fe;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.role-medico {
  background: #ede9fe;
  color: #7c3aed;
}

/* Barra de Navegación de los 4 Ejes Temáticos */
.axis-nav-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.axis-nav-bar::-webkit-scrollbar {
  height: 4px;
}
.axis-nav-bar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.axis-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--h-radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.axis-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.axis-btn.active-global {
  background: var(--h-primary);
  color: #ffffff;
  border-color: var(--h-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
}

.axis-btn.active-familia {
  background: #f43f5e;
  color: #ffffff;
  border-color: #f43f5e;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.28);
}

.axis-btn.active-escuela {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.axis-btn.active-terapeuta {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.28);
}

.axis-btn.active-medico {
  background: #8b5cf6;
  color: #ffffff;
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.28);
}

.axis-counter {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
}

.axis-btn.active-global .axis-counter,
.axis-btn.active-familia .axis-counter,
.axis-btn.active-escuela .axis-counter,
.axis-btn.active-terapeuta .axis-counter,
.axis-btn.active-medico .axis-counter {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Banner de Contexto de Eje Activo */
.axis-callout-banner {
  border-radius: var(--h-radius-md);
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: fadeIn 0.25s ease-in-out;
}

/* ========================================================
   ESTILOS DE PORTADA / LANDING PROMOCIONAL CON ACCESO
   ======================================================== */
.landing-hero-bg {
  position: relative;
  background: radial-gradient(120% 120% at 50% 10%, #ffffff 0%, #f0f9ff 55%, #e0f2fe 100%);
  padding: 3.5rem 1rem 4rem 1rem;
  overflow: hidden;
  border-bottom: 1px solid #e2e8f0;
}

/* Marca de agua de huellas flotantes en fondo */
.landing-hero-bg::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -50px;
  width: 320px;
  height: 380px;
  background-image: url('../assets/logo-simbolo.svg');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.045;
  pointer-events: none;
  transform: rotate(18deg);
}

.landing-hero-bg::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 260px;
  height: 310px;
  background-image: url('../assets/logo-simbolo.svg');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.035;
  pointer-events: none;
  transform: rotate(-22deg);
}

#heroBrandBlock {
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.hero-big-symbol {
  width: 140px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(8, 47, 73, 0.18));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: heroLogoFloat 4s ease-in-out infinite;
}

@keyframes heroLogoFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(-1.5deg);
  }
}

.hero-big-title {
  font-family: var(--h-font-brand);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 900;
  color: var(--h-brand-navy);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-big-title .brand-a {
  color: var(--h-brand-green);
}

.hero-big-subtitle {
  font-family: var(--h-font-brand);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 800;
  color: var(--h-brand-navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.35rem;
  opacity: 0.9;
}

.hero-tagline {
  font-size: 1.12rem;
  color: #334155;
  max-width: 680px;
  line-height: 1.6;
}

.feature-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem auto;
}

.feature-section-title {
  font-family: var(--h-font-brand);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  color: var(--h-brand-navy);
}

.propaganda-card {
  background: #ffffff;
  border-radius: var(--h-radius-lg);
  border: 1.5px solid #e2e8f0;
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 14px rgba(8, 47, 73, 0.05);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.propaganda-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(8, 47, 73, 0.12);
  border-color: #bae6fd;
}

.propaganda-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.pill-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.login-card-embedded {
  background: #ffffff;
  border-radius: var(--h-radius-lg);
  border: 2px solid #e0f2fe;
  box-shadow: 0 20px 40px -10px rgba(8, 47, 73, 0.16);
  padding: 2rem 2.25rem;
  position: relative;
}

.login-card-embedded::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #0284c7 0%, #00c853 50%, #fb8c00 100%);
  border-radius: var(--h-radius-lg) var(--h-radius-lg) 0 0;
}

/* Micro-vitrina visual de funciones dentro de la tarjeta de acceso */
.login-preview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--h-radius-md);
  padding: 0.9rem 1rem;
  margin-top: 1rem;
}

.preview-pill-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--h-radius-sm);
  background: #ffffff;
  border: 1px solid #edf2f7;
  font-size: 0.75rem;
  color: #334155;
  transition: all 0.2s ease;
}

.preview-pill-item:hover {
  transform: translateX(3px);
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.preview-pill-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.quote-highlight-box {
  background: linear-gradient(135deg, #082f49 0%, #0c4a6e 100%);
  color: #ffffff;
  border-radius: var(--h-radius-lg);
  padding: 3rem 2rem;
  box-shadow: 0 14px 30px rgba(8, 47, 73, 0.2);
  position: relative;
  overflow: hidden;
}

.quote-highlight-box::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -20px;
  width: 200px;
  height: 240px;
  background-image: url('../assets/logo-simbolo.svg');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.09;
}





