/* ATLAS PSU - ui2-pages.css
   UI2 layer 2 of 3. Owner: VJ (lane V, branch ui2/vj).
   Loads after ui2-foundation.css, before ui2-polish.css.
   Rule: every selector starts with html.ui2 (dark: html.ui2[data-theme="dark"]).
   Colors come from tokens, font sizes in rem. No gradient, no shadow, no side-accent border.
   Guarded by tests/test_ui2_layers.py. */

/* S1 Dashboard (V-01): header, one Next chip, KPI row, warning banner, two cards, week card (D-10, D-9, FEEDBACK 1 to 3, 5, 8, 18) */
html.ui2 #panel-dashboard [hidden] { display: none; }
html.ui2 #panel-dashboard .page-header { display: block; margin: 0 0 var(--sp-4); padding: 0; border: 0; }
html.ui2 #panel-dashboard #stepGuide { margin: 0 0 var(--sp-4); padding: 0; border: 0; background: transparent; }
html.ui2 #panel-dashboard .next-step-row { margin: 0; }
html.ui2 #panel-dashboard .step-note { margin: var(--sp-2) 0 0; color: var(--text-secondary); font-size: var(--fs-small); }
html.ui2 #panel-dashboard .stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-4); }
html.ui2 #panel-dashboard .stats-row .stat-card { min-width: 0; }
@media (max-width: 900px) {
  html.ui2 #panel-dashboard .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html.ui2 #panel-dashboard .dash-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); margin: 0 0 var(--sp-4); align-items: start; }
@media (min-width: 1280px) {
  html.ui2 #panel-dashboard .dash-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html.ui2 #panel-dashboard .dash-two > .dashboard-chart-card { margin: 0; min-width: 0; }
html.ui2 #panel-dashboard .dashboard-schedule-card { margin: 0; }
html.ui2 #panel-dashboard .dashboard-card-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); }
html.ui2 #panel-dashboard .cap-stack-wrap { margin: 0 0 var(--sp-3); }
html.ui2 .cap-stack { display: flex; height: 0.75rem; overflow: hidden; border-radius: var(--r-control); background: var(--bg-surface-2); }
html.ui2 .cap-stack-ok, html.ui2 .cap-stack-warn { display: block; height: 100%; width: 0; }
html.ui2 .cap-stack-ok { background: var(--cap-within); }
html.ui2 .cap-stack-warn { background: var(--cap-above); }
html.ui2 .cap-stack-legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: var(--sp-2) 0 0; font-size: var(--fs-small); color: var(--text-secondary); }
html.ui2 .cap-key { display: inline-flex; align-items: center; gap: var(--sp-2); }
html.ui2 .cap-key::before { content: ""; width: 0.75rem; height: 0.75rem; border-radius: 2px; background: var(--cap-within); }
html.ui2 .cap-key.is-warn::before { background: var(--cap-above); }

/* S2 Timetable (V-02): colour key, Lecture and Lab blocks, type tag, selected class, grid look (FEEDBACK 7, 18) */
html.ui2 .tt-legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: 0 0 var(--sp-3); font-size: var(--fs-small); color: var(--text-secondary); }
html.ui2 .tt-key { display: inline-flex; align-items: center; gap: var(--sp-2); }
html.ui2 .tt-swatch { width: 0.75rem; height: 0.75rem; border-radius: 2px; border: 1px solid currentColor; background: transparent; }
html.ui2 .tt-key.is-lec .tt-swatch { background: var(--type-lecture-soft); border-color: var(--type-lecture); }
html.ui2 .tt-key.is-lab .tt-swatch { background: var(--type-lab-soft); border-color: var(--type-lab); }
html.ui2 .week-table thead th { color: var(--text-primary); }
html.ui2 .week-table tbody th { color: var(--text-secondary); background: var(--bg-surface-2); }
html.ui2 .week-table th, html.ui2 .week-table td { border-color: var(--border-subtle); }
html.ui2 .week-wrap .wk-class.is-lec { background: var(--type-lecture-soft); border-color: var(--type-lecture); color: var(--text-primary); }
html.ui2 .week-wrap .wk-class.is-lab { background: var(--type-lab-soft); border-color: var(--type-lab); color: var(--text-primary); }
html.ui2 .week-wrap .wk-class.is-lec:hover { background: var(--type-lecture-soft); color: var(--text-primary); }
html.ui2 .week-wrap .wk-class.is-lab:hover { background: var(--type-lab-soft); color: var(--text-primary); }
html.ui2 .wk-head { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; max-width: 100%; }
html.ui2 .wk-type { flex: none; font-size: var(--fs-small); font-weight: var(--fw-semibold); letter-spacing: 0.03em; }
html.ui2 .wk-class.is-lec .wk-type { color: var(--type-lecture); }
html.ui2 .wk-class.is-lab .wk-type { color: var(--type-lab); }
html.ui2 .wk-head .wk-code { min-width: 0; overflow-wrap: anywhere; }
html.ui2 .week-wrap .wk-class.is-flag { outline: 2px solid var(--ui-danger-fg); outline-offset: -2px; }
html.ui2 .week-wrap .wk-class.is-selected { outline: 2px solid var(--text-primary); outline-offset: 2px; }
html.ui2 .wk-class.is-selected .wk-code::after { content: " (selected)"; font-weight: 400; color: var(--text-secondary); }
html.ui2 .wk-row .wk-time { color: var(--text-secondary); }

