/* =====================================================
   EQUS UDD - Estilos completos unificados (versión estable)
   ===================================================== */

/* =====================================================
   Tipografía Nunito (Light, Regular, Bold)
   ===================================================== */
@font-face {
  font-family: 'Nunito';
  src: url('/static/fonts/nunito/Nunito-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/static/fonts/nunito/Nunito-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/static/fonts/nunito/Nunito-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =====================================================
   Variables de color EQUS
   ===================================================== */
:root {
  /* Nuevo Primary Color: #743594 (Púrpura/Violeta) */
  --primary-color: #743594;
  
  /* Más claro que el base, para encabezados o elementos que necesitan destacar un poco */
  --primary-light: #8e58ad;
  
  /* Más oscuro que el base, para texto en contraste o fondos muy profundos */
  --primary-dark: #5b1a7b;
  

  --primary-light-60: #d6b8e3; 
  
  /* Color de hover claro, para interacción simple */
  --primary-hover: #e5d9ed;   
  --ciclo: rgb(251, 212, 128);
  /* Color de hover fuerte, para botones o interacciones más destacadas */
  --primary-hover-strong: #642f82;


  /* Manteniendo el color de acento y los neutros, ya que no solicitaste cambiarlos */
  --accent-color: #4a148c;    /* Violeta EQUS  */
  --neutral-bg: #f9fbfd;      /* Fondo neutro  */
  --border-soft: #d1d9e6;    /* Borde suave  */
}

/* =====================================================
   Base global y tipografía
   ===================================================== */
html, body {
  font-family: 'Nunito', 'Roboto', sans-serif;
  font-weight: 400;
  color: #333;
  background-color: #f3f7fd;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
p, a, li, td, th, button,
label, input, select, textarea,
.toast, .btn, .sidenav a {
  font-family: 'Nunito', 'Roboto', sans-serif !important;
}

/* =====================================================
   Navbar EQUS
   ===================================================== */

/* ===== NAVBAR ===== */
#main-nav {
    background-color: var(--primary-color) !important;
}

#main-nav .brand-logo,
#main-nav .nav-wrapper a {
    color: var(--primary-text) !important;
}

/* Icons */
#main-nav .material-icons {
    color: var(--primary-text) !important;
}

/* Hover en elementos del NAV */
#main-nav ul li > a.dropdown-trigger:hover {
    background-color: var(--primary-hover-strong) !important;
    color: white !important; /* mejor contraste */
}

/* ===== DROPDOWN DESKTOP ===== */
#dropdown-equify li > a {
    color: var(--primary-color) !important;
}

#dropdown-equify li:hover {
    background-color: var(--primary-hover) !important;
}

#dropdown-equify li:hover > a {
    color: var(--primary-color) !important;
}

#dropdown-equify li i.material-icons {
    color: var(--primary-color) !important;
}


/* ===== SIDENAV EQUS ===== */
#slide-out {
    background-color: #ffffff !important; /* fondo del sidenav */
}

/* Texto de todos los links */
#slide-out a {
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
}

/* Íconos */
#slide-out a .material-icons {
    color: var(--primary-color) !important;
}

/* Hover EQUS */
#slide-out a:hover {
    background-color: var(--primary-hover) !important; /* azul claro EQUS */
    color: var(--primary-color) !important;
}

#slide-out a:hover .material-icons {
    color: var(--primary-color) !important;
}

/* Subheader (Mi Equify) */
#slide-out .subheader {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

/* Sblinks (los de sangría) */
#slide-out .sidenav-sublink {
    padding-left: 20px !important; /* sangría suave */
}

/* Dividers */
#slide-out .divider {
    background-color: var(--primary-hover) !important;
    height: 1px !important;
}
/* Contenedor del breadcrumb */
.breadcrumb-container a.breadcrumb-link span {
  color: var(--primary-color) !important;
}

.breadcrumb-link {
  color: var(--primary-color) !important;
  font-weight: 500;
  text-decoration: none !important;
}

