/* ⚠️ NOTA OBLIGATORIA PARA DESARROLLADORES: 
 * ES OBLIGATORIO actualizar CHANGELOG.md después de CUALQUIER cambio en este archivo
 * Al modificar estilos principales o componentes visuales, documentar en CHANGELOG.md
 */
:root{
  --bg:#ffffff;
  --panel:#fefefe;
  --panel-2:#f1f5f9;
  --text:#0f172a;
  --muted:#64748b;
  --brand:#2563eb;
  --brand-light:#3b82f6;
  --accent:#111827;
  --danger:#ef4444;
  --border:#e1e7ef;
  --shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --banner-image:url('https://storage.googleapis.com/iandai/imagenes/logos%20equipos/SmartAutomata/panelbackground.png?v=20250917161923');
}
*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0; 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--panel-2) 0%, var(--border) 100%);
  color:var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Solo en modo oscuro: paneles/containers con degradado azul oscuro → negro */
[data-theme="dark"] .app-header,
[data-theme="dark"] .card,
[data-theme="dark"] .ui-panel,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .nav-dropdown,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .metrics-card,
[data-theme="dark"] .gradient-panel {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%) !important;
}

[data-theme="dark"] .btn,
[data-theme="dark"] .btn-secondary {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%) !important;
}

[data-theme="dark"] .app-footer.footer-dark {
  background: linear-gradient(135deg, #1e3a8a 0%, #000000 100%) !important;
}

/* Modo oscuro global para contenedores de TODOS los módulos */
[data-theme="dark"] .metric-card,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .rep-chart-card,
[data-theme="dark"] .rep-list-panel,
[data-theme="dark"] .rep-detail-panel,
[data-theme="dark"] .rep-kpi-card,
[data-theme="dark"] .rep-pagination,
[data-theme="dark"] .user-card,
[data-theme="dark"] .permission-card,
[data-theme="dark"] .modal-container,
[data-theme="dark"] .tpl-panel,
[data-theme="dark"] .tpl-list-panel,
[data-theme="dark"] .tpl-detail-panel,
[data-theme="dark"] .livechat-sidebar,
[data-theme="dark"] .chat-header,
[data-theme="dark"] .indice-sidebar,
[data-theme="dark"] .indice-main,
[data-theme="dark"] .module-card {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%) !important;
}

/* Configuración de texto blanco para gráficos Chart.js en modo oscuro */
[data-theme="dark"] canvas {
  /* Variables CSS para Chart.js detectar modo oscuro */
  --chart-text-color: #ffffff;
  --chart-grid-color: rgba(255, 255, 255, 0.1);
  --chart-border-color: rgba(255, 255, 255, 0.2);
}

/* Elementos adicionales específicos del módulo de reportes en modo oscuro */
[data-theme="dark"] .rep-filters-grid,
[data-theme="dark"] .rep-kpis,
[data-theme="dark"] .rep-dashboard-grid {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%) !important;
}
.hidden{ display:none }

#app{ display:flex; flex-direction:column; min-height:100vh }

/* ===============================================
   HEADER MODERNO Y MINIMALISTA
   =============================================== */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* ✨ Transiciones suaves para show/hide */
  opacity: 1;
  transform: translateY(0);
  max-height: 100px;
  overflow: visible; /* Cambiar a visible para permitir dropdown */
}

.app-header.hidden {
  /* ✨ Animación elegante de salida */
  opacity: 0;
  transform: translateY(-100%);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.app-header:hover {
  box-shadow: 0 8px 32px rgba(var(--brand-rgb), 0.08);
}

/* Header Left - Logo Section */
.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.05) 0%, rgba(var(--brand-light-rgb), 0.02) 100%);
  border: 1px solid rgba(var(--brand-rgb), 0.1);
  transition: all 0.3s ease;
}

.logo-clickable {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border-radius: 8px;
  padding: 4px 8px;
  margin: -4px -8px;
}

