/* css/styles.css */

/* ==========================================
   MEDITERRANEAN SUNSET PALETTE 
   Ultra Modern & Interactive Design System
   ========================================== */

:root {
  /* Primary Mediterranean Sunset Colors */
  --deep-navy: #003366;
  --toasted-orange: #B84A00; /* Darkened from #CC5500 for WCAG AA compliance (4.5:1 contrast) */
  --sky-blue: #87CEEB;
  --sand-beige: #F5F5DC;
  --off-white: #F8F8F8;
  
  /* Extended Palette for Depth */
  --navy-darker: #002244;
  --navy-lighter: #004488;
  --orange-lighter: #FF6B35;
  --orange-darker: #AA4400;
  --sky-blue-light: #B8E2F5;
  --sky-blue-dark: #5AA5D5;
  
  /* Semantic Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: var(--sky-blue);
  
  /* Solid Colors - No Gradients */
  --primary-bg: #003366;
  --secondary-bg: #CC5500;
  --accent-bg: #87CEEB;
  --neutral-bg: #F5F5DC;
  --white-bg: #F8F8F8;
  
  /* Shadows - More Dramatic */
  --shadow-sm: 0 2px 4px rgba(0, 51, 102, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 51, 102, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 51, 102, 0.16);
  --shadow-xl: 0 12px 48px rgba(0, 51, 102, 0.24);
  --shadow-2xl: 0 24px 64px rgba(0, 51, 102, 0.32);
  --shadow-orange: 0 8px 32px rgba(204, 85, 0, 0.25);
  --shadow-glow: 0 0 40px rgba(204, 85, 0, 0.3);
  
  /* Animation Timings */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Notification Colors */
  --notification-success: #10B981;
  --notification-error: #EF4444;
  --notification-warning: #F59E0B;
  --notification-info: #3B82F6;
}

/* ==========================================
   GLOBAL STYLES & RESETS
   ========================================== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--off-white);
  color: var(--deep-navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   ANIMATED BACKGROUNDS
   ========================================== */

.bg-animated-gradient {
  background: var(--primary-bg);
  position: relative;
  overflow: hidden;
}

@keyframes colorPulse {
  0% { opacity: 1; }
  50% { opacity: 0.95; }
  100% { opacity: 1; }
}

.bg-pattern-dots {
  background: var(--sand-beige);
  opacity: 0.1;
}

/* ==========================================
   MODERN CARD DESIGNS
   ========================================== */

.card-modern {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(135, 206, 235, 0.1);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--secondary-bg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.card-modern:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-modern:hover::before {
  transform: scaleX(1);
}

/* Glassmorphism Cards */
.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 51, 102, 0.1);
  padding: 24px;
  transition: all var(--transition-base);
}

.card-glass:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(204, 85, 0, 0.15);
}

/* ==========================================
   BUTTONS - ULTRA INTERACTIVE
   ========================================== */

.btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--toasted-orange) !important;
  color: white !important;
  box-shadow: 0 4px 16px rgba(204, 85, 0, 0.4);
  border: 2px solid var(--toasted-orange);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(204, 85, 0, 0.5);
  background: var(--orange-lighter);
  border-color: var(--orange-lighter);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* Ripple Effect */
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-secondary {
  background: var(--sky-blue) !important;
  color: var(--deep-navy) !important;
  box-shadow: 0 4px 16px rgba(135, 206, 235, 0.3);
  border: 2px solid var(--sky-blue);
  font-weight: 700;
}

.btn-secondary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(135, 206, 235, 0.4);
  background: var(--sky-blue-light);
  border-color: var(--sky-blue-light);
}

.btn-floating {
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--toasted-orange);
  color: white;
  box-shadow: 0 4px 16px rgba(204, 85, 0, 0.4);
  animation: float 3s ease-in-out infinite;
  border: none;
  cursor: pointer;
}

.btn-floating:hover {
  background: var(--orange-lighter);
  box-shadow: 0 6px 24px rgba(204, 85, 0, 0.5);
}

/* Additional button styles for dashboard - removed duplicates */