.breadcrumb-link:hover span {
  text-decoration: underline !important;
}

.breadcrumb-separator,
.breadcrumb-current {
  color: var(--primary-color) !important;
}


/* ============================ */
/* ESTILO PERSONALIZADO TABS   */
/* ============================ */
.tabs .tab a {
  color: var(--primary-color) !important;
  font-weight: 600;
  font-size: 1.1rem;
}

.tabs .tab a:hover {
  background-color: var(--primary-hover) !important;
  color: var(--primary-dark) !important;
}

.tabs .tab a.active {
  color: var(--primary-color) !important;
  border-bottom: 3px solid var(--primary-color) !important;
  background-color: white !important;
}

.tabs .indicator {
  background-color: var(--primary-color) !important;
  height: 3px;
}

/* ========================= */
/*  TEXTAREA ESTILO EQUS     */
/* ========================= */

/* =====================================================
   Panel principal (Visualizador)
   ===================================================== */
.section.center-align {
  width: 100% !important;
  max-width: unset !important;

  /* Reducido a la mitad: antes 16px => ahora 8px */
  margin: 8px auto !important;

  /* Reducido a la mitad: antes 5px => ahora 2.5px */
  padding: 2.5px 2rem !important;

  border: 1.5px solid var(--border-soft);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  position: relative;
  text-align: center;
}


.section.center-align h5 {
  text-align: left;
  margin-top: 4;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
}
.section.no-bottom-padding {
  padding-bottom: 0 !important;
}

/* =====================================================
   WaveSurfer visual
   ===================================================== */
/* =====================================================
   WaveSurfer y Visualizador IA (EQUS)
   ===================================================== */


#waveform-container {
      position: sticky !important;

    width: 100%;
    height: 180px;
    margin-top: 1rem;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 2px dashed #ccc;
    border-radius: 8px;

    display: flex;
    align-items: center;   /* Centrado vertical */
    justify-content: flex-start; 
}

#waveform {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}


#waveform canvas {
    display: block;
}


/* Personalización de la barra de scroll */
#waveform-container::-webkit-scrollbar {
    height: 8px; /* Un poquito más alta para que sea fácil de arrastrar */
    display: block;
}
#waveform-container::-webkit-scrollbar-thumb {
    background: #743594;
    border-radius: 10px;
}
#waveform-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}



/* 3. Placeholder: Ajustado a la nueva altura del contenedor */
#waveform-placeholder {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 200px !important; 
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    transform: none !important;
    color: #999;
    margin: 0 !important;
}
.waveform-cursor {
  width: 8px !important;                
  background-color: orange !important; /* color naranja */
  z-index: 12 !important;
}

/* Forzar que TODAS las regiones de Wavesurfer (excepto ciclo) ocupen el 100% de altura del waveform */
#waveform div[style*="position: absolute"] {
  top: 0 !important;
  height: 100% !important;
}

#waveform canvas {
  display: block;
  position: relative;
}

#waveform > canvas:nth-child(2) {
  position: relative !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}



/* 4. Colores del Spinner (Forzar Púrpura #743594) */
.preloader-wrapper.active .spinner-equify,
.preloader-wrapper.active .spinner-blue-only,
.preloader-wrapper.active .spinner-layer {
    border-color: #743594 !important;
}

.spinner-equify .circle-clipper .circle,
.spinner-blue-only .circle-clipper .circle,
.spinner-layer .circle-clipper .circle {
    border-color: #743594 !important;
    border-width: 3px !important; /* Un poco más grueso para que destaque */
}

/* 5. Estilos adicionales de Wavesurfer */
.waveform wave {
  color: #9fa8da;
}

