/* School schedule builder: setup tabs, availability grid, and the
   drag-to-edit result timetable grid. Reuses .field/.builder-form input
   styling and CSS variables from builder.css / style.css. */

.sched-name-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sched-name-input {
  font-size: 20px; font-weight: 700; color: var(--ink-dark); border: none; background: none;
  padding: 2px 0; min-width: 260px; font-family: inherit;
}
.sched-name-input:focus { outline: none; border-bottom: 2px solid var(--ink); }

.sched-tabs-nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 18px 24px 0; }
.sched-tab-btn {
  background: var(--ice); color: var(--ink-dark); border: none; padding: 9px 18px; border-radius: 20px 20px 0 0;
  font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; opacity: .65;
}
.sched-tab-btn.active { opacity: 1; background: var(--white); box-shadow: 0 -2px 0 var(--ink) inset; }

.sched-main { padding: 20px 24px 70px; }
.sched-tab-panel { display: none; }
.sched-tab-panel.active { display: block; }

.sched-card {
  background: var(--white); border: 1px solid #EAEDEC; border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.sched-card h3 { margin: 0 0 14px; font-size: 17px; color: var(--ink-dark); }
.sched-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sched-card-head h3 { margin: 0; }
.sched-hint { font-size: 12.5px; color: var(--grey); margin: 6px 0 10px; }

.sched-col-labels { display: grid; gap: 10px; padding: 0 6px 6px; font-size: 11.5px; font-weight: 700; color: var(--grey); }
.sched-subject-cols { grid-template-columns: 46px 1fr 170px 120px 110px 34px; align-items: center; }
.sched-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; font-size: 14.5px; line-height: 1.5; cursor: pointer; }
.sched-check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: #8b8cff; }
.sched-class-cols { grid-template-columns: 1fr 140px 34px; align-items: center; }
.sched-room-cols { grid-template-columns: 1fr 120px 34px; align-items: center; }
.sched-assign-cols { grid-template-columns: 1fr 1fr 1fr 100px 80px 52px 34px; align-items: center; }
.sched-day-lengths { display: flex; flex-wrap: wrap; gap: 8px; }
.sched-day-lengths label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; align-items: center; }
.sched-day-lengths input { width: 64px; text-align: center; }
.sched-grid-cell.empty.short-day { background: repeating-linear-gradient(135deg, rgba(127, 127, 127, .08) 0 6px, transparent 6px 12px); }
.sched-pin-btn { height: 34px; border-radius: 9px; border: 1px solid rgba(139, 140, 255, .35); background: transparent; cursor: pointer; font: inherit; font-size: 13px; color: inherit; opacity: .75; }
.sched-pin-btn.on { opacity: 1; background: rgba(139, 140, 255, .16); border-color: #8b8cff; font-weight: 700; }
.sched-pin-btn:focus-visible { outline: 2px solid #8b8cff; outline-offset: 2px; }
.sched-fixed-wrap { margin: 2px 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(139, 140, 255, .45); }
.sched-fixed-cell.fixed { background: rgba(139, 140, 255, .28) !important; border-color: #8b8cff !important; }
.sched-grid-cell.filled { position: relative; }
.sched-grid-cell.locked { box-shadow: inset 0 0 0 2px rgba(11, 15, 23, .55); }
.sched-cell-lock { position: absolute; top: 2px; inset-inline-start: 3px; font-size: 10px; line-height: 1; }

.sched-row {
  display: grid; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 8px;
}
.sched-row:hover { background: var(--ice); }
.sched-text-input, .sched-select, .sched-num-input {
  padding: 8px 10px; border-radius: 7px; border: 1px solid #DADFDD; font-family: inherit; font-size: 13.5px; width: 100%; box-sizing: border-box;
}
.sched-color-input { width: 36px; height: 32px; border: none; border-radius: 6px; padding: 0; cursor: pointer; background: none; }
.sched-row-del { background: none; border: none; color: #B23; font-size: 15px; cursor: pointer; font-family: inherit; padding: 4px; }

.sched-teacher-card { border: 1px solid #EDEFEE; border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.sched-teacher-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.sched-teacher-head .sched-text-input { max-width: 320px; font-weight: 700; }
.sched-subfield-label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-dark); margin: 12px 0 8px; }
.sched-check-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.sched-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dark); cursor: pointer; }

.sched-add-more { display: flex; justify-content: center; padding: 6px 0 2px; }

.sched-avail-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%; margin: 12px 0 8px; padding: 0;
  background: none; border: none; cursor: pointer; font-family: inherit; text-align: right;
  font-size: 12px; font-weight: 700; color: var(--ink-dark);
}
.sched-avail-arrow { font-size: 10px; display: inline-block; }