.logo-clickable:hover {
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.08) 0%, rgba(var(--brand-light-rgb), 0.04) 100%);
  border-color: rgba(var(--brand-rgb), 0.2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.logo-clickable:active {
  transform: translateY(0);
}

.logo-image {
  height: 32px;
  width: 32px;
  object-fit: contain;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nav-item:hover::before {
  opacity: 0.08;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: white;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.nav-item.active::before {
  display: none;
}

.nav-item.active .nav-indicator {
  opacity: 1;
  transform: scale(1);
}

.nav-item-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-icon {
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  z-index: 1;
  position: relative;
}

.nav-text {
  z-index: 1;
  position: relative;
}

.nav-indicator {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.coming-soon-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
  z-index: 1;
  position: relative;
}

/* Header Right - User Section */
.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.user-info:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.user-avatar svg {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-email {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.user-role {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Ocultar temporalmente el botón de cambio de tema */
#theme-toggle { display: none !important; }

.action-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.action-button[aria-pressed="true"] {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.action-button:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-button:active {
  transform: translateY(0);
}

.logout-button {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  border-color: var(--danger);
  gap: 8px;
  width: auto;
  padding: 0 16px;
}

.logout-button:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: #dc2626;
  color: white;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.logout-text {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  border: 2px solid var(--panel);
  animation: pulse 2s infinite;
}
.action-button#online-header-btn .notification-badge{
  background: #10b981; /* verde online */
  border-color: var(--panel);
  animation: none;
}


.notification-badge.hidden {
  display: none;
}

/* ===============================================
   HEADER RESPONSIVE
   =============================================== */

@media (max-width: 1200px) {
  .app-header {
    padding: 16px 24px;
  }
  .app-main .app-footer { margin-left: -24px; margin-right: -24px; margin-bottom: -24px; width: calc(100% + 48px); }
  
  .logo-container {
    gap: 12px;
    padding: 6px 12px;
  }
  
  .brand-name {
    font-size: 1.125rem;
  }
  
  .nav-item {
    padding: 10px 16px;
    gap: 10px;
  }
  
  .user-details {
    display: none; /* Ocultar detalles del usuario en pantallas medianas */
  }
}

@media (max-width: 960px) {
  .app-header {
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .app-main .app-footer { margin-left: -20px; margin-right: -20px; margin-bottom: -20px; width: calc(100% + 40px); }
  
  .header-left,
  .header-right {
    flex: 1;
  }
  
  .main-navigation {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 12px;
  }
  
  .nav-wrapper {
    width: 100%;
    justify-content: center;
  }
  
  .logo-container {
    gap: 10px;
    padding: 4px 8px;
  }
  
  .brand-name {
    font-size: 1rem;
  }
  
  .brand-subtitle {
    font-size: 0.6875rem;
  }
  
  .nav-item {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.8125rem;
  }
  
  .nav-text {
    display: none; /* Solo mostrar íconos en móvil */
  }
  
  .coming-soon-badge {
    display: none;
  }
  
  .user-info {
    gap: 8px;
    padding: 6px 12px;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
  }
  
  .action-button {
    width: 40px;
    height: 40px;
  }
  
  .logout-text {
    display: none; /* Solo mostrar ícono en móvil */
  }
  
  .logout-button {
    width: 40px;
    padding: 0;
  }
}

@media (max-width: 640px) {
  .app-header {
    padding: 10px 16px;
    gap: 12px;
  }
  .app-main .app-footer { margin-left: -16px; margin-right: -16px; margin-bottom: -16px; width: calc(100% + 32px); }
  
  .logo-container {
    gap: 8px;
    padding: 4px 6px;
    border-radius: 12px;
  }
  
  .brand-name {
    font-size: 0.9375rem;
  }
  
  .brand-subtitle {
    display: none;
  }
  
  .main-navigation {
    margin-top: 8px;
  }
  
  .nav-wrapper {
    padding: 6px;
    border-radius: 12px;
  }
  
  .nav-item {
    padding: 6px 10px;
    border-radius: 8px;
  }
  
  .nav-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .user-info {
    padding: 4px 8px;
    gap: 6px;
  }
  
  .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  
  .user-avatar svg {
    width: 16px;
    height: 16px;
  }
  
  .header-actions {
    gap: 6px;
  }
  
  .action-button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  
  .action-button svg {
    width: 16px;
    height: 16px;
  }
  
  .notification-badge {
    width: 16px;
    height: 16px;
    font-size: 0.5625rem;
    top: -2px;
    right: -2px;
  }
}

/* Navegación móvil con mejor UX */
@media (max-width: 480px) {
  .app-header {
    padding: 8px 12px;
  }
  .app-main .app-footer { margin-left: -12px; margin-right: -12px; margin-bottom: -12px; width: calc(100% + 24px); }
  
  .logo-image {
    height: 24px;
    width: 24px;
  }
  
  .brand-name {
    font-size: 0.875rem;
  }
  
  .nav-wrapper {
    gap: 4px;
    padding: 4px;
  }
  
  .nav-item {
    padding: 4px 8px;
    min-width: 44px; /* Área táctil mínima */
  }
}

/* ===============================================
   MENÚ DESPLEGABLE DE MÓDULOS
   =============================================== */

.dropdown-container {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1001; /* Mayor que el header para crear contexto de apilamiento */
}

.nav-dropdown-trigger {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  position: relative;
}

.nav-dropdown-trigger:hover::before {
  opacity: 0.08;
}

.nav-dropdown-trigger.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%) !important;
  color: white !important;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.nav-dropdown-trigger.active::before {
  display: none;
}

.nav-dropdown-trigger.active .nav-indicator {
  opacity: 1;
  transform: scale(1);
}

.dropdown-arrow {
  display: flex;
  align-items: center;
  margin-left: 4px;
  transition: transform 0.2s ease;
  z-index: 1;
  position: relative;
}

.nav-dropdown-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Menú desplegable */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 280px;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999; /* Z-index muy alto para estar por encima de todo */
  margin-top: 8px;
  padding: 8px;
  max-height: 0;
  overflow: hidden;
}

.nav-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  max-height: 400px;
}

/* Items del menú desplegable */
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
}

.nav-dropdown-item:last-child {
  margin-bottom: 0;
}

.nav-dropdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-dropdown-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.nav-dropdown-item:hover::before {
  opacity: 0.08;
}

.nav-dropdown-item.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.nav-dropdown-item.active::before {
  display: none;
}

.nav-dropdown-item.nav-item-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-dropdown-item .nav-icon {
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  z-index: 1;
  position: relative;
}

.nav-dropdown-item .nav-text {
  z-index: 1;
  position: relative;
}

.nav-dropdown-item .coming-soon-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
  z-index: 1;
  position: relative;
  margin-left: auto;
}

/* Estados especiales para touch devices */
@media (pointer: coarse) {
  .nav-item,
  .nav-dropdown-trigger,
  .nav-dropdown-item,
  .action-button,
  .footer-nav-link {
    min-height: 44px; /* Área táctil recomendada */
    min-width: 44px;
  }
  
  .nav-item:hover,
  .nav-dropdown-trigger:hover,
  .nav-dropdown-item:hover,
  .action-button:hover {
    transform: none; /* Desactivar hover transforms en touch */
  }
  
  .nav-item:active,
  .nav-dropdown-trigger:active,
  .nav-dropdown-item:active,
  .action-button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  /* En touch devices, usar click en lugar de hover */
  .dropdown-container:focus-within .nav-dropdown,
  .nav-dropdown-trigger:focus + .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 400px;
  }
}

.app-main{ 
  flex:1; 
  display:flex; 
  align-items: center;
  justify-content: center;
  padding:24px;
  min-height: 70vh;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Footer full-bleed dentro de .app-main con padding */
.app-main .app-footer {
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: -24px;
  width: calc(100% + 48px);
}

/* ✨ Login fullscreen cuando header está oculto */
.app-header.hidden ~ .app-main {
  min-height: 100vh;
  padding-top: 20px;
}

/* App Outlet - Contenido principal del módulo */
#app-outlet {
  margin-top: 32px;
  margin-bottom: 32px;
  flex: 1;
}

/* App Outlet Responsive */
@media (max-width: 960px) {
  #app-outlet {
    margin-top: 24px;
    margin-bottom: 24px;
  }
}

