:root {
    --sidebar-width: 280px;
    --primary-gradient: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --accent-gradient: linear-gradient(135deg, #eab308 0%, #fbbf24 100%);
}

body {
    overflow-x: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Botón hamburguesa moderno */
.hamburger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1050;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .hamburger-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
    }

.hamburger-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .hamburger-icon span {
        width: 100%;
        height: 3px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

.hamburger-btn.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-btn.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay oscuro cuando sidebar está abierto */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Sidebar lateral moderno */
.modern-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    z-index: 1045;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #2a2a2a;
}

    .modern-sidebar.active {
        left: 0;
    }

/* Header del sidebar con saludo personalizado */
.sidebar-header {
    padding: 30px 20px;
    background: var(--primary-gradient);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eab308 0%, #fbbf24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
    position: relative;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.user-avatar:has(.avatar-img) .avatar-initials {
    display: none;
}

.user-avatar:has(.avatar-img) {
    background: transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.user-greeting {
    color: white;
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    text-align: center;
}

.user-name {
    color: white;
    margin: 5px 0 0 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* Agregando estilos para sidebar sin sesión */
/* CONTENEDOR DEL LOGO */
.logo-circle-sidebar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.45), 0 4px 12px rgba(185, 28, 28, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

    /* EFECTO SHINE SUAVE (como auth, pero más discreto) */
    .logo-circle-sidebar::before {
        content: "";
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( 45deg, transparent, rgba(255, 255, 255, 0.25), transparent );
        animation: logoShineSidebar 4s ease-in-out infinite;
    }

    /* HOVER */
    .logo-circle-sidebar:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 18px 40px rgba(220, 38, 38, 0.55), 0 8px 18px rgba(185, 28, 28, 0.4);
    }

    /* IMAGEN DEL LOGO */
    .logo-circle-sidebar img {
        width: 48px;
        height: 48px;
        object-fit: contain;
        position: relative;
        z-index: 1;
        filter: brightness(1.15) contrast(1.1);
        transition: all 0.3s ease;
    }

    /* HOVER IMAGEN */
    .logo-circle-sidebar:hover img {
        transform: scale(1.08);
        filter: brightness(1.25) contrast(1.15);
    }

    /* ICONO (fallback) */
    .logo-circle-sidebar i {
        font-size: 1.8rem;
        color: white;
        position: relative;
        z-index: 1;
    }

/* ANIMACIÓN */
@keyframes logoShineSidebar {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    50% {
        transform: translateX(100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}


.gym-name {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.highlight-link {
    background: rgba(220, 38, 38, 0.2);
    border-left: 4px solid #dc2626;
}

    .highlight-link:hover {
        background: rgba(220, 38, 38, 0.3);
    }

/* Menú de navegación moderno */
.sidebar-nav {
    padding: 20px 0 90px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-section-title {
    padding: 15px 20px 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .nav-link-custom::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background: var(--accent-gradient);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .nav-link-custom:hover,
    .nav-link-custom.active {
        background: rgba(220, 38, 38, 0.1);
        color: white;
    }

        .nav-link-custom:hover::before,
        .nav-link-custom.active::before {
            transform: scaleY(1);
        }

    .nav-link-custom i {
        font-size: 20px;
        width: 30px;
        margin-right: 15px;
        color: #eab308;
    }

    .nav-link-custom span {
        font-size: 15px;
        font-weight: 500;
    }

.nav-badge {
    margin-left: auto;
    background: var(--accent-gradient);
    color: #1a1a1a;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* Estilo especial para cerrar sesión */
.logout-link {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

    .logout-link:hover {
        background: rgba(220, 38, 38, 0.2);
        color: #dc2626;
    }

/* Ajuste del contenido principal */
.main-content {
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    padding-top: 90px;
}

.footer {
    background: #1f1f1f;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 1px solid #2a2a2a;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 260px;
    }
}