.waveform progress {
  background-color: var(--primary-color);
}
.wavesurfer-region {
  border-radius: 3px;
  pointer-events: none;
  transition: background-color 0.2s ease;
}
/* ↑ Cursor principal de reproducción ↑ */
.wavesurfer-cursor,
.wavesurfer-cursor .cursor-line {
  width: 4px !important;          /* grosor deseado */
  background: #ffab00 !important; /* color visible */
  border-radius: 2px !important;  /* borde ligeramente redondeado */
}
.wavesurfer-cursor::before,
.wavesurfer-cursor::after {
  width: 4px !important;
  background: #ffab00 !important;
}

.wavesurfer-region[data-label="ciclo"] {
  top: 55% !important;
  height: 60% !important;
}
/* =====================================================
   Botones (Cargar / Analizar audio)
   ===================================================== */
.row .col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.btn-outlined,
#analyzeAudio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  line-height: 44px;
  padding: 0 32px;
  border-radius: 16px;
  font-weight: 400;
  font-family: 'Nunito', sans-serif;
  transition: all 0.25s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  width: 300px;
}
.btn-outlined i,
#analyzeAudio i {
  margin-right: 6px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Outlined */
.btn-outlined {
  border: 1.5px solid var(--primary-color);
  background-color: white !important;
  color: var(--primary-color) !important;
  box-shadow: 0 2px 4px rgba(26, 35, 126, 0.1);
}
.btn-outlined:hover {
  background-color: #e8eaf6 !important;
  box-shadow: 0 4px 8px rgba(26, 35, 126, 0.25);
}

/* Filled (Analizar audio) */
#analyzeAudio {
  background-color: var(--primary-color) !important;
  color: white !important;
  border: none;
  box-shadow: 0 4px 8px rgba(26, 35, 126, 0.25);
}
#analyzeAudio:hover {
  background-color: var(--accent-color) !important;
  box-shadow: 0 6px 12px rgba(74, 20, 140, 0.35);
}
#analyzeAudio:disabled {
  background-color: #e0e0e0 !important;
  color: #999 !important;
  border: 1.5px solid #e0e0e0 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
#fileLabel {
  margin-top: 1px;
  margin-bottom: 0.1rem;
}
#fileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}
#analyzeAudio {
  margin-top: 0.8rem;
}

/* Móviles */
@media (max-width: 600px) {
  .btn-outlined,
  #analyzeAudio {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
  }
  .btn-outlined i,
  #analyzeAudio i {
    margin-right: 8px;
  }
}




/* =====================================================
   Tabla de resultados tipo zebra
   ===================================================== */
/* 1. Color del texto y alineación de los items */
/* Selector para sobreescribir a Materialize */
ul#dropdown-filter-events.dropdown-content li > a,
ul#dropdown-filter-events.dropdown-content li > span {
    color: #6c4298 !important; /* Púrpura Mi Equify */
    font-size: 0.95rem !important;
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    background-color: transparent !important;
}

/* Efecto Hover idéntico a tu imagen drop.png */
ul#dropdown-filter-events.dropdown-content li:hover {
    background-color: #e5d9ed !important; /* Lavanda suave */
    
}

/* Asegurar que el texto se mantenga púrpura al pasar el mouse */
ul#dropdown-filter-events.dropdown-content li:hover a {
    color: #6c4298 !important;
}

/* Ajuste de iconos dentro del dropdown */
ul#dropdown-filter-events.dropdown-content li i.material-icons {
    margin-right: 14px !important;
    color: inherit; /* Hereda el púrpura del link o mantiene su color original si se lo das inline */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#table-header-container thead th {
  position: sticky !important;
  top: 0 !important;
  background-color: var(--primary-light) !important;
  z-index: 2 !important;
}

.table-header th {
  background-color: var(--primary-light) !important;
}


