/* v15: Keep week navigation and Manage entirely inside the original week card. */
.week-control{overflow:hidden;box-sizing:border-box}
.week-control .week-navigation{min-width:0!important;max-width:100%}
.week-control .week-buttons{display:grid!important;grid-template-columns:48px minmax(0,1fr) 48px!important;column-gap:5px!important;row-gap:7px!important;align-items:center!important;width:100%;min-width:0;box-sizing:border-box}
.week-control .week-buttons .arrow{width:48px!important;min-width:0!important;height:54px!important;padding:4px 1px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:0;line-height:1.05!important;border-radius:10px;font-size:20px!important}
.week-control .week-buttons .week-arrow-symbol{font-size:22px;line-height:1.1;font-weight:500}
.week-control .week-buttons .week-arrow-label{font-size:10px;font-weight:750;letter-spacing:0;line-height:1.25;white-space:nowrap}
.week-control .week-buttons .date-control{min-width:0!important;max-width:100%!important;justify-content:center!important;white-space:nowrap;font-size:clamp(12px,2.9vw,18px)!important;padding:0!important}
.week-control .week-buttons #this-week{grid-column:1 / -1!important;grid-row:2!important;justify-self:center!important;width:auto!important;max-width:100%;min-height:40px}
.week-control .week-indicator{min-width:0!important;box-sizing:border-box}
.week-control .week-indicator #spv-tools-btn{width:100%;max-width:100%;min-width:0!important;min-height:46px;padding:9px 5px;font-size:12px;white-space:nowrap}
@media(max-width:700px){.week-control{grid-template-columns:minmax(0,1fr) 100px!important;gap:8px!important;padding:12px 10px!important}.week-control .week-indicator{width:100px!important;max-width:100px!important;padding-left:8px!important}.week-control .week-buttons{grid-template-columns:44px minmax(0,1fr) 44px!important;gap:4px!important}.week-control .week-buttons .arrow{width:44px!important;height:52px!important}.week-control .week-buttons .date-control{font-size:clamp(12px,3.4vw,16px)!important}}
@media(max-width:360px){.week-control{grid-template-columns:minmax(0,1fr) 86px!important;gap:6px!important}.week-control .week-indicator{width:86px!important;max-width:86px!important;padding-left:5px!important}.week-control .week-buttons{grid-template-columns:38px minmax(0,1fr) 38px!important;gap:2px!important}.week-control .week-buttons .arrow{width:38px!important}.week-control .week-buttons .week-arrow-label{font-size:9px}.week-control .week-buttons .date-control{font-size:12px!important}}

