/* ============================================
   SAN DE MOTOS - Luxury Premium Edition v3.0
   Mobile-First, Glassmorphism Advanced, Spring Animations
   Paleta: Gold Premium + Midnight Black + Crimson Red
   ============================================ */

:root {
  /* 🎨 PALETA DE COLORES PREMIUM - LUXURY EDITION */
  --gold: #D4AF37;
  --gold-light: #F4E8C1;
  --gold-dark: #AA8C2C;
  --gold-glow: rgba(212, 175, 55, 0.4);
  --gold-pale: rgba(212, 175, 55, 0.1);
  
  --platinum: #E5E4E2;
  --silver: #C0C0C0;
  
  --crimson: #DC143C;
  --crimson-dark: #B01030;
  --crimson-light: #FF2D55;
  --crimson-glow: rgba(220, 20, 60, 0.4);
  
  --midnight: #0A0E27;
  --midnight-light: #151B3D;
  --midnight-dark: #050818;
  
  --charcoal: #1C1C1E;
  --charcoal-light: #2C2C2E;
  --charcoal-dark: #0C0C0E;
  
  --slate: #3A3A3C;
  --slate-light: #48484A;
  
  --text-primary: #FFFFFF;
  --text-secondary: #E8E8ED;
  --text-muted: #8E8E93;
  --text-disabled: #636366;
  
  --success: #34C759;
  --success-light: rgba(52, 199, 89, 0.15);
  --warning: #FF9500;
  --warning-light: rgba(255, 149, 0, 0.15);
  --danger: #FF3B30;
  --danger-light: rgba(255, 59, 48, 0.15);
  --info: #007AFF;
  --info-light: rgba(0, 122, 255, 0.15);
  
  /* ✨ GLASSMORPHISM AVANZADO */
  --glass-bg: rgba(28, 28, 30, 0.85);
  --glass-bg-light: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(212, 175, 55, 0.2);
  --glass-border-hover: rgba(212, 175, 55, 0.4);
  --glass-blur: blur(20px) saturate(180%);
  --glass-blur-heavy: blur(40px) saturate(200%);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  /* 🌈 GRADIENTES PREMIUM */
  --gradient-gold: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  --gradient-gold-horizontal: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  --gradient-crimson: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-dark) 100%);
  --gradient-midnight: linear-gradient(180deg, var(--midnight) 0%, var(--midnight-light) 100%);
  --gradient-hero: linear-gradient(135deg, var(--midnight-dark) 0%, var(--midnight) 50%, var(--charcoal) 100%);
  --gradient-card: linear-gradient(180deg, rgba(28,28,30,0.95) 0%, rgba(20,20,22,0.98) 100%);
  --gradient-shine: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  
  /* 📐 BORDES Y BACKDROP */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-full: 9999px;
  
  /* ⚡ SPRING PHYSICS - IPHONE STYLE */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring-fast: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  
  --transition-fast: all 0.15s var(--ease-smooth);
  --transition-normal: all 0.3s var(--ease-spring-fast);
  --transition-slow: all 0.5s var(--ease-spring);
  --transition-bounce: all 0.4s var(--ease-spring-bounce);
  
  /* 📏 ESPACIADO PREMIUM */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* 🔤 TIPOGRAFÍA DE LUJO */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  
  /* 🌟 EFECTOS VISUALES PREMIUM */
  --glow-gold: 0 0 20px var(--gold-glow), 0 0 40px rgba(212, 175, 55, 0.2);
  --glow-gold-strong: 0 0 30px var(--gold-glow), 0 0 60px rgba(212, 175, 55, 0.3);
  --glow-crimson: 0 0 20px var(--crimson-glow);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 6px rgba(0,0,0,0.4);
  --shadow-md: 0 10px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.5);
  --shadow-xl: 0 30px 60px rgba(0,0,0,0.6);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.1), inset 0 -1px 0 rgba(0,0,0,0.3);
  
  /* 🎯 LAYOUT */
  --max-width: 1400px;
  --header-height: 80px;
  --container-padding: 2rem;
}

/* ============================================================================
   RESET & BASE - OPTIMIZADO
   ============================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--gradient-hero);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Patrón de fondo sutil premium */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(220, 20, 60, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Mesh gradient animado */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  right: -20%;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: meshFloat 30s ease-in-out infinite;
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-2%, 2%) scale(1.05); }
  66% { transform: translate(2%, -2%) scale(0.95); }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-normal);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
  position: relative;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: var(--transition-normal);
  will-change: transform;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

ul, ol {
  list-style: none;
}

/* Scrollbar personalizado premium */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--charcoal);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  border: 2px solid var(--charcoal);
  transition: var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

::selection {
  background: var(--gold);
  color: var(--midnight);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================================
   TIPOGRAFÍA DE LUJO
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.3));
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .container {
    padding: 0 3rem;
  }
}

/* ============================================================================
   BOTONES PREMIUM - EFECTOS LUXURY
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  white-space: nowrap;
  transition: var(--transition-normal);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  will-change: transform;
  letter-spacing: 0.5px;
}

/* Efecto shine premium */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-shine);
  transition: left 0.6s var(--ease-smooth);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0) scale(0.98);
  transition: var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--midnight);
  box-shadow: var(--shadow), 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  background: var(--gradient-gold);
  box-shadow: var(--shadow-gold), var(--shadow-lg);
}

.btn-secondary {
  background: var(--gradient-crimson);
  color: var(--text-primary);
  box-shadow: var(--shadow), 0 4px 12px rgba(220, 20, 60, 0.3);
}

.btn-secondary:hover {
  background: var(--gradient-crimson);
  box-shadow: var(--glow-crimson), var(--shadow-lg);
}

.btn-outline {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--midnight);
  box-shadow: var(--shadow-gold);
}

.btn-accent {
  background: linear-gradient(135deg, var(--crimson-light) 0%, var(--crimson) 100%);
  color: var(--text-primary);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--crimson-light) 0%, var(--crimson) 100%);
  box-shadow: var(--glow-crimson), var(--shadow-lg);
}

.btn-success {
  background: var(--success);
  color: var(--text-primary);
}

.btn-success:hover {
  background: #2DB34F;
  box-shadow: 0 4px 20px rgba(52, 199, 89, 0.4);
}

