/* Westminster College: admin panel styles. */

:root {
	--navy: #13294b;
	--navy-2: #1f3d6e;
	--red: #a3111b;
	--gold: #c9a227;
	--ink: #1d2433;
	--muted: #5b6b82;
	--line: #e1e6ee;
	--bg: #f3f5f9;
	--radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--navy-2); }
h1 { margin: 0; font-size: 26px; }
h2 { margin: 0 0 14px; font-size: 18px; }
h3 { margin: 0 0 12px; font-size: 15px; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.prewrap { white-space: pre-wrap; }
[hidden] { display: none !important; }

/* Layout */
.admin-side { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 240px; overflow-y: auto; background: var(--navy); color: #fff; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); color: #fff; font-weight: 700; text-decoration: none; }
.admin-brand img { width: 40px; height: 40px; object-fit: contain; }
.admin-brand small { display: block; color: var(--gold); font-size: 12px; font-weight: 600; }
.admin-side nav { padding: 6px 10px 30px; }
.admin-side h6 { margin: 18px 10px 6px; color: rgba(255, 255, 255, .45); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.admin-side nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 7px; color: rgba(255, 255, 255, .85); text-decoration: none; }
.admin-side nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-side nav a.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.badge { min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; text-align: center; }
.admin-main { margin-left: 240px; min-height: 100vh; }
.admin-main-bare { margin-left: 0; }
.admin-main-bare .admin-content { box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; max-width: none; min-height: 100vh; }
.admin-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: #fff; }
.admin-top .spacer { flex: 1; }
.admin-top a { text-decoration: none; }
.admin-top form { margin: 0; }
.who small { margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 12px; }
.side-toggle { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; }
.admin-content { max-width: 1280px; padding: 26px 28px 60px; }

/* Buttons */
.btn { display: inline-block; padding: 8px 15px; border: 1px solid #cfd6e2; border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--navy); }
.btn-primary { border-color: var(--navy); background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-danger { border-color: #e7b3b6; color: var(--red); }
.btn-danger:hover { border-color: var(--red); background: var(--red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { display: block; width: 100%; margin-top: 8px; text-align: center; }
button.link { border: 0; background: none; color: var(--red); font: inherit; cursor: pointer; }

/* Panels & headings */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head p { flex-basis: 100%; margin: 4px 0 0; }
.panel { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel.flush { padding: 0; overflow-x: auto; }
.panel.narrow { max-width: 560px; }
.panel h2 + .table { margin-top: -6px; }
.danger-zone { border-color: #f2d3d5; }
.empty { margin: 0; padding: 36px 20px; color: var(--muted); text-align: center; }
.notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.notice-success { border: 1px solid #b8e2c6; background: #eaf7ee; color: #1d6b36; }
.notice-error { border: 1px solid #f2c0c3; background: #fdecea; color: #7e0d15; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.edit-grid > .panel { margin-bottom: 0; }
.side .panel:first-child { position: sticky; top: 74px; z-index: 5; }

/* Dashboard */
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.qa { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--navy); font-weight: 600; text-decoration: none; }
.qa:hover { border-color: var(--navy); }
.qa b { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; background: var(--red); color: #fff; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-box { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: inherit; text-decoration: none; }
.stat-box strong { display: block; color: var(--navy); font-size: 26px; }
.stat-box span { color: var(--muted); font-size: 13px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.panel:not(.flush) .table td { padding-left: 0; }
.table tr:last-child td { border-bottom: 0; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table .indent { padding-left: 34px; }
.row-section td { background: #fafbfd; }
.unread td { background: #fffaf0; }
.unread a { font-weight: 700; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--red); vertical-align: middle; }
.thumb { width: 54px; }
.thumb img, .thumb .initials { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 10px; background: #eceff4; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-green, .pill-accepted { background: #e7f3ec; color: #1d6b36; }
.pill-red, .pill-new { background: #fdecea; color: var(--red); }
.pill-navy, .pill-reviewing { background: #e8eef9; color: var(--navy-2); }
.pill-interview, .pill-waitlist { background: #fbf3dc; color: #7a5d06; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar select, .toolbar input[type="search"] { padding: 7px 10px; border: 1px solid #cfd6e2; border-radius: 7px; font: inherit; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.tabs a { padding: 7px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; }
.tabs a b { margin-left: 4px; padding: 0 6px; border-radius: 8px; background: #e5e9f0; font-size: 12px; }
.tabs a.active { background: #fff; color: var(--navy); font-weight: 700; box-shadow: 0 0 0 1px var(--line); }
.pager { display: flex; gap: 4px; margin-top: 14px; }
.pager a, .pager span { padding: 5px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; }
.pager span { background: var(--navy); color: #fff; }
.new-menu { display: flex; flex-wrap: wrap; gap: 6px; }

/* Forms */
.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 5px; font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"], .field input[type="date"], .field input[type="url"], .field input[type="tel"], .field input[type="search"], .field input:not([type]),
.field select, .field textarea { display: block; width: 100%; padding: 9px 11px; border: 1px solid #cfd6e2; border-radius: 7px; background: #fff; font: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-2); outline: 3px solid rgba(31, 61, 110, .15); }
.field small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.field-check label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.field-check small { margin-left: 24px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
label.block { display: flex; margin-bottom: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.current-file { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; }
.current-file img { max-width: 120px; max-height: 90px; border-radius: 6px; object-fit: cover; }
.sticky-save { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
form.inline { display: inline; margin: 0; }
.tox-tinymce { border-radius: 8px !important; }

/* Albums */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.album-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: inherit; text-decoration: none; }
.album-card:hover { border-color: var(--navy); }
.album-card img, .album-card .no-cover { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e8ecf3; color: var(--muted); }
.album-card div { padding: 12px 14px; }
.album-card small { display: block; color: var(--muted); }
.dropzone { position: relative; padding: 30px 20px; border: 2px dashed #cfd6e2; border-radius: var(--radius); background: #fafbfd; text-align: center; transition: .2s; }
.dropzone.drag, .dropzone.has-files { border-color: var(--navy-2); background: #eef3fb; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone label { display: block; color: var(--muted); }
.dropzone label strong { color: var(--navy); }
.dropzone output { display: block; margin-top: 8px; font-weight: 600; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.photo-item { padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.photo-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; }
.photo-item input[type="text"] { width: 100%; margin: 6px 0; padding: 6px 8px; border: 1px solid #cfd6e2; border-radius: 6px; font: inherit; font-size: 13px; }
.photo-tools { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.photo-tools input[type="number"] { width: 52px; padding: 3px; border: 1px solid #cfd6e2; border-radius: 5px; }
.photo-tools .remove { color: var(--red); }

/* Detail lists */
.details { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0 0 16px; }
.details dt { color: var(--muted); font-weight: 600; }
.details dd { margin: 0; }
.message-body { padding: 16px; border-radius: 8px; background: var(--bg); }
.role-help p { font-size: 13.5px; }

/* Login */
.login-box { box-sizing: border-box; width: 100%; max-width: 400px; margin: 4vh auto; padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: center; box-shadow: 0 10px 30px rgba(19, 41, 75, .08); }
.login-box h1 { margin-top: 10px; color: var(--navy); }
.login-box img { margin: 0 auto; }
.login-box form { margin-top: 20px; text-align: left; }

@media (max-width: 1000px) {
	.edit-grid, .cols-2 { grid-template-columns: 1fr; }
	.side .panel:first-child { position: static; }
}
@media (max-width: 800px) {
	.admin-side { transform: translateX(-100%); transition: transform .2s; }
	.side-open .admin-side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
	.admin-main { margin-left: 0; }
	.side-toggle { display: block; }
	.admin-top { padding: 10px 16px; }
	.who small { display: none; }
	.admin-content { padding: 18px 16px 50px; }
	.grid-2, .details { grid-template-columns: 1fr; }
}

/* Student Portal screens */
.stat-alert { border-color: #f2c0c3; background: #fdecea; }
.stat-alert strong { color: var(--red); }
.check { width: 36px; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.bulk-bar select { padding: 6px 8px; border: 1px solid #cfd6e2; border-radius: 6px; font: inherit; }
.row-error td { background: #fdecea; }
.small-table th, .small-table td { padding: 6px 10px; font-size: 13.5px; text-transform: none; letter-spacing: 0; }
.details-tight { grid-template-columns: 130px 1fr; margin: 0; }
.sub-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sub-file { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.sub-file img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #f6f7f9; }
.sub-file iframe { display: block; width: 100%; height: 360px; border: 0; }
.sub-file .file-icon { display: flex; align-items: center; justify-content: center; height: 140px; background: #eef3fb; color: var(--navy); font-size: 26px; font-weight: 800; }
.sub-file-name { padding: 8px 10px; font-size: 13.5px; word-break: break-all; }
.btn-block + .btn-block { margin-top: 8px; }
@media print {
	.admin-side, .admin-top, .no-print, .page-head .btn { display: none !important; }
	.admin-main { margin: 0; }
	.panel { border: 0; }
}

/* Roles */
.role-options { display: grid; gap: 10px; margin-bottom: 16px; }
.role-option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.role-option:hover { border-color: var(--navy-2); }
.role-option input { margin-top: 4px; }
.role-option:has(input:checked) { border-color: var(--navy); background: #eef3fb; box-shadow: inset 3px 0 0 var(--navy); }
.role-option strong { display: block; }
.role-option small { display: block; color: var(--muted); }
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.role-legend div { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.role-legend strong { display: block; color: var(--navy); }
.role-legend small { color: var(--muted); }
.pill-role-admin { background: var(--navy); color: #fff; }
.pill-role-director { background: #fbf3dc; color: #7a5d06; }
.pill-role-management { background: #e8eef9; color: var(--navy-2); }
.pill-role-teacher { background: #e7f3ec; color: #1d6b36; }
.class-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.class-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 20px; cursor: pointer; font-weight: 500; }
.class-chip:has(input:checked) { border-color: #1d6b36; background: #e7f3ec; color: #1d6b36; font-weight: 700; }
.class-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.class-cards a { min-width: 140px; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid #1d6b36; border-radius: 8px; color: inherit; text-decoration: none; }
.class-cards a:hover { border-color: #1d6b36; }
.class-cards strong { display: block; color: var(--navy); font-size: 17px; }
.class-cards span { color: var(--muted); font-size: 13px; }

/* Classes & Sections */
.tabs-sub { margin-top: -6px; padding-left: 10px; border-left: 3px solid var(--line); }
.tabs-sub a { padding: 5px 10px; font-size: 13.5px; }
.tabs a.tab-warn { color: #7a5d06; }
.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 16px; }
.class-table td { vertical-align: middle; }
.class-table .order { width: 76px; }
.btn-icon { min-width: 30px; padding: 3px 6px; line-height: 1.2; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.row-muted td { color: var(--muted); }
.row-muted td a strong { color: var(--muted); }
.section-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.section-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border: 1px solid #cfe3d6; border-radius: 12px; background: #f1f8f3; color: #1d6b36; font-size: 13px; font-weight: 700; text-decoration: none; }
.section-chip small { color: var(--muted); font-weight: 500; }
.section-chip:hover { border-color: #1d6b36; }
small.warn { display: block; margin-top: 4px; color: #7a5d06; font-weight: 600; }
.rename-form input { width: 90px; padding: 5px 8px; border: 1px solid #cfd6e2; border-radius: 6px; font: inherit; font-size: 13px; }
.section-table td { vertical-align: middle; }
.class-assign { display: grid; gap: 4px; }
.class-assign-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.class-assign-row:last-child { border-bottom: 0; }
.class-assign-row .class-chip:has(input:disabled) { opacity: .7; cursor: default; }
@media (max-width: 600px) {
	.class-assign-row { grid-template-columns: 1fr; gap: 6px; }
}

/* Due dates and extensions (Handed-in Work) */
.due-panel { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 20px; align-items: start; }
.due-now strong { display: block; margin: 2px 0 6px; color: var(--navy); font-size: 18px; }
.due-change label { display: block; margin-bottom: 6px; font-weight: 600; }
.due-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.due-row input[type="date"] { padding: 7px 10px; border: 1px solid #cfd6e2; border-radius: 7px; font: inherit; }
.due-change .preset-row { margin: 0 0 8px; }
.due-change p { margin: 0; }
.extension-panel .preset-row { margin: 10px 0 6px; }
small.extended { color: #1d6b36; font-weight: 600; }
@media (max-width: 700px) {
	.due-panel { grid-template-columns: 1fr; }
}

/* Student accounts on hold */
.hold-panel { border-color: #f2c0c3; background: #fdf3f3; }
.hold-panel h3 { color: var(--red); }
.tabs a.tab-hold { color: var(--red); }

/* Dashboard: Your tasks */
.tasks h2 { display: flex; align-items: center; gap: 8px; }
.task-list { margin: 0; padding: 0; list-style: none; }
.task { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; padding-top: 4px; }
.task-count { flex: 0 0 auto; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; background: #e8eef9; color: var(--navy-2); font-size: 18px; font-weight: 800; line-height: 40px; text-align: center; }
.task-urgent .task-count { background: #fdecea; color: var(--red); }
.task-todo .task-count { background: #fbf3dc; color: #7a5d06; }
.task-text { flex: 1; min-width: 0; }
.task-text strong { display: block; color: var(--navy); }
.task-text small { color: var(--muted); }
.tasks-done { margin: 0; color: #1d6b36; font-weight: 600; }
@media (max-width: 600px) {
	.task { flex-wrap: wrap; }
	.task .btn { margin-left: 54px; }
}

/* Student photos */
.stu-avatar { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #e8eef9; color: var(--navy-2); font-size: 13px; font-weight: 700; object-fit: cover; }
.stu-avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.stu-avatar-xl { width: 150px; height: 150px; border-radius: 12px; font-size: 40px; }
.student-cell { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.student-cell span { display: flex; flex-direction: column; }
a.student-cell:hover strong { text-decoration: underline; }
.student-title { display: flex; align-items: center; gap: 14px; }
.student-head { margin-bottom: 14px; }
.photo-preview { margin-bottom: 12px; text-align: center; }
.panel h3 + .grid-2 { margin-top: 4px; }

/* Reports */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.report-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); background: #fff; color: inherit; text-decoration: none; }
.report-card:hover { border-color: var(--navy); box-shadow: 0 6px 18px rgba(19, 41, 75, .08); }
.report-card strong { color: var(--navy); font-size: 17px; }
.report-card span { color: var(--muted); font-size: 14px; }
.report-card small { align-self: flex-start; padding: 1px 8px; border-radius: 9px; background: #fbf3dc; color: #7a5d06; font-size: 11.5px; font-weight: 700; }
.report-filters label.inline input { padding: 6px 8px; border: 1px solid #cfd6e2; border-radius: 7px; font: inherit; }
.report-table h2 { margin: 0; padding: 16px 18px 6px; font-size: 17px; }
.report-table td { font-size: 14px; }
.report-student { margin: -6px 0 14px; }
.print-only { display: none; }
@media print {
	.print-only { display: block; }
	.report-table { break-inside: auto; }
	.report-table tr { break-inside: avoid; }
	.stat-row { grid-template-columns: repeat(5, 1fr); }
	a { color: inherit; text-decoration: none; }
}

/* Promote to next class */
.promote-grid { grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.3fr); }
.panel-title { margin: 0; padding: 16px 18px 6px; font-size: 17px; }
.promote-grid .section-chip { margin: 0 0 0 4px; }
.promote-tip { margin: 0; padding: 12px 18px; }
.promote-list td { vertical-align: middle; }
.class-history { margin: 0; padding-left: 18px; font-size: 14px; }
.class-history li { margin-bottom: 4px; }
@media (max-width: 1000px) {
	.promote-grid { grid-template-columns: 1fr; }
}
.report-subtitle { margin: 0; padding: 0 18px 10px; color: var(--muted); font-size: 14px; }
.student-filter { max-width: 260px; }
@media print {
	.report-table.page-break { break-before: page; }
	.report-table.page-break:first-of-type { break-before: auto; }
}

/* Staff photos */
.top-avatar { width: 30px; height: 30px; margin-right: 8px; font-size: 11px; vertical-align: middle; }
.admin-top .who { display: inline-flex; align-items: center; gap: 4px; }
.account-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.account-photo .field { margin: 0; }
.welcome { display: flex; align-items: center; gap: 14px; }

/* Student form sections and health notes */
.form-section { margin: 24px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.panel > .form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.pill-health { background: #fdecea; color: var(--red); }
.health-panel { border-color: #f2c0c3; background: #fdf3f3; }
.health-panel h3 { color: var(--red); }

/* Enrolling from an application */
.notice-info { border: 1px solid #c9d7ef; background: #eef3fb; color: var(--navy-2); }
.pill-enrolled { background: var(--navy); color: #fff; }
.enrol-panel h3 { margin-top: 0; }

/* Roles & Rights */
.cap-groups { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cap-group { display: grid; grid-template-columns: 150px 1fr; border-top: 1px solid var(--line); }
.cap-group:first-child { border-top: 0; }
.cap-group-name { padding: 12px 14px; background: #f6f8fb; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 12px; padding: 8px 12px; }
.cap-item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 14px; cursor: pointer; border-radius: 6px; }
.cap-item:hover { background: #f3f6fa; }
.cap-item input { margin: 0; flex: none; }
.cap-item.is-disabled { opacity: .5; cursor: not-allowed; }
.cap-info { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #b7c0cc; color: #8a94a3; font: italic 600 10px/1 Georgia, serif; flex: none; cursor: help; }
.cap-item .cap-info { margin-left: auto; }
.cap-basic-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2e8b57; flex: none; }
@media (max-width: 700px) { .cap-group { grid-template-columns: 1fr; } .cap-group-name { padding: 8px 12px; } }
.roles-table td .pill { margin: 2px 0; }
.pill-role { background: #eef1f6; color: var(--navy-2); }
.pill-role-dean { background: #f3e9fb; color: #5b2a86; }

/* Report cards */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.filters label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form input[type="text"] { flex: 1; min-width: 200px; }
.panel-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); background: #fafbfc; }
.panel-foot form.inline { display: inline-flex; gap: 10px; align-items: center; margin-left: auto; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.marks-table input.mark-input { width: 90px; }
.marks-table input.comment-input { width: 100%; min-width: 180px; }
.marks-table .grade-cell { font-weight: 700; min-width: 40px; }
.marks-table tr.is-locked td { color: var(--muted); background: #fafbfc; }
.is-invalid { border-color: #c0392b !important; background: #fdf0ee; }
.subject-matrix select { max-width: 200px; }
.report-lines td, .report-lines th { white-space: nowrap; }
.report-lines td.small { white-space: normal; }
@media (max-width: 700px) { .grid-3 { grid-template-columns: 1fr; } }
.report-mini { list-style: none; margin: 0; padding: 0; }
.report-mini li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.report-mini li:first-child { border-top: 0; }
.report-mini li > span:last-child { white-space: nowrap; }

/* Calendar (Flatpickr), in the school colours */
.flatpickr-calendar { font-family: inherit; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(19, 41, 75, .18); padding: 6px 6px 0; width: 320px; }
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after { display: none; }
.flatpickr-months { padding: 4px 2px 8px; }
.flatpickr-months .flatpickr-month { height: 40px; color: var(--navy); }
.flatpickr-current-month { font-size: 15px; font-weight: 700; padding-top: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 700; border-radius: 6px; padding: 2px 4px; }
.flatpickr-current-month .flatpickr-monthDropdown-months:hover, .flatpickr-current-month .numInputWrapper:hover { background: #eef3fb; }
.flatpickr-current-month .numInputWrapper { width: 70px; border-radius: 6px; }
.flatpickr-current-month input.cur-year { font-weight: 700; }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { top: 8px; padding: 8px; border-radius: 8px; fill: var(--navy); }
.flatpickr-months .flatpickr-prev-month:hover, .flatpickr-months .flatpickr-next-month:hover { background: #eef3fb; }
.flatpickr-months .flatpickr-prev-month:hover svg, .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--navy); }
span.flatpickr-weekday { color: #8a94a3; font-weight: 600; font-size: 12px; }
.flatpickr-day { border-radius: 8px; color: #1d2433; font-weight: 500; }
.flatpickr-day:hover { background: #eef3fb; border-color: #eef3fb; }
.flatpickr-day.today { border-color: #c9a227; }
.flatpickr-day.today:hover { background: #fbf3dc; border-color: #c9a227; color: #1d2433; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: #c3c9d3; }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover { color: #d5dbe4; }
.fp-actions { display: flex; justify-content: space-between; padding: 8px 10px 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.fp-actions button { background: none; border: 0; color: var(--navy-2); font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.fp-actions button:hover { background: #eef3fb; }
input.flatpickr-input[readonly] { background: #fff; cursor: pointer; }

/* Filter bar (Semester / Report pickers) and the fields inside the new report-card tables */
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; gap: 16px; }
.filters label { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); gap: 12px; }
.filters select { min-width: 320px; padding: 11px 40px 11px 14px; font-size: 16px; font-weight: 600; color: var(--navy); text-transform: none; letter-spacing: 0;
	border: 1px solid #cfd6e2; border-radius: 9px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2313294b' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
	appearance: none; -webkit-appearance: none; cursor: pointer; }
.filters select:hover { border-color: var(--navy-2); }
.filters select:focus { border-color: var(--navy-2); outline: 3px solid rgba(31, 61, 110, .15); }
.marks-table input, .marks-table select, .subject-matrix select, .inline-form input[type="text"], .inline-form select,
.panel.flush .table input[type="text"], .panel.flush .table input[type="number"], .panel.flush .table select {
	padding: 8px 10px; border: 1px solid #cfd6e2; border-radius: 7px; background: #fff; font: inherit; }
.marks-table input:focus, .marks-table select:focus, .subject-matrix select:focus, .inline-form input:focus, .inline-form select:focus,
.panel.flush .table input:focus, .panel.flush .table select:focus { border-color: var(--navy-2); outline: 3px solid rgba(31, 61, 110, .15); }
.marks-table input:disabled, .marks-table select:disabled { background: #f3f5f8; color: var(--muted); }
@media (max-width: 700px) { .filters select { min-width: 0; width: 100%; } .filters label { flex-wrap: wrap; width: 100%; } }

/* Student profile (read-only page before "Edit student details") */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head > div { flex: 1; min-width: 200px; }
.profile-head h2 { margin: 0 0 4px; font-size: 22px; color: var(--navy); }
.profile-head p { margin: 2px 0; color: var(--muted); }
.profile-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 18px 0 8px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.panel > .form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Report card shown inside the admin (student view) */
.card-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.card-actions > span { flex: 1; min-width: 240px; color: var(--muted); }
.card-actions form.inline { display: inline; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.tab-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2e8b57; margin-left: 4px; vertical-align: middle; }
.rc-embed { overflow-x: auto; }
.rc-embed .rc { margin: 0 0 24px; width: 100%; max-width: 210mm; min-height: 0; }
.panel-intro { margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fafbfc; }

/* Enter Marks: class grid (students × subjects) */
.marks-grid-scroll { overflow-x: auto; }
.marks-grid th, .marks-grid td { white-space: nowrap; vertical-align: middle; }
.marks-grid th { font-size: 12px; }
.marks-grid .mg-subject { display: block; color: var(--navy); }
.marks-grid .mg-detail { display: block; font-weight: 500; font-size: 11px; text-transform: none; letter-spacing: 0; }
.marks-grid .mg-student { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; box-shadow: 1px 0 0 var(--line); }
.marks-grid thead .mg-student { background: #f6f8fb; }
.marks-grid input[type="number"] { width: 70px; padding: 6px 8px; border: 1px solid #cfd6e2; border-radius: 6px; font: inherit; }
.marks-grid input[type="number"]:focus, .marks-grid select:focus { border-color: var(--navy-2); outline: 3px solid rgba(31, 61, 110, .15); }
.marks-grid select { padding: 6px; border: 1px solid #cfd6e2; border-radius: 6px; font: inherit; }
.marks-grid .mg-grade { display: inline-block; min-width: 18px; margin-left: 6px; font-weight: 700; color: var(--navy); }
.marks-grid td.is-readonly { background: #f6f8fb; color: var(--muted); }
.marks-grid .mg-avg { font-weight: 700; }
