body {
    margin: 0;
    font-family: "Open Sans", sans-serif;
    background-color: #2E8B57;
    color: #f0f0f0;
    height: 300vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.site-navbar {
    background-color: #205c3b;
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.site-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

.site-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.site-menu > li > a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 20px 15px;
    display: block;
    transition: background-color 0.3s ease;
}

.site-menu > li:hover > a {
    background-color: #2E8B57;
}

.has-children {
    position: relative;
}

.dropdown {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #205c3b;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown a {
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown a:hover {
    background-color: #2E8B57;
}

.has-children:hover > .dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown .has-children > .dropdown {
    top: 0;
    left: 100%;
}

.content {
    padding-top: 100px;
    text-align: center;
}

.content h1 {
    font-size: 3rem;
}

.content p {
    font-size: 1.2rem;
    line-height: 1.6;
}

.details-container {
    background-color: #fff;
    color: #333;
    padding: 25px 30px;
    border-radius: 5px;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.details-container h1 {
    color: #205c3b;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-top: 0;
}
.details-list dt {
    font-weight: bold;
    color: #555;
    float: left;
    width: 150px;
    clear: left;
}
.details-list dd {
    margin-left: 170px;
    margin-bottom: 12px;
}
.error-message, .info-message {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}
.error-message {
    background-color: #ffdddd;
    border-left: 6px solid #f44336;
    color: #333;
}
.info-message {
    background-color: #e7f3fe;
    border-left: 6px solid #2196F3;
    color: #333;
}
.db-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    color: #333;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.db-table th, .db-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}
.db-table th {
    background-color: #205c3b;
    color: #fff;
    font-weight: bold;
    text-transform: capitalize;
}
.db-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}
.db-table tbody tr:hover {
    background-color: #e2f0e7;
}
.db-container h1 {
    color: #fff;
}
.sql-query-box {
    background-color: rgba(0,0,0,0.1);
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    margin-top: 15px;
    border: 1px solid rgba(255,255,255,0.2);
}

.report-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    text-align: left;
}
.report-card {
    background-color: #fff;
    color: #333;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex-grow: 1;
}
.report-card h2 {
    color: #205c3b;
    margin-top: 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    font-size: 1.5rem;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.report-table th, .report-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}
.report-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}
.report-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
@media (min-width: 1201px) {
    .report-card {
        flex-basis: calc(33.333% - 20px);
    }
}
@media (max-width: 1200px) and (min-width: 768px) {
    .report-card {
        flex-basis: calc(50% - 20px);
    }
}
@media (max-width: 767px) {
    .report-card {
        flex-basis: 100%;
    }
}

.chart-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-top: 30px;
    position: relative;
    height: 60vh;
    width: 100%;
}

.scholarship-details-widget {
    position: -webkit-sticky;
    position: sticky;
    top: 75px;
    z-index: 950;
    background-color: #266d47;
    color: #fff;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.25);
    text-align: left;
}
.scholarship-details-widget summary {
    position: relative;
    padding: 15px 15px 15px 35px;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    outline: none;
    list-style: none;
}
.scholarship-details-widget summary::-webkit-details-marker {
    display: none;
}
.scholarship-details-widget summary::before {
    content: '▶';
    position: absolute;
    left: 15px;
    top: 15px;
    display: inline-block;
    transition: transform 0.2s;
}
.scholarship-details-widget[open] > summary::before {
    transform: rotate(90deg);
}
.scholarship-description-text {
    font-size: 1.2rem;
    line-height: 1.6;
    padding: 0 20px 20px 20px;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.sql-details {
    margin-bottom: 30px;
    background-color: #fff;
    color: #333;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.sql-details summary {
    padding: 15px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    border-radius: 5px;
}
.sql-details[open] summary {
    border-bottom: 1px solid #ddd;
}
.sql-details .sql-query-box {
    margin-top: 0;
    border: none;
    border-radius: 0 0 5px 5px;
    background-color: #f7f7f7;
    color: #333;
}

.container-wide {
    width: 95%;
    max-width: 1600px;
    min-width: 800px;
    margin: 0 auto;
}

.dynamic-applicant-table td {
    vertical-align: top;
    word-break: break-word;
}
.scrollable-cell-content {
    max-height: 3.5em;
    overflow-y: auto;
    word-break: break-word;
    padding-right: 5px;
}

.tooltip-popup {
    display: none;
    position: absolute;
    z-index: 9999;
    background-color: white;
    color: black;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    padding: 10px;
    max-width: 400px;
    word-wrap: break-word;
    pointer-events: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #2E8B57;
}
input:checked + .slider:before {
    transform: translateX(26px);
}

#action-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background-color: #FFC107;
    color: #212529;
    border: 1px solid #E0A800;
    padding: 20px 35px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 350px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s, top 0.4s;
}
#action-notification.show {
    opacity: 1;
    visibility: visible;
    top: 30px;
}

