/* Shared, scoped review styling. Never changes printed shift sheets. */
@media screen and (max-width: 1811px) {
  #shiftPlansView .shift-module-shell { position: relative; }
  #shiftPlansView #shiftNavigationToggle { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #c5d3db; border-radius: 10px; background: white; color: var(--navy); text-align: left; font: 400 14px/1.4 var(--bs-font-family); }
  #shiftNavigationToggle strong { flex: 1; min-width: 0; font: 500 16px/1.4 var(--bs-font-family); }
  #shiftPlansView #shiftNavigationToggle:focus-visible { outline: 3px solid #2d8f6866; outline-offset: 2px; }
  #shiftPlansView #shiftNavigation { display: none; }
  #shiftPlansView.shift-navigation-open #shiftNavigation { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); position: absolute; top: 56px; left: 0; right: 0; z-index: 100; box-sizing: border-box; width: 100%; max-width: 600px; max-height: min(520px,70dvh); overflow-y: auto; overflow-x: hidden; margin: 0; padding: 12px; gap: 14px 8px; border: 1px solid #c5d3db; border-radius: 12px; background: white; box-shadow: 0 12px 32px #18334029; }
  #shiftPlansView #shiftNavigation .shift-menu-group, #shiftPlansView #shiftNavigation .shift-menu-items { display: grid; min-width: 0; gap: 4px; }
  #shiftPlansView #shiftNavigation .shift-menu-group[hidden] { display: none; }
  #shiftPlansView #shiftNavigation .shift-menu-group-title { display: block; }
  #shiftPlansView #shiftNavigation button { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 6px; gap: 6px; white-space: normal; overflow-wrap: anywhere; font: 500 14px/1.35 var(--bs-font-family); }
}

