/* enGO! Drinks - Sidebar del panel */

.sidebar {
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #1b2740 0%, #162033 55%, #131c2e 100%);
    border-right: 1px solid var(--vidrio-borde);
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 2000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Logo de enGO! Drinks */
.sidebar-logo-container { margin-bottom: 28px; display: flex; flex-direction: column; align-items: flex-start; }
.sidebar-logo-img { height: 28px; max-width: 100%; width: auto; object-fit: contain; margin-bottom: 8px; }
.sidebar-subtitle { font-size: 0.78rem; color: var(--texto-gris); margin: 0; padding-left: 5px; letter-spacing: 0.04em; }

/* Menú */
.nav-menu { flex-grow: 1; }

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--texto-gris);
    text-decoration: none;
    padding: 11px 14px;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-link:hover {
    background-color: rgba(59, 130, 246, 0.12);
    color: #fff;
    transform: translateX(3px);
}

/* Página actual */
.nav-link.activo {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.30), rgba(139, 92, 246, 0.10));
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.28), 0 6px 18px rgba(59, 130, 246, 0.12);
}
.nav-link.activo svg { color: #7dd3fc; }
.nav-link.activo::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 22%;
    height: 56%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--grad-acento);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
}

.nav-link-soporte {
    margin-top: auto;
    color: #93c5fd;
    background-color: rgba(59, 130, 246, 0.06);
    border: 1px dashed rgba(59, 130, 246, 0.35);
}

.nav-link-salir { color: #f87171; margin: 5px 0 0 0; }
.nav-link-salir:hover { background-color: rgba(239, 68, 68, 0.12); color: #fca5a5; }

/* Celular: botón de menú y fondo oscuro */
.btn-hamburguesa { display: none; position: fixed; top: 15px; left: 15px; z-index: 1500; background: var(--tarjeta-bg); border: 1px solid var(--borde); color: white; font-size: 1.5rem; border-radius: 10px; padding: 5px 12px; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.overlay-sidebar { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 1900; backdrop-filter: blur(2px); }
.overlay-sidebar.activo { display: block; }
.btn-cerrar-x { display: none; position: absolute; top: 15px; right: 15px; background: transparent; border: none; color: var(--texto-gris); font-size: 1.5rem; cursor: pointer; z-index: 2001; }

/* Tarjeta de perfil */
.perfil-container { margin-top: auto; border-top: 1px solid var(--vidrio-borde); padding-top: 15px; }

.perfil-link { display: flex; align-items: center; gap: 12px; padding: 10px; text-decoration: none; border-radius: 12px; transition: 0.2s; cursor: pointer; }
.perfil-link:hover { background-color: rgba(255,255,255,0.05); transform: translateY(-2px); }

.perfil-avatar { width: 42px; height: 42px; background: var(--grad-acento); border-radius: 50% !important; display: flex; align-items: center; justify-content: center; font-weight: bold; color: white; font-size: 1.15rem; flex-shrink: 0; overflow: hidden; border: 2px solid rgba(148, 163, 184, 0.35); box-shadow: 0 0 14px rgba(99, 102, 241, 0.35); position: relative; }
.perfil-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% !important; display: none; /* se muestra cuando llega el logo */ }

.perfil-texto p { margin: 0; }
.perfil-nombre { font-size: 0.9rem; font-weight: bold; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.perfil-rol { font-size: 0.75rem; color: var(--texto-gris); }

/* Celular */
@media (max-width: 768px) {
    .btn-hamburguesa { display: block; }
    .sidebar { transform: translateX(-100%); width: 260px; padding-top: 50px; box-shadow: 4px 0 15px rgba(0,0,0,0.5); }
    .sidebar.abierto { transform: translateX(0); }
    .btn-cerrar-x { display: block; }
    .sidebar-logo-img { height: 26px; }
    .nav-link.activo::before { left: -20px; }
}