.scholarship-list {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}
.scholarship-list li {
    margin-bottom: 10px;
}
.scholarship-list a {
    text-decoration: none;
    color: #205c3b;
    font-size: 1.2rem;
    font-weight: bold;
    transition: color 0.2s;
}
.scholarship-list a:hover {
    text-decoration: underline;
    color: #2E8B57;
}

.scholarship-group-header, .scholarship-group-header a {
    text-align: left;
    color: #fff;
    margin-top: 40px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,0.5);
    text-decoration: none;
}

.db-table th[data-notes] {
    cursor: help;
    text-decoration: underline dotted rgba(255, 255, 255, 0.7);
    text-underline-offset: 3px;
}

/* =================================================================== */
/* == THE SINGLE CORRECTED RULE                                     == */
/* =================================================================== */
.scholarship-description-text .preferred-highlight {
    background-color: #FFD700;
    color: #333; /* This more specific selector overrides the parent's white text */
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.db-table tbody tr.preferred-row {
    background-color: #FFFACD;
    font-weight: bold;
}
.db-table tbody tr.preferred-row:hover {
    background-color: #FFF5B2;
}

#scholarshipApplicantsTable thead tr:eq(1) th {
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
thead select, thead input {
    padding: 4px;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9em;
}
thead select {
    flex-shrink: 0;
}
thead input {
    width: 100%;
}
thead input:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

/*
=================================
CSV Download Button Style
=================================
*/
.csv-download-button {
    display: inline-block;
    padding: 10px 18px;
    background-color: #2E8B57; /* Your theme's primary green */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    float: right; /* Position it to the right of the header */
    margin-top: -5px; /* Adjust vertical alignment */
    transition: background-color 0.3s ease;
}

.csv-download-button:hover {
    background-color: #205c3b; /* Darker green on hover */
}
/*
=================================
Scholarship List Status Colors
=================================
*/
/* Yellow for 'in-progress' scholarships */
.db-table td.status-yellow {
    background-color: #FFF9C4; /* A light, pleasant yellow */
    font-weight: bold;
}
/* Green for 'completed' scholarships */
.db-table td.status-green {
    background-color: #C8E6C9; /* A light, pleasant green */
    font-weight: bold;
}
/* Ensure hover effect is still visible */
.db-table tbody tr:hover td.status-yellow {
    background-color: #FFF59D;
}
.db-table tbody tr:hover td.status-green {
    background-color: #A5D6A7;
}

/*
=================================
Header User Status & Logout
=================================
*/

/* New wrapper to group nav and user status */
.nav-right-group {
    display: flex;
    align-items: center;
    gap: 30px; /* Space between the menu and the status block */
}

/* The container for the user status text and logout button */
.user-status {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap; /* Prevents text from wrapping */
}

.user-status span {
    opacity: 0.8;
}

/* The logout button */
.user-status a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.user-status a:hover {
    background-color: #fff;
    color: #205c3b; /* Dark green text on hover */
}

/*
=================================
Login Page - Show/Hide Password Icon
=================================
*/
.password-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    fill: #555; /* Icon color */
}
/*
=================================
Header Last Update Timestamp
=================================
*/
.last-update {
    opacity: 0.7;
    font-size: 0.8rem;
    padding-right: 15px;
    margin-right: 15px; /* Replaces the need for extra gap */
    border-right: 1px solid rgba(255, 255, 255, 0.4);
}
