/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.page-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    flex-grow: 1;
    padding: 20px;
    gap: 40px;
    overflow: auto;
}
/* Main content grows and shrinks as necessary */
.main-center,
main {
    flex-grow: 1;
    min-width: 0;
}
aside {
    width: 260px;
    background-color: #e9eff5;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}
aside ul {
    list-style: none;
    padding-left: 0;
}
aside ul li {
    margin-bottom: 15px;
    text-align: left;
}
aside ul li a {
    text-decoration: none;
    font-size: 1.15em;
    font-weight: 600;
    color: #004080;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    white-space: normal;
}
aside ul li a:hover,
aside ul li a.active {
    color: #00274d;
    font-weight: bold;
    text-decoration: underline;
}
/* Sidebar submenu toggle */
.sidebar-menu .has-submenu > a {
    cursor: pointer;
    user-select: none;
    justify-content: flex-start;
}
.sidebar-menu .toggle-icon {
    margin-left: 8px;
    font-weight: bold;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    height: 100%;
    vertical-align: middle;
}
/* Submenu */
.sidebar-menu .submenu {
    display: none;
    list-style-type: none;
    padding-left: 24px;
    margin: 0;
}

/* --- MODIFIED MAIN CONTENT AREA --- */
main {
    max-width: 860px;
    /* REMOVED: background: #fff; This was causing the double background issue */
   /* border-radius: 8px; */
   /* box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); */
    padding: 30px 40px;
    width: 100%;
    box-sizing: border-box;
    flex: 1 0 auto;
    overflow: auto;
}
/* --- END OF MODIFICATION --- */

/* Header with flex layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #004080;
    color: white;
}
.header-left {
    display: flex;
    flex-direction: column;
}
.header-title {
    margin: 0;
    font-size: 2rem;
}
.welcome-text {
    font-size: 1rem;
    margin-top: 4px;
}
.header-right {
    text-align: right;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    min-width: 170px;
}
.current-session {
    font-weight: bold;
    margin-bottom: 4px;
}
.session-switcher {
    font-weight: normal;
    font-size: 0.9rem;
}
.session-switcher label {
    margin-right: 5px;
    cursor: pointer;
}
.session-switcher select {
    padding: 4px 8px;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    background-color: #003366;
    color: white;
}
.session-switcher select:hover,
.session-switcher select:focus {
    background-color: #00509e;
    outline: none;
}
nav.main-navigation {
    background-color: #003366;
    padding: 10px 20px;
    text-align: center;
}
nav.main-navigation a {
    color: #c1d1ff;
    margin: 0 10px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
}
nav.main-navigation a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #a0b9ff;
}
/* Responsive tweaks */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }
    .header-left,
    .header-right {
        margin-bottom: 10px;
    }
    .header-right {
        min-width: auto;
    }
    .page-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    aside {
        width: 100%;
        height: auto;
        margin-bottom: 25px;
        padding: 20px;
    }
    main {
        margin-left: 0;
        padding: 20px;
        width: 100%;
    }
    header nav {
        width: 100%;
        margin-top: 15px;
        text-align: center;
    }
    header nav a {
        margin-left: 10px;
        margin-right: 10px;
    }
}
/* Footer Styling */
footer {
    flex-shrink: 0;
    background-color: #004080;
    color: white;
    padding: 15px 0;
    text-align: center;
    font-size: 0.95rem;
    box-sizing: border-box;
    width: 100%;
}
/* Dashboard Specific Styles */
.dashboard-main {
    text-align: center;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
    flex-grow: 1;
}
.dashboard-title {
    margin-bottom: 32px;
    letter-spacing: 2px;
}
/* Wrapper for images */
.dashboard-stats-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.dashboard-school-image {
    max-width: 400px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 8px;
}
.dashboard-school-logo {
    max-width: 120px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 8px;
}
.stats-cards {
    justify-content: center;
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.stats-card {
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 8px;
    width: 180px;
    min-width: 160px;
    text-align: center;
    box-sizing: border-box;
}
.stats-card h3 {
    margin-bottom: 15px;
}
.stats-card p {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}
.view-tasks-link {
    font-size: 14px;
    display: block;
    margin-top: 8px;
    text-decoration: none;
    color: #004080;
}
.view-tasks-link:hover {
    text-decoration: underline;
}
.dashboard-chart {
    max-width: 600px;
    margin: 40px auto;
    display: block;
}
/* Recent Tasks Table */
.recent-tasks-title {
    margin-bottom: 20px;
}
.recent-tasks-table {
    margin: 0 auto;
    border-collapse: collapse;
    width: 80%;
    max-width: 700px;
}
.recent-tasks-table th,
.recent-tasks-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}
.recent-tasks-table th {
    background-color: #f0f0f0;
}
/* Contact form */
.contact-form {
    max-width: 600px;
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 12px;
}
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1rem;
}
.required {
    color: red;
    margin-left: 4px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    transition: border-color 0.3s ease;
    resize: vertical;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: #004080;
    outline: none;
}
.contact-form button {
    background-color: #004080;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}
.contact-form button:hover {
    background-color: #00274d;
}
.success-message {
    color: green;
    font-weight: 700;
    margin-bottom: 14px;
    font-size: 1.05rem;
}
.error-message {
    color: red;
    font-weight: 600;
    margin-bottom: 14px;
    font-size: 1.05rem;
}
/* Contact Info Section */
.contact-info {
    max-width: 600px;
    margin-top: 30px;
    padding: 16px;
    background: #f8f9fc;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}
.contact-info h3 {
    color: #004080;
    margin-bottom: 14px;
}
/* Responsive adjustments */
@media (max-width: 900px) {
    .dashboard-stats-row,
    .stats-cards {
        flex-direction: column;
        gap: 18px;
        align-items: stretch;
    }
    .stats-card {
        min-width: auto;
        width: 100%;
        padding: 18px 20px;
    }
    .dashboard-school-image,
    .dashboard-school-logo {
        max-width: 100%;
        height: auto;
        margin-bottom: 20px;
    }
}
/* Login form inputs */
.login-form input[type="text"],
.login-form input[type="password"] {
    max-width: 280px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-form button,
.login-btn {
    background-color: #004080;
    color: white;
    font-weight: 600;
    padding: 12px 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    width: 240px;
    margin-top: 10px;
    transition: background-color 0.2s;
    display: block;
}
.login-form button:hover,
.login-btn:hover {
    background-color: #00274d;
}
/* Responsive container for tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
}
/* Staff members table styling */
.staff-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    table-layout: auto;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.staff-table th,
.staff-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    font-size: 0.95rem;
    color: #333;
}
.staff-table thead th {
    background-color: #f0f4f8;
    font-weight: 700;
    color: #004080;
}
.staff-table tbody tr:hover {
    background-color: #f9fbfd;
}
.staff-table tbody tr:last-child td {
    border-bottom: none;
}
.staff-actions a {
    color: #0073e6;
    margin-right: 8px;
    text-decoration: none;
    font-weight: 600;
}
.staff-actions a:hover {
    text-decoration: underline;
}
.staff-actions em {
    color: #555;
    font-style: italic;
}
/* Responsive behavior */
@media (max-width: 768px) {
    .staff-table {
        min-width: 600px;
        font-size: 0.9rem;
    }
}
@media (max-width: 480px) {
    .staff-table th,
    .staff-table td {
        padding: 6px 8px;
    }
}

/* Calendar Table Styling */
.calendar-table {
    width: 100%;
    max-width: 640px;
    margin: 25px 0 0 0;
    border-collapse: collapse;
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 1px 7px rgba(0,0,0,0.06);
    font-size: 1rem;
}
.calendar-table th,
.calendar-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e3e3e3;
}
.calendar-table th {
    background: #e9eff5;
    color: #004080;
    font-size: 1.06em;
    font-weight: 600;
}
.calendar-table tbody tr:nth-child(even) {
    background: #f5f7fa;
}
.calendar-table td:last-child {
    text-align: center;
}
.calendar-table button {
    background: #a00;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95em;
    outline: none;
}
.calendar-table button:hover {
    background: #d80000;
}