:root {
  --ink: #242628;
  --ink-soft: #35383a;
  --mint: #b5e3d8;
  --mint-strong: #75c9b6;
  --mint-wash: #edf8f5;
  --paper: #f4f4f0;
  --white: #ffffff;
  --line: #dedfd9;
  --muted: #727773;
  --amber: #f5c25b;
  --coral: #ed8b74;
  --shadow: 0 14px 40px rgba(36, 38, 40, 0.07);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", "Microsoft JhengHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 28px 20px 22px;
  color: #eef1ef;
  background:
    radial-gradient(circle at 20% 0%, rgba(181, 227, 216, .12), transparent 28%),
    var(--ink);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 45px;
}
.brand-mark {
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  border: 2px solid var(--mint);
  color: var(--mint);
  font-family: Manrope, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
}
.brand strong { display: block; font-size: 16px; letter-spacing: .06em; }
.brand small {
  color: #9ba39e;
  font-family: Manrope, sans-serif;
  font-size: 9px;
  letter-spacing: .24em;
}
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a, .nav-disabled {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: 8px;
  color: #c2c7c4;
  font-size: 14px;
  font-weight: 600;
}
.sidebar nav a { transition: background .18s ease, color .18s ease; }
.sidebar nav a:hover { color: white; background: rgba(255,255,255,.06); }
.sidebar nav a.active { color: var(--ink); background: var(--mint); }
.nav-icon {
  width: 20px;
  text-align: center;
  font-family: Manrope, sans-serif;
  font-size: 18px;
}
.nav-disabled { opacity: .42; cursor: not-allowed; }
.nav-disabled em {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid #7d827f;
  border-radius: 20px;
  font-family: Manrope, sans-serif;
  font-size: 8px;
  font-style: normal;
}
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { margin-top: 2px; color: #969d99; font-size: 10px; }
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint-strong);
  box-shadow: 0 0 0 4px rgba(117,201,182,.12);
}