.sched-avail-grid { display: grid; gap: 4px; overflow-x: auto; }
.sched-avail-row { display: grid; grid-template-columns: 34px repeat(var(--sched-avail-cols), minmax(30px, 1fr)); gap: 4px; }
.sched-avail-label { font-size: 11px; color: var(--grey); display: flex; align-items: center; justify-content: center; }
.sched-avail-daylabel { font-size: 11.5px; font-weight: 700; color: var(--ink-dark); text-align: center; padding-bottom: 2px; }
.sched-avail-cell {
  height: 26px; border-radius: 5px; border: 1px solid #DEE6E2; background: #F3F8F6; cursor: pointer; padding: 0;
}
.sched-avail-cell:hover { border-color: var(--ink); }
.sched-avail-cell.off { background: #F6D9D9; border-color: #D98; }

/* Paywall gate — same look as the sites.html unlock panel (this site's
   established "free to build, pay to generate/download" pattern), just
   scoped with #sched-unlock-gate instead of that page's own ids so both
   can load the same class names without colliding. */
#sched-unlock-gate .unlock-box { border-top: 1px solid #E2DCC8; margin-top: 4px; padding-top: 16px; }
#sched-unlock-gate .unlock-box input[type="text"] {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; border: 1px solid #DADFDD;
  font-family: inherit; font-size: 14px; margin-bottom: 10px; text-align: center;
}
.unlock-note { font-size: 12.5px; color: var(--grey); min-height: 16px; margin-bottom: 8px; }
.unlock-note.err { color: #B23; }
.unlock-note.ok { color: var(--ink); font-weight: 600; }

.sched-result-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.sched-result-actions { display: flex; gap: 10px; align-items: center; }
.sched-solver-status { font-size: 13px; color: var(--grey); margin-top: 12px; min-height: 18px; }
.sched-solver-status.running { color: var(--ink-dark); font-weight: 600; }
.sched-health { margin-top: 10px; background: #FDF1E4; color: #7A4A12; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.sched-health ul { margin: 6px 0; padding-inline-start: 18px; }
.sched-health .btn-mini { margin-top: 6px; }
.sched-row.sched-row-warn { background: #FDF1E4; }

.sched-result-viewbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sched-view-toggle { display: flex; gap: 6px; }
.sched-view-btn {
  background: var(--ice); color: var(--ink-dark); border: none; padding: 7px 16px; border-radius: 20px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.sched-view-btn.active { background: var(--ink); color: var(--white); }
.sched-result-viewbar select { padding: 7px 10px; border-radius: 7px; border: 1px solid #DADFDD; font-family: inherit; font-size: 13px; }
.sched-conflict-badge { background: #F6D9D9; color: #A32; border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 700; }
.sched-result-export { display: flex; gap: 8px; margin-inline-start: auto; flex-wrap: wrap; }

.sched-grid { display: grid; gap: 4px; overflow-x: auto; }
.sched-grid-row { display: grid; grid-template-columns: 60px repeat(var(--sched-grid-cols), minmax(90px, 1fr)); gap: 4px; }
.sched-grid-corner { background: none; }
.sched-grid-daylabel { font-size: 13px; font-weight: 700; color: var(--ink-dark); text-align: center; padding: 6px 0; }
.sched-grid-plabel { font-size: 12.5px; color: var(--grey); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.sched-grid-cell { min-height: 56px; border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.sched-grid-cell.empty { background: #F7F9F8; border: 1px dashed #E1E7E4; }
.sched-grid-cell.filled {
  background: #F3F8F6;
  background: color-mix(in srgb, var(--sched-subj-color) 16%, white);
  border-inline-start: 4px solid var(--sched-subj-color);
  cursor: grab;
}
.sched-grid-cell.filled:active { cursor: grabbing; }
.sched-grid-cell.conflict { outline: 2px solid #C33; outline-offset: -2px; }
.sched-cell-subj { font-size: 12.5px; font-weight: 700; color: var(--ink-dark); }
.sched-cell-sub { font-size: 11px; color: var(--grey); }

#sched-print-all-holder { display: none; }
.sched-print-page { page-break-after: always; padding: 20px 0; }
.sched-print-page h2 { font-size: 18px; margin: 0 0 14px; }

@media (max-width: 860px) {
  .sched-subject-cols, .sched-room-cols, .sched-assign-cols, .sched-class-cols { grid-template-columns: 1fr; }
  .sched-col-labels { display: none; }
  .sched-row { border: 1px solid #EDEFEE; margin-bottom: 8px; }
}

@media print {
  body.sched-printing-all .no-print,
  body.sched-printing-all #sched-result-grid-wrap { display: none !important; }
  body.sched-printing-all #sched-print-all-holder { display: block !important; }
  .sched-tabs-nav, .sched-tab-panel:not([data-tab-panel="result"]) { display: none !important; }
  .sched-grid-cell.filled { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Touch screens: finger-sized controls (responsive audit, tests/responsive/audit.py). */
@media (hover: none) and (pointer: coarse) {
  .sched-card .field select, .sched-select, .sched-text-input, .sched-num-input { min-height: 40px; }
  .sched-row-del { min-width: 40px; min-height: 40px; }
}

/* parallel groups ("הקבצות") */
.sched-group-card { border: 1px solid rgba(139, 140, 255, .35); border-radius: 14px; padding: 12px; margin: 0 0 12px; display: grid; gap: 8px; }
.sched-group-head { display: grid; grid-template-columns: 1fr 110px 100px 52px 34px; gap: 8px; align-items: end; }
.sched-mini-field { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; opacity: .9; }
.sched-group-classes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sched-group-label { font-size: 13px; font-weight: 600; opacity: .85; }
.sched-chip { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(127, 127, 127, .35); font-size: 13.5px; cursor: pointer; }
.sched-chip input { accent-color: #8b8cff; }
.sched-group-item { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 8px; align-items: center; }
@media (max-width: 760px) { .sched-group-head { grid-template-columns: 1fr 1fr; } .sched-group-item { grid-template-columns: 1fr 1fr 34px; } }

/* Numbered steps (js/schedule-render.js schedRefreshSteps): the number in a
   small circle, ✓ in its place once the step has what it needs, "optional"
   on special rooms, and a "next" button at the end of each step. */
.sched-tab-btn { display: inline-flex; align-items: center; gap: 8px; }
.sched-step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; line-height: 1;
  box-shadow: inset 0 0 0 1.5px currentColor; opacity: .8;
}
.sched-tab-btn.done .sched-step-num { font-size: 0; background: var(--tool, #8b8cff); box-shadow: none; opacity: 1; }
.sched-tab-btn.done .sched-step-num::after { content: "✓"; font-size: 13px; color: #fff; }
.sched-tab-btn.optional .sched-step-label::after { content: " · רשות"; font-weight: 500; opacity: .7; }
html[lang="en"] .sched-tab-btn.optional .sched-step-label::after { content: " · optional"; }
.sched-step-next { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-start; margin: 6px 0 10px; }
.sched-step-next .btn { min-height: 46px; padding-inline: 26px; border-radius: 999px; }
.sched-step-optional { font-size: 13px; opacity: .75; }
@media (max-width: 640px) {
  .sched-tabs-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
  .sched-tabs-nav::-webkit-scrollbar { display: none; }
  .sched-tab-btn { flex: none; }
  .sched-step-next .btn { width: 100%; }
}

/* Phones: the timetable one day at a time (js/schedule-render.js
   resultGridHtml): day buttons above it, and only that day's column. */
.sched-mday-bar { display: none; }
@media (max-width: 640px) {
  .sched-mday-bar { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
  .sched-mday-bar::-webkit-scrollbar { display: none; }
  .sched-mday-btn {
    flex: 1 0 auto; min-width: 46px; min-height: 42px; border-radius: 12px; border: 1px solid rgba(127, 127, 127, .3);
    background: transparent; color: inherit; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  }
  .sched-mday-btn.active { background: var(--tool, #8b8cff); border-color: transparent; color: #fff; }
  .sched-grid { overflow-x: visible; }
  .sched-grid-row { grid-template-columns: 40px 1fr; }
  .sched-grid-cell { min-height: 58px; }
  .sched-grid[data-mday="0"] [data-day]:not([data-day="0"]),
  .sched-grid[data-mday="1"] [data-day]:not([data-day="1"]),
  .sched-grid[data-mday="2"] [data-day]:not([data-day="2"]),
  .sched-grid[data-mday="3"] [data-day]:not([data-day="3"]),
  .sched-grid[data-mday="4"] [data-day]:not([data-day="4"]),
  .sched-grid[data-mday="5"] [data-day]:not([data-day="5"]) { display: none; }
  .sched-grid-header { display: none; }
}
@media print { .sched-mday-bar { display: none !important; } }

/* A focused workspace: no website footer under the tool. */
body.v2-sched > footer.site { display: none; }

/* License: one school, one school year (js/schedule-render.js
   schedRenderLicense): the one-time school-name box, the "licensed to"
   line, and the school's name at the top of every printed timetable. */
.sched-license-box { border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; border: 1.5px solid color-mix(in srgb, var(--tool, #8b8cff) 55%, transparent); background: color-mix(in srgb, var(--tool, #8b8cff) 8%, transparent); }
.sched-license-box:has(.sched-license-line) { padding: 8px 14px; border-width: 1px; }
.sched-license-h { margin: 0 0 4px; font-weight: 800; font-size: 15.5px; }
.sched-license-line { margin: 0; font-size: 13.5px; }
.sched-license-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sched-license-row .sched-text-input { flex: 1 1 240px; min-height: 44px; }
.sched-license-row .btn { min-height: 44px; }
.sched-license-terms { margin: 0 0 10px !important; font-weight: 600; }
.sched-print-school { display: none; }
.sched-print-school-line { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
@media print {
  .sched-print-school { display: block; }
  .sched-license-box { display: none !important; }
}

/* A short top: the tool (the steps) starts right away instead of after a
   tall title area. Breadcrumb, then the title and the project name on one
   line; Save on the same row. */
.builder-top.sched-top { padding: 10px 0 !important; }
.sched-top .sched-name-wrap { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 18px; flex: 1; min-width: 0; }
.sched-top .breadcrumb { flex-basis: 100%; font-size: 13px; }
.sched-top h1 { font-size: 19px !important; margin: 0 !important; }
.sched-top .sched-name-input { font-size: 16px; max-width: 320px; flex: 1; min-width: 180px; margin: 0; padding-top: 4px; padding-bottom: 4px; }
.sched-top .builder-save-btn { padding-top: 9px; padding-bottom: 9px; }
.sched-top + .sched-tabs-nav { padding-top: 12px; }
.sched-top ~ .sched-main { padding-top: 14px; }
@media (max-width: 860px) {
  .sched-top .builder-top-row { flex-direction: row; align-items: center; gap: 10px; flex-wrap: nowrap; }
  .sched-top .sched-name-input { max-width: none; min-width: 0; }
  .sched-top h1 { font-size: 17px !important; }
  .sched-top .builder-save-ctrl .builder-save-status { display: none; }
}

/* ---------- 11.2026 layout: a side bar of steps beside the work area ----------
   (owner's choice: the steps as a list on the side, settings in cards,
   teachers as a list + details, assignments as one table). Everything a
   step needs fits on one screen; on a phone the steps become a row of chips. */
.sched-top .builder-top-row { padding-block: 10px; }
.sched-top h1 { font-size: 19px !important; margin: 2px 0 !important; }
.sched-name-wrap { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.sched-name-wrap .breadcrumb { flex-basis: 100%; font-size: 12.5px; }
.sched-name-input { font-size: 16px; min-width: 220px; color: var(--grey); }
.sched-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; padding-top: 18px; }
.sched-shell .sched-tabs-nav { position: sticky; top: 84px; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 4px; padding: 14px 10px; border-radius: 16px;
  background: var(--white); border: 1px solid #EAEDEC; max-height: calc(100vh - 100px); overflow-y: auto; }
.sched-side-h { margin: 2px 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--grey); }
.sched-shell .sched-tab-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: transparent;
  box-shadow: none !important; opacity: 1; text-align: start; font-size: 14px; color: var(--ink-dark); }
.sched-shell .sched-tab-btn:hover { background: var(--ice); }
.sched-shell .sched-tab-btn.active { background: color-mix(in srgb, var(--tool, #0f8a7a) 12%, transparent); color: var(--ink-dark); }
.sched-shell .sched-tab-btn.active .sched-step-num { background: var(--tool, #0f8a7a); color: #fff; }
.sched-step-count { margin-inline-start: auto; font-size: 12px; font-weight: 600; color: var(--grey); white-space: nowrap; }
.sched-side-foot { margin-top: auto; padding-top: 14px; }
.sched-side-foot .btn { width: 100%; box-sizing: border-box; }
.sched-shell .sched-main { padding: 0 0 60px; min-width: 0; }
.sched-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 14px; }
.sched-panel-head h2 { margin: 0; font-size: 21px; color: var(--ink-dark); }
.sched-panel-head p { margin: 0; color: var(--grey); font-size: 13.5px; }
.sched-cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sched-cards2 .sched-card { margin-bottom: 0; }
.sched-card h3 + .sched-hint { margin-top: -10px; }
.sched-inline-fields { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sched-inline-fields .field { margin-bottom: 8px; }
.sched-tip .sched-hint { margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: #FFF8EB; border: 1px solid #F5C26B; color: #7A4A00; }
.sched-step-next { margin-top: 16px; }
.sched-cards2 > .sched-step-next-cell { margin: 0; align-self: end; justify-content: flex-end; }
/* teachers: list + details */
.sched-md { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.sched-md-list { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; }
.sched-tl-search { margin-bottom: 8px; }
.sched-tl { display: flex; flex-direction: column; gap: 2px; }
.sched-tl-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: start; font: inherit; color: inherit; }
.sched-tl-row:hover { background: var(--ice); }
.sched-tl-row.on { background: color-mix(in srgb, var(--tool, #0f8a7a) 12%, transparent); }
.sched-tl-row:focus-visible { outline: 2px solid var(--tool, #0f8a7a); outline-offset: -2px; }
.sched-tl-av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--tool, #0f8a7a); }
.sched-tl-txt { display: flex; flex-direction: column; min-width: 0; }
.sched-tl-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-tl-txt small { font-size: 12px; color: var(--grey); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-tl-h { margin-inline-start: auto; font-size: 12px; color: var(--grey); white-space: nowrap; }
.sched-md-detail .sched-teacher-card { margin: 0; border: 0; padding: 0; }
.sched-md-detail .sched-teacher-head .sched-text-input { font-size: 17px; }
/* assignments: subjects × classes */
.sched-mx-mode .sched-assign-cols.sched-col-labels, .sched-mx-mode #sched-add-assignment { display: none; }
.sched-view-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ice); margin-inline-start: auto; margin-inline-end: 10px; }
.sched-view-switch button { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 7px; cursor: pointer; color: var(--grey); }
.sched-view-switch button[aria-pressed="true"] { background: var(--white); color: var(--ink-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.sched-mx-wrap { position: relative; overflow-x: auto; border: 1px solid #EAEDEC; border-radius: 12px; }
.sched-mx { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.sched-mx th, .sched-mx td { padding: 4px; border-bottom: 1px solid #EEF1EF; text-align: center; }
.sched-mx thead th { position: sticky; top: 0; background: #F6F8F7; font-size: 12.5px; color: var(--ink-dark); padding: 9px 6px; white-space: nowrap; z-index: 1; }
.sched-mx tbody th, .sched-mx tfoot th, .sched-mx thead th:first-child { position: sticky; inset-inline-start: 0; background: #F6F8F7; text-align: start; font-weight: 700; padding-inline: 12px; white-space: nowrap; z-index: 2; }
.sched-mx-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 7px; vertical-align: middle; }
.sched-mx-cell { width: 100%; min-width: 64px; min-height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid transparent; border-radius: 8px;
  background: color-mix(in srgb, var(--tool, #0f8a7a) 8%, transparent); cursor: pointer; font: inherit; color: inherit; padding: 4px; }
.sched-mx-cell b { font-size: 14px; }
.sched-mx-cell small { font-size: 11.5px; color: var(--grey); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-mx-cell.empty { background: transparent; border: 1px dashed #DADFDD; color: #B5BDBA; font-size: 16px; }
.sched-mx-cell:hover, .sched-mx-cell.open { border-color: var(--tool, #0f8a7a); }
.sched-mx-cell.warn { background: #FDF1E4; }
.sched-mx-cell:focus-visible { outline: 2px solid var(--tool, #0f8a7a); outline-offset: 1px; }
.sched-mx-sum { font-weight: 700; color: var(--grey); }
.sched-mx tfoot td { font-weight: 700; font-size: 12.5px; padding: 9px 4px; background: #F6F8F7; }
.sched-mx tfoot td.over { color: #B42318; background: #FEF3F2; }
.sched-mx-pop { position: sticky; inset-inline-start: 12px; bottom: 12px; margin: 10px 12px 12px; max-width: 460px; padding: 12px 14px; border-radius: 12px; background: var(--white);
  border: 1px solid var(--tool, #0f8a7a); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .35); }
.sched-mx-pop-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sched-mx-x { border: 0; background: transparent; cursor: pointer; font-size: 14px; color: var(--grey); padding: 4px 8px; border-radius: 6px; }
.sched-mx-pop-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.sched-mx-hours { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--grey); }
.sched-mx-hours input { width: 64px; }
.sched-mx-pop-acts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 6px; }
.btn-link { border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--tool, #0f8a7a); cursor: pointer; text-decoration: underline; padding: 4px; }
@media (max-width: 980px) {
  .sched-shell { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sched-shell .sched-tabs-nav { position: static; flex-direction: row; overflow-x: auto; max-height: none; padding: 8px; }
  .sched-shell .sched-tab-btn { width: auto; flex: none; padding: 8px 12px; }
  .sched-side-h, .sched-side-foot, .sched-step-count { display: none; }
  .sched-cards2, .sched-md { grid-template-columns: minmax(0, 1fr); }
  .sched-md-list { position: static; max-height: 260px; }
}
/* Wide screens: the work area uses the width (the site's .container is narrower). */
.container.sched-shell, .sched-top .container.builder-top-row { max-width: min(1440px, 100%); }
.sched-mx-cell small { max-width: 150px; }
