/* =========================================================
   Base Layout
   ========================================================= */

   body {
	font-family: Arial, sans-serif;
	margin: 0;
	background: #f7f7f7;
}

.page {
	margin: 24px;
	background: white;
	padding: 24px;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}


/* =========================================================
   Top Navigation
   ========================================================= */

.top-nav {
	background: #222;
	color: white;
	padding: 0 24px;
	display: flex;
	align-items: center;
	gap: 24px;
	height: 52px;
}

.top-nav .brand {
	font-weight: bold;
	font-size: 18px;
	margin-right: 16px;
}

.top-nav a {
	color: white;
	text-decoration: none;
	padding: 16px 10px;
	display: inline-block;
}

.top-nav a:hover {
	background: #444;
}


/* =========================================================
   General Tables
   ========================================================= */

table {
	border-collapse: collapse;
	width: 100%;
	margin-top: 20px;
}

th,
td {
	border: 1px solid #ccc;
	padding: 8px;
	text-align: left;
}

th {
	background: #f2f2f2;
}

tr:nth-child(even) {
	background: #fafafa;
}

td.number,
th.number {
	text-align: right;
}


/* =========================================================
   General Utility Classes
   ========================================================= */

.department {
	color: #555;
}

.low-average {
	background: orange;
	font-weight: bold;
}

.back-link {
	display: inline-block;
	margin-bottom: 16px;
}

.muted {
	color: #666;
	font-size: 12px;
}

button {
	margin-left: 8px;
	padding: 3px 8px;
	cursor: pointer;
}


/* =========================================================
   Staff Assignment Layout
   ========================================================= */

.assignment-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 24px;
	align-items: start;
}

.assignment-board {
	overflow-x: auto;
}

.unassigned-panel {
	background: #f8f8f8;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 16px;
	position: sticky;
	top: 16px;
}

.unassigned-panel h2 {
	margin-top: 0;
}


/* =========================================================
   Staff Assignment Table
   ========================================================= */

.staff-assignment-table {
	table-layout: fixed;
}

.staff-assignment-table th,
.staff-assignment-table td {
	vertical-align: top;
}

.staff-assignment-table th:first-child,
.staff-assignment-table td:first-child {
	width: 190px;
}

.staff-assignment-table th:nth-child(2),
.staff-assignment-table td:nth-child(2) {
	width: 90px;
}


/* =========================================================
   Drag and Drop Zones
   ========================================================= */

.section-dropzone {
	min-height: 100px;
	border: 1px dashed #ccc;
	border-radius: 6px;
	padding: 8px;
	background: #fafafa;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-content: flex-start;
}

.instructor-dropzone .section-card {
    width: 170px;
    min-height: 100px;
    box-sizing: border-box;
}

.instructor-dropzone {
	min-height: 100px;
}

.full-year-ghost {
    opacity: 0.45;
    cursor: default;
    border-style: dashed;
}


.fall-dropzone {
    background: #fffdf8;
}

.spring-dropzone {
    background: #f8fbff;
}

.unassigned-dropzone {
	min-height: 300px;
	display: block;
}

.empty-message {
	color: #777;
	font-size: 13px;
}


/* =========================================================
   Section Cards
   ========================================================= */

.section-card {
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
	border: 1px solid #bbb;
	position: relative;
	border-radius: 6px;
	padding: 8px 8px 2rem 8px;
	background: white;
	box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.grade-pill {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.22);
    letter-spacing: 0.01em;
}


.enrollment-pill {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background-color: #555;
    box-shadow: 0 1px 3px rgba(0,0,0,0.22);
    letter-spacing: 0.01em;
}

/* 9th - green */
.section-card.grade-9 .grade-pill,
.section-card.grade-09 .grade-pill {
    background-color: #16803a;
}

/* 10th - orange */
.section-card.grade-10 .grade-pill {
    background-color: #e69233;
}

/* 11th - blue */
.section-card.grade-11 .grade-pill {
    background-color: #0a3269;
}

/* 12th - red */
.section-card.grade-12 .grade-pill {
    background-color: #6b1515;
}

