.menu-item__menu__header___MJFFc {
    background-color: #242d34;
    color: #ffffff;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    column-gap: 5px;
    padding: 6px 10px;
    user-select: none;
    margin: 10px;
    border-radius: 8px;
    border: 1px solid #454545;
    align-items: center;
}

/* Fade-in animation */
.fade-in {
    animation: fadeInAnimation ease 0.8s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Fade-out animation */
.fade-out {
    animation: fadeOutAnimation ease 0.5s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

@keyframes fadeOutAnimation {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Header styles */
.site-header {
    background-color: #003366;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 250px; /* width of sidebar */
    right: 0;
    height: 60px;
    z-index: 1000;
    box-sizing: border-box;
}

/* Header white variant */
.site-header-white {
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header components */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-left img {
    height: 40px;
}

.topbar-left h1 {
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
    white-space: nowrap;
    color: #003366;
}

.user-dropdown-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1100;
    overflow: visible;
}

.user-greeting {
    white-space: nowrap;
    font-weight: 600;
    font-size: 1rem;
    color: black;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    background-color: #4caf50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    user-select: none;
}

.user-dropdown-menu {
    display: none;
}

/* Fix for user dropdown menu - ensure it shows when 'show' class is added */
#userPopup {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    background-color: #fff;
    min-width: 120px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1200;
    padding: 5px 0;
    list-style: none;
    margin: 2px 0 0 0;
    transform: none !important;
}

#userPopup.show {
    display: block !important;
}

/* Style the dropdown menu items */
#userPopup li {
    padding: 0;
    margin: 0;
}

#userPopup li a {
    display: block;
    padding: 10px 15px;
    color: #333 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

#userPopup li a:hover {
    background-color: #f0f0f0;
    color: #003366 !important;
}

/* Additional fallback for user dropdown menu */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    min-width: 120px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1200;
    padding: 5px 0;
    list-style: none;
    margin: 2px 0 0 0;
}

.user-dropdown-menu.show {
    display: block !important;
}

.user-dropdown-menu li {
    padding: 0;
    margin: 0;
}

.user-dropdown-menu li a {
    display: block;
    padding: 10px 15px;
    color: #333 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.user-dropdown-menu li a:hover {
    background-color: #f0f0f0;
    color: #003366 !important;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: #1f2a33;
    overflow-y: auto;
    padding-top: 60px; /* height of header */
    box-sizing: border-box;
    z-index: 999;
}

/* Sidebar menu item positioning */
.sidebar-menu-item {
    position: relative;
}

/* Sidebar dropdown styles */
.sidebar-dropdown-toggle {
    margin-left: auto;
}

.sidebar-dropdown-menu {
    display: none;
    list-style: none;
    padding-left: 15px;
}

.sidebar-dropdown-submenu {
    display: none;
    list-style: none;
    padding-left: 15px;
}

.sidebar-dropdown-sub-toggle {
    margin-left: auto;
}

.sidebar-hr {
    border-color: #454545;
    margin: 8px 0;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa; /* Light gray background */
}

/* Container styles */
.container {
    margin-top: 80px;
}

.container-main {
    margin-left: 250px; /* width of sidebar */
    padding-top: 80px; /* increased height of header + spacing */
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 40px;
    box-sizing: border-box;
    min-height: 100vh;
    background-color: transparent;
}

.main-content {
    margin-left: 250px; /* width of sidebar */
    padding-top: 80px; /* increased height of header + spacing */
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 40px;
    box-sizing: border-box;
    min-height: 100vh;
    background-color: transparent;
}

/* Message styles */
.success-message {
    color: green;
    font-weight: bold;
}

.error-message {
    color: red;
    font-weight: bold;
}

/* Form styles */
.form-margin-top {
    margin-top: 10px;
}

.form-margin-top-30 {
    margin-top: 30px;
}

/* Button styles */
button, .btn {
    background-color: #003366;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover, .btn:hover {
    background-color: #002244;
}

.btn-delete {
    background-color: #dc3545;
}

.btn-delete:hover {
    background-color: #b02a37;
}