/* v16: clear date-field separation and an actual Monday-only publication picker */
#spv-tools-panel .holiday-dates{gap:16px!important;margin:12px 0 4px}
#spv-tools-panel .holiday-dates label{min-width:0;gap:7px!important}
#spv-tools-panel .spv-date-field{position:relative;display:block;min-width:0}
#spv-tools-panel .spv-date-field input{display:block;width:100%;min-height:52px;min-width:0;box-sizing:border-box;background:#f7fafb;border:1.5px solid #aebfc9!important;border-radius:11px!important;padding:10px 34px 10px 10px!important;color:#263e4d;font-size:14px;cursor:pointer;box-shadow:0 2px 4px #2437460b}
#spv-tools-panel .spv-date-field input:focus{outline:2px solid #427d98;outline-offset:2px}
#spv-tools-panel .spv-date-field input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
#spv-tools-panel .spv-calendar-icon{pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:19px;color:#49677b}
#spv-tools-panel .spv-publish-week-label{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-weight:600;color:#526477}
#spv-tools-panel .spv-week-date-button{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:165px;min-height:48px;border:1.5px solid #aebfc9!important;border-radius:11px!important;background:#f7fafb!important;color:#263e4d!important;font-weight:650!important;padding:10px 13px!important;white-space:nowrap}
.spv-monday-shade{position:fixed;inset:0;background:#0c1e2b9c;z-index:100100;display:flex;align-items:center;justify-content:center;padding:16px}
.spv-monday-panel{background:white;color:#263e4d;border-radius:17px;padding:18px;width:min(360px,100%);box-shadow:0 18px 55px #0005;font:15px system-ui}
.spv-monday-top,.spv-monday-month{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.spv-monday-top button,.spv-monday-month button{border:1px solid #cfdae0;background:#f1f5f7;border-radius:9px;min-width:42px;min-height:42px;font-size:22px;color:#304959;cursor:pointer}
.spv-monday-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}
.spv-monday-choice{border:1.5px solid #bacbd3;border-radius:10px;background:#f4f8fa;padding:14px 8px;color:#304959;font-weight:650;cursor:pointer}
.spv-monday-choice.selected{background:#415767;color:#fff}
.spv-monday-panel small{color:#667986}
@media(max-width:380px){#spv-tools-panel .holiday-dates{gap:10px!important}#spv-tools-panel .spv-date-field input{font-size:12px;padding-left:7px!important;padding-right:26px!important}#spv-tools-panel .spv-calendar-icon{right:7px}}

/* v17: arrows only, directly flanking the date; never overlap Manage. */
.week-control .week-buttons{grid-template-columns:34px minmax(0,1fr) 34px!important;column-gap:4px!important}
.week-control .week-buttons .arrow{width:34px!important;height:44px!important;min-height:44px!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:24px!important;line-height:1!important}
.week-control .week-buttons .date-control{min-width:0!important;overflow:hidden!important;white-space:nowrap!important}
.week-control .week-buttons .date-control strong{white-space:nowrap!important;font-size:clamp(12px,3.3vw,17px)!important}
.week-control .week-buttons .week-arrow-label{display:none!important}
@media(max-width:700px){.week-control{grid-template-columns:minmax(0,1fr) 100px!important;gap:7px!important}.week-control .week-buttons{grid-template-columns:32px minmax(0,1fr) 32px!important;gap:2px!important}.week-control .week-buttons .arrow{width:32px!important}.week-control .week-indicator{width:100px!important;max-width:100px!important}}
@media(max-width:360px){.week-control{grid-template-columns:minmax(0,1fr) 86px!important;gap:5px!important}.week-control .week-buttons{grid-template-columns:28px minmax(0,1fr) 28px!important;gap:1px!important}.week-control .week-buttons .arrow{width:28px!important}.week-control .week-indicator{width:86px!important;max-width:86px!important}.week-control .week-buttons .date-control strong{font-size:12px!important}}

/* v18: short previous/next week buttons, both fully inside the date section. */
.week-control .week-buttons{grid-template-columns:58px minmax(0,1fr) 58px!important;gap:5px!important}
.week-control .week-buttons .arrow{width:58px!important;min-width:0!important;height:44px!important;padding:0 3px!important;font-size:14px!important;gap:3px!important;font-weight:700!important;white-space:nowrap!important}
.week-control .week-buttons .date-control strong{font-size:clamp(12px,3.2vw,17px)!important}
@media(max-width:700px){.week-control .week-buttons{grid-template-columns:54px minmax(0,1fr) 54px!important;gap:3px!important}.week-control .week-buttons .arrow{width:54px!important;font-size:12px!important;gap:2px!important}}
@media(max-width:360px){.week-control .week-buttons{grid-template-columns:46px minmax(0,1fr) 46px!important;gap:2px!important}.week-control .week-buttons .arrow{width:46px!important;font-size:11px!important;gap:1px!important}.week-control .week-buttons .date-control strong{font-size:11px!important}}

/* v19: iPhone-safe date fields, no overlap or horizontal overflow */
#spv-tools-panel{box-sizing:border-box!important;overflow-x:hidden!important}
#spv-tools-panel .holiday-dates{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important}
#spv-tools-panel .holiday-dates label,#spv-tools-panel .spv-date-field{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
#spv-tools-panel .holiday-dates label{font-size:13px!important}
#spv-tools-panel .spv-date-field{margin-top:7px!important;overflow:hidden!important}
#spv-tools-panel .spv-date-field input{display:block!important;appearance:none!important;-webkit-appearance:none!important;width:100%!important;min-width:0!important;max-width:100%!important;height:48px!important;min-height:48px!important;font-size:clamp(11px,3vw,14px)!important;padding:8px 27px 8px 7px!important;line-height:1.2!important;box-sizing:border-box!important;border:1.5px solid #aebfc9!important;border-radius:9px!important}
#spv-tools-panel .spv-calendar-icon{right:7px!important;font-size:15px!important}
#spv-tools-panel .spv-date-field input::-webkit-date-and-time-value{text-align:left;min-width:0}
#spv-tools-panel .spv-date-field input::-webkit-datetime-edit{padding:0;min-width:0}
.spv-wheel-panel{max-width:340px!important;box-sizing:border-box}
.spv-wheel-help{color:#64748b;font-size:13px;margin:0 0 12px}
.spv-wheel-wrap{position:relative;height:240px;overflow:hidden;border-block:1px solid #d8e1e7}
.spv-wheel{height:240px;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;position:relative}
.spv-wheel::-webkit-scrollbar{display:none}
.spv-wheel-pad{height:96px;flex:none}
.spv-wheel-item{display:block!important;width:100%;height:48px;min-height:48px;border:0!important;border-radius:0!important;background:transparent!important;margin:0!important;padding:0 10px!important;color:#536575;font-size:17px!important;font-weight:500;scroll-snap-align:center;position:relative;z-index:2}
.spv-wheel-item[aria-selected=true]{color:#233e50!important;font-weight:800!important}
.spv-wheel-highlight{position:absolute;left:0;right:0;top:96px;height:48px;border-top:1.5px solid #9fb4c2;border-bottom:1.5px solid #9fb4c2;background:#eaf1f5;pointer-events:none;z-index:1;border-radius:8px}
.spv-wheel-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px}
.spv-wheel-actions button{border:1px solid #c5d1da;border-radius:9px;padding:11px 14px;background:#eef3f5;color:#2c4554;font-weight:650}
.spv-wheel-actions [data-choose]{background:#415767;color:white}

/* v20: readable adjacent-week labels without overlapping the date or Manage. */
.week-control .week-buttons{grid-template-columns:62px minmax(0,1fr) 62px!important;column-gap:2px!important;min-width:0!important;width:100%!important}
.week-control .week-buttons .arrow{width:62px!important;max-width:100%!important;height:46px!important;min-height:44px!important;flex-direction:row!important;gap:3px!important;padding:0 3px!important;white-space:nowrap!important;overflow:visible!important;font-size:12px!important;line-height:1.1!important}
.week-control .week-buttons .arrow .week-arrow-label{display:inline!important;visibility:visible!important;opacity:1!important;font-size:12px!important;line-height:1.1!important;font-weight:750!important;color:inherit!important}
.week-control .week-buttons .arrow .week-arrow-symbol{display:inline!important;visibility:visible!important;font-size:17px!important;line-height:1!important}
.week-control .week-buttons .date-control{min-width:0!important;overflow:visible!important}
.week-control .week-buttons .date-control strong{font-size:clamp(11px,3.15vw,16px)!important;letter-spacing:-.3px!important}
@media(max-width:700px){.week-control .week-buttons{grid-template-columns:59px minmax(0,1fr) 59px!important;gap:2px!important}.week-control .week-buttons .arrow{width:59px!important}.week-control .week-buttons .arrow .week-arrow-label{font-size:11px!important}}
@media(max-width:360px){.week-control .week-buttons{grid-template-columns:53px minmax(0,1fr) 53px!important;gap:1px!important}.week-control .week-buttons .arrow{width:53px!important;gap:1px!important}.week-control .week-buttons .arrow .week-arrow-label{font-size:10px!important}.week-control .week-buttons .date-control strong{font-size:11px!important}}

/* v21: Monday wheel selected date must remain readable above the selection band. */
.spv-wheel-wrap{isolation:isolate!important;background:#fff!important}
.spv-wheel-highlight{z-index:0!important;background:#e7f0f5!important;border:1.5px solid #9fb4c2!important;box-sizing:border-box!important}
.spv-wheel{z-index:2!important;background:transparent!important;isolation:isolate!important}
.spv-wheel-item{position:relative!important;z-index:3!important;display:flex!important;align-items:center!important;justify-content:center!important;opacity:1!important;visibility:visible!important;text-shadow:none!important;line-height:48px!important;-webkit-text-fill-color:#536575!important}
.spv-wheel-item[aria-selected="true"]{color:#173c53!important;-webkit-text-fill-color:#173c53!important;font-weight:800!important;opacity:1!important;visibility:visible!important}

/* v22: accessible leave management and stable arrow-only navigation */
#spv-tools-panel .spv-leave-actions:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:9px;padding:10px;background:#f5f8fa;border-radius:10px}
#spv-tools-panel .spv-leave-actions[hidden]{display:none!important}
#spv-tools-panel .spv-leave-actions label{min-width:0;font-size:12px}
#spv-tools-panel .spv-leave-actions input{width:100%;min-width:0;box-sizing:border-box;display:block;margin-top:4px}
#spv-tools-panel .spv-leave-actions button{min-width:0;white-space:normal}
.week-control .week-buttons .arrow .week-arrow-label{display:none!important;visibility:hidden!important}
.week-control .week-buttons .arrow{font-size:24px!important}

/* v23: compact two-line Crew Hub, light blue matching the week controls. */
.week-control .week-indicator #spv-tools-btn{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:62px!important;padding:7px 3px!important;background:#c9e6f2!important;color:#244b60!important;border:1px solid #a6c9da!important;border-radius:11px!important;box-shadow:0 1px 3px #203a4a15!important;font-size:14px!important;line-height:1.15!important;font-weight:750!important;white-space:normal!important;text-align:center!important;cursor:pointer!important}
.week-control .week-indicator #spv-tools-btn:focus-visible{outline:2px solid #246582!important;outline-offset:2px!important}
.week-control .week-indicator #spv-tools-btn span{display:block;white-space:nowrap}
.week-control .week-indicator #spv-tools-btn span span{display:inline}

/* Approved holiday / day-off entries in the crew grid */
.cell-button.spv-approved-leave{background:#e3f0f7!important;border-color:#91bfd4!important;color:#244b60!important;cursor:not-allowed!important;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px}.cell-button.spv-approved-leave .location-label{font-weight:800!important;text-align:center}.cell-button.spv-approved-leave .spv-booked-by{font-size:10px;line-height:1.25;text-align:center;white-space:normal}