/* S3 Optimization: prepare hero, progress, result and note (V-03; D-9, D-10, FEEDBACK 2, 13, 17) */
html.ui2 .run-hero { display: block; min-width: 0; margin: 0 0 var(--sp-4); }
html.ui2 .run-hero .workload-controls-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  position: static; box-shadow:none; max-width: 40rem; margin: 0 auto; padding: var(--sp-5);
  background: var(--bg-surface); border-color: var(--border-subtle); border-radius: var(--r-card);
  text-align: center;
}
html.ui2 .run-hero .workload-controls-card > * { margin: 0; max-width: 100%; }
html.ui2 .run-hero [hidden] { display: none; }
html.ui2 .run-step {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  color: var(--text-primary); font-size: var(--fs-section); font-weight: var(--fw-section); line-height: var(--lh-tight);
}
html.ui2 .run-step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.75rem; height: 1.75rem; box-sizing: border-box; border-radius: 50%;
  border: 1px solid var(--border-input); color: var(--text-primary);
  font-size: var(--fs-small); font-weight: var(--fw-label);
}
html.ui2 .run-hero .subtitle { color: var(--text-secondary); font-size: var(--fs-body); line-height: var(--lh-body); }
html.ui2 .run-hero .btn-hero { width: auto; }
html.ui2 .run-hero .btn-advanced-settings { width: auto; }
html.ui2 .run-hero .ga-loading {
  width: 100%; max-width: 40rem; margin: var(--sp-4) auto 0; padding: var(--sp-4) var(--sp-5); box-sizing: border-box;
  border: 1px solid var(--border-subtle); border-radius: var(--r-card); background: var(--bg-surface);
}
html.ui2 .workload-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); align-items: start; margin: 0; }
html.ui2 .workload-grid > * { min-width: 0; }
@media (min-width: 901px) {
  html.ui2 .workload-grid { grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); }
}
html.ui2 .workload-result-card { margin: 0; box-shadow:none; }
html.ui2 .workload-note-card {
  margin: 0; padding: var(--sp-4); box-sizing: border-box;
  border: 1px solid var(--border-subtle); border-radius: var(--r-card); background: var(--bg-surface);
}
html.ui2 .note-title { margin: 0 0 var(--sp-2); color: var(--text-primary); font-size: var(--fs-section); font-weight: var(--fw-section); }
html.ui2 .workload-note-card p { margin: 0; color: var(--text-secondary); font-size: var(--fs-body); line-height: var(--lh-body); }
/* U4-16 live Approval card: label over value, tokens only */
html.ui2 .note-live { display: flex; flex-direction: column; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
html.ui2 .note-live:empty { display: none; }
html.ui2 .note-row { display: flex; flex-direction: column; gap: 0; }
html.ui2 .note-k { color: var(--text-secondary); font-size: var(--fs-small); }
html.ui2 .note-v { color: var(--text-primary); font-size: var(--fs-body); overflow-wrap: anywhere; }
html.ui2 .note-checks { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--border-subtle); }
html.ui2 .note-ready { align-self: flex-start; }
html.ui2 .note-error { color: var(--text-secondary); }
html.ui2 .note-compact { display: none; }
html.ui2 .note-fallback { font-size: var(--fs-small); }
@media (max-width: 900px) {
  html.ui2 .workload-note-card { padding: var(--sp-3); }
  html.ui2 .workload-note-card.is-idle { display: none; }
  html.ui2 .note-live { margin: 0; }
  html.ui2 .note-live .note-row,
  html.ui2 .note-live .note-checks { display: none; }
  html.ui2 .note-live .note-row.note-error { display: flex; }
  html.ui2 .note-live .note-compact { display: block; color: var(--text-primary); }
  html.ui2 .note-fallback { display: none; }
  html.ui2 .note-title { margin-bottom: var(--sp-1); }
}