.btn-danger {
  background: var(--danger);
  color: var(--text-primary);
}

.btn-danger:hover {
  background: #E6352B;
  box-shadow: 0 4px 20px rgba(255, 59, 48, 0.4);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-light);
  color: var(--gold);
  border: 1px solid var(--glass-border);
  transition: var(--transition-bounce);
  backdrop-filter: blur(10px);
}

.btn-icon:hover {
  background: var(--gold);
  color: var(--midnight);
  transform: scale(1.15) rotate(-5deg);
  box-shadow: var(--shadow-gold);
}

/* ============================================================================
   CARDS - GLASSMORPHISM PREMIUM
   ============================================================================ */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: var(--transition-slow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: relative;
}

/* Borde superior dorado animado */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-gold-horizontal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-spring);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  box-shadow: var(--glass-shadow-lg);
  border-color: var(--glass-border-hover);
  transform: translateY(-8px) scale(1.01);
}

.card-body {
  padding: 2rem;
}

.card-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

.card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: var(--transition-slow);
}

.card:hover .card-img {
  transform: scale(1.08);
  filter: brightness(1.1) saturate(1.2);
}

/* ============================================================================
   FORMULARIOS - GLASS PREMIUM
   ============================================================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.625rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-md);
  background: var(--charcoal);
  transition: var(--transition-normal);
  font-size: 1rem;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.form-control:hover {
  border-color: var(--slate-light);
  background: var(--charcoal-light);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-pale), var(--glass-inset);
  background: var(--midnight);
  transform: scale(1.005);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23D4AF37' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 3rem;
  cursor: pointer;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
}

.form-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  cursor: pointer;
  transition: var(--transition-fast);
}

.input-group {
  display: flex;
  gap: 0.625rem;
}

.input-group .form-control {
  flex: 1;
}

/* ============================================================================
   BADGES & TAGS PREMIUM
   ============================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
  letter-spacing: 0.3px;
}

.badge:hover {
  transform: scale(1.08);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(255, 149, 0, 0.3);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
  border: 1px solid rgba(0, 122, 255, 0.3);
}

.badge-gold {
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Tags de Usuario */
.tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.tag-puntual {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.tag-vip {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: var(--glow-gold);
}

.tag-nuevo {
  background: var(--info-light);
  color: var(--info);
  border: 1px solid rgba(0, 122, 255, 0.3);
}

.tag-moroso {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

/* ============================================================================
   PROGRESS BARS PREMIUM
   ============================================================================ */
.progress {
  height: 10px;
  background: var(--charcoal);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-inset);
}

.progress::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s infinite;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  transition: width 0.8s var(--ease-spring);
  box-shadow: 0 2px 8px var(--gold-glow);
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================================================
   TABS PREMIUM
   ============================================================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--slate);
  overflow-x: auto;
  gap: 0.25rem;
  padding-bottom: 2px;
}

.tab-btn {
  padding: 0.875rem 1.5rem;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: var(--transition-normal);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  position: relative;
}

.tab-btn:hover {
  color: var(--gold);
  background: var(--glass-bg-light);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: var(--glass-bg-light);
  box-shadow: 0 -2px 10px rgba(212, 175, 55, 0.2);
}

/* ============================================================================
   MODALES - GLASS PREMIUM ADVANCED
   ============================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 39, 0.9);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  animation: modalFadeIn 0.4s var(--ease-spring);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--glass-shadow-lg), var(--glow-gold);
  animation: modalScaleIn 0.4s var(--ease-spring-bounce);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(20px);
}

.modal-header h3 {
  color: var(--gold);
  font-size: var(--font-size-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.modal-close {
  background: var(--glass-bg-light);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  color: var(--danger);
  background: var(--danger-light);
  border-color: var(--danger);
  transform: scale(1.15) rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  position: sticky;
  bottom: 0;
  backdrop-filter: blur(20px);
}

/* ============================================================================
   TOAST NOTIFICATIONS - PREMIUM LUXURY
   ============================================================================ */
.toast-container {
  position: fixed;
  top: 100px;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
}

.toast {
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-left: 4px solid;
  box-shadow: var(--glass-shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: toastSlideIn 0.5s var(--ease-spring);
  min-width: 320px;
  backdrop-filter: blur(20px);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-info {
  border-left-color: var(--info);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.toast-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================================================
   SKELETON LOADING PREMIUM
   ============================================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--charcoal) 25%, var(--slate) 50%, var(--charcoal) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================================
   GRID SYSTEM
   ============================================================================ */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-1 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================================
   HEADER & NAVIGATION - GLASS PREMIUM
   ============================================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  height: var(--header-height);
  transition: var(--transition-normal);
}

.header.scrolled {
  background: rgba(28, 28, 30, 0.98);
  box-shadow: var(--glass-shadow-lg);
  border-bottom-color: var(--glass-border-hover);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  transition: var(--transition-normal);
  letter-spacing: -0.5px;
}

.logo:hover {
  transform: scale(1.02);
}

.logo svg {
  width: 40px;
  height: 40px;
  color: var(--gold);
  filter: drop-shadow(0 2px 8px var(--gold-glow));
  transition: var(--transition-bounce);
}

.logo:hover svg {
  transform: scale(1.1) rotate(-5deg);
}

.logo span {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .nav-desktop a {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    transition: var(--transition-normal);
  }
  
  .nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
    transform: translateX(-50%);
  }
  
  .nav-desktop a:hover::after,
  .nav-desktop a.active::after {
    width: 70%;
  }
  
  .nav-desktop a:hover,
  .nav-desktop a.active {
    background: var(--glass-bg-light);
    color: var(--gold);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions .btn-icon {
  background: var(--glass-bg-light);
  color: var(--gold);
  transition: var(--transition-bounce);
}

.header-actions .btn-icon:hover {
  background: var(--gold);
  color: var(--midnight);
  transform: scale(1.15) rotate(-5deg);
  box-shadow: var(--shadow-gold);
}

.cart-badge {
  position: relative;
}

.cart-badge .badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--gradient-crimson);
  color: var(--text-primary);
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  animation: badgePulse 2s ease-in-out infinite;
  box-shadow: 0 2px 8px var(--crimson-glow);
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 0.625rem;
  border-radius: var(--radius);
  transition: var(--transition-fast);
}

