/* Class scheduling pages (loads after pages.css, reuses its tokens) */
.sched-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.week-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-weight: 600; }
.pane[hidden] { display: none; }

/* timetable with an hour axis (desktop) */
.tt { display: grid; grid-template-columns: 48px repeat(7, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tt-head { text-align: center; font-weight: 600; font-size: 13px; padding: 8px 4px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.tt-head.today, .tt-col.today { color: var(--red); }
.tt-head.today { background: var(--red-soft); }
.tt-corner { border-bottom: 1px solid var(--line); }
.tt-axis { position: relative; }
.tt-axis span { position: absolute; right: 6px; font-size: 11px; color: var(--mut); transform: translateY(3px); }
.tt-col { position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 72px); }
.tt-class { position: absolute; top: var(--top); height: var(--h); left: calc(var(--l) + 2px); width: calc(var(--w) - 4px);
  overflow: hidden; text-align: left; border: 1px solid var(--line); background: var(--blue-soft); border-radius: 8px;
  padding: 5px 8px; font: inherit; color: inherit; cursor: pointer; }
.tt-class b, .tt-class small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-class small { color: var(--mut); font-size: 12px; }
.tt-class.sel { border-color: var(--red); background: var(--red-soft); }
.tt-class.bad { border-color: #b45309; background: #fef3c7; }
.tt-class:focus-visible, .alts button:focus-visible, .banner button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.banner { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--line); background: var(--card); }
.banner.ok { background: #ecfdf3; border-color: #86d9a8; color: #05603a; }
.banner.bad { background: #fef3c7; border-color: #e0b252; color: #7a4a00; }
.banner ul { margin: 6px 0 0; padding-left: 18px; }
.legend { margin: 10px 0 0; font-size: 12px; color: var(--mut); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-soft); border: 1px solid var(--line); margin: 0 4px 0 12px; }
.dot.sel { background: var(--red-soft); border-color: var(--red); }
.dot.bad { background: #fef3c7; border-color: #b45309; }
.act-row { display: grid; gap: 8px; margin-top: 12px; }

.alts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.slot { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.slot select, .slot input { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.slot [aria-invalid="true"] { border-color: #b42318; }
.row-actions { display: flex; gap: 12px; }

@media (max-width: 900px) {
  .sched-grid { grid-template-columns: 1fr; }
  .slot { grid-template-columns: 1fr 1fr; }
  /* timetable becomes a simple list of days */
  .tt { display: block; border: 0; background: none; }
  .tt-corner, .tt-head, .tt-axis { display: none; }
  .tt-col { height: auto !important; border-left: 0; background: none; padding-bottom: 8px; color: inherit; }
  .tt-col::before { content: attr(data-label); display: block; font-weight: 600; margin: 8px 0 4px; }
  .tt-col:empty::after { content: "No classes"; color: var(--mut); font-size: 13px; }
  .tt-class { position: static; display: block; width: 100%; height: auto; margin-bottom: 6px; }
}