/* S4 Saved runs, compare, confirm dialogs (V-04; D-12, FEEDBACK 11, 12). The count span stays inline: tests read the text of each card. */
html.ui2 .saved-runs-note { margin: 0 0 var(--sp-3); color: var(--text-secondary); font-size: var(--fs-small); line-height: var(--lh-body); }
html.ui2 #savedRunsTable .run-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-2); }
html.ui2 #savedRunsTable .run-actions .btn { min-height: var(--ctl-min); }
html.ui2 #savedRunsTable .run-menu { position: relative; }
html.ui2 #savedRunsTable .run-menu .menu-btn { min-height: var(--ctl-min); }
html.ui2 #savedRunsTable .run-menu .menu-list { position: static; min-width: 14rem; max-width: 100%; margin-top: var(--sp-1); }
html.ui2 #savedRunsTable .run-menu .menu-note { margin: 0; padding: 0 var(--sp-3) var(--sp-2); }

html.ui2 .run-banner { border-color: var(--ui-warning-bd); background: var(--ui-warning-bg); color: var(--ui-warning-fg); flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; }
html.ui2 .run-banner-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
html.ui2 .run-banner-text { flex: 1 1 16rem; min-width: 0; }
html.ui2 .run-banner-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-2); }
html.ui2 .run-banner-actions .btn { min-height: var(--ctl-min); }
html.ui2 .run-banner-approve { background: var(--brand); color: var(--on-accent); border-color: var(--brand); }
html.ui2 .run-banner-approve:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--on-accent); }
html.ui2 .run-banner-approve[hidden],
html.ui2 .run-banner-cmp[hidden] { display: none; }
html.ui2 .run-banner-compare { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border-subtle); }
html.ui2 .run-banner-compare[hidden] { display: none; }
html.ui2 .run-banner-cmp-out { margin: 0; }
@media (max-width: 900px) {
  html.ui2 .run-banner-main { flex-direction: column; align-items: stretch; }
  html.ui2 .run-banner-actions { justify-content: flex-start; }
  html.ui2 .run-banner-actions .btn { min-height: 44px; }
}
html.ui2 .run-banner-error { margin: 0; color: var(--ui-danger-fg); font-size: var(--fs-small); line-height: var(--lh-body); }
html.ui2 .run-banner-counts,
html.ui2 .run-diff-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
html.ui2 .run-banner-counts li,
html.ui2 .run-diff-counts li {
  min-width: 0; padding: var(--sp-3); box-sizing: border-box;
  border: 1px solid var(--border-subtle); border-radius: var(--r-card); background: var(--bg-surface);
  color: var(--text-primary); font-size: var(--fs-body); line-height: var(--lh-body);
}
html.ui2 .run-banner-counts .run-diff-n,
html.ui2 .run-diff-counts .run-diff-n { font-size: var(--fs-section); font-weight: var(--fw-section); color: var(--text-primary); }
html.ui2 .run-diff-counts { margin: var(--sp-3) 0; }

/* S5 Reports: header, tabs, Charts, Subject Assignments, Fairness (V-05) */