.hamburger:hover {
  background: var(--glass-bg-light);
}

@media (min-width: 1024px) {
  .hamburger { display: none; }
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-normal);
  border-radius: var(--radius-sm);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.nav-mobile {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-heavy);
  transform: translateX(-100%);
  transition: var(--transition-slow);
  z-index: 99;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.nav-mobile.active {
  transform: translateX(0);
}

.nav-mobile a {
  display: block;
  padding: 1.125rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
  transition: var(--transition-normal);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: var(--glass-bg-light);
  color: var(--gold);
  transform: translateX(6px);
}

.nav-mobile .mobile-user {
  padding-top: 1.75rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 1.25rem;
}

/* ============================================================================
   FOOTER - PREMIUM LUXURY
   ============================================================================ */
.footer {
  background: var(--midnight-dark);
  color: var(--text-muted);
  padding: 5rem 0 0;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-gold-horizontal);
  opacity: 0.5;
}

.footer-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.footer h4 {
  color: var(--text-primary);
  margin-bottom: 1.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.footer a {
  color: var(--text-muted);
  display: block;
  padding: 0.5rem 0;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--gold);
  transform: translateX(6px);
}

.footer-bottom {
  border-top: 1px solid var(--slate);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.footer-social a {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-bounce);
  color: var(--text-muted);
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--midnight);
  transform: translateY(-6px) scale(1.1);
  box-shadow: var(--shadow-gold);
}

/* ============================================================================
   LANDING PAGE - PREMIUM HERO
   ============================================================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
}

/* Efecto mesh gradient animado */
.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
  pointer-events: none;
  animation: meshFloat 25s ease-in-out infinite;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.25;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--text-primary);
  padding: 5rem 0;
}

.hero-content h1 {
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.hero-buttons .btn {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 2px 15px var(--gold-glow);
  display: block;
}

.hero-stat .label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: var(--glass-shadow-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s var(--ease-spring);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.carousel-slide .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,14,39,0.9), transparent);
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
}

.carousel-slide .overlay h2 {
  color: var(--text-primary);
  text-shadow: 0 2px 15px rgba(0,0,0,0.5);
}

.carousel-slide .overlay p {
  color: var(--text-secondary);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.95);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 5;
  transition: var(--transition-bounce);
}

.carousel-btn:hover {
  background: var(--white);
  transform: translateY(-50%) scale(1.15);
  box-shadow: var(--shadow-gold);
}

.carousel-btn.prev { left: 1.25rem; }
.carousel-btn.next { right: 1.25rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--slate);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
}

.carousel-dot.active {
  background: var(--gold);
  width: 28px;
  border-radius: 6px;
  box-shadow: var(--shadow-gold);
}

.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.service-card {
  text-align: center;
  padding: 2.5rem;
  transition: var(--transition-slow);
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 2.5rem;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-inset);
  border: 1px solid var(--glass-border);
}

.service-card:hover .service-icon {
  background: var(--gradient-gold);
  transform: scale(1.15) rotate(-8deg);
  box-shadow: var(--shadow-gold);
}

.countdown {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin: 2.5rem 0;
}

.countdown-item {
  background: var(--glass-bg);
  color: var(--text-primary);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  text-align: center;
  min-width: 85px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 1px solid var(--glass-border);
}

.countdown-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.countdown-item .number {
  font-size: 2.5rem;
  font-weight: 800;
  display: block;
  color: var(--gold);
}

.countdown-item .label {
  font-size: 0.8rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.testimonial-card {
  padding: 2.5rem;
  transition: var(--transition-slow);
}

.testimonial-card:hover {
  transform: translateY(-6px);
}

.testimonial-stars {
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  text-shadow: 0 2px 8px var(--gold-glow);
}

.testimonial-text {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--midnight);
  box-shadow: var(--shadow-inset);
}

.testimonial-name {
  font-weight: 700;
  color: var(--text-primary);
}

.testimonial-role {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.brands-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 140px;
  height: 70px;
  background: var(--glass-bg-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  opacity: 0.6;
  transition: var(--transition-slow);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.95rem;
  border: 1px solid var(--glass-border);
}

.brand-logo:hover {
  opacity: 1;
  transform: scale(1.1) translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--glass-bg-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--glass-border);
  transition: var(--transition-normal);
}

.cert-item:hover {
  border-color: var(--gold);
  transform: translateX(6px);
}

.cert-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: var(--transition-bounce);
  color: var(--midnight);
}

.cert-item:hover .cert-icon {
  transform: scale(1.15);
}

.newsletter {
  background: var(--gradient-midnight);
  padding: 4rem 3rem;
  border-radius: var(--radius-2xl);
  color: var(--text-primary);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.newsletter::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.newsletter h3 {
  color: var(--gold);
  margin-bottom: 0.75rem;
  position: relative;
}

.newsletter p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 550px;
  margin: 0 auto;
  position: relative;
}

