:root {
  --green: #245e4b;
  --deep: #164735;
  --lime: #d8ecb4;
  --bg: #f5f7f6;
  --ink: #203a31;
  --muted: #809087;
  --line: #e7ece8;
  --white: #fff;
  --mint: #e3eee5;
  --radius: 16px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
svg.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #8cbba4;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -1px;
}
h2 {
  font-size: 18px;
  font-weight: 650;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
small,
.muted {
  color: var(--muted);
}
.initial {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  width: 37px;
  height: 37px;
  border-radius: 11px;
  font-weight: 800;
  font-size: 25px;
  font-family: Georgia, serif;
  letter-spacing: -5px;
  padding-right: 4px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
}
.logo strong {
  font-size: 20px;
  letter-spacing: 2px;
}
.logo small {
  font-size: 9px;
  display: block;
  letter-spacing: 2px;
  margin-top: 3px;
}
.sidebar {
  width: 224px;
  background: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 33px 20px 22px;
  border-right: 1px solid var(--line);
  z-index: 20;
}
.sidebar .logo {
  padding-left: 8px;
}
.workspace {
  margin-top: 40px;
  margin-bottom: 24px;
  background: #f5f7f5;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.workspace .icon {
  color: var(--green);
}
.workspace strong {
  font-size: 12px;
}
.workspace small {
  font-size: 10px;
  display: block;
  margin-top: 5px;
}
.nav-label {
  font-size: 10px;
  color: #9aa69f;
  letter-spacing: 1px;
  margin: 3px 14px 12px;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: 9px;
  color: #738279;
  text-align: left;
  font-size: 13px;
}
nav button.active {
  background: #eaf2e9;
  color: var(--green);
  font-weight: 600;
}
nav button:hover {
  background: #f3f6f3;
}
nav .count {
  margin-left: auto;
  background: #cfe2c8;
  color: #42623c;
  min-width: 21px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.sidebar-bottom {
  margin-top: auto;
}
.help-card {
  background: #f4f7ef;
  border-radius: 11px;
  padding: 16px 13px;
  margin-bottom: 22px;
}
.help-card .help-icon {
  color: #6f8c4f;
}
.help-card h3 {
  font-size: 12px;
  margin: 9px 0 6px;
}
.help-card p {
  font-size: 10px;
  color: #8a9880;
  line-height: 1.8;
}
.help-card button {
  font-size: 11px;
  color: #52733f;
  padding: 9px 0 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.help-card button .icon {
  width: 14px;
  height: 14px;
}
.profile {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 4px;
}
.avatar {
  display: grid;
  place-items: center;
  background: #e9ece6;
  color: #637359;
  border: 3px solid #f5f6f3;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 13px;
}
.profile strong {
  font-size: 12px;
}
.profile small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
.profile .logout {
  margin-left: auto;
  color: #9aa69f;
  padding: 5px;
}
.main-shell {
  margin-left: 224px;
}
.topbar {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--line);
}
.breadcrumbs {
  font-size: 12px;
  color: #9ba59e;
  display: flex;
  gap: 13px;
  align-items: center;
}
.breadcrumbs strong {
  color: #4c6156;
  font-weight: 500;
}
.top-actions {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 11px;
  color: #839086;
}
.pill {
  background: #f1f5ec;
  color: #718857;
  padding: 7px 11px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #7b9b59;
  border-radius: 50%;
}
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: white;
}
.menu-button {
  display: none;
}
.content {
  padding: 33px 38px 22px;
  max-width: 1550px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  gap: 16px;
}
.page-heading p {
  font-size: 12px;
  color: #93a096;
  margin-top: 9px;
}
.heading-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.btn {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: white;
  padding: 11px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn:hover {
  background: #f0f4ef;
}
.btn:active {
  transform: translateY(1px);
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 3px 7px #245e4b12;
}
.btn-primary:hover {
  background: #194e3c;
}
.btn-light {
  background: var(--lime);
  border-color: var(--lime);
  color: #254535;
}
.btn-light:hover {
  background: #e3f3c7;
}
.btn-small {
  padding: 8px 13px;
  font-size: 11px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7a897e;
  font-size: 11px;
  padding: 5px 0;
}
.text-button .icon {
  width: 14px;
  height: 14px;
}
.hero {
  background: #1e503e;
  color: white;
  border-radius: 17px;
  min-height: 218px;
  padding: 30px 33px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.hero-copy {
  z-index: 2;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #acc2af;
  margin-bottom: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.hero h2 {
  font-size: 27px;
  letter-spacing: 1px;
  line-height: 1.5;
  font-weight: 550;
}
.hero p {
  font-size: 12px;
  color: #b3c7ba;
  margin: 11px 0 24px;
}
.hero .btn {
  font-weight: 600;
}
.hero-art {
  position: absolute;
  right: 15px;
  top: -30px;
  width: 420px;
  height: 290px;
  opacity: 0.95;
}
.hero-art text {
  font-family: Georgia, serif;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 29px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 19px 22px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #f0f5ee;
  border-radius: 11px;
  color: #77916b;
}
.stat:nth-child(2) .stat-icon {
  background: #fbf2e9;
  color: #c99e6c;
}
.stat:nth-child(3) .stat-icon {
  background: #edf2f7;
  color: #829bb6;
}
.stat:nth-child(4) .stat-icon {
  background: #f2eef6;
  color: #a193ad;
}
.stat small {
  font-size: 11px;
}
.stat strong {
  display: block;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.4;
  margin-top: 3px;
}
.stat strong span {
  font-size: 10px;
  color: #9aa69e;
  font-weight: 400;
  margin-left: 6px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  gap: 15px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 11px;
}
.section-title > span {
  font-size: 10px;
  color: #8b988e;
  background: #eaf0e9;
  padding: 4px 7px;
  border-radius: 5px;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  background: #eef2ee;
  padding: 3px;
  border-radius: 8px;
}
.tabs button {
  font-size: 11px;
  color: #92a095;
  padding: 6px 13px;
  border-radius: 5px;
}
.tabs button.active {
  background: #fff;
  color: #42634d;
  box-shadow: 0 1px 4px #213c3010;
}
.schedule-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 22px;
  margin-bottom: 29px;
}
.schedule-row {
  display: grid;
  grid-template-columns: 98px 1fr auto;
  align-items: center;
  padding: 23px 0;
  border-bottom: 1px solid #eff2ee;
  gap: 20px;
}
.schedule-row:last-child {
  border-bottom: 0;
}
.time {
  padding-right: 20px;
  border-right: 1px solid #edf1ed;
}
.time strong {
  font-size: 19px;
  letter-spacing: -0.5px;
  font-weight: 600;
  display: block;
}
.time small {
  font-size: 10px;
  display: block;
  margin-top: 7px;
}
.lesson-info {
  display: flex;
  gap: 15px;
  align-items: center;
  min-width: 0;
}
.lesson-thumb {
  width: 74px;
  height: 60px;
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.lesson-thumb span {
  font-family: Georgia, serif;
  font-size: 32px;
  transform: rotate(-12deg);
  opacity: 0.7;
  position: relative;
  z-index: 1;
}
.lesson-thumb:after {
  content: "";
  position: absolute;
  border: 1px solid currentColor;
  opacity: 0.15;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  right: -20px;
  bottom: -20px;
}
.mint {
  background: #e5eee3;
  color: #55764c;
}
.peach {
  background: #f8ebe0;
  color: #af7950;
}
.blue {
  background: #e2ecf3;
  color: #5f84a1;
}
.lavender {
  background: #eee8f2;
  color: #8b729f;
}
.yellow {
  background: #f6efd9;
  color: #a08b43;
}
.rose {
  background: #f2e4e5;
  color: #b78087;
}
.lesson-copy h3 {
  font-size: 13px;
  font-weight: 550;
  line-height: 1.6;
}
.lesson-copy h3 small {
  font-size: 10px;
  color: #b3bdb6;
  font-weight: 400;
  margin-right: 6px;
}
.metadata {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-top: 8px;
  font-size: 10px;
  color: #9ca69e;
  flex-wrap: wrap;
}
.tag {
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #f0f4ec;
  color: #819273;
}
.row-action {
  display: flex;
  gap: 18px;
  align-items: center;
}
.status {
  font-size: 10px;
  color: #96a28f;
  display: flex;
  align-items: center;
  gap: 5px;
}
.status.completed {
  color: #a3b0a4;
}
.status.started {
  color: #c09a58;
}
.row-action .more {
  color: #afbab0;
  padding: 5px;
}
.recommend-grid,
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.course-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  text-align: left;
  width: 100%;
  padding: 0;
}
.course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px #294a3210;
}
.course-cover {
  height: 136px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.course-cover .cover-text {
  font-size: 19px;
  font-weight: 550;
  line-height: 1.6;
  max-width: 160px;
  letter-spacing: 1px;
  z-index: 1;
  text-wrap: balance;
}
.course-cover .cover-small {
  font-size: 8px;
  letter-spacing: 2px;
  display: block;
  font-weight: 400;
  margin-top: 9px;
  opacity: 0.6;
}
.cover-art {
  position: absolute;
  right: -8px;
  top: -12px;
  width: 170px;
  height: 170px;
}
.cover-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ffffff8c;
  font-size: 8px;
  padding: 4px 7px;
  border-radius: 4px;
  z-index: 2;
}
.card-body {
  padding: 17px 19px;
}
.card-body h3 {
  font-size: 13px;
}
.card-body p {
  font-size: 10px;
  color: #9aa59b;
  line-height: 1.8;
  margin: 9px 0 13px;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #9ca69d;
}
.card-bottom .icon {
  width: 14px;
  height: 14px;
  color: #82967a;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 20px;
  color: #aab3ac;
  font-size: 9px;
  letter-spacing: 0.2px;
}
.empty {
  text-align: center;
  padding: 45px 20px;
  color: #95a494;
}
.empty .icon {
  width: 32px;
  height: 32px;
  margin-bottom: 15px;
  color: #b0c0ae;
}
.empty h3 {
  font-size: 14px;
  color: #71816f;
  margin-bottom: 10px;
}
.empty p {
  font-size: 12px;
  line-height: 1.8;
}
.empty .btn {
  margin-top: 18px;
}
.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 9px 13px;
}
.search .icon {
  color: #9ba79f;
  width: 17px;
  height: 17px;
}
.search input {
  border: 0;
  outline: none;
  background: none;
  width: 170px;
  font-size: 12px;
  color: var(--ink);
}
.filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.filters button {
  border-radius: 6px;
  padding: 8px 13px;
  font-size: 11px;
  color: #8b978c;
}
.filters button.active {
  background: #e5eee2;
  color: #456240;
}
.weekbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  padding: 16px 20px;
}
.weekbar strong {
  font-size: 13px;
}
.week-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: white;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  min-height: 440px;
}
.week-day {
  border-right: 1px solid var(--line);
  padding: 0 9px 15px;
}
.week-day:last-child {
  border: 0;
}
.week-day-head {
  text-align: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  font-size: 10px;
  color: #9ca59b;
}
.week-day-head strong {
  display: block;
  font-size: 21px;
  color: #72816e;
  font-weight: 500;
  margin-top: 7px;
}
.week-day.today {
  background: #f8fbf6;
}
.week-day.today .week-day-head strong {
  background: var(--green);
  color: white;
  border-radius: 50%;
  width: 33px;
  height: 33px;
  line-height: 33px;
  margin: 5px auto -5px;
}
.week-event {
  width: 100%;
  text-align: left;
  margin: 0 0 12px;
  padding: 11px 9px;
  border-radius: 8px;
  display: block;
  border: 1px solid #00000004;
}
.week-event strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin: 7px 0;
}
.week-event small {
  font-size: 9px;
  color: inherit;
  opacity: 0.65;
}
.week-event > span {
  font-size: 10px;
}
.week-add {
  padding: 8px;
  color: #b3c2ac;
  font-size: 17px;
  width: 100%;
  border: 1px dashed #dfe7da;
  border-radius: 7px;
}
.hint {
  font-size: 11px;
  color: #8f9e8b;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hint .icon {
  width: 15px;
  height: 15px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.records {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.records th {
  font-size: 11px;
  font-weight: 400;
  color: #9ca79f;
  background: #fafbf9;
  padding: 16px 22px;
}
.records td {
  font-size: 12px;
  padding: 19px 22px;
  border-top: 1px solid var(--line);
  line-height: 1.8;
}
.records td small {
  display: block;
  font-size: 10px;
}
.notice {
  padding: 13px 17px;
  background: #edf2e7;
  color: #7a8f63;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.8;
  margin: 0 0 23px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.notice .icon {
  width: 17px;
  height: 17px;
}
.store-notice {
  align-items: flex-start;
  color: #28523f;
  font-size: 14px;
}
.store-notice .icon {
  flex: none;
  margin-top: 4px;
}
.store-notice p {
  margin: 2px 0 0;
}
.hq-course-detail > .page-heading {
  margin-top: 16px;
  margin-bottom: 12px;
}
.hq-video-summary,
.hq-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.hq-video-summary {
  color: #53685d;
  font-size: 12px;
}
.hq-video-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: #edf0ef;
  color: #46554e;
  font-weight: 650;
}
.hq-video-status[data-status="ready"] {
  background: #e5f2e8;
  color: #20513b;
}
.hq-video-status[data-status="processing"],
.hq-video-status[data-status="needsEncryption"] {
  background: #fff2d6;
  color: #684609;
}
.hq-video-status[data-status="failed"] {
  background: #fceae7;
  color: #8b352a;
}
.hq-course-section {
  margin-top: 18px;
  padding: 16px 20px;
}
.hq-course-section > .section-heading {
  justify-content: space-between;
  margin: 0 0 12px;
}
.hq-course-section h2 {
  font-size: 17px;
  margin: 0;
}
.hq-course-empty,
.hq-course-description {
  color: #53685d;
  margin: 8px 0;
  white-space: pre-line;
}
.hq-lesson-row {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.hq-lesson-row:last-child {
  padding-bottom: 0;
}
.hq-lesson-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.hq-lesson-title h3 {
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.hq-lesson-materials {
  margin-top: 10px;
}
.hq-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: start;
  gap: 16px;
}
.hq-preview-video video {
  display: block;
  width: 100%;
  max-height: 66vh;
  aspect-ratio: 16 / 9;
  background: #15231f;
  border-radius: 8px;
}
.hq-preview-parts {
  display: grid;
  gap: 6px;
}
.hq-preview-parts .btn {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}
.hq-preview-parts .btn[aria-pressed="true"] {
  background: var(--mint);
  border-color: var(--green);
}
.hq-attachment-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hq-attachment-row {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.hq-attachment-row:last-child {
  padding-bottom: 0;
}
.hq-attachment-main {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.hq-attachment-main .tag {
  justify-self: start;
}
.hq-attachment-name {
  overflow-wrap: anywhere;
}
.hq-attachment-name small {
  display: block;
  margin-top: 3px;
  color: #53685d;
}
.hq-attachment-editor,
.hq-attachment-preview,
.hq-attachment-confirm {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 10px;
}
.hq-attachment-confirm {
  margin: 8px 0 0;
}
.hq-attachment-confirm span {
  margin-right: 6px;
}
.hq-attachment-editor h3,
.hq-attachment-preview h3 {
  margin: 0;
  font-size: 15px;
}
.hq-attachment-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.5fr) minmax(0, 1fr);
  gap: 12px;
}
.hq-attachment-preview iframe {
  display: block;
  width: 100%;
  height: min(55vh, 600px);
  border: 0;
  background: white;
  margin-top: 10px;
}
@media (max-width: 700px) {
  .hq-course-section {
    padding: 12px;
  }
  .hq-preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hq-lesson-main {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .hq-lesson-actions {
    grid-column: 2;
  }
  .hq-attachment-main {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .hq-attachment-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
.login {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}
.login-story {
  background: #1e503e;
  padding: 50px 60px;
  display: flex;
  flex-direction: column;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.login-story .brand-mark {
  background: #d9ecba;
  color: #1e503e;
}
.login-story .logo small {
  color: #afc4b7;
}
.login-message {
  margin: auto 0;
  z-index: 1;
}
.login-message .eyebrow {
  margin-bottom: 24px;
}
.login-message h1 {
  font-size: 45px;
  line-height: 1.5;
  letter-spacing: 3px;
  font-weight: 500;
}
.login-message p {
  font-size: 14px;
  color: #b1c7b9;
  line-height: 2;
  margin-top: 24px;
}
.login-graphic {
  margin: 30px 0 0;
  position: relative;
  height: 200px;
  opacity: 0.8;
}
.login-story > small {
  font-size: 10px;
  color: #aac1b2;
  z-index: 1;
}
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form {
  max-width: 345px;
  width: 100%;
}
.login-form > small {
  font-size: 10px;
  letter-spacing: 2px;
  color: #94a18f;
}
.login-form h2 {
  font-size: 27px;
  margin: 13px 0 10px;
}
.login-form > p {
  color: #96a18f;
  font-size: 12px;
  margin-bottom: 32px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 19px;
  font-size: 12px;
  color: #6d7e6e;
}
.field input,
.field select,
.field textarea {
  border: 1px solid #dde5da;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-width: 0;
  color: var(--ink);
  width: 100%;
  font-size: 12px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #a9b2a5;
}
.field textarea {
  resize: vertical;
  min-height: 75px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field small {
  font-size: 10px;
  line-height: 1.8;
}
.login-form .btn {
  width: 100%;
  padding: 13px;
}
.login-demo {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 20px;
  text-align: center;
}
.login-demo p {
  font-size: 10px;
  color: #9ba692;
  margin-bottom: 12px;
}
.demo-links {
  display: flex;
  gap: 9px;
}
.login-demo .btn {
  font-size: 11px;
  padding: 10px;
}
.error {
  color: #b76651;
  background: #fcf1ed;
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 11px;
  line-height: 1.8;
  margin-bottom: 18px;
}
.error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(530px, calc(100vw - 32px));
  padding: 0;
  color: var(--ink);
  box-shadow: 0 24px 100px #142c3230;
  max-height: 90vh;
}
dialog::backdrop {
  background: #17312b65;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 27px 18px;
}
.modal-header h2 {
  font-size: 20px;
}
.modal-header .icon-button {
  border: 0;
  color: #97a68f;
}
.modal-body {
  padding: 0 27px 25px;
}
.modal-description {
  font-size: 11px;
  color: #98a48f;
  line-height: 1.8;
  margin: -6px 0 25px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #708468;
  margin-bottom: 14px;
}
.check input {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
}
.repeat-fields {
  background: #f6f8f3;
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
}
.repeat-fields .field {
  margin-bottom: 12px;
}
.repeat-fields .check {
  margin-bottom: 0;
}
.modal-course-cover {
  border-radius: 12px;
  margin-bottom: 20px;
}
.lesson-list {
  display: grid;
  gap: 5px;
  margin-top: 20px;
}
.lesson-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 7px;
  border-bottom: 1px solid var(--line);
}
.lesson-item > span {
  font-size: 11px;
  color: #9ca88f;
}
.lesson-item strong {
  font-size: 12px;
  font-weight: 500;
  flex: 1;
}
.lesson-item small {
  font-size: 10px;
}
.lesson-item button {
  font-size: 10px;
  padding: 7px 9px;
}
.player-dialog {
  width: min(1100px, calc(100vw - 32px));
  background: #f7f9f6;
}
.player-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
}
.video-area {
  background: #111e19;
  position: relative;
  min-height: 270px;
  display: flex;
  align-items: center;
}
.video-area video {
  width: 100%;
  max-height: 60vh;
  aspect-ratio: 16/9;
  background: #111e19;
}
.player-lessons {
  padding: 20px;
  max-height: 60vh;
  overflow: auto;
  background: white;
}
.player-lessons h3 {
  font-size: 12px;
  margin-bottom: 17px;
}
.player-lessons button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 10px;
  border-radius: 7px;
  font-size: 11px;
  margin: 5px 0;
  color: #85917e;
  line-height: 1.7;
}
.player-lessons button.active {
  background: #edf3e9;
  color: var(--green);
}
.player-bottom {
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.player-bottom h3 {
  font-size: 14px;
}
.player-bottom p {
  font-size: 10px;
  color: #97a28f;
  margin-top: 7px;
}
.player-notice {
  font-size: 10px;
  color: #9a9e79;
  padding: 12px 25px;
  background: #f2f2e5;
  line-height: 1.8;
}
.player-error {
  padding: 20px;
  color: #ac6c57;
  background: #fff2ec;
  font-size: 12px;
}
.player-save {
  font-size: 10px;
  color: #8a9a7e;
  margin-left: 12px;
}
#toasts {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 9px;
  z-index: 1000;
  pointer-events: none;
}
.toast {
  background: #244f3e;
  color: white;
  border: 1px solid #47725c;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 12px;
  box-shadow: 0 5px 25px #16312724;
  max-width: 90vw;
}
.toast.error-toast {
  background: #995d49;
  border-color: #b7806b;
}
.management-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.management-card {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.management-card h3 {
  margin-bottom: 7px;
}
.management-card > p {
  font-size: 11px;
  color: #8f9c85;
  margin-bottom: 20px;
}
.branch-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 15px;
}
.branch-card h3 {
  font-size: 14px;
}
.branch-card p {
  font-size: 11px;
  color: #9aa58d;
  margin: 7px 0 18px;
}
.branch-grants {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.grant {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 10px;
  color: #9ba68e;
}
.grant.enabled {
  background: #edf4e8;
  color: #668151;
  border-color: #dce8d2;
}
.admin-course-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 13px;
}
.admin-course-row:last-child {
  border: 0;
}
.admin-course-row .lesson-thumb {
  width: 47px;
  height: 42px;
}
.admin-course-row .lesson-thumb span {
  font-size: 24px;
}
.admin-course-row h3 {
  font-size: 12px;
  margin: 0;
}
.admin-course-row p {
  font-size: 10px;
  color: #9da68f;
  margin-top: 6px;
}
.admin-course-row > .btn {
  margin-left: auto;
}
.backdrop {
  display: none;
}
.mobile-label {
  display: none;
}
@media (min-width: 1500px) {
  .content {
    padding-top: 38px;
  }
  .hero {
    min-height: 240px;
  }
  .course-cover {
    height: 160px;
  }
  .schedule-row {
    padding: 26px 0;
  }
  .stats {
    gap: 22px;
  }
  .recommend-grid {
    gap: 22px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 196px;
    padding: 28px 15px 20px;
  }
  .sidebar .logo strong {
    font-size: 18px;
  }
  .main-shell {
    margin-left: 196px;
  }
  .content {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .hero-art {
    right: -40px;
    opacity: 0.6;
  }
  .stat {
    padding: 16px 14px;
    gap: 10px;
  }
  .stat-icon {
    width: 35px;
    height: 35px;
  }
  .stat strong {
    font-size: 23px;
  }
  .schedule-row {
    grid-template-columns: 78px 1fr auto;
    gap: 13px;
  }
  .time {
    padding-right: 12px;
  }
  .row-action {
    gap: 10px;
  }
  .course-cover .cover-text {
    font-size: 16px;
    max-width: 125px;
  }
  .cover-art {
    right: -40px;
  }
  .status {
    display: none;
  }
  .metadata {
    gap: 9px;
  }
  .course-cover {
    padding: 16px;
  }
  .login-story {
    padding: 40px;
  }
  .login-message h1 {
    font-size: 35px;
  }
  .week-grid {
    min-height: 400px;
  }
}
@media (max-width: 850px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 224px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-shell {
    margin-left: 0;
  }
  .menu-button {
    display: grid;
  }
  .topbar {
    height: 65px;
  }
  .breadcrumbs {
    margin-right: auto;
    margin-left: 15px;
  }
  .top-actions {
    gap: 10px;
  }
  .top-actions > span {
    display: none;
  }
  .content {
    padding: 26px 23px;
  }
  .backdrop.active {
    display: block;
    position: fixed;
    inset: 0;
    background: #17352c55;
    z-index: 19;
  }
  .hero {
    min-height: 210px;
  }
  .stats {
    gap: 10px;
  }
  .hero-art {
    opacity: 0.55;
  }
  .login {
    grid-template-columns: 0.9fr 1fr;
  }
  .login-story {
    padding: 30px;
  }
  .login-message h1 {
    font-size: 30px;
  }
  .login-message p {
    font-size: 12px;
  }
  .login-form-wrap {
    padding: 30px;
  }
  .management-grid {
    grid-template-columns: 1fr;
  }
  .player-layout {
    grid-template-columns: 1fr;
  }
  .player-lessons {
    max-height: 170px;
  }
  .week-grid {
    overflow: auto;
    grid-template-columns: repeat(7, minmax(115px, 1fr));
  }
}
@media (max-width: 600px) {
  .content {
    padding: 23px 17px;
  }
  .topbar {
    padding: 0 17px;
  }
  .top-actions .pill {
    display: none;
  }
  .page-heading {
    margin-bottom: 21px;
    align-items: flex-start;
  }
  h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 10px;
    line-height: 1.8;
  }
  .heading-right .btn {
    padding: 10px 12px;
    font-size: 11px;
  }
  .heading-right .btn-secondary {
    display: none;
  }
  .page-heading:has(.staff-shortcut) {
    flex-direction: column;
    gap: 12px;
  }
  .heading-right:has(.staff-shortcut) { flex-wrap:wrap; max-width:100%; }
  .heading-right:has(.staff-shortcut) .btn {
    min-height: 44px;
  }
  .hero {
    padding: 25px 23px;
    min-height: 215px;
    margin-bottom: 17px;
  }
  .hero h2 {
    font-size: 23px;
    letter-spacing: 0;
  }
  .hero p {
    font-size: 10px;
    max-width: 200px;
    line-height: 1.9;
    margin-top: 9px;
  }
  .hero-art {
    right: -140px;
    opacity: 0.45;
    width: 350px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .hero .btn {
    font-size: 11px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 26px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 23px;
  }
  .stat small {
    font-size: 10px;
  }
  .section-heading h2 {
    font-size: 16px;
  }
  .section-title {
    gap: 8px;
  }
  .schedule-list {
    padding: 0 14px;
    margin-bottom: 25px;
  }
  .schedule-row {
    grid-template-columns: 52px 1fr;
    gap: 11px;
    padding: 18px 0;
  }
  .time {
    padding-right: 8px;
  }
  .time strong {
    font-size: 16px;
  }
  .time small {
    font-size: 9px;
  }
  .lesson-thumb {
    width: 47px;
    height: 47px;
  }
  .lesson-thumb span {
    font-size: 24px;
  }
  .lesson-info {
    gap: 10px;
  }
  .lesson-copy h3 {
    font-size: 12px;
  }
  .lesson-copy h3 small {
    display: none;
  }
  .metadata {
    font-size: 9px;
    gap: 7px;
    margin-top: 5px;
  }
  .metadata .grade-meta {
    display: none;
  }
  .row-action {
    grid-column: 2;
    margin-left: 57px;
    margin-top: -1px;
    justify-content: flex-start;
    gap: 14px;
  }
  .row-action .status {
    display: flex;
    font-size: 9px;
  }
  .row-action .btn {
    font-size: 10px;
    padding: 7px 10px;
  }
  .row-action .btn .icon {
    width: 13px;
    height: 13px;
  }
  .row-action .more {
    margin-left: auto;
  }
  .recommend-grid,
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .recommend-grid .course-card:last-child {
    display: none;
  }
  .course-cover {
    height: 115px;
    padding: 14px;
  }
  .course-cover .cover-text {
    font-size: 15px;
    max-width: 110px;
    letter-spacing: 0;
  }
  .course-cover .cover-small {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .cover-art {
    right: -65px;
    opacity: 0.7;
  }
  .cover-badge {
    font-size: 7px;
    top: 8px;
    right: 8px;
  }
  .card-body {
    padding: 13px;
  }
  .card-body h3 {
    font-size: 11px;
  }
  .card-body p {
    font-size: 9px;
    margin: 7px 0 10px;
  }
  .card-bottom {
    font-size: 8px;
  }
  .footer {
    font-size: 8px;
    line-height: 1.7;
    margin-top: 24px;
  }
  .footer > span:last-child {
    display: none;
  }
  .search-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .search input {
    width: 100%;
  }
  .filters {
    gap: 2px;
  }
  .filters button {
    font-size: 10px;
    padding: 7px 9px;
  }
  .weekbar {
    padding: 13px 12px;
  }
  .weekbar strong {
    font-size: 11px;
  }
  .week-actions {
    gap: 5px;
  }
  .week-actions .btn {
    padding: 7px 10px;
  }
  .week-actions .icon-button {
    width: 29px;
    height: 29px;
  }
  .records th,
  .records td {
    padding: 13px 12px;
    font-size: 10px;
  }
  .records th:nth-child(3),
  .records td:nth-child(3) {
    display: none;
  }
  .login {
    display: block;
  }
  .login-story {
    padding: 24px;
    min-height: 250px;
  }
  .login-story .logo strong {
    font-size: 17px;
  }
  .login-story .logo small {
    font-size: 8px;
  }
  .login-story .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 21px;
  }
  .login-message {
    margin-top: 27px;
  }
  .login-message .eyebrow {
    display: none;
  }
  .login-message h1 {
    font-size: 27px;
    line-height: 1.5;
    letter-spacing: 1px;
  }
  .login-message p {
    font-size: 11px;
    max-width: 230px;
    margin-top: 12px;
  }
  .login-graphic {
    position: absolute;
    right: -100px;
    bottom: -20px;
    width: 300px;
    opacity: 0.4;
  }
  .login-story > small {
    display: none;
  }
  .login-form-wrap {
    padding: 30px 26px;
  }
  .login-form h2 {
    font-size: 22px;
  }
  .login-form > small {
    display: none;
  }
  .login-form > p {
    margin-bottom: 25px;
  }
  .modal-header {
    padding: 21px 21px 16px;
  }
  .modal-body {
    padding: 0 21px 22px;
  }
  .field-row {
    gap: 10px;
  }
  .player-bottom {
    padding: 17px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .player-dialog .modal-header {
    padding: 15px;
  }
  .player-dialog .modal-header h2 {
    font-size: 15px;
  }
  .player-dialog .modal-description {
    margin-bottom: 10px;
  }
  .player-save {
    margin-left: 0;
  }
  .player-notice {
    padding: 10px 17px;
  }
  .management-card {
    padding: 17px;
  }
  .hint {
    font-size: 10px;
    line-height: 1.7;
  }
  .notice {
    font-size: 10px;
  }
  .tabs button {
    padding: 5px 9px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.status .icon {
  width: 13px;
  height: 13px;
}
.cos-browser {
  background: #f5f8f2;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  max-height: 240px;
  overflow: auto;
  margin: 12px 0 18px;
  font-size: 11px;
}
.cos-location {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0 10px;
  overflow-wrap: anywhere;
}
.cos-object {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 6px;
  border-bottom: 1px solid #e5ebdf;
  text-align: left;
  font-size: 11px;
}
.cos-object:hover {
  background: #eaf2e3;
}
.cos-object small {
  margin-left: auto;
  white-space: nowrap;
  font-size: 9px;
}
.cos-object .icon {
  width: 15px;
  height: 15px;
}
.cos-object span {
  overflow-wrap: anywhere;
}
.field:has(+ .cos-browser) {
  margin-bottom: 10px;
}
.schedule-modes {
  display: flex;
  gap: 12px;
  margin: 0 0 24px;
}
.schedule-modes label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 10px;
  font-size: 12px;
  cursor: pointer;
}
.schedule-modes label:has(input:checked) {
  background: #edf4e8;
  border-color: #8eaf7e;
  color: var(--green);
}
.schedule-modes input {
  accent-color: var(--green);
}
.material-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.material-row > span:not(.tag) {
  flex: 1;
  min-width: 90px;
  overflow-wrap: anywhere;
}
.material-row .btn {
  flex-shrink: 0;
}
.material-row small {
  font-size: 10px;
}
.lesson-block {
  padding-bottom: 10px;
}
.lesson-block .material-row {
  margin-left: 28px;
}
.series-library {
  max-height: 260px;
  overflow: auto;
  margin-top: 15px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.series-library small {
  font-size: 10px;
}
#series-selected {
  margin: 12px 0 24px;
  max-height: 240px;
  overflow: auto;
}
.player-materials {
  padding: 0 26px 15px;
}
.player-materials:empty {
  display: none;
}

/* Course library and weekly scheduling */
.weekly-dialog { width: min(800px, calc(100vw - 32px)); }

.library-series {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #edf5ef;
  border: 1px solid #d7e6db;
  border-radius: 12px;
}
.library-series h3,
.library-lesson-heading h2 { color: #193b31; font-size: 17px; margin: 0; }
.library-series p,
.library-lesson-heading p { color: #50675c; font-size: 13px; margin: 5px 0 0; line-height: 1.55; }
.library-series .btn { flex-shrink: 0; font-size: 13px; min-height: 42px; }
.library-lesson-heading { margin: 24px 0 8px; }
.library-lesson-position {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #edf5ef;
  color: #285749;
  font: 600 13px/1 Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.schedule-context { display: flex; align-items: center; gap: 8px; color: #285749; margin: 0 0 16px; }
.schedule-context strong { overflow-wrap: anywhere; }
.schedule-selection { display: grid; gap: 5px; background: #edf5ef; border-radius: 10px; padding: 13px 15px; margin-bottom: 17px; }
.schedule-selection span { color: #50675c; font-size: 12px; }
.schedule-columns > * { min-width: 0; }
.weekly-dialog .schedule-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.schedule-fields .field { margin-bottom: 15px; color: #39564a; font-size: 13px; }
.schedule-fields .field input,
.schedule-fields .field select { min-height: 44px; font-size: 14px; }
.schedule-fields .field-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
.schedule-fields .field-row .field { min-width: 0; }
.schedule-fields input[type="date"],
.schedule-fields input[type="time"] { min-inline-size: 0; padding-inline: 9px; }
.weekly-plan {
  overflow: hidden;
  align-self: start;
  background: #f6f9f6;
  border: 1px solid #d7e6db;
  border-radius: 12px;
}
#series-summary { padding: 15px 17px; color: white; background: #285749; }
#series-summary p { font-size: 12px; margin: 0; }
#series-summary strong { display: block; margin: 6px 0 4px; font-size: 24px; line-height: 1.25; }
#series-summary strong span { color: #f2dfac; font-variant-numeric: tabular-nums; }
#series-summary small { color: #f0f7f2; font-size: 12px; }
#series-dates { margin: 0; padding: 5px 13px 7px; list-style: none; max-height: 225px; overflow: auto; }
#series-dates li {
  display: grid;
  grid-template-columns: 5.25em minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 9px 3px;
  line-height: 1.45;
  font-size: 13px;
}
#series-dates li + li { border-top: 1px solid #dce8de; }
#series-dates time { color: #285749; white-space: nowrap; font-variant-numeric: tabular-nums; }
#series-dates span { overflow-wrap: anywhere; }
.schedule-actions { margin-top: 16px; align-items: center; }
.schedule-actions .btn { min-height: 43px; font-size: 13px; }
.schedule-back { margin-right: auto; }
@media (max-width: 620px) {
  .weekly-dialog .schedule-columns { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .weekly-dialog #series-dates { max-height: 160px; }
  .schedule-fields .field input,
  .schedule-fields .field select { font-size: 16px; }
  .library-lesson-position { width: 32px; height: 32px; }
}
@media (max-width: 420px) {
  .library-series { flex-direction: column; align-items: stretch; }
  .library-series .btn { justify-content: center; }
  .schedule-actions { flex-wrap: wrap; }
}

.player-parts { padding: 14px 18px; border-top: 1px solid #e0eae3; background: #f4f8f5; }
.player-parts h3 { margin: 0 0 10px; color: #193b31; font-size: 14px; }
.player-parts h3 small { float: right; color: #50675c; font-variant-numeric: tabular-nums; }
.player-parts-list { display: flex; flex-wrap: wrap; gap: 7px; }
.player-parts-list .btn { justify-content: flex-start; white-space: normal; min-height: 36px; text-align: left; }
.player-parts-list .btn span { font-size: 11px; color: inherit; opacity: .85; }
.player-parts-list .btn[aria-pressed="true"] { color: #fff; background: #285749; border-color: #285749; }
@media (max-width: 600px) {
  .player-parts-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .player-parts-list .btn { padding: 7px 8px; font-size: 12px; overflow-wrap: anywhere; min-height: 44px; }
}

.staff-panel { max-width: 760px; padding: 0 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.staff-list { list-style: none; padding: 0; margin: 0; }
.staff-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.staff-list li + li { border-top: 1px solid var(--line); }
.staff-list li > div { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.staff-list li > div span { color: #50675c; font-size: 13px; }
.staff-list .tag { flex-shrink: 0; }
.staff-empty { padding-block: 10px; }
.staff-actions { flex-wrap: wrap; margin-top: 16px; padding-top: 12px; justify-content: flex-start; }

.staff-list li > .staff-role { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.staff-schedule-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; color: var(--ink); background: none; border: 0; padding: 3px 0; }
.staff-schedule-toggle i { display: block; width: 34px; height: 20px; border-radius: 20px; background: #788981; padding: 3px; }
.staff-schedule-toggle i::before { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.staff-schedule-toggle[aria-checked="true"] i { background: #245e4b; }
.staff-schedule-toggle[aria-checked="true"] i::before { transform: translateX(14px); }
.staff-schedule-toggle:disabled { opacity: .65; }

.finance-filter .field { margin:0; }
.finance-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
.finance-stats .stat strong { overflow-wrap:anywhere; }
.finance-panel { padding:18px; margin-bottom:16px; }
.finance-panel > p { margin:0 0 12px; }
.finance-list { list-style:none; padding:0; margin:0; }
.finance-list li { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line); }
.finance-list li > div:first-child { min-width:0; overflow-wrap:anywhere; }
.finance-list li > div:last-child { text-align:right; flex-shrink:0; }
.finance-list li small { display:block; margin-top:4px; color:var(--muted); }
.finance-list .btn { margin-inline-start:6px; }
.finance-form > p { margin-bottom:14px; line-height:1.65; }
.recharge-amounts { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.recharge-amounts legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.recharge-amount-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.recharge-amount-options [aria-pressed="true"] { background: #e7f2e9; border-color: #2c674f; color: #205840; }
.recharge-methods { display: grid; gap: 12px; }
.recharge-method {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.recharge-method strong { font-size: 15px; }
.recharge-method span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.recharge-method:enabled:hover { background: #f0f6ef; border-color: #87a894; }
.recharge-method:focus-visible { outline: 2px solid #2c674f; outline-offset: 2px; }
.recharge-method:disabled { background: #f5f7f5; color: var(--muted); cursor: default; }
.finance-amount-preview { font-weight:700; }
@media(max-width:640px) {
  .finance-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .finance-list .btn { display:block; margin:5px 0 0 auto; }
}

.signup-link { margin-top: 14px; }
.practice-badge { position:absolute; top:14px; left:14px; z-index:1; pointer-events:none; border-radius:5px; background:#17352ce8; color:white; padding:6px 10px; font-size:12px; }

.course-toolbar { align-items: flex-start; flex-wrap: wrap; }
.course-toolbar .search { min-height: 42px; }
.course-filter-groups { display: grid; gap: 6px; }
.course-filter-group { display: flex; align-items: baseline; gap: 8px; }
.course-filter-group > span { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.course-filter-group .filters button { min-height: 38px; color: var(--ink); }
.course-filter-group .filters button.active { color: #36522f; font-weight: 650; }
@media (max-width: 640px) {
  .course-toolbar .search { width: 100%; }
  .course-filter-group .filters button { min-height: 42px; font-size: 12px; }
}
.recharge-bank { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; margin: 0 0 14px; font-size: 13px; line-height: 1.55; }
.recharge-bank dt { color: var(--muted); }
.recharge-bank dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.funding-notice { flex-wrap: wrap; }

/* The finance landing view keeps actions separate from monthly statements. */
.finance-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #dce6de;
}
.finance-tabs button {
  padding: 11px 2px 12px;
  border-bottom: 2px solid transparent;
  color: #53675c;
  white-space: nowrap;
}
.finance-tabs button[aria-current="page"] {
  border-color: #2c674f;
  color: #184735;
  font-weight: 700;
}
.finance-tabs button:focus-visible,
.finance-history-switch button:focus-visible {
  outline: 2px solid #2c674f;
  outline-offset: 2px;
}
.finance-overview {
  display: grid;
  grid-template-columns: minmax(240px, .85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}
.finance-queues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.finance-balance {
  background: #193f33;
  color: #fff;
  border: 1px solid #214c3f;
  border-radius: 13px;
  padding: 20px;
  min-width: 0;
}
.finance-balance > p { color: #daeadb; margin-bottom: 4px; font-size: 12px; }
.finance-balance > strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(28px, 5vw, 38px);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.finance-balance > small { display: block; color: #daeadb; margin-top: 8px; }
.finance-balance > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.finance-balance .btn { min-height: 40px; }
.finance-balance .btn-primary { background: #dbeacb; color: #193f33; border-color: #dbeacb; }
.finance-balance .btn-primary:hover { background: #eff5e6; }
.finance-balance .btn:not(.btn-primary) { color: #fff; background: transparent; border-color: #91ae9f; }
.finance-balance .btn:not(.btn-primary):hover { background: #2b5446; }
.finance-totals {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0;
  gap: 1px;
  background: #dce6de;
  border: 1px solid #dce6de;
  border-radius: 8px;
  overflow: hidden;
}
.finance-totals > div { padding: 10px 12px; min-width: 0; background: #f7f9f5; }
.finance-totals dt { font-size: 12px; color: #53675c; }
.finance-totals dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.finance-view .finance-list li strong { font-variant-numeric: tabular-nums; }
.finance-credit { color: #216246; }
.finance-history-switch { display: flex; gap: 8px; margin-bottom: 10px; }
.finance-history-switch button {
  background: #f0f4ef;
  color: #53675c;
  padding: 7px 11px;
  border-radius: 7px;
  min-height: 38px;
  white-space: nowrap;
}
.finance-history-switch button[aria-pressed="true"] { background: #dceadc; color: #184735; font-weight: 650; }
@media (max-width: 700px) {
  .finance-overview { grid-template-columns: minmax(0, 1fr); }
  .finance-tabs { gap: 0; justify-content: space-between; }
  .finance-tabs button { min-height: 44px; padding-inline: 4px; }
}
@media (max-width: 440px) {
  .finance-balance { padding: 16px; }
  .finance-totals { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .finance-view .finance-list .btn { min-height: 38px; }
}

.practice-video { position: relative; }
.practice-watermark {
  position: absolute;
  z-index: 2;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-9deg);
  width: max-content;
  max-width: 94%;
  display: grid;
  gap: 0.2em;
  padding: 0.4em 0.85em;
  border: 2px solid #fff9;
  border-radius: 0.28em;
  color: #fff;
  background: #142c25b8;
  text-align: center;
  text-shadow: 0 1px 3px #000;
  font-size: clamp(18px, 3.5vw, 52px);
  pointer-events: none;
}
.practice-watermark span { font-size: 0.48em; overflow-wrap: anywhere; }
.practice-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: #f2f6ef;
  border-bottom: 1px solid #d4e2d6;
}
.practice-media-options { display: flex; flex-wrap: wrap; gap: 8px; }
.practice-toolbar .btn { min-height: 44px; }
.practice-media-options [aria-pressed="true"] {
  background: #dcebe0;
  border-color: #83af91;
  color: #174636;
  font-weight: 700;
}
.practice-fullscreen { margin-inline-start: auto; }
.practice-video video[hidden], #practice-lesson-controls[hidden] { display: none; }
.practice-video:fullscreen .practice-watermark { font-size: clamp(25px, 4.6vw, 86px); }
.practice-video video::-webkit-media-controls-fullscreen-button,
.practice-video .practice-exit { display: none; }
.practice-video:fullscreen { background: #000; }
.practice-video:fullscreen video { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.practice-video:fullscreen .practice-exit { display: inline-flex; position: absolute; top: 1rem; right: 1rem; z-index: 3; min-height: 44px; }

.course-attachments { margin: 1rem 0; }
.course-attachments h3 { font-size: 1rem; margin-bottom: .5rem; }
.course-attachments .material-row { flex-wrap: wrap; }

/* Shared alignment and spacing across the classroom workspaces. */
.topbar {
  padding-inline: max(38px, calc((100% - 1474px) / 2));
}
.breadcrumbs,
.page-heading p,
.card-body p,
.card-bottom,
.records th,
.management-card > p,
.admin-course-row p {
  color: #556c60;
}
.page-heading {
  align-items: flex-end;
  margin-bottom: 20px;
}
.page-heading > div:first-child,
.section-heading > :first-child {
  min-width: 0;
}
.page-heading p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
}
.heading-right,
.section-heading {
  flex-wrap: wrap;
}
.heading-right:empty {
  display: none;
}
.heading-right .btn {
  min-height: 42px;
}
.section-heading {
  gap: 8px 14px;
}
.section-title {
  flex-wrap: wrap;
}
.stats strong,
.time,
.week-day-head strong,
.records td:nth-child(2) {
  font-variant-numeric: tabular-nums;
}
.schedule-row {
  grid-template-columns: 88px minmax(0, 1fr) auto;
}
.row-action {
  flex-wrap: wrap;
  gap: 8px;
}
.lesson-copy,
.week-event,
.management-card,
.admin-course-row > :nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Give search the same left edge as the card grid, and pin card metadata to its row. */
.course-toolbar {
  display: grid;
  grid-template-columns: minmax(215px, 1fr) minmax(0, auto);
  align-items: start;
  gap: 12px 20px;
}
.course-toolbar .search {
  width: 100%;
  min-height: 44px;
}
.course-toolbar .search input {
  width: 100%;
  min-width: 0;
}
.course-filter-group {
  align-items: center;
}
.course-filter-group > span {
  color: #556c60;
}
.course-filter-group .filters {
  gap: 4px;
}
.course-filter-group .filters button {
  min-height: 36px;
}
.course-card {
  display: flex;
  flex-direction: column;
}
.course-card .course-cover {
  width: 100%;
  height: 104px;
  flex: none;
  justify-content: center;
}
.course-card .cover-art {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 124px;
  height: 124px;
  opacity: .84;
}
.course-card .cover-badge {
  font-size: 10px;
  color: #344c42;
}
.course-card .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}
.library-lesson-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.series-instructor {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 16px;
  padding: 18px 22px;
  border-color: #dbe8df;
  background: #edf5ef;
}
.series-portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 9px;
  background: #ebe6e1;
}
.series-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.series-instructor-copy h2 {
  margin: 0 0 4px;
  color: #395e4e;
  font-size: 13px;
  font-weight: 650;
}
.series-instructor-name {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 700;
}
.series-instructor-bio {
  max-width: 65ch;
  margin: 0;
  color: #36584b;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .series-instructor {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
  }
}
.library-lesson-card:hover {
  transform: none;
}
.library-lesson-card .library-lesson-cover {
  height: auto;
  min-height: 132px;
  padding: 18px 20px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  background-image: linear-gradient(145deg, #204a3810, transparent 85%);
}
.library-lesson-cover-text {
  margin: 0;
  font-size: clamp(19px, 1.8vw, 25px);
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.library-lesson-cover .cover-badge {
  position: static;
  font-size: 12px;
  background: #ffffffd9;
}
.library-lesson-card .library-lesson-meta {
  margin: 3px 0 10px;
}
.library-lesson-card .lesson-materials {
  margin: 0 0 10px;
}
.library-lesson-card .material-row {
  min-width: 0;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.library-lesson-card-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.library-lesson-card-actions .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
@media (max-width: 1150px) {
  .library-lesson-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .library-lesson-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.card-body h3 {
  font-size: 15px;
  line-height: 1.45;
}
.card-body p {
  font-size: 12px;
  display: -webkit-box;
  line-height: 1.6;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.card-bottom {
  margin-top: auto;
  gap: 8px;
  font-size: 11px;
}
.weekbar {
  gap: 10px 16px;
  flex-wrap: wrap;
}
.week-actions {
  margin-inline-start: auto;
}
.week-actions .btn,
.week-actions .icon-button {
  width: auto;
  min-width: 36px;
  height: 36px;
}
.week-day-head strong,
.week-day.today .week-day-head strong {
  width: 33px;
  height: 33px;
  line-height: 33px;
  margin: 5px auto 0;
}
.week-add {
  min-height: 36px;
}
.records-panel {
  overflow-x: auto;
}
.records th:last-child,
.records td:last-child {
  text-align: right;
}
.records td:nth-child(2),
.records td:last-child {
  white-space: nowrap;
}

.admin-course-panel {
  padding: 4px 20px;
}
.admin-course-row {
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr) auto;
  gap: 12px;
}
.admin-course-row h3,
.management-card h3 {
  font-size: 15px;
  line-height: 1.55;
}
.admin-course-row p,
.management-card > p {
  font-size: 12px;
  line-height: 1.55;
}
.admin-course-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-course-actions .btn,
.management-card .staff-actions .btn {
  min-height: 38px;
}
.management-card {
  display: flex;
  flex-direction: column;
}
.management-card .staff-actions {
  margin-top: auto;
}
.staff-panel {
  width: 100%;
}
.staff-schedule-toggle {
  white-space: nowrap;
}
.staff-schedule-toggle i {
  flex: none;
}

.finance-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 16px;
}
.finance-filter .field {
  flex: 0 1 220px;
  min-width: 0;
}
.finance-filter :is(select, input, .btn) {
  height: 42px;
}
.finance-overview {
  align-items: stretch;
}
.finance-overview > .finance-panel {
  margin: 0;
}
.finance-list li > div:last-child {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.finance-list .btn {
  margin: 0;
}
.finance-panel .section-heading p {
  color: #556c60;
  font-size: 12px;
  margin-left: auto;
}
.modal-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 4;
  background: white;
  gap: 12px;
}
.modal-header h2 {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.modal-header .icon-button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  color: #556c60;
}
.modal-actions {
  flex-wrap: wrap;
  align-items: center;
}
.modal-actions .btn {
  min-height: 40px;
}
.library-course > .modal-description {
  margin: 14px 0 0;
  color: #556c60;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 1150px) {
  .topbar { padding-inline: 25px; }
  .schedule-row { grid-template-columns: 72px minmax(0, 1fr) auto; }
}

@media (max-width: 850px) {
  .topbar { padding-inline: 23px; }
}

@media (max-width: 700px) {
  .course-toolbar { grid-template-columns: minmax(0, 1fr); }
  .course-filter-group .filters button { min-height: 40px; }
  .finance-tabs {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
  .finance-tabs button {
    min-width: 0;
    padding-inline: 0;
  }
}

@media (max-width: 600px) {
  .topbar { padding-inline: 17px; }
  .page-heading {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 14px;
  }
  .heading-right {
    max-width: 100%;
    flex-shrink: 1;
    gap: 8px;
  }
  .schedule-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px 10px;
  }
  .schedule-row .row-action {
    margin: 0;
    justify-content: flex-start;
  }
  .row-action .more {
    margin: 0 0 0 auto;
  }
  .course-card .course-cover { height: 82px; }
  .course-card .cover-art { width: 99px; height: 99px; }
  .card-body h3 { font-size: 13px; }
  .card-body p { font-size: 11px; }
  .card-bottom { font-size: 10px; }
  .admin-course-panel { padding-inline: 14px; }
  .admin-course-row { grid-template-columns: 47px minmax(0, 1fr); }
  .admin-course-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .finance-filter .field { flex: 1 1 135px; }
  .finance-filter .btn { min-width: 62px; }
  .finance-list li > div:last-child { flex: 0 1 auto; }
  .finance-list li small { overflow-wrap: anywhere; }
}

@media (max-width: 360px) {
  .cover-badge { max-width: calc(100% - 16px); }
  .staff-list li > .staff-role { gap: 4px; }
  .admin-course-actions .btn { padding-inline: 9px; }
}

.player-dialog .modal-header .btn-primary {
  min-height: 40px;
  min-width: 72px;
}
.record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.records .attendance-pending {
  color: #79501c;
}
#attendance-form .hint {
  margin-block: 10px 16px;
  line-height: 1.6;
}

.attendance-alert {
  position: relative;
  color: var(--ink);
}

.attendance-alert.pending {
  background: #fff3d8;
  border-color: #e4b765;
  color: #824500;
}

.attendance-alert.pending::after {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border: 1px solid #fff3d8;
  border-radius: 50%;
  background: #ac4d0c;
  content: "";
}

@media (max-width: 850px) {
  .attendance-alert {
    width: 40px;
    height: 40px;
  }
}

.attendance-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  inline-size: min(100%, 324px);
  margin-block: 16px 4px;
}

.attendance-counts label {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.attendance-input {
  inline-size: 100%;
  min-inline-size: 0;
  block-size: 48px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdfa;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.attendance-input::placeholder {
  font-size: 12px;
}

.attendance-input:focus-visible {
  outline: 2px solid #2c765c;
  outline-offset: 2px;
}

#today-classroom-workflow {
  display: grid;
  gap: 24px;
}

.workflow-panel,
.workflow-next {
  padding: clamp(14px, 3vw, 24px);
}

.workflow-panel h2,
.workflow-next h2 {
  margin: 0;
}

.workflow-next {
  border: 1px solid #aac9b5;
  border-radius: 14px;
  background: #f0f6ed;
  min-width: 0;
}

.workflow-next .section-heading {
  margin: 0 0 12px;
}

.workflow-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workflow-task-grid > section {
  min-width: 0;
  background: var(--paper, #f7faf6);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.workflow-task-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.workflow-task-grid p {
  margin: 6px 0;
}

.workflow-panel button,
.workflow-next button {
  min-height: 36px;
}

@media (max-width: 1050px) {
  .workflow-task-grid { grid-template-columns: 1fr; }
  .workflow-panel button,
  .workflow-next button { min-height: 44px; }
}

dialog.attendance-dialog {
  --attendance-inset: clamp(22px, 6vw, 36px);
  width: min(560px, calc(100vw - 32px));
}

.attendance-dialog .modal-header {
  padding: 28px var(--attendance-inset) 18px;
}

.attendance-dialog .modal-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.attendance-dialog .modal-body {
  padding: 0 var(--attendance-inset) 28px;
}

.attendance-guidance {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid #e5eadf;
  border-radius: 10px;
  background: #f5f8f2;
}

.attendance-guidance p {
  margin: 0;
  color: #294b3a;
  font-size: 15px;
  line-height: 1.65;
}

.attendance-guidance p + p {
  margin-top: 6px;
  color: #506357;
  font-size: 13px;
}

.attendance-lesson {
  margin-bottom: 20px;
}

.attendance-lesson-title,
.attendance-lesson-meta,
.attendance-instructions {
  margin: 0;
  line-height: 1.6;
}

.attendance-lesson-title {
  font-size: 17px;
  font-weight: 700;
}

.attendance-lesson-meta {
  margin-top: 4px;
  color: #506357;
  font-size: 14px;
}

.attendance-instructions {
  color: #506357;
  font-size: 14px;
}

.attendance-dialog .error:empty {
  display: none;
}

.attendance-dialog .attendance-counts {
  inline-size: min(100%, 300px);
  gap: clamp(12px, 4vw, 24px);
  margin-block: 18px 0;
}

.attendance-dialog .attendance-counts label {
  gap: 9px;
}

.attendance-dialog .modal-actions {
  margin-top: 28px;
  padding-top: 18px;
}

@media (max-width: 420px) {
  .attendance-dialog .modal-header {
    padding-top: 22px;
  }

  .attendance-dialog .modal-header h2 {
    font-size: 22px;
  }

  .attendance-dialog .modal-body {
    padding-bottom: 22px;
  }

  .attendance-dialog .modal-actions .btn-primary {
    width: 100%;
  }
}

.week-class {
  margin-bottom: 12px;
}

.week-class .week-event {
  margin: 0;
}

.week-event[draggable="true"] {
  cursor: grab;
}

.week-event[draggable="true"]:active {
  cursor: grabbing;
}

.week-day.schedule-drop-target {
  background-color: #eef6ed;
  box-shadow: inset 0 0 0 2px var(--green);
}

.week-event .schedule-assignee {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  opacity: 0.88;
}

.week-class .week-resume,
.week-class .week-resume-hint {
  margin-top: 6px;
}

.week-class .week-resume {
  width: 100%;
}

.week-class .week-resume-hint {
  display: block;
  color: #506357;
  font-size: 12px;
}

.row-action { flex-wrap: wrap; gap: 8px; }
.week-class .week-practice { width: 100%; margin-top: 6px; }
.practice-desktop-hint { color: #506357; font-size: 12px; }
.week-class .practice-desktop-hint { display: block; margin-top: 5px; }
.lesson-materials { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.lesson-materials h3, .lesson-materials summary { font-size: 14px; font-weight: 650; }
.lesson-materials summary { cursor: pointer; padding-block: 8px; }
.material-actions { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }

.substitution-list li > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.teaching-hours-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.teaching-hours-filter .field { margin: 0; flex: 1; min-width: 140px; }
.teaching-hours-filter .btn { min-height: 42px; }
.teaching-hours-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; padding: 14px 0 10px; }
.teaching-hours-total strong { font-size: 24px; }
.teaching-hours-total span { color: var(--muted); }
.teaching-hours-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.teaching-hours-table th, .teaching-hours-table td { padding: 10px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.teaching-hours-table th:first-child { overflow-wrap: anywhere; }
.teaching-hours-table td:nth-child(n+2), .teaching-hours-table thead th:nth-child(n+2) { width: 28%; text-align: right; white-space: nowrap; }

.row-action .status { display: inline-flex; }

.workflow-task-grid { align-items: start; }
.workflow-panel [data-action="task-list-toggle"] { margin-top: 8px; }

.week-day-picker { display: none; }
.day-empty { display: none; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 850px) {
  .week-day-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border-inline: 1px solid var(--line);
    background: white;
  }
  .week-day-picker > div { display: grid; flex: 1 0 min(100%, 330px); grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .week-day-picker .btn { min-height: 44px; }
  .week-day-picker [data-action="week-day"] { display: grid; gap: 2px; padding: 4px 0; font-size: 11px; white-space: nowrap; }
  .week-day-picker [aria-pressed="true"] { background: #dcebe0; border-color: #83af91; color: #174636; }
  .week-grid:not(.week-overview) { display: block; min-height: 0; }
  .week-grid:not(.week-overview) .week-day:not(.selected-day) { display: none; }
  .week-grid:not(.week-overview) .selected-day { padding: 0 12px 12px; border-right: none; }
  .week-grid:not(.week-overview) .week-day-head { padding: 8px 0; margin-bottom: 8px; }
  .week-grid:not(.week-overview) .week-event { min-height: 44px; }
  .week-grid:not(.week-overview) .day-empty { display: block; }
}

.btn .video-duration {
  flex: none;
  margin-inline-start: 8px;
  padding-inline-start: 8px;
  border-inline-start: 1px solid currentColor;
  font-size: .85em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.library-lesson-card-actions .video-action { justify-content: flex-start; }
.library-lesson-card-actions .video-duration { margin-inline-start: auto; }

.schedule-conflicts:not([hidden]) {
  margin: 12px 0;
  padding: 12px 14px;
  color: #60421c;
  background: #fff4dd;
  border: 1px solid #dec59b;
  border-radius: 8px;
}
.schedule-conflicts ul { padding-inline-start: 18px; }
.schedule-conflicts label { display: flex; align-items: center; gap: 8px; }
.practice-chapter-label {
  padding: 10px;
  line-height: 1.55;
  font-size: 13px;
  color: var(--muted);
  border-radius: 8px;
}
.practice-chapter-label.active { background: #e5f1e8; color: var(--ink); }

.password-help dt { font-weight: 700; margin-top: 12px; }
.password-help dd { margin: 4px 0 10px; line-height: 1.65; }
.staff-role { flex-wrap: wrap; }

.library-lesson-card-actions.library-preparation-entry { margin-top: 0; padding-top: 0; }
.library-preparation-entry + .lesson-materials { margin: 12px 0 0; }
.library-preparation-entry .video-action { border-color: #86a99a; }

.schedule-selected-time { margin: 0; color: var(--muted); font-size: 13px; }
.schedule-selected-time:empty { display: none; }
.schedule-selected-time.invalid-time { color: #9d3229; }
.schedule-quick-edit { display: none; }
.week-event .week-class-name { color: var(--ink); font-weight: 700; }
.week-class-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.week-schedule-highlight { box-shadow: 0 0 0 2px #2d7158; }
.schedule-receipt h3 { margin: 0 0 16px; font-size: 17px; }
.schedule-receipt dl { margin: 0; }
.schedule-receipt dl > div { display: grid; grid-template-columns: 6em 1fr; gap: 12px; padding: 8px 0; }
.schedule-receipt dt { color: var(--muted); }
.schedule-receipt dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .schedule-quick-edit { display: inline-flex; min-height: 44px; }
}