.zebra-table {
  width: 100%;
  max-width: 900px;
  margin: 1rem auto;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  font-weight: 300;
  font-size: 15px;
  text-align: center;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.zebra-table thead {
  background-color: #f7e8ff; /* Lavanda suave EQUS */
  color: var(--primary-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zebra-table tbody tr:nth-child(odd) {
  background-color: #f4f5fb;
}
.zebra-table tbody tr:nth-child(even) {
  background-color: #e8eaf6;
}
.zebra-table tbody tr:hover {
  background-color: #dfe3f3;
  cursor: pointer;
}
.zebra-table th,
.zebra-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
}
.zebra-table a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}
.zebra-table a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}
.zebra-table tr.fila-borborigmo {
  background-color: rgba(225, 179, 234, 0.35) !important;
  font-weight: 600;
  color: black;
}

.zebra-table tr.fila-descarga {
  background-color: rgba(175, 207, 239, 0.35) !important;
  font-weight: 600;
  color: black;
}

.zebra-table tr.fila-ciclo {
  background-color: rgba(255, 180, 40, 0.35) !important;
  font-weight: 600;
  color: black;
}


.zebra-table a.go-to-event {
  color: black !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.zebra-table a.go-to-event i.material-icons {
  color: black !important;
}
.zebra-table tbody tr {
  border-bottom: 1px solid #ccc; /* Línea tipo divider */
}

.zebra-table td {
  border-bottom: none; /* Evita doble borde si ya lo tenía */
}
.zebra-table th,
.zebra-table td {
  padding: 10px 12px;
  border-bottom: none;
  text-align: center;
  vertical-align: middle;
}

.tabla-scroll-fija {
  overflow-y: auto;
  max-height: 400px;
  display: block;
}

.tabla-scroll-fija table {
  border-collapse: collapse;
  width: 100%;
}

.tabla-scroll-fija thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #c8a0da; /* o var(--primary-light) si prefieres */
  color: #ffffff !important;
}




/* =====================================================
   Toasts
   ===================================================== */
.toast {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding-left: 16px !important;
  font-weight: 400;
  font-size: 0.95rem;
  opacity: 0.9 !important;
}
.toast i.material-icons {
  font-size: 1.4rem;
  margin-right: 0 !important;
  color: white !important;
}

/* =====================================================
   Layout 12 columnas
   ===================================================== */
.viewer-container {
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;

  max-width: 1100px;
}
@media (min-width: 992px) {
  .viewer-container {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 1440px) {
  .viewer-container {
    max-width: 1100px;
    padding-left: 70px;
    padding-right: 70px;
  }
}
@media (max-width: 991px) {
  .viewer-container {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* =====================================================
   Splash Screen EQUS UDD
   ===================================================== */
/* 1. ESTILOS PRINCIPALES DEL SPLASH SCREEN */
.splash {
  position: fixed;
  inset: 0;
  
  /* CAMBIO CLAVE: Fondo blanco sólido */
  background: #743594; 
  /* 'color: white;' ya no es necesario */
  
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

/* 2. ESTADOS DE VISIBILIDAD */
.splash.visible {
  opacity: 1;
  pointer-events: auto;
}
.splash.hidden {
  opacity: 0;
  pointer-events: none;
}

/* 3. CONTENIDO OCULTO (general) */
.hidden-content {
  opacity: 0;
  transition: opacity 1s ease;
}
.hidden-content.show {
  opacity: 1;
}

/* 4. CONTENEDOR DEL LOGO */
.splash-content {
  text-align: center;
  /* Eliminada la animación 'fadeInUp' ya que ahora es un logo estático */
}


/* 6. ESTILOS DE TEXTO ELIMINADOS */

/* =====================================================
   Splash Screen - Imagen del logo EQUIFY
   ===================================================== */

.splash-logo {
   width: 400px !important; /* Ajusta este valor si es necesario */
  height: auto;
  margin-bottom: 1rem;
  animation: fadeInDown 2.0s ease both;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  background-color: transparent !important; /* Asegura que el fondo del <img> sea transparente */
}



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


/* =====================================================
   FAB de zoom (color EQUS)
   ===================================================== */



#zoom-controls .btn-floating {
  box-shadow: 0 3px 6px rgba(26, 35, 126, 0.25);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

/* Íconos blancos siempre */
#zoom-controls .btn-floating i {
  color: white !important;
}

/* Zoom In (+): azul EQUS principal */
#zoomIn.btn-floating {
  background-color: var(--primary-color) !important; /* #1a237e */
}
#zoomIn.btn-floating:hover {
  background-color: var(--accent-color) !important; /* #4a148c */
  box-shadow: 0 5px 10px rgba(74, 20, 140, 0.35);
  transform: scale(1.05);
}

/* Zoom Out (–): azul intermedio EQUS */
#zoomOut.btn-floating {
  background-color: #5c6bc0 !important; /* Azul intermedio EQUS */
}
#zoomOut.btn-floating:hover {
  background-color: #3f51b5 !important; /* Un poco más profundo al hover */
  box-shadow: 0 4px 8px rgba(26, 35, 126, 0.3);
  transform: scale(1.05);
}