.newsletter-form .form-control {
  border: none;
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.newsletter-form .form-control::placeholder {
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* ============================================================================
   CATÁLOGO - PREMIUM
   ============================================================================ */
.page-header {
  background: var(--gradient-hero);
  padding: 4rem 0;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(212,175,55,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.page-header h1 {
  color: var(--text-primary);
  margin-bottom: 0.625rem;
  position: relative;
}

.breadcrumb {
  display: flex;
  gap: 0.625rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.catalog-layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 300px 1fr;
  }
}

.filters-sidebar {
  background: var(--gradient-card);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
}

.filter-group {
  margin-bottom: 1.75rem;
}

.filter-group h4 {
  margin-bottom: 0.875rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-md);
  background: var(--charcoal);
  color: var(--text-primary);
  transition: var(--transition-normal);
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-pale);
}

.range-slider {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.range-slider input {
  width: 100%;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.catalog-toolbar .results {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.sort-options {
  display: flex;
  gap: 0.625rem;
}

.sort-btn {
  padding: 0.625rem 1.125rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-md);
  background: var(--charcoal);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition-normal);
}

.sort-btn:hover {
  background: var(--charcoal-light);
  border-color: var(--slate-light);
}

.sort-btn.active {
  background: var(--gradient-gold);
  color: var(--midnight);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.moto-card {
  position: relative;
  transition: var(--transition-slow);
}

.moto-card:hover {
  transform: translateY(-10px);
}

.moto-card .card-img {
  height: 240px;
}

.moto-card .card-body {
  padding: 1.5rem;
}

.moto-card .moto-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.moto-card .moto-brand {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.875rem;
}

.moto-card .moto-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
}

.moto-card .moto-price-financed {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.moto-card .moto-specs {
  display: flex;
  gap: 1.25rem;
  margin: 0.875rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.moto-card .moto-specs span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.moto-card .availability {
  margin-bottom: 0.875rem;
}

.moto-card .card-actions {
  display: flex;
  gap: 0.625rem;
}

.moto-card .card-actions .btn {
  flex: 1;
  font-size: 0.9rem;
  padding: 0.625rem;
}

.moto-card .fav-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--glass-bg);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition-bounce);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.moto-card .fav-btn:hover {
  transform: scale(1.15);
  color: var(--danger);
}

.moto-card .fav-btn.active {
  color: var(--danger);
  background: var(--danger-light);
}

.moto-card .compare-btn {
  position: absolute;
  top: 1.25rem;
  right: 4.5rem;
  background: var(--glass-bg);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition-bounce);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.moto-card .compare-btn:hover {
  transform: scale(1.15);
  color: var(--info);
}

/* Moto Detail */
.moto-detail {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .moto-detail {
    grid-template-columns: 1fr 1fr;
  }
}

.moto-gallery {
  position: relative;
}

.moto-gallery .main-image {
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  transition: var(--transition-slow);
}

.moto-gallery .thumbs {
  display: flex;
  gap: 0.625rem;
  margin-top: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.625rem;
}

.moto-gallery .thumb {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-normal);
}

.moto-gallery .thumb:hover {
  transform: scale(1.08);
}

.moto-gallery .thumb.active {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.moto-info h1 {
  margin-bottom: 0.625rem;
}

.moto-info .price-section {
  margin: 1.75rem 0;
}

.moto-info .price-cash {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 2px 8px var(--gold-glow);
}

.moto-info .price-financed {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
}

.specs-table td {
  padding: 0.875rem;
  border-bottom: 1px solid var(--slate);
}

.specs-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  width: 40%;
}

.reviews-section {
  margin-top: 4rem;
}

.review-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--slate);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}

.review-author {
  font-weight: 700;
  color: var(--text-primary);
}

.review-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.review-stars {
  color: var(--gold);
}

.review-text {
  color: var(--text-secondary);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 2.5rem;
}

.page-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate);
  background: var(--charcoal);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: var(--transition-normal);
}

.page-btn:hover:not(.active) {
  background: var(--charcoal-light);
  transform: translateY(-3px);
}

.page-btn.active {
  background: var(--gradient-gold);
  color: var(--midnight);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

/* ============================================================================
   SERVICIOS - PREMIUM
   ============================================================================ */
.service-detail-card {
  display: flex;
  gap: 1.75rem;
  padding: 2rem;
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  transition: var(--transition-slow);
}

.service-detail-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--glass-shadow-lg);
  border-color: var(--glass-border-hover);
}

@media (max-width: 640px) {
  .service-detail-card {
    flex-direction: column;
  }
}

.service-detail-card .service-icon {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: var(--transition-bounce);
  border: 1px solid var(--glass-border);
}

.service-detail-card:hover .service-icon {
  transform: scale(1.15) rotate(-8deg);
  background: var(--gradient-gold);
  box-shadow: var(--shadow-gold);
}

.service-detail-card h3 {
  margin-bottom: 0.625rem;
  color: var(--text-primary);
}

.service-detail-card .price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
  margin: 0.625rem 0;
}

.service-detail-card .time {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day {
  padding: 0.875rem;
  text-align: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition-normal);
}

.calendar-day:hover:not(.unavailable) {
  background: var(--glass-bg-light);
  transform: scale(1.08);
}

.calendar-day.available {
  background: var(--success-light);
  color: var(--success);
  font-weight: 600;
}

.calendar-day.selected {
  background: var(--gradient-gold);
  color: var(--midnight);
  box-shadow: var(--shadow-gold);
}

.calendar-day.unavailable {
  color: var(--text-disabled);
  cursor: not-allowed;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.calendar-header h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--slate);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--charcoal);
  border: 3px solid var(--slate);
  z-index: 1;
  transition: var(--transition-normal);
}

.timeline-item.active::before {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: var(--shadow-gold);
}

.timeline-item.completed::before {
  border-color: var(--success);
  background: var(--success);
}

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.before-after img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
}

.before-after img:hover {
  transform: scale(1.05);
}

.before-after .label {
  text-align: center;
  font-weight: 700;
  margin-top: 0.625rem;
  color: var(--text-primary);
}

.tutorial-card {
  padding: 1.75rem;
  transition: var(--transition-slow);
}

.tutorial-card:hover {
  transform: translateY(-6px);
}

.tutorial-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--charcoal);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 3.5rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
}

.tutorial-video:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

/* ============================================================================
   FINANCIAMIENTO - PREMIUM
   ============================================================================ */
.simulator-box {
  background: var(--gradient-card);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}

.simulator-result {
  background: var(--glass-bg-light);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-top: 1.75rem;
  transition: var(--transition-normal);
  border: 1px solid var(--glass-border);
}

.simulator-result:hover {
  background: var(--glass-bg-hover);
  transform: scale(1.02);
}

.simulator-result .amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 2px 8px var(--gold-glow);
}