/* Elective - cyan */
.section-card.grade-e .grade-pill {
    background-color: #0097a7;
}

/* fallback */
.section-card .grade-pill {
    background-color: #666;
}

.instructor-dropzone .section-card {
	width: 170px;
	min-height: 100px;
	box-sizing: border-box;
}

.unassigned-dropzone .section-card {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 10px;
}

.section-title {
	font-weight: bold;
	font-size: 13px;
	margin-bottom: 4px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	line-clamp: 2;
	line-height: 1.2;
	min-height: 2.4em;
}

.section-meta {
	font-size: 12px;
	color: #555;
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}


/* =========================================================
   Drag States
   ========================================================= */

.draggable-section {
	cursor: grab;
}

.draggable-section:active {
	cursor: grabbing;
}

.section-card-ghost {
	opacity: 0.45;
}

.section-card-chosen {
	outline: 2px solid #666;
}


/* =========================================================
   Instructor Load Warnings
   ========================================================= */

.instructor-row.overloaded td {
	background: #ffe1e1;
}

.instructor-row.overloaded td:first-child {
	border-left: 6px solid #cc0000;
}

.instructor-row.overloaded .load-count {
	color: #cc0000;
	font-weight: bold;
}


/* =========================================================
   Forms and Filters
   ========================================================= */

.filter-form {
	margin-bottom: 12px;
}

.filter-form label {
	display: block;
	font-size: 12px;
	font-weight: bold;
	margin-bottom: 4px;
	color: #555;
}

.filter-form select {
	width: 100%;
	padding: 5px;
}

.section-action-form {
	margin-top: 8px;
	display: flex;
	gap: 6px;
	align-items: center;
	flex-wrap: wrap;
}

.section-action-form select {
	max-width: 170px;
	padding: 3px;
}

.section-action-form button {
	margin-left: 0;
}


/* =========================================================
   Department Colors
   ========================================================= */

.department-art {
	background: #ffeafd;
	border-color: #e29adc;
}

.department-bib {
	background: #fff8d8;
	border-color: #e0c24f;
}

.department-ela {
	background: #fff1e6;
	border-color: #ffb37a;
}

.department-fl {
	background: #e8fbff;
	border-color: #75cddd;
}

.department-health {
	background: #eef4e6;
	border-color: #abc878;
}

.department-his {
	background: #f2eaff;
	border-color: #b897ff;
}

.department-mth {
	background: #e8f1ff;
	border-color: #8bb8ff;
}

.department-pref {
	background: #f1f1f1;
	border-color: #999999;
}

.department-sci {
	background: #e8f8ec;
	border-color: #7bcf91;
}

.department-tech {
	background: #eeeeee;
	border-color: #888888;
}

/* =========================================================
   Student Requests Page
   ========================================================= */

   .student-request-layout {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.filter-form input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.65rem;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}

.filter-form input[type="text"]:focus {
    outline: none;
    border-color: #4f7fbf;
    box-shadow: 0 0 0 3px rgba(79, 127, 191, 0.18);
}

.filter-sidebar {
	background: #f8f8f8;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 16px;
	position: sticky;
	top: 16px;
}

.filter-sidebar h2 {
	margin-top: 0;
}

.filter-button {
	margin-top: 12px;
	margin-left: 0;
	width: 100%;
	padding: 6px 8px;
}

.clear-filter-link {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	text-align: center;
}

.student-request-main {
	min-width: 0;
}

.department-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.department-label {
    font-weight: bold;
}

.department-course-select {
    width: 100%;
    min-width: 150px;
    font-size: 11px;
    padding: 3px;
}

.wide-table-wrapper {
	overflow-x: auto;
}

.student-request-table {
	min-width: 1200px;
}

.student-request-table th:first-child,
.student-request-table td:first-child {
	min-width: 180px;
}

.student-request-table th,
.student-request-table td {
	vertical-align: top;
}

.request-pill {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 6px;
	border: 1px solid #bbb;
	border-radius: 5px;
	padding: 4px 6px;
	margin-bottom: 5px;
	font-size: 12px;
	line-height: 1.2;
}

