:root {
  --page: #f5f4ef;
  --panel: #fffefa;
  --panel-muted: #f0f1eb;
  --line: #dfe2d9;
  --line-strong: #c8cdc1;
  --ink: #1d2a24;
  --muted: #7d877f;
  --muted-deep: #536158;
  --green: #275d55;
  --green-soft: #e6f0ea;
  --yellow: #eadb4e;
  --yellow-soft: #fff8c9;
  --blue: #4d6da9;
  --blue-soft: #eaf0fb;
  --orange: #c9784f;
  --orange-soft: #f9e9df;
  --shadow: 0 12px 28px rgba(35, 48, 38, 0.06);
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--page);
  overflow-x: hidden;
}

body {
  transition: background 180ms ease, color 180ms ease;
}

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid rgba(39, 93, 85, 0.2);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 38px 25px 27px;
  border-right: 1px solid var(--line);
  background: #f1f1ea;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.brand-title {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 850;
}

.brand-caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.2em;
}

.class-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 35px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #5e9b7a;
}

.main-nav {
  display: grid;
  gap: 7px;
  margin-top: 28px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: var(--muted-deep);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: var(--green);
  background: #e7ebe2;
  transform: translateX(2px);
}

.nav-item.is-active {
  color: var(--green);
  background: #e0e9df;
}

.nav-icon {
  width: 18px;
  color: currentColor;
  font-size: 19px;
  line-height: 1;
  text-align: center;
}

.sidebar-note {
  margin-top: auto;
  color: var(--muted);
}

.note-mark {
  display: block;
  margin-bottom: 17px;
  color: var(--yellow);
  font-size: 23px;
}

.sidebar-note h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.sidebar-note p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}

.sidebar-divider {
  height: 1px;
  margin: 21px 0 16px;
  background: var(--line);
}

.sidebar-note .sidebar-footnote {
  margin: 0;
  font-size: 10px;
  line-height: 1.75;
}

.main-shell {
  min-width: 0;
  padding: 0 48px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.breadcrumb,
.topbar-actions {
  display: flex;
  align-items: center;
}

.breadcrumb {
  gap: 11px;
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb strong {
  color: var(--muted-deep);
  font-weight: 750;
}

.breadcrumb-slash {
  color: var(--line-strong);
}

.topbar-actions {
  gap: 16px;
}

.current-date {
  color: var(--muted);
  font-size: 11px;
}

.theme-button,
.outline-button,
.text-button {
  border: 0;
  background: transparent;
}

.theme-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted-deep);
  background: var(--panel);
  font-size: 10px;
  font-weight: 750;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.theme-button:hover,
.outline-button:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

main {
  max-width: 1340px;
  margin: 0 auto;
}

.view-panel {
  display: none;
  padding-top: 38px;
}

.view-panel.is-visible {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 114px;
}

.compact-heading {
  min-height: 98px;
}

.eyebrow {
  margin: 0;
  color: #9a9f94;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.21em;
}

.page-heading h1 {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.14;
}

.heading-copy {
  max-width: 620px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.heading-badge {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 9px;
  min-width: 132px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  font-size: 10px;
}

.heading-badge-number {
  color: var(--green);
  font-size: 24px;
  font-weight: 900;
}

.overview-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 305px;
  gap: 28px;
  min-height: 241px;
  padding: 29px 31px;
  border: 1px solid #d6ded1;
  border-radius: 10px;
  background: #e7efe2;
}

.intro-copy h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.3;
}

.intro-copy > p:not(.eyebrow) {
  max-width: 560px;
  margin: 11px 0 0;
  color: var(--muted-deep);
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.intro-stats {
  display: flex;
  gap: 30px;
  margin-top: 26px;
}

.intro-stats div {
  display: grid;
  gap: 3px;
}

.intro-stats strong {
  color: var(--green);
  font-size: 24px;
  font-weight: 900;
}

.intro-stats span {
  color: #7f8b7d;
  font-size: 10px;
}

.intro-image-wrap {
  position: relative;
  align-self: center;
  min-width: 0;
}

.intro-image-wrap img {
  display: block;
  width: 100%;
  height: 170px;
  border: 7px solid var(--panel);
  border-radius: 5px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 8px 20px rgba(54, 73, 49, 0.12);
}

.image-caption {
  display: block;
  margin-top: 8px;
  color: #758277;
  font-size: 9px;
}

.day-picker {
  margin-top: 31px;
}

.section-heading,
.selected-day-heading,
.aside-section-heading,
.table-heading,
.preview-heading,
.roster-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.selected-day-heading h2,
.table-heading h2,
.preview-heading h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 19px;
}

