/* Admin Layout Structure */
body.admin-dashboard {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-color: #f8f9fa;
}

/* Fixed Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background-color: #343a40;
    color: white;
    z-index: 1030;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    flex: 1;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Top Navigation */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Sidebar Content Styling */
.sidebar-header {
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .nav {
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    margin: 0.1rem 0;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    border-left: 3px solid #4e73df;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}
/* Sidebar toggle states */
.sidebar-collapsed .sidebar {
    margin-left: -250px;
}

.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}
/* Mobile Sidebar Styles */
@media (max-width: 740.98px) {
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    
    .sidebar-transitions-enabled .sidebar {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar-collapsed .sidebar {
        transform: translateX(0);
    }
    
    .sidebar-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 1.8rem;
        line-height: 1;
        padding: 0.5rem;
        z-index: 1;
        cursor: pointer;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.visible {
        opacity: 1;
    }
    
    /* Improve mobile touch targets */
    .nav-link {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.mobile-view.sidebar-collapsed {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* Larger mobile devices in landscape */
@media (max-width: 767.98px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }
}