.simulator-result .label {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.amortization-table {
  width: 100%;
  border-collapse: collapse;
}

.amortization-table th,
.amortization-table td {
  padding: 0.875rem;
  text-align: right;
  border-bottom: 1px solid var(--slate);
}

.amortization-table th {
  background: var(--charcoal);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.amortization-table th:first-child,
.amortization-table td:first-child {
  text-align: left;
}

.amortization-table tbody tr:hover {
  background: var(--glass-bg-light);
}

.signature-pad {
  border: 2px dashed var(--slate);
  border-radius: var(--radius-lg);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  background: var(--charcoal);
  transition: var(--transition-normal);
}

.signature-pad:hover {
  border-color: var(--gold);
  background: var(--midnight);
}

.credit-status {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 0.625rem;
  transition: var(--transition-normal);
  background: var(--glass-bg-light);
  border: 1px solid var(--glass-border);
}

.credit-status:hover {
  transform: translateX(6px);
}

.credit-status .status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.credit-status.pending .status-dot { background: var(--warning); }
.credit-status.approved .status-dot { background: var(--success); }
.credit-status.rejected .status-dot { background: var(--danger); }

.chart-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 220px;
  padding: 1.25rem 0;
}

.chart-bar .bar {
  flex: 1;
  background: var(--gradient-gold);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-width: 35px;
  position: relative;
  transition: var(--transition-slow);
  box-shadow: 0 -2px 12px var(--gold-glow);
}

.chart-bar .bar:hover {
  opacity: 0.9;
  transform: scaleY(1.08);
}

.chart-bar .bar-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--text-muted);
}

.chart-bar .bar-value {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
}

/* ============================================================================
   MI CUENTA - PREMIUM
   ============================================================================ */
.account-layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .account-layout {
    grid-template-columns: 280px 1fr;
  }
}

.account-sidebar {
  background: var(--gradient-card);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  height: fit-content;
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
}

.account-user {
  text-align: center;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--slate);
  margin-bottom: 1.75rem;
}

.account-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--gradient-gold);
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--midnight);
  border: 3px solid var(--gold);
  box-shadow: var(--shadow-gold);
  transition: var(--transition-bounce);
}

.account-avatar:hover {
  transform: scale(1.1);
}

.account-nav a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-normal);
  position: relative;
}

.account-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--gradient-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: var(--transition-normal);
  transform: translateY(-50%);
}

.account-nav a:hover::before,
.account-nav a.active::before {
  height: 70%;
}

.account-nav a:hover,
.account-nav a.active {
  background: var(--glass-bg-light);
  color: var(--gold);
  transform: translateX(6px);
}

.account-nav a svg {
  width: 22px;
  height: 22px;
}

.account-content {
  background: var(--gradient-card);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}

.account-content h2 {
  margin-bottom: 1.75rem;
  color: var(--text-primary);
}

.moto-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  align-items: center;
  transition: var(--transition-normal);
  background: var(--charcoal);
}

.moto-item:hover {
  border-color: var(--gold);
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

.moto-item img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius);
}

.moto-item .moto-info {
  flex: 1;
}

.moto-item .moto-info h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.moto-item .moto-actions {
  display: flex;
  gap: 0.625rem;
}

.ticket-item {
  padding: 1.5rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  transition: var(--transition-normal);
  background: var(--charcoal);
}

.ticket-item:hover {
  border-color: var(--gold);
  transform: translateX(6px);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.625rem;
}

.ticket-id {
  font-weight: 700;
  color: var(--gold);
}

.ticket-message {
  color: var(--text-secondary);
}

.notification-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--slate);
  transition: var(--transition-normal);
}

.notification-item:hover {
  background: var(--glass-bg-light);
}

.notification-item.unread {
  background: var(--info-light);
  border-left: 3px solid var(--info);
}

.notification-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-content h4 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.notification-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.notification-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.loyalty-card {
  background: var(--gradient-midnight);
  color: var(--text-primary);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.loyalty-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 60%);
}

.loyalty-card .points {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gold);
  position: relative;
  text-shadow: 0 2px 15px var(--gold-glow);
}

.loyalty-card .level {
  font-size: 1.25rem;
  opacity: 0.9;
  position: relative;
  margin-top: 0.5rem;
}

/* ============================================================================
   CARRITO - PREMIUM
   ============================================================================ */
.cart-item {
  display: flex;
  gap: 1.75rem;
  padding: 1.75rem;
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  margin-bottom: 1.25rem;
  align-items: center;
  border: 1px solid var(--glass-border);
  transition: var(--transition-slow);
}

.cart-item:hover {
  transform: translateX(6px);
  box-shadow: var(--glass-shadow-lg);
  border-color: var(--glass-border-hover);
}

@media (max-width: 640px) {
  .cart-item {
    flex-direction: column;
    text-align: center;
  }
}

.cart-item img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.cart-item-info .type {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cart-item-price {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--gold);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.cart-item-qty button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: var(--transition-bounce);
  border: 1px solid var(--slate);
  color: var(--text-primary);
}

.cart-item-qty button:hover {
  background: var(--gold);
  color: var(--midnight);
  transform: scale(1.15);
}

.cart-item-qty input {
  width: 60px;
  text-align: center;
  border: 1px solid var(--slate);
  border-radius: var(--radius-md);
  padding: 0.625rem;
  background: var(--charcoal);
  color: var(--text-primary);
}

.cart-summary {
  background: var(--gradient-card);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  border: 1px solid var(--glass-border);
}

.cart-summary h3 {
  margin-bottom: 1.75rem;
  color: var(--text-primary);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--slate);
  color: var(--text-secondary);
}

.cart-summary-row.total {
  font-size: 1.5rem;
  font-weight: 800;
  border-bottom: none;
  color: var(--gold);
}

.coupon-form {
  display: flex;
  gap: 0.625rem;
  margin: 1.25rem 0;
}

.cart-empty {
  text-align: center;
  padding: 5rem 2.5rem;
}

.cart-empty svg {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.75rem;
  color: var(--text-muted);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================================================
   CONTACTO - PREMIUM
   ============================================================================ */
.contact-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  transition: var(--transition-slow);
}

.contact-info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glass-shadow-lg);
  border-color: var(--glass-border-hover);
}

.contact-info-card .icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: var(--transition-bounce);
  border: 1px solid var(--glass-border);
}

.contact-info-card:hover .icon {
  transform: scale(1.15) rotate(-8deg);
  background: var(--gradient-gold);
  color: var(--midnight);
}

.contact-info-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.contact-info-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq-item {
  border: 1px solid var(--slate);
  border-radius: var(--radius-lg);
  margin-bottom: 0.625rem;
  overflow: hidden;
  transition: var(--transition-normal);
  background: var(--charcoal);
}

