:root {
  --ink: #17213c;
  --ink-2: #414b67;
  --muted: #7c859c;
  --paper: #f6f7fb;
  --surface: #ffffff;
  --line: #dfe3ec;
  --line-soft: #edf0f5;
  --forest: #1c294b;
  --forest-2: #6255df;
  --mint: #cbd5ff;
  --mint-soft: #edf0ff;
  --sand: #ffd29a;
  --sand-soft: #fff2e2;
  --rose: #ff9b85;
  --rose-soft: #fff0ec;
  --blue-soft: #e9f3ff;
  --danger: #d6535c;
  --shadow: 0 20px 56px rgb(28 41 75 / 15%);
  --sidebar-width: 232px;
  --serif: "Avenir Next", "Segoe UI", ui-sans-serif, sans-serif;
  --sans: Inter, "Avenir Next", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, input, select, textarea { border-radius: 7px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgb(63 126 114 / 28%); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
h1 { margin-bottom: 10px; font: 700 clamp(38px, 4vw, 60px)/1.02 var(--serif); letter-spacing: -.055em; }
h2 { margin-bottom: 8px; font: 650 27px/1.12 var(--serif); letter-spacing: -.035em; }
h3 { margin-bottom: 6px; font-size: 16px; }
small { color: var(--muted); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: var(--sidebar-width); flex-direction: column; overflow-y: auto; padding: 24px 18px 18px; border-right: 1px solid var(--line); background: #fbfbfe; color: var(--ink); }
.brand { display: flex; align-items: center; gap: 13px; margin: 0 6px 34px; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 10px; background: var(--forest-2); color: #fff; transform: none; font: 800 12px/1 var(--sans); letter-spacing: .04em; box-shadow: 0 8px 22px rgb(98 85 223 / 20%); }
.brand-mark i { font-style: normal; transform: none; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { color: var(--ink); font: 700 17px/1.2 var(--sans); letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.main-nav { display: grid; gap: 4px; }
.nav-item { position: relative; display: flex; width: 100%; align-items: center; gap: 12px; min-height: 46px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: #596076; text-align: left; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover { background: #f0efff; color: var(--forest-2); transform: translateX(2px); }
.nav-item.active { background: var(--forest-2); color: #fff; box-shadow: 0 8px 18px rgb(98 85 223 / 20%); }
.nav-item.active::before { display: none; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-count { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 12px; background: #eceafd; color: var(--forest-2); font-size: 11px; text-align: center; }
.nav-item.active .nav-count { background: rgb(255 255 255 / 20%); color: #fff; }
.sidebar-bottom { display: grid; gap: 13px; margin-top: auto; }
.profile-chip { display: grid; grid-template-columns: 38px 1fr 28px; align-items: center; gap: 9px; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.profile-chip > span:nth-child(2) { display: grid; }
.profile-chip strong { color: var(--ink); font-size: 13px; }
.profile-chip small { color: var(--muted); font-size: 11px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #dfe5ff; color: #2d3e99; font-size: 11px; font-weight: 800; }
.profile-chip .icon-button { color: var(--muted); }

.workspace { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; height: 76px; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 64px); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 88%); backdrop-filter: blur(18px); }
.breadcrumb { display: grid; gap: 1px; }
.breadcrumb span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.breadcrumb strong { font: 700 17px/1.2 var(--sans); letter-spacing: -.02em; }
.top-actions, .heading-actions, .button-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.top-actions { flex-wrap: nowrap; }
.search-trigger { display: flex; min-width: 205px; height: 40px; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); }
.search-trigger svg { width: 16px; }
.search-trigger kbd { margin-left: auto; padding: 2px 6px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 10px; }
.icon-button { display: inline-grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 8px; background: transparent; color: currentColor; }
.icon-button:hover { background: rgb(23 63 58 / 6%); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button.small { width: 32px; height: 32px; }
.icon-button.bordered { border: 1px solid var(--line); background: var(--surface); }
.mobile-menu { display: none; }
.primary-button, .secondary-button, .light-button, .text-button, .danger-text { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; border: 0; font-weight: 700; transition: transform .18s ease, background .18s ease; }
.primary-button { padding: 0 17px; border-radius: 8px; background: var(--forest-2); color: #fff; box-shadow: 0 7px 18px rgb(77 99 219 / 18%); }
.primary-button:hover { background: #3d52c5; transform: translateY(-1px); }
.primary-button svg, .secondary-button svg, .text-button svg { width: 16px; }
.secondary-button { padding: 0 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.secondary-button:hover { border-color: #a9b8b3; }
.light-button { width: 100%; padding: 0 15px; border-radius: 8px; background: #fff; color: #3146ae; }
.text-button { min-height: 34px; padding: 0; background: transparent; color: var(--forest-2); }
.text-button:hover { transform: translateX(2px); }
.danger-text { padding: 0 4px; background: transparent; color: var(--danger); }

.view { display: none; max-width: 1540px; margin: 0 auto; padding: 54px clamp(24px, 4vw, 64px) 72px; animation: view-in .34s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-heading { margin-bottom: 44px; }
.page-heading.horizontal { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.page-heading.horizontal .primary-button { margin-bottom: 3px; }
.eyebrow { margin-bottom: 10px; color: var(--forest-2); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.lead { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 16px; }

#view-today { padding-top: 30px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.dashboard-heading h1 { margin-bottom: 4px; font-size: clamp(30px, 3vw, 42px); letter-spacing: -.045em; }
.dashboard-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.notification-button { position: relative; }
.notification-button i { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #ff6d61; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 292px); align-items: start; gap: 16px; }
.dashboard-main, .dashboard-rail { display: grid; min-width: 0; gap: 16px; }
.dashboard-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dashboard-module { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 3px 12px rgb(24 33 60 / 3%); }
.module-heading { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); }
.module-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 14px; font-weight: 750; letter-spacing: -.015em; }
.module-heading h2 svg { width: 18px; height: 18px; color: var(--forest-2); }
.module-link { display: flex; width: 100%; min-height: 42px; align-items: center; gap: 8px; padding: 0 16px; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; background: transparent; color: var(--forest-2); font-size: 10px; font-weight: 700; text-align: left; }
.module-link span { transition: transform .16s ease; }
.module-link:hover span { transform: translateX(3px); }
.dashboard-schedule { padding: 2px 16px; }
.dashboard-schedule .timeline-item { grid-template-columns: 54px 7px minmax(0, 1fr) auto; gap: 9px; min-height: 50px; }
.dashboard-schedule .timeline-item:hover { padding-inline: 3px; }
.dashboard-schedule .timeline-time { align-self: center; padding: 0; font: 700 10px/1 var(--sans); }
.dashboard-schedule .timeline-color { width: 7px; height: 7px; border-radius: 50%; }
.dashboard-schedule .timeline-content { min-width: 0; padding: 8px 0; }
.dashboard-schedule .timeline-content h3 { overflow: hidden; margin: 0; font: 700 11px/1.25 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-schedule .timeline-content p { display: none; }
.dashboard-schedule .timeline-room { font-size: 9px; }
.dashboard-tasks { padding: 2px 16px; }
.dashboard-tasks .task-row { min-height: 50px; align-items: center; padding: 7px 0; }
.dashboard-tasks .task-check { margin: 0; }
.dashboard-tasks .task-copy { min-width: 0; }
.dashboard-tasks .task-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-tasks .task-copy small { font-size: 9px; }
.dashboard-classes { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 14px; }
.dashboard-class-tile { display: grid; min-width: 0; min-height: 86px; align-content: center; gap: 2px; padding: 11px 13px; border: 0; border-left: 3px solid var(--forest-2); border-radius: 7px; background: #f2f0ff; text-align: left; }
.dashboard-class-tile.tone-2 { border-color: #17a88d; background: #eef9f6; }
.dashboard-class-tile.tone-3 { border-color: #f0a711; background: #fff8e9; }
.dashboard-class-tile.tone-4 { border-color: #f2665e; background: #fff1ef; }
.dashboard-class-tile:hover { filter: brightness(.98); }
.dashboard-class-tile strong { font-size: 13px; }
.dashboard-class-tile span { overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-class-tile small { margin-top: 4px; font-size: 8px; }
.dashboard-rail { align-content: start; }
.calendar-module { padding-bottom: 0; }
.mini-calendar { padding: 13px 14px 15px; }
.calendar-toolbar { display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; margin-bottom: 10px; }
.calendar-toolbar strong { font-size: 11px; text-align: center; }
.calendar-toolbar button { display: grid; width: 28px; height: 28px; place-items: center; border: 0; background: transparent; }
.calendar-toolbar svg { width: 14px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-weekdays span { padding-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 700; text-align: center; }
.calendar-day { position: relative; display: grid; aspect-ratio: 1; place-items: center; border-radius: 50%; font-size: 9px; }
.calendar-day.outside { color: #c2c6d1; }
.calendar-day.today { background: var(--forest-2); color: #fff; font-weight: 800; }
.calendar-day.has-event:not(.today)::after { position: absolute; bottom: 2px; width: 3px; height: 3px; border-radius: 50%; background: #ff6d61; content: ""; }
.dashboard-reminders { display: grid; gap: 8px; padding: 13px; }
.reminder-item { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; min-height: 56px; padding: 8px; border-radius: 7px; background: #fff7e8; }
.reminder-item.coral { background: #fff0ee; }.reminder-item.mint { background: #edf9f6; }
.reminder-item time { display: grid; place-items: center; color: #df9813; line-height: 1; }
.reminder-item.coral time { color: #ef625b; }.reminder-item.mint time { color: #159f86; }
.reminder-item time strong { font-size: 17px; }
.reminder-item time small { margin-top: 3px; color: currentColor; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.reminder-item > span { display: grid; min-width: 0; gap: 2px; }
.reminder-item > span strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.reminder-item > span small { font-size: 8px; }
.today-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.day-weather { display: grid; grid-template-columns: auto auto 1px auto auto; align-items: baseline; gap: 8px; padding-bottom: 7px; }
.day-weather span { font: 700 28px/1 var(--serif); }
.day-weather small { font-size: 11px; text-transform: uppercase; }
.day-weather i { width: 1px; height: 27px; margin: 0 10px; background: var(--line); }

.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .7fr); gap: clamp(38px, 5vw, 80px); }
.section-heading { display: flex; min-width: 0; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading .text-button { flex: 0 0 auto; }
.section-heading h2 { margin: 0; }
.section-heading.compact { align-items: center; margin-bottom: 14px; }
.section-heading.compact h2 { font-size: 22px; }
.timeline { border-top: 1px solid var(--ink); }
.timeline-item { display: grid; grid-template-columns: 74px 6px minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 94px; border-bottom: 1px solid var(--line); transition: background .18s ease, padding .18s ease; }
.timeline-item:hover { padding-inline: 8px; background: rgb(255 255 255 / 48%); }
.timeline-time { align-self: start; padding-top: 24px; font: 650 16px/1 var(--serif); }
.timeline-color { width: 3px; height: 45px; background: var(--mint); }
.timeline-color.sand { background: var(--sand); }
.timeline-color.rose { background: var(--rose); }
.timeline-color.blue { background: #b7d0d4; }
.timeline-content { padding: 19px 0; }
.timeline-content h3 { margin-bottom: 3px; font: 650 18px/1.2 var(--serif); letter-spacing: -.02em; }
.timeline-content p { margin: 0; color: var(--muted); font-size: 13px; }
.timeline-room { color: var(--muted); font-size: 12px; }
.day-sidebar { display: grid; align-content: start; gap: 30px; }
.focus-panel { position: relative; overflow: hidden; padding: 34px; border-radius: 16px; background: #4258d1; color: rgb(255 255 255 / 78%); box-shadow: 0 20px 50px rgb(47 66 171 / 20%); }
.focus-panel::after { position: absolute; top: -48px; right: -38px; width: 130px; height: 130px; border: 18px solid rgb(255 255 255 / 8%); border-radius: 24px; content: ""; transform: rotate(18deg); }
.focus-panel .eyebrow { color: #dfe4ff; }
.focus-panel h2 { margin: 22px 0 10px; color: #fff; font-size: 31px; font-weight: 700; }
.focus-panel p { color: rgb(255 255 255 / 62%); }
.class-label { display: inline-block; border-bottom: 1px solid rgb(255 255 255 / 28%); color: #fff; font-weight: 700; }
.focus-meta { display: flex; gap: 28px; margin: 28px 0 22px; }
.focus-meta span { display: grid; color: rgb(255 255 255 / 48%); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.focus-meta b { color: #fff; font: 400 20px/1.2 var(--serif); }
.plain-section { padding-top: 2px; }
.compact-list { display: grid; }
.task-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.task-check { display: grid; width: 19px; height: 19px; place-items: center; margin-top: 1px; border: 1px solid #aab7b3; background: transparent; }
.task-check svg { width: 13px; opacity: 0; }
.task-row.done .task-check { border-color: var(--forest-2); background: var(--forest-2); color: white; }
.task-row.done .task-check svg { opacity: 1; }
.task-row.done .task-copy { color: var(--muted); text-decoration: line-through; }
.task-copy { display: grid; gap: 2px; }
.task-copy strong { font-size: 13px; }
.task-copy small { font-size: 11px; }
.priority { display: inline-block; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--sand); }
.priority.high { background: #c87567; }
.priority.low { background: #84aa9b; }
.calm-note { display: grid; grid-template-columns: 28px 1fr; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.calm-note svg { width: 20px; color: var(--forest-2); }
.calm-note strong { font: 700 14px/1.2 var(--serif); }
.calm-note p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.week-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.legend { display: flex; gap: 18px; color: var(--muted); font-size: 11px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.dot.osztalyfonoki { background: var(--sand); }
.dot.meeting { background: var(--rose); }
.week-board { display: grid; grid-template-columns: 54px repeat(5, minmax(150px, 1fr)); overflow-x: auto; border-top: 1px solid var(--ink); border-left: 1px solid var(--line); background: rgb(255 255 255 / 30%); }
.week-corner, .week-day { min-height: 68px; padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.week-day { display: grid; gap: 2px; }
.week-day strong { font: 700 15px/1.2 var(--serif); }
.week-day small { font-size: 10px; text-transform: uppercase; }
.week-day.today { background: var(--mint-soft); }
.week-hour { min-height: 104px; padding: 14px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.week-cell { position: relative; min-height: 104px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.week-entry { min-height: 88px; padding: 11px; border-left: 3px solid #8cb5a5; background: var(--mint-soft); transition: transform .16s ease, box-shadow .16s ease; }
.week-entry:hover { z-index: 2; transform: translateY(-2px); box-shadow: 0 8px 20px rgb(24 61 55 / 10%); }
.week-entry.sand { border-color: #c7a979; background: var(--sand-soft); }
.week-entry.rose { border-color: #c58f82; background: var(--rose-soft); }
.week-entry.blue { border-color: #82a6ae; background: var(--blue-soft); }
.week-entry strong { display: block; margin-bottom: 4px; font-size: 12px; }
.week-entry small { font-size: 10px; }
.week-entry.empty { display: grid; place-items: center; border: 1px dashed transparent; background: transparent; color: transparent; }
.week-cell:hover .week-entry.empty { border-color: var(--line); color: var(--muted); }

.homeroom-heading { margin-bottom: 30px; }
.homeroom-overview { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 30px; border-block: 1px solid var(--line); }
.homeroom-overview > div { display: grid; gap: 3px; padding: 18px 22px; border-right: 1px solid var(--line); }
.homeroom-overview > div:last-child { border-right: 0; }
.homeroom-overview strong { font: 700 27px/1 var(--serif); letter-spacing: -.04em; }
.homeroom-overview span { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.workspace-tabs { display: flex; gap: 27px; margin-bottom: 0; border-bottom: 1px solid var(--ink); }
.workspace-tabs button { min-height: 46px; padding: 0 0 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); }
.workspace-tabs button.active { border-color: var(--forest-2); color: var(--ink); font-weight: 800; }
.homeroom-roster-layout { display: grid; grid-template-columns: minmax(620px, 1.5fr) minmax(310px, .72fr); min-height: 600px; }
.homeroom-roster-layout > * { min-width: 0; }
.roster-table-wrap { min-width: 0; overflow-x: auto; padding: 22px 28px 0 0; border-right: 1px solid var(--line); }
.homeroom-table { min-width: 680px; }
.homeroom-table td:first-child { width: auto; }
.homeroom-table td:first-child small { display: block; margin-top: 3px; font-size: 9px; font-weight: 400; }
.student-select-row { cursor: pointer; transition: background .16s ease; }
.student-select-row:hover, .student-select-row.active { background: var(--surface); }
.student-select-row.active { box-shadow: inset 3px 0 var(--forest-2); }
.student-inspector { padding: 34px 0 40px clamp(25px, 3vw, 45px); }
.student-inspector-head { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 16px; margin-bottom: 30px; }
.avatar.large { width: 52px; height: 52px; font-size: 13px; }
.student-inspector-head .eyebrow { margin-bottom: 4px; }
.student-inspector-head h2 { margin-bottom: 3px; font-size: 28px; font-weight: 700; }
.student-inspector-head p { margin: 0; color: var(--muted); font-size: 11px; }
.data-list { display: grid; margin: 0; }
.data-list > div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.data-list dt { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.data-list dd { margin: 0; font-size: 12px; }
.data-list dd small { display: block; margin-top: 3px; line-height: 1.4; }
.inspector-section { margin-top: 26px; }
.inspector-section h3 { margin: 0; font: 700 16px/1.2 var(--serif); }
.parent-contact { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.parent-contact strong, .parent-contact a { font-size: 11px; }
.parent-contact small { grid-column: 2; grid-row: 1; }
.parent-contact a { grid-column: 1 / -1; width: max-content; color: var(--forest-2); text-decoration: none; }
.inspector-metrics { display: flex; gap: 25px; }
.inspector-metrics span { display: grid; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.inspector-metrics b { color: var(--ink); font: 400 21px/1.2 var(--serif); }
.content-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 30px 0 20px; border-bottom: 1px solid var(--line); }
.content-toolbar h2 { margin-bottom: 5px; }
.content-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.log-list { max-width: 1000px; }
.log-entry { display: grid; grid-template-columns: 110px 90px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.log-entry time { color: var(--muted); font-size: 11px; }
.log-channel { align-self: start; width: max-content; padding: 4px 7px; background: var(--mint-soft); color: var(--forest-2); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.log-entry h3 { margin-bottom: 3px; font: 700 17px/1.2 var(--serif); }
.log-entry p { margin-bottom: 6px; color: var(--ink-2); font-size: 12px; }
.log-entry small { color: var(--forest-2); }
.absence-summary { display: flex; gap: 0; margin: 24px 0; }
.absence-summary span { display: grid; min-width: 160px; padding-right: 28px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.absence-summary b { color: var(--ink); font: 400 25px/1.2 var(--serif); }
.status-label { display: inline-flex; padding: 3px 7px; background: var(--mint-soft); color: var(--forest-2); font-size: 9px; font-weight: 800; }
.status-label.waiting { background: var(--sand-soft); color: #80663c; }
.status-label.alert { background: var(--rose-soft); color: var(--danger); }
.statistics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; padding-top: 16px; }
.stat-block { padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.stat-block h3 { margin-bottom: 18px; font: 700 18px/1.2 var(--serif); }
.stat-bars { display: grid; gap: 10px; }
.stat-row { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(100px, 1fr) 24px; align-items: center; gap: 12px; }
.stat-row > span { color: var(--ink-2); font-size: 11px; }
.stat-row > div { height: 6px; background: #e5e7e1; }
.stat-row i { display: block; height: 100%; background: var(--forest-2); transition: width .5s ease; }
.stat-row i.stat-p10 { width: 10%; }
.stat-row i.stat-p20 { width: 20%; }
.stat-row i.stat-p30 { width: 30%; }
.stat-row i.stat-p40 { width: 40%; }
.stat-row i.stat-p50 { width: 50%; }
.stat-row i.stat-p60 { width: 60%; }
.stat-row i.stat-p70 { width: 70%; }
.stat-row i.stat-p80 { width: 80%; }
.stat-row i.stat-p90 { width: 90%; }
.stat-row i.stat-p100 { width: 100%; }
.stat-row b { font: 400 15px/1 var(--serif); text-align: right; }

.class-layout { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); min-height: 560px; border-top: 1px solid var(--ink); }
.class-index { border-right: 1px solid var(--line); }
.class-button { display: grid; width: 100%; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 19px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; transition: background .18s ease; }
.class-button:hover, .class-button.active { background: var(--surface); }
.class-button.active { box-shadow: inset 3px 0 var(--forest-2); }
.class-button strong { font: 700 18px/1 var(--serif); }
.class-button small { grid-column: 1; font-size: 11px; }
.class-button span { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--muted); font-size: 11px; }
.class-detail { padding: 36px clamp(24px, 4vw, 56px); background: rgb(255 255 255 / 35%); }
.class-detail-head { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.class-detail-head h2 { margin-bottom: 7px; font-size: 38px; font-weight: 700; }
.class-stats { display: flex; gap: 28px; }
.class-stats span { display: grid; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.class-stats b { color: var(--ink); font: 400 23px/1.2 var(--serif); }
.detail-tabs { display: flex; gap: 22px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-tabs button { padding: 0 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
.detail-tabs button.active { border-color: var(--forest-2); color: var(--ink); font-weight: 700; }
.student-table { width: 100%; border-collapse: collapse; }
.student-table th, .student-table td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.student-table th { color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.student-table td { font-size: 13px; }
.student-table td:first-child { width: 42px; color: var(--muted); }
.support-tag { display: inline-flex; padding: 3px 7px; background: var(--sand-soft); color: #765d37; font-size: 10px; font-weight: 700; }
.support-tag.none { background: transparent; color: var(--muted); font-weight: 400; }
.grade-legend { display: flex; gap: 22px; margin-bottom: 16px; color: var(--muted); font-size: 9px; }
.grade-legend span { display: flex; align-items: center; gap: 6px; }
.grade-legend i { padding: 3px 5px; background: var(--paper); color: var(--ink-2); font-style: normal; font-weight: 800; }
.grade-list { display: flex; gap: 5px; flex-wrap: wrap; }
.grade-chip { display: inline-grid; min-width: 35px; grid-template-columns: 1fr; place-items: center; padding: 3px 5px; background: var(--mint-soft); }
.grade-chip b { font: 400 15px/1 var(--serif); }
.grade-chip small { font-size: 7px; line-height: 1; }
.average-value { font: 400 19px/1 var(--serif); }
.gradebook-table td:nth-child(3) { min-width: 180px; }

.filter-row { display: flex; gap: 12px; margin: -14px 0 26px; }
.search-field { display: flex; min-width: 300px; max-width: 600px; flex: 1; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); background: var(--surface); }
.search-field svg { width: 17px; color: var(--muted); }
.search-field input { width: 100%; height: 44px; border: 0; background: transparent; outline: 0; }
select { height: 44px; padding: 0 36px 0 13px; border: 1px solid var(--line); background: var(--surface); }
.lesson-table { border-top: 1px solid var(--ink); }
.lesson-row { display: grid; grid-template-columns: minmax(230px, 1.4fr) .7fr .5fr .6fr 36px; align-items: center; gap: 20px; min-height: 78px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.lesson-row:hover { background: rgb(255 255 255 / 42%); }
.lesson-title { display: grid; gap: 3px; }
.lesson-title strong { font: 700 16px/1.2 var(--serif); }
.lesson-title small, .lesson-meta { color: var(--muted); font-size: 11px; }
.subject-tag { width: max-content; padding: 4px 8px; background: var(--mint-soft); color: var(--forest-2); font-size: 10px; font-weight: 800; text-transform: uppercase; }

.task-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 34px; border-block: 1px solid var(--line); }
.summary-item { display: grid; gap: 2px; padding: 20px 24px; border-right: 1px solid var(--line); }
.summary-item:last-child { border: 0; }
.summary-item strong { font: 400 32px/1 var(--serif); }
.summary-item span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.task-workspace { max-width: 920px; }
.task-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.task-tabs button { padding: 0 0 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
.task-tabs button.active { border-color: var(--forest-2); color: var(--ink); font-weight: 700; }
.task-list.large .task-row { grid-template-columns: 28px minmax(0, 1fr) 120px 14px; padding: 18px 2px; }
.task-list.large .task-copy strong { font-size: 15px; }
.task-due { color: var(--muted); font-size: 11px; text-align: right; }

.notes-layout { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); min-height: 560px; border-top: 1px solid var(--ink); }
.notes-index { border-right: 1px solid var(--line); }
.note-link { display: grid; width: 100%; gap: 5px; padding: 19px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.note-link:hover, .note-link.active { background: var(--surface); }
.note-link.active { box-shadow: inset 3px 0 var(--forest-2); }
.note-link strong { font: 700 15px/1.25 var(--serif); }
.note-link small { font-size: 10px; }
.note-link p { display: -webkit-box; overflow: hidden; margin: 2px 0 0; color: var(--muted); font-size: 11px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-editor { padding: 42px clamp(28px, 6vw, 80px); background: var(--surface); }
.note-editor .note-date { margin-bottom: 24px; color: var(--muted); font-size: 11px; }
.note-editor h2 { font-size: 38px; font-weight: 700; }
.note-body { max-width: 750px; color: var(--ink-2); line-height: 1.85; white-space: pre-line; }
.note-labels { display: flex; gap: 7px; margin-top: 30px; }
.note-labels span { padding: 5px 8px; background: var(--paper); color: var(--muted); font-size: 10px; }

.settings-layout { display: grid; max-width: 920px; }
.settings-section { display: grid; grid-template-columns: minmax(170px, .55fr) minmax(0, 1.45fr); gap: 38px; padding: 30px 0; border-top: 1px solid var(--line); }
.settings-section h2 { font-size: 22px; }
.settings-section > p { color: var(--muted); }
.settings-section > .button-row, .settings-section > .feature-checklist { grid-column: 2; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label, .modal label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
input, textarea { border: 1px solid var(--line); background: var(--surface); }
.form-grid input, .modal input, .modal textarea, .modal select { width: 100%; min-height: 44px; padding: 10px 12px; }
.form-divider { position: relative; margin: 5px 0 0; border-top: 1px solid var(--line); }
.form-divider span { position: relative; top: -9px; padding-right: 10px; background: var(--surface); color: var(--forest-2); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.modal-context { display: grid; gap: 2px; padding: 13px; background: var(--mint-soft); }
.modal-context span { color: var(--forest-2); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.modal-context strong { font: 400 19px/1.2 var(--serif); }
.bell-settings > div:first-child p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.bell-schedule { display: grid; margin-bottom: 12px; border-top: 1px solid var(--line); }
.bell-row { display: grid; grid-template-columns: 72px 1fr 12px 1fr; align-items: end; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bell-row > strong { align-self: center; font: 400 15px/1.2 var(--serif); }
.bell-row > span { align-self: center; color: var(--muted); }
.bell-row label { display: grid; gap: 3px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.bell-row input { width: 100%; height: 36px; padding: 5px 8px; }
textarea { min-height: 112px; resize: vertical; }
.feature-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 24px; margin: 0; padding: 0; list-style: none; }
.feature-checklist li::before { margin-right: 9px; color: var(--forest-2); content: "✓"; }
.file-button { position: relative; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.overlay { position: fixed; inset: 0; z-index: 18; background: rgb(8 29 26 / 46%); backdrop-filter: blur(3px); }
dialog { padding: 0; border: 0; color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(8 29 26 / 46%); backdrop-filter: blur(3px); }
.modal { width: min(560px, calc(100vw - 28px)); }
.modal form { max-height: 88vh; overflow-y: auto; padding: 30px; background: var(--surface); }
.modal-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 25px; }
.modal-heading h2 { margin: 0; font-size: 31px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.modal-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.roster-import-modal { width: min(720px, calc(100vw - 28px)); }
.roster-import-modal form { padding: 30px 34px; }
.roster-import-modal .modal-heading { margin-bottom: 20px; }
.roster-import-modal .modal-heading p:last-child { max-width: 500px; margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.roster-file-picker { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 86px; padding: 16px 18px; border: 1px dashed #aca5dd; border-radius: 10px; background: #f6f4ff; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.roster-file-picker:hover { border-color: var(--forest-2); background: #efedff; }
.roster-file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.roster-file-picker > span:nth-child(2) { display: grid; gap: 4px; }
.roster-file-picker strong { font-size: 14px; }
.roster-file-picker small { color: var(--muted); font-size: 10px; }
.roster-file-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 9px; background: var(--forest-2); color: #fff; }
.roster-file-icon svg { width: 21px; }
.roster-helper { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 2px 17px; }
.roster-helper p { margin: 0; color: var(--muted); font-size: 9px; }
.roster-helper .text-button { flex: 0 0 auto; }
.roster-import-status { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; padding: 13px 15px; border-block: 1px solid var(--line); background: rgb(255 255 255 / 45%); }
.roster-import-status > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--mint-soft); color: var(--forest-2); font-size: 14px; font-weight: 800; }
.roster-import-status p { display: grid; gap: 3px; margin: 0; }
.roster-import-status strong { font-size: 12px; }
.roster-import-status small { color: var(--muted); font-size: 9px; }
.roster-preview { margin-top: 16px; }
.roster-recognized { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: start; gap: 12px; margin-bottom: 12px; }
.roster-recognized > strong { padding-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.roster-recognized > div { display: flex; gap: 5px; flex-wrap: wrap; }
.roster-recognized span { padding: 4px 7px; border-radius: 999px; background: #efedff; color: var(--forest-2); font-size: 8px; font-weight: 700; }
.roster-recognized span.warning { background: var(--sand-soft); color: #80663c; }
.roster-preview-table-wrap { max-height: 270px; overflow: auto; border: 1px solid var(--line); }
.roster-preview-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.roster-preview-table th { position: sticky; top: 0; padding: 9px 10px; background: var(--paper); color: var(--muted); font-size: 8px; text-align: left; text-transform: uppercase; }
.roster-preview-table td { padding: 9px 10px; border-top: 1px solid var(--line-soft); }
.import-ready { padding: 3px 6px; border-radius: 999px; background: var(--mint-soft); color: #12866f; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.roster-more { margin: 0; padding: 9px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: center; }
.roster-error { margin: 0; padding: 16px; background: var(--sand-soft); color: #80663c; font-size: 10px; }
.roster-import-modal .primary-button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.search-modal { top: 10vh; width: min(680px, calc(100vw - 28px)); margin: 0 auto; background: var(--surface); }
.search-modal-bar { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-modal-bar svg { width: 19px; color: var(--muted); }
.search-modal-bar input { height: 40px; border: 0; outline: 0; font-size: 17px; }
.key-button { padding: 4px 7px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 10px; }
.search-results { max-height: 55vh; overflow: auto; padding: 8px; }
.search-results > p { padding: 28px; color: var(--muted); text-align: center; }
.search-result { display: grid; width: 100%; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; padding: 12px; border: 0; background: transparent; text-align: left; }
.search-result:hover { background: var(--paper); }
.search-result > span:first-child { display: grid; width: 30px; height: 30px; place-items: center; background: var(--mint-soft); }
.search-result svg { width: 15px; }
.search-result strong { display: block; font-size: 13px; }
.search-result small { font-size: 10px; }
.search-result > small { text-transform: uppercase; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 360px; padding: 12px 16px; background: var(--forest); color: #fff; opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .22s ease, transform .22s ease; }
.toast.show { opacity: 1; transform: none; }
.empty-state { padding: 38px 12px; color: var(--muted); text-align: center; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 220px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-rail { grid-template-columns: 1fr 1fr; }
  .today-grid { grid-template-columns: 1fr; }
  .day-sidebar { grid-template-columns: 1fr 1fr; }
  .calm-note { grid-column: 1 / -1; }
  .lesson-row { grid-template-columns: minmax(200px, 1.3fr) .7fr .5fr 36px; }
  .lesson-row > :nth-child(4) { display: none; }
  .homeroom-roster-layout { grid-template-columns: 1fr; }
  .roster-table-wrap { padding-right: 0; border-right: 0; }
  .student-inspector { border-top: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .sidebar { width: min(290px, 86vw); transform: translateX(-100%); transition: transform .24s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .workspace { width: 100%; max-width: 100vw; margin-left: 0; overflow-x: hidden; }
  .mobile-menu { display: inline-grid; }
  .breadcrumb { margin-right: auto; }
  .topbar { gap: 8px; padding: 0 18px; }
  .search-trigger { min-width: 40px; width: 40px; }
  .search-trigger span:nth-child(2), .search-trigger kbd { display: none; }
  .view { width: 100%; max-width: 100vw; padding: 38px 20px 60px; }
  #view-today { padding-top: 26px; }
  .page-heading, .page-heading.horizontal, .today-heading { align-items: start; flex-direction: column; margin-bottom: 34px; }
  .day-weather { display: none; }
  .class-layout, .notes-layout { grid-template-columns: 1fr; }
  .class-index, .notes-index { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .class-button, .note-link { min-width: 190px; border-right: 1px solid var(--line); border-bottom: 0; }
  .class-button.active, .note-link.active { box-shadow: inset 0 -3px var(--forest-2); }
  .settings-section { grid-template-columns: 1fr; gap: 12px; }
  .settings-section > .button-row, .settings-section > .feature-checklist { grid-column: 1; }
  .homeroom-overview { grid-template-columns: repeat(3, 1fr); }
  .homeroom-overview > div:nth-child(3) { border-right: 0; }
  .homeroom-overview > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .statistics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  h1 { font-size: 42px; }
  .page-heading, .page-heading > div { width: 100%; max-width: 100%; min-width: 0; }
  .page-heading h1 { overflow-wrap: anywhere; }
  .topbar { height: 66px; }
  .top-actions > .icon-button { display: none; }
  .top-actions { gap: 4px; }
  .top-actions .primary-button { min-width: 40px; padding: 0 11px; }
  .primary-button span:not([data-icon]) { display: none; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-heading .heading-actions { width: 100%; }
  .dashboard-heading .primary-button { flex: 1; }
  .dashboard-pair, .dashboard-rail { grid-template-columns: 1fr; }
  .today-grid { gap: 34px; }
  .day-sidebar { grid-template-columns: 1fr; }
  .calm-note { grid-column: auto; }
  .timeline-item { grid-template-columns: 58px 4px minmax(0, 1fr); gap: 11px; }
  .timeline-room { display: none; }
  .focus-panel { padding: 27px; }
  .filter-row { flex-direction: column; }
  .search-field { min-width: 0; }
  .lesson-row { grid-template-columns: 1fr auto; gap: 8px; padding: 15px 4px; }
  .lesson-row > :nth-child(2), .lesson-row > :nth-child(3), .lesson-row > :nth-child(4) { display: none; }
  .task-summary { grid-template-columns: 1fr 1fr 1fr; }
  .summary-item { padding: 15px 10px; }
  .task-list.large .task-row { grid-template-columns: 26px minmax(0, 1fr) 8px; }
  .task-due { display: none; }
  .class-detail, .note-editor { padding: 28px 18px; }
  .class-detail-head { flex-direction: column; }
  .student-table th:nth-child(3), .student-table td:nth-child(3) { display: none; }
  .form-grid, .feature-checklist, .modal-grid { grid-template-columns: 1fr; }
  .modal-grid .full { grid-column: 1; }
  .workspace-tabs { gap: 17px; overflow-x: auto; }
  .workspace-tabs button { flex: 0 0 auto; font-size: 12px; }
  .homeroom-overview { grid-template-columns: 1fr 1fr; }
  .homeroom-overview > div { padding: 14px 10px; }
  .homeroom-overview > div:nth-child(2n) { border-right: 0; }
  .homeroom-overview > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .homeroom-roster-layout, .roster-table-wrap { width: 100%; max-width: 100%; }
  .homeroom-roster-layout { overflow: hidden; }
  .content-toolbar { align-items: start; flex-direction: column; }
  .log-entry { grid-template-columns: 86px 1fr; }
  .log-entry > div { grid-column: 1 / -1; }
  .absence-summary { flex-wrap: wrap; gap: 14px 0; }
  .absence-summary span { min-width: 50%; }
  .absence-table { min-width: 720px; }
  .gradebook-table { min-width: 760px; }
  .class-detail { overflow-x: auto; }
  .bell-row { grid-template-columns: 60px 1fr 8px 1fr; }
}

@media print {
  .sidebar, .topbar, .heading-actions, .primary-button, .secondary-button, .text-button, .icon-button, .task-tabs { display: none !important; }
  body, .workspace, .view { margin: 0; background: #fff; }
  .view { display: none !important; max-width: none; padding: 12mm; }
  .view.active { display: block !important; }
  .page-heading { margin-bottom: 8mm; }
  .today-grid { grid-template-columns: 1fr; }
  .day-sidebar { grid-template-columns: 1fr 1fr; page-break-before: always; }
  .focus-panel { print-color-adjust: exact; }
  .week-board { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Single-user workspace and reviewed curriculum library */
.setup-strip { display: grid; grid-template-columns: minmax(190px, .4fr) minmax(0, 1.6fr); align-items: center; gap: 24px; margin-bottom: 16px; padding: 18px 20px; border: 1px solid #ddd9ff; border-radius: 10px; background: #f2f0ff; }
.setup-strip[hidden] { display: none; }
.setup-strip > div:first-child { display: grid; gap: 2px; }
.setup-strip > div:first-child span { color: var(--forest-2); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.setup-strip > div:first-child strong { font-size: 15px; }
.setup-strip > div:last-child { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.setup-step { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 9px; min-width: 0; min-height: 58px; padding: 8px 10px; border: 1px solid #dedaf9; background: #fff; text-align: left; }
.setup-step i { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--forest-2); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.setup-step span { display: grid; min-width: 0; }
.setup-step b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.setup-step small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.setup-step.done { opacity: .55; }
.setup-step.done i { background: #19a98e; }
.empty-workspace { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 8px; padding: 28px; color: var(--muted); text-align: center; }
.empty-workspace > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #efedff; color: var(--forest-2); }
.empty-workspace > span svg { width: 18px; }
.empty-workspace strong { color: var(--ink); font-size: 14px; }
.empty-workspace p { max-width: 470px; margin: 0; font-size: 10px; }
.compact-empty { margin: 0; padding: 26px 14px; color: var(--muted); font-size: 10px; text-align: center; }
.compact-empty.align-left { padding-inline: 0; text-align: left; }
.next-lessons { display: grid; min-height: 187px; align-content: start; padding: 4px 16px; }
.next-lesson { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 48px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; }
.next-lesson > span:first-child { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 6px; background: #efedff; color: var(--forest-2); font-size: 9px; font-weight: 800; }
.next-lesson > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.next-lesson strong, .next-lesson small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-lesson strong { font-size: 9px; }.next-lesson small { font-size: 8px; }
.next-lesson > b { color: var(--forest-2); }
.week-hour { display: grid; align-content: center; gap: 2px; }
.week-hour small { font-size: 7px; }
.week-entry { position: relative; }
.week-entry > button { position: absolute; top: 5px; right: 5px; display: none; width: 20px; height: 20px; border: 0; background: transparent; color: var(--muted); }
.week-entry:hover > button { display: grid; place-items: center; }
button.week-entry.empty { width: 100%; }
.class-source-link { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 28px; padding: 16px; border: 1px solid #dcd8ff; border-radius: 9px; background: #f2f0ff; }
.class-source-link > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 8px; background: var(--forest-2); color: #fff; }
.class-source-link svg { width: 20px; }
.class-source-link p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.class-table-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.class-table-heading h3 { margin: 0; font-size: 15px; }.class-table-heading p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.class-table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { padding: 14px; background: var(--sand-soft); color: #80663c; }
.modal-note { margin: 0; padding: 12px; background: #f2f0ff; color: var(--muted); font-size: 10px; }
.full-row { grid-column: 1 / -1; justify-self: start; }
.bell-row { grid-template-columns: 72px 1fr 12px 1fr 34px; }

.curriculum-heading { margin-bottom: 28px; }
.curriculum-controls { display: grid; grid-template-columns: 220px 150px minmax(260px, 1fr) 220px; align-items: end; gap: 10px; margin-bottom: 14px; }
.curriculum-controls > label:not(.search-field) { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.curriculum-controls select { width: 100%; }
.curriculum-controls .search-field { max-width: none; min-width: 0; }
.curriculum-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 20px 22px; border-block: 1px solid var(--line); background: rgb(255 255 255 / 35%); }
.curriculum-identity { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 15px; }
.curriculum-identity > span { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 12px; background: var(--forest-2); color: #fff; font-size: 23px; font-weight: 800; }
.curriculum-identity .eyebrow { margin: 0 0 2px; }
.curriculum-identity h2 { margin: 0; font-size: 21px; }
.curriculum-identity p:last-child { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.resource-downloads { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.resource-downloads a { display: inline-flex; min-height: 34px; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink-2); font-size: 9px; font-weight: 700; text-decoration: none; }
.resource-downloads a:hover { border-color: #b5acee; color: var(--forest-2); }
.resource-downloads svg { width: 13px; }
.curriculum-list { border-top: 1px solid var(--line); }
.curriculum-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 265px; gap: 18px; padding: 19px 4px; border-bottom: 1px solid var(--line); transition: background .16s ease; }
.curriculum-row:hover { background: rgb(255 255 255 / 50%); }
.curriculum-row.done { background: #eff9f6; }
.lesson-number { display: grid; align-content: start; justify-items: center; gap: 1px; padding-top: 2px; }
.lesson-number span { font-size: 20px; font-weight: 800; line-height: 1; }.lesson-number small { font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.lesson-main { min-width: 0; }
.lesson-main > p { margin: 0 0 3px; color: var(--forest-2); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lesson-main h3 { margin: 0 0 4px; font-size: 14px; }
.lesson-main > small { font-size: 9px; }
.lesson-main details { margin-top: 10px; }
.lesson-main summary { width: max-content; color: var(--forest-2); cursor: pointer; font-size: 9px; font-weight: 700; }
.lesson-main dl { display: grid; gap: 7px; margin: 12px 0 0; padding: 12px; border-left: 2px solid #dcd8ff; background: #f8f7ff; }
.lesson-main dl div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.lesson-main dt { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.lesson-main dd { margin: 0; font-size: 10px; }
.lesson-resources { display: grid; grid-template-columns: repeat(3, 1fr); align-content: start; gap: 6px; }
.lesson-resources a { display: grid; min-height: 46px; align-content: center; gap: 1px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 9px; font-weight: 800; text-decoration: none; }
.lesson-resources a:hover { border-color: #b5acee; color: var(--forest-2); }
.lesson-resources a small { font-size: 7px; font-weight: 500; }
.lesson-progress { grid-column: 1 / -1; min-height: 32px; border: 1px solid #d8d3fa; background: #f1efff; color: var(--forest-2); font-size: 9px; font-weight: 800; }
.lesson-progress.done { border-color: #bce3da; background: #eaf8f4; color: #12866f; }
.progress-hint { grid-column: 1 / -1; padding-top: 4px; font-size: 8px; text-align: center; }

@media (max-width: 1180px) {
  .curriculum-controls { grid-template-columns: 1fr 1fr; }
  .curriculum-controls .search-field { grid-column: 1 / -1; grid-row: 2; }
  .curriculum-summary { align-items: flex-start; flex-direction: column; }
  .resource-downloads { justify-content: flex-start; }
}

@media (max-width: 820px) {
  .setup-strip { grid-template-columns: 1fr; }
  .setup-strip > div:last-child { grid-template-columns: 1fr; }
  .curriculum-row { grid-template-columns: 42px minmax(0, 1fr); }
  .lesson-resources { grid-column: 2; }
  .class-source-link { grid-template-columns: 42px 1fr; }
  .class-source-link .secondary-button { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .setup-strip { padding: 15px; }
  .curriculum-controls { grid-template-columns: 1fr; }
  .curriculum-controls .search-field { grid-column: 1; grid-row: auto; }
  .curriculum-summary { padding: 16px 0; background: transparent; }
  .curriculum-identity { grid-template-columns: 48px 1fr; }
  .curriculum-identity > span { width: 46px; height: 46px; font-size: 19px; }
  .curriculum-identity h2 { font-size: 17px; }
  .resource-downloads { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .curriculum-row { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 16px 0; }
  .lesson-resources { grid-template-columns: 1fr; }
  .lesson-main dl div { grid-template-columns: 1fr; gap: 2px; }
  .class-table-heading { align-items: flex-start; flex-direction: column; }
  .class-table-actions { display: grid; width: 100%; grid-template-columns: 1fr; }
  .class-table-actions button { width: 100%; justify-content: center; }
  .roster-import-modal form { padding: 22px 18px; }
  .roster-helper { align-items: flex-start; flex-direction: column; gap: 5px; }
  .roster-recognized { grid-template-columns: 1fr; gap: 5px; }
  .roster-preview-table { min-width: 500px; }
  .bell-row { grid-template-columns: 58px 1fr 8px 1fr 30px; }
}