.btn-submit {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn-submit:hover {
    background-color: #218838;
}

.btn-cancel {
    background-color: #dc3545;
    color: white;
    margin-left: 10px;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn-cancel:hover {
    background-color: #b02a37;
}

.btn-delete-inline {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

table th {
    background-color: #003366;
    color: white;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

table tr:hover {
    background-color: #ddd;
}

/* Advisory table styles */
.table-advisory {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table-row-header {
    background-color: #f0f0f0;
}

.table-cell {
    text-align: left;
    padding: 8px;
}

.table-row-data {
    background-color: #d1d9e6;
}

/* Dropdown menu styles */
.dropdown-menu, .dropdown-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 180px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 5px 0;
    display: none;
    list-style: none;
    margin: 0;
}

.dropdown-menu-student {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
}

/* Show dropdown menu */
.dropdown-menu.show {
    display: block !important;
}

.dropdown-menu li, .dropdown-submenu li {
    padding: 0;
    margin: 0;
}

.dropdown-menu li a, .dropdown-submenu li a {
    padding: 10px 20px;
    display: block;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.dropdown-menu li a:hover, .dropdown-submenu li a:hover {
    background-color: #f0f0f0;
    cursor: pointer;
}

/* Adjust sidebar menu styles for better visibility */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-menu li a:hover {
    background-color: #d0d9e3;
    color: #003366;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

/* CRITICAL FIX: Ensure dropdowns appear directly below parent items */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: #1f2a33;
    overflow-y: auto;
    padding-top: 60px;
    box-sizing: border-box;
    z-index: 999;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu > li {
    margin: 10px;
}

/* Main menu styling */
.menu-item__menu__header___MJFFc {
    background-color: #242d34;
    color: #ffffff;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    column-gap: 5px;
    padding: 6px 10px;
    user-select: none;
    border-radius: 8px;
    border: 1px solid #454545;
    align-items: center;
}

/* CRITICAL: Fix dropdown positioning */
.dropdown-menu,
.dropdown-submenu {
    background-color: #2c3e50;
    border: 1px solid #454545;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    list-style: none;
    padding: 0;
    margin: 5px 0;
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
}

/* CRITICAL: Override JavaScript positioning issues */
.dropdown-menu[style*="display: block"],
.dropdown-submenu[style*="display: block"] {
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* CRITICAL: Ensure text visibility */
.dropdown-menu li,
.dropdown-submenu li {
    margin: 0;
    width: 100%;
}

.dropdown-menu li a,
.dropdown-submenu li a {
    color: #ffffff !important;
    padding: 8px 15px;
    font-size: 13px;
    display: block;
    text-decoration: none;
    transition: background-color 0.2s;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 4px;
    margin: 2px 0;
}

.dropdown-menu li a:hover,
.dropdown-submenu li a:hover {
    background-color: #34495e;
    color: #ffffff;
}

/* CRITICAL: Fix nested submenu positioning */
.dropdown-submenu {
    margin-left: 15px;
}

/* CRITICAL: Fix toggle styling */
.dropdown-toggle,
.dropdown-toggle-sub {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: #ffffff;
}

.dropdown-toggle .fas.fa-caret-down,
.dropdown-toggle-sub .fas.fa-caret-down {
    margin-left: auto;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] .fas.fa-caret-down,
.dropdown-toggle-sub[aria-expanded="true"] .fas.fa-caret-down {
    transform: rotate(180deg);
}

/* CRITICAL: Ensure proper spacing */
.sidebar-hr {
    border: none;
    height: 1px;
    background-color: #454545;
    margin: 8px 0;
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background-color: #1f2a33;
}

/* Adjust dropdown toggle caret */
.dropdown-toggle > .fas.fa-caret-down {
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] > .fas.fa-caret-down {
    transform: rotate(180deg);
}

/* Form input styles */
input[type="text"], input[type="number"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 8px;
    margin: 6px 0 12px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Login page styles */
.login-body {
    background: linear-gradient(135deg, #003366, #0055a5);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #333;
    animation: fadeIn 1s ease forwards;
}

.login-container {
    background: white;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    width: 380px;
    text-align: center;
    animation: fadeIn 1.2s ease forwards;
}

.login-container img {
    max-width: 180px;
    margin-bottom: 25px;
    animation: fadeIn 1.5s ease forwards;
}

.login-logo {
    width: 220px;
    height: auto;
    margin-bottom: 10px;
}

.login-title {
    margin-bottom: 5px;
}

.login-subtitle {
    font-size: 0.9em;
    color: #666;
    margin-top: 0;
    margin-bottom: 20px;
}

.login-container h2 {
    margin-bottom: 30px;
    font-weight: 700;
    color: #003366;
    letter-spacing: 1.2px;
    animation: fadeIn 1.7s ease forwards;
}

.login-container label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    font-weight: 600;
    color: #003366;
    animation: fadeIn 1.9s ease forwards;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 22px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    animation: fadeIn 2.1s ease forwards;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
    outline: none;
}

.login-container button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 14px 0;
    width: 100%;
    font-weight: 700;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    animation: fadeIn 2.3s ease forwards;
}

.login-container button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.error-message {
    color: #cc0000;
    font-weight: 600;
    margin-bottom: 20px;
    animation: fadeIn 2.5s ease forwards;
}

.forgot-link {
    color: #003366;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    animation: fadeIn 2.7s ease forwards;
    display: inline-block;
    margin-top: 15px;
}

.forgot-link:hover {
    color: #cc0000;
}

/* Forgot password styles */
.forgot-message-container {
    min-height: 40px;
}

.forgot-back-link {
    margin-top: 15px;
}

.forgot-back-link a {
    color: #003366;
    font-weight: 600;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .site-header {
        left: 200px;
    }

    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding-top: 0;
    }

    .site-header {
        left: 0;
    }

    .main-content {
    margin-left: 0;
        padding-top: 120px;
    }
}

/* Account page styles */
.account-container {
    max-width: 1000px;
    margin: 40px auto 20px auto;
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.account-container h2 {
    margin-bottom: 25px;
    color: #003366;
    font-weight: 700;
    font-size: 28px;
    border-bottom: 2px solid #003366;
    padding-bottom: 8px;
}

.account-form fieldset {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
}

.account-form legend {
    font-weight: 700;
    font-size: 18px;
    color: #003366;
    padding: 0 10px;
}

.account-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.account-form input[type="text"]:focus,
.account-form input[type="email"]:focus,
.account-form input[type="password"]:focus {
    border-color: #003366;
    outline: none;
}

.account-form button {
    background-color: #003366;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.account-form button:hover {
    background-color: #002244;
}

.account-message {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 6px;
}

.account-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.account-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