/* Logout button specific styles */
.btn-logout {
  background: var(--toasted-orange) !important;
  color: white !important;
  border: 2px solid var(--toasted-orange) !important;
  font-weight: bold !important;
  transition: all 0.3s ease !important;
}

.btn-logout:hover {
  background: var(--orange-lighter) !important;
  border-color: var(--orange-lighter) !important;
  transform: scale(1.05) !important;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ==========================================
   FORMS - MODERN INPUTS
   ========================================== */

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--off-white);
  font-size: 15px;
  transition: all var(--transition-base);
  outline: none;
}

/* Special padding for inputs with icons */
.form-input.pr-10 {
  padding-right: 40px;
}

/* Container for password input */
.password-input-container {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 10;
  color: var(--sky-blue-dark);
  transition: color var(--transition-fast);
}

.password-toggle-btn:hover {
  color: var(--toasted-orange);
}

.password-toggle-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.form-input:focus {
  background: white;
  border-color: var(--toasted-orange);
  box-shadow: 0 0 0 4px rgba(204, 85, 0, 0.1);
  transform: translateY(-1px);
}

.form-input:hover {
  background: white;
  border-color: var(--sky-blue);
}

.form-label {
  font-weight: 600;
  color: var(--deep-navy);
  margin-bottom: 8px;
  display: block;
  font-size: 14px;
  letter-spacing: 0.3px;
}

/* Fix for input buttons visibility */
.relative:has(.form-input),
.password-input-container {
  overflow: visible !important;
}

/* Ensure buttons in forms are always visible */
form button[type="button"],
button.password-toggle-btn {
  z-index: 10;
}

/* Fix for select dropdowns */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235AA5D5' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Ensure modals are always on top */
.fixed.inset-0 {
  z-index: 9999;
}

/* Dashboard specific fixes */
.dashboard-card {
  position: relative;
  z-index: 1;
}

/* Fix para el panel verde del recolector - eliminar gradiente */
.dashboard-card.bg-gradient-to-r,
div[class*="dashboard-card"][class*="gradient"] {
  background: #10b981 !important;
  background-image: none !important;
}

.dashboard-header {
  position: relative;
  z-index: 0;
}

/* Navigation button fixes - Prevent orange background */
nav button {
  background-color: transparent !important;
}

nav button:hover {
  background-color: #F5F5DC !important;
}

/* Admin dashboard navigation buttons - more specific to avoid affecting all buttons */
.container .nav-button,
.container nav button {
  background-color: transparent;
}

/* Bottom navigation mobile */
.bottom-nav button {
  background-color: white !important;
}

/* ==========================================
   NAVIGATION - MODERN HEADER
   ========================================== */

.nav-modern {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 51, 102, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  color: var(--deep-navy);
  font-weight: 500;
  transition: all var(--transition-base);
  border-radius: 8px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--secondary-bg);
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--toasted-orange);
  background: rgba(204, 85, 0, 0.05);
}

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

.nav-link.active {
  color: var(--toasted-orange);
  background: rgba(204, 85, 0, 0.1);
}

.nav-link.active::after {
  width: 100%;
}

/* ==========================================
   STATISTICS CARDS
   ========================================== */

.stat-card {
  background: white;
  border-radius: 20px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(135, 206, 235, 0.2);
  transition: all var(--transition-spring);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: var(--secondary-bg);
  opacity: 0.05;
  transform: rotate(45deg);
  transition: all var(--transition-slow);
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-2xl);
  border-color: var(--toasted-orange);
}

.stat-card:hover::before {
  opacity: 0.1;
  transform: rotate(45deg) translateX(20px);
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--deep-navy);
}

.stat-label {
  font-size: 14px;
  color: var(--navy-lighter);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.stat-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-bg);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-spring);
}