.pill-remove-form {
	margin: 0;
	flex-shrink: 0;
}

.pill-remove-button {
	margin: 0;
	padding: 0 4px;
	border: none;
	background: transparent;
	color: #900;
	font-weight: bold;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
}

.pill-remove-button:hover {
	background: #ffd6d6;
	border-radius: 3px;
}

.cell-add-form {
    margin-top: 6px;
}

.cell-add-form select {
	width: 100%;
	min-width: 120px;
	font-size: 11px;
	padding: 3px;
}

.cell-add-button {
    margin-left: 0;
    padding: 2px 7px;
    font-size: 13px;
    font-weight: bold;
}

.select-all-label,
.student-select-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.student-select-label {
    cursor: pointer;
}

.student-select-checkbox,
#select-all-students {
    cursor: pointer;
}

.batch-add-form {
    margin-top: 4px;
}

.batch-add-button {
    width: 100%;
    margin-left: 0;
    padding: 3px 6px;
    font-size: 11px;
}


/* =========================================================
   Class Schedule Page
   ========================================================= */

   .class-schedule-wrapper {
    max-height: calc(100vh - 180px);
    overflow: auto;
    border: 1px solid #ddd;
}
.class-schedule-table {
    margin-top: 0;
    min-width: 1400px;
    table-layout: fixed;
}

.class-schedule-table th,
.class-schedule-table td {
    vertical-align: top;
}

.teacher-column,
.teacher-cell {
    width: 190px;
}

.unscheduled-column {
    width: 220px;
}

.schedule-block-heading {
    text-align: center;
}

.schedule-dropzone {
    min-height: 120px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 6px;
    background: #fafafa;
}

.period-dropzone {
    min-width: 150px;
}

.schedule-section-card {
    margin-bottom: 6px;
    cursor: grab;
}

.schedule-section-card:active {
    cursor: grabbing;
}

.schedule-conflict-cell {
    background: #ffe1e1;
}

.schedule-conflict-cell .schedule-dropzone {
    border-color: #cc0000;
    background: #fff0f0;
}

.unassigned-section-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    min-height: 120px;
}

.unassigned-section-pool .schedule-section-card {
    width: 180px;
}

.class-schedule-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f2f2f2;
}

.class-unassigned-panel {
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 1rem;
    overflow: hidden;
}

/* ---------------danger button ---------------- */
.danger-button {
    background: #b42318;
    color: white;
    border: 1px solid #912018;
}

.danger-button:hover {
    background: #912018;
}

.danger-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ---- end danger button ----- */

.class-unassigned-panel-toggle {
    width: 100%;
    border: 0;
    background: #f5f5f5;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    margin-left: 0;
}

.class-unassigned-panel-toggle:hover {
    background: #eeeeee;
}

.class-unassigned-panel-arrow {
    display: inline-block;
    transition: transform 0.15s ease-in-out;
}

.class-unassigned-panel.is-collapsed .class-unassigned-panel-arrow {
    transform: rotate(-90deg);
}

.class-unassigned-panel-body {
    padding: 0.75rem 0.85rem 0.9rem;
}

.class-unassigned-panel.is-collapsed .class-unassigned-panel-body {
    display: none;
}

/*  Schecule Tools  */

.schedule-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1rem 0;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f8f8;
}

.schedule-tools button {
    margin-left: 0;
}

.feasibility-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.feasibility-modal.is-hidden {
    display: none;
}

.feasibility-modal-content {
    background: white;
    width: min(850px, 95vw);
    max-height: 85vh;
    overflow: auto;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
    padding: 1rem;
}

.feasibility-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

.feasibility-modal-header h2 {
    margin: 0 0 0.75rem 0;
}

#close-feasibility-modal-button {
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    margin-left: 0;
}

.feasibility-modal-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.clear-existing-label {
    font-size: 13px;
    color: #444;
}

.feasibility-unresolved-list {
    max-height: 300px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem;
    background: #fafafa;
}

