/* Bounded calendar previews and the persistent All Cases workspace. */
.month-head>div:last-child{display:flex;align-items:center;gap:4px}
.month-head .round-btn{display:inline-flex;align-items:center;justify-content:center;margin:0}
.calendar-panel .calendar-grid .day-cell{height:var(--compact-calendar-cell-height,72px)!important;min-height:0;padding:3px 4px!important;gap:0}
.calendar-grid .day-cell>*{flex-shrink:0}
.calendar-panel .calendar-grid .date-num{height:16px;line-height:16px;font-size:11px;margin:0 0 1px}
.calendar-panel .calendar-grid .today .date-num{height:16px;width:16px;margin:0 0 1px}
.calendar-grid .calendar-event{display:block!important;font-size:11px;line-height:13px;height:13px;min-height:0;padding:0 3px!important;margin:0;max-width:100%;color:var(--ink);background:color-mix(in srgb,var(--blue) 12%,var(--surface,#fff));border-left-color:var(--blue)}
.calendar-grid .calendar-event-time{font-weight:700}
.calendar-grid .more-events,.calendar-preview-note{display:block!important;color:var(--muted);font-size:11px;line-height:13px;padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.calendar-grid [data-calendar-more="responsive"] .more-events{display:none!important}
.calendar-grid[data-preview-limit="0"] .calendar-event,.calendar-grid[data-preview-limit="1"] .calendar-event[data-preview-slot="2"],.calendar-grid[data-preview-limit="1"] .calendar-event[data-preview-slot="3"],.calendar-grid[data-preview-limit="2"] .calendar-event[data-preview-slot="3"]{display:none!important}
.calendar-grid[data-preview-limit="0"] [data-calendar-previews]:not([data-calendar-previews="0"]) .more-events,.calendar-grid[data-preview-limit="1"] [data-calendar-previews="2"] .more-events,.calendar-grid[data-preview-limit="1"] [data-calendar-previews="3"] .more-events,.calendar-grid[data-preview-limit="2"] [data-calendar-previews="3"] .more-events{display:block!important}
.calendar-grid .calendar-event.parts-required{border-left-color:var(--warning,#bb8523)}
.calendar-grid .calendar-event.tech-complete,.calendar-grid .calendar-event.complete{border-left-color:var(--success,#34846b)}
@media(min-width:1301px){
  .calendar-content{min-height:0!important}
  .calendar-content>.calendar-panel,.calendar-content>.calendar-panel.has-capacity{padding:12px 12px calc(30px + env(safe-area-inset-bottom,0px))!important}
  .calendar-content>.calendar-panel .calendar-toolbar{margin-bottom:8px}
  .calendar-content>.calendar-panel .calendar-toolbar h1{font-size:22px;margin:0}
  .calendar-content>.calendar-panel .month-head{margin-bottom:6px}
  .calendar-content>.calendar-panel .month-title{font-size:16px}
  .calendar-content>.calendar-panel .weekdays span{padding:5px 4px;line-height:14px}
  .calendar-content>.calendar-panel .technician-capacity-panel{margin-top:8px}
  .calendar-content>.calendar-panel .technician-capacity-panel>header{padding:8px 10px}
  .calendar-content>.calendar-panel .technician-capacity-panel h2{font-size:13px}
  .calendar-content>.calendar-panel[data-compact-calendar] .capacity-scroll{max-height:var(--compact-capacity-height,128px)!important;overflow:auto;overscroll-behavior:contain}
}
.schedule-list .job-card-case{color:var(--ink);font-size:11px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
.schedule-list .job-card-type{position:absolute;top:54px;right:8px;display:grid;place-items:center;width:22px;height:16px;border:1px solid var(--line);border-radius:4px;background:color-mix(in srgb,var(--ink) 6%,var(--surface,#fff));color:var(--ink);font:800 11px/1 var(--font)}
/* Technician cards keep the appointment, address and pickup reminders readable. */
.technician-case-list .technician-case-card{grid-template-columns:82px minmax(0,1fr);gap:8px 12px;align-items:start;padding:14px;color:var(--ink)}
.technician-case-card .technician-case-schedule{grid-column:1;grid-row:1/span 2;align-items:flex-start;gap:5px}
.technician-case-card .technician-case-time{max-width:100%;font:800 13px/1.4 var(--font);white-space:normal;overflow-wrap:anywhere}
.technician-case-card .technician-time-divider{width:1px;height:9px;margin-left:29px;background:var(--muted);opacity:.65}
.technician-case-card .technician-case-schedule .case-status-summary{display:flex;grid-column:auto;max-width:100%;margin-top:5px}
.technician-case-schedule .case-status-summary .status{max-width:100%;padding:5px 7px;font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.technician-case-card .technician-case-content{grid-column:2;min-width:0}
.technician-case-card .technician-case-content h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere;font-size:15px;line-height:1.35;color:var(--ink)}
.technician-case-card .technician-case-content p{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;color:var(--ink)}
.technician-case-card .technician-case-address{margin-top:7px;font-size:13px;line-height:1.45}
.technician-case-card .technician-case-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 5px;margin-top:7px;font-size:12px;line-height:1.4}
.technician-case-card .technician-case-assignees{display:flex;align-items:flex-start;gap:5px;margin-top:5px;font-size:12px;line-height:1.4}
.technician-case-assignees .icon{flex:0 0 13px;width:13px;height:15px}
.technician-case-card .technician-case-footer{grid-column:2;display:flex;align-items:flex-end;gap:7px;min-width:0;align-self:end}
.technician-case-card .technician-case-reminders{display:flex;flex:1;flex-wrap:wrap;gap:5px;min-width:0}
.technician-case-reminders .pickup-summary{max-width:100%;padding:4px 6px;border-radius:6px;font-size:11px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.technician-case-priority{display:grid;place-items:center;flex:0 0 22px;width:22px;height:20px;border:1px solid #c6cbd1;border-radius:5px;background:#e9ecef;color:#48515d;font:800 11px/1 var(--font)}
.technician-case-priority.priority-high{border-color:#e2a04b;background:#fff0d8;color:#955000}
.technician-case-priority.priority-urgent{border-color:#e69292;background:#fee2e2;color:#b42323}
html:is([data-theme=dark],[data-color-scheme=dark]) .technician-case-priority{border-color:#606773;background:#33373e;color:#e5e7eb!important}
html:is([data-theme=dark],[data-color-scheme=dark]) .technician-case-priority.priority-high{border-color:#ac752f;background:#50361d;color:#ffd095!important}
html:is([data-theme=dark],[data-color-scheme=dark]) .technician-case-priority.priority-urgent{border-color:#ad5559;background:#50272c;color:#ffb8bd!important}
@media(max-width:720px){
  .technician-case-list .technician-case-card{grid-template-columns:76px minmax(0,1fr);gap:8px 10px;padding:12px}
  .detail-panel .detail-scroll{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))!important;scroll-padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:360px){
  .technician-calendar{padding-inline:4px}
  .technician-case-list .technician-case-card{grid-template-columns:70px minmax(0,1fr);column-gap:8px;padding:10px}
  .technician-case-card .technician-case-time{font-size:12px}
}
.address-search-control.case-field-searches{display:flex!important;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;gap:10px;margin:0 0 12px}
.case-field-search{display:flex;align-items:center;flex:0 1 auto;gap:8px;min-width:0}
.case-field-search:has(input){flex:1 1 230px}
.case-field-search .btn{flex-shrink:0;min-height:40px;white-space:nowrap}
.case-field-search input{flex:1 1 100px;width:100%!important;min-width:0;min-height:40px;border:1px solid var(--line)!important;background:var(--surface,#fff)!important;color:var(--ink)!important;border-radius:7px;padding:8px 10px;font:inherit;animation:none!important}
.case-field-search input:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@media(min-width:721px){
  .content:has(>.case-workspace){padding:16px!important;overflow:hidden!important}
  .case-workspace{display:grid;grid-template-columns:minmax(0,var(--case-list-share,58fr)) 12px minmax(0,var(--case-detail-share,42fr));height:var(--case-workspace-height,calc(100dvh - 126px));min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--surface,#fff)}
  .case-list-pane{min-width:0;overflow:auto;overscroll-behavior:contain;padding:18px;background:var(--bg)}
  .case-list-pane>.all-jobs{width:100%;max-width:none;margin:0;padding:0}
  .case-list-pane .calendar-toolbar{flex-wrap:wrap;gap:12px;margin-bottom:18px}
  .case-list-pane .calendar-toolbar h1{font-size:23px}
  .case-list-pane .case-create-actions{flex-direction:row;flex-wrap:wrap;gap:8px}
  .case-list-pane .case-list-controls{flex-wrap:wrap;justify-content:space-between;gap:8px}
  .case-list-pane .case-list-controls select{max-width:100%;background:var(--surface,#fff);color:var(--ink);border-color:var(--line)}
  .case-list-pane .job-search{max-width:none;min-width:0}
  .case-list-pane .filters.open{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
  .case-list-pane .filters>*{min-width:0;max-width:100%}
  .case-detail-pane{min-width:0;overflow:hidden}
  body .case-workspace .case-detail-pane>.detail-panel{position:static!important;inset:auto!important;display:flex!important;flex-direction:column;width:100%!important;height:100%!important;max-height:100%!important;box-shadow:none!important;border:0!important;z-index:auto!important;animation:none!important;transform:none!important}
  body .case-workspace .case-detail-pane>.detail-panel.empty-detail{display:flex!important;justify-content:center;align-items:center;padding:30px;color:var(--muted);text-align:center;line-height:1.5}
  .case-workspace .detail-top{flex-shrink:0;flex-wrap:wrap;gap:8px;padding:16px}
  .case-workspace .detail-id{flex-wrap:wrap;gap:6px}
  body .case-workspace .detail-scroll{flex:1;min-height:0;height:auto!important;overflow:auto;padding:0 16px 30px!important;overscroll-behavior:contain}
  .case-pane-resizer{position:relative;display:flex;justify-content:center;align-items:center;cursor:col-resize;touch-action:none;outline:none;background:var(--surface,#fff);border-left:1px solid var(--line);border-right:1px solid var(--line)}
  .case-pane-resizer::before{content:'';position:absolute;inset:0 -6px;z-index:2}
  .case-pane-resizer span{display:block;width:3px;height:38px;border-radius:2px;background:var(--muted);opacity:.45}
  .case-pane-resizer:hover,.case-pane-resizer:focus-visible,.case-workspace-resizing .case-pane-resizer{background:color-mix(in srgb,var(--blue) 18%,var(--surface,#fff))}
  .case-pane-resizer:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
  .case-workspace-resizing{user-select:none}
  .case-list-pane.case-list-compact .table-wrap{border:0;background:transparent!important;overflow:visible}
  .case-list-pane.case-list-compact table,.case-list-pane.case-list-compact thead,.case-list-pane.case-list-compact tbody{display:block;min-width:0;width:100%}
  .case-list-pane.case-list-compact thead{display:none}
  .case-list-pane.case-list-compact tbody{display:grid;gap:10px}
  .case-list-pane.case-list-compact tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff)!important}
  .case-list-pane.case-list-compact td{min-width:0;border:0;padding:5px;overflow-wrap:anywhere;font-size:12px}
  .case-list-pane.case-list-compact td:first-child,.case-list-pane.case-list-compact td:nth-child(2),.case-list-pane.case-list-compact td[colspan]{grid-column:1/-1}
  .case-list-pane.case-list-compact td b,.case-list-pane.case-list-compact td span{color:var(--ink)}
  .case-list-pane.case-list-compact td span:not(.status){color:var(--muted);font-size:11px;line-height:1.45}
  .case-list-pane tr.case-row-selected{outline:2px solid var(--blue);outline-offset:-2px;background:color-mix(in srgb,var(--blue) 8%,var(--surface,#fff))!important}
}
@media(min-width:721px) and (max-width:1100px){
  .content:has(>.case-workspace){padding:10px!important}
  .case-list-pane{padding:12px}
  .case-workspace .btn,.case-field-search .btn,.case-field-search input{min-height:44px}
  .case-field-search{flex-wrap:wrap;gap:6px}
  .case-field-search:has(input){flex-basis:100%}
  .case-field-search .btn{width:auto}
  .case-field-search input{font-size:16px}
}
@media(max-width:720px){
  .case-field-search{flex-wrap:wrap}
  .case-field-search:has(input){flex-basis:100%}
  .case-field-search .btn,.case-field-search input{min-height:44px;font-size:16px}
}
/* Immediate feedback is tied to outstanding actions and respects reduced motion. */
button:active:not(:disabled){filter:brightness(.92)}
.action-pending{position:relative;cursor:progress!important}
.action-pending>.action-progress{display:inline-flex;align-items:center;justify-content:center;flex:0 0 14px;width:14px;min-width:14px;max-width:14px;height:14px;min-height:14px;max-height:14px;margin-inline-start:6px;vertical-align:middle;line-height:0;color:inherit}
.action-pending>.action-progress>.action-spinner{display:block;box-sizing:border-box;flex:0 0 14px;width:14px;min-width:14px;max-width:14px;height:14px;min-height:14px;max-height:14px;margin:0;padding:0;border:2px solid currentColor;border-inline-end-color:transparent;border-radius:50%;color:inherit;animation:action-spin .75s linear infinite}
.round-btn.action-pending>.action-progress,.mini-logout.action-pending>.action-progress{position:absolute;inset:0;flex:none;width:auto;min-width:0;max-width:none;height:auto;min-height:0;max-height:none;margin:0;border-radius:inherit;background:var(--surface,var(--bg))}
@keyframes action-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.action-pending>.action-progress>.action-spinner{animation:none}}
.case-description-block .case-description-heading{width:100%;border:0;padding:0;background:transparent;color:inherit;text-align:left;cursor:pointer;min-height:44px}
.case-description-heading>span:nth-child(2){display:flex;flex:1;flex-direction:column;gap:3px;width:auto;height:auto;background:transparent!important;color:inherit!important}
.case-description-heading .description-chevron{margin-inline-start:auto;transition:transform .15s ease}
.case-description-block:not(.is-expanded) .case-description-text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.case-description-block.is-expanded .description-chevron{transform:rotate(180deg)}
.case-description-block .case-description-text{overflow-wrap:anywhere;white-space:pre-wrap}
.case-description-heading:focus-visible{outline:2px solid var(--blue);outline-offset:4px}
.vacation-detail-link{border:0;background:transparent;color:var(--blue,#2563eb);font:inherit;text-align:left;text-decoration:underline;text-underline-offset:3px;cursor:pointer;min-height:44px;padding:6px 2px;overflow-wrap:anywhere}
.vacation-detail-link:focus-visible{outline:2px solid var(--blue,#2563eb);outline-offset:2px}
.vacation-detail-dialog{width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--line,#667085);border-radius:18px;padding:20px;background:var(--surface,#fff);color:var(--ink,#172b42);box-sizing:border-box;box-shadow:0 22px 70px #0005}
.vacation-detail-dialog::backdrop{background:#11182799}.vacation-detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.vacation-detail-head h2{margin:0}.vacation-detail-head button{min-width:44px;min-height:44px}.vacation-detail-fields{display:grid;gap:16px;margin:20px 0 0}.vacation-detail-fields div{min-width:0}.vacation-detail-fields dt{font-size:12px;color:var(--muted,#667085);margin-bottom:4px}.vacation-detail-fields dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.vacation-day-cell{position:relative;min-width:0}.vacation-day-cell>.vacation-day{height:100%;width:100%;min-height:86px}.vacation-day-cell:has(.vacation-day-details)>.vacation-day{padding-bottom:44px}.vacation-day-details{position:absolute;inset:auto 2px 2px;max-height:48px;overflow:auto}.vacation-day-details .vacation-detail-link{display:block;line-height:1.2;font-size:10px;width:100%;min-height:44px;padding:3px;white-space:normal}
@media(prefers-reduced-motion:reduce){.case-description-heading .description-chevron{transition:none}}

@media(max-width:720px){
  .technician-calendar .technician-case-list{gap:9px}
  .technician-calendar .technician-case-list .technician-case-card{
    display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:12px 14px;
    background:var(--surface,#fff)!important;text-align:start;transition:none
  }
  .technician-case-list .technician-case-card>.technician-case-schedule{
    flex-direction:row;align-items:center;flex-wrap:wrap;gap:5px
  }
  .technician-case-schedule .technician-case-time{white-space:nowrap}
  .technician-case-card .technician-time-divider{width:8px;height:1px;margin:0;background:currentColor}
  .technician-case-card .technician-case-schedule .case-status-summary{margin:0 0 0 auto}
  .technician-case-card .technician-case-content h3{display:block;overflow:visible;line-height:1.32}
  .technician-case-card .technician-case-address,.technician-case-card .technician-case-meta{margin-top:4px}
  .technician-case-card .technician-case-footer{align-self:stretch;align-items:center}
  .technician-case-card .technician-case-footer:has(.technician-case-reminders:empty):has(.priority-normal){display:none}
  .technician-case-card .priority-normal{display:none}
  .technician-case-card{--albanian-weave-size:2px;--albanian-weave-opacity:.45}
}
html[data-editing-with-keyboard] :is(.address-search-overlay,.modal-layer,.case-usage-review-layer){
  box-sizing:border-box;top:var(--ww-visible-top)!important;bottom:auto!important;height:var(--ww-visible-height)!important;min-height:0!important
}
html[data-editing-with-keyboard] :is(.modal,.address-search-dialog,.case-usage-review){
  max-height:calc(var(--ww-visible-height) - 16px)!important;min-height:0!important;overflow-y:auto;scroll-padding-block:8px
}
html[data-editing-with-keyboard] .address-search-preview{display:none}
html[data-editing-with-keyboard] .address-search-layout{grid-template-columns:minmax(0,1fr)}
html[data-editing-with-keyboard] :is(.detail-panel,.content){
  max-height:var(--ww-visible-height)!important;min-height:0!important;scroll-padding-block:12px
}
html[data-editing-with-keyboard] .detail-scroll{padding-bottom:calc(30px + max(0px,100dvh - var(--ww-visible-height)))!important}
html[data-editing-with-keyboard] textarea{max-height:calc(var(--ww-visible-height) - 32px)}
/* Use one viewport-sized case panel. Its history uses the space between the
   header and keyboard, independently of the underlying page's scroll offset. */
html[data-editing-case-comment] #app :is(.workspace,.app-shell,.main-area,.content,.case-workspace,.case-detail-pane):has(.detail-panel){
  transform:none!important;contain:none!important;will-change:auto!important;
  overflow:visible!important;filter:none!important;backdrop-filter:none!important
}
html[data-editing-case-comment] #app .detail-panel:not(.empty-detail){
  display:flex!important;flex-direction:column;position:fixed!important;
  inset:auto 0 auto!important;top:calc(var(--ww-visible-top) + env(safe-area-inset-top,0px))!important;
  width:100%!important;max-width:none!important;min-height:0!important;
  height:calc(var(--ww-visible-height) - env(safe-area-inset-top,0px))!important;max-height:none!important;
  box-sizing:border-box;margin:0!important;padding:0;overflow:hidden;transform:none!important
}
html[data-editing-case-comment] #app .detail-panel .detail-scroll{
  flex:1 1 0;min-height:0!important;height:auto!important;overflow-y:auto!important;
  padding-bottom:8px!important;scroll-padding-block:8px
}
html[data-editing-case-comment] .mobile-bottom-nav{visibility:hidden!important}

/* Reserve the close control's space even when a dialog title wraps. */
.modal:has(>.modal-close)>:is(h1,h2,.eyebrow){max-width:calc(100% - 52px);overflow-wrap:anywhere}
.modal:has(>.modal-close)>.eyebrow{display:block}

@media(max-width:720px){
  /* Keep compact desktop density; phone form and action targets share a floor. */
  .content :is(.btn,.text-btn,.link-button),
  .content :is(.view-switch,.settings-tabs,.part-row) button,
  .modal-layer .modal button,
  .content :is(input,select):not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]):not([type=hidden]),
  .modal-layer .modal :is(input,select):not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]):not([type=hidden]){min-height:44px!important}
  .content .job-search{min-height:44px}
  .modal-layer .modal :is(.modal-close,[data-close-case-picker]){min-width:44px}
}
