/* Modern Sidebar Styles */
.modern-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.modern-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.brand-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.sidebar-close:hover {
    background-color: rgba(255,255,255,0.1);
}

.sidebar-content {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-nav {
    padding: 0 20px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(4px);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.nav-text {
    font-size: 14px;
    white-space: nowrap;
}

.nav-section {
    margin: 20px 0 10px 0;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.6);
    padding: 0 16px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.user-details {
    flex: 1;
}

.user-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.user-role {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    text-transform: capitalize;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .modern-sidebar {
        width: 260px;
    }

    .sidebar-header {
        padding: 16px;
    }

    .sidebar-content {
        padding: 16px 0;
    }

    .sidebar-nav {
        padding: 0 16px;
    }

    .sidebar-footer {
        padding: 16px;
    }
}

@media (min-width: 769px) {
    #app {
        display: flex !important;
        min-height: 100vh !important;
    }

    .modern-sidebar {
        position: static !important;
        transform: translateX(0) !important;
        box-shadow: none !important;
        border-right: 1px solid rgba(0,0,0,0.1) !important;
        flex-shrink: 0 !important;
        width: 280px !important;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .sidebar-close {
        display: none !important;
    }

    /* Main content positioning for desktop */
    .main-content {
        flex: 1 !important;
        margin-left: 0 !important;
    }
}

/* Animation for nav items */
.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }
.nav-item:nth-child(6) { animation-delay: 0.35s; }
.nav-item:nth-child(7) { animation-delay: 0.4s; }

.nav-item {
    animation: slideInLeft 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover effects */
.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: white;
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-link {
    position: relative;
}

/* Scrollbar styling */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Logout Button Styles */
.sidebar-logout {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.sidebar-logout i {
    font-size: 16px;
}