.feasibility-student-result {
    margin-bottom: 0.75rem;
}

.success-message {
    color: #0a6728;
    font-weight: bold;
}

.error-message {
    color: #900;
    font-weight: bold;
}




/* =====================================================
   Auth / Login Navigation
   ===================================================== */

   .top-nav {
    background: #222;
    color: white;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    box-sizing: border-box;
    width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-left .brand {
    font-weight: bold;
    font-size: 18px;
    margin-right: 16px;
}

.nav-left a,
.auth-nav a {
    color: white;
    text-decoration: none;
    padding: 16px 10px;
    display: inline-block;
}

.nav-left a:hover,
.auth-nav a:hover {
    background: #444;
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    margin-left: auto;
}

.auth-nav form {
    margin: 0;
}

.auth-nav button {
    margin-left: 0;
    padding: 4px 8px;
    cursor: pointer;
}


/* ---------------- Request Groups page ------------------- */

.request-group-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
}

.request-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.request-group-header h2 {
    margin: 0 0 0.75rem 0;
}

.request-group-table {
    margin-bottom: 0.75rem;
}

.request-group-student-list {
    margin-top: 0.75rem;
}

.request-group-student-list summary {
    cursor: pointer;
    font-weight: 600;
}

.department-checkbox-list {
    margin: 0.75rem 0;
}

.filter-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.checkbox-row {
    display: block;
    margin-bottom: 0.25rem;
}

/* ----------------- Request Groups Enrollment Modal --------------------- */

/* Clickable course request pills */

.request-pill.request-group-course-pill {
    cursor: pointer;
    border: none;
    text-align: left;
}


/* Modal shell */

.request-group-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.45);
}

.request-group-modal.is-hidden {
    display: none;
}

.request-group-modal-content {
    width: min(1200px, 96vw);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 10px;
}


/* Modal header */

.request-group-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
}

.request-group-modal-header h2 {
    margin: 0;
}

.modal-close-button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}


/* Modal body layout */

.request-group-modal-body {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    overflow: hidden;
}

.request-group-modal-students,
.request-group-modal-sections {
    min-height: 0;
}


/* Student side */

.student-select-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.request-group-student-table-wrapper {
    max-height: 55vh;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.request-group-student-table {
    width: 100%;
    border-collapse: collapse;
}

.request-group-student-table th,
.request-group-student-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.request-group-student-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: white;
}

/*
   Important:
   Apply highlight to td cells, not only the tr.
   This prevents alternating row striping from overriding the enrollment highlight.
*/

.request-group-student-table tr.student-already-enrolled-row > td {
    background: #fff7d6;
}

.request-group-student-table tr.student-already-enrolled-row:hover > td {
    background: #ffefad;
}

.student-enrollment-status {
    margin-top: 0.15rem;
    font-size: 0.85rem;
}

.already-enrolled-label {
    font-weight: 600;
    color: #7a4b00;
}

.not-enrolled-label {
    color: #667085;
}


/* Section side */

.request-group-section-list {
    max-height: 55vh;
    overflow: auto;
    display: grid;
    gap: 0.75rem;
}

.request-group-section-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.request-group-section-card:hover {
    border-color: #777;
}


/* Modal actions */

.request-group-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem;
    border-top: 1px solid #ddd;
}


/* ----------------- Request Group Batch Placement Workspace --------------------- */

.request-group-placement-workspace {
    margin-top: 0.75rem;
}

.request-group-batch-panel {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1rem;
    margin-top: 0.75rem;
    align-items: start;
}

.request-group-batch-students {
    min-width: 0;
}

.request-group-batch-sections {
    min-width: 0;
}

.student-select-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.request-group-student-table-wrapper {
    max-height: 55vh;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.request-group-student-table {
    width: 100%;
    border-collapse: collapse;
}

.request-group-student-table th,
.request-group-student-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.request-group-student-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: white;
}

.request-group-student-table tr.student-fully-enrolled-row > td {
    background: #e7f7e7;
}

.request-group-student-table tr.student-fully-enrolled-row:hover > td {
    background: #d5f0d5;
}

