/* Compact desktop navigation; small-screen navigation keeps its own sizing. */
@media(min-width:931px){
  body .sidebar{width:60px!important;flex-basis:60px!important;padding:12px 7px 10px!important;height:100dvh;min-height:0;overflow:hidden;transition:width 120ms ease,flex-basis 120ms ease}
  body .sidebar.sidebar-open{width:220px!important;flex-basis:220px!important;padding-inline:10px!important}
  body .sidebar>.brand{flex:0 0 auto;min-height:40px;padding:0 4px 10px!important}
  body .sidebar .brand-mark{width:32px;height:32px;flex-shrink:0}
  body .sidebar>nav{display:flex;flex-direction:column;gap:2px;min-height:0;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;padding-bottom:4px}
  body .sidebar>nav>.nav-item{min-height:36px;height:36px;flex:0 0 36px;padding:6px 8px!important;margin:0!important;border-radius:7px;gap:10px;line-height:20px}
  body .sidebar.sidebar-open>nav>.nav-item{font-size:13px!important}
  body .sidebar>nav>.nav-item .icon{font-size:18px!important;flex:0 0 18px;line-height:20px}
  body .sidebar>nav>.nav-label{display:none!important}
  body .sidebar>nav>.nav-item:focus-visible{outline:2px solid currentColor;outline-offset:-3px}
  body .sidebar>.sidebar-footer{flex:0 0 auto;margin-top:4px}
  body .sidebar>.sidebar-footer .user{margin:4px 2px 0;padding:10px 2px 0}
}
@media(min-width:931px) and (pointer:coarse){body .sidebar>nav>.nav-item{min-height:44px;height:44px;flex-basis:44px}}
@media(prefers-reduced-motion:reduce){body .sidebar{transition:none!important}}
@media(max-width:720px){
  .sidebar .mobile-bottom-nav .nav-item.active{box-shadow:inset 0 -3px var(--personal-accent,var(--blue))!important}
}

/* Calendar density from 2026.09.20.1, with current bounded case previews. */
.calendar-panel .calendar-grid .day-cell{padding:3px 4px!important;gap:0;overflow:hidden}
.calendar-panel .calendar-grid .date-num,.calendar-panel .calendar-grid .today .date-num{height:14px;line-height:14px;margin-bottom:1px}
.calendar-panel .calendar-grid .calendar-event{height:12px;line-height:12px;font-size:10px;padding:0 2px!important}
.calendar-panel .calendar-grid .more-events{height:12px;line-height:12px;font-size:10px}
.calendar-grid[data-preview-limit="3"] [data-calendar-previews="3"] .more-events,.calendar-grid[data-preview-limit="2"] [data-calendar-previews="2"] .more-events{display:none!important}

