:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --header-height: 60px;
    --primary-color: #1b6ec2;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

.school-logo {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--dark-color);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

    .sidebar-header .logo {
        font-weight: bold;
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        display: flex;
        align-items: center;
        transition: all 0.3s ease;
    }

    .sidebar-header .logo-img {
        height: 32px;
        margin-right: 10px;
        transition: all 0.3s ease;
    }

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

    .sidebar-menu li {
        position: relative;
    }

    .sidebar-menu a {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        transition: all 0.3s ease;
        white-space: nowrap;
        overflow: hidden;
    }

        .sidebar-menu a:hover,
        .sidebar-menu a.active {
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
        }

    .sidebar-menu i {
        margin-right: 10px;
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
        transition: all 0.3s ease;
    }

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logo-text-wrapper p {
    font-size: 0.75rem;
    margin: 0;
    transition: all 0.3s ease;
}

.menu-text {
    transition: all 0.3s ease;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
}

.mobile-actions-btn {
    background: var(--primary-color);
    border: none;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .mobile-actions-btn:hover {
        background: var(--dark-color);
        transform: scale(1.05);
    }

/* Ensure dropdown works properly on mobile */
@media (max-width: 768px) {
    .dropdown-menu {
        font-size: 0.9rem;
    }

    .dropdown-item {
        padding: 8px 16px;
    }

    .mobile-actions-btn {
        display: inline-block;
    }

    /* Hide individual notification icon since it's now in dropdown */
    .notification-icon {
        display: none;
    }
}

/* Desktop - hide mobile actions button */
@media (min-width: 769px) {
    .mobile-actions-btn {
        display: none;
    }
}

/* Enhanced Collapsed Sidebar with smooth transitions */
.sidebar.collapsed .sidebar-header {
    padding: 0 10px;
    justify-content: center;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .logo-text-wrapper p,
.sidebar.collapsed .menu-text {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-header .logo-img {
    margin-right: 0;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-menu i,
.sidebar.collapsed .sidebar-logout-btn i {
    margin-right: 0;
    font-size: 1.3rem;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-menu a,
.sidebar.collapsed .sidebar-logout-btn {
    padding: 12px 0;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-menu li {
    display: flex;
    justify-content: center;
}

/* Logout button container */
.sidebar-logout-btn-container {
    position: absolute;
    bottom: 20px;
    width: 100%;
    padding: 0 15px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-logout-btn-container {
    padding: 0;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

    .main-content.no-sidebar {
        margin-left: 0 !important;
    }

    .main-content.expanded {
        margin-left: var(--sidebar-collapsed-width);
    }

/* Top Header */
.top-header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-main {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
}


.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-header-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    text-align: center;
}

    .mobile-header-title h4 {
        margin: 0;
        font-size: 1.2rem;
    }

    .mobile-header-title p {
        margin: 0;
        font-size: 0.75rem;
        color: #6c757d;
    }

.hamburger-menu {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--dark-color);
    cursor: pointer;
}

.notification-icon {
    position: relative;
    font-size: 2rem;
    color: var(--dark-color);
    cursor: pointer;
}

.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark-color);
    cursor: pointer;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

    .toggle-sidebar.rotated {
        transform: rotate(90deg);
    }

.header-right {
    display: flex;
    align-items: center;
}

/* Page Header Content */
.page-header-content {
    background-color: #f9fafb;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 48px;
}

    .page-header-content .btn,
    .page-header-content select,
    .page-header-content .form-select {
        font-size: 0.9rem;
    }

    .page-header-content .text-muted {
        font-size: 0.85rem;
        margin: 0;
    }

/* Mobile stacking */
@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 15px;
    }

    .mobile-header {
        display: flex;
    }

    .desktop-header {
        display: none;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

}



/* Content Area */
.content-area {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
    width: 100%;
}

/* Toast Container */
.toast-container {
    z-index: 1100;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
}

    .sidebar-logout-btn:hover,
    .sidebar-logout-btn:focus {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
        outline: none;
    }

    .sidebar-logout-btn i {
        margin-right: 10px;
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
        transition: all 0.3s ease;
    }

/* Mobile Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        overflow-y: auto; /* Ensure scrolling if content overflows */
    }

        .sidebar.mobile-open {
            transform: translateX(0);
        }


    .sidebar-logout-btn-container {
        position: relative; /* Change from absolute to relative on mobile */
        bottom: auto;
        margin-top: auto; /* Push to bottom within flex container */
        padding: 15px;
    }

    /* Make sidebar a flex container to push logout to bottom */
    .sidebar {
        display: flex;
        flex-direction: column;
    }

    .sidebar-menu {
        flex: 1; /* Take up available space */
        overflow-y: auto; /* Allow scrolling if many menu items */
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-header {
        display: flex;
    }

    .desktop-header {
        display: none;
    }
}
