#batch-switcher { display:grid; gap:10px; width:100%; min-width:0; padding:0 8px 24px; border-bottom:1px solid var(--stroke,#dfdcd8); }
#batch-switcher[hidden] { display:none; }
.batch-dialog,.batch-dialog * {box-sizing:border-box;}
#batch-switcher label { display:grid; gap:6px; min-width:0; font-size:12px; color:var(--text-muted,var(--muted,#696560)); }
#batch-switcher label>span { font-weight:650; color:var(--ink,#203836); }
#batch-switcher select { width:100%; max-width:none; min-width:0; min-height:44px; padding:8px 10px; border:1px solid var(--stroke,#dfdcd8); border-radius:6px; background:white; color:var(--ink,#203836); font:inherit; }
#batch-switcher button,.batch-dialog button { min-height:44px; padding:8px 14px; }
#batch-switcher button,.batch-dialog button { border:1px solid var(--stroke,#dfdcd8); border-radius:6px; background:white; color:var(--ink,#203836); font:inherit; cursor:pointer; }
#batch-switcher button { width:100%; }
.batch-dialog button:disabled { opacity:.55; cursor:default; }
#batch-switcher [role=alert],.batch-dialog [role=alert] { color:#a92c47; }
.batch-dialog { width:min(960px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; border:1px solid var(--stroke,#ddd); border-radius:8px; color:var(--ink,#222); background:white; }
.batch-dialog::backdrop { background:rgb(0 0 0 / .3); }
.batch-dialog header {display:flex;justify-content:space-between;align-items:center;gap:16px;}
.batch-dialog h2 {font-size:22px;margin:0;}
.batch-dialog label {display:grid;gap:6px;font-size:13px;min-width:0;}
.batch-dialog input,.batch-dialog select {width:100%;min-width:0;min-height:44px;border:1px solid var(--stroke,#ddd);border-radius:4px;padding:8px;background:white;color:inherit;}
.batch-dialog input[type=checkbox] {width:20px;min-height:20px;}
.batch-library-row {display:flex;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--stroke,#ddd);flex-wrap:wrap;}
.batch-library-row>div {flex:1;min-width:180px;overflow-wrap:anywhere;}
.batch-library-row small {display:block;color:var(--muted,#666);margin-top:5px;}
.batch-status-note {display:inline-flex;align-items:center;min-height:32px;padding:5px 10px;border-radius:999px;background:#eef7f6;color:#17635b;font-size:13px;font-weight:650;}
.batch-application-form {display:grid;gap:16px;max-width:520px;}
.batch-application-form p {margin:0;line-height:1.55;}
.batch-form-note {color:var(--muted,#666);font-size:13px;}
.batch-readiness {padding:14px 18px;border:1px solid #b9ddd9;border-radius:8px;background:#f2faf9;margin:18px 0;}
.batch-readiness[role=alert] {border-color:#d9a3af;background:#fff7f9;}
.batch-readiness h3 {margin:0;}
.batch-readiness p,.batch-readiness ul {margin-bottom:0;line-height:1.6;}
.batch-review-counts {display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:14px;padding:0;}
.batch-review-counts div {padding:12px;border:1px solid var(--stroke,#ddd);border-radius:6px;}
.batch-review-counts dt {font-size:13px;color:var(--muted,#666);}
.batch-review-counts dd {margin:6px 0 0;font-size:22px;font-weight:650;}
.batch-application-form button {justify-self:start;}
.batch-application-success {display:grid;gap:10px;padding:18px;border:1px solid #b9ddd9;border-radius:8px;background:#f2faf9;}
.batch-application-success p {margin:0;line-height:1.55;}
.batch-application-success button {justify-self:start;}
.batch-application-row {display:flex;align-items:center;gap:16px;padding:16px 0;border-bottom:1px solid var(--stroke,#ddd);}
.batch-application-row>div:first-child {flex:1;min-width:0;}
.batch-application-row small {display:block;color:var(--muted,#666);margin-top:5px;}
.batch-application-actions {display:flex;gap:8px;flex-wrap:wrap;}
.batch-application-actions label {min-width:180px;}
.batch-application-actions [data-review="approved"] {border-color:#167c72;color:#12645c;}
.batch-application-actions [data-review="rejected"] {border-color:#d9a3af;color:#942d43;}
.batch-editor-fields,.batch-editor-row {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.batch-editor-row {padding:16px 0;border-bottom:1px solid var(--stroke,#ddd);}
.batch-group-setup {margin:22px 0 0;padding:18px;border:1px solid var(--stroke,#ddd);border-radius:8px;}
.batch-group-setup legend {padding:0 6px;font-weight:700;}
.batch-group-setup .batch-form-note {margin-top:0;}
.batch-slot-block {margin:14px 0;border:1px solid var(--stroke,#ddd);border-radius:8px;overflow:hidden;}
.batch-slot-block>header {padding:12px 14px;background:#f7f9f9;border-bottom:1px solid var(--stroke,#ddd);}
.batch-slot-block>header span {display:grid;gap:3px;}
.batch-slot-block>header small {color:var(--muted,#666);}
.batch-slot-block.is-parallel {border-left:4px solid #167c72;}
.batch-slot-block .batch-editor-row {padding:14px;margin:0;}
.batch-slot-block .batch-editor-row:last-child {border-bottom:0;}
.batch-day-section {margin:18px 0 24px;}
.batch-day-section>header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 0 8px;border-bottom:1px solid var(--stroke,#ddd);}
.batch-day-section>header h3 {margin:0;font-size:17px;}
.batch-day-empty {margin:12px 0 0;color:var(--muted,#666);font-size:13px;}
.batch-timetable-version,.batch-timetable-first {margin:16px 0 24px;padding:16px;border:1px solid var(--stroke,#ddd);border-radius:8px;background:#f7f9f9;}
.batch-timetable-version {display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr);gap:16px;align-items:start;}
.batch-timetable-version>div>p,.batch-timetable-new p,.batch-timetable-first p {margin:7px 0 0;color:var(--muted,#666);font-size:13px;line-height:1.5;}
.batch-timetable-version details {border-left:1px solid var(--stroke,#ddd);padding-left:16px;}
.batch-timetable-version summary {min-height:44px;display:flex;align-items:center;font-weight:650;cursor:pointer;}
.batch-timetable-new {display:grid;gap:12px;padding-top:10px;}
.batch-timetable-new button {justify-self:start;}
.batch-timetable-first h3 {margin:0;font-size:17px;}
.batch-timetable-first>div {display:grid;grid-template-columns:minmax(180px,260px) auto;gap:12px;align-items:end;margin-top:14px;}
.batch-dialog nav {display:flex;flex-wrap:wrap;gap:6px;margin:20px 0;}
.batch-dialog nav [aria-pressed=true] {border-bottom:3px solid #167c72;}
.batch-dialog footer {display:flex;justify-content:flex-end;margin-top:20px;}
.batch-dialog .batch-archive {display:flex;align-items:center;gap:8px;}
.batch-groups-form {display:grid;gap:18px;}
.batch-group-intro {padding:14px 16px;border-left:3px solid #167c72;background:#f2faf9;}
.batch-group-intro p {margin:5px 0 0;color:var(--muted,#666);font-size:13px;line-height:1.5;}
.batch-group-domain {margin:0;padding:18px;border:1px solid var(--stroke,#ddd);border-radius:8px;}
.batch-group-domain>legend {padding:0 6px;font-weight:700;}
.batch-group-option-row {grid-template-columns:minmax(160px,1.4fr) repeat(2,minmax(120px,1fr)) auto;align-items:end;}
.batch-domain-archive {margin-top:16px;}
.batch-purpose-actions {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;}
.batch-purpose-actions button {display:grid;gap:4px;text-align:left;padding:14px 16px;}
.batch-purpose-actions button span {color:var(--muted,#666);font-size:12px;line-height:1.4;}
.batch-legacy-group-note {padding:14px 16px;border:1px solid #dedcd8;border-radius:8px;background:#f7f9f9;}
.batch-legacy-group-note p {margin:5px 0 0;color:var(--muted,#666);font-size:13px;}
@media(max-width:600px){.batch-dialog{padding:16px;}.batch-editor-fields,.batch-editor-row,.batch-group-option-row,.batch-timetable-version,.batch-timetable-first>div{grid-template-columns:1fr;}.batch-application-row{align-items:stretch;flex-direction:column;}.batch-application-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;}.batch-application-actions label{grid-column:1/-1;}.batch-application-actions button{width:100%;}.batch-slot-block>header,.batch-day-section>header{align-items:flex-start;flex-direction:column;}.batch-slot-block>header button,.batch-day-section>header button,.batch-timetable-first button,.batch-timetable-new button{width:100%;}.batch-timetable-version details{border-left:0;border-top:1px solid var(--stroke,#ddd);padding:8px 0 0;}}
#legacy-cohort-control[hidden] { display: none !important; }
.batch-control-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.batch-control-actions label { display: grid; gap: 8px; min-width: min(100%, 260px); }
.batch-control-actions select, .batch-control-actions button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--stroke, #dfdcd8); border-radius: 6px; background: white; color: var(--ink, #203836); font: inherit; }
.batch-control-actions button { cursor: pointer; }
.batch-control-actions button:disabled { cursor: default; opacity: .55; }
.batch-control-summary { padding: 24px 0; }
.batch-control-summary h2 { font-size: 20px; margin: 0 0 8px; }
.batch-control-summary p { margin: 0; }
#independent-batch-control > button { margin-top: 16px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--stroke, #dfdcd8); border-radius: 6px; background: white; color: inherit; font: inherit; }
.batch-calendar-form {display:grid;gap:18px;}
.batch-calendar-form .batch-slot-block fieldset {border:0;min-width:0;}
.batch-calendar-form .batch-slot-block header {flex-wrap:wrap;}
.batch-calendar-form .batch-slot-block header span {font-size:13px;color:var(--muted,#696560);}
.batch-calendar-form [data-calendar-saved] {color:#12645c;margin:0;}
.batch-calendar-form [data-calendar-add] {justify-self:start;}
.batch-calendar-form [data-calendar-lessons]>h3 {font-size:18px;}
.batch-calendar-form [data-calendar-lessons] button {align-self:end;}
.batch-calendar-form button:focus-visible,.batch-calendar-form input:focus-visible,.batch-calendar-form select:focus-visible {outline:2px solid #167c72;outline-offset:3px;}
.batch-recovery {flex-basis:100%;min-width:0;padding:12px;border:1px solid var(--stroke,#ddd);border-radius:8px;line-height:1.5;overflow-wrap:anywhere;}
.batch-recovery p {margin:0 0 12px;}
.batch-recovery button {min-height:44px;margin:4px 0;padding:8px 14px;white-space:normal;border:1px solid var(--stroke,#ddd);border-radius:6px;background:var(--forest-panel,#fff);color:inherit;cursor:pointer;}
.batch-recovery button:disabled {opacity:.55;cursor:default;}
#batch-recovery-notice[hidden] {display:none;}
#batch-recovery-notice .batch-recovery {background:var(--forest-panel,#fff);color:var(--ink,#203836);margin:0 0 12px;}
#batch-recovery-notice .batch-recovery[role=alert] {border-color:var(--forest-amber,#8c4b0b);}
.app-sidebar #batch-switcher .batch-recovery {color:inherit;font-size:13px;border-color:currentColor;}
.app-sidebar #batch-switcher .batch-recovery[role=alert] {color:#ffccd7;}

/* Date-first moderator workspace, matching the student's lecture calendar. */
#independent-batch-control .batch-calendar-entry {display:grid;gap:5px;margin:0 0 20px;padding:16px 20px;background:var(--forest-ink,#0f766e);color:white;text-align:left;border:0;}
.batch-calendar-entry strong {font-size:17px;}
.batch-calendar-entry span {font-size:13px;}
.batch-dialog.batch-lecture-calendar {width:min(1220px,calc(100vw - 32px));padding:24px;background:var(--forest-paper,#f1fcfb);}
.batch-lecture-calendar [data-error]:empty {display:none;}
.batch-calendar-batch {margin:0;color:var(--muted,#494641);font-size:14px;}
.batch-calendar-layout {display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:28px;align-items:start;}
.batch-calendar-month {padding:20px;background:white;border:1px solid var(--stroke,#dce6e5);border-radius:12px;}
.batch-calendar-month-nav {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;}
.batch-calendar-month-nav h3 {margin:0;font-size:19px;text-align:center;}
.batch-calendar-month-nav button {width:44px;font-size:24px;line-height:1;}
.batch-calendar-weekdays,.batch-calendar-dates {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;}
.batch-calendar-weekdays {margin-bottom:8px;text-align:center;font-size:12px;font-weight:650;color:var(--muted,#494641);}
.batch-lecture-calendar .batch-calendar-dates button {display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;min-height:64px;padding:8px;border:1px solid transparent;background:transparent;border-radius:8px;font-size:14px;}
.batch-calendar-dates button small {height:14px;line-height:14px;font-size:11px;color:#21645d;}
.batch-lecture-calendar .batch-calendar-dates button:hover:not(:disabled) {border-color:#24635d;background:#e9f5f4;}
.batch-lecture-calendar .batch-calendar-dates button.is-outside {opacity:.55;}
.batch-lecture-calendar .batch-calendar-dates button.is-holiday {background:#fff2dc;color:#824309;}
.batch-lecture-calendar .batch-calendar-dates button[aria-current=date] {border-color:#24635d;}
.batch-lecture-calendar .batch-calendar-dates button[aria-pressed=true] {background:#0f766e;color:white;opacity:1;}
.batch-calendar-dates button[aria-pressed=true] small {color:#aceee7;}
.batch-calendar-legend {display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:#494641;margin:14px 0 20px;}
.batch-calendar-filters {display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-top:16px;border-top:1px solid var(--stroke,#dce6e5);}
.batch-calendar-month .batch-form-note {line-height:1.6;margin-bottom:0;}
.batch-calendar-day {min-width:0;}
.batch-lecture-calendar .batch-calendar-day-heading {display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;margin-bottom:18px;}
.batch-calendar-day-heading h3 {margin:0;flex:1;font-size:21px;line-height:1.35;min-width:200px;}
.batch-lecture-calendar .batch-calendar-lesson {padding:18px;margin:0 0 14px;background:white;border-radius:12px;}
.batch-lecture-calendar .batch-calendar-lesson>header {padding:0;border:0;background:transparent;flex-direction:row;}
.batch-lecture-calendar .batch-calendar-lesson header .batch-calendar-time {font-size:13px;color:#494641;}
.batch-calendar-lesson h4 {font-size:17px;margin:14px 0 6px;line-height:1.4;}
.batch-calendar-lesson-status {font-size:12px;color:#494641;margin:0 0 16px;}
.batch-calendar-lesson-actions {display:flex;flex-wrap:wrap;gap:8px;padding-top:14px;border-top:1px solid var(--stroke,#dce6e5);}
.batch-lecture-calendar [data-day-edit] {background:#0d9488;color:white;border-color:#0d9488;}
.batch-lecture-calendar [data-day-edit]:hover:not(:disabled) {background:#0f766e;}
.batch-lecture-calendar [data-day-cancel] {color:#9f2741;border-color:#e9bfc8;}
.batch-lecture-calendar .batch-calendar-lesson fieldset {padding:18px 0 0;grid-template-columns:1fr 1fr;}
.batch-lecture-calendar fieldset[hidden] {display:none;}
.batch-calendar-swap {grid-column:1/-1;}
.batch-calendar-swap label {margin:8px 0;}
.batch-calendar-swap summary,.batch-calendar-day-settings summary {min-height:44px;padding:12px 0;font-size:14px;cursor:pointer;}
.batch-calendar-day-settings {margin-top:16px;border-top:1px solid var(--stroke,#dce6e5);}
.batch-calendar-day-settings .batch-form-note {line-height:1.6;}
.batch-calendar-save {position:sticky;bottom:-24px;z-index:1;display:flex;justify-content:space-between;gap:16px;align-items:center;padding:16px 0;background:var(--forest-paper,#f1fcfb);border-top:1px solid var(--stroke,#dce6e5);}
.batch-calendar-save span {font-size:13px;color:#494641;}
.batch-lecture-calendar .batch-calendar-save button {background:#0f766e;color:white;border-color:#0f766e;}
.batch-visually-hidden {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;}
@media(max-width:780px){
  .batch-dialog.batch-lecture-calendar {padding:12px;width:calc(100vw - 16px);max-width:calc(100vw - 16px);}
  .batch-calendar-layout {grid-template-columns:1fr;gap:24px;}
  .batch-calendar-month {padding:12px;}
  .batch-lecture-calendar .batch-calendar-dates button {min-height:48px;padding:5px;}
  .batch-calendar-save {bottom:-12px;align-items:stretch;flex-direction:column;gap:8px;}
  .batch-calendar-month>.batch-form-note {display:none;}
  .batch-calendar-day-heading h3 {font-size:20px;}
}
@media(max-width:400px){.batch-lecture-calendar .batch-calendar-lesson fieldset {grid-template-columns:1fr;}.batch-calendar-filters input,.batch-calendar-filters select {font-size:12px;padding:6px;}}
.batch-auto-approve {display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:24px;padding:18px;border:1px solid var(--stroke,#dfdcd8);border-radius:8px;background:white;}
.batch-auto-approve p {margin:5px 0 0;color:var(--muted,#696560);font-size:13px;line-height:1.5;}
.batch-auto-approve [role="switch"] {display:flex;align-items:center;gap:10px;flex-shrink:0;min-height:44px;padding:8px 12px;border:1px solid var(--stroke,#dfdcd8);border-radius:8px;background:white;color:var(--ink,#203836);cursor:pointer;}
.batch-switch-track {display:block;width:36px;height:22px;border-radius:20px;background:var(--stroke,#dfdcd8);padding:3px;}
.batch-switch-track>span {display:block;width:16px;height:16px;border-radius:50%;background:white;box-shadow:0 1px 2px #0003;transition:transform 160ms ease;}
.batch-auto-approve [aria-checked="true"] .batch-switch-track {background:var(--forest,#214e4a);}
.batch-auto-approve [aria-checked="true"] .batch-switch-track>span {transform:translateX(14px);}
.batch-auto-approve [role="switch"]:focus-visible {outline:3px solid var(--forest,#214e4a);outline-offset:3px;}
.batch-auto-approve [role="switch"]:disabled {opacity:.55;cursor:default;}
@media(prefers-reduced-motion:reduce){.batch-switch-track>span{transition:none;}}