/* S6 Reports: Capacity, Summary, Day view, Export sheets (V-06) */

/* S7 Faculty and Preferences (V-07) */
/* S7 Faculty and Preferences (V-07): master and detail, search, selected row (D-13, FEEDBACK 7, 14). Selectors start with html.ui2. */
html.ui2 .pref-explainer { border: 1px solid var(--border-default); border-radius: var(--r-control); background: var(--bg-surface); padding: var(--ui-sp-3) var(--ui-sp-4); margin-bottom: var(--ui-sp-4); }
html.ui2 .pref-explainer p { margin: 0; color: var(--text-secondary); }
html.ui2 .pref-md { display: grid; gap: var(--ui-sp-4); }
html.ui2 .pref-master, html.ui2 .pref-detail { min-width: 0; }
@media (min-width: 901px) {
  html.ui2 .pref-md { grid-template-columns: minmax(14rem, 1fr) minmax(0, 2fr); align-items: start; }
}
html.ui2 .pref-search { display: block; width: 100%; min-height: var(--ctl-min, 2.75rem); margin: var(--ui-sp-2) 0 var(--ui-sp-3); }
html.ui2 .pref-list { display: grid; gap: var(--ui-sp-2); }
html.ui2 .pref-row { display: block; width: 100%; min-height: var(--ctl-min, 2.75rem); padding: var(--ui-sp-2) var(--ui-sp-3); text-align: left; font: inherit; color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-control); cursor: pointer; }
html.ui2 .pref-row:hover { background: var(--bg-surface-3); }
html.ui2 .pref-row[aria-selected="true"] { background: var(--bg-surface-3); font-weight: var(--fw-semibold); }
html.ui2 .pref-row[aria-selected="true"]::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: var(--sp-2); border-radius: 50%; background: var(--text-primary); vertical-align: middle; }
html.ui2 .pref-row:focus-visible { outline: var(--focus-outline, 2px solid currentColor); outline-offset: var(--focus-outline-offset, 2px); }
html.ui2 .pref-empty { color: var(--text-secondary); }
html.ui2 .pref-empty[hidden], html.ui2 .soft-constraint-select-row[hidden] { display: none; }
html.ui2 .pref-detail-name { margin: 0 0 var(--ui-sp-3); font-weight: var(--fw-semibold); color: var(--text-primary); }


/* S8 Subjects and service requests (V-08) */

/* S9 Rooms and Blocks and Classes (V-09) */
html.ui2 #secRooms .room-rules { margin: 0 0 var(--ui-sp-4); padding: var(--ui-sp-3) var(--ui-sp-4); background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
html.ui2 #secRooms .room-rules-title { display: inline-flex; align-items: center; gap: var(--ui-sp-2); margin: 0; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--text-primary); }
html.ui2 #secRooms .room-section-title { color: var(--text-primary); font-weight: var(--fw-semibold); }
html.ui2 #secRooms .ent-row[aria-selected="true"],
html.ui2 #secSizes .ent-row[aria-selected="true"] { background: var(--bg-surface-3); }
html.ui2 #secRooms .ent-cap,
html.ui2 #secSizes .ent-num { color: var(--text-primary); }