/* Keep each technician, capacity slots, state, and total on one compact row. */
.technician-capacity-panel>header{align-items:center;gap:8px;padding:7px 9px}
.technician-capacity-panel>header>span{font-size:10px}
/* Reserve badge space even on rows without a badge so every meter starts together. */
.technician-capacity-panel .technician-capacity-row,.tablet-capacity .technician-capacity-panel .technician-capacity-row{grid-template-areas:"technician boxes state total";grid-template-columns:minmax(108px,1fr) minmax(179px,1.5fr) 44px 44px;gap:6px;min-width:410px;padding:5px 8px}
.technician-capacity-panel .capacity-technician{grid-area:technician}
.technician-capacity-panel .capacity-boxes,.tablet-capacity .technician-capacity-panel .capacity-boxes{grid-area:boxes;display:flex;flex-wrap:nowrap;gap:var(--capacity-gap);min-width:0}
.technician-capacity-panel .capacity-box,.tablet-capacity .technician-capacity-panel .capacity-box{flex:0 0 var(--capacity-slot);width:var(--capacity-slot);min-width:var(--capacity-slot);max-width:none;height:var(--capacity-slot)}
.technician-capacity-panel .capacity-box.installation,.tablet-capacity .technician-capacity-panel .capacity-box.installation{flex-basis:calc(2 * var(--capacity-slot) + var(--capacity-gap));width:calc(2 * var(--capacity-slot) + var(--capacity-gap))}
.technician-capacity-panel .capacity-state{grid-area:state}
.technician-capacity-panel .technician-capacity-row>strong{grid-area:total}
.technician-capacity-panel .capacity-unavailable{grid-area:boxes;align-self:center;white-space:nowrap}
.technician-capacity-panel .capacity-scroll,.tablet-capacity .capacity-scroll{overflow:auto;overscroll-behavior:contain}
.p06-user-card-actions{display:flex;align-items:center;gap:6px;min-width:0}
.p06-user-card-actions .btn{min-width:0;padding-inline:8px;white-space:nowrap}
@media(max-width:720px){
  .technician-capacity-panel{--capacity-slot:14px;--capacity-gap:3px}
  .technician-capacity-panel .technician-capacity-row{grid-template-columns:minmax(85px,1fr) 133px 44px 36px;min-width:0;gap:4px;padding:4px 7px}
  .technician-capacity-panel .capacity-technician{gap:5px}
  .technician-capacity-panel .capacity-technician b{font-size:10px}
  .technician-capacity-panel .capacity-scroll{overflow-x:hidden}
}
.office-desktop-control{display:none!important}
office-connection{display:inline-flex;align-items:flex-end;justify-content:center;gap:2px!important;min-width:26px;height:30px;flex-shrink:0;color:var(--muted);position:relative}
office-connection i{width:4px;border-radius:2px;background:currentColor;opacity:.25}
office-connection i:nth-child(1){height:6px}office-connection i:nth-child(2){height:11px}office-connection i:nth-child(3){height:16px}
office-connection[data-level=bad]{color:#bd4339}office-connection[data-level=ok]{color:#986912}office-connection[data-level=optimal]{color:#16794c}
office-connection[data-level=bad] i:first-child,office-connection[data-level=ok] i:nth-child(-n+2),office-connection[data-level=optimal] i{opacity:1}
office-connection:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
office-connection:hover::after,office-connection:focus::after{content:attr(aria-label);position:absolute;z-index:5;top:100%;right:0;background:var(--surface,#fff);color:var(--ink);border:1px solid var(--line);padding:5px 8px;border-radius:6px;white-space:nowrap;font-size:12px}
button.office-profile-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;min-width:44px;padding:8px 12px;border:1px solid var(--line);cursor:pointer;font:inherit}
button.office-profile-link:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
@media(max-width:930px){
  .topbar .top-actions{flex:none;margin-left:auto;gap:6px}
  .topbar .global-search{min-width:0}
  .office-profile-link>span:not(.icon){display:none}
}
@media(max-width:720px){
  .tech-sidebar.sidebar-open{inset:0 0 var(--mobile-footer-space) 0!important;width:100%!important;height:auto!important;min-height:0;padding:max(24px,var(--safe-area-top)) 18px!important;overflow:auto}
  .tech-sidebar.sidebar-open>nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .tech-sidebar.sidebar-open>nav .nav-item{min-height:44px}
  .reports-page>.calendar-toolbar,.reports-page .dashboard-actions{flex-wrap:wrap}
}
.parts-cleanup-dialog{width:min(440px,92vw);max-height:85dvh;overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--surface,#fff);color:var(--ink);padding:20px}
.parts-cleanup-dialog::backdrop{background:#1118}
.parts-cleanup-dialog fieldset{max-height:24dvh;overflow:auto;border:1px solid var(--line);border-radius:8px}
.parts-cleanup-dialog fieldset label{display:flex;gap:8px;align-items:center;padding:5px}
.parts-cleanup-dialog input[type=checkbox]{width:auto}
.parts-cleanup-dialog [data-cases]{max-height:18dvh;overflow:auto}
.parts-cleanup-dialog [hidden]{display:none!important}
@media(min-width:931px){
  .office-desktop-control{display:inline-flex!important;align-items:center;justify-content:center;gap:8px}
  .office-mobile-control,.admin-sidebar>nav>[data-view="profile"]{display:none!important}
  .sidebar .mini-logout.office-desktop-control{min-height:36px;min-width:36px}
}

.payroll-period-tools{display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px}
.payroll-period-tools [aria-pressed=true]{background:var(--blue);color:white}
.payroll-weekday{display:block;font-weight:400}
.payroll-controls .report-controls{flex-wrap:wrap}

#portraitNotice{display:none}
html.phone-landscape #portraitNotice{display:grid;position:fixed;inset:0;place-items:center;padding:2rem;text-align:center;background:var(--surface,#fff);color:var(--ink,#182635);font-size:1.3rem}
html.phone-landscape #app{display:none!important}
@media(max-width:930px){html .topbar .global-search{display:none!important}}
office-connection{box-sizing:border-box;width:34px;height:34px;min-width:34px;padding:0 5px 8px;border-radius:8px;border:1px solid color-mix(in srgb,currentColor 25%,transparent);background:color-mix(in srgb,var(--surface,#fff) 42%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.parts-list .part-row[data-usage=reserved]{--usage-tone:#3b82f6}
.parts-list .part-row[data-usage=used]{--usage-tone:#22a769}
.parts-list .part-row[data-usage=unused]{--usage-tone:#df5656}
html[data-theme] .parts-list .part-row[data-usage]{background:color-mix(in srgb,var(--usage-tone) 20%,var(--surface,#fff))!important;border-color:color-mix(in srgb,var(--usage-tone) 58%,var(--line,#ccc))!important}
.detail-client b:has(>.customer-verified){display:flex;align-items:center;gap:3px}
.customer-verified,.detail-client b>.customer-verified{display:inline-block;flex:none;width:12px;height:12px;margin:0;font-size:0;line-height:0;vertical-align:middle;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232d98df' d='m12 1 2.9 2.1 3.6-.2 1 3.5 3 2-.9 3.6.9 3.6-3 2-1 3.5-3.6-.2L12 23l-2.9-2.1-3.6.2-1-3.5-3-2 .9-3.6-.9-3.6 3-2 1-3.5 3.6.2Z'/%3E%3Cpath fill='none' stroke='white' stroke-width='2.8' d='m6.8 12 3.5 3.5 7-7.5'/%3E%3C/svg%3E")}
.customer-match-message[data-tone=matched]{display:none}
.dashboard-trend{margin:1rem 0;padding:1rem}
.dashboard-trend figcaption,.team-reservations h2{font-weight:700}
.trend-bars{display:flex;align-items:end;gap:3px;height:100px;border-bottom:1px solid var(--line)}
.trend-bars>div{flex:1;text-align:center;min-width:0}
.trend-bars i{display:block;background:var(--blue,#347caa);min-height:1px;border-radius:4px 4px 0 0}
.dashboard-trend footer{display:flex;justify-content:space-between;font-size:.8rem;padding-top:.3rem}
.team-overview,.team-roster{display:flex;gap:.6rem;flex-wrap:wrap;padding:0}
.team-overview span,.team-roster li{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:.5rem .75rem;list-style:none}
.team-overview b{display:block;font-size:1.45rem}
.team-reservations{padding:1rem;border:1px solid var(--line);border-radius:12px}
.team-reservations>div{display:flex;flex-wrap:wrap;justify-content:space-between;gap:1rem;padding:.5rem 0;border-top:1px solid var(--line)}
.access-inactive summary{padding:1rem;cursor:pointer;font-weight:600}

.dashboard-charts{display:grid;grid-template-columns:minmax(0,2fr) minmax(175px,1fr);gap:1rem;margin:1rem 0}
.dashboard-charts figure{margin:0;padding:1rem;min-width:0}
.dashboard-case-mix figcaption{font-weight:700}
.case-mix-ring{width:78px;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;margin:.45rem auto;background:conic-gradient(#438ace 0 var(--share),#c67d3c var(--share) 100%)}
.case-mix-ring b{display:grid;place-items:center;width:55px;aspect-ratio:1;border-radius:50%;background:var(--surface,#fff);color:var(--ink);font-variant-numeric:tabular-nums}
.dashboard-case-mix>div:last-child{text-align:center;font-size:.85rem}
.dashboard-case-mix span:before{content:'';display:inline-block;width:.65em;height:.65em;border-radius:50%;background:#438ace;margin-right:.25em}
.dashboard-case-mix span:last-child:before{background:#c67d3c}
@media(max-width:640px){.dashboard-charts{grid-template-columns:1fr}.trend-bars small{font-size:.63rem}}

.dashboard-status-plot{display:grid;grid-template-columns:minmax(70px,105px) minmax(0,1fr);align-items:center;gap:1rem}
.dashboard-status-pie{aspect-ratio:1;border-radius:50%}
.dashboard-status-plot .pie-key{display:grid;grid-template-columns:9px minmax(0,1fr) auto;align-items:center;gap:6px}
.pie-key>i{width:9px;height:9px;border-radius:50%}

.detail-client b>.customer-manual{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23556d83'/%3E%3Cpath fill='white' d='m4 9.6 5.5-5.5 2.4 2.4-5.5 5.5-3 .6z'/%3E%3C/svg%3E")}

.customer-edit-fields{border:0;padding:0;margin:0;min-width:0}
.customer-record-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}
html .filters[data-case-filters]>:is(input,select,.case-filter-multi,.clear-filters){
  box-sizing:border-box;height:34px!important;min-height:34px!important;min-width:0;width:150px;max-width:100%;align-self:start;
  border:1px solid var(--line,#dce5eb)!important;border-radius:6px!important;
  background-color:var(--surface,#fff)!important;color:var(--ink,#34495e)!important;
  font-family:inherit;font-size:12px!important;line-height:normal;font-weight:500;
}
html .filters[data-case-filters]>:is(input,select,.clear-filters){padding:0 10px}
html .filters[data-case-filters]>select{appearance:none;padding-right:28px}
html .filters[data-case-filters]>select,html .filters[data-case-filters]>.case-filter-multi>summary{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23808b98' fill='none' stroke-width='1.7'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-size:10px 7px!important;background-position:right 9px center!important;
}
html .filters[data-case-filters]>.case-filter-multi>summary{box-sizing:border-box;display:block;height:100%;min-height:0;padding:0 28px 0 10px;font:inherit;line-height:32px}
html .filters[data-case-filters]>.case-filter-multi>summary::after{content:none}
@media(max-width:720px){html .filters[data-case-filters]>:is(input,select,.case-filter-multi,.clear-filters){width:100%;max-width:100%}}
