/* ===== Popup de error mejorado ===== */
        .popup {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(8px);
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .popup.active {
            opacity: 1;
        }
        
        .popup-content {
            background: linear-gradient(145deg, #ffffff, #f5f7fa);
            padding: 35px 40px;
            border-radius: 20px;
            text-align: center;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
            max-width: 420px;
            width: 90%;
            transform: translateY(20px);
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
        }
        
        .popup.active .popup-content {
            transform: translateY(0);
        }
        
        .popup-content::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, #ff4b2b, #ff416c);
        }
        
        .popup-icon-container {
            margin-bottom: 20px;
            position: relative;
        }
        
        .popup-icon {
            font-size: 60px;
            color: #e74c3c;
            margin-bottom: 15px;
            display: inline-block;
            position: relative;
            z-index: 1;
        }
        
        .popup-icon-bg {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100px;
            height: 100px;
            background: rgba(231, 76, 60, 0.1);
            border-radius: 50%;
            z-index: 0;
        }
        
        .popup-content h2 {
            margin: 0;
            font-size: 24px;
            color: #2c3e50;
            font-weight: 700;
            letter-spacing: -0.5px;
        }
        
        .popup-content p {
            margin-top: 15px;
            margin-bottom: 25px;
            color: #5a6c7d;
            font-size: 16px;
            line-height: 1.6;
        }
        
        .popup-actions {
            display: flex;
            gap: 12px;
            justify-content: center;
        }
        
        .popup-btn {
            padding: 12px 28px;
            font-size: 15px;
            font-weight: 600;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .popup-btn-primary {
            background: linear-gradient(135deg, #ff4b2b, #ff416c);
            color: white;
            box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
        }
        
        .popup-btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 7px 20px rgba(255, 65, 108, 0.6);
        }

        @keyframes fadeInPop {
            0% { transform: scale(0.8); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }
        
        @keyframes pulseIcon {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        
        @keyframes iconBgPulse {
            0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
            50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.2; }
        }
        
        .popup-icon {
            animation: pulseIcon 2s infinite;
        }
        
        .popup-icon-bg {
            animation: iconBgPulse 3s infinite;
        }