.stat-card:hover .stat-icon {
  transform: rotate(10deg) scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* ==========================================
   TABLES - MODERN DESIGN
   ========================================== */

.table-modern {
  width: 100%;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table-modern thead {
  background: var(--primary-bg);
}

.table-modern th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: white;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-modern td {
  padding: 16px;
  border-bottom: 1px solid var(--sand-beige);
  color: var(--deep-navy);
  transition: all var(--transition-fast);
}

.table-modern tbody tr {
  transition: all var(--transition-base);
}

.table-modern tbody tr:hover {
  background: var(--off-white);
  border-left: 4px solid var(--accent-bg);
  transform: scale(1.01);
  box-shadow: var(--shadow-md);
}

/* ==========================================
   BADGES & CHIPS
   ========================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
}

.badge-success {
  background: #10B981;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: var(--secondary-bg);
  color: white;
  box-shadow: 0 2px 8px rgba(204, 85, 0, 0.3);
}

.badge-info {
  background: var(--primary-bg);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.3);
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* ==========================================
   LOADING ANIMATIONS
   ========================================== */

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--sky-blue-light);
  border-top: 4px solid var(--toasted-orange);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: var(--toasted-orange);
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.5);
  }
}

/* ==========================================
   MODALS & OVERLAYS
   ========================================== */

.modal-backdrop {
  background: rgba(0, 51, 102, 0.5);
  backdrop-filter: blur(8px);
  animation: fadeIn var(--transition-base);
}