/* Botón Analizado (Success) */
#analyzeAudio.success-complete:disabled {
  background-color: #2e7d32 !important;  /* Verde Materialize success */
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 8px rgba(46, 125, 50, 0.3) !important;
  cursor: default !important;
}

/* =====================================================
   Botón de Inicio de Sesión (Estilo EQUS)
   ===================================================== */
.btn-login-equs {
  /* Estilos base tomados de #analyzeAudio */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  line-height: 44px;
  padding: 0 32px;
  border-radius: 16px;
  font-weight: 400;
  font-family: 'Nunito', sans-serif !important; 
  transition: all 0.25s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  width: 100%; 
  margin-top: 1.5rem;
  
  /* Colores y sombras EQUS (Estado normal) */
  background-color: var(--primary-color) !important;
  color: white !important;
  border: none;
  box-shadow: 0 4px 8px rgba(26, 35, 126, 0.25);
}

.btn-login-equs:hover {
  /* Estado Hover (similar a #analyzeAudio:hover) */
  background-color: var(--accent-color) !important;
  box-shadow: 0 6px 12px rgba(74, 20, 140, 0.35);
}

/* Botón CANCELAR (estilo plano/texto) */
.btn-confirm-cancel {
  background: none !important;
  border: 1.5px solid #9e9e9e !important;
  border-radius: 16px !important;
  color: #757575 !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  padding: 0 20px !important;
  height: 36px !important;
  line-height: 33px !important; /* Ajuste para centrar texto con borde */
  display: inline-block;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.btn-confirm-cancel:hover {
  background-color: #f5f5f5 !important;
  border-color: #757575 !important;
}

/* Botón ACEPTAR (Estilo EQUS) */
.btn-confirm-accept {
  background-color: var(--primary-color) !important;
  border: 1.5px solid var(--primary-color) !important;
  border-radius: 16px !important;
  color: white !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  padding: 0 20px !important;
  height: 36px !important;
  line-height: 33px !important;
  display: inline-block;
  box-shadow: none !important;
  transition: all 0.3s ease;
}

.btn-confirm-accept:hover {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}
/* Estilo para el enlace de olvidaste contraseña */
.login-link-forgot {
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: none; /* Asegura que no tenga subrayado por defecto */
}

.login-link-forgot:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* ============================================================
   EQUS – SISTEMA UNIFICADO DE FORMULARIOS
   ============================================================ */

/* ------------------------------------------------------------
   1) INPUTS GENERALES (text, email, password, number, date)
   ------------------------------------------------------------ */

.input-field input[type="text"],
.input-field input[type="email"],
.input-field input[type="password"],
.input-field input[type="number"],
.input-field input[type="date"],
.input-field textarea.materialize-textarea {
  border-bottom: 1px solid var(--border-soft) !important;
  box-shadow: none !important;
  color: #333 !important;
}

/* Focus EQUS */
.input-field input[type="text"]:focus,
.input-field input[type="email"]:focus,
.input-field input[type="password"]:focus,
.input-field input[type="number"]:focus,
.input-field input[type="date"]:focus,
.input-field textarea.materialize-textarea:focus {
  border-bottom: 1px solid var(--primary-color) !important;
  box-shadow: 0 1px 0 0 var(--primary-color) !important;
  color: var(--primary-color) !important;
}

/* Label en focus */
.input-field input[type="text"]:focus + label,
.input-field input[type="email"]:focus + label,
.input-field input[type="password"]:focus + label,
.input-field input[type="number"]:focus + label,
.input-field input[type="date"]:focus + label,
.input-field textarea.materialize-textarea:focus + label {
  color: var(--primary-color) !important;
}

/* Label activo */
.input-field label.active {
  color: var(--primary-color) !important;
}


/* ------------------------------------------------------------
   2) ICONO "VER CONTRASEÑA"
   ------------------------------------------------------------ */

.input-field .password-toggle-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  color: #9e9e9e;
  transition: color 0.2s ease;
}