@media (max-width: 640px) {
  #app-outlet {
    margin-top: 16px;
    margin-bottom: 16px;
  }
}

.card{
  width:100%; 
  max-width:420px; 
  margin:48px auto; 
  padding:32px; 
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border:1px solid var(--border); 
  border-radius:20px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ✨ Login card optimizada cuando header está oculto */
.app-header.hidden ~ .app-main .card {
  margin: 0 auto;
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(var(--brand-rgb), 0.15);
}
.card h2{
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

/* Logos en el login */
.login-logos{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-bottom:8px;
}
.login-logo{ height:110px; width:336px; object-fit: contain; display:block; image-rendering: -webkit-optimize-contrast; }
.login-logo-dark{ display:none; }
[data-theme="dark"] .login-logo-light{ display:none; }
[data-theme="dark"] .login-logo-dark{ display:block; }

/* Ajustes de espaciado solo para el login */
#auth-section.card { padding: 16px 20px; }
#auth-section .login-header h2{ margin: 4px 0 2px; }
#auth-section .login-header .login-subtitle{ margin: 0 0 6px; }
#auth-section label{ margin: 8px 0 4px; }
label{ 
  display:block; 
  font-size:14px; 
  color:var(--text); 
  font-weight: 500;
  margin:16px 0 6px;
}
input[type="email"], input[type="password"], input[type="text"]{
  width:100%; 
  padding:14px 16px; 
  border-radius:12px; 
  border:2px solid var(--border); 
  background:var(--panel-2); 
  color:var(--text);
  font-size: 16px;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}

/* Excepción para campos con clases específicas del livechat */
input[type="text"].modern-search,
input[type="text"].modern-select {
  padding: 14px 48px 14px 48px; /* Padding específico para íconos */
  font-size: 0.875rem;
}
input[type="email"]:focus, input[type="password"]:focus, input[type="text"]:focus{
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  transform: translateY(-1px);
}
.btn{ 
  padding:14px 20px; 
  border-radius:12px; 
  border:2px solid var(--border); 
  color:var(--text); 
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  cursor:pointer; 
  transition: all .2s ease;
  font-weight: 500;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.btn:active{ transform:translateY(2px) scale(0.98) }
.btn-primary{ 
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color:#fff; 
  border-color:transparent; 
  box-shadow: var(--shadow-md);
  font-weight: 600;
}
[data-theme="dark"] .btn.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}
.btn-primary:hover{
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.btn-secondary{ 
  background: linear-gradient(135deg, var(--panel-2) 0%, var(--border) 100%);
  border-color: var(--border);
}
.btn:hover{ 
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Animaciones mejoradas */
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(8px); }
  to { opacity:1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity:0; transform: translateX(-20px); }
  to { opacity:1; transform: translateX(0); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.conversation-item{ animation: fadeInUp .2s ease both }
.nav-link{ animation: slideIn .3s ease both }
.card{ animation: fadeInUp .4s ease both }
.error{ color:var(--danger); margin-top:8px; min-height:20px }

/* 🎯 Banner Premium - Optimizado para legibilidad de texto */
.banner{ 
  border-bottom:1px solid var(--border); 
  background: linear-gradient(
    135deg, 
    rgba(var(--brand-rgb),0.85) 0%,     /* Marca semi-transparente fuerte */
    rgba(var(--brand-light-rgb),0.75) 50%,   /* Gradiente medio */
    rgba(17,24,39,0.80) 100%     /* Gris oscuro para contraste */
  ), url('https://storage.googleapis.com/iandai/imagenes/logos%20equipos/SmartAutomata/panelback.png'); 
  background-size:cover; 
  background-position:center;
  position: relative;
  overflow: hidden;
  min-height: 60px;  /* Móvil mínimo */
  height: clamp(60px, 12vh, 120px); /* Responsive fluido */
}

/* Overlay adicional para máxima legibilidad */
.banner::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2); /* Sombra sutil para contraste */
  z-index: 1;
}

/* Shimmer effect sutil */
.banner::after{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
  z-index: 1;
}

.banner-inner{ 
  padding:16px 24px; 
  position: relative; 
  z-index: 2; 
  display: flex;
  align-items: center;
  height: 100%;
}

/* Texto con máximo contraste y legibilidad */
.banner-text{ 
  color: #ffffff !important;           /* Blanco puro */
  font-weight: 600;                    /* Semi-bold */
  font-size: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5); /* Sombra fuerte */
  letter-spacing: 0.025em;             /* Mejor legibilidad */
  opacity: 1 !important;               /* Máxima opacidad */
}

/* Ajustes responsive del banner */
@media (min-width: 768px) {
  .banner { height: clamp(80px, 15vh, 150px); }
}

@media (min-width: 1200px) {
  .banner { height: clamp(100px, 18vh, 180px); }
}

/* Responsive text sizing para móviles */
@media (max-width: 768px) {
  .banner-text { 
    font-size: 0.875rem; 
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  }
}

/* ===============================================
   MODALES LEGALES - TÉRMINOS Y PRIVACIDAD
   =============================================== */

.legal-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.legal-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: linear-gradient(135deg, var(--panel) 0%, #fafbfc 100%);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  max-height: 90vh;
  width: 90%;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Prevenir que clicks en el contenido cierren el modal */
  pointer-events: auto;
}

.legal-modal.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: white;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 0;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

.legal-content {
  padding: 32px;
  line-height: 1.6;
}

.legal-content h3 {
  color: var(--brand);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 16px 0;
}

.legal-content h3:first-child {
  margin-top: 0;
}

.legal-content p {
  margin: 16px 0;
  color: var(--text);
}

.legal-content ul {
  margin: 16px 0;
  padding-left: 24px;
}

.legal-content li {
  margin: 8px 0;
  color: var(--text);
}

.legal-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  background: linear-gradient(135deg, var(--panel-2) 0%, rgba(248, 250, 252, 0.8) 100%);
  border-radius: 16px;
  padding: 24px;
}