.student-enrollment-status {
    margin-top: 0.15rem;
    font-size: 0.85rem;
}

.fully-enrolled-label {
    font-weight: 600;
    color: #236b2e;
}

.request-group-course-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    align-items: start;
}

.request-group-course-section-column {
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem;
    background: #fafafa;
}

.request-group-course-section-column h3 {
    margin: 0;
    font-size: 1rem;
}

.request-group-section-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.request-group-section-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.request-group-section-card:hover {
    border-color: #777;
}

.request-group-section-card:has(input:checked) {
    border-color: #236b2e;
    background: #f1fbf1;
}

.request-group-batch-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* ----------------- Class Schedule Dashboard Row --------------------- */

.class-schedule-dashboard-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.schedule-tools-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.enrollment-request-status-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem 0.75rem;
    align-items: center;
    font-size: 0.9rem;
}

.enrollment-status-item {
    white-space: nowrap;
}

.enrollment-status-total {
    font-weight: 700;
}

@media (max-width: 1100px) {
    .class-schedule-dashboard-row {
        grid-template-columns: 1fr;
    }

    .enrollment-request-status-line {
        justify-content: flex-start;
    }
}


/* ----------------- Student Schedules Page --------------------- */

.student-schedules-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.student-schedules-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    padding: 1rem;
}

.student-schedules-filter-form {
    display: grid;
    gap: 0.45rem;
}

.student-schedules-filter-form label {
    font-weight: 600;
    font-size: 0.9rem;
}

.student-schedules-filter-form select,
.student-schedules-filter-form button {
    width: 100%;
}

.student-schedules-student-list-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.student-schedules-student-list-header h2 {
    margin: 0;
}

.student-schedules-student-list {
    overflow: auto;
    display: grid;
    gap: 0.35rem;
    padding-right: 0.25rem;
}

.student-schedules-student-link {
    display: grid;
    gap: 0.1rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    color: inherit;
}

.student-schedules-student-link:hover {
    background: #f7f7f7;
    border-color: #bbb;
}

.student-schedules-student-link.is-selected {
    background: #eaf3ff;
    border-color: #6ba5d7;
}