.modal-content {
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-2xl);
  animation: slideUp var(--transition-spring);
  border: 2px solid rgba(135, 206, 235, 0.2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ==========================================
   NOTIFICATIONS
   ========================================== */

.notification {
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: var(--shadow-xl);
  animation: slideInRight var(--transition-spring);
  border-left: 4px solid var(--toasted-orange);
  background: white;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================
   DASHBOARD SPECIFIC
   ========================================== */

.dashboard-header {
  background: var(--primary-bg);
  border-radius: 24px;
  padding: 48px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: rgba(255, 255, 255, 0.05);
  animation: float 20s ease-in-out infinite;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

/* ==========================================
   LOGO STYLES
   ========================================== */

/* Logo gradient text - static */
.logo-text {
  background: linear-gradient(135deg, #003366 0%, #87CEEB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   ANIMATIONS & INTERACTIONS
   ==========================================*/

.animate-fade-in {
  animation: fadeIn var(--transition-slow);
}

.animate-slide-up {
  animation: slideUp var(--transition-spring);
}

.animate-scale-in {
  animation: scaleIn var(--transition-spring);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hover Lift Effect */
.hover-lift {
  transition: all var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Glow Effect */
.glow-orange {
  box-shadow: 0 0 20px rgba(204, 85, 0, 0.3);
  transition: all var(--transition-base);
}

.glow-orange:hover {
  box-shadow: 0 0 30px rgba(204, 85, 0, 0.5);
}

/* ==========================================
   TAILWIND COMPATIBILITY & FALLBACKS
   ========================================== */

/* Backgrounds - Tailwind-like classes as fallback */
.bg-green-500 { background-color: #10B981; }
.bg-green-600 { background-color: #059669; }
.bg-green-100 { background-color: #D1FAE5; }
.bg-blue-500 { background-color: #3B82F6; }
.bg-blue-600 { background-color: #2563EB; }
.bg-blue-100 { background-color: #DBEAFE; }
.bg-blue-50 { background-color: #EFF6FF; }
.bg-red-500 { background-color: #EF4444; }
.bg-red-100 { background-color: #FEE2E2; }
.bg-red-50 { background-color: #FEF2F2; }
.bg-yellow-100 { background-color: #FEF3C7; }
.bg-yellow-50 { background-color: #FFFBEB; }
.bg-gray-50 { background-color: #F9FAFB; }
.bg-gray-100 { background-color: #F3F4F6; }
.bg-gray-200 { background-color: #E5E7EB; }
.bg-gray-300 { background-color: #D1D5DB; }
.bg-gray-400 { background-color: #9CA3AF; }
.bg-gray-500 { background-color: #6B7280; }
.bg-orange-500 { background-color: var(--toasted-orange); }
.bg-orange-600 { background-color: var(--orange-darker); }
.bg-purple-600 { background-color: #9333EA; }
.bg-indigo-600 { background-color: #4F46E5; }

/* Text colors */
.text-white { color: white; }
.text-green-700 { color: #15803D; }
.text-green-800 { color: #166534; }
.text-red-700 { color: #B91C1C; }
.text-red-800 { color: #991B1B; }
.text-yellow-800 { color: #854D0E; }
.text-gray-500 { color: #6B7280; }
.text-gray-600 { color: #4B5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1F2937; }
.text-gray-900 { color: #111827; }
.text-blue-800 { color: #1E40AF; }
.text-orange-600 { color: var(--toasted-orange); }

/* Hover states */
.hover\:bg-green-600:hover { background-color: #059669; }
.hover\:bg-blue-600:hover { background-color: #2563EB; }
.hover\:bg-gray-50:hover { background-color: #F9FAFB; }
.hover\:bg-gray-100:hover { background-color: #F3F4F6; }
.hover\:bg-gray-200:hover { background-color: #E5E7EB; }

/* Borders */
.border-yellow-500 { border-color: #EAB308; }
.border-gray-300 { border-color: #D1D5DB; }

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-number {
    font-size: 28px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .card-modern {
    border-radius: 16px;
    padding: 20px;
  }
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--sand-beige);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-bg);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-bg);
}

/* ==========================================
   SPECIAL EFFECTS
   ========================================== */

.shimmer {
  background: rgba(255, 255, 255, 0.15);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.text-gradient {
  color: var(--deep-navy);
  font-weight: bold;
}

.border-gradient {
  border: 2px solid var(--toasted-orange);
}

/* Neon Glow Text */
.text-glow {
  text-shadow: 
    0 0 10px rgba(204, 85, 0, 0.5),
    0 0 20px rgba(204, 85, 0, 0.3),
    0 0 30px rgba(204, 85, 0, 0.2);
}

/* Background Patterns */
.bg-dots {
  background: none;
  opacity: 0.03;
}

.bg-grid {
  background: none;
  opacity: 0.02;
}

/* Button styles removed to prevent unwanted orange backgrounds */

/* Utility classes for quick fixes */
.cursor-not-allowed { cursor: not-allowed; }
.cursor-pointer { cursor: pointer; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.shadow-lg { box-shadow: var(--shadow-lg); }
.transition { transition: all 0.3s ease; }
.transition-all { transition: all 0.3s ease; }
.transition-colors { transition-property: background-color, border-color, color; transition-duration: 0.3s; }
.hover\:scale-105:hover { transform: scale(1.05); }

/* ==========================================
   GLOBAL VISIBILITY AND Z-INDEX FIXES
   Added to fix button visibility issues
   ========================================== */

/* Ensure interactive elements are properly layered without affecting their styles */
button,
a,
input,
select,
textarea,
[role="button"],
[onclick] {
  position: relative;
  z-index: 2;
  /* No background or color changes */
}

/* Special handling for password toggle buttons */
.password-toggle-btn,
button[type="button"] {
  z-index: 10 !important;
}

/* Fix for elements inside overflow:hidden containers */
.overflow-hidden > button,
.overflow-hidden > a,
.overflow-hidden > .absolute {
  z-index: 15 !important;
}

/* Ensure form inputs with icons work properly */
.password-input-container,
.relative:has(input),
.relative:has(.form-input) {
  overflow: visible !important;
}

/* Fix overlapping in dashboard cards */
.dashboard-card button,
.dashboard-card a,
.dashboard-card input,
.dashboard-card select {
  z-index: 5;
}

/* CRITICAL FIX: Ensure all interactive buttons are visible */
button[class*="bg-"],
.modal button,
.fixed button,
[class*="Modal"] button,
.dashboard-card button,
button.bg-green-500,
button.bg-blue-500,
button.bg-gray-200,
.dashboard-process-btn,
.dashboard-tab-btn {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  z-index: 10 !important;
}

/* Specific background color preservation for common button types */
button.bg-green-500,
.bg-green-500 {
  background-color: #10B981 !important;
  color: white !important;
}

button.bg-blue-500,
.bg-blue-500 {
  background-color: #3B82F6 !important;
  color: white !important;
}

button.bg-gray-200,
.bg-gray-200 {
  background-color: #E5E7EB !important;
  color: #374151 !important;
}

button.bg-green-600,
.bg-green-600 {
  background-color: #059669 !important;
  color: white !important;
}

/* Modals and overlays should always be on top */
.fixed[class*="inset-0"],
.modal,
[role="dialog"] {
  z-index: 9999 !important;
}

/* Dropdown menus */
.dropdown,
[role="menu"],
select:focus {
  z-index: 100;
}

/* Fix for absolute positioned elements */
.absolute {
  z-index: 10;
}

/* Navigation should stay on top but below modals */
.nav-modern,
header,
nav {
  z-index: 1000;
}

/* Tooltips and popovers */
[role="tooltip"],
.tooltip,
.popover {
  z-index: 10000;
}

/* Ensure buttons are clickable */
button:not(:disabled) {
  pointer-events: auto !important;
  opacity: 1 !important;
}

/* Fix for link visibility */
a {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Specific fix for auth navigation links */
button[onclick*="ForgotPassword"],
button[onClick*="ForgotPassword"],
.forgot-password-link,
.auth-nav-link {
  background: transparent !important;
  border: none !important;
  color: #B84A00 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 10 !important;
  position: relative !important;
  font-weight: 600 !important;
  padding: 8px !important;
}

.auth-nav-link:hover {
  color: #CC5500 !important;
  transform: scale(1.05) !important;
}

/* Remove global pointer-events that was causing issues */

/* But keep decorative elements non-interactive */
.absolute.opacity-10,
.absolute.opacity-20,
.absolute[class*="blur"] {
  pointer-events: none;
}

/* ==========================================
   DASHBOARD PUNTO LIMPIO SPECIFIC STYLES
   ========================================== */

/* Fix for dashboard buttons visibility */
.dashboard-process-btn {
  background-color: #10B981 !important;
  color: white !important;
  border: 2px solid #10B981 !important;
  font-weight: bold !important;
  padding: 12px 24px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 10 !important;
}

.dashboard-process-btn:hover {
  background-color: #34D399 !important;
  border-color: #34D399 !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-2px) scale(1.02) !important;
}

.dashboard-process-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* Tab buttons for dashboard */
.dashboard-tab-btn {
  background-color: #F8F8F8 !important;
  color: #374151 !important;
  border: 2px solid #87CEEB !important;
  font-weight: bold !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 10 !important;
}

.dashboard-tab-btn:hover {
  background-color: #E5E7EB !important;
  transform: scale(1.02) !important;
}

.dashboard-tab-btn.active {
  background-color: #003366 !important;
  color: white !important;
  border-color: #003366 !important;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3) !important;
}

/* ==========================================
   NOTIFICATION SYSTEM STYLES
   ========================================== */

.notification-bell {
  position: relative;
  cursor: pointer;
  transition: var(--transition-base);
}

.notification-bell:hover {
  transform: scale(1.1);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  animation: pulse 2s infinite;
}

.notification-panel {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  width: 320px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  max-height: 400px;
  overflow: hidden;
}

.notification-header {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  background: #f9fafb;
  border-radius: 12px 12px 0 0;
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: var(--transition-base);
  cursor: pointer;
}

.notification-item:hover {
  background: #f9fafb;
}

.notification-item.unread {
  background: #eff6ff;
  border-left: 3px solid var(--notification-info);
}

.notification-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notification-icon {
  flex-shrink: 0;
  font-size: 18px;
}

.notification-text {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
  margin-bottom: 2px;
}

.notification-message {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.notification-time {
  color: #9ca3af;
  font-size: 11px;
}

.notification-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: var(--transition-base);
}

.notification-item:hover .notification-actions {
  opacity: 1;
}

.notification-action {
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  transition: var(--transition-base);
}

.notification-action:hover {
  background: #e5e7eb;
  color: #374151;
}

.notification-action.delete:hover {
  color: var(--danger);
  background: #fef2f2;
}

.notification-footer {
  padding: 12px 16px;
  background: #f9fafb;
  text-align: center;
  border-radius: 0 0 12px 12px;
}

.notification-footer button {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-base);
}

.notification-footer button:hover {
  color: var(--primary-bg);
}

.notification-empty {
  padding: 32px 16px;
  text-align: center;
  color: #6b7280;
}

.notification-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animation for notification badge */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Spinner for loading states */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f4f6;
  border-top: 2px solid var(--primary-bg);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}