.faq-item:hover {
  border-color: var(--gold);
}

.faq-question {
  padding: 1.5rem;
  background: var(--charcoal);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
  color: var(--text-primary);
}

.faq-question:hover {
  background: var(--charcoal-light);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-smooth), padding 0.4s var(--ease-smooth);
  background: var(--midnight);
  color: var(--text-secondary);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

.faq-item.active .faq-question {
  background: var(--midnight);
  color: var(--gold);
}

.faq-icon {
  transition: transform 0.4s var(--ease-smooth);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.map-container {
  width: 100%;
  height: 450px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--glass-shadow-lg);
  border: 1px solid var(--glass-border);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table td {
  padding: 0.875rem;
  border-bottom: 1px solid var(--slate);
  color: var(--text-secondary);
}

.hours-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.hours-table .today {
  background: var(--gold-pale);
  color: var(--gold);
  font-weight: 700;
  border-radius: var(--radius-sm);
}

/* ============================================================================
   UTILITIES - PREMIUM
   ============================================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--text-primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.fw-bold { font-weight: 700; }

.mt-1 { margin-top: 0.625rem; }
.mt-2 { margin-top: 1.25rem; }
.mt-3 { margin-top: 1.75rem; }
.mt-4 { margin-top: 2.5rem; }

.mb-1 { margin-bottom: 0.625rem; }
.mb-2 { margin-bottom: 1.25rem; }
.mb-3 { margin-bottom: 1.75rem; }
.mb-4 { margin-bottom: 2.5rem; }

.p-3 { padding: 1.75rem; }

.gap-1 { gap: 0.625rem; }
.gap-2 { gap: 1.25rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-gold);
  color: var(--midnight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-slow);
  z-index: 90;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-6px) scale(1.1);
  box-shadow: var(--shadow-xl), var(--shadow-gold);
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 2.5rem;
  left: 2.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 90;
  transition: var(--transition-bounce);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.whatsapp-float:hover {
  transform: scale(1.15);
  background: #128C7E;
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--slate);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background: var(--charcoal);
}

.file-upload:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  transform: scale(1.02);
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload .icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  transition: var(--transition-bounce);
}

.file-upload:hover .icon {
  transform: scale(1.15);
  color: var(--gold);
}

.file-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 1.25rem;
}

.file-preview img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow);
}

/* Star Rating */
.star-rating {
  display: flex;
  gap: 0.375rem;
}

.star-rating .star {
  cursor: pointer;
  font-size: 1.75rem;
  color: var(--slate);
  transition: var(--transition-bounce);
}

.star-rating .star.active,
.star-rating .star:hover {
  color: var(--gold);
  transform: scale(1.2);
  text-shadow: 0 2px 8px var(--gold-glow);
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Print */
@media print {
  .header,
  .footer,
  .whatsapp-float,
  .scroll-top,
  .btn {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* ============================================================================
   ANIMACIONES GLOBALES PREMIUM
   ============================================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Loading spinner premium */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid var(--slate);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tooltip premium */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  padding: 0.625rem 1rem;
  background: var(--midnight);
  color: var(--text-primary);
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
  animation: slideUp 0.3s var(--ease-smooth);
}
/* ============================================================================
   SAN DE MOTOS - ENTERPRISE EXTENSIONS v1.0
   Compatible con style.css existente - Usa tus variables
   ============================================================================ */

/* ============================================================================
   1. MULTI-TENANCY & RBAC
   ============================================================================ */

/* Selector de Sucursal/Tenant */
.tenant-selector {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--gray-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}
.tenant-selector:hover {
  border-color: var(--gold);
  background: var(--gray-medium);
}
.tenant-selector .current-tenant {
  font-weight: 600;
  color: var(--gold);
}
.tenant-selector .dropdown-icon {
  margin-left: auto;
  transition: transform 0.2s ease;
}
.tenant-selector.active .dropdown-icon {
  transform: rotate(180deg);
}

/* Dropdown de Tenants */
.tenant-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--spacing-xs);
  min-width: 280px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-nav);
  backdrop-filter: var(--glass-blur);
  max-height: 400px;
  overflow-y: auto;
  animation: slideDown 0.2s ease;
}
.tenant-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--glass-border);
}
.tenant-option:last-child {
  border-bottom: none;
}
.tenant-option:hover,
.tenant-option.active {
  background: var(--glass-bg-hover);
  border-left: 3px solid var(--gold);
}
.tenant-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
  color: var(--black-deep);
  flex-shrink: 0;
}
.tenant-info {
  flex: 1;
  min-width: 0;
}
.tenant-name {
  font-weight: 600;
  color: var(--text-light);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tenant-role {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* Badges de Rol */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-superadmin {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--black-deep);
}
.role-admin {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.role-tech {
  background: var(--green-light);
  color: var(--green);
  border: 1px solid rgba(34, 199, 89, 0.3);
}
.role-viewer {
  background: var(--gray-medium);
  color: var(--text-muted);
  border: 1px solid var(--slate);
}
.role-client {
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* ============================================================================
   2. PANEL DE USUARIOS Y PERMISOS
   ============================================================================ */

.users-table {
  width: 100%;
  border-collapse: collapse;
}
.users-table th {
  background: var(--black-deep);
  color: var(--gold);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: left;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
}
.users-table td {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-light);
  vertical-align: middle;
}
.users-table tbody tr:hover {
  background: var(--glass-bg-light);
}
.user-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}
.user-row .user-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--gold);
}
.user-row .user-details {
  flex: 1;
}
.user-row .user-name {
  font-weight: 600;
  color: var(--text-light);
}
.user-row .user-email {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* Permisos Granulares - Toggle Switch */
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}
.permission-card {
  background: var(--gray-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
}
.permission-card:hover {
  border-color: var(--gold);
}
.permission-info h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}
.permission-info p {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin: 0;
}

/* Toggle Switch Premium */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gray-medium);
  border-radius: 26px;
  transition: var(--transition-fast);
}
.toggle-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition-fast);
}
input:checked + .toggle-slider {
  background: var(--gold);
}
input:checked + .toggle-slider::before {
  transform: translateX(22px);
}
input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   3. SEGURIDAD - 2FA & AUDITORÍA
   ============================================================================ */