.planning-publication-summary{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.planning-publication-summary strong{display:block;padding:10px 14px;border:1px solid #cddbd5;border-radius:8px;background:#f3f8f5;color:#193d2e;font:600 16px/1.4 var(--bs-font-family)}
.planning-dialog details>summary{min-height:44px;cursor:pointer;font:600 16px/1.5 var(--bs-font-family)}
@media screen and (max-width: 700px) {
  #shiftPlansView .shift-heading-warm { min-height: 0; padding: 12px; gap: 8px; margin-bottom: 10px; }
  #shiftPlansView .shift-heading-copy { gap: 10px; }
  #shiftPlansView .shift-heading-icon { width: 40px; height: 40px; flex-basis: 40px; }
  #shiftPlansView .shift-heading-warm h1 { font-size: 22px; }
  #shiftPlansView #shiftPanelDescription { display: none; }
  #shiftPlansView .shift-heading-side { gap: 6px; }
  #shiftPlansView .shift-heading-meta { gap: 6px; }
  #shiftPlansView .shift-heading-actions:has(> :not(.hidden)) { margin-top: 2px; }
}
@media screen {
  #shiftPlansView .shift-heading-context { font: 800 12px/1.4 var(--bs-font-family); letter-spacing: .12em; margin: 0; color: var(--red); }
  #shiftPlansView .shift-toolbar-weeks, #shiftPlansView .shift-toolbar-weeks .bs-select-shell { width: 120px; min-width: 120px; }
  #shiftPlansView .shift-travel-toolbar input[type=date], .hotel-toolbar input[type=date] { box-sizing: border-box; width: 100%; min-width: 160px; min-height: 42px; border: 1px solid #cbd6da; border-radius: 7px; padding: 9px 42px 9px 11px; background: #fff; color: #183340; font: 400 15px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-travel-toolbar { grid-template-columns: minmax(160px,1fr) minmax(165px,1fr) 166px 166px minmax(180px,1.3fr); }
  #shiftPlansView .shift-travel-toolbar label { min-width: 0; }
  #shiftPlansView .shift-travel-toolbar label > span, .hotel-toolbar label > span { font: 400 14px/1.4 var(--bs-font-family); text-transform: none; letter-spacing: normal; }
  #shiftPlansView .hotel-table-wrap td .bs-select-shell { width: 180px; max-width: 100%; }
  .bs-choice-popup:not(.bs-calendar-popup) .bs-choice-option strong { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
  #shiftPlansView .shift-holiday-table-head { display: grid; grid-template-columns: minmax(160px,1fr) minmax(230px,1.2fr) 100px 140px 100px; gap: 16px; }
  #shiftPlansView .shift-publication-sidebar { padding: 12px 16px; }
  #shiftPlansView .shift-publication-sidebar > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer; font: 500 16px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-publication-sidebar > summary::after { content: '⌄'; margin-left: 12px; }
  #shiftPlansView .shift-publication-sidebar > summary > .count { margin-left: auto; }
  #shiftPlansView .shift-publication-sidebar[open] > summary { margin-bottom: 12px; }
  #shiftPlansView.shift-official-mode .shift-heading-warm { min-height: 0; padding-top: 16px; padding-bottom: 16px; }
  #shiftPlansView.shift-official-mode #shiftPanelDescription { display: none; }
  @media (max-width: 1811px) {
    #shiftPlansView.shift-official-mode .shift-grouped-menu { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 8px; }
    #shiftPlansView.shift-official-mode .shift-menu-group, #shiftPlansView.shift-official-mode .shift-menu-items { display: contents; }
    #shiftPlansView.shift-official-mode .shift-menu-group-title { display: none; }
    #shiftPlansView.shift-official-mode .shift-grouped-menu button { flex: none; width: auto; min-height: 44px; white-space: nowrap; }
  }
  #shiftPlansView .shift-publication-sidebar > .section-head { padding: 0; }
  #shiftPlansView .shift-publication-tools { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
  #shiftPublicationList { max-height: 140px; overflow-y: auto; }
  #shiftPlansView .shift-person-name strong { font: inherit; }
  .shift-review-drawer #shiftHolidayForm > div:has(#shiftHolidayCancel) { display: none; }
  #shiftDraftPanel .shift-draft-project-title { flex: 1 1 760px; min-width: 0; }
  #shiftDraftPanel .shift-toolbar-project, #shiftDraftPanel .shift-project-picker { width: min(820px, 100%); max-width: 100%; }
  #shiftDraftPanel #shiftProjectPickerLabel { white-space: normal; overflow-wrap: anywhere; }
  #shiftPlansView .shift-heading-actions .shift-toolbar-view { width: max-content; min-width: 116px; }
  #shiftPlansView .shift-heading-actions .shift-toolbar-view .bs-select-shell { width: max-content; min-width: 116px; flex: none; }
  #shiftPlansView .shift-toolbar-view .bs-select-trigger { width: auto; min-width: 116px; text-align: left; justify-content: space-between; padding: 10px 38px 10px 12px; }
  #shiftPlansView .shift-toolbar-view .bs-select-value { text-align: left; }
  #shiftPlansView .shift-directory-row, #shiftPlansView .shift-directory-table-head { font: 400 16px/1.45 var(--bs-font-family); text-transform: none; letter-spacing: normal; }
  #shiftPlansView .shift-worker-columns { grid-template-columns: minmax(230px,1.35fr) minmax(170px,.8fr) minmax(200px,1fr) 100px; }
  #shiftPlansView .shift-hired-columns { grid-template-columns: minmax(220px,1.3fr) minmax(150px,.8fr) minmax(170px,1fr) minmax(180px,1fr) 100px; }
  #shiftPlansView .shift-directory-row { min-height: 58px; padding: 8px 20px; gap: 16px; }
  #shiftPlansView .shift-directory-row:nth-child(even) { background: #f5f8f9; }
  #shiftPlansView .shift-directory-row > * { min-width: 0; overflow-wrap: anywhere; }
  #shiftPlansView .shift-directory-row > div:first-child { grid-column: auto; }
  #shiftPlansView .shift-worker-identity { display: block; }
  #shiftPlansView :is(.shift-worker-actions,.shift-project-admin-actions) summary { width: 44px; min-height: 44px; box-sizing: border-box; padding: 0; }
  #shiftPlansView .shift-directory-secondary, #shiftPlansView .shift-worker-projects { font: inherit; color: #344b57; }
  #shiftPlansView .shift-worker-projects { display: block; }
  #shiftPlansView .shift-person-name, #shiftPlansView .shift-project-name { display: block; padding: 0; border: 0; background: none; color: var(--navy); text-align: left; font: 500 16px/1.45 var(--bs-font-family); cursor: pointer; }
  #shiftPlansView .shift-person-name:hover, #shiftPlansView .shift-project-name:hover { text-decoration: underline; }
  #shiftPlansView .shift-worker-actions { display: flex; gap: 6px; }
  #shiftPlansView .shift-icon-button { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 10px; border: 1px solid #c5d3db; border-radius: 8px; color: var(--navy); background: white; }
  .shift-icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  #shiftPlansView .shift-hired-overview-grid { display: block; }
  #shiftPlansView .shift-agency-sidebar { display: none; }
  #shiftPlansView .shift-directory-table-head { display: grid; font-size: 14px; font-weight: 500; }
  #shiftPlansView .shift-directory-toolbar label > span { font: 400 14px/1.4 var(--bs-font-family); text-transform: none; letter-spacing: normal; }
  #shiftPlansView .shift-holiday-head-actions label:has(#shiftHolidayYear), #shiftPlansView .bs-select-shell:has(#shiftHolidayYear) { width: 100px; min-width: 100px; }
  #shiftPlansView .shift-directory-metrics { padding: 14px 20px; }
  #shiftPlansView .shift-directory-metrics strong { font: 600 24px/1.3 var(--bs-font-family); }
  #shiftPlansView .shift-directory-metrics span, #shiftPlansView .shift-directory-metrics small { font: 400 14px/1.4 var(--bs-font-family); text-transform: none; }
  #shiftPlansView .shift-project-columns { grid-template-columns: minmax(260px,1.5fr) 110px 100px minmax(180px,1fr) 100px; }
  #shiftPlansView .shift-project-overview-grid { display: block; }
  #shiftPlansView .shift-agency-card header { padding: 18px 20px; }
  #shiftPlansView .shift-agency-card header strong { font: 600 18px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-agency-card header span, #shiftPlansView .shift-agency-card header small { font: 400 14px/1.5 var(--bs-font-family); }
  #shiftPlansView .shift-agency-documents { padding: 18px 20px; }
  #shiftPlansView .shift-agency-upload > summary, #shiftPlansView .shift-year-overview > summary { cursor: pointer; padding: 14px 0; font: 500 16px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-agency-document-form { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 14px; }
  #shiftPlansView .shift-agency-document-form label { display: grid; gap: 6px; font: 400 14px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-agency-document-form input, #shiftPlansView .shift-agency-document-form select { width: 100%; min-width: 0; font: 400 16px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-agency-upload-file, #shiftPlansView .shift-agency-upload-actions { grid-column: 1 / -1; }
  #shiftPlansView .shift-agency-upload-actions { display: flex; gap: 12px; justify-content: flex-end; }
  #shiftPlansView .shift-agency-card button { min-height: 44px; white-space: nowrap; font: 500 14px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-year-overview { margin: 18px 24px; }
  #shiftPlansView .shift-holiday-row { display: grid; grid-template-columns: minmax(160px,1fr) minmax(230px,1.2fr) 100px 140px 100px; gap: 16px; align-items: center; font: 400 16px/1.5 var(--bs-font-family); }
  #shiftPlansView .shift-holiday-row strong { font-weight: 500; font-size: 16px; }
  #shiftPlansView .shift-holiday-swatch { display: grid; place-items: center; width: 34px; height: 34px; flex: none; color: #304987; background: #e6eafd; border-radius: 6px; }
  #shiftPlansView .shift-holiday-row button:not(.shift-icon-button) { font: inherit; background: transparent; color: var(--navy); border: 0; text-align: left; min-height: 44px; }
  #shiftPlansView .shift-holiday-status { display: block; font-size: 14px; color: #607784; }
  .shift-review-drawer { box-sizing: border-box; position: fixed; inset: 0 0 0 auto; margin: 0; width: min(600px,100vw); height: 100dvh; max-height: 100dvh; max-width: 100vw; padding: 0; border: 0; border-left: 1px solid #d4dfe4; background: white; color: var(--navy); font: 400 16px/1.5 var(--bs-font-family); }
  .shift-review-drawer::backdrop { background: #132e4055; }
  .shift-review-drawer[open] { display: flex; flex-direction: column; }
  .shift-review-drawer > header, .shift-review-drawer > footer { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #d4dfe4; }
  .shift-review-drawer > header h2 { margin: 0; font: 600 22px/1.35 var(--bs-font-family); overflow-wrap: anywhere; }
  .shift-review-drawer > header button { flex: none; min-width: 44px; min-height: 44px; }
  .shift-review-drawer > .shift-review-body { flex: 1; overflow-y: auto; padding: 24px; min-height: 0; }
  .shift-review-drawer > footer { justify-content: flex-end; border-bottom: 0; border-top: 1px solid #d4dfe4; padding-bottom: max(20px,env(safe-area-inset-bottom)); }
  .shift-review-drawer label { display: grid; gap: 6px; margin: 0; font: 400 14px/1.5 var(--bs-font-family); }
  .shift-review-drawer label > span { font: inherit; color: #526b78; }
  .shift-review-drawer :is(input,textarea) { color: #183340; border: 1px solid #c5d3db; border-radius: 8px; padding: 10px 12px; }
  .shift-review-drawer :is(.shift-project-form,.shift-holiday-form) > [hidden] { display: none !important; }
  .shift-review-drawer .shift-collapsible-form { animation: none; }
  .shift-review-drawer :is(input,select,textarea) { box-sizing: border-box; min-width: 0; width: 100%; font: 400 16px/1.5 var(--bs-font-family); }
  .shift-review-drawer input { min-height: 44px; }
  .shift-review-drawer .bs-date-input { padding-right: 42px; }
  .shift-review-drawer :is(.bs-date-toggle,.bs-combobox-toggle) { width: 38px !important; }
  .shift-review-drawer :is(button,summary) { font-family: var(--bs-font-family); }
  .shift-review-drawer button { min-height: 44px; }
  .shift-review-drawer :is(.shift-project-form,.shift-holiday-form) { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0; margin: 0; border: 0; background: white; }
  .shift-review-drawer .shift-field-wide { grid-column: 1 / -1; }
  .shift-review-drawer dl { margin: 0; display: grid; gap: 6px; }
  .shift-review-drawer dt { margin-top: 14px; color: #607784; font-size: 14px; }
  .shift-review-drawer dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
  #shiftPlansView .shift-official-layout { grid-template-columns: minmax(0,1fr); }
  #shiftPlansView .shift-official-library { max-height: 220px; overflow: auto; }
  #shiftPlansView #shiftOfficialPreview .official-grid .shift-worker-name { width: 220px !important; min-width: 220px !important; max-width: 220px !important; }
  #shiftPlansView #shiftOfficialPreview .official-grid { table-layout: fixed; width: max-content; }
  #shiftPlansView #shiftOfficialPreview .official-grid .shift-day-header, #shiftPlansView #shiftOfficialPreview .official-grid td:not(.official-shift-group-calendar) { box-sizing: border-box; width: 40px; min-width: 40px; max-width: 40px; padding-inline: 2px; }
  #shiftPlansView #shiftOfficialPreview .official-grid .shift-day-header, #shiftPlansView #shiftOfficialPreview .official-grid .shift-day-header > strong { font-size: 14px; white-space: nowrap; }
  #shiftPlansView #shiftOfficialPreview .official-grid .shift-day-header { height: 44px; font-weight: 400; }
  #shiftPlansView #shiftOfficialPreview .official-grid .shift-day-header small { display: none; }
  #shiftPlansView #shiftOfficialPreview .official-grid .shift-worker-copy strong { text-transform: none; font: 500 16px/1.35 var(--bs-font-family); }
  #shiftPlansView #shiftOfficialPreview .official-grid .shift-worker-person-meta { text-transform: none; font: 400 14px/1.3 var(--bs-font-family); }
  #shiftPlansView #shiftOfficialPreview .official-grid tbody tr[data-official-worker] > :is(th,td) { height: 48px; }
  #shiftPlansView #shiftOfficialPreview .shift-official-grid-wrap { max-height: none; scroll-padding-left: 220px; }
  .official-day-symbol { display: block; text-align: center; font: 600 16px/1 var(--bs-font-family); }
  .official-day-symbol svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  #shiftOfficialPreview .official-grid td.official-assigned { background: #65b889 !important; }
  #shiftOfficialPreview .official-grid td.holiday { background: #e7433a !important; }
  #shiftOfficialPreview .official-grid td.official-absence { background: #fff0cd !important; color: #6d4a00; }
  #shiftOfficialPreview .official-grid td.official-outside { background: #e7e9eb !important; }
  #shiftOfficialPreview .shift-official-legend .on { background: #65b889; }
  #shiftOfficialPreview .shift-official-legend .holiday { background: #e7433a; }
  #shiftOfficialPreview .shift-official-legend .absence { background: #fff0cd; color: #6d4a00; font: 600 12px/1 var(--bs-font-family); text-align: center; }
  #shiftOfficialPreview .official-flight-legend svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  @media(min-width: 701px) and (max-width: 1100px) {
    #shiftPlansView .shift-worker-columns { grid-template-columns: minmax(140px,1fr) minmax(100px,.6fr) minmax(120px,1fr) 98px; }
    #shiftPlansView .shift-hired-columns { grid-template-columns: minmax(140px,1fr) minmax(80px,.6fr) minmax(100px,.7fr) minmax(100px,1fr) 98px; }
    #shiftPlansView .shift-project-columns { grid-template-columns: minmax(180px,1fr) 75px 60px minmax(100px,1fr) 98px; }
    #shiftPlansView :is(.shift-holiday-table-head,.shift-holiday-row) { grid-template-columns: minmax(120px,1fr) minmax(170px,1fr) 80px 100px 98px; gap: 8px; }
    #shiftPlansView .shift-travel-toolbar { grid-template-columns: 1fr 1fr; }
    #shiftPlansView .shift-travel-toolbar label:last-child { grid-column: 1 / -1; }
  }
  @media(max-width: 700px) {
    #shiftPlansView.shift-official-mode .shift-heading-side { display: none; }
    #shiftPlansView.shift-official-mode .shift-heading-icon { width: 40px; height: 40px; flex-basis: 40px; }
    #shiftPlansView.shift-official-mode .shift-heading-warm { margin-bottom: 8px; padding: 12px; }
    #shiftPlansView.shift-official-mode .shift-heading-warm h1 { font-size: 22px; }
    #shiftPlansView .shift-official-head { padding: 14px; gap: 12px; }
    #shiftPlansView .shift-official-preview { padding: 0 !important; }
    #shiftPlansView #shiftOfficialPreview .shift-official-grid-wrap { margin: 0; width: 100%; }
    #shiftPlansView .shift-official-head h2 { font-size: 20px; margin: 4px 0; }
    #shiftPlansView .shift-official-head p { display: none; }
    #shiftPlansView .shift-official-navigation { padding: 8px 12px; gap: 8px; }
    #shiftPlansView .shift-official-date-control { display: none; }
    #shiftPlansView .shift-heading-context { font-size: 10px; }
    #shiftPlansView .shift-holiday-table-head { display: none; }
    #shiftPlansView .shift-travel-toolbar { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    #shiftPlansView .shift-travel-toolbar label:last-child { grid-column: 1 / -1; }
    #shiftPlansView .shift-travel-toolbar input[type=date] { min-width: 0; font-size: 16px; }
    .hotel-toolbar input[type=date] { font-size: 16px; }
    #shiftPlansView .shift-publication-tools { grid-template-columns: 1fr; }
    #shiftPlansView .shift-publication-tools > :not(:has(#shiftPublicationProjectFilter)) { display: none; }
    #shiftPlansView .shift-directory-metrics { display: none; }
    #shiftPlansView .shift-directory-table-head { display: none; }
    #shiftPlansView :is(.shift-worker-columns,.shift-hired-columns) { grid-template-columns: minmax(0,1fr) 98px; gap: 2px 10px; padding: 14px; }
    #shiftPlansView .shift-directory-row .shift-worker-identity { grid-column: 1; grid-row: 1; }
    #shiftPlansView .shift-directory-row .shift-person-role { grid-column: 1; grid-row: 2; font-size: 14px; }
    #shiftPlansView .shift-directory-row .shift-worker-projects { display: none; }
    #shiftPlansView .shift-directory-row .shift-person-agency { display: none; }
    #shiftPlansView .shift-directory-row .shift-worker-actions { grid-column: 2; grid-row: 1 / 3; align-self: center; }
    #shiftPlansView .shift-directory-toolbar { grid-template-columns: 1fr; }
    #shiftPlansView .shift-directory-card, #shiftPlansView .shift-directory-list { min-width: 0; overflow: visible; }
    #shiftPlansView .shift-project-columns { grid-template-columns: minmax(0,1fr) 98px; }
    #shiftPlansView .shift-project-columns > span { display: none; }
    #shiftPlansView .shift-project-admin-actions { grid-column: 2; }
    #shiftPlansView .shift-agency-document-form, .shift-review-drawer :is(.shift-project-form,.shift-holiday-form) { grid-template-columns: 1fr; }
    #shiftPlansView .shift-agency-card header { flex-wrap: wrap; }
    #shiftPlansView .shift-holiday-row { grid-template-columns: minmax(0,1fr) 98px; gap: 8px; }
    #shiftPlansView .shift-holiday-row > :not(.shift-worker-actions) { grid-column: 1; }
    #shiftPlansView .shift-holiday-row .shift-worker-actions { grid-column: 2; grid-row: 1 / 5; }
    #shiftPlansView #shiftOfficialPreview .official-grid .shift-worker-name { width: 116px !important; min-width: 116px !important; max-width: 116px !important; }
    #shiftPlansView #shiftOfficialPreview .official-grid .shift-worker-name-cell { padding: 6px; }
    #shiftPlansView #shiftOfficialPreview .official-grid .shift-worker-copy strong { font-size: 14px; }
    #shiftPlansView #shiftOfficialPreview .official-grid .shift-worker-person-meta { display: none; }
    #shiftPlansView #shiftOfficialPreview .official-grid .shift-day-header, #shiftPlansView #shiftOfficialPreview .official-grid td:not(.official-shift-group-calendar) { width: 36px; min-width: 36px; max-width: 36px; }
    #shiftPlansView #shiftOfficialPreview .shift-official-grid-wrap { scroll-padding-left: 116px; }
    dialog#shiftReviewDrawer { inset: 0 !important; margin: 0 !important; width: 100vw !important; max-width: 100vw !important; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  }
}

@media screen {
  #shiftPlansView .shift-hired-tabbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 26px; border-bottom: 1px solid #d4dfe4; }
  #shiftPlansView .shift-hired-tabbar .shift-subtabs { flex: 1; min-width: 0; margin: 0; border: 0; max-width: none; }
  #shiftPlansView .shift-hired-tabbar .shift-directory-head-actions { flex: none; display: flex; gap: 10px; padding-bottom: 8px; }
  #shiftPlansView .shift-hired-tabbar button { min-height: 44px; white-space: nowrap; font: 500 14px/1.4 var(--bs-font-family); }
  #shiftPlansView #shiftHiredAgenciesView .shift-agency-list { grid-template-columns: minmax(0,1fr); gap: 20px; }
  #shiftPlansView .shift-agency-card { border: 1px solid #d4dfe4; border-radius: 12px; overflow: visible; background: white; }
  #shiftPlansView .shift-agency-card > header { display: flex; align-items: center; gap: 20px; border-radius: 12px 12px 0 0; background: #f5f8f9; }
  #shiftPlansView .shift-agency-identity { flex: 1; min-width: 0; }
  #shiftPlansView .shift-agency-identity strong { display: block; overflow-wrap: anywhere; }
  #shiftPlansView .shift-agency-personnel-count { flex: none; color: #24634d; }
  #shiftPlansView .shift-agency-actions { display: flex; flex: none; gap: 8px; }
  #shiftPlansView .shift-agency-actions-menu { position: relative; }
  #shiftPlansView .shift-agency-actions-menu > summary { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; list-style: none; border: 1px solid #c5d3db; border-radius: 8px; background: white; }
  #shiftPlansView .shift-agency-actions-menu > summary::-webkit-details-marker { display: none; }
  #shiftPlansView .shift-agency-actions-menu > button { position: absolute; right: 0; top: 48px; z-index: 5; min-width: 150px; background: white; }
  #shiftPlansView .shift-agency-contact { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 18px 20px; margin: 0; border-bottom: 1px solid #e1e7ea; }
  #shiftPlansView .shift-agency-contact div { min-width: 0; }
  #shiftPlansView .shift-agency-contact dt { font-size: 14px; color: #607784; }
  #shiftPlansView .shift-agency-contact dd { margin: 4px 0 0; font-size: 16px; overflow-wrap: anywhere; }
  #shiftPlansView .shift-agency-documents-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  #shiftPlansView .shift-agency-documents-heading h4 { margin: 0; font: 600 16px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-agency-documents-heading span { font-size: 14px; color: #607784; }
  #shiftPlansView .shift-agency-empty { padding: 24px; background: #f8fafb; border: 1px dashed #cbd6da; border-radius: 8px; text-align: center; }
  #shiftPlansView .shift-agency-empty strong { font: 500 16px/1.4 var(--bs-font-family); }
  #shiftPlansView .shift-agency-empty p { margin: 6px 0 0; font-size: 14px; color: #607784; }
  #shiftPlansView .shift-agency-upload { margin-top: 16px; }
  #shiftPlansView .shift-agency-upload > summary { display: inline-flex; padding: 10px 16px; min-height: 44px; align-items: center; border: 1px solid #c5d3db; border-radius: 8px; }
  #shiftPlansView .shift-agency-document-form { margin-top: 16px; padding: 20px; border: 1px solid #d4dfe4; border-radius: 8px; background: #f8fafb; }
  #shiftPlansView .shift-agency-upload-file input { padding: 14px; border: 1px dashed #b9cbd4; background: white; border-radius: 8px; }
  .shift-review-drawer :is(.shift-agency-form,.shift-hired-worker-form) { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0; margin: 0; border: 0; background: white; }
  .shift-review-drawer :is(.shift-agency-form,.shift-hired-worker-form) > [hidden] { display: none !important; }
  .shift-review-drawer .bs-combobox-input { padding-right: 42px; font-weight: 400; }
  #shiftConfigDialog .shift-config-holiday-grid { grid-template-columns: minmax(250px,.8fr) minmax(0,1.2fr); align-items: start; }
  #shiftConfigDialog .shift-config-impact { min-width: 0; min-height: 0; padding: 16px; background: white; }
  #shiftConfigDialog .shift-config-impact-note { display: block; background: #f1f7f4; padding: 16px; }
  #shiftConfigDialog .shift-config-impact-note strong { display: block; font-size: 16px; }
  #shiftConfigDialog .shift-config-impact-note :is(p,span) { display: block; margin: 8px 0 0; font: 400 14px/1.5 var(--bs-font-family); }
  #shiftConfigDialog .shift-config-manual-warning { margin-top: 12px; padding: 14px; border: 1px solid #e3b85c; border-radius: 8px; background: #fff8e8; }
  #shiftConfigDialog .shift-config-manual-warning > strong { display:block; font-size:15px; }
  #shiftConfigDialog .shift-config-manual-warning > p { margin:6px 0 10px; font:400 14px/1.5 var(--bs-font-family); }
  #shiftConfigDialog .shift-config-manual-warning details { margin:8px 0 12px; font-size:14px; }
  #shiftConfigDialog .shift-config-manual-warning ul { margin:8px 0 0; padding-left:20px; }
  #shiftConfigDialog .shift-config-manual-warning li { margin:4px 0; }
  #shiftConfigDialog .shift-config-manual-warning li span { display:block; margin-top:2px; color:#536b79; }
  #shiftConfigDialog .shift-config-reset-overrides { display:flex; align-items:flex-start; gap:10px; padding-top:10px; border-top:1px solid #edd39c; }
  #shiftConfigDialog .shift-config-reset-overrides input { flex:none; width:18px; height:18px; margin:2px 0 0; }
  #shiftConfigDialog .shift-config-reset-overrides span { display:block; }
  #shiftConfigDialog .shift-config-reset-overrides b { display:block; font-size:14px; }
  #shiftConfigDialog .shift-config-reset-overrides small { display:block; margin-top:3px; font:400 13px/1.45 var(--bs-font-family); color:#536b79; }
  #shiftConfigDialog .shift-config-compare-period { font-size: 14px; line-height: 1.5; margin: 16px 0 8px; }
  #shiftConfigDialog .shift-config-compare { overflow-x: auto; display: grid; gap: 8px; padding-bottom: 8px; }
  #shiftConfigDialog .shift-config-compare-row { display: flex; gap: 0; width: max-content; align-items: stretch; }
  #shiftConfigDialog .shift-config-compare-row > strong { position: sticky; left: 0; z-index: 1; width: 48px; flex: 0 0 48px; display: grid; place-items: center; background: white; font-size: 14px; }
  #shiftConfigDialog .shift-config-compare-row > div { display: flex; gap: 1px; }
  #shiftConfigDialog .shift-config-compare-row i { box-sizing: border-box; display: grid; place-items: center; align-content: center; gap: 4px; width: 36px; flex: 0 0 36px; height: 48px; font-style: normal; color: #183340; }
  #shiftConfigDialog .shift-config-compare-row i span { font-size: 12px; }
  #shiftConfigDialog .shift-config-compare-row i b { font-size: 14px; }
  #shiftConfigDialog .shift-config-compare-row i.changed { box-shadow: inset 0 -3px #ce8a16; }
  #shiftConfigDialog .shift-config-affected { padding-top: 12px; font-size: 14px; }
  #shiftConfigDialog .shift-config-affected > summary { cursor: pointer; min-height: 44px; }
  #shiftConfigDialog .shift-adjustment-options label { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px; }
  #shiftConfigDialog .shift-adjustment-options input { flex: none; margin: 3px 0; width: 18px; height: 18px; }
  #shiftConfigDialog .shift-adjustment-options strong { font: 600 14px/1.4 var(--bs-font-family); }
  #shiftConfigDialog .shift-adjustment-options small { display: block; margin-top: 4px; font: 400 14px/1.4 var(--bs-font-family); }
  #shiftConfigDialog .shift-config-basics input, #shiftConfigDialog .shift-config-resume input { font: 400 16px/1.4 var(--bs-font-family); }
  @media(max-width: 900px) {
    #shiftPlansView .shift-hired-tabbar { flex-wrap: wrap; gap: 4px; }
    #shiftPlansView .shift-hired-tabbar .shift-directory-head-actions { margin-left: auto; }
    #shiftConfigDialog .shift-config-holiday-grid { grid-template-columns: minmax(0,1fr); }
  }
  @media(max-width: 700px) {
    #shiftPlansView .shift-hired-tabbar { margin: 0 14px; }
    #shiftPlansView .shift-hired-tabbar .shift-subtabs { flex-basis: 100%; overflow-x: auto; }
    #shiftPlansView .shift-hired-tabbar .shift-directory-head-actions { width: 100%; }
    #shiftPlansView .shift-hired-tabbar .shift-directory-head-actions button { flex: 1; padding-inline: 8px; }
    #shiftPlansView #shiftHiredAgenciesView { padding: 16px 14px; }
    #shiftPlansView .shift-agency-card > header { padding: 16px; gap: 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; }
    #shiftPlansView .shift-agency-identity { grid-column: 1; }
    #shiftPlansView .shift-agency-personnel-count { grid-column: 1; grid-row: 2; }
    #shiftPlansView .shift-agency-actions { grid-column: 2; grid-row: 1 / 3; }
    #shiftPlansView .shift-agency-card .shift-agency-documents, #shiftPlansView .shift-agency-contact { padding: 16px; }
    #shiftPlansView .shift-agency-document-form { padding: 12px; }
    .shift-review-drawer :is(.shift-agency-form,.shift-hired-worker-form) { grid-template-columns: minmax(0,1fr); }
  }
}
/* Sickness is visible only in the private working grid, never in shared plans. */
@media screen {
  #shiftPlansView .shift-grid td.sick,
  #shiftPlansView .shift-grid td > button.sick,
  #shiftPlansView .shift-grid td > button.drag-preview-sick { background: #c7352d !important; color: #fff; }
  #shiftPlansView .sick .shift-absence-marker { color: #fff; }
  #shiftPlansView .shift-grid-edit-guide i.sick { background: #c7352d; border-color: #c7352d; color: #fff; font-size: 14px; }
  #shiftPlansView .shift-grid-edit-guide > button[data-assignment-mode="sick"].active { background: #fff1ef; border-color: #c7352d; }
  #shiftPlansView .shift-grid td > button.drag-preview-sick { box-shadow: inset 0 0 0 3px #842720; }
  #shiftPlansView .shift-grid-edit-guide { flex-wrap: wrap; gap: 6px; }
  #shiftPlansView .shift-grid-edit-guide > button { min-height: 44px; font: 400 14px/1.3 var(--bs-font-family); }
}

/* Review: consistent absence markers, readable archive and aligned holiday actions. */
@media screen {
  #shiftPlansView .shift-grid-edit-guide :is(i.absence,i.sick),
  #shiftOfficialPreview .shift-official-legend i.absence {
    display:inline-grid;place-items:center;box-sizing:border-box;flex:none;
    width:22px;height:22px;border:0;border-radius:4px;
    font:600 14px/1 var(--bs-font-family);font-style:normal;opacity:1;
  }
  #shiftPlansView .shift-grid-edit-guide i.absence {background:#fff0cd;color:#6d4a00}
  #shiftPlansView .shift-grid-edit-guide i.sick {background:#c7352d;color:#fff}
  #shiftPlansView .shift-absence-marker,
  #shiftOfficialPreview .official-absence .official-day-symbol {font:600 16px/1 var(--bs-font-family);opacity:1}
  #shiftOfficialPreview .official-absence .official-day-symbol {display:flex;align-items:center;justify-content:center;gap:3px;width:100%;height:100%;border:0;border-radius:0;background:transparent;color:#6d4a00}
  #shiftOfficialPreview .shift-official-legend i.absence {background:#fff0cd;color:#6d4a00}
  #shiftOfficialPreview .shift-official-legend span {display:inline-flex;align-items:center;gap:8px;font:400 14px/1.4 var(--bs-font-family)}
  #shiftPlansView .shift-heading-actions .shift-holiday-head-actions {align-items:flex-end}
  #shiftPlansView .shift-holiday-head-actions > button {align-self:flex-end;margin:0;min-height:44px;height:44px}
  #shiftPlansView .shift-holiday-head-actions label {margin:0;padding:0;align-self:flex-end}
  #shiftPlansView .shift-holiday-head-actions .bs-select-trigger {min-height:44px;height:44px;margin:0}
  #shiftHiredArchiveView :is(h3,p,span,strong,small,button) {font-family:var(--bs-font-family)}
  #shiftHiredArchiveView h3 {font-size:20px;font-weight:600}
  #shiftHiredArchiveView p {font-size:14px;line-height:1.5}
  #shiftHiredArchiveView .shift-archived-worker {align-items:center;padding:16px;gap:16px;font:400 16px/1.5 var(--bs-font-family)}
  #shiftHiredArchiveView .shift-archived-worker strong {font-size:16px;font-weight:600}
  #shiftHiredArchiveView .shift-archived-worker :is(small,span) {font-size:14px;font-weight:400;line-height:1.5}
  #shiftHiredArchiveView .shift-archived-worker button {min-height:44px;height:auto;padding:10px 14px;flex:none;font:500 14px/1.4 var(--bs-font-family)}
  .shift-practical-comment-field {grid-column:1/-1!important;display:grid;gap:6px}
  .shift-practical-comment-field textarea {box-sizing:border-box;width:100%;min-height:104px;padding:12px;border:1px solid #c5d3db;border-radius:8px;resize:vertical;background:white;color:#193442;font:400 16px/1.5 var(--bs-font-family)}
  .shift-practical-comment-field small {color:#607784;font:400 14px/1.5 var(--bs-font-family)}
  /* Visually hidden inputs must not inherit the full-width form input rule. */
  #shiftPlansView .shift-plan-display-bar label { position: relative; }
  #shiftPlansView :is(#shiftBookedTravelToggle, #shiftHotelToggle) {
    position: absolute; width: 1px; min-width: 0; max-width: 1px;
    height: 1px; min-height: 0; margin: 0; padding: 0; border: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  #shiftPlansView .shift-plan-display-bar label:has(input:focus-visible) {
    outline: 2px solid #287d5e; outline-offset: 3px; border-radius: 4px;
  }
  .hotel-needs-dialog .hotel-needs > div { min-width: 0; }
  .hotel-preference-status {
    font: 400 16px/1.5 var(--bs-font-family); white-space: normal;
  }
  .hotel-preference-status { margin: 6px 0 0; color: #365565; }
  .shift-logistics-pending {display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px;background:#fff4dc;color:#473b22;font:400 16px/1.5 var(--bs-font-family)}
  .shift-logistics-pending strong {flex-basis:100%}
  .shift-logistics-dialog p,.shift-logistics-dialog button {font:400 16px/1.5 var(--bs-font-family)}
  .shift-logistics-options {display:grid;gap:12px}
  .shift-logistics-options button {min-height:48px;text-align:left;white-space:normal}
  .shift-logistics-options button[aria-pressed="true"] {border-color:#256648;background:#e8f3ec;color:#183d2c}
  .hotel-needs-dialog .hotel-need-switch small,
  .hotel-needs-dialog .hotel-need-switch em,
  #shiftWorkerRowMenu .hotel-need-switch small,
  #shiftWorkerRowMenu .hotel-need-switch em { font: 400 16px/1.5 var(--bs-font-family); }
  .shift-agency-practical {margin:0;padding:18px 22px;border-bottom:1px solid #e1e8ec}
  .shift-agency-practical summary {cursor:pointer;font:500 14px/1.5 var(--bs-font-family)}
  .shift-agency-practical p {white-space:pre-wrap;overflow-wrap:anywhere;font:400 16px/1.5 var(--bs-font-family)}
  @media(max-width:700px){#shiftHiredArchiveView .shift-archived-worker {align-items:flex-start}#shiftHiredArchiveView .shift-archived-worker > div {min-width:0;overflow-wrap:anywhere}}
}