/* S5 Reports: tab strip, Charts, Subject Assignments, Fairness (V-05; FEEDBACK 3, 7, 8, 18). Selectors start with html.ui2. */
html.ui2 #repTabStrip { margin: 0 0 var(--ui-sp-5); }
@media (max-width: 900px) { html.ui2 #repTabStrip { display: none; } }

html.ui2 #reportsPanel .reports-section > h3 { font-size: var(--ui-fs-3); font-weight: 600; color: var(--text-primary); margin: 0 0 var(--ui-sp-3); }
html.ui2 #reportsPanel .chart-card { background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: var(--ui-radius-lg); padding: var(--ui-sp-4); }
html.ui2 #reportsPanel .chart-card .chart-sub { color: var(--text-secondary); margin: 0 0 var(--ui-sp-3); }
html.ui2 #reportsPanel .fairness-headline { background: var(--card-bg); border: 1px solid var(--border-subtle); box-shadow:none; }
html.ui2 #reportsPanel .fairness-headline-sentence,
html.ui2 #reportsPanel .fairness-band { color: var(--text-secondary); }
html.ui2 #reportsPanel .fairness-metric { background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: var(--ui-radius-md); padding: var(--ui-sp-3); }
html.ui2 #reportsPanel .fairness-metric-label { color: var(--text-secondary); font-size: var(--ui-fs-2); }
html.ui2 #reportsPanel .fairness-metric-value { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
html.ui2 #repSecWeek .rep-label { color: var(--text-secondary); }
html.ui2 #repSecWeek .rep-day-btn[aria-pressed="true"] { background: var(--row-selected-bg, var(--bg-surface-3)); }

/* S6 Reports: Capacity thresholds and detail disclosure, Summary (V-06; FEEDBACK 8, 18). Selectors start with html.ui2. */
html.ui2 #repSecCapacity .cap-thresholds { background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: var(--ui-radius-md); padding: var(--ui-sp-3) var(--ui-sp-4); }
html.ui2 #repSecCapacity .cap-thresholds > summary,
html.ui2 #repSecCapacity .cap-disclosure > summary { cursor: pointer; color: var(--text-primary); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
html.ui2 #repSecCapacity .cap-thresholds > summary:focus-visible,
html.ui2 #repSecCapacity .cap-disclosure > summary:focus-visible { outline: var(--focus-outline, 2px solid currentColor); outline-offset: var(--focus-outline-offset, 2px); }
html.ui2 #repSecCapacity .cap-thresholds-body { color: var(--text-secondary); padding-top: var(--ui-sp-2); }
html.ui2 #repSecCapacity .cap-thresholds-body p { margin: 0 0 var(--ui-sp-2); }
html.ui2 #repSecCapacity .cap-disclosure { padding: var(--ui-sp-3) var(--ui-sp-4); }
html.ui2 #repSecCapacity .cap-disclosure[open] > summary { margin-bottom: var(--ui-sp-3); }

/* S7b Subjects and service requests (V-08): spacing of the validation summary in the request sheet. Selectors start with html.ui2. */
html.ui2 #svcSummary { margin-bottom: var(--ui-sp-4); }

/* V-10 phone sweep (FEEDBACK 4, 1): every control reaches 44 px tall on phones and on the 768 to 900 px band (PHONE_MQ is 900 px). Selectors start with html.ui2. */
@media (max-width: 900px) {
  html.ui2 #dashboardSemContext,
  html.ui2 #optimizationSemContext,
  html.ui2 #reportsSemContext { min-height: var(--ctl-min, 2.75rem); display: inline-flex; align-items: center; box-sizing: border-box; }
  html.ui2 #viewSwitch .view-switch-btn { min-height: var(--ctl-min, 2.75rem); }
  html.ui2 #weekScope,
  html.ui2 #weekItem { min-height: var(--ctl-min, 2.75rem); }
  html.ui2 #gaDetailPane .btn-edit-faculty { min-height: var(--ctl-min, 2.75rem); }
  html.ui2 #lectureRoomsList .ui-capped-filter { min-height: var(--ctl-min, 2.75rem); }
}

/* U4-05 (D-U1): the weekly timetable is a mode of the Reports panel. section-nav.js sets html[data-view="timetable"]
   (desktop only): no tab strip, and the heading inside the section is kept for screen readers only because the
   page title already reads "Timetable". The faculty select, day buttons and grid are untouched. */
html.ui2[data-view="timetable"] #repTabStrip { display: none; }
html.ui2[data-view="timetable"] #repSecWeek > h3 {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}


/* U6-06 chairperson cards (item 5). The Faculty Load Distribution, Room Capacity Overview and the two Reports charts are cards
   with the same tokens as the admin overview card (.admin-card: padding sp-5, radius r-card, surface, 1px subtle rule). The flat
   layout rule in main-style.css makes .dashboard-chart-card and .chart-card transparent with !important, so this wins by id scope. */
html.ui2 #panel-dashboard .chair-card,
html.ui2 #panel-reports .chair-card,
html.ui2 .reports-charts-grid > .chair-card {
  display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; box-sizing: border-box;
  padding: var(--sp-5) !important; border: 1px solid var(--border-subtle) !important; border-radius: var(--r-card) !important;
  background: var(--bg-surface) !important; box-shadow: none !important;
}
html.ui2 .chair-card > .dashboard-card-header,
html.ui2 .chair-card > h3 { margin: 0; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border-subtle); }
html.ui2 .chair-card > .chart-sub:empty { display: none; }
html.ui2 .chair-card-body { flex: 1 1 auto; min-width: 0; margin: 0; }
html.ui2 #panel-dashboard .dash-two { align-items: stretch; }
@media (min-width: 1100px) {
  html.ui2 #panel-dashboard .dash-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html.ui2 .reports-charts-grid { gap: var(--sp-4); align-items: stretch; }
html.ui2 .reports-charts-grid > .chair-card { margin: 0; }
/* capacity overview: tiles, then the bar, centered in the body both ways; the bar spans the tile row */
html.ui2 .cap-center { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--sp-4); width: 100%; }
html.ui2 .cap-center .capacity-metrics-grid { width: 100%; margin: 0; }
@media (min-width: 861px) { html.ui2 .cap-center .capacity-metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }   /* equal tile widths whatever the label length */
html.ui2 .cap-center .capacity-metric-tile { min-width: 0; overflow-wrap: anywhere; }
html.ui2 .cap-center .cap-stack-wrap, html.ui2 #panel-dashboard .cap-center .cap-stack-wrap { width: 100%; margin: 0; }
html.ui2 #capacitySummaryCard:has(.is-skeleton) { display: flex !important; }   /* the card is display none until data, its skeleton must show */

