
    /* ═══════════════════════════════════════════
       VARIABLES GLOBALES
    ═══════════════════════════════════════════ */
    :root {
      --primary: #ffffff;
      --secondary: #f8f9fa;
      --accent: #7c3aed;
      --accent-dark: #5b21b6;
      --accent-light: #a78bfa;
      --accent-lighter: #ede9fe;
      --accent-bg: #f5f3ff;
      
      --feria: #7c3aed;
      --pena: #f59e0b;
      --evento: #ef4444;
      --puestero: #10b981;
      
      --text-primary: #1f2937;
      --text-secondary: #6b7280;
      --text-muted: #9ca3af;
      
      --border-color: #e5e7eb;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
      --shadow-lg: 0 10px 30px rgba(0,0,0,0.06);
      --shadow-xl: 0 20px 50px rgba(0,0,0,0.08);
      
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --radius-xl: 24px;
      
      --transition-fast: 0.2s cubic-bezier(0.4,0,0.2,1);
      --transition-base: 0.35s cubic-bezier(0.4,0,0.2,1);
      --transition-slow: 0.6s cubic-bezier(0.4,0,0.2,1);
      
      --font-heading: 'Poppins', sans-serif;
      --font-body: 'Inter', sans-serif;
      
      --focus-ring: 0 0 0 4px rgba(124,58,237,0.25);
      --header-height: 70px;
      --bottom-nav-height: 72px;
    }
    
    * { margin: 0; padding: 0; box-sizing: border-box; }
    
    html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
    
    body {
      font-family: var(--font-body);
      background: var(--primary);
      color: var(--text-primary);
      line-height: 1.6;
      overflow-x: hidden;
      font-size: 16px;
      padding-bottom: calc(var(--bottom-nav-height) + 20px);
      padding-top: var(--header-height);
    }
    
    ::selection { background: var(--accent); color: white; }
    
    /* ═══════════════════════════════════════════
       SPLASH SCREEN
    ═══════════════════════════════════════════ */
    #splashScreen {
      position: fixed; inset: 0;
      background: linear-gradient(145deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      z-index: 99999;
      transition: opacity 0.6s ease, transform 0.6s ease;
    }
    #splashScreen.hidden { opacity: 0; transform: scale(1.1); pointer-events: none; }
    
    .splash-logo {
      width: 110px; height: 110px; margin-bottom: 1.5rem;
      animation: splashPulse 2s ease-in-out infinite;
      background: rgba(255,255,255,0.15); border-radius: 50%; padding: 22px;
      backdrop-filter: blur(10px); border: 2px solid rgba(255,255,255,0.2);
    }
    .splash-logo img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
    
    @keyframes splashPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
    
    .splash-text h1 { color: white; font-size: 2.4rem; font-weight: 900; letter-spacing: -1px; }
    .splash-text p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-top: 0.5rem; }
    
    .splash-progress { width: 200px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; margin-top: 2rem; overflow: hidden; }
    .splash-progress-bar { height: 100%; width: 0%; background: white; border-radius: 2px; animation: splashProgress 2s ease-in-out forwards; }
    @keyframes splashProgress { 0% { width: 0%; } 100% { width: 100%; } }
    
    /* ═══════════════════════════════════════════
       HEADER CON CLIMA
    ═══════════════════════════════════════════ */
    #mainHeader {
      position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
      background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
      border-bottom: 1px solid rgba(229,231,235,0.5); height: var(--header-height);
      display: flex; align-items: center; padding: 0 1rem;
      transition: all var(--transition-base);
    }
    #mainHeader.scrolled { box-shadow: var(--shadow-md); }
    
    .header-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; flex-shrink: 0; }
    .header-brand img { height: 42px; width: 42px; object-fit: contain; border-radius: 12px; }
    .header-brand span { font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem; color: var(--accent); letter-spacing: -0.3px; }
    .header-brand small { display: block; font-size: 0.6rem; font-weight: 500; color: var(--text-muted); margin-top: -2px; letter-spacing: 0.5px; text-transform: uppercase; }
    
    .header-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
    .header-btn {
      width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--secondary);
      color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
      transition: all var(--transition-fast); cursor: pointer; position: relative;
    }
    .header-btn:hover { background: var(--accent-lighter); color: var(--accent); transform: scale(1.08); }
    .header-btn .badge-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; border: 2px solid white; animation: pulseBadge 2s infinite; }
    @keyframes pulseBadge { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
    
    .header-search {
      position: relative; margin-left: 1rem; flex: 1; max-width: 400px;
    }
    .header-search input {
      width: 100%; padding: 0.5rem 1rem 0.5rem 2.5rem; border-radius: 20px; border: 1.5px solid var(--border-color);
      background: var(--secondary); font-size: 0.85rem; transition: all var(--transition-fast);
      font-family: var(--font-body);
    }
    .header-search input:focus { border-color: var(--accent); background: white; box-shadow: var(--focus-ring); }
    .header-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.8rem; }
    
    .weather-widget {
      display: flex; align-items: center; gap: 0.3rem; font-size: 0.75rem;
      color: var(--text-secondary); padding: 0.2rem 0.6rem;
      background: var(--secondary); border-radius: 20px;
      margin-right: 0.5rem; white-space: nowrap;
    }
    .weather-widget i { color: var(--accent); }
    .weather-widget .temp { font-weight: 700; color: var(--text-primary); }
    
    /* ═══════════════════════════════════════════
       BOTTOM NAV
    ═══════════════════════════════════════════ */
    #bottomNav {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
      background: rgba(255,255,255,0.95); backdrop-filter: blur(16px);
      border-top: 1px solid rgba(229,231,235,0.5); height: var(--bottom-nav-height);
      display: flex; align-items: center; justify-content: space-around; padding: 0 0.5rem;
      box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    }
    .nav-item {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 2px; padding: 0.3rem 0.6rem; border: none; background: transparent;
      color: var(--text-muted); font-size: 0.6rem; font-weight: 600; cursor: pointer;
      transition: all var(--transition-fast); position: relative; text-decoration: none;
      min-width: 52px; border-radius: var(--radius-md);
    }
    .nav-item i { font-size: 1.3rem; transition: all var(--transition-fast); }
    .nav-item span { font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
    .nav-item:hover { color: var(--text-primary); }
    .nav-item.active { color: var(--accent); }
    .nav-item.active i { transform: translateY(-2px); }
    .nav-item.active::before {
      content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
      width: 24px; height: 3px; background: var(--accent); border-radius: 0 0 2px 2px;
    }
    .nav-item .nav-badge { position: absolute; top: 2px; right: 2px; background: #ef4444; color: white; font-size: 0.5rem; font-weight: 700; padding: 1px 5px; border-radius: 10px; min-width: 16px; text-align: center; }
    
    /* ═══════════════════════════════════════════
       ONBOARDING
    ═══════════════════════════════════════════ */
    #onboardingOverlay {
      position: fixed; inset: 0; z-index: 99998;
      background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
      display: none; align-items: center; justify-content: center;
      padding: 1.5rem;
    }
    #onboardingOverlay.show { display: flex; }
    
    .onboarding-card {
      background: var(--primary); border-radius: var(--radius-xl);
      max-width: 400px; width: 100%; padding: 2rem 1.5rem;
      text-align: center; box-shadow: var(--shadow-xl);
      animation: onbounce 0.5s ease forwards;
    }
    @keyframes onbounce { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
    
    .onboarding-card .step-icon { font-size: 4rem; margin-bottom: 1rem; display: block; }
    .onboarding-card h3 { font-family: var(--font-heading); font-weight: 700; }
    .onboarding-card p { color: var(--text-secondary); font-size: 0.95rem; }
    .onboarding-dots { display: flex; justify-content: center; gap: 0.5rem; margin: 1.5rem 0; }
    .onboarding-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-color); transition: all var(--transition-fast); }
    .onboarding-dots .dot.active { background: var(--accent); width: 28px; border-radius: 5px; }
    
    .btn-onboarding {
      padding: 0.75rem 2rem; border: none; border-radius: var(--radius-md);
      background: var(--accent); color: white; font-weight: 700; font-size: 1rem;
      cursor: pointer; transition: all var(--transition-fast); width: 100%;
    }
    .btn-onboarding:hover { background: var(--accent-dark); transform: scale(1.02); }
    
    /* ═══════════════════════════════════════════
       SECCIONES
    ═══════════════════════════════════════════ */
    .page-section { display: none; animation: pageFadeIn 0.4s ease forwards; }
    .page-section.active { display: block; padding: 1rem;}
    @keyframes pageFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
    
    .section-header { padding: 1rem 0 0.5rem; margin-bottom: 1.5rem; text-align:center;}
    .section-header h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; text-align:center;}
    .section-header h2 i { color: var(--accent); margin-right: 0.5rem; text-align:center;}
    .section-header p { color: var(--text-secondary); font-size: 0.95rem; margin-top: 0.25rem;text-align:center; }
    
    /* ═══════════════════════════════════════════
       HERO BANNER CON STORIES
    ═══════════════════════════════════════════ */
    .hero-banner {
      background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
      border-radius: var(--radius-xl); padding: 2rem; margin-bottom: 1.5rem;
      color: white; position: relative; overflow: hidden;
    }
    .hero-banner::before {
      content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px;
      background: rgba(255,255,255,0.1); border-radius: 50%;
    }
    .hero-banner h3 { color: white; font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; }
    .hero-banner p { color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-bottom: 1rem; }
    .hero-banner .btn-hero {
      background: white; color: var(--accent); border: none; padding: 0.6rem 1.5rem;
      border-radius: var(--radius-md); font-weight: 700; font-size: 0.85rem; cursor: pointer;
      transition: all var(--transition-fast);
    }
    .hero-banner .btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
    
    /* Stories / Destacados */
    .stories-container {
      display: flex; gap: 0.75rem; overflow-x: auto; padding: 0.5rem 0 1rem;
      scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .stories-container::-webkit-scrollbar { display: none; }
    .story-item {
      flex-shrink: 0; width: 80px; text-align: center; cursor: pointer;
      transition: all var(--transition-fast);
    }
    .story-item:hover { transform: translateY(-4px); }
    .story-avatar {
      width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 0.3rem;
      border: 3px solid var(--accent); padding: 3px;
      display: flex; align-items: center; justify-content: center;
      overflow: hidden;
    }
    .story-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
    .story-avatar .emoji { font-size: 2.2rem; background: var(--secondary); border-radius: 50%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
    .story-item .story-name { font-size: 0.6rem; color: var(--text-secondary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
    
    /* ═══════════════════════════════════════════
       STATS BAR
    ═══════════════════════════════════════════ */
    .stats-bar {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.5rem;
    }
    .stat-item {
      text-align: center; padding: 1rem 0.5rem; background: var(--secondary);
      border-radius: var(--radius-md); border: 1px solid var(--border-color);
      transition: all var(--transition-fast); cursor: pointer;
    }
    .stat-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent-light); }
    .stat-item .number { font-size: 1.6rem; font-weight: 800; font-family: var(--font-heading); display: block; }
    .stat-item .label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
    .stat-item.feria .number { color: var(--feria); }
    .stat-item.pena .number { color: var(--pena); }
    .stat-item.evento .number { color: var(--evento); }
    .stat-item.gratis .number { color: var(--puestero); }
    
    /* ═══════════════════════════════════════════
       FILTROS AVANZADOS
    ═══════════════════════════════════════════ */
    .filter-scroll {
      display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.5rem 0 1rem;
      scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .filter-scroll::-webkit-scrollbar { display: none; }
    .filter-chip {
      flex-shrink: 0; padding: 0.5rem 1.1rem; border-radius: 24px; border: 2px solid var(--border-color);
      background: transparent; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
      cursor: pointer; transition: all var(--transition-fast); white-space: nowrap;
      font-family: var(--font-body); display: flex; align-items: center; gap: 0.4rem;
    }
    .filter-chip:hover { border-color: var(--accent-light); color: var(--accent); }
    .filter-chip.active { background: var(--accent); border-color: var(--accent); color: white; }
    .filter-chip i { font-size: 0.75rem; }
    
    .filters-panel {
      background: var(--secondary); border-radius: var(--radius-lg);
      padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--border-color);
      display: none; animation: slideDown 0.3s ease forwards;
    }
    .filters-panel.open { display: block; }
    @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
    
    .filter-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
    .filter-group label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); width: 100%; }
    .filter-option {
      padding: 0.3rem 0.8rem; border-radius: 16px; border: 1.5px solid var(--border-color);
      background: var(--primary); font-size: 0.7rem; font-weight: 500; cursor: pointer;
      transition: all var(--transition-fast); color: var(--text-secondary);
    }
    .filter-option:hover { border-color: var(--accent-light); color: var(--accent); }
    .filter-option.active { background: var(--accent); border-color: var(--accent); color: white; }
    
    .filter-range { display: flex; align-items: center; gap: 0.5rem; }
    .filter-range input[type="range"] { flex: 1; accent-color: var(--accent); }
    .filter-range span { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); min-width: 40px; }
    
    /* ═══════════════════════════════════════════
       TARJETAS DE EVENTOS
    ═══════════════════════════════════════════ */
    .event-card {
      background: var(--primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
      overflow: hidden; transition: all var(--transition-base); height: 100%; box-shadow: var(--shadow-sm);
      cursor: pointer; position: relative;
    }
    .event-card:hover { transform: translateY(-5px); border-color: var(--accent-light); box-shadow: var(--shadow-lg); }
    .event-card-img { height: 170px; width: 100%; object-fit: cover; display: block; }
    .event-card .card-body { padding: 1.25rem; }
    .event-card .card-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; font-family: var(--font-heading); }
    .event-card .card-text { font-size: 0.85rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    
    .event-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.75rem; color: var(--text-muted); }
    .event-meta i { width: 16px; text-align: center; }
    
    .event-tag {
      display: inline-flex; align-items: center; gap: 0.2rem;
      padding: 0.25rem 0.7rem; border-radius: 20px; font-size: 0.65rem;
      font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
    }
    .event-tag.feria { background: var(--accent-lighter); color: var(--feria); }
    .event-tag.pena { background: #fef3c7; color: #92400e; }
    .event-tag.evento { background: #fecaca; color: #991b1b; }
    .event-tag.gratis { background: #dcfce7; color: #166534; }
    .event-tag.destacado { background: #fef3c7; color: #92400e; }
    .event-tag.puestero { background: #d1fae5; color: #065f46; }
    .event-tag.cerca { background: #dbeafe; color: #1e40af; }
    .event-tag.abierto { background: #dcfce7; color: #166534; }
    .event-tag.cerrado { background: #fecaca; color: #991b1b; }
    
    .card-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; flex-wrap: wrap; gap: 0.3rem; }
    .card-actions .location-text { font-size: 0.7rem; color: var(--text-muted); }
    
    .btn-fav {
      padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.7rem; font-weight: 600;
      border: 1.5px solid var(--border-color); background: transparent; color: var(--text-secondary);
      cursor: pointer; transition: all var(--transition-fast); display: flex; align-items: center; gap: 0.3rem;
    }
    .btn-fav:hover { border-color: var(--accent); color: var(--accent); }
    .btn-fav.active { background: var(--accent); border-color: var(--accent); color: white; }
    
    .btn-asistir {
      padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.7rem; font-weight: 600;
      border: 1.5px solid var(--puestero); background: transparent; color: var(--puestero);
      cursor: pointer; transition: all var(--transition-fast);
    }
    .btn-asistir:hover { background: var(--puestero); color: white; }
    .btn-asistir.confirmado { background: var(--puestero); color: white; }
    
    .distancia-badge {
      display: inline-flex; align-items: center; gap: 0.2rem;
      padding: 0.15rem 0.5rem; border-radius: 12px; font-size: 0.6rem; font-weight: 600;
      background: var(--secondary); color: var(--text-secondary);
    }
    .distancia-badge.cerca { background: #d1fae5; color: #065f46; }
    .distancia-badge.media { background: #fef3c7; color: #92400e; }
    .distancia-badge.lejos { background: #fecaca; color: #991b1b; }
    
    .social-counter {
      display: flex; align-items: center; gap: 0.3rem;
      font-size: 0.65rem; color: var(--text-muted); margin-top: 0.5rem;
    }
    .social-counter .avatars { display: flex; }
    .social-counter .avatars span {
      width: 20px; height: 20px; border-radius: 50%; background: var(--accent-lighter);
      border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center;
      font-size: 0.5rem; margin-right: -6px; color: var(--accent); font-weight: 700;
    }
    .social-counter .avatars span:last-child { margin-right: 0; }
    .social-counter .count { font-weight: 600; color: var(--text-primary); }
    
    /* ═══════════════════════════════════════════
       ESTRELLAS DE VALORACIÓN
    ═══════════════════════════════════════════ */
    .stars {
      display: inline-flex; gap: 0.1rem; font-size: 0.8rem; cursor: pointer;
    }
    .stars .star { color: #d1d5db; transition: all var(--transition-fast); }
    .stars .star.active { color: #fbbf24; }
    .stars .star:hover { transform: scale(1.2); }
    
    .rating-summary {
      display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem;
    }
    .rating-summary .avg { font-weight: 700; color: var(--text-primary); }
    .rating-summary .count { color: var(--text-muted); font-size: 0.7rem; }
    
    /* ═══════════════════════════════════════════
       MAPA CON MARCADOR DE USUARIO
    ═══════════════════════════════════════════ */
    #mapContainer {
      height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 120px);
      min-height: 400px; border-radius: var(--radius-lg); overflow: hidden;
      box-shadow: var(--shadow-md); border: 1px solid var(--border-color);
      position: relative; background: var(--secondary);
    }
    #mapContainer .leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-md) !important; }
    #mapContainer .leaflet-control-zoom a {
      background: white !important; color: var(--text-primary) !important; border: none !important;
      border-radius: 8px !important; width: 38px !important; height: 38px !important;
      line-height: 38px !important; margin: 2px !important; transition: all var(--transition-fast);
    }
    #mapContainer .leaflet-control-zoom a:hover { background: var(--accent-lighter) !important; color: var(--accent) !important; }
    
    .map-controls {
      position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000;
      display: flex; gap: 0.4rem; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
      padding: 0.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
      border: 1px solid rgba(255,255,255,0.3); flex-wrap: wrap; justify-content: center; max-width: 90%;
    }
    .map-control-btn {
      padding: 0.4rem 1rem; border: none; border-radius: var(--radius-sm); font-size: 0.75rem;
      font-weight: 600; cursor: pointer; transition: all var(--transition-fast); color: var(--text-secondary);
      background: transparent; display: flex; align-items: center; gap: 0.3rem;
    }
    .map-control-btn:hover { background: var(--accent-lighter); color: var(--accent); }
    .map-control-btn.active { background: var(--accent); color: white; }
    
    .user-marker-label {
      background: white; padding: 0.2rem 0.6rem; border-radius: 12px;
      font-size: 0.7rem; font-weight: 600; box-shadow: var(--shadow-sm);
      border: 2px solid #3b82f6; color: #1f2937;
    }
    
    /* ═══════════════════════════════════════════
       PUESTEROS CON BOTÓN WEB
    ═══════════════════════════════════════════ */
    .puestero-card {
      background: var(--primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
      overflow: hidden; transition: all var(--transition-base); box-shadow: var(--shadow-sm);
    }
    .puestero-card:hover { transform: translateY(-4px); border-color: var(--puestero); box-shadow: var(--shadow-lg); }
    .puestero-header {
      padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
      background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    }
    .puestero-avatar {
      width: 64px; height: 64px; border-radius: 50%; background: white;
      display: flex; align-items: center; justify-content: center; font-size: 2rem;
      box-shadow: var(--shadow-sm); flex-shrink: 0;
    }
    .puestero-info h5 { font-size: 1rem; margin-bottom: 0.2rem; }
    .badge-membresia {
      display: inline-flex; align-items: center; gap: 0.2rem;
      padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.6rem; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.5px;
    }
    .badge-membresia.premium { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
    .badge-membresia.basic { background: var(--accent-lighter); color: var(--accent); }
    .badge-membresia.free { background: #e5e7eb; color: #6b7280; }
    
    .puestero-body { padding: 1rem 1.25rem; }
    .puestero-products { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
    .product-chip {
      padding: 0.25rem 0.6rem; border-radius: 12px; font-size: 0.7rem; font-weight: 500;
      background: var(--secondary); color: var(--text-secondary); border: 1px solid var(--border-color);
    }
    .puestero-footer {
      padding: 0.75rem 1.25rem; border-top: 1px solid var(--border-color);
      display: flex; gap: 0.5rem; flex-wrap: wrap;
    }
    .btn-contact {
      flex: 1; min-width: 80px; padding: 0.5rem; border-radius: var(--radius-sm);
      font-size: 0.7rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast);
      border: none; display: flex; align-items: center; justify-content: center; gap: 0.3rem;
    }
    .btn-whatsapp { background: #25d366; color: white; }
    .btn-whatsapp:hover { background: #128c7e; transform: translateY(-1px); }
    .btn-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; }
    .btn-instagram:hover { opacity: 0.9; transform: translateY(-1px); }
    .btn-maps { background: var(--accent); color: white; }
    .btn-maps:hover { background: var(--accent-dark); transform: translateY(-1px); }
    .btn-web { background: #3b82f6; color: white; }
    .btn-web:hover { background: #2563eb; transform: translateY(-1px); }
    
    /* ═══════════════════════════════════════════
       DETALLE DE FERIA CON PUESTOS
    ═══════════════════════════════════════════ */
    .feria-detalle-banner {
      background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
      border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.5rem;
      color: white; position: relative; overflow: hidden;
    }
    .feria-detalle-banner::before {
      content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px;
      background: rgba(255,255,255,0.1); border-radius: 50%;
    }
    .feria-detalle-banner h3 { color: white; font-size: 1.5rem; font-weight: 800; }
    .feria-detalle-banner p { color: rgba(255,255,255,0.85); }
    .feria-detalle-banner .feria-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
    .feria-detalle-banner .feria-meta span { background: rgba(255,255,255,0.15); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; }
    
    .puesto-mini-card {
      background: var(--primary); border: 1px solid var(--border-color); border-radius: var(--radius-md);
      padding: 1rem; transition: all var(--transition-fast); display: flex; align-items: center; gap: 1rem;
    }
    .puesto-mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--puestero); }
    .puesto-mini-card .puesto-avatar { font-size: 2rem; width: 48px; height: 48px; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .puesto-mini-card .puesto-info { flex: 1; }
    .puesto-mini-card .puesto-info h6 { font-size: 0.9rem; margin-bottom: 0.1rem; }
    .puesto-mini-card .puesto-info small { color: var(--text-muted); font-size: 0.7rem; }
    .puesto-mini-card .puesto-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
    .puesto-mini-card .puesto-actions .btn-sm { padding: 0.2rem 0.6rem; font-size: 0.65rem; border-radius: var(--radius-sm); border: none; font-weight: 600; cursor: pointer; }
    
    /* ═══════════════════════════════════════════
       BOTTOM SHEET
    ═══════════════════════════════════════════ */
    .bottom-sheet {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
      background: var(--primary); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
      box-shadow: var(--shadow-xl); max-height: 90vh;
      transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
      overflow-y: auto; display: none;
    }
    .bottom-sheet.open { transform: translateY(0); display: block; }
    .bottom-sheet .sheet-handle {
      width: 40px; height: 4px; border-radius: 2px; background: var(--border-color);
      margin: 12px auto 8px; cursor: pointer;
    }
    .bottom-sheet .sheet-content { padding: 0 1.25rem 1.25rem; }
    .bottom-sheet .sheet-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 0.5rem 1.25rem; border-bottom: 1px solid var(--border-color);
    }
    .bottom-sheet .sheet-header h5 { font-family: var(--font-heading); font-weight: 700; margin: 0; }
    .bottom-sheet .sheet-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 0.3rem; }
    
    .sheet-overlay {
      position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,0.5);
      display: none; opacity: 0; transition: opacity 0.3s ease;
    }
    .sheet-overlay.show { display: block; opacity: 1; }
    
    /* ═══════════════════════════════════════════
       PLANES / MEMBRESÍAS
    ═══════════════════════════════════════════ */
    .plan-card {
      background: var(--primary); border: 2px solid var(--border-color); border-radius: var(--radius-xl);
      padding: 2rem 1.5rem; text-align: center; transition: all var(--transition-base); position: relative;
    }
    .plan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
    .plan-card.recommended { border-color: var(--accent); }
    .plan-card.recommended::before {
      content: 'RECOMENDADO'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
      background: var(--accent); color: white; padding: 0.3rem 1rem; border-radius: 20px;
      font-size: 0.65rem; font-weight: 700; letter-spacing: 0.5px;
    }
    .plan-card .plan-icon { font-size: 3rem; margin-bottom: 1rem; }
    .plan-card h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }
    .plan-card .plan-price { font-size: 2.5rem; font-weight: 800; color: var(--accent); font-family: var(--font-heading); }
    .plan-card .plan-price span { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
    .plan-card ul { list-style: none; padding: 0; margin: 1.5rem 0; text-align: left; }
    .plan-card ul li { padding: 0.4rem 0; font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; }
    .plan-card ul li i { color: var(--accent); font-size: 0.8rem; }
    .btn-plan {
      width: 100%; padding: 0.75rem; border: none; border-radius: var(--radius-md);
      background: var(--accent); color: white; font-weight: 700; font-size: 0.9rem;
      cursor: pointer; transition: all var(--transition-fast);
    }
    .btn-plan:hover { background: var(--accent-dark); transform: scale(1.02); }
    .btn-plan-outline {
      width: 100%; padding: 0.75rem; border: 2px solid var(--accent); border-radius: var(--radius-md);
      background: transparent; color: var(--accent); font-weight: 700; font-size: 0.9rem;
      cursor: pointer; transition: all var(--transition-fast);
    }
    .btn-plan-outline:hover { background: var(--accent); color: white; }
    
    /* ═══════════════════════════════════════════
       CALENDARIO
    ═══════════════════════════════════════════ */
    .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
    .calendar-day-header { text-align: center; font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; padding: 0.5rem 0; }
    .calendar-day {
      aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
      border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600; cursor: pointer;
      transition: all var(--transition-fast); border: 1.5px solid transparent; position: relative;
      background: var(--secondary);
    }
    .calendar-day:hover { background: var(--accent-lighter); border-color: var(--accent-light); }
    .calendar-day.today { background: var(--accent); color: white; }
    .calendar-day.has-event::after {
      content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px;
      border-radius: 50%; background: var(--accent);
    }
    .calendar-day.other-month { color: var(--text-muted); opacity: 0.5; }
    .calendar-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
    .calendar-nav h5 { font-size: 1rem; margin: 0; }
    .calendar-nav button { background: none; border: none; color: var(--accent); font-size: 1.2rem; cursor: pointer; padding: 0.3rem 0.8rem; border-radius: var(--radius-sm); }
    .calendar-nav button:hover { background: var(--accent-lighter); }
    
    /* ═══════════════════════════════════════════
       TOASTS
    ═══════════════════════════════════════════ */
    .toast-container {
      position: fixed; top: calc(var(--header-height) + 16px); right: 16px; z-index: 99999;
      display: flex; flex-direction: column; gap: 0.5rem; max-width: 360px; width: 100%; pointer-events: none;
    }
    .toast-message {
      pointer-events: auto; background: var(--primary); border-radius: var(--radius-md);
      padding: 1rem 1.25rem; box-shadow: var(--shadow-xl); border-left: 4px solid var(--accent);
      animation: slideInToast 0.4s ease forwards; display: flex; align-items: center; gap: 0.75rem;
      border: 1px solid var(--border-color);
    }
    .toast-message.hiding { animation: slideOutToast 0.3s ease forwards; }
    @keyframes slideInToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
    @keyframes slideOutToast { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
    .toast-message .toast-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.9rem; }
    .toast-message .toast-icon.success { background: #dcfce7; color: #166534; }
    .toast-message .toast-icon.error { background: #fecaca; color: #991b1b; }
    .toast-message .toast-icon.info { background: var(--accent-lighter); color: var(--accent); }
    .toast-message .toast-title { font-weight: 600; font-size: 0.9rem; }
    
    /* ═══════════════════════════════════════════
       INSTALAR PWA
    ═══════════════════════════════════════════ */
    .install-banner {
      position: fixed; bottom: calc(var(--bottom-nav-height) + 16px); left: 16px; right: 16px; z-index: 900;
      background: var(--accent); color: white; border-radius: var(--radius-lg); padding: 1rem 1.25rem;
      box-shadow: var(--shadow-xl); display: none; align-items: center; gap: 1rem;
      animation: slideUpBanner 0.5s ease forwards;
    }
    .install-banner.show { display: flex; }
    @keyframes slideUpBanner { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
    .install-banner-icon { width: 48px; height: 48px; background: rgba(255,255,255,0.2); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
    .install-banner-content { flex: 1; }
    .install-banner-content h4 { font-size: 0.95rem; color: white; margin: 0; font-weight: 600; }
    .install-banner-content p { font-size: 0.75rem; opacity: 0.8; margin: 0; }
    .btn-close-banner { background: rgba(255,255,255,0.2); border: none; color: white; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 0.8rem; transition: all var(--transition-fast); }
    .btn-close-banner:hover { background: rgba(255,255,255,0.3); }
    .btn-install { padding: 0.5rem 1.25rem; border: none; border-radius: var(--radius-sm); background: white; color: var(--accent); font-weight: 700; font-size: 0.8rem; cursor: pointer; transition: all var(--transition-fast); }
    .btn-install:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
    
    /* ═══════════════════════════════════════════
       SKELETON LOADING
    ═══════════════════════════════════════════ */
    .skeleton-card {
      background: var(--secondary); border-radius: var(--radius-lg); overflow: hidden; height: 100%;
      border: 1px solid var(--border-color);
    }
    .skeleton-img { height: 170px; background: var(--border-color); }
    .skeleton-text { height: 16px; background: var(--border-color); border-radius: 4px; margin: 0.5rem 0; }
    .skeleton-text.short { width: 60%; }
    .skeleton-text.long { width: 80%; }
    .shimmer {
      background: linear-gradient(90deg, var(--border-color) 25%, var(--secondary) 50%, var(--border-color) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
    }
    @keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
    
    /* ═══════════════════════════════════════════
       NO RESULTS
    ═══════════════════════════════════════════ */
    .no-results { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
    .no-results i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
    
    /* ═══════════════════════════════════════════
       TABS
    ═══════════════════════════════════════════ */
    .custom-tabs {
      display: flex; gap: 0.25rem; background: var(--secondary); padding: 0.3rem;
      border-radius: var(--radius-md); margin-bottom: 1.5rem; flex-wrap: wrap;
    }
    .custom-tab {
      flex: 1; padding: 0.6rem; border: none; border-radius: var(--radius-sm); background: transparent;
      color: var(--text-secondary); font-size: 0.8rem; font-weight: 600; cursor: pointer;
      transition: all var(--transition-fast); text-align: center; min-width: 60px;
    }
    .custom-tab:hover { color: var(--text-primary); }
    .custom-tab.active { background: white; color: var(--accent); box-shadow: var(--shadow-sm); }
    
    /* ═══════════════════════════════════════════
       NOTIFICACIONES INBOX
    ═══════════════════════════════════════════ */
    .notif-item {
      display: flex; gap: 0.75rem; padding: 0.75rem 0;
      border-bottom: 1px solid var(--border-color);
    }
    .notif-item:last-child { border-bottom: none; }
    .notif-item .notif-icon { font-size: 1.2rem; flex-shrink: 0; }
    .notif-item .notif-content { flex: 1; }
    .notif-item .notif-content .title { font-weight: 600; font-size: 0.9rem; }
    .notif-item .notif-content .text { font-size: 0.8rem; color: var(--text-secondary); }
    .notif-item .notif-content .time { font-size: 0.65rem; color: var(--text-muted); }
    
    .notif-badge-count {
      background: #ef4444; color: white; font-size: 0.5rem; font-weight: 700;
      padding: 1px 5px; border-radius: 10px; min-width: 16px; text-align: center;
      position: absolute; top: 2px; right: 2px;
    }
    
    /* ═══════════════════════════════════════════
       GESTIÓN DE DATOS - CARGA JSON
    ═══════════════════════════════════════════ */
    .data-manager {
      background: var(--secondary); border-radius: var(--radius-lg);
      padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid var(--border-color);
    }
    .data-manager h5 { font-family: var(--font-heading); font-weight: 700; margin-bottom: 0.5rem; }
    .data-manager .file-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; margin-top: 0.75rem;
    }
    .data-manager .file-btn {
      padding: 0.5rem 1rem; border: 2px solid var(--border-color); border-radius: var(--radius-md);
      background: var(--primary); cursor: pointer; transition: all var(--transition-fast);
      display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.8rem;
    }
    .data-manager .file-btn:hover { border-color: var(--accent); background: var(--accent-bg); transform: translateY(-2px); }
    .data-manager .file-btn .icon { font-size: 1.2rem; }
    .data-manager .file-btn .badge-data { font-size: 0.6rem; background: var(--accent-lighter); color: var(--accent); padding: 0.1rem 0.5rem; border-radius: 10px; margin-left: auto; }
    .data-manager .file-btn.loaded { border-color: var(--puestero); background: #ecfdf5; }
    .data-manager .file-btn.loading { opacity: 0.6; pointer-events: none; }
    .data-manager .file-btn.loading::after { content: '...'; animation: dots 1s steps(3) infinite; }
    @keyframes dots { 0% { content: '.'; } 33% { content: '..'; } 66% { content: '...'; } }
    
    .data-status {
      display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem;
      font-size: 0.8rem; color: var(--text-secondary);
    }
    .data-status .dot {
      width: 8px; height: 8px; border-radius: 50%; display: inline-block;
    }
    .data-status .dot.success { background: var(--puestero); }
    .data-status .dot.warning { background: #f59e0b; }
    .data-status .dot.error { background: #ef4444; }
    
    /* ═══════════════════════════════════════════
       FORMULARIO CON ENVÍO WHATSAPP
    ═══════════════════════════════════════════ */
    .form-input {
      width: 100%; padding: 0.6rem 0.8rem; border: 2px solid var(--border-color);
      border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.9rem;
      background: var(--primary); color: var(--text-primary); transition: all var(--transition-fast);
    }
    .form-input:focus { border-color: var(--accent); outline: none; box-shadow: var(--focus-ring); }
    .form-group { margin-bottom: 0.75rem; }
    .form-group label { font-weight: 600; font-size: 0.8rem; color: var(--text-secondary); display: block; margin-bottom: 0.2rem; }
    

    /* ═══════════════════════════════════════════
       ANIMACIONES PREMIUM
    ═══════════════════════════════════════════ */

    /* ─── Keyframes ─── */
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(30px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeInDown {
      from { opacity: 0; transform: translateY(-20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeInScale {
      from { opacity: 0; transform: scale(0.9); }
      to { opacity: 1; transform: scale(1); }
    }
    @keyframes slideInRight {
      from { opacity: 0; transform: translateX(40px); }
      to { opacity: 1; transform: translateX(0); }
    }
    @keyframes slideInLeft {
      from { opacity: 0; transform: translateX(-40px); }
      to { opacity: 1; transform: translateX(0); }
    }
    @keyframes pulseGlow {
      0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
      50% { box-shadow: 0 0 20px 8px rgba(124,58,237,0.15); }
    }
    @keyframes float {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-8px); }
    }
    @keyframes shimmer {
      0% { background-position: -200% 0; }
      100% { background-position: 200% 0; }
    }
    @keyframes countUp {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes ripple {
      0% { transform: scale(0); opacity: 0.5; }
      100% { transform: scale(4); opacity: 0; }
    }
    @keyframes rotateIn {
      from { transform: rotate(-180deg) scale(0); opacity: 0; }
      to { transform: rotate(0) scale(1); opacity: 1; }
    }
    @keyframes bounceIn {
      0% { transform: scale(0.3); opacity: 0; }
      50% { transform: scale(1.05); }
      70% { transform: scale(0.9); }
      100% { transform: scale(1); opacity: 1; }
    }
    @keyframes gradientShift {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }
    @keyframes typing {
      from { width: 0; }
      to { width: 100%; }
    }
    @keyframes blink {
      50% { border-color: transparent; }
    }
    @keyframes iconPop {
      0% { transform: scale(1); }
      50% { transform: scale(1.3) rotate(10deg); }
      100% { transform: scale(1); }
    }
    @keyframes cardLift {
      0% { transform: translateY(0); box-shadow: var(--shadow-sm); }
      100% { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(124,58,237,0.15); }
    }
    @keyframes numberRoll {
      0% { transform: translateY(20px); opacity: 0; }
      100% { transform: translateY(0); opacity: 1; }
    }
    @keyframes heroWave {
      0% { transform: translateX(0) translateY(0); }
      50% { transform: translateX(-10px) translateY(-5px); }
      100% { transform: translateX(0) translateY(0); }
    }
    @keyframes glowPulse {
      0%, 100% { filter: drop-shadow(0 0 2px rgba(124,58,237,0.3)); }
      50% { filter: drop-shadow(0 0 8px rgba(124,58,237,0.6)); }
    }
    @keyframes spinSlow {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    @keyframes elastic {
      0% { transform: scale(0); }
      55% { transform: scale(1.1); }
      70% { transform: scale(0.95); }
      100% { transform: scale(1); }
    }

    /* ─── Clases de animación ─── */
    .anim-fade-in { animation: fadeInUp 0.6s cubic-bezier(0.4,0,0.2,1) forwards; }
    .anim-fade-in-delay-1 { animation: fadeInUp 0.6s 0.1s cubic-bezier(0.4,0,0.2,1) both; }
    .anim-fade-in-delay-2 { animation: fadeInUp 0.6s 0.2s cubic-bezier(0.4,0,0.2,1) both; }
    .anim-fade-in-delay-3 { animation: fadeInUp 0.6s 0.3s cubic-bezier(0.4,0,0.2,1) both; }
    .anim-fade-in-delay-4 { animation: fadeInUp 0.6s 0.4s cubic-bezier(0.4,0,0.2,1) both; }
    .anim-scale-in { animation: fadeInScale 0.5s cubic-bezier(0.4,0,0.2,1) forwards; }
    .anim-slide-right { animation: slideInRight 0.5s cubic-bezier(0.4,0,0.2,1) forwards; }
    .anim-slide-left { animation: slideInLeft 0.5s cubic-bezier(0.4,0,0.2,1) forwards; }
    .anim-bounce { animation: bounceIn 0.6s cubic-bezier(0.4,0,0.2,1) forwards; }
    .anim-rotate { animation: rotateIn 0.5s cubic-bezier(0.4,0,0.2,1) forwards; }
    .anim-float { animation: float 3s ease-in-out infinite; }
    .anim-glow { animation: pulseGlow 2s ease-in-out infinite; }
    .anim-elastic { animation: elastic 0.6s cubic-bezier(0.4,0,0.2,1) forwards; }
    .anim-spin-slow { animation: spinSlow 8s linear infinite; }

    /* ─── Splash mejorado ─── */
    #splashScreen {
      background: linear-gradient(135deg, #2a1a5e 0%, #7c3aed 30%, #a78bfa 60%, #7c3aed 100%);
      background-size: 400% 400%;
      animation: gradientShift 4s ease infinite;
    }
    .splash-logo {
      animation: splashPulse 2s ease-in-out infinite, glowPulse 3s ease-in-out infinite;
    }
    .splash-text h1 {
      animation: fadeInDown 0.8s 0.3s both;
    }
    .splash-text p {
      animation: fadeInUp 0.8s 0.5s both;
    }
    .splash-progress {
      animation: fadeInUp 0.8s 0.7s both;
    }

    /* ─── Header animado ─── */
    #mainHeader {
      transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    #mainHeader.scrolled {
      box-shadow: 0 4px 20px rgba(124,58,237,0.1);
      background: rgba(255,255,255,0.95);
    }
    .header-brand {
      transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .header-brand:hover {
      transform: scale(1.03);
    }
    .header-brand img {
      transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .header-brand:hover img {
      transform: rotate(10deg) scale(1.1);
    }
    .header-btn {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .header-btn::after {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 70%);
      opacity: 0;
      transition: opacity 0.3s;
    }
    .header-btn:hover::after {
      opacity: 1;
    }
    .header-btn:hover {
      transform: scale(1.1) rotate(5deg);
      background: var(--accent-lighter);
      color: var(--accent);
    }
    .header-btn:active {
      transform: scale(0.95);
    }

    /* ─── Bottom nav animado ─── */
    #bottomNav {
      transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .nav-item {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
    }
    .nav-item::before {
      content: '';
      position: absolute;
      top: -1px;
      left: 50%;
      transform: translateX(-50%) scaleX(0);
      width: 24px;
      height: 3px;
      background: var(--accent);
      border-radius: 0 0 2px 2px;
      transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .nav-item.active::before {
      transform: translateX(-50%) scaleX(1);
    }
    .nav-item i {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .nav-item:hover i {
      transform: translateY(-3px) scale(1.15);
    }
    .nav-item.active i {
      animation: iconPop 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .nav-item .nav-badge {
      animation: elastic 0.5s cubic-bezier(0.4,0,0.2,1);
    }

    /* ─── Hero banner animado ─── */
    .hero-banner {
      background-size: 200% 200%;
      animation: gradientShift 8s ease infinite;
      position: relative;
      overflow: hidden;
    }
    .hero-banner::before {
      animation: heroWave 6s ease-in-out infinite;
    }
    .hero-banner::after {
      content: '';
      position: absolute;
      bottom: -50%;
      left: -20%;
      width: 400px;
      height: 400px;
      background: rgba(255,255,255,0.05);
      border-radius: 50%;
      animation: float 8s ease-in-out infinite;
    }
    .hero-banner h3 {
      animation: fadeInDown 0.6s 0.2s both;
    }
    .hero-banner p {
      animation: fadeInUp 0.6s 0.4s both;
    }
    .hero-banner .btn-hero {
      animation: fadeInUp 0.6s 0.6s both;
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .hero-banner .btn-hero::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      background: rgba(124,58,237,0.1);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      transition: width 0.6s, height 0.6s;
    }
    .hero-banner .btn-hero:hover::before {
      width: 300px;
      height: 300px;
    }
    .hero-banner .btn-hero:hover {
      transform: translateY(-3px) scale(1.02);
      box-shadow: 0 12px 30px rgba(124,58,237,0.25);
    }
    .hero-banner .btn-hero:active {
      transform: translateY(-1px) scale(0.98);
    }

    /* ─── Stories animadas ─── */
    .story-item {
      transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .story-item:hover {
      transform: translateY(-6px) scale(1.05);
    }
    .story-avatar {
      transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
      position: relative;
    }
    .story-avatar::before {
      content: '';
      position: absolute;
      inset: -4px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent), var(--accent-light), var(--accent));
      background-size: 200% 200%;
      animation: gradientShift 3s ease infinite;
      z-index: -1;
      opacity: 0;
      transition: opacity 0.3s;
    }
    .story-item:hover .story-avatar::before {
      opacity: 1;
    }
    .story-item:hover .story-avatar {
      transform: scale(1.1);
      box-shadow: 0 8px 25px rgba(124,58,237,0.3);
    }

    /* ─── Stats bar animado ─── */
    .stat-item {
      transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .stat-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(124,58,237,0.05), transparent);
      transition: left 0.6s;
    }
    .stat-item:hover::before {
      left: 100%;
    }
    .stat-item:hover {
      transform: translateY(-4px) scale(1.02);
      box-shadow: var(--shadow-lg);
      border-color: var(--accent-light);
    }
    .stat-item .number {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      display: inline-block;
    }
    .stat-item:hover .number {
      transform: scale(1.15);
    }

    /* ─── Filter chips animados ─── */
    .filter-chip {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .filter-chip::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, transparent, rgba(124,58,237,0.1), transparent);
      opacity: 0;
      transition: opacity 0.3s;
    }
    .filter-chip:hover::after {
      opacity: 1;
    }
    .filter-chip:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(124,58,237,0.15);
    }
    .filter-chip.active {
      animation: pulseGlow 2s ease-in-out infinite;
    }

    /* ─── Event cards animadas ─── */
    .event-card {
      transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .event-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 50%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
      transition: left 0.8s;
      z-index: 2;
      pointer-events: none;
    }
    .event-card:hover::before {
      left: 150%;
    }
    .event-card:hover {
      transform: translateY(-8px) scale(1.01);
      border-color: var(--accent-light);
      box-shadow: 0 20px 40px rgba(124,58,237,0.12);
    }
    .event-card-img {
      transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    }
    .event-card:hover .event-card-img {
      transform: scale(1.08);
    }
    .event-card .card-body {
      transition: all 0.3s;
    }
    .event-card:hover .card-body {
      background: linear-gradient(180deg, var(--primary) 0%, var(--accent-bg) 100%);
    }

    /* ─── Tags con animación ─── */
    .event-tag {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      animation: fadeInScale 0.4s cubic-bezier(0.4,0,0.2,1) both;
    }
    .event-tag:hover {
      transform: scale(1.1);
    }

    /* ─── Botones de acción animados ─── */
    .btn-fav, .btn-asistir {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .btn-fav::after, .btn-asistir::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      background: rgba(255,255,255,0.3);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      transition: width 0.4s, height 0.4s;
    }
    .btn-fav:active::after, .btn-asistir:active::after {
      width: 100px;
      height: 100px;
    }
    .btn-fav:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 15px rgba(124,58,237,0.3);
    }
    .btn-fav.active {
      animation: pulseGlow 2s ease-in-out infinite;
    }
    .btn-asistir:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 15px rgba(16,185,129,0.3);
    }
    .btn-asistir.confirmado {
      animation: pulseGlow 2s ease-in-out infinite;
    }

    /* ─── Puestero cards animadas ─── */
    .puestero-card {
      transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .puestero-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 50%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
      transition: left 0.8s;
      z-index: 2;
      pointer-events: none;
    }
    .puestero-card:hover::before {
      left: 150%;
    }
    .puestero-card:hover {
      transform: translateY(-6px) scale(1.01);
      box-shadow: 0 20px 40px rgba(16,185,129,0.12);
    }
    .puestero-avatar {
      transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .puestero-card:hover .puestero-avatar {
      transform: scale(1.15) rotate(10deg);
      box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

    /* ─── Botones de contacto animados ─── */
    .btn-contact {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .btn-contact::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      background: rgba(255,255,255,0.2);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      transition: width 0.5s, height 0.5s;
    }
    .btn-contact:hover::before {
      width: 150px;
      height: 150px;
    }
    .btn-contact:hover {
      transform: translateY(-2px) scale(1.05);
      box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }
    .btn-contact:active {
      transform: translateY(0) scale(0.98);
    }

    /* ─── Plan cards animadas ─── */
    .plan-card {
      transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .plan-card::before {
      content: '';
      position: absolute;
      top: -50%;
      right: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(124,58,237,0.03) 0%, transparent 70%);
      opacity: 0;
      transition: opacity 0.5s;
    }
    .plan-card:hover::before {
      opacity: 1;
    }
    .plan-card:hover {
      transform: translateY(-10px) scale(1.02);
      box-shadow: 0 25px 50px rgba(124,58,237,0.1);
    }
    .plan-card.recommended {
      animation: pulseGlow 3s ease-in-out infinite;
    }
    .plan-card .plan-icon {
      animation: float 4s ease-in-out infinite;
    }

    /* ─── Bottom sheet animado ─── */
    .bottom-sheet {
      transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;
    }
    .bottom-sheet.open {
      box-shadow: 0 -20px 60px rgba(0,0,0,0.2);
    }
    .sheet-handle {
      transition: all 0.3s;
    }
    .sheet-handle:hover {
      width: 60px;
      background: var(--accent);
    }

    /* ─── Toast animado ─── */
    .toast-message {
      animation: slideInToast 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
      transition: all 0.3s;
    }
    .toast-message:hover {
      transform: translateX(-5px);
      box-shadow: var(--shadow-xl);
    }

    /* ─── Install banner animado ─── */
    .install-banner {
      animation: slideUpBanner 0.6s cubic-bezier(0.4,0,0.2,1) forwards;
    }
    .install-banner-icon {
      animation: float 3s ease-in-out infinite;
    }
    .btn-install {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .btn-install:hover {
      transform: scale(1.08);
      box-shadow: 0 8px 25px rgba(124,58,237,0.3);
    }

    /* ─── Calendar animado ─── */
    .calendar-day {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .calendar-day::before {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--accent);
      opacity: 0;
      transform: scale(0);
      border-radius: 50%;
      transition: all 0.3s;
    }
    .calendar-day:hover::before {
      opacity: 0.1;
      transform: scale(1);
      border-radius: var(--radius-sm);
    }
    .calendar-day:hover {
      transform: scale(1.1);
      z-index: 1;
      box-shadow: 0 4px 12px rgba(124,58,237,0.2);
    }
    .calendar-day.today {
      animation: pulseGlow 2s ease-in-out infinite;
    }
    .calendar-day.has-event::after {
      animation: pulseGlow 2s ease-in-out infinite;
    }

    /* ─── Custom tabs animados ─── */
    .custom-tab {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
    }
    .custom-tab::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%) scaleX(0);
      width: 60%;
      height: 3px;
      background: var(--accent);
      border-radius: 3px;
      transition: transform 0.3s;
    }
    .custom-tab:hover::after {
      transform: translateX(-50%) scaleX(0.5);
    }
    .custom-tab.active::after {
      transform: translateX(-50%) scaleX(1);
    }
    .custom-tab.active {
      animation: fadeInScale 0.3s cubic-bezier(0.4,0,0.2,1);
    }

    /* ─── Form inputs animados ─── */
    .form-input {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
    }
    .form-input:focus {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(124,58,237,0.1);
    }

    /* ─── Data manager animado ─── */
    .data-manager .file-btn {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      position: relative;
      overflow: hidden;
    }
    .data-manager .file-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(124,58,237,0.05), transparent);
      transition: left 0.6s;
    }
    .data-manager .file-btn:hover::before {
      left: 100%;
    }
    .data-manager .file-btn:hover {
      transform: translateY(-3px) scale(1.02);
      box-shadow: 0 8px 20px rgba(124,58,237,0.1);
    }
    .data-manager .file-btn.loaded {
      animation: pulseGlow 2s ease-in-out infinite;
    }

    /* ─── Weather widget animado ─── */
    .weather-widget {
      transition: all 0.3s;
    }
    .weather-widget:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 12px rgba(124,58,237,0.1);
    }
    .weather-widget i {
      animation: float 3s ease-in-out infinite;
    }

    /* ─── Section headers animados ─── */
    .section-header {
      animation: fadeInUp 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
    }
    .section-header h2 {
      position: relative;
      display: inline-block;
    }
    .section-header h2::after {
      content: '';
      position: absolute;
      bottom: -4px;
      left: 0;
      width: 40px;
      height: 3px;
      background: linear-gradient(90deg, var(--accent), var(--accent-light));
      border-radius: 2px;
      transition: width 0.4s;
    }
    .section-header:hover h2::after {
      width: 100%;
    }

    /* ─── No results animado ─── */
    .no-results {
      animation: fadeInUp 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
    }
    .no-results i {
      animation: float 3s ease-in-out infinite;
    }

    /* ─── Puesto mini card animado ─── */
    .puesto-mini-card {
      transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .puesto-mini-card:hover {
      transform: translateX(5px);
      box-shadow: var(--shadow-md);
    }
    .puesto-mini-card .puesto-avatar {
      transition: all 0.3s;
    }
    .puesto-mini-card:hover .puesto-avatar {
      transform: scale(1.2) rotate(-10deg);
    }

    /* ─── Rating stars animadas ─── */
    .stars .star {
      transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    }
    .stars .star:hover {
      transform: scale(1.3) rotate(15deg);
    }
    .stars .star.active {
      animation: iconPop 0.4s cubic-bezier(0.4,0,0.2,1);
    }

    /* ─── Social counter animado ─── */
    .social-counter .avatars span {
      transition: all 0.3s;
    }
    .social-counter .avatars span:hover {
      transform: translateY(-3px) scale(1.2);
      z-index: 10;
    }

    /* ─── Distancia badge animado ─── */
    .distancia-badge {
      transition: all 0.3s;
    }
    .distancia-badge.cerca {
      animation: pulseGlow 2s ease-in-out infinite;
    }

    /* ─── Map controls animados ─── */
    .map-control-btn {
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .map-control-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(124,58,237,0.15);
    }
    .map-control-btn.active {
      animation: pulseGlow 2s ease-in-out infinite;
    }

    /* ─── Feria detalle banner animado ─── */
    .feria-detalle-banner {
      background-size: 200% 200%;
      animation: gradientShift 8s ease infinite;
    }

    /* ─── Onboarding animado ─── */
    .onboarding-card {
      animation: onbounce 0.6s cubic-bezier(0.4,0,0.2,1) forwards;
    }
    .onboarding-card .step-icon {
      animation: float 3s ease-in-out infinite;
    }
    .onboarding-dots .dot {
      transition: all 0.3s;
    }
    .onboarding-dots .dot.active {
      animation: pulseGlow 2s ease-in-out infinite;
    }

    /* ─── Skeleton mejorado ─── */
    .skeleton {
      background: linear-gradient(90deg, var(--border-color) 25%, var(--secondary) 50%, var(--border-color) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: var(--radius-sm);
    }

    /* ─── Scrollbar personalizada ─── */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: transparent;
    }
    ::-webkit-scrollbar-thumb {
      background: var(--accent-light);
      border-radius: 3px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--accent);
    }

    /* ─── Animación de entrada para secciones ─── */
    .page-section.active {
      animation: pageFadeIn 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
    }
    @keyframes pageFadeIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* ─── Efecto de parallax sutil en hero ─── */
    @media (prefers-reduced-motion: no-preference) {
      .hero-banner {
        transform-style: preserve-3d;
        perspective: 1000px;
      }
      .hero-banner h3, .hero-banner p, .hero-banner .btn-hero {
        transform: translateZ(20px);
      }
    }

    /* ─── Responsive animations ─── */
    @media (max-width: 768px) {
      .event-card:hover {
        transform: translateY(-4px) scale(1);
      }
      .plan-card:hover {
        transform: translateY(-6px) scale(1);
      }
    }

    /* ═══════════════════════════════════════════
       RESPONSIVE
    ═══════════════════════════════════════════ */
    @media (max-width: 768px) {
      :root { --header-height: 60px; --bottom-nav-height: 64px; }
      .header-brand span { font-size: 0.95rem; }
      .header-brand small { font-size: 0.55rem; }
      .header-search { display: none; }
      .section-header h2 { font-size: 1.25rem; }
      #mapContainer { height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 80px); min-height: 300px; }
      .map-controls { bottom: 12px; padding: 0.3rem; }
      .map-control-btn { padding: 0.3rem 0.7rem; font-size: 0.65rem; }
      .event-card-img { height: 140px; }
      .stats-bar { grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
      .stat-item { padding: 0.6rem 0.3rem; }
      .stat-item .number { font-size: 1.2rem; }
      .install-banner { left: 12px; right: 12px; padding: 0.75rem 1rem; }
      .toast-container { max-width: calc(100% - 32px); right: 16px; }
      .hero-banner { padding: 1.5rem; }
      .hero-banner h3 { font-size: 1.1rem; }
      .plan-card { padding: 1.5rem 1rem; }
      .weather-widget { display: none; }
      .story-item { width: 60px; }
      .story-avatar { width: 54px; height: 54px; }
      .story-avatar .emoji { font-size: 1.6rem; }
      .puesto-mini-card { flex-direction: column; text-align: center; }
      .puesto-mini-card .puesto-actions { justify-content: center; }
      .data-manager .file-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    }
    
    @media (max-width: 480px) {
      .header-btn { width: 36px; height: 36px; }
      .nav-item { min-width: 44px; padding: 0.25rem 0.3rem; }
      .nav-item i { font-size: 1rem; }
      .nav-item span { font-size: 0.45rem; }
      .event-card .card-body { padding: 1rem; }
      .event-card .card-title { font-size: 0.9rem; }
    }
    
    /* ═══════════════════════════════════════════
       DARK MODE
    ═══════════════════════════════════════════ */
    @media (prefers-color-scheme: dark) {
      :root {
        --primary: #0f0f1a; --secondary: #1a1a2e; --text-primary: #f1f1f1;
        --text-secondary: #b0b0c8; --text-muted: #6b6b85; --border-color: #2a2a3e;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.4); --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
        --shadow-lg: 0 10px 30px rgba(0,0,0,0.25); --shadow-xl: 0 20px 50px rgba(0,0,0,0.3);
        --accent-bg: #1a1a3e; --accent-lighter: #2a1a5e;
      }
      #mainHeader { background: rgba(15,15,26,0.92); border-color: rgba(42,42,62,0.5); }
      #bottomNav { background: rgba(15,15,26,0.95); border-color: rgba(42,42,62,0.5); }
      .header-btn { background: var(--secondary); color: var(--text-secondary); }
      .stat-item { background: var(--secondary); border-color: var(--border-color); }
      .event-card { background: var(--secondary); border-color: var(--border-color); }
      .filter-chip { border-color: var(--border-color); color: var(--text-secondary); }
      .filter-chip.active { background: var(--accent); border-color: var(--accent); color: white; }
      .map-controls { background: rgba(15,15,26,0.92); border-color: rgba(42,42,62,0.3); }
      .toast-message { background: var(--secondary); border-color: var(--border-color); }
      #mapContainer .leaflet-control-zoom a { background: var(--secondary) !important; color: var(--text-primary) !important; }
      .puestero-card { background: var(--secondary); border-color: var(--border-color); }
      .puestero-header { background: linear-gradient(135deg, #064e3b 0%, #065f46 100%); }
      .plan-card { background: var(--secondary); border-color: var(--border-color); }
      .custom-tabs { background: #1a1a3e; }
      .custom-tab.active { background: var(--secondary); }
      .calendar-day { background: var(--secondary); }
      .calendar-day:hover { background: var(--accent-lighter); }
      .bottom-sheet { background: var(--secondary); }
      .bottom-sheet .sheet-header { border-color: var(--border-color); }
      .onboarding-card { background: var(--secondary); }
      .filters-panel { background: var(--secondary); border-color: var(--border-color); }
      .puesto-mini-card { background: var(--secondary); border-color: var(--border-color); }
      .feria-detalle-banner { background: linear-gradient(135deg, #2a1a5e 0%, var(--accent) 50%, #5b21b6 100%); }
      .data-manager { background: var(--secondary); border-color: var(--border-color); }
      .data-manager .file-btn { background: var(--secondary); border-color: var(--border-color); }
      .data-manager .file-btn:hover { background: var(--accent-bg); }
      .data-manager .file-btn.loaded { background: #064e3b; border-color: var(--puestero); }
    }
    
    body.dark-mode {
      --primary: #0f0f1a; --secondary: #1a1a2e; --text-primary: #f1f1f1;
      --text-secondary: #b0b0c8; --text-muted: #6b6b85; --border-color: #2a2a3e;
      --accent-lighter: #2a1a5e; --accent-bg: #1a1a3e;
    }
    body.dark-mode #mainHeader { background: rgba(15,15,26,0.92); border-color: rgba(42,42,62,0.5); }
    body.dark-mode #bottomNav { background: rgba(15,15,26,0.95); border-color: rgba(42,42,62,0.5); }
    body.dark-mode .bottom-sheet { background: var(--secondary); }
    body.dark-mode .bottom-sheet .sheet-header { border-color: var(--border-color); }
    body.dark-mode .onboarding-card { background: var(--secondary); }
    body.dark-mode .filters-panel { background: var(--secondary); border-color: var(--border-color); }
    body.dark-mode .puesto-mini-card { background: var(--secondary); border-color: var(--border-color); }
    body.dark-mode .feria-detalle-banner { background: linear-gradient(135deg, #2a1a5e 0%, var(--accent) 50%, #5b21b6 100%); }
    body.dark-mode .data-manager { background: var(--secondary); border-color: var(--border-color); }
    body.dark-mode .data-manager .file-btn { background: var(--secondary); border-color: var(--border-color); }
    body.dark-mode .data-manager .file-btn:hover { background: var(--accent-bg); }
    body.dark-mode .data-manager .file-btn.loaded { background: #064e3b; border-color: var(--puestero); }
    
    /* ═══════════════════════════════════════════
       PULL TO REFRESH
    ═══════════════════════════════════════════ */
    .pull-indicator {
      text-align: center; padding: 0.5rem; color: var(--text-muted);
      font-size: 0.7rem; opacity: 0; transition: opacity 0.2s;
    }
    .pull-indicator.show { opacity: 1; }
    .pull-indicator i { display: block; font-size: 1.2rem; }

    /* ═══════════════════════════════════════════
       ICONOS Y BANNERS PERSONALIZADOS
    ═══════════════════════════════════════════ */
    .evento-icono-img {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      object-fit: cover;
      vertical-align: middle;
      margin-right: 4px;
      border: 1.5px solid var(--accent);
      background: white;
      display: inline-block;
      transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .event-card:hover .evento-icono-img {
      transform: scale(1.2);
    }
    .story-avatar .evento-icono-img {
      width: 100% !important;
      height: 100% !important;
      border-radius: 50%;
      border: none;
      margin: 0;
      padding: 0;
    }
    .story-item:hover .story-avatar .evento-icono-img {
      transform: scale(1.1);
    }
    .feria-detalle-banner .evento-icono-img {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      border: 3px solid rgba(255,255,255,0.5);
      margin-bottom: 0.75rem;
      box-shadow: 0 4px 15px rgba(0,0,0,0.2);
      background: white;
    }
    .puestero-avatar img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .puestero-card:hover .puestero-avatar img {
      transform: scale(1.15) rotate(10deg);
    }
    .puesto-avatar img {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid var(--puestero);
      background: white;
    }
    .puesto-mini-card:hover .puesto-avatar img {
      transform: scale(1.2) rotate(-10deg);
    }

    /* Animaciones de entrada mejoradas */
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(30px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .anim-fade-in { animation: fadeInUp 0.6s cubic-bezier(0.4,0,0.2,1) forwards; }
    .anim-fade-in-delay-1 { animation: fadeInUp 0.6s 0.1s cubic-bezier(0.4,0,0.2,1) both; }
    .anim-fade-in-delay-2 { animation: fadeInUp 0.6s 0.2s cubic-bezier(0.4,0,0.2,1) both; }
    .anim-fade-in-delay-3 { animation: fadeInUp 0.6s 0.3s cubic-bezier(0.4,0,0.2,1) both; }
    .anim-fade-in-delay-4 { animation: fadeInUp 0.6s 0.4s cubic-bezier(0.4,0,0.2,1) both; }


/* ═══════════════════════════════════════════
   V5.0 - NUEVAS FUNCIONALIDADES
   ═══════════════════════════════════════════ */

/* ─── Vista Feria Dashboard ─── */
.feria-dashboard {
  position: relative;
}
.feria-hero {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  margin-bottom: 1rem; min-height: 200px; display: flex; align-items: flex-end;
}
.feria-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.feria-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}
.feria-hero-content {
  position: relative; z-index: 2; padding: 1.5rem; color: white; width: 100%;
}
.feria-hero-content h2 { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; margin-bottom: 0.25rem; }
.feria-hero-content p { opacity: 0.9; font-size: 0.85rem; margin-bottom: 0.5rem; }
.feria-hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feria-hero-meta span { background: rgba(255,255,255,0.2); padding: 0.2rem 0.7rem; border-radius: 20px; font-size: 0.7rem; backdrop-filter: blur(4px); }

.feria-tabs {
  display: flex; gap: 0.25rem; background: var(--secondary); padding: 0.3rem;
  border-radius: var(--radius-md); margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none;
  position: sticky; top: var(--header-height); z-index: 99; backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
}
.feria-tabs::-webkit-scrollbar { display: none; }
.feria-tab {
  flex: 1; min-width: 80px; padding: 0.6rem; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition-fast); text-align: center; white-space: nowrap;
}
.feria-tab:hover { color: var(--text-primary); }
.feria-tab.active { background: var(--accent); color: white; box-shadow: var(--shadow-sm); }

/* ─── Puestos Grid ─── */
.puestos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 0.5rem; }
.puesto-slot {
  aspect-ratio: 1; border-radius: var(--radius-md); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700;
  cursor: pointer; transition: all var(--transition-fast); border: 2px solid var(--border-color);
  background: var(--secondary); position: relative; overflow: hidden;
}
.puesto-slot .num { font-size: 1rem; font-family: var(--font-heading); }
.puesto-slot.libre { border-color: var(--puestero); background: #ecfdf5; color: #065f46; }
.puesto-slot.libre:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.puesto-slot.ocupado { border-color: var(--accent); background: var(--accent-lighter); color: var(--accent); }
.puesto-slot.ocupado:hover { transform: scale(1.1); }
.puesto-slot.premium { background: linear-gradient(135deg, #fef3c7, #fde68a); border-color: #f59e0b; color: #92400e; }
.puesto-slot .slot-icon { font-size: 1.2rem; margin-bottom: 2px; }

/* ─── Product Cards ─── */
.catalogo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.product-card {
  background: var(--primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  overflow: hidden; transition: all var(--transition-base); cursor: pointer; position: relative;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-light); }
.product-card-img { height: 140px; width: 100%; object-fit: cover; display: block; }
.product-card-body { padding: 0.75rem; }
.product-card-body h6 { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.2rem; }
.product-card-body .precio { font-size: 1rem; font-weight: 800; color: var(--accent); font-family: var(--font-heading); }
.product-card-body .precio-old { font-size: 0.75rem; color: var(--text-muted); text-decoration: line-through; margin-left: 0.3rem; }
.product-card-body .puestero-name { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.3rem; }
.product-card .product-badge {
  position: absolute; top: 8px; left: 8px; background: var(--accent); color: white;
  font-size: 0.6rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 12px;
}

/* ─── Promo Cards ─── */
.promo-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border: 2px solid #f59e0b;
  border-radius: var(--radius-lg); padding: 1.25rem; position: relative; overflow: hidden;
  transition: all var(--transition-base); cursor: pointer;
}
.promo-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 30px rgba(245,158,11,0.2); }
.promo-card::before {
  content: '🎟️'; position: absolute; top: -10px; right: -10px; font-size: 4rem; opacity: 0.15;
}
.promo-card h5 { font-family: var(--font-heading); font-weight: 800; color: #92400e; margin-bottom: 0.3rem; }
.promo-card p { font-size: 0.8rem; color: #78350f; margin-bottom: 0.5rem; }
.promo-card .codigo {
  display: inline-flex; align-items: center; gap: 0.5rem; background: white; padding: 0.4rem 1rem;
  border-radius: var(--radius-sm); font-family: monospace; font-weight: 700; font-size: 0.9rem;
  color: var(--accent); border: 2px dashed var(--accent); cursor: pointer; transition: all var(--transition-fast);
}
.promo-card .codigo:hover { background: var(--accent); color: white; border-style: solid; }
.promo-card .promo-meta { font-size: 0.65rem; color: #92400e; margin-top: 0.5rem; opacity: 0.8; }

/* ─── Feed Social ─── */
.feed-post {
  background: var(--primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 1rem; margin-bottom: 1rem; transition: all var(--transition-fast);
}
.feed-post:hover { border-color: var(--accent-light); box-shadow: var(--shadow-sm); }
.feed-post-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.feed-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.feed-post-header h6 { font-weight: 700; font-size: 0.9rem; }
.feed-post-header small { color: var(--text-muted); font-size: 0.7rem; }
.feed-post-img { width: 100%; border-radius: var(--radius-md); margin-bottom: 0.75rem; max-height: 300px; object-fit: cover; }
.feed-post-content { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.feed-actions { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.feed-actions button { background: none; border: none; color: inherit; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 0.3rem; transition: all var(--transition-fast); }
.feed-actions button:hover { color: var(--accent); transform: scale(1.1); }
.feed-actions button.liked { color: #ef4444; }

/* ─── Chat ─── */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 40px); }
.chat-list { overflow-y: auto; flex: 1; }
.chat-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--transition-fast); border-bottom: 1px solid var(--border-color);
}
.chat-item:hover { background: var(--secondary); }
.chat-item .chat-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-lighter); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.chat-item .chat-info { flex: 1; min-width: 0; }
.chat-item .chat-info h6 { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .chat-info p { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .chat-time { font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0; }
.chat-item .chat-badge { background: var(--accent); color: white; font-size: 0.6rem; font-weight: 700; padding: 2px 6px; border-radius: 10px; margin-left: auto; }

.chat-window { display: flex; flex-direction: column; height: 100%; }
.chat-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-bottom: 1px solid var(--border-color); background: var(--secondary); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-bubble { max-width: 80%; padding: 0.75rem 1rem; border-radius: var(--radius-lg); font-size: 0.85rem; line-height: 1.4; position: relative; animation: fadeInUp 0.3s ease; }
.chat-bubble.sent { align-self: flex-end; background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.chat-bubble.received { align-self: flex-start; background: var(--secondary); color: var(--text-primary); border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.chat-bubble .time { font-size: 0.6rem; opacity: 0.7; margin-top: 0.3rem; display: block; text-align: right; }
.chat-input-area { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--border-color); background: var(--primary); }
.chat-input-area input { flex: 1; padding: 0.6rem 1rem; border: 2px solid var(--border-color); border-radius: 24px; font-family: var(--font-body); font-size: 0.9rem; background: var(--secondary); }
.chat-input-area input:focus { border-color: var(--accent); outline: none; box-shadow: var(--focus-ring); }
.chat-input-area button { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent); color: white; cursor: pointer; transition: all var(--transition-fast); display: flex; align-items: center; justify-content: center; }
.chat-input-area button:hover { background: var(--accent-dark); transform: scale(1.1); }

/* ─── Reservas ─── */
.reserva-card {
  background: var(--primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 1rem; margin-bottom: 0.75rem; transition: all var(--transition-fast);
  border-left: 4px solid var(--accent);
}
.reserva-card:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.reserva-card.pendiente { border-left-color: #f59e0b; }
.reserva-card.aprobada { border-left-color: var(--puestero); }
.reserva-card.rechazada { border-left-color: #ef4444; }
.reserva-card h6 { font-weight: 700; margin-bottom: 0.25rem; }
.reserva-card p { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.reserva-card .reserva-actions { display: flex; gap: 0.5rem; }
.reserva-card .badge-estado { font-size: 0.6rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 12px; text-transform: uppercase; }
.badge-estado.pendiente { background: #fef3c7; color: #92400e; }
.badge-estado.aprobada { background: #dcfce7; color: #166534; }
.badge-estado.rechazada { background: #fecaca; color: #991b1b; }

/* ─── Analytics ─── */
.analytics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.analytics-card {
  background: var(--primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 1.25rem; text-align: center; transition: all var(--transition-fast);
}
.analytics-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-light); }
.analytics-card .number { font-size: 2rem; font-weight: 800; color: var(--accent); font-family: var(--font-heading); }
.analytics-card .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.analytics-chart { height: 200px; background: var(--secondary); border-radius: var(--radius-md); display: flex; align-items: flex-end; justify-content: space-around; padding: 1rem; gap: 0.5rem; }
.chart-bar { flex: 1; background: linear-gradient(to top, var(--accent), var(--accent-light)); border-radius: 6px 6px 0 0; min-height: 20px; transition: all 0.5s ease; position: relative; }
.chart-bar:hover { opacity: 0.8; transform: scaleY(1.05); }
.chart-bar span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 0.6rem; color: var(--text-muted); white-space: nowrap; }

/* ─── Selector de Rol ─── */
.role-selector { display: flex; gap: 0.5rem; background: var(--secondary); padding: 0.3rem; border-radius: var(--radius-md); margin-bottom: 1rem; }
.role-btn { flex: 1; padding: 0.5rem; border: none; border-radius: var(--radius-sm); background: transparent; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all var(--transition-fast); }
.role-btn.active { background: var(--accent); color: white; }
.role-btn:hover:not(.active) { color: var(--text-primary); }

/* ─── Contacto Multi-Redes ─── */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.contact-btn {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem; border-radius: var(--radius-md);
  border: none; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast);
  color: white; text-decoration: none; justify-content: center;
}
.contact-btn.whatsapp { background: #25d366; }
.contact-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.contact-btn.facebook { background: #1877f2; }
.contact-btn.email { background: var(--accent); }
.contact-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-md); }

/* ─── Formulario Reserva ─── */
.reserva-form {
  background: var(--secondary); border-radius: var(--radius-lg); padding: 1.5rem;
  border: 1px solid var(--border-color); max-width: 500px; margin: 0 auto;
}
.reserva-form h5 { font-family: var(--font-heading); font-weight: 700; margin-bottom: 1rem; text-align: center; }

/* ─── Dark mode additions ─── */
body.dark-mode .feria-hero-content { color: white; }
body.dark-mode .promo-card { background: linear-gradient(135deg, #451a03 0%, #78350f 100%); border-color: #f59e0b; }
body.dark-mode .promo-card h5 { color: #fcd34d; }
body.dark-mode .promo-card p { color: #fde68a; }
body.dark-mode .chat-bubble.received { background: #1a1a2e; border-color: #2a2a3e; color: #f1f1f1; }
body.dark-mode .chat-input-area input { background: #1a1a2e; border-color: #2a2a3e; color: #f1f1f1; }
body.dark-mode .product-card { background: #1a1a2e; border-color: #2a2a3e; }
body.dark-mode .feed-post { background: #1a1a2e; border-color: #2a2a3e; }
body.dark-mode .reserva-card { background: #1a1a2e; border-color: #2a2a3e; }
body.dark-mode .analytics-card { background: #1a1a2e; border-color: #2a2a3e; }
body.dark-mode .analytics-chart { background: #1a1a2e; }

/* ─── Ripple effect ─── */
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.4); transform: scale(0); animation: ripple-anim 0.6s linear; pointer-events: none; }
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* ─── Haptic simulation visual ─── */
.haptic-btn:active { transform: scale(0.96); transition: transform 0.05s; }

/* ─── Scroll reveal ─── */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.4,0,0.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive additions ─── */
@media (max-width: 768px) {
  .catalogo-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .puestos-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .analytics-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .chat-container { height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 20px); }
}


/* ═══════════════════════════════════════════
   BOTÓN FLOTANTE DE CHAT
═══════════════════════════════════════════ */
.chat-fab {
  position: fixed;
  bottom: calc(var(--bottomnav-height, 70px) + 20px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fabPulse 3s infinite;
}
.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.6);
}
.chat-fab:active { transform: scale(0.95); }

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4); }
  50% { box-shadow: 0 4px 20px rgba(124, 58, 237, 0.7), 0 0 0 12px rgba(124, 58, 237, 0.1); }
}

.chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  border: 2px solid white;
  padding: 0 5px;
}

/* ═══════════════════════════════════════════
   MENÚ FLOTANTE DE CHAT
═══════════════════════════════════════════ */
.chat-fab-menu {
  position: fixed;
  bottom: calc(var(--bottomnav-height, 70px) + 90px);
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  max-height: 450px;
  background: var(--primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  z-index: 997;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.chat-fab-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-fab-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--accent-bg), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.chat-fab-menu-header h6 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}
.chat-fab-menu-header button {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}
.chat-fab-menu-header button:hover { background: var(--secondary); }

.chat-fab-menu-body {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem;
}

/* Items del menú de chat */
.chat-contact-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}
.chat-contact-item:hover {
  background: var(--secondary);
  transform: translateX(3px);
}
.chat-contact-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.chat-contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chat-contact-avatar .online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--primary);
}
.chat-contact-info { flex: 1; min-width: 0; }
.chat-contact-info h6 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-contact-info small {
  color: var(--text-muted);
  font-size: 0.7rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-contact-badge {
  background: var(--accent);
  color: white;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 5px;
}

.chat-menu-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.5rem 0.7rem 0.3rem;
}

/* Botón chat en cards de puestero */
.btn-contact.btn-chat {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
}
.btn-contact.btn-chat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* Responsive móvil */
@media (max-width: 576px) {
  .chat-fab-menu {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: calc(var(--bottomnav-height, 70px) + 80px);
    max-height: 60vh;
  }
  .chat-fab {
    right: 15px;
    bottom: calc(var(--bottomnav-height, 70px) + 15px);
  }
}

/* Modal de consentimiento de ubicación */
#locationConsentModal .btn-plan {
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
}
#locationConsentModal .btn-plan-outline {
  font-size: 0.9rem;
}
#locationConsentModal strong {
  color: var(--accent);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}