/* Layout: sidebar on the left, main content to the right */
/* Enable smooth touch scrolling on mobile devices */
.grade-table-wrapper {
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* Momentum scrolling for iOS/Safari */
    touch-action: pan-x pan-y;         /* Allows natural horizontal touch gestures */
    width: 100%;
    position: relative;
}

/* Force table width so it triggers horizontal overflow instead of shrinking for grade sheets */
.grade-table-wrapper table {
    min-width: 1350px !important;      /* Adjust based on total column count */
    border-collapse: collapse;
}

/* Prevent parent containers from trapping touch gestures */
.card, .card-body, .container-fluid {
    min-width: 0;
}

#side-nav {
    width: 300px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: .3s;
}

#side-nav.toggle-active {
    left: -300px;
}

/* Backdrop shown behind the open sidebar on mobile (tap to close) */
#sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 99;
}

#main {
    padding-top: 56px;
    padding-bottom: 3rem;
    padding-left: 300px;
    transition: .5s;
}

#main.toggle-active {
    padding-left: 0;
}

#top-navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 300px;
    z-index: 90;
    transition: .3s;
}

#top-navbar.toggle-active {
    left: 0;
}

@media (max-width: 1150px) {
    #side-nav {
        left: -300px;
    }
    #side-nav.toggle-active {
        left: 0;
    }
    #sidebar-backdrop {
        display: none;
    }
    #sidebar-backdrop.toggle-active {
        display: block;
    }
    #main {
        padding-left: 0;
    }
    #top-navbar {
        left: 0;
    }
}

@media (max-width: 800px) {
    #main {
        padding-top: 115px;
    }
    #top-navbar.toggle-active {
        left: 0;
    }
}

/* Navbar layout: toggle, search, avatar distributed across the bar */
#top-navbar {
    background: #f5f5f5;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, .1);
}

#top-navbar .nav-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

#top-navbar .nav-wrapper .form-header {
    display: flex;
    flex: 1 1 auto;
    max-width: 500px;
    margin: 0 auto;
}

#top-navbar .nav-wrapper .form-header .au-input {
    flex: .9;
}

#top-navbar .nav-wrapper .form-header button {
    flex: .1;
}

#top-navbar .nav-wrapper .toggle-btn {
    cursor: pointer;
    padding: .2rem .5rem;
    position: relative;   /* was absolute — let flexbox place it on the left naturally */
    z-index: 5;
}

#top-navbar .nav-wrapper .toggle-btn:hover {
    background-color: #fff;
}

#top-navbar .nav-wrapper .dropdown {
    flex: 0 0 auto;
}

@media (max-width: 800px) {
    #top-navbar .nav-wrapper .form-header {
        order: 2;
    }
    #top-navbar .nav-wrapper .toggle-btn {
        order: 1;
    }
    #top-navbar .nav-wrapper .dropdown {
        order: 3;
    }
}

/* Avatar (used for user picture) */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar.avatar-md {
    width: 60px;
    height: 60px;
}

.avatar.avatar-lg {
    width: 80px;
    height: 80px;
}

.title-1 {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    text-transform: capitalize;
    font-weight: 300;
    font-size: 20px;
    margin-bottom: 16px;
    border-radius: .2em;
}

.title-1::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: -5px;
    width: 50%;
    height: 15px;
    z-index: -1;
    border-radius: 1px;
    background-color: rgba(5, 150, 105, 0.15); /* Emerald accent highlight tint */
    animation: lineAnim 1s ease-in forwards;
}

@media screen and (max-width: 450px) {
    .mobile-hide-450 {
        display: none;
    }
}
.title-1::before {
        display: none !important;
    }
.title-1 {
    border-bottom: none !important;
    text-decoration: none !important;
}