/* ============================================================
   LUCÍA STUDIO — STANDALONE STYLESHEET (ESPINOX WEB)
   Fallback autónomo garantizado ante bloqueos de CDN / DNS
   ============================================================ */

:root {
  --color-navy: #0a1128;
  --color-card: #111b3a;
  --color-header: rgba(8, 14, 33, 0.95);
  --color-cactus: #40826d;
  --color-cactus-hover: #326756;
  --color-magenta: #c8105e;
  --color-magenta-hover: #a50d4d;
  --color-border: #1e293b;
  --color-border-light: #334155;
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  background-color: var(--color-navy);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Tipografía */
.font-display { font-family: var(--font-display); }
.font-sans { font-family: var(--font-sans); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-semibold { font-weight: 600; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }

/* Flexbox & Layout */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

.hidden { display: none !important; }
.block { display: block; }
.inline { display: inline; }

/* Responsive: Mobile vs Desktop (Web) */
@media (max-width: 639px) {
  .mobile-hidden,
  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 640px) {
  .desktop-only {
    display: block !important;
  }
  .desktop-only-flex {
    display: flex !important;
  }
  .sm\:block {
    display: block !important;
  }
  .sm\:inline {
    display: inline !important;
  }
  .sm\:flex {
    display: flex !important;
  }
}
.w-full { width: 100%; }
.max-w-7xl { max-width: 80rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.min-h-screen { min-height: 100vh; }
.h-16 { height: 4rem; }
.h-9 { height: 2.25rem; }
.w-9 { width: 2.25rem; }
.w-7 { width: 1.75rem; }
.h-7 { height: 1.75rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-2\.5 { width: 0.625rem; }
.h-2\.5 { height: 0.625rem; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.h-\[500px\] { height: 500px; }
.max-h-40 { max-height: 10rem; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pt-2 { padding-top: 0.5rem; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:inline { display: inline; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
}

/* Colores */
.text-white { color: #ffffff !important; }
.text-cactus { color: var(--color-cactus) !important; }
.text-magenta { color: var(--color-magenta) !important; }
.text-rose-400 { color: #fb7185 !important; }
.text-slate-100 { color: #f1f5f9 !important; }
.text-slate-300 { color: #cbd5e1 !important; }
.text-slate-400 { color: #94a3b8 !important; }
.text-slate-500 { color: #64748b !important; }
.text-emerald-300 { color: #6ee7b7 !important; }
.text-emerald-400 { color: #34d399 !important; }
.text-amber-300 { color: #fcd34d !important; }

.bg-navy { background-color: var(--color-navy) !important; }
.bg-card { background-color: var(--color-card) !important; }
.bg-cactus { background-color: var(--color-cactus) !important; }
.bg-cactus\/20 { background-color: rgba(64, 130, 109, 0.2) !important; }
.bg-magenta { background-color: var(--color-magenta) !important; }
.bg-slate-700 { background-color: #334155 !important; }
.bg-slate-800 { background-color: #1e293b !important; }
.bg-slate-800\/80 { background-color: rgba(30, 41, 59, 0.8) !important; }
.bg-black\/70 { background-color: rgba(0, 0, 0, 0.7) !important; }
.bg-emerald-400 { background-color: #34d399 !important; }
.bg-emerald-950 { background-color: #022c22 !important; }
.bg-amber-950 { background-color: #451a03 !important; }

.hover\:bg-emerald-600:hover { background-color: #059669 !important; }
.hover\:bg-pink-600:hover { background-color: #db2777 !important; }
.hover\:bg-slate-600:hover { background-color: #475569 !important; }
.hover\:text-white:hover { color: #ffffff !important; }
.hover\:underline:hover { text-decoration: underline; }

.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-cactus { border-color: var(--color-cactus) !important; }
.border-slate-700 { border-color: #334155 !important; }
.border-slate-800 { border-color: #1e293b !important; }
.border-slate-800\/80 { border-color: rgba(30, 41, 59, 0.8) !important; }
.border-emerald-700 { border-color: #047857 !important; }
.border-amber-700 { border-color: #b45309 !important; }

/* Bordes redondeados */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-br-sm { border-bottom-right-radius: 0.125rem; }
.rounded-bl-sm { border-bottom-left-radius: 0.125rem; }

/* Tamaños de Fuente */
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.whitespace-pre-wrap { white-space: pre-wrap; }
.cursor-pointer { cursor: pointer; }
.backdrop-blur { backdrop-filter: blur(8px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; }

/* Inputs, Selects y Textareas */
input, select, textarea {
  width: 100%;
  background-color: var(--color-navy);
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #ffffff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-cactus);
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-navy);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-cactus);
}

/* ========================================================
   MODO CLARO HIGH-TECH (LIGHT THEME ENGINE v2.1)
   Inspirado en la paleta ultra nítida de Espinox WEB
   ======================================================== */
html.light-theme {
  --color-navy: #f8fafc;
  --color-card: #ffffff;
  --color-header: rgba(255, 255, 255, 0.96);
  --color-border: #e2e8f0;
  --color-border-light: #cbd5e1;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
}

html.light-theme body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light-theme header {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

html.light-theme .bg-navy {
  background-color: #f1f5f9 !important;
}

html.light-theme .bg-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.06) !important;
}

html.light-theme .bg-\[\#080e21\]\/95 {
  background-color: rgba(255, 255, 255, 0.96) !important;
}

html.light-theme .bg-\[\#0e172e\] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
}

html.light-theme .bg-navy\/60,
html.light-theme .bg-navy\/80,
html.light-theme .bg-navy\/50 {
  background-color: #f8fafc !important;
}

html.light-theme .border-slate-800,
html.light-theme .border-slate-800\/80,
html.light-theme .border-slate-700,
html.light-theme .border-slate-700\/80,
html.light-theme .border-slate-700\/90 {
  border-color: #e2e8f0 !important;
}

html.light-theme .text-white {
  color: #0f172a !important;
}

html.light-theme .text-slate-100 {
  color: #0f172a !important;
}

html.light-theme .text-slate-200 {
  color: #1e293b !important;
}

html.light-theme .text-slate-300 {
  color: #334155 !important;
}

html.light-theme .text-slate-400 {
  color: #64748b !important;
}

html.light-theme .text-slate-500 {
  color: #94a3b8 !important;
}

html.light-theme input,
html.light-theme select,
html.light-theme textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light-theme input:focus,
html.light-theme select:focus,
html.light-theme textarea:focus {
  border-color: var(--color-cactus) !important;
  box-shadow: 0 0 0 2px rgba(64, 130, 109, 0.15) !important;
}

html.light-theme .bg-slate-700 {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html.light-theme .bg-slate-800,
html.light-theme .bg-slate-800\/80 {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
}

html.light-theme .hover\:bg-slate-800\/80:hover,
html.light-theme .hover\:bg-slate-800\/90:hover {
  background-color: #f8fafc !important;
}

html.light-theme .hover\:bg-slate-600:hover {
  background-color: #cbd5e1 !important;
}

html.light-theme .tab-btn.bg-card {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}

html.light-theme .tab-btn.bg-card:hover {
  color: #0f172a !important;
  background-color: #e2e8f0 !important;
}

html.light-theme #twofa-modal .bg-card,
html.light-theme #password-modal .bg-card,
html.light-theme #tenant-modal .bg-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

html.light-theme .bg-gradient-to-br.from-\[\#14234b\].to-\[\#0a1128\] {
  background: linear-gradient(135deg, #ffffff, #f1f5f9) !important;
  border-color: var(--color-cactus) !important;
}

/* ============================================================
   CRM HIGH-CONTRAST LIGHT THEME (WCAG AAA / ESPINOX DESIGN SYSTEM)
   ============================================================ */

/* Textos de alta visibilidad y contraste en Modo Claro */
html.light-theme .text-amber-400,
html.light-theme .text-amber-500 {
  color: #b45309 !important; /* Ámbar 700 de alto contraste para precios y cifras */
}

html.light-theme .text-emerald-400,
html.light-theme .text-emerald-300 {
  color: #047857 !important; /* Esmeralda 700 nítido y legible */
}

html.light-theme .text-sky-400,
html.light-theme .text-sky-300 {
  color: #0369a1 !important; /* Azul cielo 700 nítido */
}

html.light-theme .text-pink-400,
html.light-theme .text-magenta {
  color: #be185d !important; /* Magenta/Rosa 700 vibrante y con contraste */
}

/* Fondos y contenedores adaptados a Modo Claro */
html.light-theme .bg-navy\/90,
html.light-theme .bg-navy\/80,
html.light-theme .bg-navy\/70,
html.light-theme .bg-navy\/60,
html.light-theme .bg-navy\/50,
html.light-theme .bg-navy\/40,
html.light-theme .bg-navy\/30 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

html.light-theme .bg-card\/90,
html.light-theme .bg-card\/80,
html.light-theme .bg-card\/70,
html.light-theme .bg-card\/40 {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

/* Botón "Chat de Equipo (Team Hub)" en la barra superior */
html.light-theme button[onclick="openTeamHubDrawer()"],
html.light-theme .bg-emerald-950\/40 {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
  font-weight: 700 !important;
}

html.light-theme button[onclick="openTeamHubDrawer()"]:hover {
  background-color: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
}

/* Píldora de Vistas (Kanban vs Directorio) */
html.light-theme #btn-view-kanban.bg-card,
html.light-theme #btn-view-directory.bg-card {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1) !important;
}

html.light-theme #btn-view-kanban:not(.bg-card),
html.light-theme #btn-view-directory:not(.bg-card) {
  color: #475569 !important;
  background-color: transparent !important;
  border-color: transparent !important;
}

html.light-theme #btn-view-kanban:not(.bg-card):hover,
html.light-theme #btn-view-directory:not(.bg-card):hover {
  color: #0f172a !important;
  background-color: #e2e8f0 !important;
}

/* Barra y Banner de Distribución Comercial del Embudo */
html.light-theme #crm-analytics-badge,
html.light-theme .bg-emerald-500\/10 {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}

html.light-theme #crm-analytics-legend {
  color: #334155 !important;
  font-weight: 500 !important;
}

html.light-theme #crm-pipeline-bar {
  background-color: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}

/* Cuadrados de íconos en KPIs */
html.light-theme .grid .bg-card {
  border-color: #cbd5e1 !important;
}

html.light-theme .grid .bg-card .bg-navy\/90 {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

/* Tablero Kanban y Columnas */
html.light-theme #crm-view-kanban {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

html.light-theme .kanban-stage-col {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

html.light-theme .kanban-stage-col > div:first-child {
  background-color: #f1f5f9 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

html.light-theme .kanban-stage-col h4 {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html.light-theme .kanban-stage-col span.font-mono.font-bold {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

html.light-theme .kanban-stage-col > div:nth-child(2) {
  background-color: #e2e8f0 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

html.light-theme .kanban-stage-col > div:nth-child(2) span {
  color: #334155 !important;
  font-weight: 600 !important;
}

/* Tarjetas de Prospectos / Leads dentro del Kanban */
html.light-theme .kanban-stage-col .bg-card {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05) !important;
}

html.light-theme .kanban-stage-col .bg-card:hover {
  background-color: #ffffff !important;
  border-color: #40826d !important;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04) !important;
}

html.light-theme .kanban-stage-col .bg-card span.text-white {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html.light-theme .kanban-stage-col .bg-card span.text-slate-400 {
  color: #475569 !important;
  font-weight: 500 !important;
}

/* Resumen IA y Servicio dentro de la tarjeta */
html.light-theme .kanban-stage-col .bg-card .bg-navy\/80 {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html.light-theme .kanban-stage-col .bg-card .bg-navy\/80 p {
  color: #334155 !important;
  font-weight: 500 !important;
}

/* Badges de Temperatura */
html.light-theme .bg-pink-950\/70 {
  background-color: #fdf2f8 !important;
  border-color: #fbcfe8 !important;
  color: #be185d !important;
}

html.light-theme .kanban-stage-col .bg-card .bg-slate-800 {
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

/* Footer de tarjeta y botones */
html.light-theme .kanban-stage-col .bg-card .border-t {
  border-color: #e2e8f0 !important;
}

html.light-theme .kanban-stage-col .bg-card button {
  background-color: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

html.light-theme .kanban-stage-col .bg-card button:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Drawer / Ficha Técnica en Modo Claro */
html.light-theme #drawer-lead-details,
html.light-theme #drawer-team-hub {
  background-color: #ffffff !important;
  border-left: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.15) !important;
}

html.light-theme #drawer-lead-details > div:first-child,
html.light-theme #drawer-team-hub > div:first-child {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html.light-theme #drawer-lead-details .bg-navy\/70,
html.light-theme #drawer-lead-details .bg-navy\/60,
html.light-theme #drawer-lead-details .bg-navy\/80,
html.light-theme #drawer-lead-details .bg-navy\/90 {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html.light-theme #drawer-lead-details p.text-slate-300,
html.light-theme #drawer-lead-details p.text-slate-400 {
  color: #334155 !important;
}

/* Menú Desplegable Sólido (Opacidad 100% y Ultra Definición Espinox) */
#user-menu-dropdown {
  background-color: #0b1329 !important;
  background: linear-gradient(180deg, #101a33 0%, #090f21 100%) !important;
  border: 1px solid #253659 !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(64, 130, 109, 0.3) !important;
  opacity: 1 !important;
  transform-origin: top right;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
  max-height: calc(100dvh - 76px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(64, 130, 109, 0.6) rgba(15, 23, 42, 0.4) !important;
}

#user-menu-dropdown::-webkit-scrollbar {
  width: 6px !important;
}

#user-menu-dropdown::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4) !important;
  border-radius: 9999px !important;
}

#user-menu-dropdown::-webkit-scrollbar-thumb {
  background: rgba(64, 130, 109, 0.6) !important;
  border-radius: 9999px !important;
}

#user-menu-dropdown::-webkit-scrollbar-thumb:hover {
  background: #40826d !important;
}

#user-menu-dropdown .menu-card-item {
  background-color: #121c35 !important;
  border-color: #1f2e4d !important;
}

#user-menu-dropdown .menu-card-item:hover {
  background-color: #182545 !important;
  border-color: #2b3e66 !important;
}

html.light-theme #user-menu-dropdown {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(64, 130, 109, 0.2) !important;
  scrollbar-color: rgba(64, 130, 109, 0.6) #f1f5f9 !important;
}

html.light-theme #user-menu-dropdown::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}

html.light-theme #user-menu-dropdown .menu-card-item {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light-theme #user-menu-dropdown .menu-card-item:hover {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

#user-menu-dropdown:not(.hidden) {
  animation: dropdownIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.group\/photo:hover .group-hover\/photo\:opacity-100 {
  opacity: 1 !important;
}

/* ============================================================
   TEAM HUB ADVANCED MODULE (Audios, Emojis, Google Calendar, Borrado)
   ============================================================ */
html.light-theme #team-hub-emoji-picker,
html.light-theme #team-hub-reminder-panel,
html.light-theme #team-hub-audio-bar {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1) !important;
}

html.light-theme #team-hub-emoji-picker button:hover {
  background-color: #f1f5f9 !important;
}

html.light-theme #team-hub-messages .bg-navy {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

html.light-theme #team-hub-messages .bg-navy p.text-slate-300 {
  color: #1e293b !important;
  font-weight: 500 !important;
}

html.light-theme #team-hub-messages .bg-navy span.text-white {
  color: #0f172a !important;
}

html.light-theme #team-hub-messages .bg-card {
  background-color: #f8fafc !important;
  border: 1px solid #a7f3d0 !important;
}

html.light-theme #team-hub-messages .bg-card p.text-slate-200 {
  color: #0f172a !important;
  font-weight: 500 !important;
}

html.light-theme #team-hub-messages .bg-amber-500\/10 {
  background-color: #fef3c7 !important;
  border-color: #fde68a !important;
}

html.light-theme #team-hub-messages .bg-amber-500\/10 span.text-amber-400 {
  color: #92400e !important;
  font-weight: 700 !important;
}

html.light-theme #team-hub-messages .bg-amber-500\/10 p.text-slate-300 {
  color: #475569 !important;
}

html.light-theme #team-hub-messages .bg-navy\/90 {
  background-color: #fff1f2 !important;
  border-color: #fecdd3 !important;
}

/* Badges de Plan de Suscripción en Modo Claro */
html.light-theme #user-plan-badge,
html.light-theme #dropdown-plan-badge {
  font-weight: 700 !important;
}
html.light-theme .bg-amber-950\/80 {
  background-color: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}
html.light-theme .bg-emerald-950\/80 {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}
html.light-theme .bg-purple-950\/80 {
  background-color: #faf5ff !important;
  border-color: #a855f7 !important;
  color: #6b21a8 !important;
}
html.light-theme #crm-plan-banner {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html.light-theme #crm-plan-banner p {
  color: #334155 !important;
}
html.light-theme #crm-plan-banner p.font-bold {
  color: #0f172a !important;
}

/* Tarjetas de Fuentes Indexadas en Modo Claro */
html.light-theme #knowledge-list .bg-navy {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}
html.light-theme #knowledge-list p.text-white {
  color: #0f172a !important;
}
html.light-theme #knowledge-list p.text-slate-400 {
  color: #475569 !important;
}
html.light-theme #knowledge-list span.bg-slate-800\/80 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
html.light-theme #knowledge-list .bg-emerald-950 {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}

/* ==========================================================================
   BOTONES MAGENTA CON LETRA BLANCA GARANTIZADA (OSCURO & CLARO)
   ========================================================================== */
.bg-magenta,
button.bg-magenta,
#btn-index-knowledge,
html.light-theme .bg-magenta,
html.light-theme button.bg-magenta,
html.light-theme #btn-index-knowledge,
html.light-theme .bg-magenta *,
html.light-theme button.bg-magenta * {
  color: #ffffff !important;
  background-color: #c8105e !important;
}

.bg-magenta:hover,
button.bg-magenta:hover,
#btn-index-knowledge:hover,
html.light-theme .bg-magenta:hover,
html.light-theme button.bg-magenta:hover,
html.light-theme #btn-index-knowledge:hover {
  background-color: #e11d48 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   BOTONES VERDE CACTUS CON FONDO #40826d Y LETRA BLANCA GARANTIZADA
   (MISMO TONO EXACTO EN TEMA OSCURO Y TEMA CLARO)
   ========================================================================== */
.bg-cactus,
button.bg-cactus,
.tab-btn.bg-cactus,
a.bg-cactus,
input[type="submit"].bg-cactus,
html.light-theme .bg-cactus,
html.light-theme button.bg-cactus,
html.light-theme .tab-btn.bg-cactus,
html.light-theme a.bg-cactus,
html.light-theme input[type="submit"].bg-cactus,
.bg-cactus *,
button.bg-cactus *,
.tab-btn.bg-cactus *,
html.light-theme .bg-cactus *,
html.light-theme button.bg-cactus *,
html.light-theme .tab-btn.bg-cactus * {
  background-color: #40826d !important;
  color: #ffffff !important;
  fill: #ffffff !important;
}

.bg-cactus:hover,
button.bg-cactus:hover,
.tab-btn.bg-cactus:hover,
a.bg-cactus:hover,
html.light-theme .bg-cactus:hover,
html.light-theme button.bg-cactus:hover,
html.light-theme .tab-btn.bg-cactus:hover,
html.light-theme a.bg-cactus:hover,
.hover\:bg-emerald-600:hover,
html.light-theme .hover\:bg-emerald-600:hover {
  background-color: #326756 !important;
  color: #ffffff !important;
  fill: #ffffff !important;
}

.bg-cactus:focus,
button.bg-cactus:focus,
.tab-btn.bg-cactus:focus,
html.light-theme .bg-cactus:focus,
html.light-theme button.bg-cactus:focus,
html.light-theme .tab-btn.bg-cactus:focus {
  background-color: #40826d !important;
  color: #ffffff !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(64, 130, 109, 0.4) !important;
}

/* ==========================================================================
   BOTÓN BLOQUEAR Y SALIR DEL PANEL EN VERDE CACTUS CON LETRA BLANCA
   ========================================================================== */
#btn-logout-panel,
html.light-theme #btn-logout-panel {
  background-color: #40826d !important;
  border-color: #40826d !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

#btn-logout-panel:hover,
html.light-theme #btn-logout-panel:hover {
  background-color: #326756 !important;
  border-color: #326756 !important;
  color: #ffffff !important;
}

#btn-logout-panel span,
html.light-theme #btn-logout-panel span {
  color: #ffffff !important;
}

/* Modal de Gestión de Equipo y Clientes en Modo Claro */
html.light-theme #modal-team-members .bg-card,
html.light-theme #modal-clients-directory .bg-card,
html.light-theme #bootstrap-admin-modal .bg-card,
html.light-theme #credentials-created-modal .bg-card {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}
html.light-theme #modal-team-members .bg-navy\/80,
html.light-theme #modal-team-members .bg-navy\/40,
html.light-theme #modal-clients-directory .bg-navy\/80,
html.light-theme #bootstrap-admin-modal .bg-navy\/80,
html.light-theme #credentials-created-modal .bg-navy {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html.light-theme #team-users-list .bg-navy,
html.light-theme #clients-directory-list .bg-navy {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}
html.light-theme #team-users-list span.text-white,
html.light-theme #clients-directory-list span.text-white,
html.light-theme #clients-directory-list h4.text-white {
  color: #0f172a !important;
}
html.light-theme #team-users-list p,
html.light-theme #team-users-list div.text-slate-400,
html.light-theme #clients-directory-list p {
  color: #475569 !important;
}