/* U6-06 one shared skeleton shimmer (opt in with atlasUI.skeleton options.shimmer): a highlight slides over each block with transform on
   a pseudo element, 1.4 s linear loop, no spring easing. The old color wave stays for the other skeletons. Reduced motion: static. */
@keyframes ui6-skel-shimmer { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
html.ui2 .ui-skel-layer.is-shimmer .ui-skel { position: relative; overflow: hidden; animation: none; background-color: var(--skel-base); }
html.ui2 .ui-skel-layer.is-shimmer .ui-skel::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; pointer-events: none;
  background-color: var(--skel-hi); opacity: 0.7;   /* a flat band, no gradient (UI-RULES): it slides over the block with transform only */
  animation: ui6-skel-shimmer 1.4s linear infinite;
}
html.ui2 .ui-skel-layer.is-shimmer { opacity: 1; transition: opacity 200ms linear; }
html.ui2 .ui-skel-layer.is-shimmer.is-leaving { opacity: 0; pointer-events: none; }
html.ui2 .ui-skel-card.is-bare { border: 0; padding: 0; height: 100%; }
html.ui2 .ui-skel-card.is-bare .ui-skel-bars { height: 100%; min-height: 14rem; }
html.ui2 .ui-skel-shape.ui-skel-capacity { display: flex; flex-direction: column; gap: var(--sp-4); }
html.ui2 .ui-skel-shape.ui-skel-capacity .ui-skel-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
html.ui2 .ui-skel-shape.ui-skel-capacity .ui-skel.is-tile { height: 5.5rem; border-radius: var(--r-card); }
html.ui2 .ui-skel-shape.ui-skel-capacity .ui-skel.is-strip { height: 0.75rem; width: 100%; border-radius: var(--r-control); }
@media (max-width: 860px) { html.ui2 .ui-skel-shape.ui-skel-capacity .ui-skel-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  html.ui2 .ui-skel-layer.is-shimmer .ui-skel::after { animation: none; display: none; }
  html.ui2 .ui-skel-layer.is-shimmer { transition: none; }
}
html.ui2[data-motion="reduce"] .ui-skel-layer.is-shimmer .ui-skel::after { animation: none; display: none; }
html.ui2[data-motion="reduce"] .ui-skel-layer.is-shimmer { transition: none; }
html.ui2.ui2-skip .ui-skel-layer.is-shimmer .ui-skel::after { animation: none; display: none; }
html.ui2.ui2-skip .ui-skel-layer.is-shimmer { transition: none; }

