:root {
  --ivory: #F6F1E7;
  --ivory-alt: #EDE6D6;
  --paper: #FBF8F1;
  --ink: #211C16;
  --ink-soft: #55503F;
  --ink-faint: #9C9585;
  --green: #33513F;
  --green-deep: #22362A;
  --green-pale: #E4EBE3;
  --brass: #B0863F;
  --brass-pale: #F3E7D2;
  --rust: #A24328;
  --rust-pale: #F6E3DC;
  --line: #DED4BC;
  --line-soft: #EAE2CE;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(33,28,22,0.06), 0 4px 14px rgba(33,28,22,0.05);
}

.legacy-schedule-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink-soft); font-size: 10px; font-weight: 750; white-space: nowrap; }
.legacy-schedule-toggle input { margin: 0; }
.legacy-badge { padding: 5px 8px; border: 1px solid #A98A42; border-radius: 999px; background: #FFF7D9; color: #735A1F; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.analytics-type-tabs { display: inline-flex; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.analytics-type-tabs button { min-width: 105px; padding: 9px 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.analytics-type-tabs button:last-child { border-right: 0; }
.analytics-type-tabs button.active { background: #234A68; color: #fff; }
.analytics-panel { margin-bottom: 18px; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); box-shadow: var(--shadow); }
.analytics-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 15px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.analytics-panel-head span { color: #527795; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.analytics-panel-head h2 { margin: 3px 0 0; font-size: 21px; font-weight: 500; }
.analytics-panel-head small { color: var(--ink-faint); font-size: 9.5px; }
.analytics-bars { display: grid; gap: 9px; }
.analytics-bar-row { display: grid; grid-template-columns: 155px minmax(120px, 1fr) 78px; gap: 10px; align-items: center; min-height: 25px; }
.analytics-bar-row.bar-color-0 { --bar-color: #285C7C; }
.analytics-bar-row.bar-color-1 { --bar-color: #B06E32; }
.analytics-bar-row.bar-color-2 { --bar-color: #477B58; }
.analytics-bar-row.bar-color-3 { --bar-color: #8A5278; }
.analytics-bar-row.bar-color-4 { --bar-color: #73623D; }
.analytics-bar-row.bar-color-5 { --bar-color: #496B9A; }
.analytics-bar-row.bar-color-6 { --bar-color: #9A4F43; }
.analytics-bar-row.bar-color-7 { --bar-color: #5F6D43; }
.analytics-bar-row.bar-color-8 { --bar-color: #6E528F; }
.analytics-bar-row.bar-color-9 { --bar-color: #3F7D7A; }
.analytics-bar-row > span { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 10.5px; font-weight: 700; }
.analytics-bar-row > span u { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 2px; background: var(--bar-color); text-decoration: none; }
.analytics-bar-row > span small { margin-left: auto; padding: 2px 4px; border: 1px solid currentColor; border-radius: 999px; color: var(--ink-faint); font-size: 6.5px; line-height: 1; text-transform: uppercase; }
.analytics-bar-row > b { color: var(--bar-color); font-size: 11px; }
.analytics-bar-track { overflow: hidden; height: 17px; border-radius: 4px; background: #E9EEF2; }
.analytics-bar-track svg { display: block; width: 100%; height: 100%; color: var(--bar-color); }
.analytics-bar-fill { fill: var(--bar-color); }
.camp-analytics-years { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 13px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.camp-analytics-years section { padding: 12px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--ivory-alt); }
.camp-analytics-years header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.camp-analytics-years header div { display: grid; gap: 2px; }
.camp-analytics-years header span { color: var(--ink-faint); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.camp-analytics-years header b, .camp-analytics-years header strong { font-size: 10.5px; }
.camp-analytics-years .analytics-bar-row { grid-template-columns: 56px minmax(80px, 1fr) 30px; gap: 7px; min-height: 20px; }
.camp-analytics-years .analytics-bar-track { height: 11px; }
.analytics-note { margin: 13px 0 0; padding: 9px 11px; border-left: 3px solid #7899B1; background: #EEF4F7; color: var(--ink-soft); font-size: 9.5px; line-height: 1.5; }
.analytics-slice-filters { display: flex; gap: 10px; margin: -4px 0 16px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; background: #F1ECE1; }
.analytics-slice-filters label { display: grid; gap: 4px; min-width: 210px; }
.analytics-slice-filters label > span { color: var(--ink-faint); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.analytics-slice-filters select { min-width: 210px; background: var(--paper); }
.analytics-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.analytics-filters label { display: grid; gap: 4px; min-width: 180px; }
.analytics-filters label > span { color: var(--ink-faint); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.analytics-filters select { min-width: 180px; }
.progress-filters label { flex: 1 1 175px; }
.progress-filters select { width: 100%; }
.analytics-comparison-summary { display: flex; align-items: center; justify-content: center; gap: 17px; margin: 4px 0 14px; }
.analytics-comparison-summary span { display: grid; min-width: 135px; text-align: center; color: var(--ink-soft); font-size: 10px; }
.analytics-comparison-summary span b { color: #234A68; font: 500 27px Georgia, serif; }
.analytics-comparison-summary i { color: var(--ink-faint); font-size: 9px; font-style: normal; text-transform: uppercase; }
.analytics-outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }
.analytics-outcome { overflow: hidden; min-height: 120px; border: 1px solid var(--line); border-radius: 7px; }
.analytics-outcome header { display: flex; justify-content: space-between; padding: 9px 10px; background: #EDF3F7; color: #234A68; font-size: 9.5px; font-weight: 850; text-transform: uppercase; }
.analytics-outcome.new header { background: #E9F4EE; color: #216342; }
.analytics-outcome.lost header { background: #FAECEC; color: #8B3539; }
.analytics-outcome.moved header { background: #F8F1DC; color: #765D1C; }
.analytics-outcome > div { display: grid; max-height: 210px; overflow-y: auto; }
.analytics-outcome > div span, .analytics-outcome > div em, .analytics-outcome > small { padding: 5px 10px; border-top: 1px solid var(--line-soft); color: var(--ink-soft); font-size: 9.5px; font-style: normal; }
.analytics-outcome > div em { color: var(--ink-faint); }
.analytics-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
.analytics-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.analytics-table th { padding: 8px 9px; background: var(--ivory-alt); color: var(--ink-faint); font-size: 8px; text-align: left; text-transform: uppercase; }
.analytics-table td { padding: 9px; border-top: 1px solid var(--line-soft); color: var(--ink-soft); font-size: 9.5px; vertical-align: top; }
.analytics-table td:first-child { min-width: 135px; }
.analytics-table td:first-child b, .analytics-table td:first-child small { display: block; }
.analytics-table td:first-child b { color: var(--ink); font-size: 10.5px; }
.analytics-table td:first-child small { margin-top: 2px; color: var(--ink-faint); font-size: 8.5px; }
.student-status { padding: 3px 6px; border-radius: 999px; background: #EEF2F4; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.student-status.active { background: #E7F4EC; color: #286348; }
.student-status.graduated { background: #F6F0E0; color: #725B21; }
.growth-up { color: #267047; }
.growth-down { color: #A53C42; }
.analytics-timeline { display: flex; min-width: 240px; gap: 5px; }
.analytics-timeline > span { display: grid; position: relative; min-width: 74px; padding-left: 10px; color: var(--ink); font-size: 8.5px; }
.analytics-timeline > span i { position: absolute; top: 2px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #527795; }
.analytics-timeline > span small { margin-top: 2px; color: var(--ink-faint); font-size: 7.5px; }
.analytics-source-note { color: var(--ink-faint); font-size: 8.5px; line-height: 1.5; }
.coach-stat-cards { display: grid; grid-template-columns: repeat(3, minmax(145px, 1fr)); gap: 10px; margin-bottom: 13px; }
.coach-stat-cards span { display: grid; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink-soft); font-size: 9.5px; }
.coach-stat-cards b { color: #234A68; font: 500 25px Georgia, serif; }
.achievement-feed { display: grid; }
.achievement-feed > div { display: grid; grid-template-columns: 155px minmax(0, 1fr) 95px; gap: 12px; padding: 8px 3px; border-bottom: 1px solid var(--line-soft); font-size: 9.5px; }
.achievement-feed > div:last-child { border-bottom: 0; }
.achievement-feed time { color: var(--ink-faint); text-align: right; }
.student-progress-history { margin-top: 24px; padding-top: 20px; border-top: 2px solid #234A68; }
.student-progress-history header > span { color: #527795; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.student-progress-history header h2 { margin: 4px 0 13px; font-size: 20px; font-weight: 500; }
.student-semester-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 9px; }
.student-semester-timeline article { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--line); border-top: 3px solid #527795; border-radius: 6px; background: var(--paper); }
.student-semester-timeline time { color: var(--ink-faint); font-size: 8.5px; font-weight: 800; text-transform: uppercase; }
.student-semester-timeline b { font-size: 11px; }
.student-semester-timeline span, .student-semester-timeline small { color: var(--ink-soft); font-size: 9px; }
.student-event-history { margin-top: 11px; border-top: 1px solid var(--line); }
.student-event-history > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--line-soft); font-size: 9.5px; }
.student-event-history time { color: var(--ink-faint); }

@media (max-width: 720px) {
  .analytics-panel { padding: 12px; }
  .analytics-panel-head { align-items: flex-start; flex-direction: column; }
  .analytics-type-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .analytics-type-tabs button { min-width: 0; }
  .coach-status-tabs { grid-template-columns: repeat(3, 1fr); }
  .analytics-bar-row { grid-template-columns: 95px minmax(70px, 1fr) 65px; gap: 7px; }
  .analytics-bar-row > span { font-size: 9px; }
  .camp-analytics-years { grid-template-columns: 1fr; }
  .analytics-filters label { width: 100%; }
  .analytics-filters select { width: 100%; }
  .analytics-slice-filters { flex-direction: column; }
  .analytics-slice-filters label, .analytics-slice-filters select { width: 100%; min-width: 0; }
  .coach-stat-cards { grid-template-columns: 1fr; }
  .achievement-feed > div { grid-template-columns: 1fr; gap: 3px; }
  .achievement-feed time { text-align: left; }
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: radial-gradient(circle at top, var(--paper), var(--ivory-alt));
}
.login-card {
  width: min(410px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(33,28,22,.12);
  padding: 34px;
}
.login-card h1 { margin: 10px 0 6px; font-weight: 400; font-size: 28px; }
.login-card > p { color: var(--ink-soft); margin: 0 0 24px; }
.login-card .field { display: grid; gap: 6px; margin-top: 15px; }
.login-card .field span { font-size: 12px; font-weight: 600; }
.login-card input { width: 100%; }
.login-card .btn { width: 100%; margin-top: 18px; }
.login-logo { width: min(260px, 100%); margin-bottom: 18px; }
.login-error { min-height: 18px; color: var(--rust); font-size: 12px; margin-top: 10px; }
.serif { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.coach-source-badge {
  display: inline-block; margin-left: 7px; padding: 2px 5px; border: 1px solid #A9BDD1;
  border-radius: 4px; color: #274B69; background: #E8F0F6; font-size: 9px; font-weight: 800; vertical-align: middle;
}
.coach-source-badge.core { border-color: #AFC1B0; color: var(--green); background: var(--green-pale); }
.staff-role-picker { display: grid; gap: 6px; min-width: 145px; }
.staff-role-picker label { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
.staff-role-picker input { margin: 0; }
.add-staff-roles { align-self: flex-end; padding: 5px 0; }
.staff-import { display: flex; align-items: flex-end; gap: 6px; padding-right: 10px; border-right: 1px solid var(--line); }
.staff-import .field { min-width: 175px; }

.app-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

/* ---------------- Sidebar ---------------- */
.sidebar {
  background: var(--green-deep);
  color: var(--ivory);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  margin-bottom: 34px;
}
.academy-logo { display: block; height: auto; object-fit: contain; }
.sidebar-logo { width: 100%; border-radius: 4px; }
.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark span:nth-child(odd) { background: var(--ivory); }
.brand-mark span:nth-child(even) { background: var(--brass); }
.brand-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brass);
  font-weight: 600;
}
.brand-name {
  font-size: 18px;
  line-height: 1.2;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  color: rgba(246,241,231,0.72);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { background: rgba(246,241,231,0.08); color: var(--ivory); }
.nav-btn.active { background: rgba(246,241,231,0.14); color: var(--ivory); font-weight: 600; }

.icon { width: 15px; height: 15px; flex-shrink: 0; display: inline-block; position: relative; }
.icon-board { border: 1.5px solid currentColor; border-radius: 3px; }
.icon-board::after {
  content: ""; position: absolute; inset: 2px;
  background:
    linear-gradient(currentColor, currentColor) 0 0/50% 50% no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100%/50% 50% no-repeat;
  opacity: 0.7;
}
.icon-person { border: 1.5px solid currentColor; border-radius: 50%; }
.icon-person::after {
  content: ""; position: absolute; left: 50%; top: 58%; transform: translate(-50%,0);
  width: 9px; height: 5px; border-radius: 4px 4px 0 0; background: currentColor;
}
.icon-person::before {
  content: ""; position: absolute; left: 50%; top: 22%; transform: translate(-50%,-50%);
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.icon-school { border-bottom: 1.5px solid currentColor; }
.icon-school::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%);
  width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-bottom: 8px solid currentColor;
}

.sidebar-foot {
  margin-top: auto;
  font-size: 11px;
  color: rgba(246,241,231,0.45);
  line-height: 1.6;
  padding-top: 18px;
  border-top: 1px solid rgba(246,241,231,0.12);
}
.sidebar-foot span { display: grid; gap: 2px; margin-bottom: 10px; }
.sidebar-foot b { color: var(--ivory); font-size: 12px; overflow-wrap: anywhere; }
.sidebar-foot small { color: rgba(246,241,231,.5); }
.sidebar-signout { padding: 0; border: 0; background: transparent; color: var(--brass); cursor: pointer; font: inherit; }
.sidebar-signout:hover { color: var(--ivory); }

/* ---------------- Main ---------------- */
.main {
  padding: 36px 44px 60px 44px;
  max-width: 1080px;
  position: relative;
}
.view { display: none; }
.view.active { display: block; }

.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 25px; font-weight: 400; margin: 0 0 4px 0; }
.page-head p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }

.save-toast {
  position: fixed;
  top: 22px;
  right: 30px;
  background: var(--green);
  color: var(--ivory);
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}
.save-toast.show { opacity: 1; transform: translateY(0); }
.save-toast.error { background: var(--rust); }

/* ---- Coach schedule view ---- */
.coach-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 30px;
}
.coach-layout.single { grid-template-columns: minmax(0, 1fr); }

.self-availability { margin-top: 22px; }
.self-availability table { width: 100%; border-collapse: collapse; }
.self-availability .coach-editor-row td { padding: 0; border: 0; }
.account-card { margin-top: 24px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.account-card h3 { margin: 0 0 4px; }
.account-card > p { margin: 0 0 16px; color: var(--ink-soft); }
.account-fields { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.account-fields .field { display: grid; gap: 5px; }
.account-fields .field span { font-size: 11px; color: var(--ink-soft); }
.coach-list { display: flex; flex-direction: column; gap: 3px; }
.coach-pill {
  text-align: left;
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.coach-pill:hover { background: var(--ivory-alt); }
.coach-pill.active {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow);
}
.coach-pill .count { font-size: 11px; color: var(--brass); font-weight: 700; }
.coach-empty { font-size: 13px; color: var(--ink-faint); padding: 10px 0; }
.zero-program-coaches {
  display: grid; gap: 5px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.zero-program-coaches > span {
  color: var(--ink-faint); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.zero-program-coach-select { width: 100%; min-width: 0; }

.week-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.week-head h2 { font-size: 22px; font-weight: 400; margin: 0; }
.week-stat { font-size: 12.5px; color: var(--ink-soft); }
.week-stat b { color: var(--green); font-weight: 700; }

.week-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.day-col .day-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-soft); font-weight: 700; margin-bottom: 9px;
  padding-bottom: 7px; border-bottom: 2px solid var(--line);
}
.slot-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; margin-bottom: 9px; box-shadow: var(--shadow);
}
.slot-card .prog { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.slot-card .time { font-size: 12px; color: var(--green); }
.slot-card .withwho { font-size: 11px; color: var(--ink-soft); margin-top: 5px; }
.core-calendar-slot { border-left: 4px solid var(--brass); }
.core-calendar-badge {
  display: inline-block; margin-bottom: 5px; padding: 2px 6px; border-radius: 999px;
  background: var(--brass-pale); color: #765514; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.core-calendar-location { margin-bottom: 3px; color: var(--ink-soft); font-size: 10.5px; }
.day-empty { font-size: 12px; color: var(--ink-faint); padding: 8px 0; }

/* ---- Shared admin bits ---- */
.toolbar {
  display: flex; gap: 10px; align-items: center; margin-bottom: 24px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); flex-wrap: wrap;
}
.toolbar .field-label { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; display: block; }
.toolbar .field { display: flex; flex-direction: column; }

input[type="text"], input[type="number"], select {
  font-family: inherit; font-size: 13.5px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--ivory); color: var(--ink);
}
input[type="text"]:focus, input[type="number"]:focus, select:focus {
  outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green);
}
input.num-sm { width: 64px; }

button {
  font-family: inherit; cursor: pointer;
}
.btn {
  font-size: 13px; font-weight: 600; padding: 8px 15px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--ivory); color: var(--ink-soft);
}
.btn:hover { border-color: var(--green); color: var(--ink); }
.btn-primary { background: var(--green); border-color: var(--green); color: var(--ivory); }
.btn-primary:hover { background: var(--green-deep); color: var(--ivory); }
.btn-danger { background: var(--rust-pale); border-color: var(--rust-pale); color: var(--rust); }
.btn-danger:hover { border-color: var(--rust); }
.btn-ghost { background: transparent; border-color: transparent; padding: 6px 9px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---- Manage coaches ---- */
.coach-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.coach-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); font-weight: 700; padding: 10px 16px; background: var(--ivory-alt);
  border-bottom: 1px solid var(--line);
}
.coach-table td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: middle; }
.coach-table tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.coach-directory-nav {
  display: flex; align-items: flex-end; gap: 10px; margin: -8px 0 18px;
  padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--ivory-alt);
}
.coach-directory-nav .coach-all-view { min-height: 43px; }
.coach-directory-nav .coach-all-view span {
  display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 6px;
  border-radius: 999px; background: rgba(255,255,255,.18); font-size: 10px;
}
.coach-directory-nav .semester-control { min-width: min(320px, 100%); }
.add-staff-card {
  display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 22px;
  margin-bottom: 16px; padding: 15px 17px; border-left: 4px solid var(--brass); background: var(--brass-pale);
}
.add-staff-card > div:first-child > span { color: #765514; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.add-staff-card h2 { margin: 3px 0 0; font-size: 18px; font-weight: 500; }
.add-staff-form { display: flex; align-items: flex-end; justify-content: flex-end; gap: 9px; }
.add-staff-form .field { min-width: 135px; }
.add-staff-form .staff-role-picker { grid-template-columns: repeat(2, auto); gap: 4px 11px; }
.coach-directory-table { min-width: 1050px; }
.coach-directory-table th:first-child { width: 19%; }
.coach-directory-table th:nth-child(2) { width: 22%; }
.coach-directory-table th:nth-child(3) { width: 14%; }
.coach-directory-table th:nth-child(4) { width: 30%; }
.coach-directory-table th:last-child { width: 15%; }
.coach-directory-table td:nth-child(2), .semester-coach-table td:nth-child(3) { display: grid; gap: 3px; }
.coach-directory-table td:nth-child(2) a { color: var(--green-deep); overflow-wrap: anywhere; }
.coach-directory-person { display: grid; gap: 3px; }
.coach-directory-person b { font-size: 13px; }
.coach-directory-person .mono { color: var(--ink-soft); font-size: 9.5px; }
.profile-location-list { display: flex; gap: 4px; flex-wrap: wrap; }
.profile-location-list span {
  padding: 3px 6px; border: 1px solid #AFC1B0; border-radius: 999px;
  background: var(--green-pale); color: var(--green-deep); font-size: 9.5px; white-space: nowrap;
}
.profile-location-list em { color: var(--ink-faint); font-size: 10px; font-style: normal; }
.coach-directory-table .staff-role-picker { grid-template-columns: repeat(2, minmax(95px, 1fr)); min-width: 225px; }
.staff-role-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.staff-role-badge {
  padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--ivory-alt); color: var(--ink-soft); font-size: 9px; font-weight: 800;
}
.staff-role-badge.role-coach { border-color: #AFC1B0; background: var(--green-pale); color: var(--green-deep); }
.staff-role-badge.role-art { border-color: #D6A6B5; background: #F9EDF1; color: #7F3450; }
.staff-role-badge.role-math { border-color: #A9BDD1; background: #E8F0F6; color: #274B69; }
.staff-role-badge.role-admin { border-color: #D7BD76; background: var(--brass-pale); color: #765514; }
.semester-staff-import {
  justify-content: flex-start; width: 100%; margin-bottom: 14px; padding: 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.semester-staff-import .field { width: min(460px, 100%); }
.semester-coach-table { min-width: 1120px; }
.semester-coach-table th:first-child { width: 16%; }
.semester-coach-table th:nth-child(2) { width: 17%; }
.semester-coach-table th:nth-child(3) { width: 18%; }
.semester-coach-table th:nth-child(4) { width: 12%; }
.semester-coach-table th:nth-child(5) { width: 27%; }
.semester-coach-table th:last-child { width: 10%; }
.semester-coach-table td small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 9.5px; }
.coach-profile-editor { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.coach-profile-editor > div:first-child p { margin: 3px 0 11px; color: var(--ink-soft); font-size: 11px; }
.coach-profile-fields {
  display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(245px, 1.5fr) auto;
  align-items: end; gap: 9px;
}
.coach-profile-fields .field { min-width: 0; }
.coach-profile-fields .field input { width: 100%; }
.profile-location-picker {
  display: flex; align-items: center; gap: 12px; min-height: 38px; margin: 0;
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper);
}
.profile-location-picker legend { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.profile-location-picker label { display: flex; align-items: center; gap: 4px; font-size: 10px; white-space: nowrap; }

/* ---- Manage programs ---- */
.program-block {
  margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--paper); box-shadow: var(--shadow);
}
.program-title-row {
  background: var(--green); color: var(--ivory); padding: 13px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.program-title-row input[type="text"] {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); color: var(--ivory);
  font-size: 15px; font-weight: 600; font-family: Georgia, serif; padding: 4px 8px;
}
.program-title-row input[type="text"]:focus { border-color: var(--ivory); outline: none; }

.session-table { width: 100%; border-collapse: collapse; }
.session-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-soft); font-weight: 700; padding: 9px 16px; border-bottom: 1px solid var(--line);
}
.session-table td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: top; }
.session-table tr:last-child td { border-bottom: none; }
.session-table tr.inactive td { color: var(--ink-faint); }

.coach-tags { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 8px; }
.coach-assignment { display: flex; flex-direction: column; }
.coach-tag {
  background: var(--ivory-alt); border: 1px solid var(--line); border-radius: 5px;
  padding: 3px 6px 3px 9px; font-size: 11.5px; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 7px;
}
.coach-tag button {
  border: none; background: none; color: var(--rust); font-size: 13px; line-height: 1;
  padding: 0; cursor: pointer; font-weight: 700;
}
.assign-dates-toggle {
  border: 1px solid var(--line); background: var(--paper); color: var(--green); font-size: 10.5px;
  font-weight: 700; padding: 2px 7px; border-radius: 999px; cursor: pointer;
}
.assign-dates-toggle:hover { border-color: var(--green); }
.assign-row { display: flex; gap: 6px; align-items: center; }
.assign-row select { font-size: 12px; padding: 5px 7px; }

/* ---- Session cards (Manage programs) ---- */
.session-list { display: flex; flex-direction: column; }
.session-card { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.session-card:last-child { border-bottom: none; }
.session-card.inactive { background: var(--ivory-alt); }
.session-card.inactive .session-top,
.session-card.inactive .dates-row,
.session-card.inactive .coaches-row { opacity: 0.55; }

.session-top { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.session-top .field { display: flex; flex-direction: column; gap: 3px; }
.session-top .field label {
  font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em;
}
.runs-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; padding-bottom: 7px; }

.dates-row { margin-bottom: 10px; }
.dates-toggle {
  border: 1px solid var(--line); background: var(--ivory); color: var(--ink-soft);
  font-size: 12px; padding: 6px 11px; border-radius: 7px; cursor: pointer; font-family: inherit;
}
.dates-toggle:hover { border-color: var(--green); color: var(--ink); }
.dates-toggle b { color: var(--green); font-weight: 700; }

.dates-panel {
  margin-top: 9px; padding: 12px 14px; background: var(--ivory); border: 1px solid var(--line);
  border-radius: 8px;
}
.assign-dates-panel { margin-left: 2px; margin-bottom: 2px; }
.dates-panel-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px;
  font-size: 11.5px; color: var(--ink-soft); font-weight: 600;
}
.dates-panel-actions { display: flex; gap: 5px; }
.dates-panel-actions .btn { border-color: var(--line); }

.dates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.date-chip {
  display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  padding: 5px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-soft); cursor: pointer; user-select: none;
}
.date-chip input { margin: 0; cursor: pointer; }
.date-chip.checked { border-color: var(--green); background: var(--green-pale); color: var(--green-deep); font-weight: 600; }

.coaches-row { display: flex; flex-direction: column; gap: 8px; }

.add-session-row {
  display: flex; gap: 8px; align-items: flex-end; padding: 14px 16px;
  background: var(--ivory-alt); border-top: 1px solid var(--line); flex-wrap: wrap;
}
.add-session-row .field { display: flex; flex-direction: column; gap: 3px; }
.add-session-row .field label { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }

.empty-state {
  text-align: center; padding: 40px 20px; color: var(--ink-faint); font-size: 13.5px;
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius);
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .coach-layout { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: 1fr 1fr; }
  .main { padding: 24px; }
}

@media (max-width: 980px) {
  .account-fields { grid-template-columns: 1fr 1fr; }
}

/* ---------------- Semester scheduling update ---------------- */
.main { max-width: 1600px; width: 100%; min-width: 0; }
.icon-calendar { border: 1.5px solid currentColor; border-radius: 2px; }
.icon-calendar::before { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; border-top: 1px solid currentColor; }
.icon-calendar::after { content: ""; position: absolute; width: 2px; height: 2px; background: currentColor; left: 3px; top: 7px; box-shadow: 4px 0 currentColor, 8px 0 currentColor, 0 4px currentColor, 4px 4px currentColor; }

input[type="time"], input[type="date"] {
  font-family: inherit; font-size: 13px; padding: 7px 8px; min-height: 34px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--ivory); color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--green); outline-offset: 1px; }
button:disabled, .btn:disabled { opacity: .42; cursor: not-allowed; }
[hidden] { display: none !important; }
.muted, .hint { color: var(--ink-faint); font-size: 12px; }
.toolbar-spacer { flex: 1; }

.semester-control { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.semester-control > span, .field > span, .program-name-field {
  color: var(--ink-soft); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.schedule-toolbar {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 25px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow);
}
.week-switcher { display: flex; align-items: center; gap: 7px; flex: 1; }
.week-switcher strong { margin-left: 5px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.export-btn { text-decoration: none; white-space: nowrap; }

.calendar-wrap { min-width: 0; overflow-x: auto; padding-bottom: 8px; }
.week-calendar { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); gap: 8px; min-width: 880px; }
.calendar-day { min-height: 220px; border: 1px solid var(--line); border-radius: 9px; background: rgba(251,248,241,.48); padding: 8px; }
.calendar-day.outside { opacity: .42; background: var(--ivory-alt); }
.calendar-day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 1px 2px 8px; margin-bottom: 8px; border-bottom: 2px solid var(--line); }
.calendar-day-head span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 800; }
.calendar-day-head b { font-size: 12px; color: var(--green); }
.calendar-day .slot-card { padding: 9px; }
.calendar-day .slot-card .time { font-size: 11px; }
.calendar-day .slot-card.staffing-short { border-left: 4px solid var(--rust); }
.calendar-day .slot-card.staffing-over { border-left: 4px solid var(--brass); }
.staff-badge { display: inline-block; margin-top: 6px; border-radius: 999px; padding: 2px 7px; font-size: 10px; font-weight: 800; }
.staff-badge.ok { color: var(--green); background: var(--green-pale); }
.staff-badge.short { color: var(--rust); background: var(--rust-pale); }
.staff-badge.over { color: #765514; background: var(--brass-pale); }
.alert-count { min-width: 21px; height: 21px; padding: 2px 6px; display: grid; place-items: center; color: var(--rust); background: var(--rust-pale); border-radius: 999px; font-size: 10px; font-weight: 800; }
.all-staffed { color: #dce9dc; font-size: 11px; font-weight: 700; }
.week-head .all-staffed { color: var(--green); }
.program-alert { color: #fff; background: var(--rust); padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; white-space: nowrap; }

.table-scroll { overflow-x: auto; border-radius: var(--radius); }
.availability-table { min-width: 980px; }
.availability-table th:nth-child(1), .availability-table th:nth-child(2) { width: 150px; }
.availability-table th:last-child { width: 155px; }
.availability-summary { display: flex; gap: 4px; flex-wrap: wrap; }
.availability-chip { display: inline-flex; flex-direction: column; min-width: 74px; padding: 4px 6px; border: 1px solid var(--line); background: var(--green-pale); border-radius: 5px; font-size: 9px; color: var(--green-deep); }
.availability-chip b { font-size: 9px; }
.availability-chip.off { color: var(--ink-faint); background: var(--ivory-alt); }
.exception-count { color: var(--rust); font-size: 10.5px; margin-top: 6px; }
.coach-editor-row > td { padding: 0 !important; background: var(--ivory); }
.availability-editor { padding: 20px 22px 22px; border-top: 2px solid var(--brass); }
.availability-editor h3 { margin: 0 0 4px; font: 600 16px Georgia, serif; }
.availability-editor > p { margin: 0 0 13px; color: var(--ink-soft); font-size: 12px; }
.availability-week { display: grid; grid-template-columns: repeat(7, minmax(125px, 1fr)); gap: 7px; margin-bottom: 12px; }
.availability-day { padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.availability-day > label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; }
.availability-day > div { display: flex; flex-direction: column; gap: 3px; color: var(--ink-faint); text-align: center; font-size: 10px; }
.availability-day input[type="time"] { min-width: 0; width: 100%; font-size: 11px; padding: 5px; }
.exceptions-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.exception-form { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.exception-form .exception-note { flex: 1; min-width: 170px; }
.exception-list { margin-top: 12px; display: grid; gap: 6px; }
.exception-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); font-size: 12px; }

.semester-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin: -10px 0 22px; padding: 16px; background: var(--brass-pale); border: 1px solid var(--brass); border-radius: var(--radius); }
.semester-form .field { display: flex; flex-direction: column; gap: 4px; }
.semester-form > .semester-type-help { flex-basis: 100%; margin-top: -4px; color: var(--ink-soft); font-size: 9.5px; line-height: 1.3; }
.programs-list { display: grid; gap: 14px; }
.program-block { margin-bottom: 0; }
.program-title-row { gap: 13px; }
.program-collapse { width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.3); border-radius: 5px; color: white; background: transparent; font-size: 16px; flex: 0 0 auto; }
.program-title { min-width: 130px; flex: 1; }
.program-title h2 { margin: 0; font: 600 17px Georgia, serif; }
.program-title > span { display: block; margin-top: 3px; color: rgba(255,255,255,.68); font-size: 10.5px; }
.program-actions { display: flex; gap: 6px; }
.program-title-row .btn:not(.btn-danger) { color: var(--green-deep); background: var(--ivory); }
.program-editor { padding: 19px; }
.program-editor > h3 { margin: 24px 0 10px; font: 600 17px Georgia, serif; }
.program-name-field { display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.program-name-field input { font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.program-bulk-staff {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 13px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--ivory-alt);
}
.program-bulk-staff > div > span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.program-bulk-staff-list { display: flex; flex-wrap: wrap; gap: 6px; }
.program-bulk-staff-list label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 10px; }
.program-bulk-staff input, .tournament-director-tag input, .core-hired-coaches input, .camp-staff-check { width: 14px; height: 14px; margin: 0; accent-color: var(--rust); }

.semester-calendar { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.month-calendar { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--ivory); }
.month-calendar h4 { margin: 0; padding: 9px 10px; background: var(--ivory-alt); font: 600 14px Georgia, serif; }
.month-weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-weekdays span { padding: 5px 2px; text-align: center; color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.month-cell { min-height: 48px; padding: 4px; border-top: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); background: var(--paper); font-size: 10px; overflow: hidden; }
.month-cell:nth-child(7n) { border-right: 0; }
.month-cell.blank, .month-cell.outside { background: var(--ivory-alt); opacity: .45; }
.month-cell.has-alert { box-shadow: inset 3px 0 var(--rust); }
.month-cell > b { display: block; color: var(--ink-soft); margin-bottom: 2px; }
.calendar-session { display: block; margin-top: 2px; padding: 2px 3px; border-radius: 3px; color: var(--green-deep); background: var(--green-pale); font-size: 8.5px; white-space: nowrap; }
.calendar-session.short { color: var(--rust); background: var(--rust-pale); }
.calendar-session.over { color: #765514; background: var(--brass-pale); }
.calendar-session em { font-style: normal; font-weight: 800; }

.session-card { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 9px; }
.session-card:last-child { border-bottom: 1px solid var(--line); }
.session-top .field { display: flex; flex-direction: column; gap: 3px; }
.session-top .field > span { font-size: 10px; }
.session-alert, .session-ok { margin: -3px 0 10px; padding: 6px 9px; border-radius: 5px; font-size: 11.5px; }
.session-alert { color: var(--rust); background: var(--rust-pale); }
.session-ok { color: var(--green); background: var(--green-pale); }
.date-chip.disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.date-chip span { white-space: nowrap; }
.coach-tag { width: fit-content; }
.coach-tag .remove-coach { color: var(--rust); background: none; border: none; font-size: 16px; }
.assign-coach { max-width: 310px; }

/* ---- Tournament scheduling ---- */
.tournament-sync-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--green-pale);
}
.tournament-sync-band > div { display: grid; gap: 3px; }
.tournament-sync-band span { color: var(--ink-soft); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.tournament-sync-band b { font-size: 12px; }
.tournament-role-notice { padding: 11px 16px; border: 1px solid var(--brass); background: var(--brass-pale); color: var(--ink-soft); font-size: 12px; }
.tournament-table { width: 100%; min-width: 1040px; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); }
.tournament-table th { padding: 10px 12px; background: var(--green-deep); color: var(--ivory); text-align: left; font-size: 10px; text-transform: uppercase; }
.tournament-table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 12px; }
.tournament-table td:first-child { width: 120px; }
.tournament-table td:nth-child(2) { width: 180px; }
.tournament-table td:nth-child(3) { width: 170px; color: var(--ink-soft); }
.tournament-table td:nth-child(4) { width: 90px; }
.tournament-table td:nth-child(5) { width: 115px; }
.tournament-table td:nth-child(6) { width: 180px; }
.tournament-table td > b, .tournament-table td > span, .tournament-table td > small { display: block; }
.tournament-table td:first-child span, .tournament-table td small { margin-top: 4px; color: var(--ink-faint); font-size: 10px; }
.tournament-table td > a { color: var(--green-deep); font-weight: 700; text-decoration-color: var(--brass); }
.tournament-missing td:not(:last-child) { opacity: .58; }
.tournament-directors { display: flex; flex-wrap: wrap; gap: 5px; }
.tournament-director-tag { display: inline-flex !important; align-items: center; gap: 3px; padding: 4px 5px 4px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--ivory-alt); }
.tournament-directors + .bulk-remove-program-staff { margin-top: 7px; }
.remove-director { border: 0; background: transparent; color: var(--rust); cursor: pointer; font-size: 16px; line-height: 1; }
.tournament-staff-alert, .tournament-staff-ok { margin-top: 7px; font-size: 10px; font-weight: 700; }
.tournament-staff-alert { color: var(--rust); }
.tournament-staff-ok { color: var(--green); }
.tournament-hire { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tournament-hire select { min-width: 120px; max-width: 150px; }
.tournament-participants { width: 70px; }
.tournament-requirement { display: inline-flex; align-items: center; gap: 8px; }
.tournament-requirement strong { min-width: 20px; text-align: center; }
.tournament-requirement .btn { width: 30px; padding-right: 0; padding-left: 0; }
.empty-inline { padding: 15px; color: var(--ink-faint); }

/* ---------------- Summer camp ---------------- */
.semester-type-badge {
  align-self: flex-end; margin-right: auto; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 5px; color: var(--green-deep); background: var(--green-pale); font-size: 11px; font-weight: 800;
}
.program-toolbar > .semester-type-badge,
.program-toolbar > #toggle-semester,
.program-toolbar > #delete-semester {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 140px;
  width: 140px;
  min-height: 36px;
  height: 36px;
  white-space: nowrap;
}
.camp-import-band {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 8px 0 14px; padding: 11px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ivory-alt);
}
.camp-import-source { display: grid; min-width: 0; gap: 2px; }
.camp-import-source > span { color: var(--ink-faint); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.camp-import-source b { overflow-wrap: anywhere; font-size: 12px; }
.camp-import-source small { color: var(--ink-soft); font-size: 10px; }
.camp-upload-drop {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: min(390px, 50%);
  padding: 7px 8px 7px 11px; border: 1px dashed #6F8EA7; border-radius: 7px; background: #F3F7FA; cursor: pointer;
}
.camp-upload-drop:focus, .camp-upload-drop.dragging { outline: 2px solid #527795; outline-offset: 2px; background: #E8F0F6; }
.camp-upload-drop.disabled { opacity: .58; cursor: not-allowed; }
.camp-upload-drop > span { min-width: 0; overflow-wrap: anywhere; color: #274B69; font-size: 11px; font-weight: 700; }
.camp-upload-errors { margin: -5px 0 14px; padding: 10px 12px; border-left: 3px solid var(--rust); background: var(--rust-pale); color: var(--rust); font-size: 11px; }
.camp-upload-errors b { display: block; margin-bottom: 4px; }
.camp-upload-errors ul { margin: 0; padding-left: 18px; }
.camp-upload-errors li { margin: 2px 0; overflow-wrap: anywhere; }
.camp-upload-review { margin: -5px 0 18px; padding: 14px 0; border-top: 2px solid #527795; border-bottom: 1px solid #A9BDD1; }
.camp-review-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 3px 11px; }
.camp-review-head > div:first-child { min-width: 0; }
.camp-review-head span { color: #527795; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.camp-review-head h3 { margin: 2px 0; font: 600 18px Georgia, serif; }
.camp-review-head p { margin: 0; color: var(--ink-soft); font-size: 10.5px; overflow-wrap: anywhere; }
.camp-review-counts { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.camp-review-counts span { min-width: 92px; padding: 6px 8px; border-left: 2px solid #527795; background: #E8F0F6; color: #274B69; font-size: 10px; text-transform: none; }
.camp-review-counts b { font-size: 13px; }
.camp-review-additions { margin-bottom: 9px; padding: 7px 10px; border-left: 3px solid var(--green); background: var(--green-pale); color: var(--green-deep); font-size: 11px; }
.camp-review-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.camp-review-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.camp-review-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--ivory-alt); color: var(--ink-soft); font-size: 9px; text-align: left; text-transform: uppercase; }
.camp-review-table th:nth-child(1) { width: 14%; }
.camp-review-table th:nth-child(2) { width: 25%; }
.camp-review-table th:nth-child(3) { width: 10%; }
.camp-review-table th:nth-child(4) { width: 16%; }
.camp-review-table th:nth-child(5) { width: 35%; }
.camp-review-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); font-size: 11px; overflow-wrap: anywhere; }
.camp-review-table tr:last-child td { border-bottom: 0; }
.camp-change-type { display: inline-block; padding: 3px 5px; border-radius: 4px; font-size: 9px; font-weight: 800; }
.camp-change-type.removal { color: var(--rust); background: var(--rust-pale); }
.camp-change-type.time { color: #274B69; background: #E8F0F6; }
.camp-review-table td:last-child { display: flex; align-items: center; gap: 7px; }
.core-review-table th:nth-child(1) { width: 11%; }
.core-review-table th:nth-child(2) { width: 17%; }
.core-review-table th:nth-child(3) { width: 28%; }
.core-review-table th:nth-child(4) { width: 28%; }
.core-review-table th:nth-child(5) { width: 16%; }
.core-review-table td:last-child { display: table-cell; }
.camp-time-arrow { color: #527795; font-size: 13px; }
.camp-review-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 11px; }
.camp-overview-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin: 8px 0 12px; padding: 0 2px 15px; border-bottom: 2px solid var(--green);
}
.camp-overview-head h2 { margin: 0 0 3px; font-size: 20px; font-weight: 500; }
.camp-overview-head p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.camp-total { display: flex; align-items: baseline; gap: 7px; color: var(--ink-soft); font-size: 11px; }
.camp-total b { color: var(--green); font: 600 22px Georgia, serif; }
.camp-weeks { border-bottom: 1px solid var(--line); }
.camp-week-band {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.camp-week-band:first-child { border-top: 0; }
.camp-week-label { padding: 8px 2px; }
.camp-week-label b { display: block; margin-bottom: 4px; font: 600 16px Georgia, serif; }
.camp-week-label span { color: var(--ink-soft); font-size: 11px; }
.camp-locations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.camp-location-card { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.camp-location-head { display: flex; align-items: center; min-height: 58px; padding: 8px 9px 8px 4px; }
.camp-slot-toggle {
  min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; padding: 5px 7px;
  border: 0; background: transparent; color: var(--ink); text-align: left;
}
.camp-slot-toggle > span:last-child { display: grid; min-width: 0; gap: 2px; }
.camp-slot-toggle b { overflow-wrap: anywhere; font-size: 13px; }
.camp-slot-toggle small { color: var(--ink-soft); font-size: 10.5px; }
.camp-disclosure { width: 13px; color: var(--green); font-size: 12px; flex: 0 0 auto; }
.camp-location-actions { display: flex; align-items: center; gap: 7px; }
.camp-hired-count { white-space: nowrap; color: var(--brass); font-size: 10.5px; font-weight: 800; }
.camp-staff-list { border-top: 1px solid var(--line); background: var(--ivory); }
.camp-bulk-staff { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 11px; border-bottom: 1px solid var(--line); background: var(--ivory-alt); }
.camp-bulk-staff > span { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.camp-staff-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
.camp-staff-row:last-child { border-bottom: 0; }
.camp-staff-info { display: grid; min-width: 0; gap: 2px; }
.camp-staff-row b { font-size: 12px; }
.camp-staff-row span { color: var(--green); font-size: 10.5px; }
.camp-staff-row small { color: var(--ink-soft); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.camp-hire-controls { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex: 0 0 auto; }
.camp-hire-controls input { width: 91px; min-height: 30px; padding: 4px 5px; font-size: 10px; }
.camp-hire-controls > span { color: var(--ink-soft); font-size: 9px; }
.camp-hire-controls .btn { white-space: nowrap; }

.camp-dashboard-top { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--green); }
.camp-dashboard-top > div:nth-child(2) { min-width: 190px; }
.camp-dashboard-top h1 { margin: 2px 0 0; font-size: 24px; font-weight: 500; }
.camp-dashboard-top p { margin: 4px 0 0; color: var(--ink-soft); }
.camp-dashboard-eyebrow { color: var(--ink-soft); font-size: 10.5px; font-weight: 800; text-transform: uppercase; }
.camp-dashboard-stats { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.camp-dashboard-stats span { min-width: 84px; padding: 7px 9px; border-left: 2px solid var(--brass); background: var(--brass-pale); font-size: 10.5px; }
.camp-dashboard-stats b { color: var(--ink); font-size: 13px; }
.camp-dashboard-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.camp-sort-button { flex: 0 0 auto; white-space: nowrap; }
.camp-export-button { flex: 0 0 auto; white-space: nowrap; }
.camp-dashboard-toolbar { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.camp-view-tabs { display: inline-grid; grid-template-columns: repeat(4, minmax(112px, 1fr)); width: min(520px, 100%); overflow-x: auto; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--ivory-alt); }
.camp-view-tab { height: 34px; border: 0; border-radius: 5px; background: transparent; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.camp-view-tab.active { color: var(--ivory); background: var(--green); }
.camp-hired-list { display: flex; align-items: center; gap: 5px; min-width: 0; flex-wrap: wrap; }
.camp-hired-list span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--green-deep); font-size: 10.5px; }
.camp-hired-list em { color: var(--ink-faint); font-size: 11px; }
.camp-add-student { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ivory-alt); }
.camp-add-student .field { display: grid; gap: 4px; width: min(410px, 100%); }
.camp-add-student .field span { color: var(--ink-soft); font-size: 10.5px; font-weight: 800; text-transform: uppercase; }
.camp-roster-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.camp-roster-table { width: 100%; min-width: 1080px; border-collapse: collapse; table-layout: fixed; }
.camp-roster-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--ivory-alt); color: var(--ink-soft); font-size: 9.5px; text-align: left; text-transform: uppercase; }
.camp-roster-table th:first-child { width: 4%; min-width: 38px; padding-right: 5px; padding-left: 9px; text-align: center; }
.camp-roster-table th:nth-child(2) { min-width: 170px; }
.camp-roster-table th:last-child { width: 3%; }
.camp-roster-classes th:nth-child(2) { width: 16%; }
.camp-roster-classes th:nth-child(3) { width: 8%; }
.camp-roster-classes th:nth-child(4) { width: 10%; }
.camp-roster-classes th:nth-child(5) { width: 9%; }
.camp-roster-classes th:nth-child(6) { width: 10%; }
.camp-roster-classes th:nth-child(7) { width: 24%; }
.camp-roster-classes th:nth-child(8) { width: 16%; }
.camp-roster-sports th:nth-child(2) { width: 18%; }
.camp-roster-sports th:nth-child(3) { width: 9%; }
.camp-roster-sports th:nth-child(4) { width: 7%; }
.camp-roster-sports th:nth-child(5) { width: 10%; }
.camp-roster-sports th:nth-child(6) { width: 28%; }
.camp-roster-sports th:nth-child(7) { width: 21%; }
.camp-roster-afternoonChess th:nth-child(2) { width: 17%; }
.camp-roster-afternoonChess th:nth-child(3) { width: 9%; }
.camp-roster-afternoonChess th:nth-child(4) { width: 10%; }
.camp-roster-afternoonChess th:nth-child(5) { width: 8%; }
.camp-roster-afternoonChess th:nth-child(6) { width: 10%; }
.camp-roster-afternoonChess th:nth-child(7) { width: 10%; }
.camp-roster-afternoonChess th:nth-child(8) { width: 29%; }
.camp-roster-extracurricular th:nth-child(2) { width: 18%; }
.camp-roster-extracurricular th:nth-child(3) { width: 10%; }
.camp-roster-extracurricular th:nth-child(4) { width: 10%; }
.camp-roster-extracurricular th:nth-child(5) { width: 10%; }
.camp-roster-extracurricular th:nth-child(6) { width: 45%; }
.camp-roster-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; vertical-align: top; overflow-wrap: anywhere; }
.camp-roster-table tr:last-child td { border-bottom: 0; }
.camp-roster-table td b { font-size: 12px; }
.camp-roster-table td small { display: block; margin-top: 2px; color: var(--ink-faint); font-size: 9.5px; }
.camp-roster-table select { width: 100%; min-width: 0; padding: 5px 7px; font-size: 11px; }
.camp-student-notes { color: var(--ink-soft); line-height: 1.4; }
.camp-remove-student { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 4px; background: var(--rust-pale); color: var(--rust); font-size: 17px; }
.camp-floor-select { min-width: 94px !important; }
.camp-category-input { width: 72px; min-height: 30px; padding: 5px 7px; }
.camp-auto-category { color: var(--green-deep); font-weight: 800; text-align: center; }
.camp-category-staff { margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--green); }
.camp-category-staff-head { margin-bottom: 10px; }
.camp-category-staff-head > span { color: var(--ink-soft); font-size: 9.5px; font-weight: 800; text-transform: uppercase; }
.camp-category-staff-head h2 { margin: 2px 0 0; font-size: 20px; font-weight: 500; }
.camp-category-table { width: 100%; min-width: 800px; border-collapse: collapse; table-layout: fixed; }
.camp-category-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--ivory-alt); color: var(--ink-soft); font-size: 9.5px; text-align: left; text-transform: uppercase; }
.camp-category-table th:first-child { width: 105px; }
.camp-category-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.camp-category-table tr:last-child td { border-bottom: 0; }
.camp-category-table td b { display: block; font-size: 13px; }
.camp-category-table td small { color: var(--ink-faint); font-size: 9.5px; }
.camp-category-table select { width: 100%; min-width: 130px; padding: 5px 7px; font-size: 11px; }

.camp-select-cell { width: 38px; padding-right: 5px !important; padding-left: 9px !important; text-align: center; }
.camp-student-check, .camp-select-all { width: 15px !important; height: 15px; accent-color: var(--green); }
.camp-bulk-tools { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 11px; border: 1px solid var(--line); border-bottom: 0; background: #E8EFEA; flex-wrap: wrap; }
.camp-bulk-tools > b { min-width: 78px; color: var(--green-deep); font-size: 11px; }
.camp-bulk-tools label { display: flex; align-items: center; gap: 6px; }
.camp-bulk-tools label > span { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.camp-bulk-tools select, .camp-bulk-tools input { width: 135px; min-height: 30px; padding: 4px 7px; font-size: 11px; }
.camp-bulk-tools .camp-uscf-id { width: 112px; }
.camp-uscf-apply { white-space: nowrap; }
.camp-level-progress { position: relative; }
.camp-level-select.mismatch { color: #B42318; border-color: #D37A72; font-weight: 800; }
.camp-level-display { display: inline-flex; align-items: center; min-width: 72px; min-height: 30px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); font-size: 11px; }
.camp-level-display.mismatch { color: #B42318; border-color: #D37A72; font-weight: 800; }
.camp-progress-tooltip { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; display: none; width: min(430px, 70vw); max-height: 340px; overflow-y: auto; padding: 10px 12px; border: 1px solid #A9BDD1; border-radius: 6px; background: #132A3A; color: #fff; box-shadow: 0 12px 28px rgba(15,27,36,.25); }
.camp-level-progress:hover .camp-progress-tooltip, .camp-level-progress:focus-within .camp-progress-tooltip { display: block; }
.camp-progress-tooltip > strong { display: block; margin-bottom: 6px; color: #F2D47B; font-size: 11px; }
.camp-progress-tooltip > div { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 10px; line-height: 1.3; }
.camp-progress-tooltip > div b { color: #B8DAF2; text-align: right; }
.camp-progress-tooltip p { margin: 0; font-size: 10px; }
.camp-category-staff-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.camp-category-staff-head > div > span { color: var(--ink-soft); font-size: 9.5px; font-weight: 800; text-transform: uppercase; }
.camp-staff-mode { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--ivory-alt); }
.camp-staff-mode button { min-height: 30px; padding: 4px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.camp-staff-mode button.active { background: var(--green); color: #fff; }
.camp-assignment-summary { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--green); }
.camp-assignment-summary > div:first-child > span, .camp-staffing-alerts > div:first-child > span { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.camp-assignment-summary h2, .camp-staffing-alerts h2 { margin: 3px 0 0; font-size: 19px; font-weight: 500; }
.camp-coach-counts { display: flex; gap: 7px; flex-wrap: wrap; }
.camp-coach-count { display: grid; gap: 6px; min-width: 140px; padding: 7px 9px; border-left: 3px solid var(--green); background: var(--ivory-alt); font-size: 10px; }
.camp-coach-count > span { display: flex; align-items: baseline; gap: 5px; }
.camp-coach-count select { min-width: 120px; padding: 5px 7px; font-size: 10px; }
.camp-coach-counts .unassigned { display: flex; align-items: baseline; gap: 5px; min-width: 112px; padding: 7px 9px; border-left: 3px solid var(--rust); background: var(--ivory-alt); font-size: 10px; }
.camp-coach-counts b { font-size: 15px; }
.camp-staffing-alerts { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px 18px; margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--rust); }
.camp-staffing-alerts > div:first-child { grid-row: 1 / span 20; }
.camp-staffing-alerts article { border-top: 1px solid var(--line); padding-top: 9px; }
.camp-staffing-alerts article header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 10.5px; }
.camp-staffing-alerts article header span { color: var(--rust); font-weight: 800; }
.camp-staffing-alerts article label { display: grid; grid-template-columns: minmax(140px, 1fr) 210px; align-items: center; gap: 8px; padding: 4px 0; font-size: 10px; }
.camp-staffing-alerts select { padding: 5px 7px; font-size: 10px; }

.camp-coach-calendar { min-width: 0; }
.camp-coach-week { display: grid; grid-template-columns: 160px 110px 130px minmax(180px, 1fr); align-items: center; gap: 12px; padding: 12px 3px; border-top: 1px solid var(--line); }
.camp-coach-week > div:first-child { display: grid; gap: 2px; }
.camp-coach-week > div:first-child span, .camp-coach-week small { color: var(--ink-soft); font-size: 10px; }
.camp-week-exceptions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.camp-week-exceptions em { padding: 4px 7px; border-left: 2px solid var(--rust); background: var(--rust-pale); color: var(--rust); font-size: 9.5px; font-style: normal; }
.camp-coach-management { border-top: 2px solid var(--green); }
.camp-coach-manage-row { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.camp-coach-manage-row > header { display: grid; grid-template-columns: minmax(220px, 1fr) 160px auto; align-items: center; gap: 14px; }
.camp-coach-manage-row > header > div { display: grid; gap: 2px; }
.camp-coach-manage-row > header span, .camp-coach-manage-row > p { color: var(--ink-soft); font-size: 10px; }
.camp-coach-manage-row > p { margin: 6px 0 0; }
.camp-availability-editor { margin-top: 12px; border-top: 1px solid var(--line); }
.camp-availability-week { padding: 11px 2px; border-bottom: 1px solid var(--line-soft); }
.camp-availability-week > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.camp-availability-week > header > div { display: flex; align-items: baseline; gap: 8px; }
.camp-availability-week > header span, .camp-availability-meta { color: var(--ink-soft); font-size: 10px; }
.camp-availability-week.unavailable .camp-availability-meta { opacity: .65; }
.camp-week-toggle { display: flex; align-items: center; gap: 6px; color: var(--green-deep); font-size: 10px; font-weight: 800; }
.camp-week-toggle input { width: 15px; height: 15px; accent-color: var(--green); }
.camp-week-settings { display: grid; grid-template-columns: 120px 120px minmax(220px, 1fr) auto; align-items: end; gap: 10px; margin-top: 9px; }
.camp-week-settings > label { display: grid; gap: 4px; }
.camp-week-settings > label > span, .camp-week-settings legend { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.camp-week-settings input[type="time"] { width: 100%; min-height: 31px; padding: 4px 7px; }
.camp-week-settings fieldset { display: flex; align-items: center; min-height: 31px; gap: 13px; margin: 0; padding: 3px 8px; border: 1px solid var(--line); border-radius: 5px; }
.camp-week-settings fieldset label { display: flex; align-items: center; gap: 5px; font-size: 10px; }
.camp-week-settings fieldset input { accent-color: var(--green); }
.camp-availability-week.unavailable .camp-week-settings { background: var(--ivory-alt); }
.camp-availability-week.unavailable .camp-week-exception-tools { display: none; }
.camp-week-exception-tools:empty { display: none; }
.camp-availability-meta { display: flex; gap: 12px; margin-top: 4px; }
.camp-exception-form { display: grid; grid-template-columns: 140px 105px 20px 105px minmax(140px, 1fr) auto; align-items: center; gap: 6px; margin-top: 8px; }
.camp-exception-form input { min-width: 0; }
.camp-exception-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 7px; background: var(--rust-pale); color: var(--rust); font-size: 10px; }
.rating-group-filter { display: grid; grid-template-columns: 150px minmax(220px, 440px); align-items: center; gap: 10px; margin: -4px 0 14px; }
.rating-group-filter span { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }

/* ---------------- Semester Core programs ---------------- */
.program-mode-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 280px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ivory-alt);
}
.program-mode-tabs button {
  min-height: 36px;
  padding: 7px 20px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}
.program-mode-tabs button.active { background: var(--green); color: #fff; box-shadow: var(--shadow); }
.core-overview { display: grid; gap: 20px; }
.core-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid #B7C8B9;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--green-pale);
}
.core-summary > div:first-child > span, .core-location-head > div:first-child > span {
  color: var(--green);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.core-summary h2 { margin: 3px 0 4px; font-size: 23px; font-weight: 500; }
.core-summary p { max-width: 690px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.core-summary-stats { display: flex; gap: 8px; flex: 0 0 auto; }
.core-summary-stats span {
  display: grid;
  min-width: 92px;
  gap: 1px;
  padding: 9px 11px;
  border: 1px solid rgba(51,81,63,.2);
  border-radius: 6px;
  background: rgba(255,255,255,.55);
  color: var(--ink-soft);
  font-size: 9px;
}
.core-summary-stats b { color: var(--green-deep); font: 600 20px Georgia, serif; }
.core-source-note { margin-top: -13px; color: var(--ink-faint); font-size: 9.5px; }
.core-conflict-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 15px;
  border: 1px solid #E3B8AA;
  border-left: 4px solid var(--rust);
  border-radius: 8px;
  background: var(--rust-pale);
}
.core-conflict-banner > div { display: grid; gap: 2px; }
.core-conflict-banner span { color: var(--rust); font-size: 8.5px; font-weight: 850; text-transform: uppercase; }
.core-conflict-banner b { color: #7D3125; font-size: 14px; }
.core-conflict-banner p { margin: 0; color: #7D3125; font-size: 10.5px; }
.core-category { min-width: 0; }
.core-location-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 9px;
  border-bottom: 2px solid var(--green);
}
.core-location-head h2 { margin: 2px 0 0; font-size: 24px; font-weight: 500; }
.core-location-head > div:last-child { display: flex; align-items: baseline; gap: 5px; color: var(--ink-soft); font-size: 9.5px; }
.core-location-head > div:last-child b { margin-left: 8px; color: var(--green-deep); font-size: 14px; }
.core-time-picker {
  display: grid;
  grid-template-columns: 170px minmax(280px, 1fr);
  align-items: center;
  gap: 5px 14px;
  margin-top: 9px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.core-time-picker > span { color: var(--green-deep); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.core-time-picker select { width: 100%; min-height: 40px; font-size: 11.5px; }
.core-time-picker small { grid-column: 2; color: var(--ink-faint); font-size: 9.5px; }
.core-group-list { display: grid; gap: 7px; padding-top: 9px; }
.core-group-card { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.core-group-card.expanded { border-color: #9CAF9E; }
.core-group-toggle {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .8fr) minmax(260px, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 10px 13px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.core-group-toggle:hover { background: var(--green-pale); }
.core-group-card.expanded .core-group-toggle { border-bottom: 1px solid var(--line); background: var(--green-pale); }
.core-group-time { display: grid; gap: 3px; min-width: 0; }
.core-group-time span { color: var(--green); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.core-group-time b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.core-group-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.core-kind, .core-trial-target, .core-inferred-location {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--ivory-alt);
  color: var(--ink-soft);
  font-size: 8.5px;
  font-weight: 850;
}
.core-kind.kind-chess { background: var(--green-pale); color: var(--green); }
.core-kind.kind-math { background: #E8F0F6; color: #234A68; }
.core-kind.kind-master { background: var(--brass-pale); color: #77591F; }
.core-kind.kind-trial { background: var(--rust-pale); color: var(--rust); }
.core-trial-target { border: 1px solid #E3B8AA; background: #fff; color: var(--rust); }
.core-inferred-location { border: 1px dashed var(--line); background: transparent; color: var(--ink-faint); }
.core-group-counts { display: flex; align-items: center; justify-content: flex-end; gap: 13px; color: var(--ink-soft); font-size: 9px; }
.core-group-counts span { white-space: nowrap; }
.core-group-counts b { margin-right: 3px; color: var(--ink); font-size: 13px; }
.core-group-counts i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 16px; font-style: normal; }
.core-dashboard-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--green);
}
.core-dashboard-top > div:nth-child(2) { min-width: 250px; }
.core-dashboard-top h1 { margin: 2px 0 0; font-size: 24px; font-weight: 500; }
.core-dashboard-eyebrow { color: var(--green); font-size: 9.5px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.core-dashboard-stats { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.core-dashboard-stats span { min-width: 84px; padding: 7px 9px; border-left: 2px solid var(--brass); background: var(--brass-pale); color: var(--ink-soft); font-size: 10px; }
.core-dashboard-stats b { margin-right: 3px; color: var(--ink); font-size: 13px; }
.core-dashboard-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.core-dashboard-toolbar > div:first-child > span { color: var(--green); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.core-dashboard-toolbar p { margin: 3px 0 0; color: var(--ink-soft); font-size: 10.5px; }
.core-sort-controls { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--ivory-alt); }
.core-sort-controls > span { padding: 0 6px; color: var(--ink-soft); font-size: 8.5px; font-weight: 850; text-transform: uppercase; }
.core-sort-button { min-height: 31px; padding: 5px 12px; border: 0; border-radius: 5px; background: transparent; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.core-sort-button:hover { background: var(--green-pale); color: var(--green); }
.core-sort-button.active { background: var(--green); color: #fff; }
.core-group-body { padding: 12px; }
.core-staffing {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
  padding: 10px 11px;
  border-radius: 6px;
  background: var(--ivory-alt);
}
.core-staffing > div:first-child > span { display: block; margin-bottom: 5px; color: var(--ink-soft); font-size: 8.5px; font-weight: 850; text-transform: uppercase; }
.core-hired-coaches { display: flex; gap: 6px; flex-wrap: wrap; }
.core-hired-coaches > span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 5px 5px 8px; border-radius: 999px; background: var(--green); color: #fff; font-size: 9.5px; font-weight: 750; }
.core-hired-coaches em { color: var(--ink-faint); font-size: 10px; font-style: normal; }
.core-bulk-unhire { margin-top: 7px; }
.core-unhire { display: grid; width: 17px; height: 17px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; line-height: 1; }
.core-hire-controls { display: flex; gap: 6px; }
.core-hire-controls select { min-width: 230px; }
.core-conflicts { margin-bottom: 12px; border: 1px solid #E3B8AA; border-radius: 8px; background: #FFF9F7; }
.core-conflicts > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 11px 13px; border-bottom: 1px solid #E3B8AA; }
.core-conflicts > header span { color: var(--rust); font-size: 8.5px; font-weight: 850; text-transform: uppercase; }
.core-conflicts > header h2 { margin: 2px 0 0; color: #7D3125; font-size: 18px; font-weight: 500; }
.core-conflicts > header p { max-width: 470px; margin: 0; color: var(--ink-soft); font-size: 9.5px; line-height: 1.4; text-align: right; }
.core-conflict-list { display: grid; }
.core-conflict-row { display: grid; grid-template-columns: 145px minmax(180px, 1fr) minmax(210px, 1.1fr) 62px; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid #F0D8D0; }
.core-conflict-row:last-child { border-bottom: 0; }
.core-conflict-row.resolved { background: #F3F8F4; }
.core-conflict-row > span { display: grid; gap: 2px; }
.core-conflict-row b { font-size: 10.5px; }
.core-conflict-row small { color: var(--ink-faint); font-size: 8.5px; }
.core-conflict-row select { width: 100%; min-width: 0; font-size: 10px; }
.core-conflict-row em { padding: 4px 6px; border-radius: 999px; background: var(--rust-pale); color: var(--rust); font-size: 8px; font-style: normal; font-weight: 850; text-align: center; text-transform: uppercase; }
.core-conflict-row.resolved em { background: var(--green-pale); color: var(--green); }
.core-roster-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.core-roster-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.core-roster-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--ivory-alt); color: var(--ink-soft); font-size: 9px; text-align: left; text-transform: uppercase; }
.core-roster-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); font-size: 10.5px; vertical-align: middle; }
.core-roster-table tr:last-child td { border-bottom: 0; }
.core-roster-table td:first-child { width: 27%; }
.core-roster-table td b { display: block; font-size: 11.5px; }
.core-roster-table td small { color: var(--ink-faint); font-size: 9px; }
.core-roster-table select { width: 100%; min-width: 0; padding: 5px 7px; font-size: 10.5px; }
.core-roster-table .muted { color: var(--ink-faint); font-style: italic; }
.core-level-progress { position: relative; }
.core-progress-tooltip {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0;
  display: none;
  width: min(430px, 70vw);
  max-height: 340px;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid #A9BDD1;
  border-radius: 6px;
  background: #132A3A;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15,27,36,.25);
}
.core-level-progress:hover .core-progress-tooltip, .core-level-progress:focus-within .core-progress-tooltip { display: block; }
.core-progress-tooltip > strong { display: block; margin-bottom: 6px; color: #F2D47B; font-size: 11px; }
.core-progress-tooltip > div { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 10px; line-height: 1.3; }
.core-progress-tooltip > div b { color: #B8DAF2; text-align: right; }
.core-progress-tooltip p { margin: 0; font-size: 10px; }
.core-level-readonly { color: var(--ink-soft); }
.core-rating-level { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 15px; border-bottom: 1px solid #A9BDD1; background: #E8F0F6; }
.core-rating-level span { color: #234A68; font-size: 10px; font-weight: 850; }
.core-rating-level select { min-width: 190px; }

/* ---------------- Student progress ---------------- */
.student-progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid #234A68; }
.student-progress-head > div:first-child > span { color: #527795; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.student-progress-head h1 { margin: 3px 0 0; font-size: 28px; font-weight: 500; }
.student-progress-head > div:first-child > small { color: var(--ink-faint); font-size: 10px; }
.student-progress-summary { display: flex; align-items: baseline; gap: 7px; color: var(--ink-soft); font-size: 11px; }
.student-progress-summary b { color: #234A68; font: 600 24px Georgia, serif; }
.student-progress-summary em { display: grid; gap: 2px; margin-right: 13px; padding-right: 18px; border-right: 1px solid #A9BDD1; color: #527795; font-size: 8px; font-style: normal; text-transform: uppercase; }
.student-progress-summary em strong { color: #234A68; font-size: 12px; text-transform: none; }
.student-level-tabs { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; margin-bottom: 16px; padding: 3px; border: 1px solid #A9BDD1; border-radius: 8px; background: #E8F0F6; }
.student-level-tab { min-height: 38px; padding: 7px 9px; border: 0; border-radius: 5px; background: transparent; color: #36566F; font-size: 11px; font-weight: 750; white-space: nowrap; }
.student-level-tab.active { color: #fff; background: #234A68; }
.student-certificate { position: relative; min-height: 430px; padding: 38px 42px 30px; border: 4px double #B38A2E; border-radius: 8px; background: #FFF; color: #182D3B; box-shadow: 0 10px 26px rgba(24,45,59,.1); text-align: center; }
.certificate-corner { position: absolute; width: 34px; height: 34px; border-color: #B38A2E; }
.certificate-corner.top-left { top: 12px; left: 12px; border-top: 2px solid; border-left: 2px solid; }
.certificate-corner.top-right { top: 12px; right: 12px; border-top: 2px solid; border-right: 2px solid; }
.certificate-corner.bottom-left { bottom: 12px; left: 12px; border-bottom: 2px solid; border-left: 2px solid; }
.certificate-corner.bottom-right { right: 12px; bottom: 12px; border-right: 2px solid; border-bottom: 2px solid; }
.certificate-heading > span { color: #8A6A21; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.certificate-heading h2 { margin: 5px 0 2px; font: 500 31px Georgia, serif; }
.certificate-heading p { margin: 0; color: #527795; font-size: 12px; }
.certificate-student { display: grid; gap: 3px; width: min(540px, 90%); margin: 24px auto 28px; padding-bottom: 8px; border-bottom: 1px solid #A9BDD1; }
.certificate-student span { color: #6B7E8C; font-size: 10px; text-transform: uppercase; }
.certificate-student b { font: 500 24px Georgia, serif; }
.certificate-medals { display: grid; grid-template-columns: repeat(5, minmax(90px, 1fr)); gap: 14px; width: min(760px, 100%); margin: 0 auto; }
.norm-medal { position: relative; display: grid; justify-items: center; gap: 7px; }
.norm-medal > b { font-size: 11px; }
.norm-circle { position: relative; width: 76px; height: 76px; padding: 0; border: 2px solid #59636B; border-radius: 50%; background: transparent; }
.norm-circle-core { position: absolute; inset: 7px; border-radius: 50%; background: var(--norm-dark); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
.norm-circle.achieved { border-color: var(--norm-lit); box-shadow: 0 0 0 4px var(--norm-halo); }
.norm-circle.achieved .norm-circle-core { background: var(--norm-lit); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 4px 10px rgba(22,35,44,.2); }
.norm-circle-check { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 25px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.color-green { --norm-lit: #24975B; --norm-dark: #173A2A; --norm-halo: rgba(36,151,91,.18); }
.color-red { --norm-lit: #D94B50; --norm-dark: #48272A; --norm-halo: rgba(217,75,80,.18); }
.color-orange { --norm-lit: #E8892F; --norm-dark: #493421; --norm-halo: rgba(232,137,47,.2); }
.color-blue { --norm-lit: #367FC1; --norm-dark: #243A4D; --norm-halo: rgba(54,127,193,.18); }
.color-pink { --norm-lit: #D95E97; --norm-dark: #472C3A; --norm-halo: rgba(217,94,151,.18); }
.color-gold { --norm-lit: #C89C26; --norm-dark: #463B20; --norm-halo: rgba(200,156,38,.2); }
.color-purple { --norm-lit: #7957C8; --norm-dark: #342B48; --norm-halo: rgba(121,87,200,.18); }
.color-black { --norm-lit: #17191D; --norm-dark: #373B42; --norm-halo: rgba(200,156,38,.25); }
.norm-tooltip { position: absolute; z-index: 20; top: 92px; left: 50%; display: none; width: min(360px, 75vw); padding: 11px; transform: translateX(-50%); border: 1px solid #A9BDD1; border-radius: 7px; background: #132A3A; color: #fff; box-shadow: 0 12px 28px rgba(15,27,36,.25); text-align: left; }
.norm-medal:first-child .norm-tooltip { left: 0; transform: none; }
.norm-medal:last-child .norm-tooltip { right: 0; left: auto; transform: none; }
.norm-medal:hover .norm-tooltip, .norm-medal:focus-within .norm-tooltip { display: block; }
.norm-tooltip > strong { display: block; margin-bottom: 7px; color: #F2D47B; font-size: 11px; }
.norm-skill { display: grid; grid-template-columns: minmax(0, 1fr) 94px; gap: 9px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.13); font-size: 10.5px; line-height: 1.35; }
.norm-skill b { color: #B8DAF2; font-size: 9.5px; text-align: right; }
.norm-skill b.blank { min-height: 12px; }
.certificate-status { display: flex; justify-content: center; align-items: baseline; gap: 6px; margin-top: 25px; color: #527795; font-size: 10.5px; }
.certificate-status b { color: #234A68; font-size: 13px; }
.student-coach-history { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; margin-top: 24px; padding: 20px 2px 0; border-top: 2px solid #234A68; }
.student-coach-history > div:first-child > span { color: #527795; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.student-coach-history h2 { margin: 4px 0 0; font-size: 20px; font-weight: 500; }
.student-history-list { border-top: 1px solid var(--line); }
.student-history-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 10px 3px; border-bottom: 1px solid var(--line); }
.student-history-row b { font-size: 11px; }
.student-history-row span { color: var(--ink-soft); font-size: 11px; }

.student-rating-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.rating-student-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.rating-student { display: grid; gap: 3px; padding: 10px 11px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.rating-student:last-child { border-bottom: 0; }
.rating-student.active { background: #E8F0F6; box-shadow: inset 3px 0 #234A68; }
.rating-student b { font-size: 11.5px; }
.rating-student span { color: var(--ink-soft); font-size: 9.5px; }
.rating-workspace { min-width: 0; }
.rating-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.rating-editor-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 13px 15px; border-bottom: 2px solid #234A68; }
.rating-editor-head span { color: #527795; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.rating-editor-head h2 { margin: 2px 0 0; font-size: 20px; font-weight: 500; }
.rating-editor-head > b { color: #234A68; font-size: 11px; }
.rating-color-section { display: grid; grid-template-columns: 150px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.rating-color-section:last-child { border-bottom: 0; }
.rating-color-head { display: flex; align-items: center; gap: 9px; padding: 12px; background: var(--ivory-alt); }
.rating-color-head > div { display: grid; gap: 2px; }
.rating-color-head b { font-size: 11px; }
.rating-color-head small { color: var(--ink-soft); font-size: 9px; }
.rating-color-dot { width: 25px; height: 25px; flex: 0 0 auto; border: 2px solid #59636B; border-radius: 50%; background: var(--norm-dark); }
.rating-color-dot.achieved { border-color: var(--norm-lit); background: var(--norm-lit); box-shadow: 0 0 0 3px var(--norm-halo); }
.rating-skill-list { min-width: 0; }
.rating-skill-row { display: grid; grid-template-columns: minmax(0, 1fr) 145px; gap: 14px; align-items: center; min-height: 48px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.rating-skill-row:last-child { border-bottom: 0; }
.rating-skill-row > span { font-size: 10.5px; line-height: 1.35; }
.rating-skill-row select { width: 145px; font-size: 10.5px; }

@media (max-width: 1180px) {
  .availability-week { grid-template-columns: repeat(4, minmax(125px, 1fr)); }
  .add-staff-card { grid-template-columns: 1fr; gap: 12px; }
  .add-staff-form { justify-content: flex-start; flex-wrap: wrap; }
  .coach-profile-fields { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .profile-location-picker { grid-column: 1 / -1; }
  .semester-calendar { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
  .camp-week-band { grid-template-columns: 88px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .sidebar { position: static; height: auto; padding: 18px; }
  .nav { display: grid; grid-template-columns: repeat(2, 1fr); }
  .sidebar-foot { display: none; }
  .week-switcher { order: 3; flex-basis: 100%; }
  .availability-week { grid-template-columns: repeat(2, minmax(125px, 1fr)); }
  .program-title-row { align-items: flex-start; flex-wrap: wrap; }
  .program-title { width: calc(100% - 45px); }
  .program-alert, .all-staffed { margin-left: 40px; }
  .staff-import { width: 100%; padding-right: 0; padding-bottom: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .staff-import .field { flex: 1; }
  .coach-directory-nav { align-items: stretch; flex-direction: column; }
  .coach-directory-nav .semester-control { width: 100%; }
  .add-staff-form .field { flex: 1; }
  .main { padding: 22px 16px; }
  .camp-week-band { grid-template-columns: 1fr; gap: 4px; }
  .camp-week-label { display: flex; align-items: baseline; gap: 8px; padding-bottom: 2px; }
  .camp-dashboard-top { align-items: flex-start; flex-wrap: wrap; }
  .camp-dashboard-stats { width: 100%; margin-left: 0; justify-content: flex-start; }
  .camp-dashboard-actions { margin-left: auto; }
  .camp-dashboard-toolbar { align-items: flex-start; flex-direction: column; }
  .camp-staff-row { align-items: stretch; flex-direction: column; }
  .camp-hire-controls { justify-content: flex-start; flex-wrap: wrap; }
  .camp-view-tabs { width: 100%; overflow-x: auto; }
  .camp-bulk-tools { align-items: flex-start; flex-direction: column; }
  .camp-bulk-tools label { width: 100%; }
  .camp-bulk-tools label > span { width: 58px; }
  .camp-bulk-tools select, .camp-bulk-tools input { flex: 1; }
  .camp-assignment-summary, .camp-staffing-alerts { grid-template-columns: 1fr; }
  .camp-staffing-alerts > div:first-child { grid-row: auto; }
  .camp-coach-week { grid-template-columns: 1fr 1fr; }
  .camp-coach-week small { grid-column: 1 / -1; }
  .camp-coach-manage-row > header { grid-template-columns: minmax(0, 1fr) auto; }
  .camp-coach-manage-row > header > strong { grid-column: 1; }
  .camp-week-settings { grid-template-columns: 1fr 1fr; }
  .camp-week-settings fieldset { grid-column: 1 / -1; }
  .camp-week-settings .save-camp-week { grid-column: 1 / -1; }
  .camp-exception-form { grid-template-columns: 1fr 1fr; }
  .camp-exception-form > span { display: none; }
  .camp-exception-note, .camp-exception-form button { grid-column: 1 / -1; }
  .rating-group-filter { grid-template-columns: 1fr; }
  .student-certificate { padding-right: 24px; padding-left: 24px; }
  .certificate-medals { gap: 8px; }
  .student-rating-layout { grid-template-columns: 1fr; }
  .rating-student-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rating-student:nth-child(odd) { border-right: 1px solid var(--line); }
  .core-summary { align-items: flex-start; flex-direction: column; }
  .core-summary-stats { width: 100%; }
  .core-summary-stats span { flex: 1; }
  .core-conflict-banner { align-items: flex-start; flex-direction: column; }
  .core-dashboard-top { align-items: flex-start; flex-wrap: wrap; }
  .core-dashboard-stats { width: 100%; margin-left: 0; justify-content: flex-start; }
  .core-dashboard-toolbar { align-items: flex-start; flex-direction: column; }
  .core-group-toggle { grid-template-columns: minmax(0, 1fr) auto; }
  .core-group-badges { grid-column: 1; grid-row: 2; }
  .core-group-counts { grid-column: 2; grid-row: 1 / span 2; }
  .core-staffing { align-items: stretch; flex-direction: column; }
  .core-hire-controls select { flex: 1; min-width: 0; }
  .core-conflicts > header { align-items: flex-start; flex-direction: column; gap: 6px; }
  .core-conflicts > header p { max-width: none; text-align: left; }
  .core-conflict-row { grid-template-columns: 130px minmax(150px, .8fr) minmax(190px, 1fr) 58px; gap: 8px; }
}

@media (max-width: 620px) {
  .add-staff-form { align-items: stretch; flex-direction: column; }
  .add-staff-form .field, .add-staff-form .btn { width: 100%; }
  .add-staff-form .staff-role-picker { grid-template-columns: 1fr 1fr; }
  .coach-profile-fields { grid-template-columns: 1fr; }
  .profile-location-picker { grid-column: auto; flex-wrap: wrap; }
  .coach-profile-fields .btn { width: 100%; }
  .semester-staff-import { align-items: stretch; flex-direction: column; }
  .semester-staff-import .field, .semester-staff-import .btn { width: 100%; }
  .tournament-table { display: block; min-width: 0; border: 0; background: transparent; }
  .tournament-table thead { display: none; }
  .tournament-table tbody { display: grid; gap: 8px; }
  .tournament-table tr { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
  .tournament-table td, .tournament-table td:first-child, .tournament-table td:nth-child(2), .tournament-table td:nth-child(3), .tournament-table td:nth-child(4), .tournament-table td:nth-child(5), .tournament-table td:nth-child(6) { display: grid; width: auto; padding: 9px 11px; }
  .tournament-table td::before { content: attr(data-label); margin-bottom: 4px; color: var(--ink-faint); font-size: 8px; font-weight: 800; text-transform: uppercase; }
  .tournament-hire { align-items: stretch; flex-direction: column; }
  .tournament-hire select { width: 100%; max-width: none; }
  .tournament-hire .btn { width: 100%; }
  .camp-import-band { align-items: stretch; flex-direction: column; }
  .camp-upload-drop { min-width: 0; width: 100%; justify-content: space-between; }
  .camp-review-head { align-items: flex-start; flex-direction: column; }
  .camp-review-counts { width: 100%; }
  .camp-review-counts span { flex: 1; }
  .camp-review-table-wrap { overflow: visible; border: 0; background: transparent; }
  .camp-review-table { display: block; min-width: 0; }
  .camp-review-table thead { display: none; }
  .camp-review-table tbody { display: grid; gap: 7px; }
  .camp-review-table tr { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
  .camp-review-table td { display: grid; gap: 2px; padding: 8px 10px; }
  .camp-review-table td::before { content: attr(data-label); color: var(--ink-faint); font-size: 8px; font-weight: 800; text-transform: uppercase; }
  .camp-review-table td:nth-child(2), .camp-review-table td:last-child { grid-column: 1 / -1; }
  .camp-review-table td:last-child { display: flex; align-items: center; }
  .camp-review-table td:last-child::before { margin-right: auto; }
  .camp-review-actions { flex-direction: column-reverse; }
  .camp-review-actions .btn { width: 100%; }
  .student-progress-head { align-items: flex-start; flex-direction: column; }
  .student-level-tabs { grid-template-columns: repeat(5, 126px); }
  .student-certificate { min-height: 0; padding: 31px 15px 25px; }
  .certificate-heading h2 { font-size: 24px; }
  .certificate-student { margin: 19px auto 23px; }
  .certificate-student b { font-size: 20px; }
  .certificate-medals { grid-template-columns: repeat(5, 1fr); gap: 3px; }
  .norm-circle { width: 54px; height: 54px; }
  .norm-circle-core { inset: 5px; }
  .norm-circle-check { font-size: 18px; }
  .norm-medal > b { font-size: 9px; }
  .norm-tooltip { top: 68px; width: min(300px, 82vw); }
  .norm-skill { grid-template-columns: minmax(0, 1fr) 82px; }
  .certificate-status { margin-top: 19px; }
  .student-coach-history { grid-template-columns: 1fr; gap: 12px; }
  .student-history-row { grid-template-columns: 1fr; gap: 3px; }
  .rating-student-list { grid-template-columns: 1fr; }
  .rating-student:nth-child(odd) { border-right: 0; }
  .rating-color-section { grid-template-columns: 1fr; }
  .rating-color-head { border-bottom: 1px solid var(--line); }
  .rating-skill-row { grid-template-columns: 1fr; gap: 6px; }
  .rating-skill-row select { width: 100%; }
  .program-mode-tabs { width: 100%; }
  .core-summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .core-summary-stats span { min-width: 0; padding: 7px; }
  .core-location-head { align-items: flex-start; flex-direction: column; }
  .core-location-head > div:last-child { flex-wrap: wrap; }
  .core-time-picker { grid-template-columns: 1fr; padding: 12px; }
  .core-time-picker small { grid-column: 1; }
  .core-group-toggle { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .core-group-time b { white-space: normal; }
  .core-group-badges { grid-column: 1 / -1; }
  .core-group-counts { grid-column: 2; grid-row: 1; }
  .core-group-counts span { display: none; }
  .core-dashboard-top > div:nth-child(2) { min-width: 0; flex: 1; }
  .core-dashboard-stats span { flex: 1; min-width: 0; }
  .core-dashboard-toolbar { align-items: stretch; }
  .core-sort-controls { display: grid; grid-template-columns: auto repeat(3, 1fr); }
  .core-sort-controls > span { align-self: center; }
  .core-sort-button { padding-right: 7px; padding-left: 7px; }
  .core-hire-controls { align-items: stretch; flex-direction: column; }
  .core-conflict-row { grid-template-columns: 1fr auto; gap: 8px; }
  .core-conflict-coach, .core-conflict-row select { grid-column: 1 / -1; }
  .core-conflict-row em { align-self: center; justify-self: end; grid-column: 2; grid-row: 1; }
  .core-roster-scroll { overflow: visible; border: 0; }
  .core-roster-table { display: block; min-width: 0; }
  .core-roster-table thead { display: none; }
  .core-roster-table tbody { display: grid; gap: 7px; }
  .core-roster-table tr { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
  .core-roster-table td, .core-roster-table td:first-child { display: grid; width: auto; gap: 3px; padding: 8px 10px; }
  .core-roster-table td::before { content: attr(data-label); color: var(--ink-faint); font-size: 8px; font-weight: 850; text-transform: uppercase; }
  .core-roster-table td:first-child, .core-roster-table td:last-child { grid-column: 1 / -1; }
  .core-rating-level { align-items: stretch; flex-direction: column; gap: 6px; }
  .core-rating-level select { width: 100%; min-width: 0; }
  .camp-locations { grid-template-columns: 1fr; }
  .camp-overview-head { align-items: flex-start; flex-direction: column; gap: 9px; }
  .camp-location-head { align-items: flex-start; }
  .camp-location-actions { align-items: flex-end; flex-direction: column; }
  .camp-view-tabs { width: 100%; grid-template-columns: repeat(2, 1fr); }
  .camp-add-student { align-items: stretch; flex-direction: column; }
  .camp-add-student .btn { width: 100%; }
  .camp-roster-scroll { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .camp-category-staff .camp-roster-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
  .camp-category-table { min-width: 760px; }
  .camp-roster-table { display: block; min-width: 0; }
  .camp-roster-table thead { display: none; }
  .camp-roster-table tbody { display: grid; gap: 8px; }
  .camp-roster-table tr { position: relative; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
  .camp-roster-table td { display: grid; gap: 3px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
  .camp-roster-table td::before { content: attr(data-label); color: var(--ink-faint); font-size: 8.5px; font-weight: 800; text-transform: uppercase; }
  .camp-roster-table td:first-child { grid-column: 1 / -1; padding-right: 44px; }
  .camp-roster-table td:nth-child(4),
  .camp-roster-table td:nth-child(5),
  .camp-roster-table td:nth-child(6) { grid-column: 1 / -1; }
  .camp-roster-table td:nth-child(6) { border-bottom: 0; }
  .camp-roster-table td:last-child { position: absolute; top: 7px; right: 7px; display: block; padding: 0; border: 0; }
  .camp-roster-table td:last-child::before { display: none; }
}
