*{
margin:0;
padding:0;
box-sizing:border-box;
}

body{
font-family:'Inter',sans-serif;
background:#f5f9ff;
min-height:100vh;
padding:24px;
}


.app{
    max-width:1900px;
    margin:0 auto;
    display:grid;
    grid-template-columns:280px minmax(0,1fr) 360px;
    gap:28px;
    align-items:start;
}

.sidebar{
    grid-column:1;
}

.main-content{
    grid-column:2;
    min-width:0;
}

.sidebar-anuncios{
    grid-column:3;
}


.sidebar{
background:white;
border-radius:36px;
padding:32px 20px;
display:flex;
flex-direction:column;
gap:32px;
box-shadow:0 20px 40px -12px rgba(0,20,40,0.08);
border:1px solid rgba(203,213,225,0.3);
height:fit-content;
position:sticky;
top:24px;
}

.sidebar-anuncios{
width:350px;
position:sticky;
top:24px;
height:calc(100vh - 48px);
}

.main-content{
    display:flex;
    flex-direction:column;
    gap:28px;
    min-width:0;
}


.page-container{
    background:white;
    border:1px solid #e2e8f0;
    border-radius:32px;
    padding:32px;
    box-shadow:0 12px 30px -8px rgba(0,0,0,0.02);
    min-height:500px;
    position:relative;
    width:100%;
    overflow:hidden;
}

        /* =====================================================
          CSS- ESTILOS GENERALES - PERTENECEN A TODA LA APLICACIÓN
           ===================================================== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: #f5f9ff;
            background-image: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 40%),
                              radial-gradient(circle at 90% 70%, rgba(16, 185, 129, 0.03) 0%, transparent 40%);
            min-height: 100vh;
            padding: 24px;
        }

        .app {
            max-width: 1900px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 280px 1fr 350px;
            gap: 28px;
        }

        /* ----- UTILIDADES ----- */
        .hidden { display: none; }
        .text-center { text-align: center; }
        .mt-4 { margin-top: 24px; }
        .mb-4 { margin-bottom: 24px; }
        .gap-2 { gap: 16px; }
        .flex { display: flex; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }
        .w-full { width: 100%; }

        /* =====================================================
           INICIO: LO QUE PERTENECE AL LOGO - EASY-POST
           ===================================================== */
        .sidebar {
            background: white;
            border-radius: 36px;
            padding: 32px 20px;
            display: flex;
            flex-direction: column;
            gap: 32px;
            box-shadow: 0 20px 40px -12px rgba(0, 20, 40, 0.08);
            border: 1px solid rgba(203, 213, 225, 0.3);
            height: fit-content;
            position: sticky;
            top: 24px;
        }

        .logo-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            padding-bottom: 24px;
            border-bottom: 2px solid #f1f5f9;
        }

        .logo-circle {
            width: 80px;
            height: 80px;
            background: linear-gradient(145deg, #2563eb, #1e40af);
            border-radius: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 12px 24px -8px rgba(37, 99, 235, 0.3);
            overflow: hidden;
        }

        .logo-circle img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            filter: brightness(0) invert(1);
        }

        .company-name {
            font-size: 1.4rem;
            font-weight: 800;
            color: #0b2b4a;
            letter-spacing: -0.01em;
        }

        .company-tag {
            font-size: 0.75rem;
            color: #64748b;
            background: #f1f5f9;
            padding: 6px 16px;
            border-radius: 40px;
            font-weight: 600;
        }

        /* =====================================================
           INICIO: MENU DIGITAL (Letrero y estilos del menú)
           ===================================================== */
        .menu-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .menu-title {
            font-size: 0.7rem;
            font-weight: 700;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
            padding-left: 12px;
        }

        .menu-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 18px;
            border-radius: 20px;
            color: #334155;
            font-weight: 500;
            transition: all 0.2s;
            cursor: pointer;
            border: 1px solid transparent;
        }

        .menu-item i {
            width: 22px;
            color: #64748b;
            font-size: 1.1rem;
        }

        .menu-item:hover {
            background: #f8fafc;
            border-color: #e2e8f0;
        }

        .menu-item.active {
            background: #eef6ff;
            color: #2563eb;
            border-color: rgba(37, 99, 235, 0.2);
        }

        .menu-item.active i {
            color: #2563eb;
        }

        /* ----- BOTONES DE ACCIÓN RÁPIDA (MEJORADOS) ----- */
        .action-buttons-sidebar {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 20px;
        }

        .action-btn {
            padding: 16px;
            border-radius: 24px;
            border: none;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            cursor: pointer;
            font-size: 0.95rem;
            position: relative;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }

        .action-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        .action-btn:hover::before {
            width: 300px;
            height: 300px;
        }

        .action-btn:hover {
            transform: translateY(-4px) scale(1.02);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }

        .action-btn:active {
            transform: translateY(0) scale(0.98);
        }

        .btn-primary-sidebar {
            background: linear-gradient(145deg, #2563eb, #1d4ed8);
            color: white;
            box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.5);
        }

        .btn-success-sidebar {
            background: linear-gradient(145deg, #10b981, #059669);
            color: white;
            box-shadow: 0 8px 18px -6px rgba(16, 185, 129, 0.5);
        }

        .btn-warning-sidebar {
            background: linear-gradient(145deg, #f59e0b, #d97706);
            color: white;
            box-shadow: 0 8px 18px -6px rgba(245, 158, 11, 0.5);
        }

        .btn-outline-sidebar {
            background: white;
            border: 1.5px solid #e2e8f0;
            color: #334155;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
        }

        .btn-outline-sidebar:hover {
            border-color: #2563eb;
            color: #2563eb;
            background: linear-gradient(145deg, white, #f8fafc);
        }
        
        
        /* =====================================================
           FIN: MENU DIGITAL
           ===================================================== */

        /* =====================================================
           INICIO: BOTON SOLICITUD DE REGISTROS ASOCIADOS NUEVOS (Estilos)
           ===================================================== */
        #page-Nuevos .stats-grid-nuevos {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 20px;
            margin-bottom: 32px;
        }

        #page-Nuevos .stat-card-nuevo {
            background: linear-gradient(145deg, white, #f8fafc);
            border-radius: 20px;
            padding: 20px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
            transition: all 0.3s ease;
            animation: floatIn 0.5s ease-out;
        }

        #page-Nuevos .stat-card-nuevo:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
            border-color: #f97316;
        }

        #page-Nuevos .stat-value-nuevo {
            font-size: 1.8rem;
            font-weight: 700;
            color: #0b2b4a;
            margin-bottom: 4px;
            background: linear-gradient(145deg, #f97316, #ea580c);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .btn-agregar-nuevo {
            background: linear-gradient(145deg, #f97316, #ea580c);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 40px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
        }

        .btn-agregar-nuevo::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        .btn-agregar-nuevo:hover::before {
            width: 300px;
            height: 300px;
        }

        .btn-agregar-nuevo:hover {
            background: linear-gradient(145deg, #ea580c, #c2410c);
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.4);
        }

        .btn-agregar-nuevo:active {
            transform: translateY(0) scale(0.95);
        }

        .btn-eliminar-nuevo {
            background: white;
            color: #ef4444;
            border: 1px solid #fee2e2;
            padding: 8px 16px;
            border-radius: 40px;
            font-size: 0.75rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-eliminar-nuevo:hover {
            background: linear-gradient(145deg, #ef4444, #dc2626);
            color: white;
            border-color: transparent;
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3);
        }

        .btn-eliminar-nuevo:active {
            transform: translateY(0) scale(0.95);
        }

        /* Estilos para la tabla de asociados nuevos */
        .table-container-nuevos {
            background: #f8fafc;
            border-radius: 24px;
            padding: 24px;
            margin-top: 20px;
        }

        .table-container-nuevos table {
            width: 100%;
            border-collapse: collapse;
        }

        .table-container-nuevos th {
            text-align: left;
            padding: 16px 12px;
            font-size: 0.7rem;
            font-weight: 700;
            color: #475569;
            text-transform: uppercase;
            background: white;
            border-bottom: 2px solid #e2e8f0;
        }

        .table-container-nuevos td {
            padding: 16px 12px;
            border-bottom: 1px solid #e2e8f0;
            background: white;
        }

        .whatsapp-link {
            color: #25D366;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .whatsapp-link:hover {
            color: #128C7E;
        }

        .plan-badge {
            padding: 6px 16px;
            border-radius: 40px;
            font-size: 0.75rem;
            font-weight: 600;
            display: inline-block;
            transition: all 0.3s ease;
        }

        .plan-gratis { 
            background: linear-gradient(145deg, #f1f5f9, #e2e8f0); 
            color: #475569; 
        }
        .plan-basico { 
            background: linear-gradient(145deg, #dbeafe, #bfdbfe); 
            color: #2563eb; 
        }
        .plan-estandar { 
            background: linear-gradient(145deg, #ede9fe, #ddd6fe); 
            color: #7c3aed; 
        }
        .plan-premium { 
            background: linear-gradient(145deg, #fef3c7, #fde68a); 
            color: #b6560b; 
        }

        .badge-success {
            background: #dcfce7;
            color: #16a34a;
            padding: 4px 12px;
            border-radius: 40px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .badge-danger {
            background: #fee2e2;
            color: #dc2626;
            padding: 4px 12px;
            border-radius: 40px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #94a3b8;
        }

        .loading-spinner {
            text-align: center;
            padding: 40px;
            color: #f97316;
        }
        /* =====================================================
           FIN: BOTON SOLICITUD DE REGISTRO ASOCIADOS NUEVOS
           ===================================================== */

        /* =====================================================
           INICIO: BOTON ASOCIADOS EASYPOS (Estilos)
           ===================================================== */
        .main-content {
            display: flex;
            flex-direction: column;
            gap: 28px;
        }

        .page-container {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 32px;
            padding: 32px;
            box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.02);
            min-height: 500px;
            animation: floatIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
            position: relative;
            overflow: hidden;
        }

        .page-container::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
            opacity: 0;
            animation: ripple 1.5s ease-out;
            pointer-events: none;
        }

        @keyframes floatIn {
            0% {
                opacity: 0;
                transform: translateY(30px) scale(0.95);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @keyframes ripple {
            0% {
                opacity: 0.5;
                transform: scale(0.5);
            }
            100% {
                opacity: 0;
                transform: scale(1);
            }
        }

        .distributor-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 28px 36px;
            background: white;
            border: 1px solid rgba(203, 213, 225, 0.4);
            border-radius: 36px;
            box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.02);
            position: relative;
            overflow: hidden;
            animation: slideInLeft 0.5s ease-out;
        }

        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .distributor-header::before {
            content: '';
            position: absolute;
            top: -30%;
            right: -5%;
            width: 300px;
            height: 300px;
            background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
            border-radius: 50%;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
        }

        .stat-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 28px;
            padding: 24px;
            display: flex;
            align-items: center;
            gap: 18px;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
            position: relative;
            overflow: hidden;
            animation: fadeInUp 0.5s ease-out forwards;
            opacity: 0;
        }

        .stat-card:nth-child(1) { animation-delay: 0.1s; }
        .stat-card:nth-child(2) { animation-delay: 0.2s; }
        .stat-card:nth-child(3) { animation-delay: 0.3s; }
        .stat-card:nth-child(4) { animation-delay: 0.4s; }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
            transition: left 0.5s;
        }

        .stat-card:hover::before {
            left: 100%;
        }

        .stat-card:hover {
            border-color: #2563eb;
            box-shadow: 0 25px 30px -12px rgba(37, 99, 235, 0.25);
            transform: translateY(-8px) scale(1.02);
        }

        .stat-icon {
            width: 56px;
            height: 56px;
            background: linear-gradient(145deg, #eef6ff, #e0e7ff);
            border-radius: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            color: #2563eb;
            transition: all 0.3s ease;
        }

        .stat-card:hover .stat-icon {
            transform: rotate(360deg) scale(1.1);
            background: linear-gradient(145deg, #2563eb, #1d4ed8);
            color: white;
        }

        .nit-clickeable {
            cursor: pointer;
            font-weight: 600;
            color: #2563eb;
            background: #eef6ff;
            padding: 8px 16px;
            border-radius: 40px;
            font-size: 0.8rem;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
        }

        .nit-clickeable::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        .nit-clickeable:hover::before {
            width: 300px;
            height: 300px;
        }

        .nit-clickeable:hover {
            background: linear-gradient(145deg, #2563eb, #1d4ed8);
            color: white;
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
        }

        .nit-clickeable:active {
            transform: translateY(0) scale(0.95);
        }

        .vencimiento-section {
            margin-top: 28px;
            background: linear-gradient(145deg, #f8fafc, #f1f5f9);
            border: 1px solid #e2e8f0;
            border-radius: 28px;
            padding: 28px;
            display: none;
        }

        .vencimiento-section.active {
            display: block;
            animation: slideInDown 0.5s cubic-bezier(0.23, 1, 0.32, 1);
        }

        @keyframes slideInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        /* =====================================================
           FIN: BOTON ASOCIADOS EASYPOS
           ===================================================== */

        /* =====================================================
           INICIO: BOTON ADMINISTRAR PLANES (Estilos de badges)
           ===================================================== */
        .plan-badge {
            padding: 6px 16px;
            border-radius: 40px;
            font-size: 0.75rem;
            font-weight: 600;
            display: inline-block;
            transition: all 0.3s ease;
        }

        .plan-gratis { 
            background: linear-gradient(145deg, #f1f5f9, #e2e8f0); 
            color: #475569; 
        }
        .plan-basico { 
            background: linear-gradient(145deg, #dbeafe, #bfdbfe); 
            color: #2563eb; 
        }
        .plan-estandar { 
            background: linear-gradient(145deg, #ede9fe, #ddd6fe); 
            color: #7c3aed; 
        }
        .plan-premium { 
            background: linear-gradient(145deg, #fef3c7, #fde68a); 
            color: #b6560b; 
        }

        .plan-badge:hover {
            transform: scale(1.1);
            filter: brightness(1.1);
        }

        .whatsapp-link {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #25D366;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .whatsapp-link:hover {
            color: #128C7E;
            transform: scale(1.1);
        }
        /* =====================================================
           FIN: BOTON ADMINISTRAR PLANES
           ===================================================== */

        /* =====================================================
           INICIO: MODAL Y OTROS ESTILOS (CORREGIDO - UN SOLO MODAL)
           ===================================================== */
        .modal-unico {
            display: none !important;
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: 100% !important;
            background: rgba(0, 0, 0, 0.7) !important;
            backdrop-filter: blur(5px) !important;
            z-index: 9999999 !important;
            align-items: center !important;
            justify-content: center !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        .modal-unico.show {
            display: flex !important;
        }

        .modal-unico-content {
            background: white !important;
            border-radius: 32px !important;
            padding: 35px !important;
            width: 550px !important;
            max-width: 95% !important;
            max-height: 90vh !important;
            overflow-y: auto !important;
            position: relative !important;
            z-index: 10000000 !important;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3) !important;
            animation: modalSlideIn 0.3s ease !important;
        }

        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: translateY(50px) scale(0.9);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .modal-unico-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 2px solid #f1f5f9;
        }

        .modal-unico-header h2 {
            color: #0b2b4a;
            font-size: 1.8rem;
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 0;
        }

        .modal-unico-header h2 i {
            color: #f97316;
        }

        .close-modal-unico {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: #f1f5f9;
            border: none;
            font-size: 1.3rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
            color: #475569;
        }

        .close-modal-unico:hover {
            background: #ef4444;
            color: white;
            transform: rotate(90deg);
        }

        .modal-unico-body {
            color: #475569;
            margin-bottom: 25px;
            line-height: 1.6;
        }

        .modal-unico-actions {
            display: flex;
            gap: 15px;
            justify-content: flex-end;
        }

        .modal-unico-btn {
            padding: 14px 28px;
            border: none;
            border-radius: 40px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 1rem;
        }

        .modal-unico-btn-cancel {
            background: #e2e8f0;
            color: #475569;
        }

        .modal-unico-btn-cancel:hover {
            background: #cbd5e1;
            transform: translateY(-2px);
        }

        .modal-unico-btn-confirm {
            background: #2563eb;
            color: white;
        }

        .modal-unico-btn-confirm:hover {
            background: #1d4ed8;
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
        }
        
        /* Mejora para carga rápida */
        .skeleton {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite;
            border-radius: 4px;
            height: 20px;
            margin: 5px 0;
        }

        @keyframes loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        
        .sidebar, .main-content, .menu-item, button, a, .page-container, .table-container {
            position: relative;
            z-index: 1;
        }
        
        .menu-item, button, a, [onclick] {
            cursor: pointer;
            pointer-events: auto !important;
        }
        
        /* ELIMINAMOS LAS PARTÍCULAS */
        #particles {
            display: none !important;
        }
        
        /* =====================================================
           ESTILOS PARA CRUD - ACCIONES POR FILA
           ===================================================== */
        .acciones-container {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .btn-accion {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        .btn-accion:hover {
            transform: translateY(-3px) scale(1.1);
            box-shadow: 0 8px 15px rgba(0,0,0,0.2);
        }

        .btn-accion:active {
            transform: translateY(0) scale(0.95);
        }

        .btn-ver {
            background: linear-gradient(145deg, #3b82f6, #2563eb);
            color: white;
        }

        .btn-editar {
            background: linear-gradient(145deg, #f97316, #ea580c);
            color: white;
        }

        .btn-eliminar {
            background: linear-gradient(145deg, #ef4444, #dc2626);
            color: white;
        }

        .btn-duplicar {
            background: linear-gradient(145deg, #10b981, #059669);
            color: white;
        }

        .btn-pdf {
            background: linear-gradient(145deg, #8b5cf6, #7c3aed);
            color: white;
        }

        .btn-whatsapp {
            background: linear-gradient(145deg, #25D366, #128C7E);
            color: white;
        }

        .btn-email {
            background: linear-gradient(145deg, #64748b, #475569);
            color: white;
        }

        /* Tooltips */
        [data-tooltip] {
            position: relative;
            cursor: pointer;
        }

        [data-tooltip]:before {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 120%;
            left: 50%;
            transform: translateX(-50%);
            background: #1e293b;
            color: white;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 0.75rem;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        [data-tooltip]:hover:before {
            opacity: 1;
            visibility: visible;
            bottom: 150%;
        }

        /* =====================================================
           MENÚ DESPLEGABLE CRUD
           ===================================================== */
        .crud-dropdown-container {
            position: relative;
            display: inline-block;
        }

        .crud-dropdown-button {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(145deg, #f97316, #ea580c);
            border: none;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            box-shadow: 0 4px 10px rgba(249,115,22,0.3);
        }

        .crud-dropdown-button:hover {
            transform: rotate(90deg) scale(1.1);
            box-shadow: 0 8px 20px rgba(249,115,22,0.4);
        }

        .crud-dropdown-menu {
            position: absolute;
            right: 0;
            top: 50px;
            background: white;
            border-radius: 20px;
            width: 250px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
            border: 1px solid #f97316;
            z-index: 1000;
            display: none;
            animation: slideDownMenu 0.3s ease;
            overflow: hidden;
        }

        .crud-dropdown-menu.show {
            display: block;
        }

        @keyframes slideDownMenu {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .crud-dropdown-item {
            padding: 15px 20px;
            display: flex;
            align-items: center;
            gap: 15px;
            cursor: pointer;
            transition: all 0.2s;
            border-bottom: 1px solid #f1f5f9;
            color: #334155;
            font-weight: 500;
        }

        .crud-dropdown-item:last-child {
            border-bottom: none;
        }

        .crud-dropdown-item:hover {
            background: #fff7ed;
            padding-left: 25px;
        }

        .crud-dropdown-item i {
            width: 22px;
            font-size: 1.1rem;
        }

        .crud-dropdown-item .fa-eye { color: #3b82f6; }
        .crud-dropdown-item .fa-edit { color: #f97316; }
        .crud-dropdown-item .fa-copy { color: #10b981; }
        .crud-dropdown-item .fa-file-pdf { color: #ef4444; }
        .crud-dropdown-item .fa-whatsapp { color: #25D366; }
        .crud-dropdown-item .fa-envelope { color: #64748b; }
        .crud-dropdown-item .fa-trash { color: #dc2626; }

        .crud-dropdown-item span {
            flex: 1;
            font-size: 0.95rem;
        }

        .crud-dropdown-item .shortcut {
            color: #94a3b8;
            font-size: 0.7rem;
            background: #f1f5f9;
            padding: 3px 8px;
            border-radius: 40px;
        }

        /* Versión para móviles */
        @media (max-width: 768px) {
            .crud-dropdown-menu {
                position: fixed;
                top: auto;
                bottom: 20px;
                right: 20px;
                left: 20px;
                width: auto;
                max-width: 300px;
                margin: 0 auto;
            }
        }

        /* =====================================================
           NUEVOS ESTILOS PARA SIDEBAR DE ANUNCIOS
           ===================================================== */
        .sidebar-anuncios {
            width: 350px;
            background: white;
            border-left: 1px solid #eef2f6;
            padding: 24px 16px;
            overflow-y: auto;
            box-shadow: -4px 0 20px rgba(0,0,0,0.02);
            height: calc(100vh - 48px);
            position: sticky;
            top: 24px;
        }

        .seccion-anuncios {
            margin-bottom: 30px;
            border-radius: 16px;
            overflow: hidden;
            background: #f8fafc;
            border: 1px solid #eef2f6;
        }

        .titulo-seccion {
            padding: 15px 16px;
            background: linear-gradient(135deg, #f8fafc, #ffffff);
            border-bottom: 2px solid #eef2f6;
            font-weight: 700;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .items-anuncios {
            padding: 16px;
        }

        .item-anuncio {
            background: white;
            border-radius: 12px;
            margin-bottom: 16px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            border: 1px solid #eef2f6;
            cursor: pointer;
        }

        .item-anuncio:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            border-color: #f97316;
        }

        .anuncio-media {
            width: 100%;
            height: 160px;
            background: #1e293b;
            position: relative;
            overflow: hidden;
        }

        .anuncio-media img,
        .anuncio-media video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .anuncio-texto {
            padding: 16px;
            background: white;
        }

        .anuncio-texto p {
            color: #475569;
            font-size: 0.9rem;
            line-height: 1.5;
            margin-bottom: 12px;
        }

        .anuncio-link {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            color: #f97316;
            font-weight: 600;
            text-decoration: none;
            font-size: 0.85rem;
        }

        .badge-posicion {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0,0,0,0.6);
            color: white;
            padding: 4px 10px;
            border-radius: 30px;
            font-size: 0.7rem;
            backdrop-filter: blur(4px);
            z-index: 2;
        }

        .sin-anuncios {
            text-align: center;
            padding: 30px 20px;
            color: #94a3b8;
            background: #f8fafc;
            border-radius: 12px;
            border: 2px dashed #e2e8f0;
        }

        /* =====================================================
           FORMULARIOS PARA ANUNCIOS
           ===================================================== */
        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            font-weight: 600;
            color: #475569;
            margin-bottom: 8px;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid #e2e8f0;
            border-radius: 16px;
            font-size: 1rem;
            transition: all 0.3s;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #f97316;
        }

        /* Notificaciones toast */
        .toast-notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 16px 24px;
            background: white;
            border-radius: 60px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
            display: flex;
            align-items: center;
            gap: 15px;
            z-index: 20000;
            animation: slideInRight 0.3s ease;
            border-left: 5px solid #10b981;
            max-width: 400px;
        }

        .toast-notification.success { border-left-color: #10b981; }
        .toast-notification.error { border-left-color: #ef4444; }
        .toast-notification.warning { border-left-color: #f97316; }
        .toast-notification.info { border-left-color: #3b82f6; }

        .toast-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }

        .toast-content {
            flex: 1;
        }

        .toast-title {
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 4px;
        }

        .toast-message {
            color: #64748b;
            font-size: 0.9rem;
        }

        .toast-close {
            color: #94a3b8;
            cursor: pointer;
            padding: 5px;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        
        /* =====================================================
           ESTILOS PARA BOTÓN NUEVO ANUNCIO
           ===================================================== */
        .btn-crear {
            background: linear-gradient(145deg, #f97316, #ea580c);
            color: white;
            border: none;
            padding: 14px 28px;
            border-radius: 40px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            z-index: 1000;
            box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.4);
            font-size: 1rem;
        }

        .btn-crear:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.5);
        }

        .btn-crear:active {
            transform: translateY(0) scale(0.98);
        }
        
        /* =====================================================
           ESTILOS RESPONSIVE PARA MODAL
           ===================================================== */
        @media (max-width: 768px) {
            .modal-unico-content {
                padding: 25px !important;
                width: 95% !important;
            }
            
            .modal-unico [style*="grid-template-columns: 1fr 1fr"] {
                
            }
        }
        
         
    /* SOLUCIÓN DIRECTA PARA EL MODAL DE ANUNCIOS */
    #modalAnuncioUnico {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-color: rgba(0, 0, 0, 0.8) !important;
        z-index: 999999999 !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #modalAnuncioUnico.show {
        display: flex !important;
    }

    #modalAnuncioUnico .modal-unico-content {
        background: white !important;
        width: 600px !important;
        max-width: 95% !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        border-radius: 24px !important;
        padding: 30px !important;
        box-shadow: 0 30px 60px rgba(0,0,0,0.3) !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Mostrar todos los elementos del formulario */
    #modalAnuncioUnico form,
    #modalAnuncioUnico .form-group,
    #modalAnuncioUnico input,
    #modalAnuncioUnico select,
    #modalAnuncioUnico textarea,
    #modalAnuncioUnico button {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Arreglar el fondo oscuro cuando el modal está abierto */
    body.modal-open {
        overflow: hidden !important;
    }

.modal-unico{
    position: fixed !important;
    inset: 0 !important;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999999 !important;
    
}

.modal-unico.show{
    display:flex !important;
}
    
/* =====================================================
   GESTIÓN DE ANUNCIOS - SIDEBAR
   ===================================================== */

/* Dropdowns */
.dropdown-content {
    position: absolute;
    background: white;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    right: 0;
}

.dropdown-content a,
.dropdown-content div {
    padding: 10px 16px;
    display: block;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:last-child,
.dropdown-content div:last-child {
    border-bottom: none;
}

.dropdown-content a:hover,
.dropdown-content div:hover {
    background: #f1f5f9;
}

/* Botones icono */
.btn-icono {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icono:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Bloques de items en sidebar */
.item-bloque-sidebar {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.item-bloque-sidebar:hover {
    border-color: #f97316;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.1);
}

.item-bloque-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-bloque-header h4 {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-bloque-contenido {
    width: 100%;
}

.item-bloque-contenido input[type="file"] {
    width: 100%;
    padding: 6px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}

.item-bloque-contenido textarea,
.item-bloque-contenido input[type="url"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
}

/* Botón eliminar item */
.btn-eliminar-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.btn-eliminar-item:hover {
    transform: scale(1.1);
}

/* Scrollbar personalizado */
#items-anuncio-sidebar {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

#items-anuncio-sidebar::-webkit-scrollbar {
    width: 4px;
}

#items-anuncio-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#items-anuncio-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}