.student-schedules-main {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.student-schedule-header,
.student-current-schedule-panel,
.student-request-sections-panel,
.student-schedule-empty-state {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    padding: 1rem;
}

.student-schedule-header h2,
.student-current-schedule-panel h2,
.student-request-sections-panel h2 {
    margin: 0;
}

.student-current-schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.student-current-schedule-cell {
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}

.student-current-schedule-block-heading {
    display: grid;
    gap: 0.15rem;
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
    background: #f2f2f2;
}

.student-current-schedule-cell-body {
    display: grid;
    gap: 0.4rem;
    min-height: 72px;
    padding: 0.5rem;
}

.student-request-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.student-request-course-card {
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    padding: 0.75rem;
}

.student-request-course-card.has-enrollment {
    border-color: #9cc89c;
}

.student-request-course-card.missing-enrollment {
    border-color: #e0b4a8;
}

.student-request-course-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.student-request-course-header h3,
.student-request-course-header p {
    margin: 0;
}

.request-status-pill {
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.request-status-pill.enrolled {
    color: #236b2e;
    background: #e7f7e7;
}

.request-status-pill.missing {
    color: #7a271a;
    background: #fff0ec;
}

.student-request-section-list {
    display: grid;
    gap: 0.6rem;
}

.student-section-option-card {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
    padding: 0.65rem;
}

.student-section-option-card.is-current-enrollment {
    border-color: #236b2e;
    background: #f1fbf1;
}

.student-section-option-main {
    min-width: 0;
}

.current-enrollment-label {
    align-self: start;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    background: #236b2e;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .student-schedules-layout {
        grid-template-columns: 1fr;
    }

    .student-schedules-sidebar {
        position: static;
        max-height: none;
    }
}

.student-schedules-student-link.is-fully-enrolled {
    background: #e7f7e7;
    border-color: #9cc89c;
}

.student-schedules-student-link.is-fully-enrolled:hover {
    background: #d9f0d9;
}

.student-schedules-student-link.is-selected.is-fully-enrolled {
    background: #d5f0d5;
    border-color: #236b2e;
}

.student-list-status {
    font-size: 0.75rem;
    font-weight: 700;
}

.student-list-status.complete {
    color: #236b2e;
}

.student-list-status.incomplete {
    color: #7a271a;
}

.student-enrollment-update-form {
    display: grid;
    gap: 0.75rem;
}

.student-section-option-card {
    align-items: start;
}

.student-section-option-card input[type="radio"] {
    margin-top: 0.2rem;
}

.student-section-option-card:has(input:checked) {
    border-color: #236b2e;
    background: #f1fbf1;
}

.student-section-option-card.is-current-empty-enrollment {
    border-color: #b8b8b8;
    background: #f7f7f7;
}

.student-enrollment-update-actions {
    display: flex;
    justify-content: flex-end;
}

.student-enrollment-update-actions button {
    padding: 0.35rem 0.75rem;
}



/* ----------------------- Reports page ---------------------------*/

.reports-page {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.reports-sidebar {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

.reports-sidebar h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.report-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.report-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem;
}

.report-link:hover {
    border-color: #999;
    background: #fafafa;
}

.report-link.active {
    border-color: #2d6cdf;
    background: #eef4ff;
}

.report-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.report-description {
    font-size: 0.85rem;
    color: #666;
}

.reports-main {
    min-width: 0;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-header h1 {
    margin-bottom: 0.25rem;
}

.report-header p {
    color: #666;
    margin-top: 0;
}

.report-export-button {
    display: inline-block;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    background: #2d6cdf;
    color: white;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.report-export-button:hover {
    background: #1f55b5;
}

.report-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.report-section-header {
    padding: 1rem 1rem 0.5rem 1rem;
}

.report-section-header h2 {
    margin: 0 0 0.25rem 0;
}

.report-section-header p {
    margin: 0;
    color: #666;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th,
.report-table td {
    border-bottom: 1px solid #e5e5e5;
    padding: 0.75rem;
    text-align: center;
}

.report-table th:first-child,
.report-table td:first-child {
    text-align: left;
}

.report-table thead th {
    background: #f3f3f3;
    font-weight: 700;
}

.report-table tbody tr:last-child td {
    border-bottom: none;
}

.muted {
    color: #777;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.warning-cell {
    background: #fff4cc;
    font-weight: 700;
}

.total-cell {
    font-size: 1.05rem;
}

.empty-report {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
}


/* ------------- teacher schedule Report  ------------------ */

.teacher-schedule-report-card {
    overflow-x: auto;
}

.teacher-schedule-report-table {
    min-width: 1400px;
}

.teacher-info-column {
    width: 220px;
    min-width: 220px;
}

.teacher-info-cell {
    vertical-align: top;
    background: #fafafa;
}

.teacher-load {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.teacher-schedule-cell {
    vertical-align: top;
    min-width: 145px;
    width: 145px;
    padding: 0.4rem;
}

.teacher-schedule-cell .section-card {
    margin-bottom: 0.5rem;
    cursor: default;
}

.teacher-schedule-cell .section-card:last-child {
    margin-bottom: 0;
}

.empty-schedule-cell {
    color: #aaa;
    font-size: 0.9rem;
}


/* ----------------------- Reports page filters and notes ---------------------------*/

.report-filter-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.report-filter-form label {
    font-weight: 700;
}

.report-filter-form select {
    padding: 0.35rem 0.5rem;
    border: 1px solid #bbb;
    border-radius: 4px;
}

.report-filter-button {
    padding: 0.4rem 0.7rem;
    border: 1px solid #2d6cdf;
    border-radius: 4px;
    background: #2d6cdf;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.report-filter-button:hover {
    background: #1f55b5;
}

.report-section-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #444;
    font-size: 0.9rem;
}

.report-section-notes div {
    margin-bottom: 0.25rem;
}

.report-section-notes div:last-child {
    margin-bottom: 0;
}