/* ==========================================================================
   VISION OS / ROYAL CHARCOAL & NAVY BLUE GLASSMORPHISM STYLESHEET
   Córdova & Asociados - Suite Legal y Administrativa
   ========================================================================== */

:root {
  --bg-deep: #1e2023;
  --bg-deep-alt: #1e1f22;
  --bg-charcoal: #1e1f22;
  --bg-charcoal-card: #2b2d31;
  --border-charcoal: #47484c;
  --border-charcoal-light: #4c4e51;
  
  --glass-base: rgba(30, 32, 35, 0.75);
  --glass-base-hover: rgba(43, 45, 49, 0.85);
  --glass-card: #1e1f22;
  --glass-card-hover: #2b2d31;
  --glass-border: rgba(71, 72, 76, 0.35);
  --glass-border-hover: rgba(71, 72, 76, 0.65);
  --glass-border-highlight: rgba(255, 255, 255, 0.05);
  
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --navy-blue: #244c78;
  --navy-blue-hover: #1d3e63;
  --navy-blue-border: #325c8d;
  --slate-blue: #325c8d;
  --slate-blue-muted: #93c5fd;
  
  --alert-red-bg: rgba(239, 68, 68, 0.14);
  --alert-red-border: rgba(239, 68, 68, 0.4);
  --alert-red-text: #fca5a5;
  
  --success-green-bg: #1b4329;
  --success-green-border: #295e3c;
  --success-green-hover: #143520;
  --success-green-text: #52a373;
  --success-green-dot: #2e6b45;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Densidad Global Base 13px - Tipografía Corporativa Plus Jakarta Sans */
html {
  font-size: 13px !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.45;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  zoom: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografía Sans-Serif Proporcional Global: reemplazo de fuentes monoespaciadas rígidas */
.font-mono,
code,
kbd,
samp,
pre {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  letter-spacing: normal !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. JERARQUÍA EN TÍTULOS (ESTILO LÍNEA ROJA)
   - Títulos de sección, cabeceras de módulos ("ASIGNACIÓN DE REUNIONES", 
     "GESTIÓN DE CLIENTES", "CALENDARIO", nombres principales de clientes)
   - font-weight: 700 o 800 (bold / extrabold)
   - color: blanco / gris claro de alto contraste (text-white o text-gray-100: #ffffff / #f3f4f6)
   - letter-spacing: -0.02em (tracking ligeramente cerrado para un acabado moderno y sólido)
   ========================================================================== */
h1, h2, h3, h4,
[id^="viewTitle"],
.section-title,
.module-title,
.view-title,
.card-client-title,
.client-name-title,
.reunion-client-name,
#profileName {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em !important;
}

/* ==========================================================================
   3. JERARQUÍA EN SUBTÍTULOS Y DESCRIPTIVOS (ESTILO LÍNEA VERDE)
   - Descripciones secundarias ("Panel centralizado de derivación...", 
     "Trazabilidad diaria...", textos de ayuda y metadatos)
   - font-weight: 400 o 500 (normal / medium)
   - color: gris neutro mate (text-gray-400 o text-zinc-400: #9ca3af)
   - letter-spacing: 0 / normal
   ========================================================================== */
[id^="viewDescription"],
.section-subtitle,
.module-subtitle,
.view-description,
.card-subtitle,
.text-descriptive,
#profileSubtitle {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 400 !important;
  color: #9ca3af !important;
  letter-spacing: 0 !important;
}

/* ==========================================================================
   LISTADOS CONTINUOS ESTILO GOOGLE DRIVE (CLIENTES Y REUNIONES)
   - Contenedor plano continuo: #18191c con border #26282d y rounded-xl
   - Sin márgenes ni gaps entre elementos
   - Filas planas con divisor sutil inferior (border-b #26282d/60)
   - Hover refinado tipo Drive (rgba(63, 63, 70, 0.25) / hover:bg-zinc-800/40)
   - Acordeón expandido integrado con fondo #121316
   ========================================================================== */
.drive-list-container {
  background-color: #18191c !important;
  border: 1px solid #26282d !important;
  border-radius: 0.75rem !important; /* rounded-xl */
  overflow: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.reunion-card,
.client-drive-row,
.card-accordion.client-drive-row,
.drive-list-container .card-accordion {
  background-color: transparent !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(38, 40, 45, 0.6) !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: background-color 0.15s ease !important;
  cursor: pointer !important;
}

.reunion-card:last-child,
.client-drive-row:last-child,
.card-accordion.client-drive-row:last-child,
.drive-list-container .card-accordion:last-child {
  border-bottom: none !important;
}

.reunion-card-header,
.client-drive-row .card-accordion-header,
.client-drive-row .client-row-header,
.drive-list-container .card-accordion-header,
.remate-suspendido-header {
  padding: 0.625rem 1rem !important; /* py-2.5 px-4 */
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  user-select: none !important;
  background-color: transparent !important;
  background: transparent !important;
  transition: background-color 0.15s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.reunion-card:hover,
.reunion-card-header:hover,
.reunion-card:hover > .reunion-card-header,
.client-drive-row .card-accordion-header:hover,
.client-drive-row .client-row-header:hover,
.client-drive-row:hover,
.client-drive-row:hover > .client-row-header,
.client-drive-row:hover > .card-accordion-header,
.card-accordion.client-drive-row:hover,
.drive-list-container .card-accordion:hover,
.drive-list-container .card-accordion:hover > .card-accordion-header,
.drive-list-container .card-accordion-header:hover,
.remate-suspendido-row:hover,
.remate-suspendido-header:hover,
.remate-suspendido-row:hover > .remate-suspendido-header {
  background-color: #1f2126 !important;
  background: #1f2126 !important;
  border-color: rgba(38, 40, 45, 0.6) !important;
  border-top-color: transparent !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  box-shadow: none !important;
}

.reunion-card-body,
.client-drive-row .card-expanded-drawer,
.card-accordion .card-expanded-drawer,
.card-accordion-body,
.drive-list-container .card-accordion-body {
  background-color: #121316 !important;
  border-top: 1px solid rgba(38, 40, 45, 0.6) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#app {
  font-size: 13px !important;
}

/* AMBIENT GLOW ORBS - ELIMINADAS PARA ESTILO JURÍDICO SOBRIO */
.ambient-glow-container {
  display: none !important;
}

.glow-orb {
  display: none !important;
}

/* GLASS SURFACES */
.glass-panel {
  background: var(--glass-base);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 0 var(--glass-border-highlight), 0 10px 30px -8px rgba(0, 0, 0, 0.65);
}

header.glass-panel {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 0.75rem !important;
}

.glass-panel-hover {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-hover:hover {
  background: var(--glass-base-hover);
  border-color: var(--glass-border-hover);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 10px 24px -4px rgba(0, 0, 0, 0.5);
}

/* Glass Card */
.glass-card {
  background: var(--glass-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-charcoal);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 6px 20px -4px rgba(0, 0, 0, 0.45);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: var(--glass-card-hover);
  border-color: var(--border-charcoal-light);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 12px 28px -4px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   LISTA VERTICAL ORDENADA DE CAUSAS / CLIENTES
   ========================================================================== */
#contenedor-causas,
.contenedor-causas,
.lista-nuevos-ingresos,
.view-cards-scroll,
[id^="cards-"],
#clientsContainer,
#content-clientes {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.85rem !important;
  height: auto !important;
  width: 100% !important;
  position: static !important;
  box-sizing: border-box !important;
}

/* Reglas estrictas para todas las tarjetas hijas dentro de los contenedores */
#contenedor-causas > *,
.contenedor-causas > *,
.lista-nuevos-ingresos > *,
.view-cards-scroll > *,
[id^="cards-"] > *,
#clientsContainer > *,
#content-clientes > *,
.card-accordion {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  float: none !important;
  clear: both !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   CARD ACCORDION / HOVER & CLICK EXPANSION
   ========================================================================== */
.card-accordion:not(.client-drive-row):not(.reunion-card) {
  background: #1e1f22 !important;
  border: 1px solid #47484c !important;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  float: none !important;
  clear: both !important;
  box-sizing: border-box !important;
  border-radius: 0.5rem !important;
  height: auto !important;
  min-height: unset !important;
  padding: 0.5rem 1rem !important;
}

.card-accordion:not(.client-drive-row):not(.reunion-card):hover {
  background: #2b2d31 !important;
  border-color: #4c4e51 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
}

.card-accordion .accordion-chevron {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  transform: rotate(0deg);
}

.card-accordion:hover .accordion-chevron {
  background-color: #2b2d31;
  border-color: #47484c;
  color: #ffffff;
}

/* Rota hacia arriba (180deg) ÚNICAMENTE cuando la tarjeta está expandida por clic */
.card-accordion.is-expanded {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  transform: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  min-height: unset !important;
  padding: 0.5rem 1rem !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  border-color: #4c4e51 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  box-sizing: border-box !important;
}

.card-accordion.is-expanded .accordion-chevron {
  transform: rotate(180deg);
  color: #ffffff;
  background-color: #2b2d31;
  border-color: #47484c;
  box-shadow: none !important;
}

/* Fila de Cabecera Visible Siempre en Tarjetas */
.card-accordion-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 42px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* El drawer interior está estrictamente colapsado por defecto */
.card-accordion:not(.is-expanded) .card-expanded-drawer,
.card-accordion:not(.is-expanded) [id^="clientDetails-"] {
  display: none !important;
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  pointer-events: none !important;
}

/* Se despliega ÚNICAMENTE cuando la tarjeta tiene la clase .is-expanded (por clic) - Flujo vertical limpio sin scroll interno ni solapamiento */
.card-accordion.is-expanded .card-expanded-drawer,
.card-accordion.is-expanded [id^="clientDetails-"] {
  position: relative !important;
  width: 100% !important;
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  opacity: 1 !important;
  padding-top: 0.5rem !important;
  border-top-width: 1px !important;
  margin-top: 0.5rem !important;
  pointer-events: auto !important;
  padding-right: 0 !important;
}

/* Glass inputs (Formularios y Modales en Royal Charcoal) */
.glass-input {
  background: #1e1f22 !important;
  backdrop-filter: blur(12px);
  border: 1px solid #47484c !important;
  color: #ffffff !important;
  outline: none;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.glass-input:focus {
  background: #24262a !important;
  border-color: #244c78 !important;
  box-shadow: none !important;
  outline: none !important;
}

.glass-input::placeholder {
  color: #94a3b8 !important;
}

/* ALERT CONDITIONS: CUOTA CAÍDA vs AL DÍA (SOBRIO Y LIMPIO - HOMOGÉNEO NEUTRO SIN BORDES ROJOS) */
.card-cuota-caida {
  background: #1e1f22 !important;
  border: 1px solid #47484c !important;
  border-left: 1px solid #47484c !important;
  box-shadow: none !important;
}

.card-cuota-caida:hover {
  background: #2b2d31 !important;
  border-color: #4c4e51 !important;
  border-left-color: #4c4e51 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.badge-cuota-caida {
  background: rgba(239, 68, 68, 0.14) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  animation: none !important;
}

.card-al-dia:not(.client-drive-row) {
  background: #1e1f22 !important;
  border: 1px solid #47484c !important;
  border-left: 1px solid #47484c !important;
  box-shadow: none !important;
}

.card-al-dia:not(.client-drive-row):hover {
  background: #2b2d31 !important;
  border-color: #4c4e51 !important;
  border-left-color: #4c4e51 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

/* Símbolo "+" de ClaveÚnica (Texto Plano Azul Corporativo sin caja) */
.btn-clave-unica-add {
  background: transparent !important;
  background-color: transparent !important;
  color: #3875b4 !important;
  border: none !important;
  cursor: pointer;
  padding: 0 !important;
  font-weight: 700;
  transition: color 0.15s ease !important;
}

.btn-clave-unica-add:hover {
  background: transparent !important;
  background-color: transparent !important;
  color: #60a5fa !important;
}

.badge-al-dia {
  background: transparent !important;
  background-color: transparent !important;
  color: #52a373 !important;
  border: none !important;
  border-width: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.badge-en-tramitacion {
  background: transparent !important;
  background-color: transparent !important;
  color: #7ba1c7 !important;
  border: none !important;
  border-width: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

@keyframes subtlePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.88; transform: scale(0.98); }
}

/* ==========================================================================
   FLOATING GLASSMORPHISM SIDEBAR & WORKSPACE
   ========================================================================== */
#mainSidebar {
  margin: 8px !important;
  border-radius: 12px !important;
  background: rgba(30, 32, 35, 0.65) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(71, 72, 76, 0.35) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
  width: 210px !important;
  min-width: 210px !important;
  max-width: 210px !important;
  height: calc(100vh - 16px) !important;
  padding: 8px 6px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#mainWorkspace {
  margin: 8px 8px 8px 0 !important;
  height: calc(100vh - 16px) !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* HEADER LOGO CONTAINER */
.header-logo-container {
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.header-logo-img {
  max-height: 24px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: brightness(1.15) contrast(1.1);
}

.sidebar-toggle-wrapper {
  transition: all 0.3s ease;
}

.sidebar-toggle-btn {
  background: #1e1f22 !important;
  border: 1px solid #47484c !important;
  color: #a0a5ad !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: #2b2d31 !important;
  border-color: #4c4e51 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* SIDEBAR USER PROFILE BLOCK */
.sidebar-user-block {
  background: #1e1f22 !important;
  border: 1px solid #47484c !important;
  border-radius: 10px;
  height: 48px !important;
  max-height: 48px !important;
  padding: 0.35rem 0.6rem !important;
  display: flex !important;
  align-items: center !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box !important;
}

.sidebar-user-block:hover {
  background: #2b2d31 !important;
  border-color: #4c4e51 !important;
}

.sidebar-role-wrapper select {
  background: #1e1f22 !important;
  border: 1px solid #47484c !important;
  color: #ffffff !important;
  transition: all 0.2s ease;
}

.sidebar-role-wrapper select:focus {
  border-color: #325c8d !important;
  box-shadow: none !important;
  outline: none !important;
}

.sidebar-toggle-btn {
  background: #2b2d31;
  border: 1px solid #47484c;
  color: #a0a5ad;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 10px;
}

.sidebar-toggle-btn:hover {
  background: #383a40;
  border-color: #4c4e51;
  color: #ffffff;
  box-shadow: none;
}

/* NAVIGATION (EXECUTIVE WITH ICONS & EXPANDABLE/COLLAPSIBLE LABELS) */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.45rem !important;
  padding: 0.4rem 0.65rem !important;
  border-radius: 0.375rem;
  color: #a0a5ad;
  font-size: 0.8rem !important;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
}

.nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem !important;
  font-weight: 500;
  color: inherit;
}

.nav-item .nav-badge {
  margin-left: auto;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: rgba(71, 72, 76, 0.4);
  transform: translateX(2px);
}

/* EFECTO DE RESALTE ACTIVO / SELECCIÓN (SOBRIO Y PLANO CON UNA ÚNICA BARRA LATERAL IZQUIERDA EN AZUL CORPORATIVO) */
.nav-item.active {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
  border-left: 3px solid #244c78 !important;
  border-radius: 0.375rem !important;
  box-shadow: none !important;
  font-weight: 600;
  position: relative;
}

.nav-item.active .nav-icon {
  color: #ffffff !important;
}

.nav-item.active::before,
.nav-item.active::after {
  display: none !important;
  content: none !important;
}

/* ==========================================================================
   ESTADO COLAPSADO DEL SIDEBAR (68px - PÍLDORA FLOTANTE)
   ========================================================================== */
#mainSidebar.sidebar-collapsed {
  width: 68px !important;
  min-width: 68px !important;
  max-width: 68px !important;
  padding: 16px 8px !important;
  border-radius: 20px !important;
}

/* Botón minimalista de colapso/expansión (chevron) */
#btnToggleSidebar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #2b2d31 !important;
  border: 1px solid #47484c !important;
  color: #a0a5ad !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

#btnToggleSidebar:hover {
  background: #383a40 !important;
  border-color: #4c4e51 !important;
  color: #ffffff !important;
}

#mainSidebar.sidebar-collapsed .user-header-row {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

#mainSidebar.sidebar-collapsed .user-avatar-info {
  justify-content: center !important;
  width: 100% !important;
  flex: none !important;
}

#mainSidebar.sidebar-collapsed #btnToggleSidebar {
  width: 28px !important;
  height: 28px !important;
  margin: 0 auto !important;
}

#mainSidebar.sidebar-collapsed #sidebarToggleIcon {
  transform: rotate(180deg) !important;
}

/* User Card en modo colapsado: avatar centrado, textos y select ocultos */
#mainSidebar.sidebar-collapsed .sidebar-user-block {
  padding: 4px 0 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  margin-bottom: 6px !important;
}

#mainSidebar.sidebar-collapsed .profile-info-block,
#mainSidebar.sidebar-collapsed .sidebar-role-wrapper {
  display: none !important;
}

#mainSidebar.sidebar-collapsed .nav-label {
  display: none !important;
}