.legal-footer p {
  margin: 4px 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ✨ Estilos especiales para botón home */
.nav-item-home {
  position: relative;
}

.nav-item-home .nav-icon {
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.1) 0%, rgba(var(--brand-light-rgb), 0.05) 100%);
  border: 1px solid rgba(var(--brand-rgb), 0.2);
  border-radius: 8px;
  padding: 2px;
}

/* Responsive modales */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 20px 24px;
  }
  
  .modal-header h2 {
    font-size: 1.25rem;
  }
  
  .legal-content {
    padding: 24px 20px;
  }
  
  .legal-content h3 {
    font-size: 1.125rem;
  }
}
/* ===============================================
   FOOTER MODERNO Y MINIMALISTA
   =============================================== */

.app-footer {
  border-top: none;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  backdrop-filter: blur(0);
  margin-top: auto;
  box-shadow: none;
  width: 100%;
}

/* Modo oscuro del footer (azules + texto blanco) */
.footer-dark {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border-top-color: transparent;
  color: #f8fafc;
  box-shadow: none;
  border-top: none;
  width: 100%;
}

.footer-dark .footer-inner,
.footer-dark .footer-bottom {
  background: transparent;
}

.footer-dark .footer-brand-name {
  -webkit-text-fill-color: initial;
  background: none;
  color: #ffffff;
}