.section-hint,
.roster-meta,
.table-count {
  color: var(--muted);
  font-size: 10px;
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.day-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 71px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted-deep);
  background: var(--panel);
  text-align: left;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.day-tab:hover {
  border-color: #b2c3b0;
  background: #f1f5ed;
  transform: translateY(-1px);
}

.day-tab.is-active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

.day-tab-copy {
  display: grid;
  gap: 5px;
}

.day-tab-copy strong {
  font-size: 15px;
}

.day-tab-copy span {
  color: var(--muted);
  font-size: 10px;
}

.day-tab.is-active .day-tab-copy span {
  color: var(--green);
  opacity: 0.75;
}

.day-tab-count {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: var(--muted-deep);
  background: var(--panel-muted);
  font-size: 10px;
  font-weight: 800;
}

.day-tab.is-active .day-tab-count {
  color: var(--green);
  background: #d0e3d1;
}

.selected-day-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 28px;
  margin-top: 30px;
}

.selected-day-heading {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.day-status {
  padding: 6px 9px;
  border-radius: 5px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 750;
}

.task-list {
  display: grid;
  gap: 11px;
  margin-top: 15px;
}

.task-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  min-height: 104px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.task-card.inspection {
  border-left-color: var(--orange);
}

.task-card.office {
  border-left-color: var(--blue);
}

.task-time {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.task-time span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

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

.task-type {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.task-main h3 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 14px;
}

.task-main p {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.person-chip {
  padding: 4px 7px;
  border-radius: 4px;
  color: var(--muted-deep);
  background: var(--panel-muted);
  font-size: 9px;
}

.task-action {
  min-width: 65px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.task-action:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.empty-task {
  padding: 30px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  font-size: 12px;
  text-align: center;
}

.overview-aside {
  display: grid;
  align-content: start;
  gap: 15px;
}

.aside-section {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.aside-section-heading {
  align-items: center;
}

.aside-section-heading h3,
.source-aside h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.aside-section-heading span {
  color: var(--yellow);
  font-size: 18px;
}

.reminder-list {
  display: grid;
  gap: 13px;
  margin-top: 19px;
}

.reminder-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.reminder-time {
  padding-top: 2px;
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
}

.reminder-item strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.reminder-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.source-aside {
  background: var(--yellow-soft);
}

.source-aside h3 {
  margin-top: 10px;
}

.source-aside > p:not(.eyebrow) {
  margin: 9px 0 0;
  color: var(--muted-deep);
  font-size: 10px;
  line-height: 1.65;
}

.compact-text-button {
  width: auto;
  min-width: 118px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.course-glance {
  margin-top: 32px;
}

.course-glance-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.glance-course {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  color: var(--ink);
  background: var(--panel);
  text-align: left;
  box-shadow: var(--shadow);
}

.glance-course:hover {
  border-color: var(--line-strong);
  background: var(--panel-muted);
}

.glance-course.teal {
  border-left-color: var(--teal);
}

.glance-course.orange {
  border-left-color: var(--orange);
}

.glance-course.purple {
  border-left-color: var(--purple);
}

.glance-course.pink {
  border-left-color: var(--pink);
}

.glance-time {
  color: var(--muted-deep);
  font-size: 10px;
  font-weight: 850;
}

.glance-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.glance-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glance-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glance-arrow {
  color: var(--green);
  font-size: 14px;
}

.course-navigator {
  padding: 15px 17px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.course-week-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.course-week-switcher {
  display: flex;
  align-items: center;
  gap: 9px;
}

.course-week-switcher select {
  min-width: 130px;
  padding: 7px 24px 7px 4px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.course-day-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-top: 13px;
}

.course-day-tab {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 62px;
  padding: 9px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted-deep);
  background: transparent;
  text-align: center;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.course-day-tab:hover,
.course-day-tab.is-active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

.course-day-tab span {
  font-size: 11px;
  font-weight: 800;
}

.course-day-tab small {
  color: var(--muted);
  font-size: 9px;
}

.course-day-tab b {
  min-width: 17px;
  padding: 2px 4px;
  border-radius: 3px;
  color: var(--muted);
  background: var(--panel-muted);
  font-size: 8px;
}

.course-day-tab.is-active b {
  color: var(--green);
  background: #d0e3d1;
}

.course-daily-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  margin-top: 27px;
}

.course-daily-panel {
  min-width: 0;
}

.course-daily-list {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.course-daily-card {
  display: grid;
  grid-template-columns: 86px 37px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 13px;
  min-height: 79px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  color: var(--ink);
  background: var(--panel);
  text-align: left;
  box-shadow: var(--shadow);
}

.course-daily-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-muted);
}

.course-daily-card.teal {
  border-left-color: var(--teal);
}

.course-daily-card.orange {
  border-left-color: var(--orange);
}

.course-daily-card.purple {
  border-left-color: var(--purple);
}

.course-daily-card.pink {
  border-left-color: var(--pink);
}

.course-daily-time {
  color: var(--muted-deep);
  font-size: 11px;
  font-weight: 850;
}

.course-daily-time small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.course-daily-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-pale);
  font-size: 17px;
}

.course-daily-card.teal .course-daily-icon {
  color: var(--teal);
  background: var(--teal-pale);
}

.course-daily-card.orange .course-daily-icon {
  color: var(--orange);
  background: var(--orange-pale);
}

.course-daily-card.purple .course-daily-icon {
  color: var(--purple);
  background: var(--purple-pale);
}

.course-daily-card.pink .course-daily-icon {
  color: var(--pink);
  background: var(--pink-pale);
}

.course-daily-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.course-daily-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-daily-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-daily-arrow {
  color: var(--green);
  font-size: 14px;
}

.course-side-column {
  display: grid;
  align-content: start;
  gap: 13px;
}

.course-duty-card,
.course-side-card {
  padding: 19px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.course-duty-card {
  border-color: #d6ded1;
  background: var(--green-soft);
}

.course-duty-card h3,
.course-side-card h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 16px;
}

.course-duty-card > strong {
  display: block;
  margin-top: 9px;
  color: var(--green);
  font-size: 21px;
}

.course-duty-card > p:not(.eyebrow),
.course-side-card > p:not(.eyebrow) {
  margin: 9px 0 0;
  color: var(--muted-deep);
  font-size: 10px;
  line-height: 1.65;
}

.duty-people {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.duty-people span {
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.55);
  font-size: 9px;
}

.course-side-card {
  background: var(--yellow-soft);
}

.course-side-stats {
  display: flex;
  gap: 26px;
  margin-top: 17px;
}

.course-side-stats div {
  display: grid;
  gap: 3px;
}

.course-side-stats strong {
  color: var(--green);
  font-size: 23px;
}

.course-side-stats span {
  color: var(--muted);
  font-size: 9px;
}

.course-weekly-section {
  margin-top: 31px;
}

.course-weekly-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.course-weekly-table {
  display: grid;
  grid-template-columns: 82px repeat(7, minmax(135px, 1fr));
  min-width: 1027px;
}

.course-weekly-cell {
  min-height: 125px;
  padding: 10px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.course-weekly-cell:nth-child(8n) {
  border-right: 0;
}

.course-weekly-head {
  min-height: 61px;
  text-align: center;
}

.course-weekly-head.is-selected {
  color: var(--green);
  background: var(--green-soft);
}

.course-weekly-head strong {
  display: block;
  font-size: 11px;
}

.course-weekly-head small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.course-weekly-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.course-weekly-time strong {
  color: var(--muted-deep);
  font-size: 10px;
}

.course-weekly-time span {
  line-height: 1.5;
}

.course-weekly-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 104px;
  padding: 10px 9px;
  border: 0;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-pale);
  text-align: left;
}

.course-weekly-card:hover {
  filter: brightness(0.98);
}

.course-weekly-card.teal {
  color: #378f87;
  background: var(--teal-pale);
}

.course-weekly-card.orange {
  color: #b67a2d;
  background: var(--orange-pale);
}

.course-weekly-card.purple {
  color: #8762c5;
  background: var(--purple-pale);
}

.course-weekly-card.pink {
  color: #b56b96;
  background: var(--pink-pale);
}

.course-weekly-card strong {
  font-size: 10px;
  line-height: 1.45;
}

.course-weekly-card small {
  color: inherit;
  font-size: 8px;
  line-height: 1.45;
  opacity: 0.84;
}

.course-weekly-empty {
  display: grid;
  place-items: center;
  min-height: 104px;
  color: var(--line-strong);
  font-size: 13px;
}

.text-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 18px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(113, 117, 67, 0.23);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  text-align: left;
}

.text-button:hover {
  color: var(--orange);
}

.outline-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted-deep);
  background: var(--panel);
  font-size: 10px;
  font-weight: 750;
}