/* Setup 2FA */
.two-factor-setup {
  text-align: center;
  padding: var(--spacing-xl);
}
.qr-container {
  display: inline-block;
  padding: var(--spacing-md);
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: var(--spacing-lg) 0;
  border: 3px solid var(--gold);
}
.qr-container img {
  width: 180px;
  height: 180px;
  display: block;
}
.two-factor-code {
  display: flex;
  gap: var(--spacing-xs);
  justify-content: center;
  margin: var(--spacing-lg) 0;
}
.two-factor-code input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--black-deep);
  color: var(--text-light);
  transition: var(--transition-fast);
}
.two-factor-code input:focus {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

/* Audit Logs Table */
.audit-log-entry {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition-fast);
}
.audit-log-entry:hover {
  background: var(--glass-bg-light);
}
.audit-log-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.audit-log-icon.create { background: var(--success-light); color: var(--success); }
.audit-log-icon.update { background: var(--info-light); color: var(--info); }
.audit-log-icon.delete { background: var(--danger-light); color: var(--danger); }
.audit-log-icon.login { background: var(--gold-pale); color: var(--gold); }
.audit-log-content {
  flex: 1;
}
.audit-log-content .action {
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}
.audit-log-content .details {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.audit-log-content .meta {
  display: flex;
  gap: var(--spacing-md);
  font-size: var(--font-size-xs);
  color: var(--text-disabled);
}
.audit-log-content .meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================================================
   4. PASARELAS DE PAGO - UI COMPONENTS
   ============================================================================ */

/* Payment Methods Grid */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}
.payment-method-card {
  background: var(--gray-dark);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
}
.payment-method-card:hover,
.payment-method-card.selected {
  border-color: var(--gold);
  background: var(--gold-pale);
  transform: translateY(-4px);
}
.payment-method-card.selected::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--gold);
  color: var(--black-deep);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.payment-method-card .icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  display: block;
}
.payment-method-card .name {
  font-weight: 600;
  color: var(--text-light);
  font-size: var(--font-size-sm);
}
.payment-method-card .description {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Invoice Card */
.invoice-card {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  transition: var(--transition-fast);
}
.invoice-card:hover {
  border-color: var(--gold);
  transform: translateX(4px);
}
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--glass-border);
}
.invoice-number {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--gold);
}
.invoice-status {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
}
.invoice-status.paid {
  background: var(--success-light);
  color: var(--success);
}
.invoice-status.pending {
  background: var(--warning-light);
  color: var(--warning);
}
.invoice-status.overdue {
  background: var(--danger-light);
  color: var(--danger);
}
.invoice-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}
.invoice-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.invoice-detail .label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.invoice-detail .value {
  font-weight: 600;
  color: var(--text-light);
}
.invoice-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--gold-pale);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--gold);
}
.invoice-total .label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}
.invoice-total .amount {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--gold);
}
.invoice-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--glass-border);
}

/* ============================================================================
   5. CONTROL DE SERVICIOS - MONITORING
   ============================================================================ */

/* Service Status Indicator */
.service-status {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.service-status.active {
  background: var(--success-light);
  color: var(--success);
}
.service-status.active::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.service-status.suspended {
  background: var(--warning-light);
  color: var(--warning);
}
.service-status.suspended::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--warning);
  border-radius: 50%;
}
.service-status.down {
  background: var(--danger-light);
  color: var(--danger);
}
.service-status.down::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}

/* Usage Chart Container */
.chart-container {
  background: var(--gray-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}
.chart-header h4 {
  color: var(--text-light);
  font-size: var(--font-size-lg);
}
.chart-controls {
  display: flex;
  gap: var(--spacing-xs);
}
.chart-controls button {
  padding: 0.375rem 0.75rem;
  background: var(--charcoal);
  border: 1px solid var(--slate);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: var(--transition-fast);
}
.chart-controls button.active,
.chart-controls button:hover {
  background: var(--gold);
  color: var(--midnight);
  border-color: var(--gold);
}
.chart-canvas {
  width: 100%;
  height: 200px;
  position: relative;
}

/* Device List */
.device-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}
.device-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--gray-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}
.device-item:hover {
  border-color: var(--gold);
}
.device-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.device-info {
  flex: 1;
}
.device-info .name {
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}
.device-info .details {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.device-actions {
  display: flex;
  gap: var(--spacing-xs);
}

/* ============================================================================
   6. SISTEMA DE TICKETS - SOPORTE
   ============================================================================ */

/* Ticket Card */
.ticket-card {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  transition: var(--transition-fast);
  cursor: pointer;
}
.ticket-card:hover {
  border-color: var(--gold);
  transform: translateX(4px);
}
.ticket-card:hover .ticket-actions {
  opacity: 1;
}
.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}
.ticket-id {
  font-weight: 700;
  color: var(--gold);
  font-size: var(--font-size-sm);
}
.ticket-priority {
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
}
.ticket-priority.low {
  background: var(--success-light);
  color: var(--success);
}
.ticket-priority.medium {
  background: var(--warning-light);
  color: var(--warning);
}
.ticket-priority.high {
  background: var(--danger-light);
  color: var(--danger);
}
.ticket-priority.critical {
  background: linear-gradient(135deg, var(--danger), var(--crimson));
  color: white;
  animation: pulse 2s ease-in-out infinite;
}
.ticket-title {
  font-weight: 600;
  color: var(--text-light);
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xs);
}
.ticket-description {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-md);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ticket-meta {
  display: flex;
  gap: var(--spacing-md);
  font-size: var(--font-size-xs);
  color: var(--text-disabled);
  margin-bottom: var(--spacing-md);
}
.ticket-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.ticket-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--glass-border);
}
.ticket-status {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
}
.ticket-status.open { color: var(--info); }
.ticket-status.in-progress { color: var(--warning); }
.ticket-status.resolved { color: var(--success); }
.ticket-actions {
  display: flex;
  gap: var(--spacing-xs);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.ticket-actions .btn-icon {
  width: 32px;
  height: 32px;
  font-size: var(--font-size-sm);
}

/* Ticket Progress Bar */
.ticket-progress {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin: var(--spacing-md) 0;
}
.progress-step {
  flex: 1;
  height: 4px;
  background: var(--slate);
  border-radius: var(--radius-full);
  position: relative;
}
.progress-step.completed {
  background: var(--success);
}
.progress-step.active {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}
.progress-step::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--charcoal);
  border: 2px solid var(--slate);
  border-radius: 50%;
}
.progress-step.completed::after,
.progress-step.active::after {
  background: var(--gold);
  border-color: var(--gold);
}

