.schedule-workspace { padding: 20px 22px; }
.schedule-print-frame { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.schedule-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.schedule-heading-row h1 { margin: 0; font-size: 25px; line-height: 1.3; color: var(--ink, #203a3e); }
.schedule-workspace .schedule-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 0 0 14px; margin: 0; }
.schedule-period-controls, .schedule-action-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.schedule-workspace .schedule-toolbar button, .schedule-workspace .schedule-toolbar a, .schedule-workspace .schedule-toolbar summary, .schedule-workspace .schedule-tools-toolbar button { min-height: 36px; padding: 7px 12px; font-size: 13px; line-height: 20px; }
.schedule-workspace #week-date-control { margin: 0; }
.schedule-workspace #week-start { width: 148px; min-height: 36px; padding: 7px 10px; font-size: 13px; }
.schedule-view-switch { display: inline-flex; margin-right: 5px; padding: 3px; background: #f0f5f4; border-radius: 8px; gap: 2px; }
.schedule-workspace .schedule-view-switch button { border: 0; background: transparent; min-height: 30px; padding: 4px 12px; }
.schedule-workspace .schedule-view-switch [aria-pressed="true"] { background: #fff; color: #007d69; box-shadow: 0 1px 4px #173d3114; }
.schedule-workspace .schedule-tools-toolbar { padding: 10px 0; margin: 0 0 12px; border-top: 1px solid #dce6e7; border-bottom: 1px solid #dce6e7; gap: 8px; }
.schedule-more { position: relative; }
.schedule-more > summary { list-style: none; cursor: pointer; border: 1px solid #dce6e7; border-radius: 7px; color: #36585e; }
.schedule-more > summary::-webkit-details-marker { display: none; }
.schedule-more-menu { display: grid; position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; min-width: 156px; padding: 6px; background: white; border: 1px solid #dce6e7; border-radius: 8px; box-shadow: 0 8px 28px #173d3126; }
.schedule-more-menu > button, .schedule-more-menu > a { text-align: left; white-space: nowrap; border: 0; background: transparent; box-shadow: none; }
.schedule-workspace .schedule-savebar { justify-content: flex-end; }
.schedule-workspace [hidden] { display: none !important; }
.schedule-workspace .schedule-table th,.schedule-workspace .schedule-table td { box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
.schedule-workspace .schedule-table .pill { white-space: normal; padding: 3px 5px; margin: 1px; }
.schedule-workspace .schedule-table .schedule-entry-note { max-width: 100%; }
.schedule-workspace .schedule-table { max-width: none; }
.schedule-workspace .schedule-month-table th,.schedule-workspace .schedule-month-table td { padding-inline: 4px; }
.schedule-workspace .schedule-month-table td[data-schedule-cell] { font-size: 12px; }
.schedule-workspace .schedule-day-table th,.schedule-workspace .schedule-day-table td { text-align: center; }
.schedule-workspace .schedule-period-controls { flex:0 0 auto; }
.schedule-workspace .schedule-action-controls { margin-left:auto; justify-content:flex-end; flex:0 1 auto; }
.schedule-workspace .schedule-toolbar { justify-content:flex-end; gap:8px; }
.schedule-workspace .schedule-period-controls { margin-right:auto; }
.schedule-workspace .schedule-reference-options { display:flex; align-items:center; gap:8px; font-size:12px; color:#526b70; }
.schedule-reference-options label { display:inline-flex; gap:3px; align-items:center; margin:0; white-space:nowrap; }
.schedule-reference-options input { width:auto; min-height:0; margin:0; }
.schedule-workspace .schedule-reference-options label { min-width:0; flex:0 0 auto; }
.schedule-workspace .schedule-table { min-width:0; }
.schedule-workspace .schedule-week-table { width:100%; min-width:0; font-size:12px; }
.schedule-workspace .schedule-week-table tr:not(.schedule-group)>:nth-child(-n+2){position:sticky;left:var(--personnel-left);width:auto;min-width:0;z-index:4;background:#fff}
.schedule-workspace .schedule-week-table th,.schedule-workspace .schedule-week-table td { padding:5px 2px; }
.schedule-workspace .schedule-week-table td:nth-child(3),.schedule-workspace .schedule-week-table td:nth-child(5),.schedule-workspace .schedule-week-table td:nth-child(6){white-space:nowrap;font-size:11px}
.schedule-workspace .schedule-month-table .schedule-group-toggle{position:sticky;left:8px}
.schedule-workspace .schedule-cell { min-width:0; justify-content:center; }
.schedule-workspace .schedule-pick { text-align:center; padding:3px 1px; min-width:0; font-size:13px; }
.schedule-workspace .schedule-value { display:block; text-align:center; width:100%; }
.schedule-workspace .schedule-cell-readonly { align-content:center; }
.schedule-workspace .schedule-delete { position:absolute; right:0; top:0; border:0; background:#fff1ef; color:#b72d28; padding:0; min-height:18px; width:18px; line-height:18px; opacity:0; pointer-events:none; }
.schedule-workspace .schedule-cell:hover .schedule-delete,.schedule-workspace .schedule-cell:focus-within .schedule-delete { opacity:1; pointer-events:auto; }
.schedule-workspace .schedule-quick-placeholder { color:#008a74; opacity:0; }
.schedule-workspace td:hover .schedule-quick-placeholder,.schedule-workspace td:focus-within .schedule-quick-placeholder { opacity:1; }
.schedule-workspace .schedule-wish-heart { color:#ed2e38; font-size:10px; padding-left:2px; }
.schedule-workspace .schedule-reference-cell { display:grid; color:#687e82; font-size:10px; line-height:1.4; }
.schedule-workspace .schedule-month-table tr:not(.schedule-group)>.schedule-personnel { position:sticky; left:var(--personnel-left); min-width:0; width:auto; z-index:4; background:#fff; }
.schedule-workspace .schedule-month-table thead tr:not(.schedule-group)>.schedule-personnel { z-index:6; background:#71818a; }
.schedule-workspace .schedule-month-table .schedule-personnel:nth-child(8) { box-shadow:3px 0 4px #23484c18; }
.schedule-workspace .schedule-month-table .schedule-group td { position:static; }
.schedule-confirm-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:20px; }
.shift-statistics-actions { justify-content:flex-end; }
.schedule-workspace .schedule-savebar { display:flex; gap:8px; align-items:center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media(max-width: 760px) {
  .schedule-workspace { padding: 14px; }
  .schedule-heading-row { margin-bottom: 12px; }
  .schedule-heading-row h1 { font-size: 22px; }
  .schedule-workspace .schedule-toolbar { align-items: flex-start; }
  .schedule-period-controls { gap: 6px; }
  .schedule-workspace .schedule-toolbar button, .schedule-workspace .schedule-toolbar a { padding-inline: 9px; }
  .schedule-workspace #week-start { width: 137px; }
}

.schedule-workspace .schedule-period-toolbar{display:flex;align-items:center;justify-content:flex-start;gap:12px 20px;padding:12px;margin:0;background:#f2f4f5;border-radius:5px}
.schedule-workspace .schedule-toolbar button,.schedule-workspace .schedule-operations-toolbar button,.schedule-workspace .schedule-operations-toolbar a,.schedule-workspace .schedule-more>summary{min-height:36px;padding:7px 12px;font-size:13px;line-height:20px}
.schedule-workspace .schedule-view-switch{display:inline-flex;flex:0 0 auto;padding:0;background:#fff;border:1px solid #d4dce0;border-radius:5px;gap:0;overflow:hidden}
.schedule-workspace .schedule-view-switch button{border:0;border-right:1px solid #d4dce0;border-radius:0;background:transparent;box-shadow:none;padding:7px 12px}
.schedule-workspace .schedule-view-switch button:last-child{border-right:0}.schedule-workspace .schedule-view-switch [aria-pressed="true"]{background:#e6f3ef;color:#007d69;box-shadow:inset 0 -2px #009b82}
.schedule-workspace .schedule-operations-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;margin:0 0 12px;border-bottom:1px solid #dce6e7}
.schedule-workspace .schedule-tools-toolbar{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;margin-left:auto;gap:8px;padding:0;border:0}
.schedule-workspace .schedule-action-controls{justify-content:flex-start;flex:0 0 auto;margin-left:0}
.schedule-workspace .schedule-department-control{display:inline-flex;align-items:center;flex:0 0 auto;gap:10px;min-width:0;margin:0;white-space:nowrap;font-size:13px}
.schedule-workspace .schedule-department-control select{width:180px;min-width:0;min-height:36px;padding:7px 10px;margin:0;background:#fff;color:#36585e;opacity:1}
.schedule-workspace .schedule-date-tab{background:transparent;border-color:transparent;color:#008a74;box-shadow:none}.schedule-workspace .schedule-date-tab[aria-pressed="true"]{background:#e6f3ef;border-bottom:2px solid #009b82}
.schedule-workspace #day-date-control{margin:0;min-width:0}.schedule-workspace #day-date{min-height:36px;padding:7px 10px;margin:0;width:145px}
.schedule-more-menu{display:grid;position:absolute;z-index:30;top:calc(100% + 6px);right:0;width:210px;max-width:calc(100vw - 32px);max-height:65vh;overflow:auto;box-sizing:border-box;padding:6px;background:#fff;border:1px solid #dce6e7;border-radius:8px;box-shadow:0 8px 28px #173d3126}
.schedule-more:not([open])>.schedule-more-menu{display:none}.schedule-more-group{display:grid;min-width:0;gap:2px;padding:5px 0;border-bottom:1px solid #e5ecec}.schedule-more-group:last-child{border-bottom:0}.schedule-more-heading{display:block;padding:4px 10px;font-size:11px;color:#809094}
.schedule-workspace .schedule-more-group>button,.schedule-workspace .schedule-more-group>a{display:flex;align-items:center;justify-content:flex-start;width:100%;min-width:0;margin:0;text-align:left;white-space:nowrap;border:0;background:transparent;color:#36585e;box-shadow:none;text-decoration:none}
.schedule-workspace .schedule-more-group>button:hover,.schedule-workspace .schedule-more-group>a:hover{background:#edf5f2}.schedule-workspace .schedule-more-menu .schedule-reference-options{display:grid;gap:8px;padding:7px 12px}
.schedule-workspace .schedule-table thead th{position:sticky;top:0}.schedule-workspace .schedule-week-table thead tr:not(.schedule-group)>:nth-child(-n+2){top:0;z-index:7;background:#71818a}
.schedule-workspace .schedule-shift-value{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}
.schedule-workspace .schedule-entry-note{display:inline-flex;flex:0 0 auto;align-items:center;margin:0;padding:0;color:#c53832;font-size:10px;line-height:1;white-space:nowrap;text-align:center}
.schedule-workspace .schedule-statutory-marker{display:block;color:#fff0bc;font-size:10px;font-weight:500;white-space:nowrap;margin-top:2px}
.schedule-notes-copy-tools{display:flex;justify-content:flex-end;margin:0 0 10px}.schedule-notes-copy-preview{padding:10px 12px;margin:12px 0;border:1px solid #dce6e7;border-radius:6px;background:#f5f9f7;font-size:12px}.schedule-notes-copy-preview p{margin-top:0}
.statistics-summary article{display:flex;align-items:center;justify-content:space-between;gap:12px}.statistics-summary strong{margin-top:0;flex:0 0 auto}.statistics-summary span{margin:0}
@media(max-width:760px){.schedule-workspace .schedule-period-toolbar,.schedule-workspace .schedule-operations-toolbar{flex-wrap:wrap;gap:10px}.schedule-workspace .schedule-tools-toolbar{margin-left:0;justify-content:flex-start}}

.schedule-workspace .schedule-department-control,.schedule-workspace .schedule-reference-options label{flex-direction:row}
.schedule-workspace .schedule-tools-toolbar{margin:0 0 0 auto}
.schedule-workspace .schedule-action-controls>a{display:inline-flex;align-items:center;border:1px solid var(--line,#dce6e7);border-radius:7px;background:#fff;color:#36585e;text-decoration:none}
@media(max-width:760px){.schedule-workspace .schedule-tools-toolbar{margin-left:0}}
.schedule-workspace .schedule-more{margin:0;align-self:center}
.shift-department-inline{display:inline-flex;flex-direction:row;align-items:center;gap:8px;white-space:nowrap;margin:0}
.schedule-workspace th.schedule-statutory-day{background:#fff0c9;color:#875b00;font-weight:750}
.schedule-workspace .schedule-edit-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.schedule-workspace .schedule-edit-tools[hidden]{display:none}.schedule-edit-tools .schedule-reference-options{padding:0;margin:0;display:flex;gap:10px}.schedule-savebar #publish-week{margin-left:2px}
.schedule-reference-options button[aria-pressed="true"]{background:#e2f4ee;color:#007d69;border-color:#69b9a6}.schedule-workspace td.schedule-reference-date{background:#f0f4f5;color:#536971}.schedule-workspace th.schedule-reference-date{background:#627780}.schedule-workspace .schedule-current-boundary{border-left:3px solid #008a73}.schedule-reference-help{margin:0 0 8px}

/* 班表保留医院语义色，普通网格提高对比度。 */
@media screen {
  .panel.schedule-workspace .schedule-table {color:#263f47}
  .panel.schedule-workspace .schedule-table th,.panel.schedule-workspace .schedule-table td {border-right-color:#b9c7ce;border-bottom-color:#b9c7ce}
  .panel.schedule-workspace .schedule-table tbody tr:not(.schedule-group):nth-child(even) td:not(.schedule-reference-date) {background:#eaf0f3}
  .panel.schedule-workspace .schedule-table thead th:not(.weekend):not(.calendar-holiday):not(.calendar-workday):not(.schedule-statutory-day):not(.schedule-reference-date) {background:#465f69;color:#fff}
}