.footer-dark .footer-description,
.footer-dark .footer-nav-link,
.footer-dark .status-text,
.footer-dark .tech-stack,
.footer-dark .footer-credits,
.footer-dark .footer-time {
  color: #e2e8f0;
}

.footer-dark .footer-nav-link:hover {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
}

.footer-dark .footer-nav-link::after {
  background: #93c5fd;
}

.footer-dark .status-indicator {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(147, 197, 253, 0.5);
}

.footer-dark .footer-time {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(147, 197, 253, 0.5);
}

.footer-dark .footer-bottom {
  border-top-color: rgba(147, 197, 253, 0.3);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  gap: 32px;
}

/* Footer Left */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-image {
  height: 24px;
  width: 24px;
  object-fit: contain;
  border-radius: 6px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand-name {
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-version {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.625rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.footer-description {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  max-width: 300px;
}

/* Footer Center */
.footer-center {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.footer-navigation {
  display: flex;
  gap: 24px;
}

.footer-nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.footer-nav-link:hover {
  color: var(--brand);
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-1px);
}

.footer-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.footer-nav-link:hover::after {
  width: 80%;
}

/* Footer Right */
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.footer-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.status-indicator:hover {
  background: rgba(16, 185, 129, 0.05);
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.status-online {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.status-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.footer-time {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  background: var(--panel-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.footer-time:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-1px);
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(59, 130, 246, 0.01) 100%);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.heart-icon {
  color: #ef4444;
  animation: heartbeat 2s ease-in-out infinite;
}

.footer-tech {
  display: flex;
  align-items: center;
}

.tech-stack {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Animaciones del footer */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Footer Responsive */
@media (max-width: 960px) {
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 20px 24px;
  }
  
  .footer-left,
  .footer-center,
  .footer-right {
    align-items: center;
    text-align: center;
  }
  
  .footer-navigation {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .footer-status {
    align-items: center;
  }
  
  .footer-description {
    text-align: center;
    max-width: 100%;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 16px 24px;
  }
}

@media (max-width: 640px) {
  .footer-inner {
    padding: 16px 20px;
    gap: 20px;
  }
  
  .footer-navigation {
    gap: 12px;
  }
  
  .footer-nav-link {
    padding: 6px 10px;
    font-size: 0.8125rem;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-bottom {
    padding: 12px 20px;
  }
  
  .footer-credits,
  .tech-stack {
    font-size: 0.6875rem;
  }
}
/* Estilos específicos de Livechat pasaron a modules/livechat/styles.css */

/* ==== MEJORAS DEL LOGIN ==== */
.login-header {
  text-align: center;
  margin-bottom: 16px;
}

.login-header h2 {
  margin-bottom: 8px;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
  font-weight: 500;
}

.form-field {
  margin-bottom: 14px;
}

.form-field:last-of-type {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  padding: 16px 48px 16px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.input-wrapper input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.input-wrapper input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

.input-icon {
  position: absolute;
  right: 16px;
  color: var(--muted);
  pointer-events: none;
  transition: all 0.2s ease;
}

.input-wrapper input:focus + .input-icon {
  color: var(--brand);
}

.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(var(--brand-rgb, 37, 99, 235), 0.08);
}

.password-toggle:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.field-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 6px;
  min-height: 16px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.field-error.show {
  opacity: 1;
  transform: translateY(0);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Checkbox personalizado */
.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 0.875rem;
  color: var(--text);
}

.checkbox-container input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  margin-right: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
}

.checkbox-container input:checked + .checkmark {
  background: var(--brand);
  border-color: var(--brand);
}

.checkbox-container input:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.checkbox-container:hover .checkmark {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.checkbox-label {
  font-weight: 500;
}

.forgot-password {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.btn-login {
  width: 100%;
  position: relative;
  overflow: hidden;
  font-size: 16px;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.btn-login:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-login:not(:disabled):active {
  transform: translateY(0);
}

.btn-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.btn-spinner svg {
  animation: spin 1s linear infinite;
}

.btn-text {
  transition: opacity 0.2s ease;
}

.btn-login.loading .btn-text {
  opacity: 0;
}

.btn-login.loading .btn-spinner {
  display: block;
}

.error-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.05) 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  padding: 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 0;
  max-height: 0;
  overflow: hidden;
}

.error-banner.show {
  opacity: 1;
  transform: translateY(0);
  min-height: auto;
  max-height: 200px;
  margin-bottom: 0;
}

.error-banner:empty {
  display: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.form-field.shake input {
  animation: shake 0.4s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .form-options {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .checkbox-container {
    justify-content: center;
  }
  
  .forgot-password {
    text-align: center;
  }
  
  .card {
    margin: 24px auto;
    padding: 24px;
  }
}

/* ===============================================
   SISTEMA DE VERSIONES
   =============================================== */

/* Badge de versión en header */
.version-info {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.version-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.version-badge:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.version-badge:active {
  transform: translateY(0);
}

.version-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.version-badge span {
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* Modal de versión */
.version-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.version-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.version-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.version-modal-content {
  position: relative;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.version-modal.active .version-modal-content {
  transform: scale(1) translateY(0);
}

.version-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
}

.version-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.version-modal-header h3 svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.version-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.version-modal-close:hover {
  background: var(--panel-2);
  color: var(--text);
}

.version-modal-close svg {
  width: 20px;
  height: 20px;
}

.version-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Versión actual */
.version-current {
  margin-bottom: 32px;
}

.version-badge-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  border-radius: 12px;
  color: white;
  text-align: center;
}

.version-label {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.version-number-large {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.version-date {
  font-size: 0.875rem;
  opacity: 0.85;
  font-weight: 400;
}

/* Cambios */
.version-changes {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.changes-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  color: var(--muted);
  font-size: 0.875rem;
}

.changes-loading .spinner {
  animation: spin 1s linear infinite;
}

.changes-section {
  background: var(--panel-2);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}

.changes-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.changes-title svg {
  width: 18px;
  height: 18px;
}

.changes-title.agregado {
  color: var(--success, #10b981);
}

.changes-title.corregido {
  color: var(--danger, #ef4444);
}

.changes-title.mejorado {
  color: var(--brand, #2563eb);
}

.changes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.changes-list li {
  padding: 12px 16px;
  background: var(--panel);
  border-radius: 8px;
  border-left: 3px solid var(--border);
  font-size: 0.875rem;
  color: var(--text);
  transition: all 0.2s ease;
}

.changes-section.agregado .changes-list li {
  border-left-color: var(--success, #10b981);
}

.changes-section.corregido .changes-list li {
  border-left-color: var(--danger, #ef4444);
}

.changes-section.mejorado .changes-list li {
  border-left-color: var(--brand, #2563eb);
}

.changes-list li:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.no-changes {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 0.875rem;
  font-style: italic;
}

/* Encabezados de sección de versión */
.version-section-header {
  margin: 24px 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.version-section-header:first-child {
  margin-top: 0;
}

.version-section-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-section-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
  opacity: 0.5;
}

/* Modo oscuro */
[data-theme="dark"] .version-badge {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .version-badge:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

[data-theme="dark"] .version-modal-content {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .version-modal-header {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .changes-section {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .changes-list li {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .version-badge {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .version-badge span {
    display: none;
  }

  .version-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .version-modal-header {
    padding: 20px;
  }

  .version-modal-body {
    padding: 20px;
  }

  .version-number-large {
    font-size: 1.5rem;
  }
}

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

.version-changes .changes-section {
  animation: slideUp 0.3s ease-out;
}

/* ===============================================
   SISTEMA DE FEEDBACK Y NOTIFICACIONES
   =============================================== */

/* Modal de Feedback */
.feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.feedback-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.feedback-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.feedback-modal-content {
  position: relative;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.feedback-modal.active .feedback-modal-content {
  transform: scale(1) translateY(0);
}

.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
}

.feedback-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.feedback-modal-header h3 svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.feedback-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.feedback-modal-close:hover {
  background: var(--panel-2);
  color: var(--text);
}

.feedback-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.feedback-modal-body .form-field {
  margin-bottom: 24px;
}

.feedback-modal-body label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 0.875rem;
}

.feedback-modal-body select,
.feedback-modal-body textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.feedback-modal-body select:focus,
.feedback-modal-body textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.feedback-modal-body textarea {
  resize: vertical;
  min-height: 120px;
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.char-counter {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.char-counter.warning {
  color: var(--warning, #f59e0b);
}

.char-counter.error {
  color: var(--danger, #ef4444);
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--brand);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Dropdown de Notificaciones */
.notifications-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 1000;
  width: 380px;
  max-width: calc(100vw - 24px);
  max-height: 600px;
  background: var(--panel);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  overflow: hidden;
}

.notifications-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Flecha del dropdown */
.notifications-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 24px;
  width: 16px;
  height: 16px;
  background: var(--panel);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
  z-index: 1;
}

.notifications-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}

.notifications-dropdown-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.notifications-dropdown-title svg {
  width: 18px;
  height: 18px;
}

.notifications-dropdown-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-link-small {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-link-small:hover {
  background: var(--panel-2);
  text-decoration: underline;
}

.btn-link {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-link:hover {
  background: var(--panel-2);
  text-decoration: underline;
}

.notifications-dropdown-body {
  overflow-y: auto;
  flex: 1;
  max-height: 500px;
}

.notifications-list {
  padding: 8px;
  max-height: 500px;
  overflow-y: auto;
}

.notifications-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 0.875rem;
}

.notification-item {
  padding: 12px 16px;
  margin: 4px 8px;
  background: var(--panel-2);
  border-radius: 8px;
  border-left: 3px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.notification-item:hover {
  background: var(--panel);
  transform: translateX(2px);
}

.notification-item.unread {
  border-left-color: var(--brand);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, var(--panel-2) 100%);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
}

.notification-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.notification-title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text);
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.notification-time {
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.notification-message {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-type-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-right: 8px;
}

.notifications-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.notifications-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.notifications-empty p {
  margin: 0;
  font-size: 0.875rem;
}

/* Modo oscuro */
[data-theme="dark"] .feedback-modal-content {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .notifications-dropdown {
  background: linear-gradient(135deg, #0b1a3a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .notifications-dropdown::before {
  background: linear-gradient(135deg, #0b1a3a 0%, #1e293b 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .notification-item {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .notification-item.unread {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* ===============================================
   DROPDOWN DE USUARIOS EN LÍNEA
   =============================================== */

.online-users-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 1000;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: 500px;
  background: var(--panel);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  overflow: hidden;
}

.online-users-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Flecha del dropdown */
.online-users-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 24px;
  width: 16px;
  height: 16px;
  background: var(--panel);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
  z-index: 1;
}

.online-users-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}

.online-users-dropdown-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.online-users-dropdown-title svg {
  width: 18px;
  height: 18px;
}

.online-users-dropdown-body {
  overflow-y: auto;
  flex: 1;
  max-height: 450px;
}

.online-users-list {
  padding: 0;
  max-height: 450px;
  overflow-y: auto;
}

.online-users-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 0.875rem;
}

.online-user-item {
  padding: 12px 16px;
  margin: 0;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.online-user-item:last-child {
  border-bottom: none;
}

.online-user-item:hover {
  background: var(--panel-2);
}

.online-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--panel);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Soporte para imagen de perfil */
.online-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.online-user-avatar span {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.online-user-avatar::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: var(--success, #10b981);
  border: 2.5px solid var(--panel);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.online-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.online-user-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.online-user-email {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
}

.online-user-role {
  display: inline-block;
  padding: 2px 8px;
  background: var(--panel-2);
  border-radius: 12px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.online-users-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.online-users-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.online-users-empty p {
  margin: 0;
  font-size: 0.875rem;
}

/* Modo oscuro */
[data-theme="dark"] .online-users-dropdown {
  background: linear-gradient(135deg, #0b1a3a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .online-users-dropdown::before {
  background: linear-gradient(135deg, #0b1a3a 0%, #1e293b 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .online-user-item {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .online-user-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .online-user-avatar {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .online-user-role {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

/* Responsive */
@media (max-width: 768px) {
  .notifications-dropdown,
  .online-users-dropdown {
    width: calc(100vw - 24px);
    right: 12px;
    max-width: 380px;
  }

  .feedback-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .feedback-modal-header {
    padding: 20px;
  }

  .notifications-dropdown-header {
    padding: 12px 16px;
  }

  .feedback-modal-body {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
  }
}

/* ===============================================
   MODAL DE MIS SUGERENCIAS
   =============================================== */

.my-suggestions-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.my-suggestions-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.my-suggestions-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.my-suggestions-modal-content {
  position: relative;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.my-suggestions-modal.active .my-suggestions-modal-content {
  transform: scale(1) translateY(0);
}

.my-suggestions-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
}

.my-suggestions-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.my-suggestions-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.my-suggestions-modal-close:hover {
  background: var(--panel-2);
  color: var(--text);
}

.my-suggestions-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.suggestions-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestions-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 0.875rem;
}

.suggestion-item {
  padding: 20px;
  background: var(--panel-2);
  border-radius: 12px;
  border-left: 4px solid var(--border);
  transition: all 0.2s ease;
}

.suggestion-item:hover {
  background: var(--panel);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.suggestion-item.pendiente {
  border-left-color: var(--warning, #f59e0b);
}

.suggestion-item.en_revision {
  border-left-color: var(--info, #0ea5e9);
}

.suggestion-item.aceptada {
  border-left-color: var(--success, #10b981);
}

.suggestion-item.rechazada {
  border-left-color: var(--danger, #ef4444);
}

.suggestion-item.implementada {
  border-left-color: var(--brand, #2563eb);
}

.suggestion-item.cerrada {
  border-left-color: var(--muted, #64748b);
}

.suggestion-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.suggestion-id {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  font-family: 'Courier New', monospace;
}

.suggestion-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.suggestion-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.suggestion-badge.tipo {
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand);
}

.suggestion-badge.estado {
  background: rgba(100, 116, 139, 0.1);
  color: var(--muted);
}

.suggestion-badge.estado.pendiente {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning, #f59e0b);
}

.suggestion-badge.estado.en_revision {
  background: rgba(14, 165, 233, 0.1);
  color: var(--info, #0ea5e9);
}

.suggestion-badge.estado.aceptada {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success, #10b981);
}

.suggestion-badge.estado.rechazada {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger, #ef4444);
}

.suggestion-badge.estado.implementada {
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand, #2563eb);
}

.suggestion-message {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  margin: 12px 0;
  padding: 12px;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.suggestion-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.suggestions-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.suggestions-empty svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.suggestions-empty p {
  margin: 0;
  font-size: 0.875rem;
}

/* Modo oscuro */
[data-theme="dark"] .my-suggestions-modal-content {
  background: linear-gradient(135deg, #0b1a3a 0%, #000000 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .suggestion-item {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .suggestion-message {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .my-suggestions-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .suggestions-filters {
    flex-direction: column;
  }

  .filter-group {
    min-width: 100%;
  }

  .suggestion-header {
    flex-direction: column;
  }

  .suggestion-meta {
    width: 100%;
  }
}


