/* Schedule is deliberately scoped: the shared iPhone navigation frame is untouched. */
#scheduleWorkspace{max-width:none;border-radius:20px;background:#fff;box-shadow:0 8px 28px #1736550a}
#scheduleWorkspace .schedule-toolbar{background:#183957;color:#fff;padding:20px 24px;flex-wrap:wrap;gap:16px}
#scheduleWorkspace .schedule-toolbar .eyebrow{color:#b8d4ee;letter-spacing:.14em;font-size:11px}
#scheduleWorkspace .schedule-toolbar h2{color:#fff;font-size:23px;letter-spacing:-.025em}
#scheduleWorkspace .calendar-views{background:#0e2944;padding:4px;gap:3px}
#scheduleWorkspace .calendar-views button{min-height:40px;color:#d0e0f0;font-size:13px}
#scheduleWorkspace .calendar-views button.active{background:#fff;color:#173957}
#scheduleWorkspace .calendar-nav .button,#scheduleWorkspace .calendar-nav .icon-button{min-height:40px;border-color:#45647e;background:#264966;color:#fff;box-shadow:none}
#scheduleWorkspace .calendar-jump-popover{color:#203a52}
#scheduleWorkspace .schedule-tools{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid #e3eaf1;background:#fff}
#scheduleWorkspace .schedule-search{display:flex;align-items:center;gap:10px;flex:1 1 200px;max-width:380px;border:1px solid #cbd7e3;border-radius:10px;padding:0 12px;min-height:44px;color:#59718a}
#scheduleWorkspace .schedule-search svg{width:18px;height:18px;flex:none}
#scheduleWorkspace .schedule-search input{border:0;background:transparent;box-shadow:none;min-width:0;width:100%;height:42px;padding:0;font-size:14px;color:#183957;outline-offset:2px}
#scheduleWorkspace .schedule-summary{display:flex;align-items:center;gap:16px;font-size:12px;color:#52677b;margin-right:auto;flex-wrap:wrap}
#scheduleWorkspace .schedule-summary strong{color:#183957;font-size:18px;margin-right:4px}
#scheduleWorkspace .schedule-scale{display:flex;align-items:center;gap:8px;color:#52677b;font-size:12px}
#scheduleWorkspace .schedule-scale select{min-height:44px;border:1px solid #cbd7e3;border-radius:9px;padding:0 8px;background:#f8fafc;color:#203a52;font:inherit}
#scheduleWorkspace .schedule-scale[hidden]{display:none}
#scheduleWorkspace .schedule-main{grid-template-columns:minmax(0,1fr) 276px;min-height:420px}
#scheduleWorkspace.queue-collapsed .schedule-main{grid-template-columns:minmax(0,1fr) 52px}
#scheduleWorkspace .calendar-legend{display:block;padding:12px 18px;background:#f8fafc}
#scheduleWorkspace .calendar-people-toolbar{display:flex;align-items:center;flex-wrap:wrap;max-width:none;gap:8px 12px}
#scheduleWorkspace .calendar-people-toolbar>.calendar-people-picker{flex:0 1 260px;justify-content:flex-start}
#scheduleWorkspace .calendar-selection-count{display:grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:50%;background:#245fbb;color:#fff;font-size:11px;margin-left:auto}
#scheduleWorkspace .calendar-people-down{margin-left:0}
#scheduleWorkspace .calendar-selection-summary{font-size:11px;color:#405773;overflow-wrap:anywhere}
#calendarTechniciansDialog .calendar-people-list label{min-height:48px;padding:6px 10px;cursor:pointer}
#calendarTechniciansDialog .calendar-people-list input{appearance:none;display:grid;place-content:center;border:2px solid #718ba5;border-radius:50%;background:#fff;cursor:pointer}
#calendarTechniciansDialog .calendar-people-list input:checked{border-color:#2364d2}
#calendarTechniciansDialog .calendar-people-list input:checked:before{content:'';width:10px;height:10px;border-radius:50%;background:#2364d2}
#calendarTechniciansDialog .calendar-people-list input:focus-visible{outline:3px solid #347deb;outline-offset:3px}
#calendarTechniciansDialog .calendar-people-list .technician-avatar{width:26px;height:26px;flex:0 0 26px}
@media(forced-colors:active){#calendarTechniciansDialog .calendar-people-list input:checked:before{background:Highlight;forced-color-adjust:none}}
#scheduleWorkspace .calendar-people-chips{display:flex;flex-wrap:nowrap;overflow:auto;padding-top:8px;gap:6px}
#scheduleWorkspace .calendar-people-chips button{white-space:nowrap;min-height:34px;padding:5px 12px;border-radius:20px;font-size:12px}
#scheduleWorkspace .calendar-surface{min-height:400px;max-height:70vh;max-height:70dvh;overscroll-behavior:contain;scrollbar-gutter:stable;background:#fff}
#scheduleWorkspace .resource-board{display:block;min-width:100%;width:max-content;--resource-person-width:182px;background:#fff}
#scheduleWorkspace .resource-heading,#scheduleWorkspace .resource-row{display:grid;grid-template-columns:var(--resource-person-width) var(--resource-width)}
#scheduleWorkspace .resource-heading{position:sticky;top:0;z-index:12;min-height:48px;background:#f8fafc;box-shadow:0 1px #dce5ef}
#scheduleWorkspace .resource-corner{position:sticky;left:0;z-index:13;display:flex;flex-direction:column;justify-content:center;padding:8px 16px;background:#f1f5f9;font-size:11px;color:#546c83;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
#scheduleWorkspace .resource-corner small{font-size:10px;text-transform:none;letter-spacing:0;font-weight:400;margin-top:3px}
#scheduleWorkspace .resource-hours{position:relative;display:flex;align-items:center;overflow:hidden}
#scheduleWorkspace .resource-hours span{position:absolute;font-size:11px;font-weight:700;color:#526a80;padding-left:8px;white-space:nowrap}
#scheduleWorkspace .resource-person{position:sticky;left:0;z-index:9;border-right:1px solid #dce5ef;border-bottom:1px solid #e3eaf1;background:#fff;padding:14px;display:flex;align-items:flex-start;gap:9px;overflow:hidden}
#scheduleWorkspace .resource-person .technician-avatar{width:30px;height:30px;flex:none}
#scheduleWorkspace .resource-person strong{display:block;font-size:13px;line-height:1.35;color:#203a52;overflow-wrap:anywhere}
#scheduleWorkspace .resource-person small{display:block;font-size:11px;color:#5b7085;margin-top:5px;line-height:1.5}
#scheduleWorkspace .resource-track{position:relative;border-bottom:1px solid #b8cbe0;background-color:#fff;background-image:linear-gradient(to right,#9fb8d4 1px,transparent 1px),linear-gradient(to right,#bfd0e3 1px,transparent 1px),linear-gradient(to right,#d7e2ef 1px,transparent 1px);background-size:var(--resource-hour-width) 100%,calc(var(--resource-hour-width)/2) 100%,calc(var(--resource-hour-width)/4) 100%}
#scheduleWorkspace .resource-row:nth-child(2n) .resource-track{background-color:#f5f8fc}
#scheduleWorkspace .resource-hours{background-image:linear-gradient(to right,#9fb8d4 1px,transparent 1px);background-size:var(--resource-hour-width) 100%}
#scheduleWorkspace .resource-person{border-bottom-color:#b8cbe0;border-right-color:#9fb8d4}
#scheduleWorkspace .resource-row .resource-track.drop-target{background-color:#e6f0ff;box-shadow:inset 0 0 0 2px #5794ea}
#scheduleWorkspace .resource-row .resource-track.drop-conflict{background-color:#fff0ed;box-shadow:inset 0 0 0 2px #d76255}
#scheduleWorkspace .resource-row:has(.drop-target) .resource-person{background:#dceaff;box-shadow:inset 4px 0 #2569d5}
#scheduleWorkspace .resource-row:has(.drop-conflict) .resource-person{background:#fff0ed;box-shadow:inset 4px 0 #c94335}
/* Prevent native selection before the 8px drag threshold, including iOS long-press.
   Scope this to cards so search/confirmation text stays selectable. Keep touch scrolling. */
#scheduleWorkspace :is(.schedule-visit,.queue-card),#scheduleWorkspace :is(.schedule-visit,.queue-card) *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#scheduleWorkspace.schedule-drag-active,#scheduleWorkspace.schedule-drag-active *{cursor:grabbing!important;-webkit-user-select:none!important;user-select:none!important}
#scheduleWorkspace :is(.schedule-visit,.queue-card).dragging{opacity:.28;box-shadow:none;pointer-events:none}
#scheduleWorkspace .resource-event[draggable=true] .schedule-card-open{cursor:grab}
#scheduleWorkspace .resource-idle{position:sticky;left:210px;display:inline-block;padding:28px 20px;color:#5b7085;font-size:12px;pointer-events:none}
#scheduleWorkspace .resource-event{position:absolute;box-sizing:border-box;height:var(--resource-card-height);padding:0;border:1px solid #c6d7ec;border-left:4px solid var(--visit-accent,#3479d3);border-radius:11px;background:#eff5fe;color:#193955;box-shadow:0 2px 5px #19395508;overflow:hidden;z-index:3;cursor:pointer;transition:box-shadow .15s}
#scheduleWorkspace .resource-event:hover,#scheduleWorkspace .resource-event:focus-within{box-shadow:0 5px 16px #18395720;z-index:6}
#scheduleWorkspace .resource-event[data-status=completed]{background:#eff9f4;border-color:#b5dac6;border-left-color:#278359}
#scheduleWorkspace .resource-event.overdue{background:#fff8ed;border-color:#e5ca9b;border-left-color:#b97513}
#scheduleWorkspace .resource-event .schedule-card-open{padding:7px 26px 3px 8px;height:56px;overflow:hidden;display:flex;flex-direction:column;gap:4px}
#scheduleWorkspace .resource-event time{font-size:11px;font-weight:600;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
#scheduleWorkspace .resource-event strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;line-height:1.4}
#scheduleWorkspace .resource-event .resource-footer{display:flex;align-items:center;gap:5px;padding:0 7px;font-size:10px;height:27px;white-space:nowrap;overflow:hidden}
#scheduleWorkspace .resource-event .resource-number{font-weight:700;overflow:hidden;text-overflow:ellipsis}
#scheduleWorkspace .resource-event .schedule-move-handle{position:static;min-width:0;width:auto;height:26px;min-height:26px;margin:0 0 0 auto;padding:3px 8px;flex:none;border:1px solid #b9cee7;border-radius:6px;background:#fff;color:#245888;font-size:10px}
#scheduleWorkspace .resource-event .schedule-cancel-button{width:24px;height:24px;background:transparent;border:0;box-shadow:none;top:4px;right:3px;color:#667c91}
#scheduleWorkspace .resource-event .schedule-complete-badge,#scheduleWorkspace .resource-event .schedule-warranty-badge{font-size:10px;max-width:75px;flex:none;padding:2px 5px}
#scheduleWorkspace .resource-duration{position:absolute;bottom:0;left:0;height:3px;background:var(--visit-accent,#3479d3);pointer-events:none}
#scheduleWorkspace .resource-event .event-resize{position:absolute;right:0!important;top:30px;bottom:4px!important;left:auto!important;width:8px;height:auto!important;cursor:ew-resize;background:transparent;touch-action:none;border:0}
#scheduleWorkspace .resource-event .event-resize:hover{background:#24588825}
#scheduleWorkspace .resource-now{position:absolute;top:0;bottom:0;width:2px;background:#c62828;pointer-events:none;z-index:7}
#scheduleWorkspace .resource-hours .resource-now{top:5px}
#scheduleWorkspace .resource-hours .resource-now:before,#scheduleWorkspace .resource-hours .resource-now:after{content:'';position:absolute;top:0;left:-5px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:9px solid #c62828}
#scheduleWorkspace .resource-hours .resource-now:before{z-index:2}
#scheduleWorkspace .resource-hours .resource-now:after{border-top-color:#fb7185;filter:blur(3px);animation:schedule-header-clock-glow 1s ease-in-out infinite}
@keyframes schedule-header-clock-glow{0%,100%{opacity:.8;transform:scale(1.3)}50%{opacity:.25;transform:scale(.9)}}
@media(prefers-reduced-motion:reduce){#scheduleWorkspace .resource-hours .resource-now:after{animation:none;opacity:.25;transform:none}}
#scheduleWorkspace .resource-track .drop-preview{box-sizing:border-box;top:8px;right:auto;height:var(--resource-card-height);min-width:var(--resource-card-width);max-width:none;bottom:auto;border:2px solid #2266cf;border-left-width:4px;border-radius:11px;background:#e6f0ff;color:#163e70;padding:7px 8px;box-shadow:0 5px 16px #24589926;font-size:11px;z-index:8;display:flex;flex-direction:column;gap:4px}
#scheduleWorkspace .resource-track .drop-preview :is(span,strong,small){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.4}
#scheduleWorkspace .resource-track .drop-preview strong{font-size:14px}
#scheduleWorkspace .resource-track .drop-preview small{margin-top:auto;font-size:10px}
#scheduleWorkspace .resource-track .drop-preview.conflict{border-color:#c94335;background:#ffebe7;color:#852b24;box-shadow:0 5px 16px #b3453526}
.schedule-drag-ghost{box-sizing:border-box;min-width:144px;max-width:260px;min-height:68px;border:2px solid #76a7f2;background:#183957;padding:10px 12px;border-radius:11px;box-shadow:0 12px 28px #17345238}
.schedule-drag-ghost strong,.schedule-drag-ghost span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.schedule-drag-ghost strong{font-size:14px}.schedule-drag-ghost span{font-size:11px;margin-top:6px;color:#d1e3fa}
.schedule-drag-ghost[hidden]{display:none}
#scheduleWorkspace .schedule-footnote{padding:10px 18px;margin:0;border-top:1px solid #e3eaf1;font-size:11px;color:#5a7085;background:#f8fafc;line-height:1.6}
#scheduleWorkspace .schedule-no-results{padding:30px 20px;text-align:center;color:#62768a;font-size:14px}
#scheduleWorkspace .schedule-day-open{border:0;background:transparent;color:inherit;font:inherit;text-align:inherit;padding:4px;cursor:pointer;border-radius:6px}
#scheduleWorkspace .two-week-head .schedule-day-open,#scheduleWorkspace .month-date.schedule-day-open{min-height:32px;min-width:32px}
#scheduleWorkspace .two-week-day .calendar-event,#scheduleWorkspace .month-day .calendar-event{position:relative;border:1px solid #c6d7ec;border-left:3px solid var(--visit-accent,#3479d3);border-radius:5px;height:26px;min-height:26px;padding:0 5px;background:#edf4ff;overflow:hidden}
#scheduleWorkspace .schedule-number-visit .schedule-card-open{display:flex;align-items:center;height:24px;padding:0}
#scheduleWorkspace .schedule-number-visit .schedule-card-open strong{font-size:10px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#scheduleWorkspace .schedule-number-visit[data-status=completed]{background:#eff9f4;border-color:#b5dac6;border-left-color:#238259}
#scheduleWorkspace .two-week-day,#scheduleWorkspace .month-day{gap:6px;padding:9px}
#scheduleWorkspace .month-day.today{box-shadow:inset 0 3px #2872e4;background:#f5f9ff}
#scheduleWorkspace .schedule-number-visit .schedule-move-handle{position:absolute;right:25px;top:0;bottom:auto;min-height:24px;height:24px;width:24px;min-width:24px;margin:0;padding:0;font-size:0;border-radius:4px;background:#fff;opacity:0;pointer-events:none}
#scheduleWorkspace .schedule-number-visit .schedule-move-handle:after{content:'↕';font:700 13px/1 system-ui}
#scheduleWorkspace .schedule-number-visit .schedule-cancel-button{position:absolute;right:0;top:0;width:24px;height:24px;border:1px solid #c9d7e7;border-radius:4px;background:#fff;box-shadow:none;opacity:0;pointer-events:none}
#scheduleWorkspace .schedule-number-visit:is(:hover,:focus-within) :is(.schedule-move-handle,.schedule-cancel-button){opacity:1;pointer-events:auto}
#scheduleWorkspace .schedule-number-visit:has(.schedule-move-handle):is(:hover,:focus-within) .schedule-card-open{padding-right:46px}
#scheduleWorkspace .week-planner{display:grid;grid-template-columns:repeat(7,minmax(156px,1fr));min-width:1092px;align-items:stretch;background:#f5f8fc}
#scheduleWorkspace .week-planner-day{border-right:1px solid #dce5ef;min-height:400px;min-width:0}
#scheduleWorkspace .week-planner-day>header{position:sticky;top:0;z-index:8;background:#f8fafc;border-bottom:1px solid #dce5ef}
#scheduleWorkspace .week-planner-day>header button{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:86px;width:100%;padding:12px;border:0;background:transparent;color:#476581;font:inherit;font-size:12px;cursor:pointer}
#scheduleWorkspace .week-planner-day>header strong{font-size:23px;color:#203a52}
#scheduleWorkspace .week-planner-day>header [aria-current=date]{background:#e9f2ff;color:#175aba}
#scheduleWorkspace .week-planner-day>header small{font-size:11px}
#scheduleWorkspace .week-planner-visits{display:grid;gap:5px;padding:8px 7px}
#scheduleWorkspace .mobile-calendar-visit small>span{display:inline;font:inherit;line-height:inherit}
#scheduleWorkspace .week-planner .mobile-calendar-visit{position:relative;min-width:0;min-height:0;height:30px;padding:0 5px;border:1px solid #c6d7ec;border-left:3px solid var(--visit-accent);border-radius:5px;background:#eff5fe;color:#203a52;overflow:hidden}
#scheduleWorkspace .week-planner .mobile-calendar-visit .schedule-card-open{display:block;height:28px;padding:0}
#scheduleWorkspace .week-planner .mobile-calendar-visit time{display:block;height:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:8px;font-weight:500;line-height:9px;color:#32608e}
#scheduleWorkspace .week-planner .mobile-calendar-visit strong{display:block;height:11px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:11px;margin:0}
#scheduleWorkspace .week-planner .mobile-calendar-visit :is(.schedule-visit-device,.schedule-visit-address,.schedule-visit-crew,.technician-avatars,.parts-stage-group){display:none}
#scheduleWorkspace .week-planner .mobile-calendar-visit small{display:block;position:static;height:8px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:7.5px;line-height:8px;color:#365977}
#scheduleWorkspace .week-planner .mobile-calendar-visit .schedule-visit-number{font-size:7.5px}
#scheduleWorkspace .week-planner .mobile-calendar-visit .schedule-move-handle{position:absolute;left:auto;right:27px;bottom:2px;min-height:24px;height:24px;min-width:24px;width:24px;margin:0;padding:0;background:#fff;border:1px solid #b9cee7;border-radius:4px;color:#245888;font-size:0;opacity:0;pointer-events:none}
#scheduleWorkspace .week-planner .mobile-calendar-visit .schedule-move-handle:after{content:'↕';font:700 13px/1 system-ui}
#scheduleWorkspace .week-planner .mobile-calendar-visit .schedule-cancel-button{top:2px;right:2px;width:24px;height:24px;border:1px solid #c9d7e7;border-radius:4px;background:#fff;box-shadow:none;color:#62778a;opacity:0;pointer-events:none}
#scheduleWorkspace .week-planner .mobile-calendar-visit:is(:hover,:focus-within) :is(.schedule-move-handle,.schedule-cancel-button){opacity:1;pointer-events:auto}
#scheduleWorkspace .week-planner .mobile-calendar-visit:has(.schedule-move-handle):is(:hover,:focus-within) .schedule-card-open{padding-right:49px}
#scheduleWorkspace .week-planner .mobile-calendar-visit :is(.schedule-complete-badge,.schedule-warranty-badge){position:absolute;right:3px;top:1px;bottom:auto;font-size:7.5px;line-height:10px;max-width:49px;padding:0 2px;float:none;margin:0}
#scheduleWorkspace .week-planner .mobile-calendar-visit:has(.schedule-complete-badge,.schedule-warranty-badge) time{max-width:calc(100% - 49px)}
#scheduleWorkspace .week-planner .mobile-calendar-visit:has(.schedule-move-handle):is(:hover,:focus-within) .schedule-warranty-badge{opacity:0}
#scheduleWorkspace :is(.week-planner .mobile-calendar-visit,.schedule-number-visit) :is(.schedule-move-handle,.schedule-cancel-button){z-index:2}
/* Wide touch screens have no hover to reveal the compact-card controls. */
@media(hover:none){
  #scheduleWorkspace :is(.week-planner .mobile-calendar-visit,.schedule-number-visit) :is(.schedule-move-handle,.schedule-cancel-button){opacity:1;pointer-events:auto}
  #scheduleWorkspace :is(.week-planner .mobile-calendar-visit,.schedule-number-visit):has(.schedule-move-handle) .schedule-card-open{padding-right:49px}
}
#scheduleWorkspace .week-planner .mobile-calendar-visit[data-status=completed]{background:#eff9f4;border-color:#b5dac6;border-left-color:#238259}
#scheduleWorkspace .week-planner .schedule-no-results{font-size:12px;padding:20px 0}
#scheduleWorkspace .dispatch-queue header{height:70px;background:#f5f8fc}
#scheduleWorkspace .dispatch-queue h3{color:#183957}
#scheduleWorkspace .dispatch-queue header .eyebrow{color:#57728d}
#scheduleWorkspace .dispatch-queue header>button{color:#245888;background:#fff;border:1px solid #cbd9e8}
#scheduleWorkspace .queue-list{min-height:260px;max-height:65vh}
#scheduleWorkspace .queue-empty,#scheduleWorkspace .timeline-day-head small,#scheduleWorkspace .time-rail>span,#scheduleWorkspace .month-weekday{color:#536c82}
#scheduleWorkspace :is(button,input,select):focus-visible{outline:3px solid #347deb;outline-offset:2px}
@media(max-width:1100px) and (min-width:901px){#scheduleWorkspace .schedule-main{grid-template-columns:minmax(0,1fr) 225px}#scheduleWorkspace .resource-board{--resource-person-width:155px}#scheduleWorkspace .schedule-toolbar{padding:16px}#scheduleWorkspace .calendar-nav{margin-left:0}}
@media(max-width:900px){
  #scheduleWorkspace{border-radius:12px}
  #scheduleWorkspace .schedule-toolbar{padding:8px;gap:6px}
  #scheduleWorkspace .schedule-toolbar>div:first-child{display:block;width:100%}
  #scheduleWorkspace .schedule-toolbar .eyebrow{display:none}
  #scheduleWorkspace .schedule-toolbar h2{font-size:16px}
  #scheduleWorkspace .calendar-nav{margin:0;display:flex;width:100%;gap:4px}
  #scheduleWorkspace .calendar-nav .calendar-jump{flex:1;min-width:0}
  #scheduleWorkspace #calendarJump{font-size:12px;width:100%;padding:0 8px;white-space:nowrap;color:#fff}
  #scheduleWorkspace .calendar-nav :is(.button,.icon-button){min-height:44px;border-radius:7px;font-size:11px;padding:0 8px}
  #scheduleWorkspace :is(.calendar-nav,.calendar-people-toolbar,.dispatch-queue) svg{width:14px;height:14px;flex-basis:14px}
  #scheduleWorkspace .calendar-views{width:100%;margin:0;display:grid;grid-template-columns:repeat(4,1fr)}
  #scheduleWorkspace .calendar-views{padding:2px;gap:2px;border-radius:8px}
  #scheduleWorkspace .calendar-views button{min-height:44px;padding:0 5px;font-size:11px;border-radius:6px}
  #scheduleWorkspace .schedule-tools{padding:6px 8px;gap:6px}
  #scheduleWorkspace .schedule-search{max-width:none;flex-basis:100%}
  #scheduleWorkspace .schedule-search{gap:6px;padding:0 8px;border-radius:7px}
  #scheduleWorkspace .schedule-search svg{width:14px;height:14px}
  #scheduleWorkspace .schedule-search input{font-size:16px}
  #scheduleWorkspace .schedule-summary{font-size:10px;gap:10px}
  #scheduleWorkspace .schedule-summary strong{font-size:12px}
  #scheduleWorkspace .schedule-scale{display:none}
  #scheduleWorkspace #calendarDayControl:not([hidden]){display:flex;order:1;margin-left:auto}
  #scheduleWorkspace #calendarDayControl select{min-width:108px;border-radius:7px;font-size:12px}
  #scheduleWorkspace .schedule-tools:has(#calendarDayControl:not([hidden])) .schedule-search{flex-basis:125px}
  #scheduleWorkspace .schedule-summary{order:2;flex-basis:100%}
  #scheduleWorkspace .calendar-legend{padding:6px 8px}
  #scheduleWorkspace .calendar-people-toolbar{max-width:none}
  #scheduleWorkspace .calendar-people-toolbar>.calendar-people-picker{flex:1 1 185px}
  #scheduleWorkspace .calendar-selection-summary{font-size:10px;flex:1 1 70px}
  #scheduleWorkspace .calendar-people-picker{font-size:12px;padding:5px 8px;gap:5px;border-radius:7px}
  #scheduleWorkspace .calendar-people-chips{padding-top:4px;gap:4px}
  #scheduleWorkspace .calendar-people-chips button{min-height:44px;min-width:44px;padding:4px 8px;font-size:10px}
  #scheduleWorkspace .schedule-main{display:flex;min-height:0}
  #scheduleWorkspace .schedule-calendar-pane{order:0;min-width:0}
  #scheduleWorkspace .dispatch-queue{order:1;border-top:1px solid #cedbe8;border-bottom:0}
  #scheduleWorkspace .calendar-surface:has(.resource-board){min-height:240px;max-height:65vh;max-height:65dvh;overflow:auto;touch-action:pan-x pan-y}
  #scheduleWorkspace .resource-board{--resource-person-width:86px;width:max-content}
  #scheduleWorkspace .resource-heading{min-height:32px}
  #scheduleWorkspace .resource-corner{padding:3px 5px;font-size:8px;letter-spacing:.02em}
  #scheduleWorkspace .resource-corner small{font-size:9px;margin-top:1px}
  #scheduleWorkspace .resource-hours span{font-size:9px;padding-left:5px}
  #scheduleWorkspace .resource-person{padding:5px;gap:3px;flex-direction:column}
  #scheduleWorkspace .resource-person .technician-avatar{width:16px;height:16px}
  #scheduleWorkspace .resource-person .technician-avatar b{font-size:8px}
  #scheduleWorkspace .resource-person strong{font-size:10px}
  #scheduleWorkspace .resource-person small{font-size:9px;margin-top:2px}
  #scheduleWorkspace .resource-idle{left:94px;padding:22px 6px;font-size:10px}
  #scheduleWorkspace .resource-event{touch-action:pan-x pan-y;border-radius:7px;border-left-width:3px}
  #scheduleWorkspace .resource-event .schedule-card-open{height:44px;min-height:44px;padding:4px 44px 2px 5px;gap:2px}
  #scheduleWorkspace .resource-event time{font-size:9px;line-height:12px}
  #scheduleWorkspace .resource-event strong{font-size:11px;line-height:14px}
  #scheduleWorkspace .resource-event .resource-footer{height:44px;gap:2px;padding:0 3px;font-size:8px}
  #scheduleWorkspace .resource-event .schedule-move-handle{height:44px;min-height:44px;min-width:44px;padding:3px;font-size:10px;border-radius:6px}
  #scheduleWorkspace .resource-event .schedule-cancel-button{width:44px;height:44px;top:0;right:0}
  #scheduleWorkspace .resource-event .schedule-cancel-button svg{width:12px;height:12px}
  #scheduleWorkspace .resource-event :is(.schedule-complete-badge,.schedule-warranty-badge){font-size:8px;padding:2px 3px;max-width:60px}
  #scheduleWorkspace .resource-track .drop-preview{top:4px;border-radius:7px;font-size:9px;padding:4px 5px;gap:2px}
  #scheduleWorkspace .resource-track .drop-preview strong{font-size:11px}
  #scheduleWorkspace .resource-event .event-resize{display:none}
  #scheduleWorkspace .calendar-surface:has(.day-agenda){max-height:none;min-height:0;overflow:visible;scrollbar-gutter:auto}
  #scheduleWorkspace .day-agenda{display:block;width:100%;min-width:0;padding:8px;background:#f4f7fb}
  #scheduleWorkspace .agenda-date-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin-bottom:8px}
  #scheduleWorkspace .agenda-date-strip button{border:0;background:transparent;color:#526b83;border-radius:7px;min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:9px}
  #scheduleWorkspace .agenda-date-strip button strong{font-size:13px}
  #scheduleWorkspace .agenda-date-strip button[aria-pressed=true]{background:#2364d2;color:#fff;box-shadow:0 4px 10px #2364d222}
  #scheduleWorkspace .agenda-date-strip button[aria-current=date]:not([aria-pressed=true]){box-shadow:inset 0 0 0 1px #2364d2;color:#2364d2}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit{display:block;margin:0 0 8px;background:#fff;border:1px solid #d6e1ed;border-left:3px solid var(--visit-accent);border-radius:8px;box-shadow:0 2px 6px #18395708;min-height:0;padding:8px 8px 58px;color:#1b3854;overflow:hidden}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit .schedule-card-open{padding:0 35px 0 0}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit time{font-size:11px;font-weight:700;color:#326799;display:block;margin-bottom:3px}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit strong{font-size:14px;white-space:normal;margin:3px 0}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit span{white-space:normal;font-size:11px;line-height:1.4}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit small{font-size:10px;line-height:1.4;margin-top:4px;display:block;color:#556d84}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit .schedule-move-handle{position:absolute;left:8px;right:8px;bottom:6px;width:auto;min-height:44px;height:44px;border-radius:6px;background:#edf4ff;border:1px solid #d2e1f7;color:#245888;font-weight:600;font-size:11px}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit .schedule-cancel-button{position:absolute;top:2px;right:2px;min-width:44px;min-height:44px;background:transparent;border:0;box-shadow:none;color:#687e93}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit[data-status=completed]{border-left-color:#238259;padding-bottom:8px;min-height:0}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit .technician-avatars{float:right;margin-right:0;max-width:70px}
  #scheduleWorkspace .day-agenda .mobile-calendar-visit .schedule-complete-badge{float:none;width:max-content;display:block;margin:0 0 8px;background:#e0f4e9;color:#17603f;font-size:11px}
  #scheduleWorkspace .agenda-continuation{font-size:11px;color:#805f20;margin:0 0 6px;padding:0 4px}
  #scheduleWorkspace .mobile-calendar-visit .technician-avatars .technician-avatar{width:18px;height:18px}
  #scheduleWorkspace .mobile-calendar-visit .technician-avatar b{font-size:8px}
  #scheduleWorkspace .mobile-calendar-visit .schedule-cancel-button svg{width:12px;height:12px}
  #scheduleWorkspace .mobile-week-columns{grid-auto-columns:clamp(140px,40vw,168px);gap:5px;padding:0 5px 6px}
  #scheduleWorkspace .mobile-calendar-column{border-radius:8px}
  #scheduleWorkspace .mobile-calendar-column>header strong{font-size:12px}
  #scheduleWorkspace .mobile-column-visits{gap:5px;padding:5px}
  #scheduleWorkspace .mobile-column-visits .mobile-calendar-visit{padding:5px;gap:4px;border-radius:7px}
  #scheduleWorkspace .mobile-column-visits .mobile-calendar-visit time{font-size:10px}
  #scheduleWorkspace .mobile-column-visits .mobile-calendar-visit strong{font-size:12px;margin:3px 0}
  #scheduleWorkspace .mobile-column-visits .mobile-calendar-visit :is(span,small){font-size:10px;line-height:1.35}
  #scheduleWorkspace .mobile-column-visits .mobile-calendar-visit .schedule-move-handle{font-size:10px}
  #scheduleWorkspace .mobile-month-grid button{min-height:48px;gap:3px;padding:3px 1px}
  #scheduleWorkspace .mobile-month-grid button>strong{font-size:12px}
  #scheduleWorkspace .mobile-month-grid button small{font-size:9px}
  #scheduleWorkspace .schedule-footnote{padding:6px 8px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){#scheduleWorkspace *{scroll-behavior:auto!important;transition:none!important}}

/* Body-level preview escapes calendar clipping and never intercepts the pointer. */
.schedule-visit-preview{position:fixed;z-index:80;width:360px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:hidden;pointer-events:none;background:#fff;border:1px solid #c8d8e7;border-radius:14px;box-shadow:0 16px 50px #17395730;color:#203a52;font-size:13px;line-height:1.5;text-align:left;box-sizing:border-box}
.schedule-visit-preview[hidden]{display:none}
.schedule-visit-preview header{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:15px 18px;background:#183957;color:#fff}
.schedule-visit-preview .schedule-preview-number{font-size:11px;font-weight:700;letter-spacing:.06em;margin-right:auto;color:#cee1f3}
.schedule-visit-preview .schedule-preview-status{background:#ffffff20;border:1px solid #ffffff35;border-radius:20px;padding:2px 8px;font-size:11px}
.schedule-visit-preview header strong{display:block;flex-basis:100%;font-size:19px;font-weight:700;overflow-wrap:anywhere;line-height:1.35}
.schedule-visit-preview dl{display:grid;grid-template-columns:56px minmax(0,1fr);gap:11px 12px;padding:16px 18px;margin:0}
.schedule-visit-preview dt{font-size:11px;color:#5a7085;font-weight:600;padding-top:2px}
.schedule-visit-preview dd{margin:0;white-space:pre-line;overflow-wrap:anywhere;color:#203a52}
.schedule-visit-preview .schedule-preview-hint{font-size:11px;color:#546d85;background:#f5f8fc;border-top:1px solid #e2eaf2;padding:10px 18px;margin:0}