.input-field .password-toggle-icon:hover {
  color: var(--primary-color) !important;
}


/* ------------------------------------------------------------
   3) TEXTAREA EQUS
   ------------------------------------------------------------ */

.materialize-textarea {
  min-height: 120px !important;
  padding: 12px !important;
  line-height: 1.5 !important;
  box-sizing: border-box !important;
}

.materialize-textarea:focus {
  border-bottom: 1px solid var(--primary-color) !important;
  box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

#sexo {
  width: 100% !important;
}

/* ------------------------------------------------------------
   4) SELECT MATERIALIZE — EQUS REAL
   ------------------------------------------------------------ */
/* Ajuste visual solo para el select de "Sexo" */
/* ============================ */
/* EQUS — Select especial Sexo */
/* ============================ */
.select-especial,
.select-especial .select-wrapper {
  width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
}

.select-especial .select-wrapper input.select-dropdown {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 0.3rem !important;
  text-align: left !important;
}

/* Asegura que el dropdown también sea amplio */
.select-especial .dropdown-content {
  width: 100% !important;
  min-width: 100% !important;
}


/* Focus */
.select-wrapper input.select-dropdown:focus {
  border-bottom: 1px solid var(--primary-color) !important;
  box-shadow: 0 1px 0 0 var(--primary-color) !important;
  color: var(--primary-color) !important;
}

/* Label del select */
.input-field .select-wrapper + label {
  color: #666 !important;
}

/* Label en focus */
.select-wrapper input.select-dropdown:focus + label,
.input-field select:focus + label {
  color: var(--primary-color) !important;
}

/* Dropdown */
ul.dropdown-content.select-dropdown li > span {
  color: #333 !important;
}

ul.dropdown-content.select-dropdown li:hover {
  background-color: var(--neutral-bg) !important;
}

ul.dropdown-content.select-dropdown li:hover > span {
  color: var(--primary-color) !important;
}

ul.dropdown-content.select-dropdown li.selected > span {
  color: var(--primary-color) !important;
  font-weight: 600 !important;
}

/* Ocultar select nativo */
select {
  opacity: 0 !important;
  position: absolute !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
}

