/* =========================================
   SIDEBAR PROFESIONAL Y RESPONSIVO (SAAS-POSSI)
   ========================================= */

:root {
    --sidebar-bg: #09090b;
    --sidebar-width: 280px;
    --sidebar-transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* SIDEBAR BASE (Escritorio por defecto con Degradado Negro a Lila Suave) */
.sidebar-left {
    background: linear-gradient(180deg, #111116 0%, #2b1d3d 100%) !important;
    width: var(--sidebar-width);
    color: #ffffff;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5) !important;
    display: flex;
    flex-direction: column;
    z-index: 1045;
    border-right: 1px solid rgba(216, 180, 254, 0.1) !important;
}

/* HEADER DEL OFFCANVAS */
.sidebar-left .offcanvas-header {
    border-color: rgba(216, 180, 254, 0.15) !important;
}

/* CAJA DE INVITACIÓN (CTA) */
.sidebar-cta {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(216, 180, 254, 0.15) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #ffffff !important;
}

.sidebar-cta p, 
.sidebar-cta span,
.sidebar-cta div {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ENLACES Y NAVEGACIÓN DEL SIDEBAR */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--sidebar-transition);
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.92rem;
}

.sidebar-link i {
    font-size: 1.15rem;
    opacity: 0.75;
    transition: var(--sidebar-transition);
}

/* HOVER EN ENLACES CON EFECTO BLANCO */
.sidebar-link:hover {
    background: rgba(216, 180, 254, 0.15) !important;
    color: #ffffff !important;
    transform: translateX(5px);
}

.sidebar-link:hover i {
    opacity: 1;
    transform: scale(1.1);
    color: #ffffff !important;
}

/* ENLACE ACTIVO DINÁMICO */
.sidebar-link.active {
    background: linear-gradient(135deg, #7c3aed 0%, #581c87 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.sidebar-link.active i {
    opacity: 1;
    color: #ffffff !important;
}

/* =========================================
   BOTÓN DE LOGIN LLAMATIVO
   ========================================= */
.btn-sidebar-login {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.btn-sidebar-login:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6) !important;
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%) !important;
    color: #ffffff !important;
}

/* =========================================
   BOTÓN DE CIERRE (X) CON HOVER Y ROTACIÓN
   ========================================= */
.btn-close, 
.btn-close-white {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 50% !important;
    padding: 0.65rem !important;
    opacity: 0.8 !important;
    transition: all 0.25s ease-in-out !important;
    outline: none !important;
    box-shadow: none !important;
    filter: invert(1) grayscale(100%);
}

.btn-close:hover, 
.btn-close-white:hover {
    background-color: rgba(239, 68, 68, 0.85) !important;
    opacity: 1 !important;
    transform: rotate(90deg) scale(1.1) !important;
    filter: invert(0) grayscale(100%) !important;
}

/* =========================================
   ADAPTABILIDAD MÓVIL (RESPONSIVE DESIGN)
   ========================================= */
@media (max-width: 991.98px) {
    .sidebar-left {
        width: 100% !important;
        max-width: 300px;
    }
}