/* U6-07 grid corners: the wrapper owns the outer border and the radius (--r-card, 12px, same token as the cards), the collapse tables become separate so the corners clip cleanly */
html.ui2 .week-scroll,
html.ui2 .timetable-scroll { border: 1px solid var(--border-subtle); border-radius: var(--r-card); overflow: hidden; box-sizing: border-box; background: var(--bg-surface); }
html.ui2 .week-table,
html.ui2 .timetable-grid { border-collapse: separate; border-spacing: 0; width: calc(100% + 1px); margin: 0 -1px -1px 0; }
html.ui2 .week-table th, html.ui2 .week-table td,
html.ui2 .timetable-grid th, html.ui2 .timetable-grid td { border-width: 0 1px 1px 0; border-style: solid; border-color: var(--border-subtle); }
html.ui2 .week-table thead th:first-child, html.ui2 .week-table th.wk-corner { border-top-left-radius: calc(var(--r-card) - 1px); }
html.ui2 .week-table thead th:last-child, html.ui2 .timetable-grid thead th:last-child { border-top-right-radius: calc(var(--r-card) - 1px); }
html.ui2 .timetable-grid thead th:first-child { border-top-left-radius: calc(var(--r-card) - 1px); }
html.ui2 .week-table tbody tr:last-child > :first-child, html.ui2 .timetable-grid tbody tr:last-child > :first-child { border-bottom-left-radius: calc(var(--r-card) - 1px); }
html.ui2 .week-table tbody tr:last-child > :last-child, html.ui2 .timetable-grid tbody tr:last-child > :last-child { border-bottom-right-radius: calc(var(--r-card) - 1px); }

/* U6-11 day view (Reports, view individual days): the faculty by time grid (sv-tl) is built from divs. The wrapper owns the border and the card radius and clips, so the grey axis row no longer paints square corners over it */
html.ui2 .sv-tl-scroll { border-radius: var(--r-card); overflow: hidden; box-sizing: border-box; }

/* U6-07 result tables, desktop only (below 901px these become card lists with their own radii). Wrapper owns border and radius, last row drops its bottom border */
@media (min-width: 901px) {
  html.ui2 #gaTableWrapper,
  html.ui2 .saved-runs-scroll,
  html.ui2 #roomUtilSection .u-scroll-x,
  html.ui2 .cap-disclosure .u-scroll-x { border: 1px solid var(--border-subtle); border-radius: var(--r-card); box-sizing: border-box; }
  html.ui2 #reportsSummaryTable { border-collapse: separate; border-spacing: 0; border: 1px solid var(--border-subtle); border-radius: var(--r-card); overflow: hidden; width: 100%; }
  html.ui2 #gaScheduleTable tbody tr:last-child > *,
  html.ui2 #savedRunsTable tbody tr:last-child > *,
  html.ui2 .cap-details-table tbody tr:last-child > *,
  html.ui2 #reportsSummaryTable tbody tr:last-child > * { border-bottom-width: 0; }
  html.ui2 #gaScheduleTable thead th:first-child, html.ui2 #savedRunsTable thead th:first-child, html.ui2 .cap-details-table thead th:first-child, html.ui2 #reportsSummaryTable thead th:first-child { border-top-left-radius: calc(var(--r-card) - 1px); }
  html.ui2 #gaScheduleTable thead th:last-child, html.ui2 #savedRunsTable thead th:last-child, html.ui2 .cap-details-table thead th:last-child, html.ui2 #reportsSummaryTable thead th:last-child { border-top-right-radius: calc(var(--r-card) - 1px); }
}

/* U6-08 Export panel: one card per format, same card component as U6-06 (ui-card chair-card) */
html.ui2 .export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--sp-4); }
html.ui2 .export-card { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
html.ui2 .export-card-head h3 { margin: 0; }
html.ui2 .export-desc { margin: 0; color: var(--text-secondary); }
html.ui2 .export-card .export-buttons { margin: 0; }
html.ui2 .export-note { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }
html.ui2 .rep-export-link { display: none; }
@media (max-width: 767px) { html.ui2 .rep-export-link { display: inline-flex; margin-bottom: var(--sp-3); } }
