/* Sidebar Styles */
.sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
}

.sidebar {
    width: 270px;
    height: 100vh;
    background: linear-gradient(135deg, #2E86AB 0%, #1e5f7a 100%);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(0);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(241, 143, 1, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

/* Logo */
.logo {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.logo a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #F18F01, #ff9f1a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 15px rgba(241, 143, 1, 0.3);
    transition: all 0.3s ease;
}

.logo span {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
}

.logo a:hover .logo-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(241, 143, 1, 0.4);
}

/* Navigation */
.nav {
    list-style: none;
    padding: 2rem 0;
    flex: 1;
    position: relative;
    z-index: 1;
}

.nav li {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, #F18F01, #ff9f1a);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #F18F01;
    transform: translateX(5px);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 3px;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-link:hover i,
.nav-link.active i {
    transform: scale(1.2);
    color: #F18F01;
}

.nav-link span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: linear-gradient(135deg, #2E86AB, #1e5f7a);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(46, 134, 171, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-toggle:hover {
    background: linear-gradient(135deg, #F18F01, #ff9f1a);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(241, 143, 1, 0.4);
}

.mobile-toggle i {
    font-size: 1.2rem;
}

/* Overlay for mobile */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
}

/* Edge Detection for Large Screens */
.edge-detection {
    position: fixed;
    left: 0;
    top: 0;
    width: 20px;
    height: 100vh;
    z-index: 998;
    background: transparent;
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .overlay {
        display: block;
    }
    
    .edge-detection {
        display: block;
    }
}

@media (min-width: 1025px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 270px;
    }
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(241, 143, 1, 0.5);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(241, 143, 1, 0.7);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.sidebar.sliding-in {
    animation: slideIn 0.3s ease forwards;
}

.sidebar.sliding-out {
    animation: slideOut 0.3s ease forwards;
}

/* Hover Effects */
.nav-link::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    width: 0;
    height: 2px;
    background: #F18F01;
    transition: all 0.3s ease;
    opacity: 0;
}

.nav-link:hover::after {
    width: 20px;
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}

/* Active state enhancements */
.nav-link.active {
    background: linear-gradient(90deg, rgba(241, 143, 1, 0.2), rgba(241, 143, 1, 0.05));
    box-shadow: inset 3px 0 0 #F18F01;
}

.nav-link.active i {
    color: #F18F01;
    text-shadow: 0 0 10px rgba(241, 143, 1, 0.3);
}

/* Focus states for accessibility */
.nav-link:focus {
    outline: 2px solid #F18F01;
    outline-offset: -2px;
}

.mobile-toggle:focus {
    outline: 2px solid #F18F01;
    outline-offset: 2px;
}

/* Custom scrollbar for sidebar on mobile */
@media (max-width: 1024px) {
    .sidebar {
        scrollbar-width: thin;
        scrollbar-color: rgba(241, 143, 1, 0.5) rgba(255, 255, 255, 0.1);
    }
}