/* ============================================
   SIDEBAR - FIXED
   ============================================ */

.sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid #e9edf2;
    min-height: calc(100vh - 60px);
    padding: 20px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    overflow-y: auto;
    position: relative;
    z-index: 999;
}

/* Sidebar on mobile - hidden by default */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 60px;
        left: -280px;
        width: 280px;
        height: calc(100vh - 60px);
        z-index: 999;
        box-shadow: 2px 0 20px rgba(0,0,0,0.1);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: none;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100% - 60px);
        background: rgba(0,0,0,0.4);
        z-index: 998;
        animation: fadeIn 0.3s ease;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Sidebar menu items */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #888;
    transition: color 0.2s ease;
}

.sidebar-menu a:hover {
    background: #f0f7f5;
    color: #0a4a3a;
}

.sidebar-menu a:hover i {
    color: #0a4a3a;
}

.sidebar-menu a.active {
    background: #f0f7f5;
    color: #0a4a3a;
    border-left-color: #0a4a3a;
    font-weight: 600;
}

.sidebar-menu a.active i {
    color: #0a4a3a;
}

/* Menu toggle button */
.menu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

/* ============================================
   MAIN CONTENT - FIXED
   ============================================ */

.main-content {
    flex: 1;
    padding: 25px;
    background: #f4f7f6;
    min-height: calc(100vh - 60px);
    transition: padding 0.3s ease;
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
}

/* ============================================
   APP BODY - FIXED
   ============================================ */

.app-body {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 60px);
}

@media (max-width: 768px) {
    .app-body {
        display: block;
    }
}