#mainSidebar.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0.6rem 0;
  gap: 0;
  transform: none !important;
}

#mainSidebar.sidebar-collapsed .nav-item .nav-icon {
  margin: 0 auto;
}

#mainSidebar.sidebar-collapsed .nav-item.active::before {
  display: none !important;
}

#mainSidebar.sidebar-collapsed .nav-item.active::after {
  right: 0;
  top: 15%;
  bottom: 15%;
  width: 3.5px;
  background-color: #3b82f6 !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

#mainSidebar.sidebar-collapsed .nav-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 6px;
  height: 6px;
  min-width: 6px;
  padding: 0;
  font-size: 0;
  border-radius: 9999px;
  margin-left: 0;
}

#mainSidebar.sidebar-collapsed .sidebar-status-block {
  justify-content: center;
  padding: 0.25rem 0;
}

#mainSidebar.sidebar-collapsed .sidebar-status-block .nav-label,
#mainSidebar.sidebar-collapsed .sidebar-status-block #resetDataBtn {
  display: none !important;
}

#mainSidebar.sidebar-collapsed .sidebar-bottom .nav-item {
  justify-content: center;
  padding: 0.5rem 0;
}

/* Tooltip Flotante al pasar el cursor sobre cada icono en colapsado */
#mainSidebar.sidebar-collapsed .nav-item[data-tooltip] {
  position: relative;
}

