.navbar {
    background-color: #343a40;
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
}

.nav-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
}

.nav-logout {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* The clickable button/link */
.dropbtn {
    cursor: pointer;
    padding: 10px;
}

/* The actual menu (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1002; /* Higher than navbar, lower than modal */
    top: 100%;
    left: 0;
    max-height: 80vh;          /* 1. Limits height to 80% of the screen height */
    overflow-y: auto;          /* 2. Adds a vertical scrollbar only if content overflows */
    overflow-x: hidden;        /* 3. Prevents accidental horizontal shifting */
    
    /* Optional: Smooth scrolling for a premium feel */
    scroll-behavior: smooth;
}

/* Optional: Make the scrollbar look cleaner (Chrome/Safari/Edge) */
.dropdown-content::-webkit-scrollbar {
    width: 6px;
}
.dropdown-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 10px;
}

/* Dropdown links */
.dropdown-content a {
    color: #333 !important; /* Force text to be dark against white background */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

/* Change color on hover */
.dropdown-content a:hover {
    background-color: #f1f1f1;
    border-radius: 8px;
}

/* Show the menu on hover */
.dropdown:hover .dropdown-content {
    display: block;
}


/* Ensure standard links still look good */
.dropdown-content a {
    padding: 10px 16px;
    display: block;
}

/* The Section Label */
.dropdown-header {
    position: sticky;
    top: 0;
    background-color: white; /* Matches the dropdown background */
    z-index: 1;
    padding: 10px 15px 5px 15px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #ce8670; /* Soft gray */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* The Line Separator */
.dropdown-divider {
    height: 1px;
    background-color: #edf2f7;
    margin: 5px 0;
}

/* Fix the Under Construction look */
.link-disabled {
    color: #cbd5e0 !important;
    cursor: not-allowed;
    font-style: italic;
    background-color: transparent !important; /* Remove that gray block */
}