/* ============================================================================
   7. REPORTES & EXPORTS
   ============================================================================ */

/* Export Controls */
.export-controls {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--charcoal);
  border: 1px solid var(--slate);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}
.export-btn:hover {
  background: var(--gold);
  color: var(--midnight);
  border-color: var(--gold);
}
.export-btn i {
  font-size: var(--font-size-base);
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}
.kpi-card {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  transition: var(--transition-fast);
}
.kpi-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}
.kpi-card .icon {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
  display: block;
}
.kpi-card .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: var(--spacing-xs);
}
.kpi-card .label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi-card .trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--font-size-xs);
  margin-top: var(--spacing-xs);
}
.kpi-card .trend.up { color: var(--success); }
.kpi-card .trend.down { color: var(--danger); }

/* Filter Panel */
.filter-panel {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}
.filter-panel h4 {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-lg);
}
.filter-row {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: end;
}
.filter-row .form-group {
  flex: 1;
  min-width: 200px;
}
.filter-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

/* ============================================================================
   8. NOTIFICACIONES CENTRALIZADAS
   ============================================================================ */

/* Notification Bell */
.notification-bell {
  position: relative;
  cursor: pointer;
}
.notification-bell .badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--spacing-xs);
  width: 380px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow-lg);
  z-index: var(--z-notif-panel);
  max-height: 500px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.25s ease;
  backdrop-filter: var(--glass-blur-heavy);
}
.notification-dropdown .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}
.notification-dropdown .header h4 {
  color: var(--gold);
  font-size: var(--font-size-base);
  font-weight: 600;
}
.notification-dropdown .header .actions {
  display: flex;
  gap: var(--spacing-xs);
}
.notification-dropdown .header button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  cursor: pointer;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}
.notification-dropdown .header button:hover {
  color: var(--gold);
  background: var(--glass-bg-light);
}
.notification-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-sm);
}
.notification-item {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-xs);
}
.notification-item:last-child {
  border-bottom: none;
}
.notification-item:hover {
  background: var(--glass-bg-hover);
}
.notification-item.unread {
  background: var(--info-light);
  border-left: 3px solid var(--info);
}
.notification-item .content {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}
.notification-item .icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.notification-item .icon.payment { background: var(--success-light); color: var(--success); }
.notification-item .icon.alert { background: var(--warning-light); color: var(--warning); }
.notification-item .icon.security { background: var(--danger-light); color: var(--danger); }
.notification-item .icon.system { background: var(--info-light); color: var(--info); }
.notification-item .text {
  flex: 1;
  min-width: 0;
}
.notification-item .text .title {
  font-weight: 600;
  color: var(--text-light);
  font-size: var(--font-size-sm);
  margin-bottom: 0.25rem;
}
.notification-item .text .message {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.notification-item .text .time {
  font-size: var(--font-size-xs);
  color: var(--text-disabled);
}
.notification-dropdown .footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--glass-border);
  text-align: center;
}
.notification-dropdown .footer a {
  color: var(--gold);
  font-size: var(--font-size-sm);
  font-weight: 500;
}
.notification-dropdown .footer a:hover {
  text-decoration: underline;
}

/* ============================================================================
   9. UTILIDADES RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
  .permissions-grid {
    grid-template-columns: 1fr;
  }
  .invoice-details {
    grid-template-columns: 1fr;
  }
  .filter-row {
    flex-direction: column;
  }
  .filter-row .form-group {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .tenant-dropdown {
    width: calc(100vw - 2rem);
    right: 1rem;
  }
  .payment-methods {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-factor-code {
    flex-wrap: wrap;
  }
  .two-factor-code input {
    width: calc(20% - 4px);
  }
  .notification-dropdown {
    width: calc(100vw - 2rem);
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .payment-methods {
    grid-template-columns: 1fr;
  }
  .invoice-header {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  .invoice-actions {
    flex-direction: column;
  }
  .invoice-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Fuerza la barra negra a mantener una sola fila horizontal */
.header .container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    box-sizing: border-box;
}

/* Evita que el contenedor del logo se deforme o crezca de más */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 90px !important; /* Modifica esta altura para ajustar el tamaño del logo */
    width: auto;
    object-fit: contain;
}

/* Enlaces del menú centrados y alineados horizontalmente */
.nav-desktop {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    align-items: center !important;
}

/* Botones de acción de la derecha en una sola fila */
.header-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0;
}
/* ==========================================================================
   DISEÑO RESPONSIVO PARA EL HEADER
   ========================================================================== */

/* 1. Comportamiento en Computadoras y Pantallas Grandes */
@media (min-width: 769px) {
    /* Oculta el botón de hamburguesa en pantallas grandes */
    .hamburger {
        display: none !important;
    }
}

/* 2. Comportamiento en Celulares y Pantallas Pequeñas (Menos de 768px) */
@media (max-width: 768px) {
    .header .container {
        height: 60px !important; /* Barra un poco más delgada en celulares */
        padding: 0 15px !important;
    }

    /* Hace el logo un poco más pequeño para que no ocupe espacio de más */
    .logo-img {
        height: 90px !important;
    }

    /* ¡CLAVE! Oculta el menú de texto horizontal en el celular */
    .nav-desktop {
        display: none !important;
    }

    /* Oculta el texto del botón consultar si es muy largo, dejando solo el ícono si lo deseas */
    /* O si prefieres ocultar el botón de consultar entero en móvil, descomenta la siguiente línea: */
    /* .header-actions .btn-outline { display: none !important; } */

    /* Espaciado de los botones de la derecha en móvil */
    .header-actions {
        gap: 8px !important;
    }

    /* Asegura que el botón de hamburguesa se vea perfectamente en el celular */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }
}