/* Alinea mejor el select de Flanco */
.select-flanco .select-wrapper {
  margin-left: 0 !important;
  padding-left: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.select-flanco .select-wrapper input.select-dropdown {
  padding-left: 0.5rem !important;
  text-align: left !important;
}


/* ===================================================== */
/*  EQUS — Ancho completo solo para el select de Rol     */
/* ===================================================== */

.input-field .select-wrapper.select-rol-wrapper {
  width: 100% !important;
}

.select-rol-wrapper input.select-dropdown {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.select-rol-wrapper .dropdown-content {
  width: 100% !important;
  min-width: 100% !important;
}

/* ------------------------------------------------------------
   5) TEXTFIELD EQUS (buscador)
   ------------------------------------------------------------ */

.textfield-equs {
  position: relative;
  margin: 0 auto 2rem auto;
  max-width: 1000px;
  width: 100%;
  height: 48px;
}

.textfield-equs input {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 48px;
  padding: 0 40px 0 0;
  font-size: 16px;
  border: none;
  border-bottom: 2px solid var(--border-soft);
  background: transparent;
  outline: none;
  transition: border-bottom 0.25s ease;
  color: #333;
}

.textfield-equs input:focus {
  border-bottom: 2px solid var(--primary-color);
  color: var(--primary-color);
}

/* Label floating EQUS */
.textfield-equs .equs-label {
  position: absolute;
  top: 14px; left: 0;
  font-size: 16px;
  color: #777;
  transition: 0.25s ease;
  pointer-events: none;
}

.textfield-equs input:focus + .equs-label,
.textfield-equs input:not(:placeholder-shown) + .equs-label {
  top: -8px;
  font-size: 13px;
  color: var(--primary-color);
}

/* Icono */
.textfield-equs .search-icon {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: #aaa;
  pointer-events: none;
  transition: color 0.25s ease;
}

.textfield-equs input:focus ~ .search-icon {
  color: var(--primary-color);
}

/* Chrome: placeholder hack */
.textfield-equs input::placeholder {
  color: transparent;
}

/* =====================================================
   Tabla responsive EQUS
   ===================================================== */
.table-responsive-equs {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  padding-bottom: 6px;
}

.table-responsive-equs table {
  min-width: 700px;
}


/* =====================================================
   Panel EQUS en 2 columnas
   ===================================================== */
/* =====================================================
   PANEL EQUS EXCLUSIVO PARA LA FICHA DETALLADA
   ===================================================== */

.section-ficha {
  background-color: var(--neutral-bg);
  border: 1.5px solid var(--border-soft);
  border-radius: 0px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2rem;
  margin-top: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  text-align: left;
}

/* Título estilo EQUS */
.section-ficha h5 {
  text-align: left;
  margin-top: 0;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
}


/* =====================================================
   GRID EN 2 COLUMNAS PARA LA FICHA
   ===================================================== */

.ficha-panel-grid {
  display: grid !important;                            /* fuerza grid */
grid-template-columns: repeat(2, 1fr);  gap: 1.5rem 2rem;

  border-radius: 0px;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
  background: var(--neutral-bg);
}

/* Campo estándar */
.ficha-panel-grid .campo {
  display: flex;
  flex-direction: column;
}



/* Etiquetas EQUS */
.ficha-panel-grid label {
  font-weight: 550 !important;
  color: var(--primary-color);
  font-size: 1rem;
}

/* Texto de datos */
.ficha-panel-grid p {
  margin-top: 0.2rem;
  font-size: 1.1rem;
  color: #333;
}

.divider-equs {
  width: 100%;
  height: 1px;
  background: var(--border-soft);
  margin: 0.5rem 0 1rem 0;
  opacity: 0.8;
}
/* Forzar que los dividers ocupen 2 columnas en el grid */
.ficha-panel-grid .divider-equs {
  grid-column: span 2 !important;
}



/* =====================================================
   Text Button EQUS para botón Volver
   ===================================================== */


.volver-container {
  margin-top: 2rem;
  text-align: left;
}

/* Text button puro EQUS */
.volver-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  padding: 4px 2px;

  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.05rem;

  text-decoration: none;
  transition: color 0.2s ease;
}

.volver-text-btn .icon-back {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.section-ficha .volver-text-btn:hover {
  color: var(--primary-dark);
}



.textfield-equs input[type="text"]:focus,
.textfield-equs input:focus {
  border-bottom: 2px solid var(--primary-color) !important;
  box-shadow: 0 1px 0 0 var(--primary-color) !important;
  color: var(--primary-color) !important;
}

.textfield-equs input:focus + .equs-label {
  color: var(--primary-color) !important;
}

.textfield-equs input:focus ~ .search-icon {
  color: var(--primary-color) !important;
}
.collapsible li .collapsible-body {
  background-color: #ffffff !important;
}

input[type="time"]:focus,
input[type="time"]:focus:not([readonly]) {
  border-bottom: 1px solid var(--primary-color) !important;
  box-shadow: 0 1px 0 0 var(--primary-color) !important;
}
#timeline-wrapper {
  position: relative;
  overflow-x: auto;   
  overflow-y: hidden;
  height: 35px;
  background: #fdfdfd;
  border-top: 1px solid #ddd;
  z-index: 1;
}

input[type="time"]:focus + label {
  color: var(--primary-color) !important;
}

.sidenav-fixed-bottom {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidenav-logout {
  margin-top: auto;
  border-top: 1px solid #ddd;
  padding-top: 10px;
}
.titulo-secundario {
  font-family: 'Nunito', sans-serif !important;
  font-size: 1.125rem !important; 
  font-weight: 600 !important;
  color: var(--primary-color) !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
}
.campo-indentado {
  padding-left: 0.75rem; 
}

.campo-full {
  grid-column: span 2;
}

@media (max-width: 600px) {
  .campo-full {
    grid-column: span 1 !important;
  }
}


@media (max-width: 00px) {
  .ficha-panel-grid {
    grid-template-columns: 1fr !important;   
  }

  
}
@media (max-width: 600px) {
  .table-responsive-equs table {
    table-layout: fixed !important;
    width: 100% !important;
  }
}

@media (max-width: 600px) {
  .equs-label {
    font-size: 0.9rem !important;
  }
}
/* =====================================================
   Leyenda Horizontal EQUS
   ===================================================== */
#region-legend {
  display: none; /* Se activa vía JS */
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: center;
  gap: 20px; /* Un poco más de espacio entre grupos para claridad */
  margin: 20px 0 10px 0 !important;
  padding-left: 5px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0; 
  border-radius: 0;
  border: none;
  background-color: transparent !important; 
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.legend-borborigmo { color: #7b1fa2; }
.legend-descarga   { color: #1976d2; }
.legend-ciclo      { color: #616161; }

.legend-color-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0; 
}
tr.destacar-ciclo td a.go-to-event {
    color: #000000 !important;
}

tr.destacar-ciclo td a.go-to-event i.material-icons {
    color: #000000 !important;
}


input.highlight-green {
  background-color: #e8f5e9 !important;
  transition: background-color 0.6s ease;
}


.preloader-wrapper.active .spinner-equify {
    border-color: #743594 !important;
}

.spinner-equify .circle-clipper .circle {
    border-color: #743594 !important; 
    border-width: 3px; 
}

.spinner-layer.spinner-blue-only, 
.spinner-layer.spinner-red-only, 
.spinner-layer.spinner-yellow-only, 
.spinner-layer.spinner-green-only {
    border-color: #743594 !important;
}



/* ===============================
   Botón Guardar Ficha (Deshabilitado)
   =============================== */
.btn-login-equs:disabled {
  background-color: #afafaf !important; /* Lavanda claro EQUS */
  color: #ffffff !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.btn-login-equs:disabled i.material-icons {
  color: #ffffff !important;
}
.advertencia-diagnostico {
  color: red !important;
  font-weight: 600 !important;
  margin: 1rem auto 1.5rem auto !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  line-height: 1.4 !important;
}

.icono-advertencia {
  color: red !important;
  font-size: 20px !important;
  position: relative !important;
  top: 0px !important;
}
/* Estado oculto */
.advertencia-diagnostico.is-hidden {
  display: none !important;
}


/* Estilo visual para header de tabla de ficha médica */
.tabla-header-ficha th {
  background-color: #a567c8 !important;  /* Violeta fuerte como en la imagen */
  color: #ffffff !important;             /* Texto blanco */
  font-weight: 600 !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid #ddd !important;
  padding: 12px 8px !important;
  font-size: 0.9rem;
}
