:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #243044;
  --muted: #737d90;
  --line: #e4e7f0;
  --primary: #6257d9;
  --primary-dark: #5145bf;
  --ok: #38a576;
  --bad: #e26573;
  --warn: #d08a20;
  --blue: #3c91ad;
  --purple: #6257d9;
  --coral: #ff8a56;
  --mint: #6fcf97;
  --aqua: #4ebec7;
  --sun: #f6c85f;
  --lavender: #f0edff;
  --shadow: 0 1px 2px rgba(36, 48, 68, 0.03), 0 8px 24px rgba(36, 48, 68, 0.045);
}

html {
  scrollbar-color: #c9c4ee transparent;
  scrollbar-width: thin;
}

body {
  background: #f6f7fb;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(98, 87, 217, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
  opacity: 0.42;
  pointer-events: none;
}

::selection {
  color: #fff;
  background: #6257d9;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d2cee9; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b8b2dc; }

.login-screen {
  background-color: #f6f7fb;
}

.login-card {
  width: min(820px, 100%);
  min-height: 520px;
  align-content: center;
  padding: 46px 420px 46px 48px;
  background-image: url("./assets/task-growth.svg");
  background-repeat: no-repeat;
  background-position: right 34px center;
  background-size: 330px auto;
  border-color: #e3e0f2;
  box-shadow: 0 22px 60px rgba(50, 54, 83, 0.11);
}

.login-card h1 { color: #293550; }
.login-brand .brand-name { font-size: 17px; }

.sidebar {
  width: 248px;
  padding: 20px 15px;
  background: #fdfdff;
  border-color: #e7e6ef;
}

.brand {
  gap: 11px;
  margin-bottom: 18px;
}

.brand-mark {
  background: #6257d9;
  box-shadow: 0 6px 14px rgba(98, 87, 217, 0.2);
}

.brand-name {
  color: #293550;
  letter-spacing: 0;
}

.nav { gap: 4px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 41px;
  padding: 0 13px;
  color: #606a7d;
  border: 1px solid transparent;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}

.nav-item::after {
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  background: transparent;
  border-radius: 0 3px 3px 0;
  content: "";
}

.nav-item:hover {
  color: #5145bf;
  background: #f7f5ff;
  border-color: #eeebfb;
}

.nav-item.active {
  color: #5145bf;
  background: #f0edff;
  border-color: #e7e2ff;
  font-weight: 800;
}

.nav-item.active::after { background: #6257d9; }

.nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  gap: 8px;
  margin-top: 16px;
  padding: 14px 10px 0;
  background: #faf9ff;
  border: 1px solid #ebe8f7;
  border-radius: 8px;
}

.teacher-card {
  margin: -3px 0 1px;
  padding: 8px 3px;
}

.avatar {
  color: #5145bf;
  background: #ece8ff;
}

.app-shell {
  margin-left: 248px;
  padding: 28px 30px 52px;
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto 118px;
  min-height: 82px;
  align-items: center;
  gap: 22px;
  margin-bottom: 20px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e7e8ef;
}

.topbar-copy { min-width: 0; }

.topbar-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #6257d9;
  font-size: 11px;
  font-weight: 800;
}

.topbar h1 {
  color: #25314a;
  font-size: 25px;
}

.topbar p {
  margin-top: 6px;
  font-size: 12px;
}

.topbar-art {
  display: block;
  width: 118px;
  height: 74px;
  object-fit: contain;
  object-position: center;
}

.primary-btn,
.ghost-btn,
.text-btn,
.icon-btn,
.notice-filters button,
.course-mode-tabs button {
  transition: color 0.16s, background 0.16s, border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}

.primary-btn {
  background: #6257d9;
  box-shadow: 0 5px 12px rgba(98, 87, 217, 0.14);
}

.primary-btn:hover {
  background: #5145bf;
  transform: translateY(-1px);
}

.ghost-btn {
  color: #4f596c;
  background: #fff;
  border-color: #dee2eb;
}

.ghost-btn:hover {
  color: #5145bf;
  background: #f7f5ff;
  border-color: #d7d1f6;
}

.text-btn { color: #5b4fd0; }

.icon-btn {
  color: #566075;
  background: #fff;
  border-color: #dfe3ec;
}

.icon-btn:hover {
  color: #5145bf;
  background: #f3f0ff;
  border-color: #d8d2fa;
}

.status-pill {
  color: #5a5578;
  background: #f0edff;
  border: 1px solid #e4dfff;
  border-radius: 7px;
}

.status-pill.ok { color: #27885e; background: #e9f8f0; border-color: #cfefdf; }
.status-pill.warn { color: #a16a14; background: #fff6df; border-color: #f8e5b6; }
.status-pill.bad { color: #c74e60; background: #fff0f2; border-color: #f8d8dd; }

.view.active {
  animation: view-enter 0.22s ease-out;
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.metric-card,
.panel,
.seat-side-block {
  border-color: #e4e7f0;
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
  overflow: visible;
}

.panel-head h2,
.section-heading h2 {
  color: #293550;
}

.panel-head h2::before {
  display: inline-block;
  width: 5px;
  height: 15px;
  margin-right: 8px;
  background: #6257d9;
  border-radius: 4px;
  content: "";
  vertical-align: -2px;
}

.home-dashboard-grid {
  gap: 16px;
  margin-bottom: 16px;
}

.home-dashboard-grid .calendar-panel {
  border-top: 3px solid #6257d9;
}

.home-dashboard-grid .todo-panel {
  border-top: 3px solid #ff8a56;
}

.timetable-panel { border-top: 3px solid #4ebec7; }
.overview-panel { border-top: 3px solid #6fcf97; }
.chart-panel { border-top: 3px solid #f6c85f; }

.timetable-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.timetable-actions .ghost-btn[aria-pressed="true"] {
  color: #5145bf;
  background: #f0edff;
  border-color: #cfc8f5;
}

.home-teaching-cell {
  display: grid;
  width: 100%;
  min-height: 42px;
  place-content: center;
  gap: 3px;
  padding: 5px 7px;
  color: #354055;
  background: #f8f8fc;
  border: 1px solid transparent;
  border-radius: 7px;
}

.home-teaching-cell:hover {
  color: #5145bf;
  background: #f1eeff;
  border-color: #cfc8f5;
}

.home-teaching-cell strong,
.home-teaching-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-teaching-cell small {
  color: #8a92a3;
  font-size: 10px;
}

.home-teaching-cell.empty {
  color: #a4abbb;
  font-weight: 400;
}

.home-insight-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  margin-bottom: 16px;
}

.home-insight-grid > .panel {
  min-width: 0;
  margin-bottom: 0;
}

.home-birthday-panel { border-top: 3px solid #f6c85f; }
.home-notice-panel { border-top: 3px solid #6257d9; }
.home-birthday-panel .panel-head h2::before { background: #f6c85f; }
.home-notice-panel .panel-head h2::before { background: #6257d9; }

.home-birthday-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.home-birthday-summary article {
  min-height: 72px;
  padding: 11px 13px;
  background: #fffaf0;
  border: 1px solid #f2e2bb;
  border-radius: 8px;
}

.home-birthday-summary article:nth-child(2) {
  background: #f7f6fc;
  border-color: #e5e3ef;
}

.home-birthday-summary span,
.home-birthday-summary small {
  color: #81899a;
  font-size: 11px;
}

.home-birthday-summary strong {
  margin: 0 5px;
  color: #b47a12;
  font-size: 24px;
}

.home-birthday-summary article:nth-child(2) strong { color: #6257d9; }

.home-birthday-list,
.home-notice-list {
  display: grid;
  gap: 8px;
}

.home-birthday-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 60px;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid #e7e8ef;
  border-radius: 8px;
}

.home-birthday-item.today {
  background: #fff8e7;
  border-color: #efd999;
}

.home-birthday-date {
  display: grid;
  width: 40px;
  height: 44px;
  place-content: center;
  color: #98670d;
  text-align: center;
  background: #fff0be;
  border-radius: 7px;
}

.home-birthday-date strong,
.home-birthday-date span {
  display: block;
  line-height: 1.05;
}

.home-birthday-date span {
  margin-top: 3px;
  font-size: 11px;
}

.home-birthday-item > div:nth-child(2) strong,
.home-birthday-item > div:nth-child(2) small {
  display: block;
}

.home-birthday-item > div:nth-child(2) small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.home-notice-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.home-notice-category {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: #71798b;
  background: #fafafe;
  border: 1px solid #e5e6ee;
  border-radius: 7px;
  font-size: 12px;
}

.home-notice-category strong {
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  color: #8a91a0;
  background: #eceef3;
  border-radius: 5px;
  font-size: 10px;
}

.home-notice-category.has-items {
  color: #5145bf;
  background: #f3f0ff;
  border-color: #ddd7fa;
}

.home-notice-category.has-items strong {
  color: #fff;
  background: #6257d9;
}

.home-notice-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 8px;
}

.home-notice-item.important {
  background: #fff9f6;
  border-left: 3px solid #ff8a56;
}

.home-notice-item > div strong,
.home-notice-item > div small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-notice-item > div small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.home-notice-item time {
  color: #8991a1;
  font-size: 11px;
  white-space: nowrap;
}

.home-insight-empty {
  display: grid;
  min-height: 210px;
  place-content: center;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.home-insight-empty img {
  width: 120px;
  height: 82px;
  object-fit: contain;
}

.home-insight-empty strong { color: #4f596c; }
.home-insight-empty p { font-size: 12px; }

.metric-grid { gap: 11px; }

.metric-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  padding: 18px;
  box-shadow: none;
}

.metric-card::after {
  position: absolute;
  right: -13px;
  bottom: -18px;
  width: 54px;
  height: 54px;
  background: #ece8ff;
  border-radius: 50%;
  content: "";
  opacity: 0.9;
}

.metric-card:nth-child(4n + 2)::after { background: #daf4e6; }
.metric-card:nth-child(4n + 3)::after { background: #ffe4d8; }
.metric-card:nth-child(4n + 4)::after { background: #fff0be; }

.metric-card strong {
  color: #6257d9;
  font-size: 29px;
}

.metric-card:nth-child(4n + 2) strong { color: #38a576; }
.metric-card:nth-child(4n + 3) strong { color: #e87141; }
.metric-card:nth-child(4n + 4) strong { color: #b37a13; }

.overview-panel .metric-card {
  min-height: 98px;
  background: #fdfdff;
}

.calendar-weekdays { color: #898fa0; }

.calendar-day {
  min-height: 52px;
  background: #fdfdff;
  border-color: #ececf3;
}

.calendar-day:hover {
  color: #5145bf;
  background: #f7f5ff;
  border-color: #aaa2e8;
}

.calendar-day.today {
  background: #6257d9;
  border-color: #6257d9;
  box-shadow: 0 5px 12px rgba(98, 87, 217, 0.2);
}

.calendar-day.selected:not(.today) {
  outline-color: rgba(98, 87, 217, 0.14);
  border-color: #6257d9;
}

.calendar-day.weekend:not(.today) {
  color: #a87417;
  background: #fffbef;
}

.calendar-day.legal-holiday:not(.today) {
  color: #ce5262;
  background: #fff3f4;
  border-color: #f6d8dc;
}

.holiday-countdown {
  background: #faf9ff;
  border-color: #e8e4fa;
  border-left-color: #6257d9;
}

.holiday-countdown strong { color: #5145bf; }

.holiday-countdown-actions .expectation-edit-btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
}

.expectation-edit-btn img {
  width: 17px;
  height: 17px;
}

.expectation-countdown {
  background: #fffaf0;
  border-color: #f3e2b7;
}

.expectation-icon { color: #6f4d04; background: #f6c85f; }
.expectation-countdown strong { color: #93660e; }

input,
select,
textarea {
  color: #293550;
  background: #fff;
  border-color: #dfe3ec;
}

input::placeholder,
textarea::placeholder { color: #a4aaba; }

input:hover,
select:hover,
textarea:hover { border-color: #c5c1dc; }

input:focus,
select:focus,
textarea:focus {
  border-color: #6257d9;
  box-shadow: 0 0 0 3px rgba(98, 87, 217, 0.1);
}

input[type="checkbox"],
input[type="radio"] { accent-color: #6257d9; }

.timetable-table th,
th {
  color: #5d6679;
  background: #f7f6fc;
}

th,
td { border-color: #e8eaf1; }

tbody tr { transition: background 0.14s; }
tbody tr:hover { background: #fcfbff; }

.timetable-input {
  color: #3d4658;
  background: #f8f8fc;
}

.timetable-input:focus {
  background: #fff;
}

.todo-item,
.role-item,
.notice-item,
.student-tile,
.student-card,
.record-item,
.rank-item {
  border-color: #e5e7ef;
  box-shadow: 0 1px 2px rgba(36, 48, 68, 0.025);
}

.todo-item {
  background: #fdfdff;
}

.todo-item:hover,
.role-item:hover,
.notice-item:hover,
.student-card:hover,
.record-item:hover,
.rank-item:hover {
  border-color: #cfc9f2;
  box-shadow: 0 5px 16px rgba(52, 49, 87, 0.06);
}

.todo-delete,
.role-delete,
.danger-btn,
.student-card button {
  color: #cf5364;
  background: #fff2f3;
  border-color: #f6dfe2;
}

.affairs-toolbar {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e5e7ef;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.affairs-workspace { gap: 16px; }

.affairs-pending-panel { border-top: 3px solid #ff8a56; }
.affairs-notice-panel { border-top: 3px solid #6257d9; }

.class-rules-panel { border-top: 3px solid #6257d9; }
.duty-management-panel { border-top: 3px solid #49b7bf; }
.role-management-panel { border-top: 3px solid #ff8a56; }

.class-rule-item {
  background: #fdfdff;
  border-color: #e5e7ef;
  box-shadow: 0 1px 2px rgba(36, 48, 68, 0.025);
}

.class-rule-item:hover {
  border-color: #cfc9f2;
  box-shadow: 0 5px 16px rgba(52, 49, 87, 0.06);
}

.class-rule-number {
  background: #6257d9;
  box-shadow: 0 5px 12px rgba(98, 87, 217, 0.18);
}

.class-rule-category { color: #5b4fd0; }
.section-tools .ghost-btn { background: #fff; }

.duty-members {
  background: #f8f8fc;
  border-color: #e5e7ef;
}

.affairs-stats article {
  background: #faf9ff;
  border-color: #e8e4f7;
}

.affairs-stats article:nth-child(2) {
  background: #fff8f2;
  border-color: #f8e3d7;
}

.affairs-stats strong { color: #6257d9; }
.affairs-stats article:nth-child(2) strong { color: #e87141; }

.notice-filters button {
  color: #626b7d;
  background: #fff;
  border-color: #e1e4ec;
}

.notice-filters button:hover {
  color: #5145bf;
  background: #f7f5ff;
}

.notice-filters button.active {
  color: #fff;
  background: #6257d9;
  border-color: #6257d9;
}

.notice-item.important { border-left-color: #ff8a56; }

.affairs-empty,
.empty-state {
  background-image: url("./assets/task-growth.svg");
  background-repeat: no-repeat;
  background-position: center 18px;
  background-size: 126px auto;
}

.affairs-empty { padding-top: 122px; }
.empty-state { min-height: 170px; padding-top: 122px; text-align: center; }

.duty-row.today {
  background: #f3f0ff;
  border-radius: 7px;
}

.duty-row.today strong,
.role-item .role-owner { color: #5b4fd0; }

.course-dialog {
  border-color: #ded9f4;
  box-shadow: 0 24px 70px rgba(30, 35, 57, 0.24);
}

.course-dialog::backdrop {
  background: rgba(36, 48, 68, 0.48);
  backdrop-filter: blur(3px);
}

.course-form {
  border-top: 4px solid #6257d9;
}

.courses-page {
  position: relative;
  overflow: hidden;
  border-top: 3px solid #6257d9;
}

.courses-page-header { position: relative; z-index: 1; }

.courses-date { color: #6257d9; }

.courses-summary article {
  background: #faf9ff;
  border-color: #e6e2f7;
}

.courses-summary article:nth-child(2) {
  background: #f2faf6;
  border-color: #d9efe3;
}

.courses-summary strong { color: #5145bf; }
.courses-summary article:nth-child(2) strong { color: #328e67; }

.course-mode-tabs {
  background: #eeecf6;
}

.course-mode-tabs button.active {
  color: #5145bf;
  background: #fff;
}

.sidebar-course-item {
  background: #fafaff;
  border-color: #e6e6ef;
}

.sidebar-course-item > span {
  color: #6257d9;
  background: #ece9ff;
}

.sidebar-course-item.current {
  background: #f1eeff;
  border-color: #bfb7ef;
}

.sidebar-course-item.current > span,
.courses-page-list .current .course-state {
  background: #6257d9;
}

.courses-page-list {
  display: block;
  width: 100%;
}

.courses-week-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e6e7ef;
  border-radius: 8px;
}

.courses-week-table {
  min-width: 880px;
  table-layout: fixed;
}

.courses-week-table th,
.courses-week-table td {
  min-width: 0;
  padding: 8px;
  text-align: center;
  border-right: 1px solid #ececf3;
}

.courses-week-table th:last-child,
.courses-week-table td:last-child {
  border-right: 0;
}

.courses-week-table th:first-child,
.courses-week-table td:first-child {
  width: 100px;
}

.courses-week-table th small {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin-left: 6px;
  padding: 0 6px;
  color: #fff;
  background: #6257d9;
  border-radius: 5px;
  font-size: 10px;
}

.courses-week-table th.current-day {
  color: #5145bf;
  background: #ece9ff;
}

.courses-week-table td.current-day {
  background: #faf9ff;
}

.week-course-cell {
  display: grid;
  min-height: 52px;
  place-content: center;
  gap: 4px;
  padding: 7px 8px;
  color: #354055;
  background: #f8f8fc;
  border: 1px solid transparent;
  border-radius: 7px;
}

.week-course-cell strong,
.week-course-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-course-cell small {
  color: #858ea0;
  font-size: 10px;
}

.week-course-cell.empty {
  color: #a4abbb;
  font-weight: 400;
}

.current-day .week-course-cell {
  background: #f0edff;
  border-color: #d9d3f8;
}

.courses-week-table td.current-period {
  background: #ece9ff;
}

.current-period .week-course-cell {
  color: #fff;
  background: #6257d9;
  border-color: #6257d9;
  box-shadow: 0 5px 12px rgba(98, 87, 217, 0.18);
}

.current-period .week-course-cell small {
  color: rgba(255, 255, 255, 0.78);
}

.form-card {
  background: #faf9ff;
  border-color: #e7e3f7;
}

.tag {
  color: #358e67;
  background: #e9f8f0;
  border-radius: 6px;
}

.tag.bad { color: #c74e60; background: #fff0f2; }
.tag.warn { color: #9b6b14; background: #fff6df; }
.tag.gray { color: #5b6578; background: #f0f2f5; }
.tag.blue { color: #337e9a; background: #e9f6f8; }

.student-metrics .metric-card:nth-child(1) { border-top: 3px solid #ff8a56; }
.student-metrics .metric-card:nth-child(2) { border-top: 3px solid #f6c85f; }
.student-metrics .metric-card:nth-child(3) { border-top: 3px solid #4ebec7; }
.student-metrics .metric-card:nth-child(4) { border-top: 3px solid #6fcf97; }

.student-grouping-panel { border-top: 3px solid #49b7bf; }

.student-group-card {
  border-color: #e5e7ef;
  box-shadow: 0 1px 2px rgba(36, 48, 68, 0.025);
}

.student-group-card:hover {
  border-color: #cfc9f2;
  box-shadow: 0 5px 16px rgba(52, 49, 87, 0.06);
}

#classManagementView .panel:first-child { border-top: 3px solid #4ebec7; }
#classManagementView .panel:last-child { border-top: 3px solid #ff8a56; }
#attendanceView > .panel { border-top: 3px solid #4ebec7; }
#disciplineView > .panel { border-top: 3px solid #ff8a56; }
#hygieneView > .panel { border-top: 3px solid #6fcf97; }
#homeworkView > .panel { border-top: 3px solid #f6c85f; }
#dormView > .panel { border-top: 3px solid #4ebec7; }
#studentsView > .panel:first-child { border-top: 3px solid #6257d9; }

#attendanceView .panel-head h2::before,
#hygieneView .panel-head h2::before,
#dormView .panel-head h2::before { background: #4ebec7; }

#disciplineView .panel-head h2::before { background: #ff8a56; }
#homeworkView .panel-head h2::before { background: #f6c85f; }

.birthday-item {
  background: #fffaf1;
  border-color: #f2e4c3;
}

.birthday-item.today {
  background: #f3f0ff;
  border-color: #c9c2ef;
}

.birthday-date {
  color: #9b6b14;
  background: #fff0be;
}

.student-card {
  position: relative;
  overflow: hidden;
}

.student-card::before {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: #ece9ff;
  border-radius: 50%;
  content: "";
}

.student-card:nth-child(4n + 2)::before { background: #dff4e9; }
.student-card:nth-child(4n + 3)::before { background: #ffe6da; }
.student-card:nth-child(4n + 4)::before { background: #fff0be; }

.student-card-actions button:first-child {
  color: #5145bf;
  background: #f0edff;
  border-color: #dcd6fa;
}

.settings-form { position: relative; z-index: 1; }

#settingsView > .panel,
#reportsView > .panel {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border-top: 3px solid #6257d9;
}

#settingsView > .panel::after,
#reportsView > .panel::after {
  position: absolute;
  right: 30px;
  bottom: 20px;
  width: min(34%, 360px);
  height: 260px;
  background: url("./assets/teacher-reading.svg") right bottom / contain no-repeat;
  content: "";
  opacity: 0.95;
  pointer-events: none;
}

.report-box {
  position: relative;
  z-index: 1;
  width: min(68%, 820px);
  background: #fdfdff;
}

.seat-toolbar {
  border-top: 3px solid #4ebec7;
}

.seat-side-block:first-child { border-top: 3px solid #6257d9; }
.seat-controls { border-top: 3px solid #ff8a56; }

.board-note {
  background: #faf9ff;
  border-color: #e5e1f7;
}

.seat-stage {
  padding: 14px;
  background: #fbfbfe;
  border: 1px solid #e8e9f0;
  border-radius: 8px;
}

.seat-podium {
  color: #5145bf;
  background: #ece9ff;
  border-color: #cfc8f5;
}

.seat-board {
  background: #f6f7fb;
  border-color: #e3e6ef;
}

.seat-cell {
  background: #fff;
  border-color: #dfe3eb;
  box-shadow: 0 2px 5px rgba(36, 48, 68, 0.035);
}

.seat-cell:hover:not(.locked) {
  border-color: #a9a1e4;
  background: #faf9ff;
}

.seat-cell.locked,
.seat-plan-item.active,
.unseated-list button.selected {
  color: #5145bf;
  background: #f0edff;
  border-color: #6257d9;
}

.seat-cell.drag-over {
  background: #f0edff;
  border-color: #6257d9;
  outline-color: rgba(98, 87, 217, 0.18);
}

.seat-drag-ghost { border-color: #6257d9; }

.unseated-list button {
  background: #fafaff;
  border-color: #e4e6ee;
}

@media (min-width: 1181px) {
  .seat-layout {
    align-items: stretch;
  }

  .seat-canvas-panel {
    height: 100%;
  }
}

.toast {
  background: #293550;
  box-shadow: 0 10px 30px rgba(36, 48, 68, 0.22);
}

@media (max-width: 1260px) {
  .topbar {
    grid-template-columns: minmax(190px, 1fr) auto;
  }

  .topbar-art { display: none; }
}

@media (max-width: 1080px) {
  .home-insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .courses-page-header { padding-right: 0; }
}

@media (max-width: 760px) {
  .sidebar {
    width: auto;
    padding: 14px;
  }

  .brand { margin-bottom: 13px; }

  .nav { gap: 5px; }

  .nav-item {
    min-height: 39px;
    padding: 0 10px;
  }

  .sidebar-footer {
    padding: 10px;
  }

  .app-shell {
    margin-left: 0;
    padding: 20px 14px 38px;
  }

  .topbar {
    display: flex;
    min-height: 0;
    padding-bottom: 16px;
  }

  .topbar-eyebrow { margin-bottom: 4px; }
  .panel { padding: 16px; }

  .timetable-actions {
    width: 100%;
  }

  .timetable-actions > button {
    flex: 1;
  }

  .home-birthday-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .home-birthday-item > .tag {
    grid-column: 2;
    justify-self: start;
  }

  .home-notice-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .home-notice-item time {
    grid-column: 2;
  }

  .login-screen {
    background-image: none;
  }

  .login-card {
    width: min(440px, 100%);
    min-height: 0;
    padding: 28px;
    background-image: none;
  }

  #settingsView > .panel::after,
  #reportsView > .panel::after {
    display: none;
  }

  .report-box { width: 100%; }

  .seat-canvas-panel,
  .seat-stage,
  .seat-board {
    width: 100%;
    min-width: 0;
  }

  .seat-row { min-width: 640px; }
}

@media print {
  body::before,
  .topbar-art,
  #settingsView > .panel::after,
  #reportsView > .panel::after {
    display: none !important;
  }
}
