/* AMD Menu PRO - Frontend Styles (Light Mode) */
/* Archivo: assets/css/frontend.css */

.amd-menu-pro {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.amd-menu-container {
    width: 80px;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.08);
    border-right: 1px solid #e5e7eb;
}

/* Logo */
.amd-menu-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.amd-menu-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Navigation */
.amd-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
}

/* Menu Items */
.amd-menu-item {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    margin: 0 auto;
}

.amd-menu-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    transform: translateX(5px);
}

.amd-menu-item.amd-active {
    background: linear-gradient(135deg, #eea58a 0%, #d88c70 100%);
    border-color: #eea58a;
    box-shadow: 0 4px 5px #926846;
}

.amd-menu-item.amd-active::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: linear-gradient(135deg, #eea58a 0%, #d88c70 100%);
    border-radius: 0 4px 4px 0;
}

.amd-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amd-item-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    display: block;
}

.amd-menu-item:hover .amd-item-icon img {
    opacity: 0.8;
}

.amd-menu-item.amd-active .amd-item-icon img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* Tooltip */
.amd-menu-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
}

.amd-menu-item:hover::after {
    opacity: 1;
    margin-left: 20px;
}

/* User Avatar */
.amd-menu-user {
    margin-top: auto;
    padding-top: 20px;
}

.amd-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.amd-user-avatar:hover {
    transform: scale(1.05);
    border-color: #d1d5db;
    background: #e5e7eb;
}

.amd-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.amd-user-avatar.amd-guest {
    background: #f9fafb;
}

.amd-user-avatar.amd-guest svg {
    width: 24px;
    height: 24px;
}

.amd-user-avatar.amd-guest svg circle,
.amd-user-avatar.amd-guest svg path {
    stroke: #9ca3af;
}

/* User Tooltip */
.amd-user-avatar::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
}

.amd-user-avatar:hover::after {
    opacity: 1;
    margin-left: 20px;
}

/* Logout Button */
.amd-logout-btn {
    width: 50px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #7d87c4;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    padding: 0 8px;
}

.amd-logout-btn:hover {
    background: #6b75b0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(125, 135, 196, 0.4);
}

.amd-logout-btn svg {
    display: none;
}

/* Toggle Button para Móviles */
.amd-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 45px;
    height: 45px;
    background: #7d87c4;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.amd-menu-toggle:hover {
    background: #6b75b0;
    transform: scale(1.05);
}

.amd-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    margin: 5px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation for active state */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(249, 115, 22, 0.25);
    }
    50% {
        box-shadow: 0 4px 25px rgba(249, 115, 22, 0.4);
    }
}

.amd-menu-item.amd-active {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive Desktop/Tablet */
@media (max-width: 1024px) {
    .amd-menu-container {
        width: 70px;
    }
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .amd-menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .amd-menu-pro {
        display: block;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .amd-menu-pro.amd-menu-open {
        transform: translateX(0);
    }
    
    body {
        padding-left: 0 !important;
    }
    
    .amd-menu-container {
        width: 60px;
        padding: 15px 0;
    }
    
    .amd-menu-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 20px;
    }
    
    .amd-menu-item,
    .amd-user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .amd-menu-nav {
        padding: 0 10px;
        gap: 10px;
    }
    
    .amd-item-icon {
        width: 20px;
        height: 20px;
    }
    
    .amd-logout-btn {
        width: 42px;
        height: 24px;
        font-size: 10px;
        margin-bottom: 8px;
    }
    
    /* Overlay oscuro cuando el menú está abierto */
    .amd-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        transition: opacity 0.3s ease;
    }
    
    .amd-menu-overlay.active {
        display: block;
    }
    
    /* Animación del botón hamburguesa */
    .amd-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .amd-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .amd-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Responsive Mobile Pequeño */
@media (max-width: 480px) {
    .amd-menu-container {
        width: 50px;
        padding: 10px 0;
    }
    
    .amd-menu-logo {
        width: 35px;
        height: 35px;
        margin-bottom: 15px;
    }
    
    .amd-menu-item,
    .amd-user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .amd-menu-nav {
        padding: 0 7px;
        gap: 8px;
    }
    
    .amd-logout-btn {
        width: 38px;
        height: 22px;
        font-size: 9px;
        margin-bottom: 8px;
    }
}