/* Sidebar Manager Styles v3.0 (Full Impact Redesign) */

/* --- FAB Button --- */
.illan-fab-menu {
    position: fixed; bottom: 30px; right: 30px;
    width: 60px; height: 60px; border-radius: 50%;
    background-color: var(--color-text);
    color: #fff; border: none; cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center; justify-content: center;
}
.illan-fab-menu:hover { transform: scale(1.1); background-color: var(--color-accent); }
.illan-fab-menu:active { transform: scale(0.95); }

/* --- Overlay --- */
.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 9998; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease; backdrop-filter: blur(5px);
}
body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }

/* --- Sidebar Container (Layout) --- */
.sidebar-container {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 400px; max-width: 100vw; /* Asegura responsive */
    background: var(--color-bg); 
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    border-left: 1px solid var(--color-border);
}
body.sidebar-open .sidebar-container { transform: translateX(0); }

/* --- FULL WIDTH EN MÓVIL --- */
@media (max-width: 480px) {
    .sidebar-container {
        width: 100%; /* Ocupa toda la pantalla */
        border-left: none;
    }
}

/* --- SCROLL WRAPPER --- */
.sidebar-scroll-wrapper {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 2rem;
    scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.1) transparent;
}

/* --- Header & Profile --- */
.sidebar-header {
    padding: 4rem 1.5rem 2rem;
    background: linear-gradient(to bottom, #ffffff 0%, var(--color-bg) 100%);
    text-align: center;
}

.brand-avatar { 
    width: 120px; height: 120px; /* AUMENTADO */
    border-radius: 50%; margin: 0 auto 1.2rem; object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.brand-name { 
    font-size: 1.8rem; font-weight: 900; color: var(--color-text); 
    letter-spacing: -1px; margin-bottom: 1.5rem; line-height: 1.1;
}

/* Pills Navigation (Hardcoded) */
.hardcoded-nav { 
    display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2.5rem; 
}
.nav-pill {
    font-size: 0.8rem; padding: 8px 16px; border-radius: 50px;
    background: #fff; color: var(--color-text);
    border: 1px solid var(--color-border);
    font-weight: 600; transition: all 0.2s;
}
.nav-pill:hover { 
    border-color: var(--color-text); background: var(--color-text); color: #fff;
    transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Authentication Actions --- */
.user-actions-wrapper { 
    text-align: left; background: #fff; padding: 1rem; border-radius: 16px;
    border: 1px solid var(--color-border); box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* Grid de Botones Auth */
.auth-buttons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-auth-primary {
    display: flex; align-items: center; justify-content: center; padding: 0.9rem;
    background: var(--color-text); color: #fff; border-radius: 10px; 
    font-weight: 600; transition: all 0.2s; text-align: center;
}
.btn-auth-primary:hover { background: #000; transform: translateY(-1px); }

.btn-auth-secondary {
    display: flex; align-items: center; justify-content: center; padding: 0.9rem;
    background: #fff; color: var(--color-text); border: 1px solid var(--color-border); 
    border-radius: 10px; font-weight: 600; transition: all 0.2s; text-align: center;
}
.btn-auth-secondary:hover { border-color: var(--color-text); background: #fafafa; }

/* Logged In State */
.user-dropdown-trigger { 
    display: flex; justify-content: space-between; align-items: center; cursor: pointer;
    padding: 0.5rem; user-select: none;
}
.user-info-row { display: flex; align-items: center; gap: 10px; }
.user-avatar-mini {
    width: 32px; height: 32px; background: var(--color-accent); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}
.user-name-label { font-weight: 700; font-size: 0.95rem; }

.user-dropdown-menu { 
    display: none; flex-direction: column; gap: 4px; margin-top: 10px; 
    border-top: 1px solid #f0f0f0; padding-top: 10px;
}
.user-dropdown-trigger.active + .user-dropdown-menu { display: flex; animation: slideDown 0.2s ease; }
.user-dropdown-menu a { 
    font-size: 0.95rem; padding: 10px 12px; color: var(--color-text-light); border-radius: 8px; font-weight: 500;
}
.user-dropdown-menu a:hover { background: #f5f5f5; color: var(--color-text); }
.logout-link { color: #e74c3c !important; }

/* --- NAV MENUS: Clean & Elegant --- */
.sidebar-content-area { padding: 1rem 2rem; }
.nav-section { margin-bottom: 3rem; }
.nav-label { 
    display: block; text-transform: uppercase; font-size: 0.75rem; font-weight: 800; 
    letter-spacing: 1.5px; color: #aaa; margin-bottom: 1.2rem;
}

/* Estilo Universal de Listas (Sin puntos) */
.nav-section ul { 
    list-style: none !important; margin: 0; padding: 0; 
    display: flex; flex-direction: column; gap: 0.5rem;
}
.nav-section ul li { margin: 0; padding: 0; list-style: none; }

/* 1. PUBLIC MENU (Elegant Links) */
.nav-public ul li a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.8rem 0;
    font-size: 1.15rem; font-weight: 500; color: var(--color-text);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}
.nav-public ul li a:hover { 
    color: var(--color-accent); padding-left: 10px; border-bottom-color: var(--color-accent); 
}
/* Añadir flecha sutil con CSS */
.nav-public ul li a::after {
    content: '→'; opacity: 0; transform: translateX(-10px); transition: all 0.2s;
}
.nav-public ul li a:hover::after { opacity: 1; transform: translateX(0); }


/* 2. VIP MENU (Cards) */
.nav-vip ul { gap: 1rem; }
.nav-vip ul li a {
    display: block; padding: 1.2rem; background: #fff;
    border: 1px solid #e0d4e8; border-radius: 12px;
    color: #8e44ad; font-weight: 700; font-size: 1rem;
    box-shadow: 0 4px 10px rgba(142, 68, 173, 0.05);
    transition: all 0.2s ease;
}
.nav-vip ul li a:hover { 
    transform: translateY(-3px); box-shadow: 0 8px 20px rgba(142, 68, 173, 0.15); 
    border-color: #9b59b6;
}

/* 3. ADMIN MENU (Technical) */
.nav-admin ul { 
    background: #fff5eb; border-left: 4px solid #e67e22; 
    border-radius: 0 8px 8px 0; padding: 0.8rem 0;
}
.nav-admin ul li a {
    display: block; padding: 6px 20px; font-family: monospace; font-size: 0.9rem; 
    color: #d35400; transition: padding 0.2s;
}
.nav-admin ul li a:hover { padding-left: 25px; background: rgba(230, 126, 34, 0.1); }


/* --- Footer --- */
.sidebar-footer {
    padding: 1.5rem 2rem; background: #fff;
    border-top: 1px solid var(--color-border);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8rem; color: #bbb; z-index: 20;
}
.brand-mark { font-weight: 900; color: var(--color-text); }
.legal-link:hover { text-decoration: underline; color: var(--color-text); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }


/* --- BOTÓN CERRAR (X) --- */
.illan-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001; /* Por encima de todo en el sidebar */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: all 0.2s ease;
}

.illan-close-btn:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--color-text);
    transform: rotate(90deg); /* Pequeña animación chula */
}

.illan-close-btn svg {
    width: 28px;
    height: 28px;
}

/* Ajustamos el padding del header para que no se solape con la X */
.sidebar-header {
    padding-top: 5rem; /* Más espacio arriba */
}