.roster-toolbar {
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.roster-day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.roster-day-tab {
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-deep);
  background: var(--panel);
  font-size: 10px;
  font-weight: 750;
}

.roster-day-tab:hover,
.roster-day-tab.is-active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

.roster-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 256px;
  gap: 24px;
  margin-top: 20px;
}

.roster-table-wrap {
  min-width: 0;
  padding: 21px 21px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.table-heading {
  align-items: flex-start;
}

.table-heading h2 {
  font-size: 17px;
}

.table-count {
  padding-top: 5px;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 18px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 11px;
}

th {
  padding: 10px 11px;
  color: var(--muted);
  background: var(--panel-muted);
  font-size: 10px;
  font-weight: 750;
  text-align: left;
}

td {
  padding: 13px 11px;
  border-bottom: 1px solid #ebede8;
  color: var(--muted-deep);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  width: 55px;
  color: var(--muted);
}

td:nth-child(2) {
  color: var(--ink);
  font-weight: 800;
}

.role-label {
  display: inline-block;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 9px;
}

.role-label.is-empty {
  color: var(--muted);
  background: var(--panel-muted);
}

.roster-side-note {
  align-self: start;
  padding: 23px 20px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--blue-soft);
}

.side-note-tag,
.preview-label {
  color: var(--blue);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.roster-side-note h2 {
  margin: 16px 0 0;
  font-size: 21px;
  line-height: 1.35;
}

.roster-side-note p {
  margin: 11px 0 0;
  color: var(--muted-deep);
  font-size: 11px;
  line-height: 1.75;
}

.side-note-rule {
  height: 1px;
  margin: 20px 0 0;
  background: rgba(77, 109, 169, 0.2);
}

.roster-side-note .text-button {
  border-top: 0;
  color: var(--blue);
}

.sources-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 25px;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.source-item-copy {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.source-file-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 7px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 10px;
  font-weight: 900;
}

.source-item h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.source-open {
  flex: 0 0 auto;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--green);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.source-open:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.source-preview {
  align-self: start;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.preview-heading {
  align-items: center;
}

.preview-heading h2 {
  font-size: 16px;
}

.source-preview img {
  display: block;
  width: 100%;
  margin-top: 17px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.main-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 70px;
  color: #9a9f94;
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  padding: 10px 13px;
  border: 1px solid #b7d0bd;
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  box-shadow: var(--shadow);
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.dark {
  --page: #18201d;
  --panel: #202a26;
  --panel-muted: #29352f;
  --line: #35433b;
  --line-strong: #516258;
  --ink: #f0f2ea;
  --muted: #9ba79e;
  --muted-deep: #c7d0c8;
  --green: #91c5ab;
  --green-soft: #244139;
  --yellow: #e6d65c;
  --yellow-soft: #423f21;
  --blue: #9bb4e6;
  --blue-soft: #263650;
  --orange: #e7a47d;
  --orange-soft: #49332b;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

body.dark .sidebar {
  background: #151c19;
}

body.dark .overview-intro {
  border-color: #3b5141;
  background: #26382e;
}

body.dark .day-tab:hover,
body.dark .nav-item:hover {
  background: #293a32;
}

body.dark .day-tab.is-active,
body.dark .nav-item.is-active {
  background: #244139;
}

body.dark th {
  background: #29352f;
}

body.dark td {
  border-bottom-color: #303d36;
}

body.dark .source-aside {
  background: #423f21;
}

body.dark .course-duty-card {
  border-color: #3b5141;
}

body.dark .course-weekly-card,
body.dark .course-daily-card,
body.dark .glance-course,
body.dark .course-navigator,
body.dark .course-weekly-wrap,
body.dark .course-duty-card,
body.dark .course-side-card {
  box-shadow: none;
}

@media (max-width: 1120px) {
  .main-shell {
    padding-right: 28px;
    padding-left: 28px;
  }

  .selected-day-layout {
    grid-template-columns: minmax(0, 1fr) 255px;
    gap: 18px;
  }

  .overview-intro {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .roster-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .course-daily-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    padding: 18px 18px 13px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-note,
  .class-label {
    display: none;
  }

  .brand {
    margin-bottom: 15px;
  }

  .main-nav {
    display: flex;
    gap: 6px;
    margin-top: 0;
    overflow-x: auto;
  }

  .nav-item {
    flex: 1 0 auto;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
  }

  .main-shell {
    padding: 0 18px 25px;
  }

  .topbar {
    min-height: 67px;
  }

  .selected-day-layout,
  .roster-layout,
  .sources-layout {
    grid-template-columns: 1fr;
  }

  .overview-aside {
    grid-template-columns: 1fr 1fr;
  }

  .course-daily-layout {
    grid-template-columns: 1fr;
  }

  .roster-side-note {
    min-height: 150px;
  }
}

@media (max-width: 600px) {
  .main-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .topbar {
    align-items: flex-start;
    padding-top: 14px;
    min-height: 73px;
  }

  .breadcrumb {
    font-size: 10px;
  }

  .topbar-actions {
    gap: 0;
  }

  .current-date {
    display: none;
  }

  .theme-button {
    min-height: 30px;
    padding: 0 9px;
  }

  .view-panel {
    padding-top: 26px;
  }

  .page-heading {
    display: block;
    min-height: 0;
  }

  .page-heading h1 {
    margin-top: 10px;
    font-size: 30px;
  }

  .heading-copy {
    font-size: 11px;
  }

  .heading-badge,
  .page-heading .outline-button {
    margin-top: 16px;
  }

  .overview-intro {
    display: block;
    min-height: 0;
    padding: 20px 17px;
  }

  .intro-copy h2 {
    font-size: 21px;
  }

  .intro-copy > p:not(.eyebrow) {
    font-size: 11px;
  }

  .intro-stats {
    gap: 17px;
    margin-top: 21px;
  }

  .intro-stats strong {
    font-size: 20px;
  }

  .intro-stats span {
    font-size: 9px;
  }

  .course-glance-list {
    grid-template-columns: 1fr;
  }

  .intro-image-wrap {
    margin-top: 20px;
  }

  .intro-image-wrap img {
    height: 144px;
  }

  .day-tabs {
    gap: 6px;
  }

  .day-tab {
    display: grid;
    justify-items: center;
    min-height: 66px;
    padding: 9px 5px;
    text-align: center;
  }

  .day-tab-copy strong {
    font-size: 13px;
  }

  .day-tab-copy span {
    font-size: 9px;
  }

  .day-tab-count {
    display: none;
  }

  .course-week-controls {
    display: block;
  }

  .course-week-switcher {
    justify-content: space-between;
  }

  .course-week-switcher select {
    flex: 1;
  }

  .course-week-switcher .week-range {
    display: none;
  }

  .course-week-controls .date-jump {
    justify-content: space-between;
    margin-top: 9px;
  }

  .course-week-controls .date-jump input {
    flex: 1;
    width: auto;
  }

  .course-day-tabs {
    gap: 3px;
  }

  .course-day-tab {
    min-height: 57px;
    padding: 7px 2px;
  }

  .course-day-tab span {
    font-size: 9px;
  }

  .course-day-tab small {
    font-size: 8px;
  }

  .course-day-tab b {
    display: none;
  }

  .selected-day-layout {
    margin-top: 24px;
  }

  .task-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 11px;
    padding: 13px 11px;
  }

  .task-action {
    grid-column: 2;
    justify-self: start;
    margin-top: -3px;
  }

  .task-time {
    font-size: 11px;
  }

  .task-main h3 {
    font-size: 12px;
  }

  .task-main p {
    font-size: 9px;
    white-space: normal;
  }

  .overview-aside {
    grid-template-columns: 1fr;
  }

  .course-daily-card {
    grid-template-columns: 72px 34px minmax(0, 1fr) 12px;
    gap: 9px;
    padding: 10px;
  }

  .course-daily-copy strong {
    font-size: 11px;
  }

  .course-daily-copy small {
    white-space: normal;
    line-height: 1.45;
  }

  .course-side-stats {
    gap: 20px;
  }

  .roster-toolbar {
    display: block;
  }

  .roster-meta {
    display: block;
    margin-top: 9px;
  }

  .roster-table-wrap {
    padding: 17px 13px 0;
  }

  .source-item {
    align-items: flex-start;
  }

  .source-open {
    margin-top: 1px;
  }

  .source-item h3 {
    max-width: 175px;
    white-space: normal;
  }

  .main-footer {
    display: block;
    margin-top: 42px;
    line-height: 1.8;
  }
}