.main { min-height: 100vh; margin-left: 248px; padding: 24px 48px; }
.mobile-header { display: none; }
.operator-toolbar {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}
.operator-toolbar form { margin: 0; }
.operator-toolbar label { display: flex; align-items: center; gap: 8px; }
.operator-toolbar label > span {
  color: #747a76;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}
.operator-toolbar select { min-width: 210px; height: 36px; background: rgba(255,255,255,.82); }
.operator-hint { color: #8b7b62; font-size: 8px; }
.operator-current { display: flex; align-items: center; gap: 5px; color: #4c7068; font-size: 9px; font-weight: 800; }
.operator-current i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-strong); }
.demo-banner, .critical-banner {
  margin: 0 -48px 28px;
  padding: 10px 48px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.demo-banner { color: #5a4725; background: #f9e7b7; }
.critical-banner { color: #6a1919; background: #ffd9d1; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.page-actions, .task-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.task-page-actions form { margin: 0; }
.eyebrow {
  margin: 0 0 8px;
  color: #729b91;
  font-family: Manrope, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -.03em; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 14px; }
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { color: var(--ink); background: var(--mint); }
.button-primary:hover { background: #a4ddd0; }
.button-secondary { border-color: var(--line); background: var(--white); }
.button-secondary:hover { border-color: #b8bbb5; }
.notice {
  margin: -12px 0 22px;
  padding: 13px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
}
.notice.success { color: #215e50; background: #dff4ed; }
.notice.error { color: #8a3427; background: #f9ded8; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.summary-card {
  position: relative;
  min-height: 145px;
  overflow: hidden;
  padding: 21px;
  border: 1px solid #e7e7e2;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 3px 14px rgba(36,38,40,.025);
}
.summary-card.summary-dark { color: var(--white); background: var(--ink); border-color: var(--ink); }
.summary-card.summary-dark::after {
  position: absolute;
  right: -42px;
  bottom: -72px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(181,227,216,.25);
  border-radius: 50%;
  content: "";
}
.summary-label { margin-bottom: 11px; color: var(--muted); font-size: 12px; font-weight: 600; }
.summary-dark .summary-label { color: #b9bfbc; }
.summary-card > strong {
  display: block;
  margin-bottom: 5px;
  font-family: Manrope, "Noto Sans TC", sans-serif;
  font-size: 32px;
  line-height: 1;
}
.summary-card > strong small { font-size: 15px; }
.summary-card > span { color: var(--muted); font-size: 10px; }
.summary-dark > span { color: #9da4a0; }
.summary-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 8px;
  color: var(--mint);
  background: rgba(181,227,216,.1);
  font-family: Manrope, sans-serif;
  font-weight: 800;
}
.summary-icon.mint { color: #39796b; background: var(--mint-wash); }
.summary-icon.amber { color: #806321; background: #fff4d6; }
.summary-icon.coral { color: #974835; background: #fde7e2; }

.filter-panel {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(125px, .75fr)) auto auto;
  align-items: end;
  gap: 10px;
  padding: 15px;
  border: 1px solid #e1e2dc;
  border-radius: 9px;
  background: rgba(255,255,255,.76);
}
.filter-panel label, .term-row label { display: grid; gap: 6px; }
.filter-panel label > span, .term-row label > span:not(.switch):not(.term-main) {
  color: #686e6a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
input, select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #d6d8d2;
  border-radius: 5px;
  color: var(--ink);
  background: white;
  outline: none;
}
input:focus, select:focus { border-color: #65ad9c; box-shadow: 0 0 0 3px rgba(117,201,182,.16); }
input:disabled, select:disabled { color: #9b9f9c; background: #f1f2ef; }
.button-filter { color: white; background: var(--ink); }
.clear-filter { align-self: center; color: #787e79; font-size: 11px; text-decoration: underline; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 28px 0 13px;
}
.section-heading > div { display: flex; align-items: baseline; gap: 9px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading span, .section-heading p { color: var(--muted); font-size: 10px; }
.section-heading p { margin: 0; }
.camp-list { display: grid; gap: 10px; }
.camp-card {
  display: grid;
  grid-template-columns: 82px minmax(260px, 1.5fr) minmax(180px, .7fr) 128px;
  min-height: 134px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #e0e1db;
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 4px 18px rgba(36,38,40,.025);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.camp-card:hover { transform: translateY(-2px); border-color: #c5cdc8; box-shadow: var(--shadow); }
.date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--mint-wash);
}
.date-block span { color: #54887c; font-size: 10px; font-weight: 700; }
.date-block strong { font-family: Manrope, sans-serif; font-size: 28px; line-height: 1.25; }
.date-block small { color: var(--muted); font-size: 9px; }
.camp-info { display: flex; flex-direction: column; justify-content: center; padding: 18px 22px; }
.camp-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 3px;
  color: #686d69;
  background: #f0f1ee;
  font-size: 9px;
  font-weight: 700;
}
.mint-tag { color: #39786a; background: #dcf3ed; }
.full-tag { color: #984737; background: #fce4dd; }
.ended-tag { color: #626864; background: #e6e7e4; }
.camp-card.is-ended { filter: grayscale(.72); opacity: .78; }
.camp-card.is-ended:hover { filter: grayscale(.25); opacity: .94; }
.camp-card.is-ended .date-block { background: #ebedea; }
.camp-info h3 { margin: 0 0 9px; font-size: 16px; }
.camp-meta { display: flex; flex-wrap: wrap; gap: 8px 15px; color: #747975; font-size: 10px; }
.enrollment {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 24px;
  border-left: 1px solid #eff0ec;
}
.enrollment-row { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; font-size: 10px; }
.enrollment-row strong { font-family: Manrope, sans-serif; font-size: 17px; }
.enrollment-row strong small { color: var(--muted); font-size: 9px; font-weight: 600; }
.progress { height: 5px; margin: 9px 0 6px; overflow: hidden; border-radius: 10px; background: #e7e9e5; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--mint-strong); }
.enrollment > small { color: var(--muted); font-size: 9px; }
.enrollment > small + small { margin-top: 4px; }
.occupancy-warning { color: #b64d37 !important; font-weight: 800; }
.staffing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 20px;
  border-left: 1px solid #eff0ec;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #88692a;
  font-size: 10px;
  font-weight: 700;
}
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.status-pill.ready { color: #3d766a; }
.status-pill.ready i { background: var(--mint-strong); }
.arrow { color: #a3a7a3; font-family: Manrope, sans-serif; font-size: 24px; }
.empty-state {
  padding: 62px 24px;
  border: 1px dashed #cfd2cc;
  border-radius: 10px;
  text-align: center;
  background: rgba(255,255,255,.45);
}
.empty-state .empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: #4d7c71;
  background: var(--mint);
  font-family: Manrope, sans-serif;
  font-weight: 800;
}
.empty-state h3 { margin-bottom: 6px; font-size: 16px; }
.empty-state p { margin-bottom: 18px; color: var(--muted); font-size: 12px; }

.info-callout {
  display: flex;
  gap: 13px;
  margin-bottom: 18px;
  padding: 15px 17px;
  border-left: 3px solid var(--mint-strong);
  background: #e8f5f1;
}
.info-callout > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: white;
  background: #5e9d8e;
  font-family: serif;
  font-weight: bold;
}
.info-callout strong { font-size: 12px; }
.info-callout p { margin: 2px 0 0; color: #567068; font-size: 11px; }
.settings-card, .detail-card {
  border: 1px solid #e0e1dc;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 3px 16px rgba(36,38,40,.03);
}
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 24px;
  border-bottom: 1px solid #e9eae6;
}
.settings-head h2 { margin-bottom: 4px; font-size: 17px; }
.settings-head p { margin: 0; color: var(--muted); font-size: 11px; }
.settings-head > span { color: #59877c; font-size: 11px; font-weight: 700; }
.term-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, .8fr) minmax(150px, .7fr) auto;
  align-items: center;
  gap: 18px;
  padding: 17px 24px;
  border-bottom: 1px solid #eeefeb;
}
.term-row:last-child { border-bottom: 0; }
.switch-field {
  display: flex !important;
  align-items: center;
  gap: 13px;
  cursor: pointer;
}
.switch-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 20px;
  background: #c9ccc7;
  transition: background .18s ease;
}
.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,.14);
  content: "";
  transition: transform .18s ease;
}
.switch-field input:checked + .switch { background: #5da994; }
.switch-field input:checked + .switch::after { transform: translateX(16px); }
.term-main strong, .term-main small { display: block; }
.term-main strong { font-size: 13px; }
.term-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.compact { border: 0; border-radius: 0; }

.back-link { display: inline-block; margin-bottom: 18px; color: #65726d; font-size: 12px; font-weight: 600; }
.detail-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 30px;
  border-radius: 12px;
  color: white;
  background:
    radial-gradient(circle at 82% 10%, rgba(181,227,216,.22), transparent 27%),
    var(--ink);
}
.detail-hero h1 { margin-bottom: 8px; }
.detail-hero p { margin: 0; color: #b9c0bc; font-size: 12px; }
.hero-number { white-space: nowrap; color: #aeb6b1; }
.hero-number strong { color: var(--mint); font-family: Manrope, sans-serif; font-size: 48px; }
.hero-number span { font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.detail-card { padding: 22px; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title h2 { margin: 0; font-size: 16px; }
.source-badge, .phase-badge {
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 8px;
  font-weight: 800;
}
.source-badge { color: #39796b; background: var(--mint-wash); }
.phase-badge { color: #797d79; background: #eeefec; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 95px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid #eff0ec; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 0; font-size: 11px; font-weight: 600; }
.muted-detail dd { color: #8b908c; }
.capacity-override-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 9px;
}
.capacity-override-form label { display: grid; gap: 6px; }
.capacity-override-form label span { color: var(--muted); font-size: 9px; font-weight: 800; }
.capacity-resolution { margin: 13px 0 0; color: #727975; font-size: 10px; line-height: 1.7; }
.capacity-resolution strong { color: var(--ink); }
.roster-card { margin-bottom: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 24px; border-bottom: 1px solid #eeefeb; text-align: left; font-size: 10px; }
th { color: var(--muted); background: #fafaf8; font-size: 9px; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
.error-page { margin-top: 10vh; }
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid #dedfd9;
  color: #969a96;
  font-size: 9px;
}
.sidebar-backdrop { display: none; }

.template-set-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #9ccfc3;
  border-radius: 20px;
  color: #39796b;
  background: var(--mint-wash);
  font-size: 10px;
  font-weight: 800;
}
.task-scope-section + .task-scope-section { margin-top: 30px; }
.camp-task-summary-list {
  display: grid;
  gap: 7px;
}
.camp-task-summary-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid #e1e2dd;
  border-radius: 8px;
  background: white;
  transition: border-color .15s ease, transform .15s ease;
}
.camp-task-summary-row:hover, .camp-task-summary-row.active {
  border-color: #8dbeb3;
  transform: translateY(-1px);
}
.camp-task-summary-row.active { box-shadow: 0 0 0 2px rgba(117,201,182,.12); }
.camp-task-summary-row > div:first-child { min-width: 0; }
.camp-task-summary-row > div:first-child strong,
.camp-task-summary-row > div:first-child small { display: block; }
.camp-task-summary-row > div:first-child strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.camp-task-summary-row > div:first-child small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.camp-task-counts { display: flex; align-items: center; gap: 15px; color: #777d79; font-size: 9px; }
.camp-task-counts strong { color: var(--ink); }
.camp-task-counts .overdue, .camp-task-counts .overdue strong { color: #b64d37; }
.selected-camp-tasks .section-heading > a { color: #39796b; font-size: 10px; font-weight: 800; }

.capacity-default-card { margin-bottom: 14px; }
.inline-capacity-form {
  display: grid;
  grid-template-columns: 90px auto auto;
  align-items: center;
  gap: 8px;
}
.inline-capacity-form span { color: var(--muted); font-size: 10px; }
.capacity-history { padding: 12px 24px 18px; color: #68706c; font-size: 9px; }
.capacity-history summary { color: #39796b; cursor: pointer; font-weight: 800; }
.capacity-history ol { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 17px; }
.venue-capacity-list { display: grid; }
.venue-capacity-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px auto;
  align-items: center;
  gap: 15px;
  padding: 14px 24px;
  border-bottom: 1px solid #eeefeb;
}
.venue-capacity-row:last-child { border-bottom: 0; }
.venue-capacity-row > div strong,
.venue-capacity-row > div small { display: block; }
.venue-capacity-row > div strong { font-size: 12px; }
.venue-capacity-row > div small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.venue-capacity-row label { position: relative; }
.venue-capacity-row label input { padding-right: 30px; }
.venue-capacity-row label em {
  position: absolute;
  top: 50%;
  right: 10px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  transform: translateY(-50%);
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}
.season-switcher {
  display: grid;
  grid-template-columns: minmax(185px, 1.2fr) minmax(155px, 1fr) minmax(130px, .75fr) minmax(140px, .8fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid #e1e2dc;
  border-radius: 9px;
  background: rgba(255,255,255,.76);
}
.season-switcher label:not(.overdue-check) { display: grid; gap: 6px; }
.season-switcher label > span {
  color: #686e6a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}
.overdue-check {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #d6d8d2;
  border-radius: 5px;
  background: white;
  cursor: pointer;
}
.overdue-check input { width: 15px; height: 15px; accent-color: #c45e49; }
.overdue-check span { white-space: nowrap; }
.task-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin-bottom: 24px;
}
.task-summary-grid article {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 17px;
  border: 1px solid #e2e3de;
  border-radius: 8px;
  background: white;
}
.task-summary-grid span { color: var(--muted); font-size: 10px; font-weight: 700; }
.task-summary-grid strong { font-family: Manrope, sans-serif; font-size: 24px; }
.task-summary-grid .warning { border-color: #efc2b8; background: #fff5f2; }
.task-summary-grid .warning strong { color: #b64d37; }
.task-summary-grid .frozen { border-color: #d6d7d3; background: #f0f1ee; }
.task-summary-grid .frozen strong { color: #777d79; }
.org-task-tree { display: grid; gap: 28px; }
.division-group {
  overflow: hidden;
  border: 1px solid #dcded9;
  border-radius: 11px;
  background: rgba(255,255,255,.5);
}
.division-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: white;
  background: var(--ink);
}
.division-heading > div, .course-heading, .section-heading > div { display: flex; align-items: center; gap: 9px; }
.division-heading span, .course-heading span, .section-heading span,
.camp-task-division h3 span, .camp-task-course h4 span, .camp-task-section h5 span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
}
.division-heading span { color: var(--ink); background: var(--mint); }
.division-heading h2 { margin: 0; font-size: 17px; }
.division-heading strong { color: #c7d2ce; font-size: 9px; }
.course-group { padding: 15px 16px 18px; }
.course-group + .course-group { border-top: 1px solid #e4e5e1; }
.course-heading { margin: 0 0 11px 2px; }
.course-heading span { color: #376b60; background: #dff1ec; }
.course-heading h3 { margin: 0; color: #3f4743; font-size: 14px; }
.section-group { margin-left: 15px; padding-left: 15px; border-left: 2px solid #e2e8e5; }
.section-group + .section-group { margin-top: 14px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.section-heading span { color: #84652a; background: #f6eacb; }
.section-heading h4 { margin: 0; color: #606762; font-size: 11px; }
.section-heading small { color: var(--muted); font-size: 8px; }
.task-rows { display: grid; gap: 7px; }
.task-row {
  display: grid;
  grid-template-columns: 44px minmax(260px, 1fr) 118px 128px;
  min-height: 90px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e1e2dd;
  border-radius: 8px;
  background: white;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.task-row:hover { border-color: #c6cec9; box-shadow: 0 7px 20px rgba(36,38,40,.05); }
.task-row.is-overdue { border-left: 3px solid #d46650; }
.task-row.is-frozen {
  color: #777c78;
  border-color: #dfe0dc;
  background:
    repeating-linear-gradient(-45deg, rgba(94,99,95,.025), rgba(94,99,95,.025) 7px, transparent 7px, transparent 14px),
    #f7f7f5;
}
.task-seq {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid #eff0ec;
  color: #7a928c;
  font-family: Manrope, sans-serif;
  font-size: 10px;
  font-weight: 800;
}
.task-main { min-width: 0; padding: 13px 16px; }
.task-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.task-title-line h3 { margin: 0; font-size: 13px; }
.area-tag, .notify-tag, .dependency-tag {
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
}
.area-tag { color: #427166; background: #e7f3f0; }
.notify-tag { color: #8c6721; background: #fff0c8; }
.dependency-tag { color: #766b5b; background: #f1eee8; }
.dependency-tag.ready { color: #39796b; background: #e2f4ef; }
.task-meta { display: flex; flex-wrap: wrap; gap: 5px 13px; margin-top: 7px; color: #858a86; font-size: 9px; }
.task-meta a { color: #4f7f74; font-weight: 700; }
.latest-change { margin-top: 7px; color: #7a807c; font-size: 8px; }
.latest-change strong { color: #4d5d58; }
.change-history { margin-top: 6px; color: #737975; font-size: 8px; }
.change-history summary { width: max-content; color: #52766e; cursor: pointer; font-weight: 800; }
.change-history p { margin: 6px 0 0; }
.change-history ol { display: grid; gap: 5px; margin: 7px 0 0; padding-left: 16px; }
.change-history li span { display: block; margin-top: 2px; color: #5b625e; }
.change-history time { margin-left: 5px; color: #969b97; }
.task-due {
  display: flex;
  min-height: 56px;
  flex-direction: column;
  justify-content: center;
  padding: 0 15px;
  border-left: 1px solid #eff0ec;
}
.task-due small { margin-bottom: 3px; color: #969a97; font-size: 8px; }
.task-due strong { font-family: Manrope, "Microsoft JhengHei", sans-serif; font-size: 11px; }
.task-due em { margin-top: 3px; color: #b84d39; font-size: 8px; font-style: normal; font-weight: 800; }
.task-action {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 12px 15px;
  border-left: 1px solid #eff0ec;
}
.task-status { display: flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 800; }
.task-status i { width: 6px; height: 6px; border-radius: 50%; background: #b5bab6; }
.status-doing { color: #86631c; }
.status-doing i { background: var(--amber); }
.status-done { color: #347466; }
.status-done i { background: var(--mint-strong); }
.status-frozen { color: #737874; }
.status-frozen i { background: #929793; }
.task-action form { width: 100%; }
.task-action button {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #d7d9d4;
  border-radius: 4px;
  color: #565b58;
  background: white;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}
.task-action button:hover { border-color: #8dbeb3; color: #326d60; background: var(--mint-wash); }
.task-action > small { color: #909591; font-size: 8px; }
.camp-task-card { margin-bottom: 14px; }
.camp-task-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 24px;
  border-bottom: 1px solid #e9eae6;
  color: #747975;
  font-size: 9px;
}
.camp-task-summary strong { color: var(--ink); }
.camp-task-summary a { margin-left: auto; color: #39796b; font-weight: 800; }
.camp-task-groups { display: grid; gap: 16px; padding: 18px; }
.camp-task-division { display: grid; gap: 12px; }
.camp-task-division + .camp-task-division { padding-top: 16px; border-top: 1px solid #e1e3de; }
.camp-task-division h3, .camp-task-course h4, .camp-task-section h5 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px;
  color: #4d5652;
}
.camp-task-division h3 { font-size: 13px; }
.camp-task-division h3 span { color: white; background: var(--ink); }
.camp-task-course { margin-left: 12px; }
.camp-task-course h4 { font-size: 11px; }
.camp-task-course h4 span { color: #376b60; background: #dff1ec; }
.camp-task-section { margin: 9px 0 0 13px; padding-left: 12px; border-left: 2px solid #e3e7e4; }
.camp-task-section h5 { font-size: 9px; }
.camp-task-section h5 span { color: #84652a; background: #f6eacb; }
.camp-task-section .task-row { grid-template-columns: 42px minmax(230px, 1fr) 112px 122px; }
.camp-task-section .task-meta a { display: none; }

.text-danger { color: #b64d37 !important; }
.danger-badge, .gap-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 20px;
  color: #a63f2e;
  background: #fff0ec;
  font-size: 8px;
  font-weight: 800;
}
.gap-label { margin-left: 7px; }
.staffing-editor-card { margin-bottom: 14px; }
.staffing-slot-list { display: grid; }
.staffing-slot-form {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) repeat(5, minmax(115px, .7fr)) auto;
  align-items: end;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid #eceee9;
}
.staffing-slot-form > label:not(.staffing-group-check) { display: grid; gap: 5px; }
.staffing-slot-form label > span { color: var(--muted); font-size: 8px; font-weight: 700; }
.staffing-slot-form input, .staffing-slot-form select { min-width: 0; padding: 8px; font-size: 9px; }
.staffing-slot-title strong, .staffing-slot-title small { display: block; }
.staffing-slot-title strong { font-size: 11px; }
.staffing-slot-title small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.staffing-group-check { display: flex; min-height: 34px; align-items: center; gap: 5px; }
.staffing-group-check input { width: 14px; height: 14px; }
.staffing-note { grid-column: 2 / 7; }
.staffing-slot-form > .button { grid-column: 7; }
.staffing-support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 20px;
  border-top: 1px solid #e6e8e3;
  background: #fafaf8;
}
.staffing-support-grid form { padding: 15px; border: 1px solid #e1e3de; border-radius: 8px; background: white; }
.staffing-support-grid h3 { margin: 0; font-size: 12px; }
.staffing-support-grid p { margin: 5px 0 11px; color: var(--muted); font-size: 9px; }
.inline-fields { display: flex; gap: 7px; }
.inline-fields input { min-width: 0; flex: 1; }
.money-summary { font-size: 20px !important; }
.staffing-filter { grid-template-columns: repeat(5, minmax(120px, 1fr)) auto auto; }
.ratio-form { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.ratio-form input { width: 62px; margin-inline: 5px; }
.staffing-table-card, .staff-directory-card, .notification-table-card, .missing-recipient-card { margin-bottom: 14px; }
.staffing-table-card .status-pill { white-space: nowrap; }
.row-warning { background: #fff9f6; }
.table-link strong, .table-link small, td > strong + small { display: block; }
.table-link small, td > strong + small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.empty-cell { padding: 28px !important; color: var(--muted); text-align: center; }
tfoot td { background: #fafaf7; }
.staff-directory-list { display: grid; }
.staff-member-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1.3fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid #eceee9;
}
.staff-member-form.is-new { background: #f2f9f7; }
.staff-member-form input { min-width: 0; padding: 8px; font-size: 9px; }
.active-check { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; }
.active-check input { width: 14px; }
.dry-run-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 13px 16px;
  border: 1px solid #e4bd62;
  border-radius: 8px;
  color: #725313;
  background: #fff7df;
  font-size: 10px;
}
.dry-run-banner strong { padding: 4px 8px; border-radius: 4px; color: white; background: #a77a19; }
.notification-summary { margin-bottom: 14px; }
.notification-filter { grid-template-columns: 1fr 1fr auto auto; }
.notification-table-card td { vertical-align: top; }
.notification-copy { min-width: 260px; max-width: 430px; }
.notification-copy strong, .notification-copy small, .notification-copy em { display: block; }
.notification-copy small { margin-top: 5px; color: var(--muted); line-height: 1.5; }
.notification-copy em { margin-top: 5px; color: #b14a37; font-size: 8px; font-style: normal; }
.outbox-status { display: inline-flex; padding: 4px 7px; border-radius: 4px; font-size: 8px; font-weight: 800; }
.status-dry { color: #7a5a17; background: #fff0c8; }
.status-queued { color: #326d60; background: #e2f4ef; }
.status-sent { color: #326d60; background: #cdebe3; }
.status-failed { color: #a63f2e; background: #fff0ec; }
.status-skipped { color: #696e6a; background: #ebede9; }
.row-actions { display: flex; gap: 5px; }
.row-actions button { padding: 4px 7px; border: 1px solid #d8dad5; border-radius: 4px; background: white; font-size: 8px; cursor: pointer; }
.missing-recipient-list { display: grid; }
.missing-recipient-list > div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 11px 20px; border-top: 1px solid #eceee9; font-size: 9px; }
.missing-recipient-list span { color: #a64a38; }
.task-report-link {
  display: inline-block;
  margin-top: 8px;
  color: #39796b;
  font-size: 8px;
  font-weight: 800;
}
.complete-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 20px;
  color: #39796b;
  background: var(--mint-wash);
  font-size: 8px;
  font-weight: 800;
}
.finance-card, .survey-card, .closing-table-card { margin-bottom: 14px; }
.finance-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #eceee9;
  border-bottom: 1px solid #eceee9;
}
.finance-overview > div { padding: 17px 20px; border-right: 1px solid #eceee9; }
.finance-overview > div:last-child { border-right: 0; }
.finance-overview span, .finance-overview strong, .finance-overview small { display: block; }
.finance-overview span { color: var(--muted); font-size: 8px; font-weight: 800; }
.finance-overview strong { margin-top: 6px; font-size: 17px; }
.finance-overview small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.finance-overview a { color: #39796b; font-weight: 800; }
.cost-warning { padding: 10px 20px; color: #9b452f; background: #fff5f1; font-size: 9px; }
.finance-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr)) minmax(150px, 1.4fr) auto;
  align-items: end;
  gap: 9px;
  padding: 18px 20px;
}
.finance-form label, .survey-form label, .report-form-grid label, .decision-form label { display: grid; gap: 5px; }
.finance-form label > span, .survey-form label > span, .report-form-grid label > span, .decision-form label > span { color: var(--muted); font-size: 8px; font-weight: 800; }
.finance-form label small { color: var(--muted); font-size: 7px; }
.finance-form input, .survey-form input, .survey-form textarea, .report-form-grid input,
.report-form-grid select, .report-form-grid textarea, .decision-form input, .decision-form textarea { min-width: 0; }
.survey-form {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(100px, .7fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid #eceee9;
}
.survey-summary { grid-column: 1 / 5; }
.survey-summary textarea { resize: vertical; }
.closing-summary .summary-warning { border-color: #efc2b8; background: #fff5f2; }
.closing-filter { grid-template-columns: repeat(5, minmax(110px, 1fr)) auto auto auto; }
.closing-table-card td > .danger-badge + small { display: block; max-width: 190px; margin-top: 5px; color: #a04c39; line-height: 1.4; }
.report-list { display: grid; gap: 12px; }
.report-card {
  padding: 20px;
  border: 1px solid #dcdfd9;
  border-radius: 10px;
  background: white;
  box-shadow: 0 8px 25px rgba(36,38,40,.04);
}
.report-card.is-stale { border-left: 4px solid #d46650; }
.report-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.report-card-head h2 { margin: 9px 0 0; font-size: 16px; }
.report-card-head time { color: var(--muted); font-size: 8px; white-space: nowrap; }
.report-category, .report-stage, .stale-badge { display: inline-flex; margin-right: 5px; padding: 4px 7px; border-radius: 4px; font-size: 8px; font-weight: 800; }
.report-category { color: #555c58; background: #eceeea; }
.stage-dialog { color: #75591e; background: #fff0c8; }
.stage-report { color: #326d60; background: #e2f4ef; }
.stage-decision { color: white; background: #39796b; }
.stale-badge { color: #a63f2e; background: #fff0ec; }
.report-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.report-meta a { color: #39796b; font-weight: 800; }
.report-body { margin: 14px 0; color: #4d5551; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.decision-box { margin-top: 12px; padding: 12px 14px; border-radius: 7px; color: #315d54; background: var(--mint-wash); font-size: 10px; }
.decision-box p { margin: 6px 0 0; white-space: pre-wrap; }
.report-advance { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #eceee9; color: var(--muted); font-size: 9px; }
.decision-form { display: grid; grid-template-columns: 180px 1fr auto; align-items: end; }
.reports-filter { grid-template-columns: 2fr 1fr 1fr auto auto; }
.report-create-form { max-width: 850px; }
.report-context { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; color: #45635c; background: var(--mint-wash); font-size: 9px; }
.report-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 20px; }
.report-form-grid .wide { grid-column: 1 / 3; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }

@media (max-width: 1120px) {
  .main { padding-inline: 30px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .filter-panel { grid-template-columns: 1.4fr 1fr 1fr; }
  .button-filter { align-self: end; }
  .camp-card { grid-template-columns: 75px 1fr 190px; }
  .staffing { grid-column: 2 / 4; justify-content: flex-start; padding: 10px 22px; border-top: 1px solid #eff0ec; border-left: 0; }
  .term-row { grid-template-columns: 1fr 1fr; }
  .season-switcher { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-row, .camp-task-section .task-row { grid-template-columns: 42px minmax(220px, 1fr) 112px; }
  .task-action { grid-column: 2 / 4; grid-template-columns: 1fr 118px; align-items: center; justify-items: start; border-top: 1px solid #eff0ec; border-left: 0; }
  .task-action form { width: 118px; }
  .staffing-slot-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .staffing-slot-title { grid-column: 1 / 4; }
  .staffing-note { grid-column: 1 / 3; }
  .staffing-slot-form > .button { grid-column: 3; }
  .staffing-filter { grid-template-columns: repeat(3, 1fr); }
  .staff-member-form { grid-template-columns: repeat(3, 1fr); }
  .finance-form { grid-template-columns: repeat(3, 1fr); }
  .finance-note { grid-column: 1 / 3; }
  .closing-filter { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .sidebar {
    width: min(82vw, 290px);
    transform: translateX(-102%);
    transition: transform .2s ease;
  }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(20,21,22,.55);
  }
  body.menu-open .sidebar-backdrop { display: block; }
  .main { margin-left: 0; padding: 20px 16px; }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -20px -16px 26px;
    padding: 13px 16px;
    color: white;
    background: var(--ink);
  }
  .menu-button { padding: 0; border: 0; color: var(--mint); background: transparent; font-size: 21px; }
  .mobile-brand { font-family: Manrope, sans-serif; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
  .readonly-badge { padding: 3px 7px; border-radius: 20px; color: var(--ink); background: var(--mint); font-size: 8px; font-weight: 800; }
  .operator-toolbar { align-items: flex-end; margin-bottom: 16px; }
  .operator-toolbar label { display: grid; gap: 4px; }
  .operator-toolbar select { min-width: 180px; }
  .operator-hint { max-width: 150px; }
  .demo-banner, .critical-banner { margin: 0 -16px 22px; padding-inline: 16px; }
  .page-head { align-items: center; }
  .page-subtitle { max-width: 240px; font-size: 11px; }
  .page-head .button { width: 42px; padding: 0; overflow: hidden; white-space: nowrap; font-size: 0; }
  .page-head .button span { font-size: 18px; }
  .page-actions { flex-wrap: wrap; }
  .page-actions .button, .task-page-actions .button { width: auto; padding-inline: 12px; font-size: 9px; }
  .summary-grid { gap: 9px; }
  .summary-card { min-height: 126px; padding: 16px; }
  .summary-card > strong { font-size: 27px; }
  .summary-icon { display: none; }
  .filter-panel { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / 3; }
  .filter-panel label:nth-of-type(4) { grid-column: 1 / 2; }
  .button-filter { grid-column: 2 / 3; }
  .clear-filter { grid-column: 1 / 3; justify-self: center; }
  .section-heading p { display: none; }
  .camp-card { grid-template-columns: 62px 1fr; min-height: 0; }
  .camp-info { padding: 16px; }
  .camp-meta { display: grid; gap: 4px; }
  .enrollment { grid-column: 1 / 3; padding: 12px 16px; border-top: 1px solid #eff0ec; border-left: 0; }
  .staffing { grid-column: 1 / 3; padding: 10px 16px; }
  .term-row { grid-template-columns: 1fr; gap: 13px; }
  .term-row .button { width: 100%; }
  .detail-hero { align-items: flex-start; padding: 22px; }
  .hero-number strong { font-size: 34px; }
  .detail-grid { grid-template-columns: 1fr; }
  .page-footer { display: grid; text-align: center; }
  .season-switcher { grid-template-columns: 1fr 1fr; }
  .overdue-check { align-self: end; }
  .task-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .task-row, .camp-task-section .task-row { grid-template-columns: 38px 1fr; }
  .task-due { grid-column: 2; min-height: 44px; border-top: 1px solid #eff0ec; border-left: 0; }
  .task-action { grid-column: 2; grid-template-columns: 1fr 110px; padding-left: 16px; }
  .camp-task-groups { padding: 12px; }
  .section-group, .camp-task-course, .camp-task-section { margin-left: 6px; padding-left: 8px; }
  .camp-task-summary-row { grid-template-columns: 1fr; gap: 9px; }
  .camp-task-counts { justify-content: space-between; }
  .venue-capacity-row { grid-template-columns: 1fr 90px; padding: 13px 16px; }
  .venue-capacity-row .button { grid-column: 1 / 3; width: 100%; font-size: 9px; }
  .settings-head { align-items: flex-start; }
  .inline-capacity-form { grid-template-columns: 80px auto; }
  .inline-capacity-form .button { grid-column: 1 / 3; width: 100%; font-size: 9px; }
}

@media (max-width: 430px) {
  h1 { font-size: 28px; }
  .summary-label { font-size: 10px; }
  .summary-card > span { display: none; }
  .summary-card { min-height: 98px; }
  .filter-panel { grid-template-columns: 1fr; }
  .search-field, .filter-panel label:nth-of-type(4), .button-filter, .clear-filter { grid-column: 1; }
  .camp-card { grid-template-columns: 55px 1fr; }
  .date-block strong { font-size: 23px; }
  .camp-info h3 { font-size: 14px; }
  .detail-hero { display: block; }
  .hero-number { margin-top: 18px; }
  .season-switcher { grid-template-columns: 1fr; }
  .task-summary-grid { grid-template-columns: 1fr 1fr; }
  .task-summary-grid article { min-height: 62px; }
  .task-action { grid-template-columns: 1fr; }
  .task-action form { width: 100%; }
  .camp-task-summary { flex-wrap: wrap; }
  .camp-task-summary a { width: 100%; margin-left: 0; }
  .operator-toolbar { display: grid; justify-content: stretch; }
  .operator-toolbar select { width: 100%; }
  .operator-hint { max-width: none; }
  .task-page-actions { display: grid; justify-items: end; }
  .capacity-override-form { grid-template-columns: 1fr; }
  .staffing-support-grid { grid-template-columns: 1fr; }
  .staffing-filter, .notification-filter { grid-template-columns: 1fr 1fr; }
  .staffing-slot-form { grid-template-columns: 1fr 1fr; }
  .staffing-slot-title { grid-column: 1 / 3; }
  .staffing-note { grid-column: 1 / 3; }
  .staffing-slot-form > .button { grid-column: 1 / 3; width: 100%; }
  .staff-member-form { grid-template-columns: 1fr 1fr; }
  .staff-member-form .button { grid-column: 1 / 3; }
  .inline-fields { display: grid; }
  .dry-run-banner { align-items: flex-start; flex-direction: column; }
  .finance-overview { grid-template-columns: 1fr 1fr; }
  .finance-overview > div:nth-child(2) { border-right: 0; }
  .finance-overview > div:nth-child(-n+2) { border-bottom: 1px solid #eceee9; }
  .finance-form, .survey-form { grid-template-columns: 1fr 1fr; }
  .finance-note, .survey-summary { grid-column: 1 / 3; }
  .finance-form > .button, .survey-form > .button { grid-column: 1 / 3; width: 100%; }
  .closing-filter, .reports-filter { grid-template-columns: 1fr 1fr; }
  .report-card-head, .report-advance { align-items: flex-start; flex-direction: column; }
  .decision-form { display: grid; grid-template-columns: 1fr; }
  .decision-form .button { width: 100%; }
  .report-form-grid { grid-template-columns: 1fr; }
  .report-form-grid .wide { grid-column: 1; }
}

/* 規格 01：週檢核表與登入 */
.week-switcher { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 4px; }
.week-chip {
  display: grid; flex: 0 0 auto; gap: 2px; min-width: 112px; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); text-decoration: none;
}
.week-chip small { color: var(--muted); font-size: 11px; }
.week-chip.active { border-color: var(--ink); background: var(--ink); color: white; }
.week-chip.active small { color: #d6d8d4; }
.week-status-signed { color: #215e50; }
.week-status-pending_sign { color: #8a3427; }
.week-actions form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0; }
.week-return-form label { display: grid; flex: 1 1 240px; gap: 6px; }
.week-return-form input { min-height: 42px; }
.operator-toolbar form { display: inline-flex; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 16px; box-sizing: border-box; }
.login-card {
  width: 100%; max-width: 400px; padding: 32px 28px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); box-sizing: border-box;
}
.login-brand { margin-bottom: 24px; }
.login-form { display: grid; gap: 14px; margin-top: 18px; }
.login-form label { display: grid; gap: 6px; }
.login-form input { min-height: 44px; font-size: 16px; }
.login-card .notice { margin: 16px 0 0; }
.login-foot { margin: 18px 0 0; color: var(--muted); font-size: 12px; }

/* 規格 02：每日檢核與燈號（顏色之外一律附文字） */
.light {
  display: inline-block; min-width: 46px; padding: 3px 7px; border-radius: 5px;
  font-size: 11px; font-weight: 700; text-align: center; text-decoration: none; white-space: nowrap;
}
.light-ok { color: #14532d; background: #dcfce7; }
.light-today { color: #713f12; background: #fef08a; }
.light-red { color: #7f1d1d; background: #fee2e2; }
.light-todo { color: #4b5563; background: #f1f2f4; }
.light-ign { color: #78350f; background: #fde7c7; }
.light-head, .light-cell { text-align: center; white-space: nowrap; }
.day-tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 4px; }
.day-tab {
  display: grid; flex: 0 0 auto; gap: 4px; min-width: 76px; min-height: 44px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink);
  text-align: center; text-decoration: none;
}
.day-tab.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.check-list, .unresolved-list, .template-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.check-row, .unresolved-list li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white);
}
.check-row.is-done { background: #f3fbf6; }
.check-row.is-ignored { background: #fff8ee; }
.check-row.is-overdue, .unresolved-list li.is-overdue { border-color: #f3b4a6; background: #fff7f5; }
.check-main, .unresolved-list li > div { display: grid; gap: 2px; min-width: 0; }
.check-main small, .unresolved-list small { color: var(--muted); font-size: 11px; }
.check-actions form, .ignore-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ignore-form input { min-height: 42px; min-width: 200px; }
.notice-tag { padding: 1px 6px; border-radius: 4px; background: #e0ecff; color: #1e3a8a; font-size: 10px; }
.template-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 12px 0; }
.template-form label { display: grid; gap: 6px; }
.template-form input:not([type="checkbox"]), .template-form select { min-height: 42px; }
.template-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.template-list li.is-inactive { opacity: .6; }
.template-list summary { display: grid; gap: 2px; cursor: pointer; }
.template-list summary small { color: var(--muted); font-size: 11px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* 規格 03：家長通知 */
.notice-preview { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7f8f6; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13px; line-height: 1.7; }
.muted-text { color: var(--muted); font-size: 12px; }
.template-form .template-body { grid-column: 1 / -1; }
.template-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; line-height: 1.6; }
.reply-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: #f4f5f2; }
.reply-card { width: 100%; max-width: 440px; padding: 28px 22px; border-radius: 16px; background: var(--white); box-shadow: 0 8px 30px rgba(0, 0, 0, .06); }
.reply-card h1 { margin: 6px 0 8px; font-size: 22px; }
.reply-form { display: grid; gap: 12px; margin-top: 20px; }
.reply-form .button { min-height: 48px; font-size: 15px; }

.section-heading { margin: 24px 0 8px; font-size: 1.1rem; }