#mainSidebar.sidebar-collapsed .nav-item[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 14px);
  right: auto;
  top: 50%;
  bottom: auto;
  width: auto;
  transform: translateY(-50%);
  background: #1e1f22;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid #47484c;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 1;
  animation: sidebarTooltipFade 0.15s ease-out forwards;
}

@keyframes sidebarTooltipFade {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* ACTION BUTTONS */
.btn-assign-base {
  padding: 0.28rem 0.55rem;
  border-radius: 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border-width: 1px;
}

.btn-assign-tramitacion {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  color: #a0a5ad !important;
  box-shadow: none !important;
  padding: 0.25rem 0.4rem !important;
}
.btn-assign-tramitacion:hover {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-assign-extrajudicial {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  color: #a0a5ad !important;
  box-shadow: none !important;
  padding: 0.25rem 0.4rem !important;
}
.btn-assign-extrajudicial:hover {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-assign-inmobiliario {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  color: #a0a5ad !important;
  box-shadow: none !important;
  padding: 0.25rem 0.4rem !important;
}
.btn-assign-inmobiliario:hover {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-assign-ventas {
  background: #1e1f22;
  border-color: #47484c;
  color: #a0a5ad;
}
.btn-assign-ventas:hover {
  background: #2b2d31;
  border-color: #325c8d;
  color: #ffffff;
  box-shadow: none;
  transform: translateY(-1px);
}

/* PRIMARY BUTTON (AZUL CLÁSICO CORPORATIVO / NAVY MATE) */
.btn-primary-neon {
  background-color: #244c78 !important;
  color: #ffffff !important;
  border: 1px solid #325c8d !important;
  box-shadow: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.btn-primary-neon:hover {
  background-color: #1d3e63 !important;
  border-color: #325c8d !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

/* CONTENEDOR GLOBAL DE MODALES Y BACKDROPS */
#modals-container.hidden,
.slideover-backdrop:not(.active),
.modal-backdrop:not(.active) {
  display: none !important;
}

/* MODAL STANDARD BACKDROP */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 16, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active,
.modal-backdrop.show {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* SLIDE-OVER (MODALES EN ROYAL CHARCOAL) */
.slideover-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 16, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.slideover-backdrop.active,
.slideover-backdrop.show {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.slideover-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 540px;
  background: #1e1f22 !important;
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border-left: 1px solid #47484c !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7) !important;
  z-index: 55;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.slideover-backdrop.active .slideover-panel {
  transform: translateX(0);
}

/* Modales y Formularios: Entradas y Áreas de Texto Institucionales Oscuras */
.slideover-panel input,
.slideover-panel select,
.slideover-panel textarea {
  background-color: #16181d !important;
  border: 1px solid rgba(55, 65, 81, 0.6) !important;
  color: #f3f4f6 !important;
  outline: none !important;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.slideover-panel input:focus,
.slideover-panel select:focus,
.slideover-panel textarea:focus {
  background-color: #1c1f26 !important;
  border-color: #244c78 !important;
  box-shadow: 0 0 0 1px #325c8d !important;
}

.slideover-panel input::placeholder,
.slideover-panel textarea::placeholder {
  color: #6b7280 !important;
}

/* Tarjetas y Contenedores Internos en Modales */
.slideover-panel .glass-card,
.slideover-panel .bg-purple-950\/30,
.slideover-panel .bg-purple-950\/40,
.slideover-panel .bg-purple-950\/50,
.slideover-panel .bg-purple-950\/60,
.slideover-panel .bg-purple-950 {
  background: #2b2d31 !important;
  border-color: #47484c !important;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: #1e2023;
}

::-webkit-scrollbar-thumb {
  background: #47484c;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4c4e51;
}

/* ANIMATIONS */
@keyframes slideDownFade {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.toast-box {
  animation: slideDownFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.card-assigned-anim {
  animation: cardFadeOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardFadeOut {
  to {
    opacity: 0;
    transform: scale(0.94) translateY(6px);
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* DROPDOWN INTERACTIVO DE CUOTAS */
.dropdown-cuotas-trigger {
  cursor: pointer;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dropdown-cuotas-trigger.al-dia {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  box-shadow: none;
}
.dropdown-cuotas-trigger.al-dia:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.6);
  color: #ffffff;
  box-shadow: none;
}

.dropdown-cuotas-trigger.caida {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  box-shadow: none;
}
.dropdown-cuotas-trigger.caida:hover {
  background: rgba(239, 68, 68, 0.26);
  border-color: rgba(239, 68, 68, 0.8);
  color: #ffffff;
  box-shadow: none;
}

.chevron-cuotas {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.chevron-cuotas.is-open {
  transform: rotate(180deg);
}

.cuota-row-interactive:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

/* STATUS DOT INTERACTIVO (CABECERA DE FILA DE TARJETA) */
.status-dot-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  margin: -5px;
  border-radius: 9999px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.status-dot-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.status-dot-indicator {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-dot-al-dia {
  background-color: #2e6b45;
  box-shadow: none;
}

.status-dot-caida {
  background-color: #ef4444;
  box-shadow: none;
}

/* ==========================================================================
   ULTRA-COMPACT ALERTS & HITOS PROCESALES (PANEL DERECHO)
   ========================================================================== */
.alert-card-compact {
  padding: 6px 8px;
  border-radius: 8px;
  background: #1e1f22 !important;
  border: 1px solid #47484c !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  box-sizing: border-box;
}

.alert-card-compact:hover {
  background: #2b2d31 !important;
  border-color: #4c4e51 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.micro-badge-hito {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1.1;
}

.micro-badge-hito.plazo-fatal {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.micro-badge-hito.audiencia {
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(37, 99, 235, 0.6);
  color: #bfdbfe;
}

.micro-badge-hito.alegato {
  background: rgba(11, 34, 73, 0.5);
  border: 1px solid rgba(37, 99, 235, 0.5);
  color: #93c5fd;
}

.micro-badge-hito.escrito {
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(14, 165, 233, 0.6);
  color: #bae6fd;
}

.micro-badge-urgencia {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9999px;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.micro-badge-urgencia.urgencia-rojo-pulse {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.7);
  color: #fca5a5;
  box-shadow: none;
}

.micro-badge-urgencia.urgencia-rojo {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fecaca;
}

.micro-badge-urgencia.urgencia-ambar,
.micro-badge-urgencia.urgencia-alerta {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.6) !important;
  color: #ef4444 !important;
}

.micro-badge-urgencia.urgencia-normal {
  background: rgba(11, 34, 73, 0.6) !important;
  border: 1px solid rgba(37, 99, 235, 0.4) !important;
  color: #93c5fd !important;
}

/* ==========================================================================
   ULTRA-COMPACT REMATES JUDICIALES (PANEL DERECHO)
   ========================================================================== */
.remate-card-compact {
  padding: 6px 8px;
  border-radius: 8px;
  background: #1e1f22 !important;
  border: 1px solid #47484c !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.remate-card-compact:hover {
  background: #2b2d31 !important;
  border-color: #4c4e51 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.remate-client-trigger {
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border-radius: 4px;
}

.remate-client-trigger:hover {
  color: #60a5fa !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.remate-client-trigger:hover i {
  color: #60a5fa !important;
  transform: translateY(1px);
}

.micro-badge-remate-fecha {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  line-height: 1 !important;
  display: inline-block !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

/* Fechas vencidas / atención inmediata */
.micro-badge-remate-fecha.fecha-inminente-rojo {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #f87171 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

/* Fechas estándar / futuras */
.micro-badge-remate-fecha.fecha-distante-navy {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #7ba1c7 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

/* BOTONES COMPACTOS "+" EN CABECERA DE WIDGETS */
.btn-plus-compact {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2b2d31;
  border: 1px solid #47484c;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: none;
}
.btn-plus-compact:hover {
  background: #383a40;
  border-color: #325c8d;
  color: #ffffff;
  box-shadow: none;
  transform: translateY(-1px);
}
.btn-plus-compact:active {
  transform: scale(0.94);
}

.btn-plus-compact.btn-plus-remate {
  background: #2b2d31 !important;
  border: 1px solid #47484c !important;
  color: #cbd5e1 !important;
}
.btn-plus-compact.btn-plus-remate:hover {
  background: #383a40 !important;
  border-color: #325c8d !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* INDICADOR DE ÁREA MINIMALISTA TEXTO PLANO */
.area-indicator-minimal {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  letter-spacing: 0.2px;
}
.area-indicator-minimal.cursor-pointer {
  cursor: pointer;
}
.area-indicator-minimal.cursor-pointer:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* PESTAÑAS ACTIVAS E INACTIVAS EN SUBRAYADO PLANO AZUL CORPORATIVO */
.tab-navy-active,
.tab-causes-activas.active,
button[data-status-filter].active,
button[data-subview].active {
  background: #2b2d31 !important;
  color: #ffffff !important;
  border: 1px solid #47484c !important;
  border-bottom: 2px solid #244c78 !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

.tab-charcoal-inactive,
button[data-status-filter]:not(.active),
button[data-subview]:not(.active) {
  background: #1e1f22 !important;
  color: #a0a5ad !important;
  border: 1px solid #47484c !important;
  border-bottom: 2px solid transparent !important;
}

.tab-charcoal-inactive:hover,
button[data-status-filter]:not(.active):hover,
button[data-subview]:not(.active):hover {
  background: #2b2d31 !important;
  color: #ffffff !important;
  border-color: #4c4e51 !important;
}

/* MAPPER DE UTILIDADES GLOBALES PARA CONSISTENCIA ABSOLUTA */
.text-purple-300\/50, .text-purple-300\/60, .text-purple-300\/70, .text-purple-300\/80, .text-purple-300, .text-purple-400 {
  color: #a0a5ad !important;
}

.text-purple-100, .text-purple-200 {
  color: #e2e8f0 !important;
}

.bg-purple-950\/30, .bg-purple-950\/40, .bg-purple-950\/50, .bg-purple-950\/60, .bg-purple-950\/70, .bg-purple-950\/80, .bg-purple-950 {
  background-color: #2b2d31 !important;
}

.border-purple-500\/10, .border-purple-500\/20, .border-purple-500\/30, .border-purple-500\/40, .border-purple-500 {
  border-color: #47484c !important;
}

.hover\:border-purple-500\/40:hover, .hover\:border-purple-500\/50:hover, .hover\:border-purple-400\/50:hover {
  border-color: #4c4e51 !important;
}

.hover\:bg-purple-900\/60:hover, .hover\:bg-purple-950\/50:hover {
  background-color: #2b2d31 !important;
}

/* MAPPER DE COLORES TURQUESA/CIAN A AZUL PIZARRA Y GRIS NEUTRO */
.text-cyan-300, .text-cyan-400, .text-cyan-200, .text-cyan-100, .text-teal-300, .text-teal-400, .text-teal-200 {
  color: #93c5fd !important;
}
.bg-cyan-950\/10, .bg-cyan-950\/20, .bg-cyan-950\/30, .bg-cyan-950\/40, .bg-cyan-950\/50, .bg-cyan-950\/60, .bg-cyan-950\/80, .bg-cyan-950 {
  background-color: #2b2d31 !important;
}
.border-cyan-500\/20, .border-cyan-500\/25, .border-cyan-500\/30, .border-cyan-500\/40, .border-cyan-500\/50, .border-cyan-500 {
  border-color: #47484c !important;
}
.border-cyan-400\/30, .bg-cyan-600\/30 {
  border-color: #47484c !important;
  background-color: #2b2d31 !important;
}

/* ==========================================================================
   COPIA RÁPIDA (RUT Y ROLES) Y MENÚ POPUP DE TRAMITADORES
   ========================================================================== */
.copy-chip {
  cursor: pointer;
  user-select: text;
  box-shadow: none !important;
  text-shadow: none !important;
  outline: none !important;
  border: none !important;
  filter: none !important;
  transition: color 0.15s ease;
}

.copy-chip:hover {
  transform: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.copy-chip:active {
  transform: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.tramitador-popover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   ESTANDARIZACIÓN PALETA AZUL CLÁSICO CORPORATIVO / NAVY MATE
   Base: #244c78 | Hover: #1d3e63 | Borde: #325c8d
   ========================================================================== */
.btn-corporate-blue,
.btn-primary-blue,
#btnOpenNewClient,
#btnSubmitPermiso,
#btnSaveDerivarCausa,
#btnConfirmCerrarCausa,
#btnSaveHistorialEvento {
  background-color: #244c78 !important;
  color: #ffffff !important;
  border: 1px solid #325c8d !important;
  box-shadow: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-corporate-blue:hover,
.btn-primary-blue:hover,
#btnOpenNewClient:hover,
#btnSubmitPermiso:hover,
#btnSaveDerivarCausa:hover,
#btnConfirmCerrarCausa:hover,
#btnSaveHistorialEvento:hover {
  background-color: #1d3e63 !important;
  border-color: #325c8d !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Mapper global de botones azules a azul corporativo mate */
button.bg-\[\#1e3a8a\],
button.bg-\[\#2563eb\],
button.bg-\[\#1d4ed8\],
button.bg-blue-600,
button.bg-blue-700 {
  background-color: #244c78 !important;
  color: #ffffff !important;
  border: 1px solid #325c8d !important;
  box-shadow: none !important;
}

button.bg-\[\#1e3a8a\]:hover,
button.bg-\[\#2563eb\]:hover,
button.bg-\[\#1d4ed8\]:hover,
button.hover\:bg-\[\#2563eb\]:hover,
button.hover\:bg-blue-500:hover,
button.hover\:bg-blue-600:hover {
  background-color: #1d3e63 !important;
  border-color: #325c8d !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Botón Guardar Audio de Reunión (Solo Administradora - Solo Texto Plano Interactivo) */
.btn-guardar-audio-admin {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #3875b4 !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  drop-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  outline: none !important;
  cursor: pointer !important;
  text-align: right !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.btn-guardar-audio-admin:hover {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #60a5fa !important;
  text-decoration: underline !important;
  box-shadow: none !important;
  drop-shadow: none !important;
}

/* Scroll vertical fluido en Bandeja de Nuevos Ingresos */
#mainContainer {
  overflow-y: auto !important;
}

#view-inicio {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#contenedor-causas {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#emptyState,
.view-empty-state {
  overflow-y: auto !important;
  height: auto !important;
  min-height: unset !important;
}

/* Enlace / Botón 'Ver en Tramitación' (Texto plano limpio sin marco) */
.btn-ver-en-bandeja {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #94a3b8 !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.btn-ver-en-bandeja:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

/* Botón REPORTAR (Acción elegante de solo texto en azul corporativo) */
.btn-reportar-flat {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #3875b4 !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  padding: 0.2rem 0.4rem !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  drop-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  outline: none !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
  flex-shrink: 0;
}

.btn-reportar-flat:hover {
  background: transparent !important;
  background-color: transparent !important;
  color: #60a5fa !important;
  text-decoration: underline !important;
}

/* Enlace interactivo 'Ver' en adjuntos */
.link-adjunto-ver {
  color: #94a3b8 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 0.8rem !important;
  transition: color 0.15s ease !important;
}

.link-adjunto-ver:hover {
  color: #ffffff !important;
}

/* Botones de acción inferior en tarjeta de expediente (Enlaces planos limpios) */
.card-bottom-actions {
  display: flex !important;
  align-items: center !important;
  gap: 1.25rem !important;
  flex-wrap: wrap !important;
}

.btn-card-action-link {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  transition: color 0.15s ease, text-decoration 0.15s ease !important;
}

.btn-card-action-link.action-neutral {
  color: #94a3b8 !important;
}
.btn-card-action-link.action-neutral:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

.btn-card-action-link.action-close {
  color: #f87171 !important;
}
.btn-card-action-link.action-close:hover {
  color: #ef4444 !important;
  text-decoration: underline !important;
}

.btn-card-action-link.action-delete {
  color: #ef4444 !important;
}
.btn-card-action-link.action-delete:hover {
  color: #dc2626 !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   POPOVER FLOTANTE DE CUOTAS Y PUNTO VERDE/MORA INTERACTIVO
   ========================================================================== */
.status-dot-cuotas {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  padding: 4px !important;
  margin: -4px !important;
  outline: none !important;
}

.status-dot-cuotas .cuota-dot-indicator {
  transition: transform 0.15s ease !important;
  cursor: pointer !important;
}

.status-dot-cuotas:hover .cuota-dot-indicator {
  transform: scale(1.25) !important;
}

.cuotas-dropdown-panel {
  background-color: #181b20 !important;
  background: #181b20 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  z-index: 50 !important;
  min-width: 220px !important;
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  box-sizing: border-box !important;
}

.cuotas-dropdown-panel.hidden {
  display: none !important;
}

/* ==========================================================================
   ESTILO UNIFICADO DE MENÚS DESPLEGABLES / CUSTOM SELECTS (ESTÉTICA CUOTAS)
   ========================================================================== */

/* 1. Reset y estilización sobria de elementos select nativos */
select, 
select.glass-input, 
.glass-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: #16181c !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  padding: 0.5rem 2.2rem 0.5rem 0.85rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 13px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease !important;
}

select:hover, 
select.glass-input:hover {
  border-color: #4b5563 !important;
  background-color: #1a1d22 !important;
  color: #ffffff !important;
}

select:focus, 
select.glass-input:focus {
  border-color: #244c78 !important;
  outline: none !important;
  box-shadow: 0 0 0 1px #325c8d, 0 8px 20px rgba(0, 0, 0, 0.4) !important;
  color: #ffffff !important;
}

select option {
  background-color: #181b20 !important;
  color: #cbd5e1 !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  padding: 0.6rem 0.85rem !important;
}

select option:checked, 
select option:hover,
select option:focus {
  background-color: #244c78 !important;
  color: #ffffff !important;
}

/* 2. Componente de Custom Dropdown / Listbox (Idéntico a Popover Cuotas) */
.custom-select-container {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  user-select: none !important;
  overflow: visible !important;
  z-index: 60 !important;
}

.custom-select-container:focus-within {
  z-index: 99999 !important;
}

.custom-select-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.6rem !important;
  background-color: #181b20 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 0.4rem 0.85rem !important;
  color: #94a3b8 !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  white-space: nowrap !important;
  min-height: 32px !important;
  box-sizing: border-box !important;
}

.custom-select-trigger:hover {
  border-color: #325c8d !important;
  color: #ffffff !important;
}

.custom-select-trigger.is-active {
  border-color: #325c8d !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 1px #325c8d, 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

.custom-select-dropdown,
.dropdown-menu {
  position: absolute !important;
  z-index: 99999 !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  min-width: 100% !important;
  width: max-content !important;
  max-width: 320px !important;
  background-color: #181b20 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
  padding: 0.35rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.custom-select-dropdown.hidden,
.dropdown-menu.hidden {
  display: none !important;
}

.custom-select-option {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  padding: 0.55rem 0.85rem !important;
  border-radius: 6px !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
  text-decoration: none !important;
  border: none !important;
  background: transparent !important;
  width: 100% !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

.custom-select-option:hover {
  background-color: #244c78 !important;
  color: #ffffff !important;
}

.custom-select-option.is-selected {
  background-color: transparent !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.custom-select-option.is-selected:hover {
  background-color: #244c78 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   PANTALLA DE LOGIN CON GLASSMORPHISM (ACCESO EXCLUSIVO GOOGLE)
   ========================================================================== */
.login-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0a0a0c;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.16) 0%, rgba(37, 99, 235, 0.05) 35%, transparent 70%),
    radial-gradient(ellipse at 50% -15%, rgba(255, 255, 255, 0.09) 0%, transparent 55%);
  background-repeat: no-repeat;
  padding: 1.5rem;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-glass-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 30px 60px -12px rgba(0, 0, 0, 0.85),
    0 0 50px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.login-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
}

.login-google-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background-color: #1f222a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  user-select: none;
}

.login-google-btn:hover {
  background-color: #282c37;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.login-google-btn:active {
  transform: translateY(0);
  background-color: #1a1c22;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}



