/* Extensions for new workflows. The established style.css remains the visual base. */
:root{--surface:#fff;--surface-soft:#f5f8fa;--ink:#17384e;--muted:#627889;--line:#dce7ee;--blue:#087ebc;--blue-soft:#eaf3fa;--red:#ab243a;--red-soft:#fff0ed;--green:#287045;--green-soft:#eaf6ee;--roster-role:80px;--roster-time:90px;--roster-gap:9px;--roster-font:.94rem}
:root[data-theme=dark]{--surface:#1e2d3a;--surface-soft:#1b394d;--ink:#dceaf3;--muted:#b8c8d2;--line:#3c6680;--blue:#7bcdf8;--blue-soft:#1b394d;--red:#ab243a;--red-soft:#fff0ed;--green:#287045;--green-soft:#eaf6ee}
[hidden]{display:none!important}
.workspace-page{max-width:1030px;margin-inline:auto}.workspace-page .page-head{flex-wrap:wrap}
.form-actions,.record-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.form-actions{margin-top:12px}.form-actions form{margin:0}.record-actions{justify-content:flex-end}.record-actions form{margin:0}
.record-actions .button,.record-actions button{min-height:40px;padding:8px 12px;font-size:.88rem}
.editor-replacement-action{margin-bottom:12px}
.record-link{display:inline-block;margin-top:6px}.record-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.record-row>div:first-child{min-width:0}
.essential-note{font-size:.85rem;color:var(--muted);margin:10px 0}.record-offer{margin-top:10px}
.badge.pending{background:#fff3d6;color:#81580d}.badge.approved{background:var(--green-soft);color:var(--green)}
.request-wait-icon{vertical-align:-1px;margin-right:3px;flex:none}
.home-hero{margin-bottom:18px}.home-hero h1{margin-bottom:0}.home-absence-actions{margin:0 0 28px}.home-management-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:20px}
.home-quick-copy{min-width:0}.home-quick-copy strong{font-size:.96rem}.home-quick-copy small{font-size:.85rem}.home-planning-sites{margin:0 0 20px}
.manager-workspace{margin-top:28px}.manager-workspace .section-head{flex-wrap:wrap}.manager-workspace>.ui-accordion{margin-bottom:16px}
.next-shift{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.next-shift-layout{flex:1;min-width:0}.next-shift-footer{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.next-shift-footer .button{min-height:42px;font-size:.9rem}.next-shift .shift-note{flex-basis:100%;margin:0}
.next-shift-hours{font-size:1.1rem}.next-shift-position{font-size:1rem}.next-shift-date{font-size:1rem}
.ui-accordion{padding:0;overflow:hidden}.ui-accordion>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:60px;padding:15px 18px;cursor:pointer;list-style:none}
.ui-accordion>summary::-webkit-details-marker{display:none}.ui-accordion>summary::after{content:'›';font-size:1.25rem;line-height:1;color:var(--blue);margin-left:2px}.ui-accordion>summary>strong{margin-right:auto;font-size:1rem}.ui-accordion[open]>summary::after{transform:rotate(90deg)}.ui-accordion[open]>summary{border-bottom:1px solid var(--line)}
.accordion-body{padding:0 18px 16px}.ui-accordion .accordion-body>.list-row:first-child{padding-top:14px}.ui-accordion .accordion-body>.list-row:last-child{padding-bottom:0}
.replacement-board>summary .badge{font-size:.8rem}.replacement-board{border-color:var(--line)}
.home-page .personal-work>.replacement-board{padding:0;margin:0 0 20px;border-left:3px solid var(--red)}
.home-page .personal-work>.replacement-board>summary::after{display:none}
.home-replacement-title{display:flex;align-items:center;gap:10px;color:var(--ink);font-weight:700;white-space:nowrap}
.home-replacement-title>.home-quick-icon{flex:0 0 32px;width:32px;height:32px;background:var(--red-soft);color:var(--red)}
.replacement-board>summary .count{font-size:.84rem;color:var(--muted);white-space:nowrap}
.home-requests-section .claim-list-card>p:last-child{margin-bottom:0}
@media(max-width:480px){.home-page .personal-work>.replacement-board>summary{padding:12px;gap:8px}.home-replacement-title{gap:8px;font-size:.9rem!important}.home-replacement-title>.home-quick-icon{flex-basis:24px;width:24px;height:28px}.replacement-board>summary .count{font-size:.78rem}}
.home-openings .opening-weeks{margin-top:12px}.home-openings .opening-week{margin-bottom:12px}.home-openings .opening-block{margin-inline:14px}
.card-symbol{font-size:1.1rem;font-weight:700;line-height:1}.more-link-icon>.card-symbol{display:block}

/* Keep the original day cards and stacked, white area selectors. */
.planner-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.plan-day{padding:20px;min-width:0}.plan-day .day-shifts{padding:0}.day-heading h2{font-size:1.13rem}.day-heading .add-day{flex:none;padding:0;min-width:36px;width:36px;min-height:40px;height:40px;font-size:1.6rem;border:0;background:transparent;color:var(--blue)}
.shift-areas{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}.shift-area-title{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.shift-area-title strong{font-size:.95rem}.shift-area-title>span{font-size:.84rem}.shift-area-signals{font-size:.8rem}
.shift-block-heading,.site-plan-block>h3{display:grid;grid-template-columns:minmax(0,1fr) var(--roster-time);gap:var(--roster-gap);align-items:baseline;padding:1px 6px 9px;margin:0}
.shift-block-heading h3{margin:0;font-size:1rem}.shift-block-heading>span,.site-plan-block>h3>small{justify-self:end;text-align:right;white-space:nowrap;font-size:.87rem}
.shift-line,.site-plan-shift,.schedule-event-person{display:grid;grid-template-columns:var(--roster-role) minmax(0,1fr) var(--roster-time);gap:5px var(--roster-gap);align-items:baseline;padding:8px 6px;grid-template-areas:none;line-height:1.4}
.shift-line>.shift-role{grid-area:1/1/2/2;justify-self:stretch;text-align:left}.shift-line>.shift-person{grid-area:1/2/2/3;justify-self:stretch;text-align:left;min-width:0}.shift-line>.shift-hours{grid-area:1/3/2/4;justify-self:end;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.shift-line>.shift-role,.shift-line>.shift-person,.shift-line>.shift-hours{font-size:var(--roster-font);line-height:1.4}.shift-person{font-weight:650}.shift-line .shift-role small{font-size:.78rem}
.roster-person-entry{display:flex;align-items:baseline;gap:6px;min-width:0;font-weight:650}.shift-line .roster-person-entry+.roster-person-entry{margin-top:3px}.roster-person-entry>span:first-child,.roster-absent-name{min-width:0;overflow-wrap:anywhere}
.roster-person-entry>.shift-absence{display:inline;color:var(--muted);font-weight:500}.roster-person-entry>.shift-replacement{display:inline;position:static}.roster-person-entry .badge{flex:none;white-space:nowrap;line-height:1.3;font-size:.72rem;padding:3px 6px;font-weight:650;align-self:baseline}.roster-person-entry .shift-replacement-badge{background:var(--blue-soft);color:var(--blue);border:1px solid #a4cfe6}
.plan-day .shift-line.shift-unavailable,.shift-line.shift-filled-replacement{opacity:1}.planner-direct-taken{margin-left:0;font-size:.71rem;color:var(--blue);font-weight:650}
.shift-line>.shift-status,.shift-line>.shift-actions,.shift-line>.shift-replacement-action,.shift-line>.shift-warning,.shift-line>.shift-note-inline{grid-column:2/-1;grid-row:auto;justify-self:stretch;margin:2px 0 0}
.shift-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}.shift-replacement-action button{min-height:40px!important;height:auto!important;width:auto!important;padding:8px 12px!important;font-size:.85rem!important;line-height:1.3!important}
.shift-line .shift-person>small{font-weight:400;display:block}.team-day{margin:0;padding:20px}.team-day>.accordion-body{padding:0}.team-day .day-heading{margin-bottom:14px}
.week-list:has(>.team-day),.site-plan-days{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;max-width:none;margin-inline:0}
.site-plan-day{margin:0;padding:20px;min-width:0}.site-plan-day>.accordion-body{padding:0}.site-plan-shift>.site-plan-edit,.site-plan-shift>.site-plan-requests,.site-plan-shift>form,.site-plan-shift>a{grid-column:2/-1}
.site-plan-edit>summary,.site-plan-add>summary{min-height:40px;padding-block:8px;cursor:pointer}.site-plan-day .site-plan-block{padding:12px}.site-plan-day .site-plan-block>h3{padding-inline:6px}
.schedule-day-accordion>summary.day-heading{display:flex;align-items:center;gap:12px}.schedule-day-title{display:flex;align-items:baseline;gap:16px;min-width:0}.schedule-day-title strong{font-size:1rem}.schedule-day-title time{font-size:.86rem;color:var(--muted)}.schedule-day-count{font-size:.82rem;color:var(--muted);margin-left:auto}

/* Events retain the same position, name and time columns. */
.schedule-event-head{display:grid;grid-template-columns:35px minmax(0,1fr) var(--roster-time);gap:9px;align-items:baseline}.schedule-event-head-time{font-size:.88rem;white-space:nowrap;text-align:right;justify-self:end;font-variant-numeric:tabular-nums}.schedule-event-head>strong{font-size:1rem}
.schedule-event-venue{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0 10px 44px;font-size:.85rem}
.schedule-event-person>.schedule-event-role{grid-area:1/1/2/2;text-align:left;justify-self:stretch}.schedule-event-person>strong{grid-area:1/2/2/3;min-width:0;justify-self:stretch;text-align:left}.schedule-event-person>.schedule-event-time{grid-area:1/3/2/4;justify-self:end;text-align:right;white-space:nowrap}.schedule-event-person>.badge{grid-column:2;justify-self:start}.schedule-event-person>small{grid-column:2/-1}.schedule-event-person>.shift-actions{grid-column:2/-1}
.schedule-event-person .schedule-event-role,.schedule-event-person>strong,.schedule-event-person .schedule-event-time{font-size:var(--roster-font);line-height:1.4}
.candidate-row.busy{color:var(--red);opacity:1;background:var(--red-soft)}

/* The approved hours card has one aligned content width. */
.hours-page{max-width:1040px;margin-inline:auto}.hours-page .page-head{align-items:center;gap:16px;flex-wrap:wrap}.hours-filter{display:grid;grid-template-columns:minmax(180px,240px) minmax(200px,1fr) auto;align-items:end;gap:20px}.hours-filter label{margin:0}.hours-filter button{margin-bottom:1px}
.hours-summary-head,.hours-people-list{max-width:none;margin-inline:0;padding-inline:0}.hours-summary-head{padding-bottom:16px;flex-wrap:wrap}.hours-people-list{max-height:none;overflow:visible;scrollbar-gutter:auto}.hours-person-row{min-height:76px;grid-template-columns:minmax(0,1fr) 130px;gap:16px;padding:14px 0}.hours-person-row strong{font-size:1rem}.hours-person-row p{font-size:.88rem}.hours-person-value{font-size:1.05rem}.hours-page .hours-total{box-sizing:border-box;padding:12px 18px;min-width:180px;max-width:100%;margin-left:auto}.hours-total strong{font-size:1.35rem;white-space:nowrap}.hours-zero{margin-top:18px}

/* New approval, history and preview controls use existing app colours and sizes. */
.change-item{padding:15px 0;border-bottom:1px solid var(--line)}.change-item>time{font-size:.85rem;color:var(--muted)}.change-fields{margin:9px 0 0;font-size:.9rem}.change-fields>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px;padding:4px 0}.change-fields dt,.change-before{color:var(--muted)}.change-fields dd{margin:0;overflow-wrap:anywhere}
.ui-dialog{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:20px;width:min(640px,calc(100vw - 32px));padding:0;max-height:calc(100dvh - 40px);overflow:auto}.ui-dialog::backdrop{background:#09141d99;backdrop-filter:blur(3px)}.ui-dialog-head{padding:20px 22px;border-bottom:1px solid var(--line)}.ui-dialog-body{padding:22px}.ui-dialog h2{margin:0}.ui-dialog .narrow{max-width:none;margin:0;padding:0}.ui-dialog .page-head h1{font-size:1.35rem}.ui-dialog .card{padding:0;border:0;margin:0}.ui-dialog .form-actions>*{min-width:0}.ui-dialog .essential-note{line-height:1.5}
.weekday-checks{display:flex;flex-wrap:wrap;gap:9px}.weekday-checks label{display:flex;align-items:center;gap:5px;margin:0}.weekday-checks input{width:18px;min-height:18px;margin:0}
.planner-print-sheet{display:block;max-width:none;margin:16px auto}.planner-main:has(.planner-print-sheet){overflow-x:auto}
@media(max-width:900px){.home-management-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.hours-filter{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.hours-filter button{grid-column:2;justify-self:end}.planner-grid,.week-list:has(>.team-day),.site-plan-days{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){:root{--roster-role:62px;--roster-time:84px;--roster-gap:6px;--roster-font:.9rem}.plan-day,.team-day,.site-plan-day{padding:14px}.day-heading h2{font-size:1.08rem}.plan-day .day-heading{margin-bottom:10px}.shift-block{padding:10px}.shift-line,.schedule-event-person{padding-inline:0}.shift-block-heading,.site-plan-block>h3{padding-inline:0}.shift-area-title{flex-wrap:nowrap}.shift-area-title>span{font-size:.77rem;text-align:right}.shift-area-title strong{font-size:.9rem}.shift-area-signals{font-size:.76rem}.shift-line .roster-person-entry{gap:4px}.roster-person-entry .badge{font-size:.67rem;padding:3px 5px}.planner-direct-taken{font-size:.68rem}.home-management-actions{grid-template-columns:1fr}.home-absence-actions.employee-actions .home-quick-copy strong{font-size:.9rem}.home-absence-actions.employee-actions .home-quick-icon{flex-basis:28px;height:28px;font-size:1rem}.next-shift{gap:14px;padding:18px}.next-shift-layout{flex-basis:100%}.next-shift-footer{width:100%;justify-content:space-between}.next-shift-footer .button{font-size:.88rem}.ui-accordion>summary{padding:14px}.accordion-body{padding-inline:14px}.hours-filter{grid-template-columns:minmax(0,1fr);gap:14px}.hours-filter button{grid-column:1;justify-self:end}.hours-page .hours-summary-card{padding:18px}.hours-person-row{grid-template-columns:minmax(0,1fr) 94px;gap:10px}.hours-person-row strong{font-size:.94rem}.hours-person-row p{font-size:.84rem}.record-actions{flex-wrap:wrap}.schedule-event-venue{margin-left:0}.change-fields>div{grid-template-columns:85px minmax(0,1fr)}.ui-dialog-body{padding:18px}.ui-dialog .form-actions>*{flex:1}.admin-control-person{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px}.admin-control-person-copy{min-width:0}.admin-control-person>.button{grid-column:2;width:auto;justify-self:start;margin:0}.admin-control-avatar{width:42px;height:42px;align-self:start}.admin-control-facts{flex-wrap:wrap}}
@media(max-width:390px){:root{--roster-role:54px;--roster-time:78px}.plan-day,.team-day,.site-plan-day{padding:12px}.shift-block{padding:9px}.shift-area-title>span{font-size:.73rem}.roster-person-entry .badge{font-size:.64rem;padding-inline:4px}}

@media(max-width:650px){
  .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px}.toolbar>.button,.toolbar>form>button{width:100%;white-space:nowrap;padding:10px 12px;font-size:.9rem}.toolbar>form{margin:0}
  .home-page .next-shift{display:flex;flex-wrap:wrap;align-items:center;gap:14px}.home-page .next-shift-layout{display:grid;grid-template-columns:max-content minmax(0,1fr);grid-template-areas:'date shift' 'position time';gap:5px 20px;align-items:baseline;flex-basis:100%}.home-page .next-shift-place,.home-page .next-shift-slot{display:contents}.home-page .next-shift-date{grid-area:date}.home-page .next-shift-position{grid-area:position;justify-self:start;text-align:left}.home-page .next-shift-block{grid-area:shift}.home-page .next-shift-hours{grid-area:time}.home-page .next-shift-layout small{grid-column:1/-1}.home-page .next-shift-date,.home-page .next-shift-position,.home-page .next-shift-block,.home-page .next-shift-hours{font-size:.94rem}.home-page .next-shift-footer{width:100%;justify-content:space-between}.home-page .next-shift-footer .button{min-height:40px;padding:8px 12px;white-space:nowrap}
  .hours-page .page-head{align-items:flex-start}.hours-page .page-head>.button{align-self:flex-end}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.ui-dialog,.form-actions,.shift-actions{display:none!important}}

/* One familiar area card per day, with both shifts on the same line. */
.planning-toolbar{flex-wrap:wrap}.planning-toolbar-end{display:flex;align-items:center;gap:10px;margin-left:auto}
.planning-tabs{display:flex;align-items:center;gap:6px;padding:4px;background:var(--blue-soft);border:1px solid var(--line);border-radius:13px;width:max-content;max-width:100%;margin-bottom:22px}.planning-tabs>a{display:flex;align-items:center;gap:7px;padding:10px 16px;border-radius:10px;white-space:nowrap;font-size:.94rem;font-weight:600;color:var(--muted)}.planning-tabs>a[aria-current]{background:var(--surface);color:var(--blue);box-shadow:0 1px 4px #183b4d0c}.planning-tabs .badge{font-size:.72rem;padding:2px 6px}
.planning-day-areas{display:grid;gap:8px;margin-bottom:12px;min-width:0}.planning-area{display:grid;grid-template-columns:minmax(56px,.6fr) repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:0;min-width:0;overflow:hidden}
.planning-area-head{display:contents;font-size:.9rem;color:var(--blue)}
.planning-area-head>strong{grid-column:1;grid-row:1/3;display:flex;align-items:center;justify-content:center;min-width:0;padding:9px 7px;border-right:1px solid var(--line);text-align:center;overflow-wrap:anywhere;font-size:.94rem;font-weight:700}.planning-area-head>a{white-space:nowrap;min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;padding:8px 7px;background:color-mix(in srgb,var(--blue-soft) 45%,var(--surface));color:var(--blue);font-weight:650;text-decoration:none}.planning-area-head>a+a{border-left:1px solid var(--line);background:var(--blue-soft)}
.planning-area-head>a:hover,.planning-area-head>a:focus-visible{background:var(--surface-soft);text-decoration:none}.planning-area-head>a:focus-visible{outline-offset:-3px}
.planning-area-head>a b{font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums}.planning-area-signals{grid-column:2/-1;grid-row:2;display:flex;align-items:center;justify-content:center;gap:24px;border-top:1px solid var(--line);padding:1px 8px}
.planning-area-signals .area-signal{border:0;background:transparent;min-height:34px;padding:3px 6px;font-size:.83rem;font-weight:400;color:var(--muted);white-space:nowrap}.planning-area-signals .area-signal:focus-visible{outline-offset:-2px}.area-signal b{font-weight:500;color:var(--blue)}
.area-direct-open{grid-column:1/-1;display:block;text-align:center;font-size:.8rem;font-weight:600;padding:4px 0;border-top:1px solid var(--line);color:var(--blue)}
.area-people-block{margin:0 0 20px}.area-people-block:last-child{margin:0}.area-people-block h3{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:1rem;margin:0 0 8px}.area-people-block h3 time{font-size:.85rem;font-weight:400;color:var(--muted);white-space:nowrap}
.area-person{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:baseline;gap:12px;padding:12px 0;border-top:1px solid var(--line)}.area-person>span{min-width:0}.area-person .badge{margin-left:7px}.area-person time{font-size:.85rem;color:var(--muted);white-space:nowrap}
.planner-extra-area{margin-top:8px}.planner-extra-heading{font-size:.9rem;color:var(--blue);padding:10px 6px 5px}.planner-extra-body{position:static;width:auto;max-height:none;overflow:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}.planner-extra-shift{border-bottom:1px solid var(--line)}.planner-extra-shift>.site-plan-edit,.planner-extra-claims{grid-column:2/-1}.planner-extra-person{margin:0}.planner-extra-body>.site-plan-add{padding-top:6px}
.planner-grid,.site-plan-days,.week-list:has(>.team-day){align-items:stretch}
.reviews-page>.page-head{flex-direction:row;align-items:center}.review-day{margin-bottom:24px}.review-day>h2{margin-bottom:12px}.review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}.review-card{margin:0}.review-card>summary{align-items:start;gap:10px;padding:15px 18px}.review-card .review-heading{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:6px 14px;flex:1;min-width:0}.review-heading>strong{font-size:.94rem}.review-site{text-align:right;color:var(--muted);font-size:.82rem}.review-heading>small{grid-column:1/-1;line-height:1.4}.review-card>summary>.badge{display:none}.review-card .change-item{padding:11px 0}.review-card .change-item:first-child{padding-top:14px}.review-card .record-heading{gap:8px;font-size:.91rem}.review-card .record-heading .badge{font-size:.65rem;flex:none}.review-card .change-fields{margin-top:5px;font-size:.85rem}.review-card .change-fields>div{grid-template-columns:72px minmax(0,1fr);gap:8px;padding:3px 0}.review-card .form-actions{margin-top:12px}
@supports(grid-template-rows:subgrid){
  @media(min-width:901px){
    .planner-grid>.plan-day:not(.standby-week),.site-plan-days>.site-plan-day{display:grid;grid-row:span 5;grid-template-rows:subgrid;row-gap:0;align-content:start}
    .planner-grid>.standby-week{grid-row:span 5}
    .plan-day>.day-heading,.site-plan-day>.day-heading{grid-row:1;margin-bottom:14px}
    .plan-day>.planning-day-areas,.site-plan-day>.planning-day-areas{grid-row:2}
    .plan-day>.day-shifts,.site-plan-day>.accordion-body{display:contents}
    .day-shifts>.day-events,.site-plan-day>.accordion-body>.day-events{grid-row:3}
    .day-shifts>.shift-block-1,.site-plan-day>.accordion-body>.shift-block-1{grid-row:4;margin:0 0 12px;align-self:stretch}
    .day-shifts>.shift-block-2,.site-plan-day>.accordion-body>.shift-block-2{grid-row:5;margin:0;align-self:stretch}
    .week-list>.team-day{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
    .team-day>.day-heading{grid-row:1;margin-bottom:14px}.team-day>.accordion-body{display:contents}
    .team-day>.accordion-body>.day-events{grid-row:2}
    .team-day>.accordion-body>.shift-block-1{grid-row:3;margin:0 0 12px;align-self:stretch}
    .team-day>.accordion-body>.shift-block-2{grid-row:4;margin:0;align-self:stretch}
    .team-day>.accordion-body>p{grid-row:3/5}
  }
}
@media(max-width:900px){.review-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){
  .toolbar.planning-toolbar{display:flex;flex-wrap:wrap;gap:8px}.planning-toolbar>.button,.planning-toolbar>form{flex:0 1 auto;width:auto}.planning-toolbar .planning-toolbar-end{margin-left:auto;gap:8px}.planning-toolbar-end>.button{font-size:.86rem;padding:10px 11px;white-space:nowrap}
  .planning-area-head{font-size:.82rem}.planning-area-head>strong{font-size:.9rem;padding-inline:5px}.planning-area-head>a{gap:5px;padding-inline:5px}.planning-area-signals{gap:18px}.planning-area-signals .area-signal{font-size:.8rem;min-height:38px}.planning-day-areas{margin-bottom:10px}
  .review-card>summary{padding:14px}.review-card .review-heading{gap:5px 10px}.review-site{font-size:.78rem}.review-card .change-fields>div{grid-template-columns:65px minmax(0,1fr)}
  .planning-tabs{width:100%;gap:2px}.planning-tabs>a{flex:1;justify-content:center;padding:10px 8px;font-size:.84rem;gap:5px}.planning-tabs .badge{padding-inline:5px;font-size:.68rem}
}
@media(max-width:390px){.planning-tabs>a{padding-inline:4px;font-size:.8rem;gap:3px}.planning-tabs .badge{padding-inline:4px;font-size:.66rem}}

/* Fixed days use the approved area / person / time columns, grouped by day. */
.fixed-day-tabs{display:flex;gap:4px;align-items:center;width:max-content;max-width:100%;padding:4px;margin:0 0 18px;border:1px solid var(--line);border-radius:12px;background:var(--blue-soft)}
.fixed-day-tabs>a{display:flex;align-items:center;gap:8px;min-height:40px;padding:8px 14px;border-radius:9px;color:var(--muted);font-size:.94rem;font-weight:600;text-decoration:none}
.fixed-day-tabs>a[aria-current]{background:var(--surface);color:var(--blue)}
.fixed-day-tabs .badge{font-size:.75rem;padding:2px 6px}
.fixed-day-group.card{padding:0;margin:0 0 14px;border-color:var(--line);border-radius:16px;overflow:hidden;background:var(--surface)}
.fixed-day-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--surface-soft)}
.fixed-day-heading h2{margin:0;font-size:1rem;line-height:1.4;font-weight:700;letter-spacing:0}
.fixed-day-heading time{font-weight:700;white-space:nowrap}
.fixed-day-heading>span{flex:none;font-size:.8rem;color:var(--muted)}
.fixed-day-entry{display:grid;grid-template-columns:108px minmax(0,1fr) 100px 202px;align-items:center;gap:5px 16px;padding:14px 16px;border-bottom:1px solid var(--line)}
.fixed-day-entry:last-child{border-bottom:0}
.fixed-day-area{grid-column:1;grid-row:1;min-width:0;overflow-wrap:anywhere;color:var(--blue);font-size:.94rem;font-weight:700}
.fixed-day-shift{grid-column:1;white-space:nowrap;font-size:.88rem;font-weight:700}
.fixed-day-time{grid-column:3;justify-self:end;white-space:nowrap;color:var(--muted);font-size:.88rem;font-variant-numeric:tabular-nums}
.fixed-day-slot-1{grid-row:2}.fixed-day-slot-2{grid-row:3}
.fixed-day-person{grid-column:2;grid-row:2;min-width:0;overflow-wrap:anywhere;font-size:.94rem}
.fixed-day-person>strong{font-weight:700}.fixed-day-person>.badge{display:block;width:fit-content;max-width:100%;margin-top:5px}
.fixed-day-actions{grid-column:4;grid-row:2;display:flex;align-items:center;justify-content:flex-end;gap:8px}
.fixed-day-actions form{display:flex;align-items:center;gap:8px;margin:0}
.fixed-day-actions button{min-height:40px;padding:8px 12px;font-size:.88rem;white-space:nowrap}
.fixed-day-double .fixed-day-person,.fixed-day-double .fixed-day-actions{grid-row:2/span 2}
@media(max-width:700px){
  .fixed-day-entry{grid-template-columns:88px minmax(0,1fr) 94px;column-gap:10px}
  .fixed-day-entry .fixed-day-actions{grid-column:1/-1;grid-row:3;margin-top:7px}
  .fixed-day-double .fixed-day-actions{grid-row:4}
}
@media(max-width:390px){
  .fixed-day-heading{padding:11px 12px;gap:8px}.fixed-day-heading h2{font-size:.94rem}.fixed-day-heading>span{font-size:.75rem}
  .fixed-day-entry{grid-template-columns:76px minmax(0,1fr) 86px;column-gap:8px;padding:13px 12px}
  .fixed-day-area,.fixed-day-person{font-size:.9rem}.fixed-day-shift,.fixed-day-time{font-size:.82rem}
}
@media(pointer:coarse){.fixed-day-tabs>a,.fixed-day-actions button{min-height:44px}}

/* Approved 0.9.5: keep status colours identical in light and dark themes.
   Only colour properties; the established layout and typography stay intact. */
:root[data-theme=dark] .home-page .personal-work>.replacement-board{border-left-color:var(--red)}
:root[data-theme=dark] .home-replacement-title>.home-quick-icon{background:var(--red-soft);color:var(--red)}
:root[data-theme=dark] .badge{background:#f0f2f5;color:#576570}
:root[data-theme=dark] .badge.pending{background:#fff3d6;color:#81580d}
:root[data-theme=dark] .badge.unavailable{background:#fff0ed;color:#a33932}
:root[data-theme=dark] .badge.published,:root[data-theme=dark] .badge.preferred,:root[data-theme=dark] .badge.approved{background:#eaf6ee;color:#287045}
:root[data-theme=dark] .badge.available{background:#eaf3fa;color:#226a94}
:root[data-theme=dark] .danger{background:#fff0f0;color:#ab243a}
:root[data-theme=dark] .flash.error{background:#fff0ed;border-color:#f5d3cd;color:#9c3030}
:root[data-theme=dark] .flash.success{background:#edf7f1;border-color:#cfe7d7;color:#276344}
:root[data-theme=dark] .notice.success{background:#eef7f2;color:#17232b}
:root[data-theme=dark] .planner-direct-taken{background:#eaf3fa;color:#087ebc}
:root[data-theme=dark] .shift-status .shift-replacement-badge{border-color:#9dcce6;background:#d7ebf8;color:#075d89}
:root[data-theme=dark] .roster-person-entry .shift-replacement-badge{border-color:#a4cfe6;background:#eaf3fa;color:#087ebc}

/* All mobile navigation labels share the same icon and text rows. */
@media(max-width:650px){
 .main-nav>a{flex:1 1 0;min-width:0;min-height:54px;gap:2px;white-space:nowrap;text-align:center;overflow-wrap:normal}
 .main-nav>a>.nav-icon{width:25px;height:25px;align-self:center}
}

/* Balance the visible gaps around the long mobile availability label. */
@media(max-width:380px){
 .main-nav>a:has(>.nav-icon-check){padding-left:23px;padding-right:3px}
}

/* Week numbers and their dates use one foreground colour in both themes.
   The theme-qualified selectors also beat legacy dark-mode muted rules. */
:root[data-theme] .opening-week>summary>strong,
:root[data-theme] .opening-week>summary .opening-week-period,
:root[data-theme] .planner-request-week>summary>span,
:root[data-theme] .planner-request-week>summary>span>strong,
:root[data-theme] .planner-request-week>summary>span>small,
:root[data-theme] .week-nav>div,
:root[data-theme] .week-nav>div>strong,
:root[data-theme] .week-nav>div>span,
:root[data-theme] #planstatus .record-row-head>strong,
:root[data-theme] #planstatus .record-row-date,
:root[data-theme] a.record-row:is([href*="/planner?week="],[href*="/week?week="]) .record-row-head>strong,
:root[data-theme] a.record-row:is([href*="/planner?week="],[href*="/week?week="]) .record-row-date{color:var(--ink)}

/* Agreed administration alignment, without changing type sizes or colours. */
.operating-checks .record-row{grid-template-columns:minmax(0,1fr) 84px;align-items:center}
.operating-checks .record-row>strong{justify-self:start;text-align:left}
.operating-checks .record-row>.badge{display:flex;box-sizing:border-box;align-items:center;justify-content:center;justify-self:stretch;width:84px;min-height:24px;margin:0;text-align:center}
.admin-section-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.governance-retention .record-row{grid-template-columns:minmax(0,1fr);gap:4px}
.governance-retention .record-row>strong,.governance-retention .record-row>span{justify-self:start;text-align:left}
.governance-checkbox{display:grid;grid-template-columns:minmax(0,1fr) 20px;align-items:center;column-gap:16px}
.governance-checkbox>input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;justify-self:end}
.system-backup-row{display:grid;grid-template-columns:minmax(110px,1fr) minmax(160px,1.4fr) minmax(90px,1fr) auto;align-items:center;gap:16px}
.system-backup-row>div{position:relative;display:grid;align-content:center;gap:4px;min-width:0}
.system-backup-row>div+div::before{content:'';position:absolute;left:-8px;top:50%;transform:translateY(-50%);height:28px;border-left:1px solid var(--line);opacity:.65}
.system-backup-row time,.system-backup-kind>span,.system-backup-result>span:not(.badge){font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}
.system-backup-result{justify-items:center;text-align:center}
.system-backup-action{justify-self:end}
.system-backup-action form{margin:0}
@media(max-width:600px){
 .system-backup-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 16px}
 .system-backup-result{justify-items:start;text-align:left}
 .system-backup-result::before{display:none}
}
.change-history-page .ui-accordion>summary{gap:16px;align-items:center}
.change-history-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 140px;align-items:center;gap:24px;flex:1;min-width:0}
.change-history-label,.change-history-actor{min-width:0;overflow-wrap:anywhere}
.change-history-actor,.change-history-date{position:relative;font-size:.8rem;color:var(--muted)}
.change-history-date{display:grid;gap:4px;white-space:nowrap;font-variant-numeric:tabular-nums}
.change-history-actor::before,.change-history-date::before{content:'';position:absolute;left:-12px;top:50%;transform:translateY(-50%);height:28px;border-left:1px solid var(--line);opacity:.65}
@media(max-width:650px){
 .change-history-summary{grid-template-columns:minmax(0,1fr) max-content;gap:5px 20px}
 .change-history-label{grid-column:1;grid-row:1}
 .change-history-actor{grid-column:1;grid-row:2}
 .change-history-actor::before{display:none}
 .change-history-date{grid-column:2;grid-row:1/3}
 .change-history-date::before{left:-10px}
 .change-history-page .ui-accordion>summary{gap:10px;flex-wrap:wrap}
}

/* Deadline counts form two lines, with their action centered beside them. */
.privacy-deadline-body{display:flex;align-items:center;justify-content:space-between;gap:16px}
.privacy-deadline-counts{display:grid;gap:4px;min-width:0;margin:0}
.privacy-deadline-body>.button{flex:none;align-self:center}
@media(max-width:480px){.privacy-deadline-body{gap:10px}.privacy-deadline-body>.button{max-width:106px;padding-inline:10px;line-height:1.3}}

/* Printing stays at the right edge after removing the planning-advice link. */
.planning-action-row>.planning-print{grid-column:-2/-1}

/* Footer actions use the existing secondary button style at a shared size. */
.admin-control .admin-control-links .button{min-height:40px;padding:8px 12px;font-size:.88rem;line-height:1.4;text-align:center}
.week-nav>div{text-align:center}
.week-nav>.week-arrow-disabled{display:flex;align-items:center;justify-content:center}
.week-nav>div>strong,.week-nav>div>span{font-size:.92rem;font-weight:700;line-height:1.4}
.cancellations-panel .list-row{flex-wrap:wrap}
.cancellations-panel .cancel-badges{margin-left:auto;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:nowrap}
.cancellations-panel .cancel-badges>.badge{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px;font-size:.75rem;line-height:1.3;text-align:center;white-space:nowrap}
.cancellations-panel .cancel-reason{width:154px}
.cancellations-panel .cancel-short-notice{width:84px}

/* Availability actions keep the existing buttons, with room and a common right edge. */
.sick-period-form>button,.fixed-day-form>button{display:flex;width:fit-content;max-width:100%;margin:18px 0 0 auto}
.fixed-day-form>.fixed-times{margin:4px 0 18px}
.fixed-times>summary.button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:11px 19px;border-radius:13px;font-size:.9rem;font-weight:650;list-style:none;color:var(--blue)}
.fixed-times>summary.button::-webkit-details-marker{display:none}
.fixed-times[open]>summary.button{margin-bottom:8px}
.fixed-times-grid{padding-top:12px}
.availability-template-actions{justify-content:flex-end;gap:12px;margin:20px 0}
.availability-template-actions>form{margin:0}
.wish-row .availability-copy.card{margin:18px 0 0;padding:0;border-radius:12px}
.wish-row .availability-copy>summary{padding:12px 14px}
.wish-row .availability-copy .accordion-body{padding:14px}
.availability-copy>.accordion-body{display:grid;gap:18px;padding-top:18px}
.availability-copy .accordion-body>label{margin:0}
.copy-target-days{min-width:0;margin:0;padding:0;border:0}
.copy-target-days>legend{padding:0;margin-bottom:10px;font-size:.92rem}
.availability-copy .weekday-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;max-width:248px;margin-inline:auto}
.availability-copy .weekday-checks:has(>label:only-child){grid-template-columns:minmax(0,1fr);max-width:77px}
.availability-copy .weekday-checks:has(>label:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr));max-width:162px}
.availability-copy .weekday-checks>label{display:grid;grid-template-columns:18px 24px;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:8px 4px;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;cursor:pointer;background:var(--surface);color:var(--ink)}
.availability-copy .weekday-checks>label>span{text-align:left;white-space:nowrap}
.availability-copy .weekday-checks>label:has(input:checked){background:var(--blue-soft);border-color:var(--blue);color:var(--blue);font-weight:650}
.availability-copy .weekday-checks>label:has(input:focus-visible){outline:3px solid var(--blue);outline-offset:2px}
.availability-copy .weekday-checks input{flex:none;accent-color:var(--blue)}
.availability-copy-actions{display:flex;justify-content:flex-end;padding-top:2px}
.wish-navigation .wish-date-search label{margin:0}
.wish-navigation .week-today.button{min-height:42px;padding:10px 13px}
:root[data-theme] .wish-row .wish-day-name,:root[data-theme] .wish-row .wish-day-date{color:var(--blue);font-size:.94rem;font-weight:700;white-space:nowrap}
.wish-row>summary .wish-day-meta{margin-left:auto}
@media(max-width:650px){
 .hours-page .hours-summary-head{gap:12px}
 .hours-page .hours-total{min-width:160px;padding:10px 14px}
}
@media(max-width:480px){
 .admin-control.no-person .admin-control-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;align-items:stretch}
 .admin-control .admin-control-links .button{font-size:.8rem;padding-inline:8px}
 .cancellations-panel .cancel-badges{gap:6px}
 .cancellations-panel .cancel-reason{width:144px}
 .cancellations-panel .cancel-short-notice{width:76px}
}
