/* Service calls: one dense queue, one working detail, no repeated card actions. */
body.product-foundation #calls-panel{min-width:0}
body.product-foundation #calls-panel .service-calls-workspace{gap:10px}
body.product-foundation #calls-panel .service-calls-workspace.call-editor-open>:not(#editor){display:none}
/* Closed decision bar: pulse + query + disclosure share one control row on desktop. */
body.product-foundation #calls-panel .calls-command{display:grid;grid-template-columns:minmax(250px,.58fr) minmax(0,1.42fr);gap:8px 16px;align-items:end;padding:0 0 6px;border:0;border-block-end:1px solid var(--line);background:transparent;box-shadow:none}
/* Keep pulse with the query row when advanced filters expand below. */
body.product-foundation #calls-panel .calls-command:has(#call-filters-disclosure[open]){align-items:start}
body.product-foundation #calls-panel .calls-command:has(#call-filters-disclosure[open]) .calls-pulse{align-self:start;margin-block-start:12px}
body.product-foundation #calls-panel .calls-pulse{grid-column:1;grid-row:1;align-self:end;height:48px;margin:0;border-block:1px solid var(--line);border-inline:0;border-radius:0;background:transparent;grid-template-columns:repeat(auto-fit,minmax(58px,1fr))}
body.product-foundation #calls-panel .calls-pulse>.hidden{display:none!important}
body.product-foundation #calls-panel .calls-pulse article,
body.product-foundation #calls-panel .calls-pulse>button{min-height:46px;padding:5px 10px;border-inline-start:1px solid var(--line);background:transparent}
body.product-foundation #calls-panel .calls-pulse strong{font-size:1.12rem}
body.product-foundation #calls-panel .calls-pulse small{display:none}
body.product-foundation #calls-panel .calls-filters{display:flex;flex-wrap:wrap;grid-column:2;grid-row:1;align-items:end;align-content:end;gap:0 10px;min-width:0}
body.product-foundation #calls-panel .calls-query-bar{flex:1 1 0;min-width:0;grid-template-columns:minmax(180px,1.5fr) repeat(3,minmax(84px,.55fr)) auto;gap:6px;padding-block:0}
body.product-foundation #calls-panel .calls-query-bar label{gap:2px}
body.product-foundation #calls-panel .calls-query-bar label>span{font-size:.64rem;line-height:1}
body.product-foundation #calls-panel .calls-query-bar :is(input,select,button){min-height:44px}
/* Filtering refines the queue; it must not compete with the global create action. */
body.product-foundation #calls-panel .calls-query-bar button{min-width:82px;border-color:#3a4b57;background:#111922;color:var(--text)}
body.product-foundation #calls-panel .calls-query-bar button:hover{border-color:#607584;background:#16232d}
body.product-foundation #calls-panel .calls-filter-disclosure{flex:0 0 auto;min-width:0;margin:0}
body.product-foundation #calls-panel .calls-filter-disclosure:not([open]){align-self:end}
body.product-foundation #calls-panel .calls-filter-disclosure[open]{flex:1 1 100%;align-self:stretch}
body.product-foundation #calls-panel .calls-filter-disclosure>summary{min-height:44px;padding-inline:8px;white-space:nowrap}
body.product-foundation #calls-panel .calls-active-filters{flex:1 1 100%;min-width:0}
body.product-foundation #calls-panel .calls-projects-context{display:grid;gap:8px;margin-block:10px;padding:10px 12px;border-color:#31434f;background:#0a1117}
body.product-foundation #calls-panel .calls-projects-context.hidden{display:none}
body.product-foundation #calls-panel .calls-projects-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
body.product-foundation #calls-panel .calls-projects-heading h2{margin:1px 0;font-size:.9rem}
body.product-foundation #calls-panel .calls-projects-heading .muted{margin:0;font-size:.68rem}
body.product-foundation #calls-panel .calls-projects-heading .button{flex:0 0 auto;min-height:44px}
body.product-foundation #calls-panel .calls-active-projects{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
body.product-foundation #calls-panel .calls-active-project{display:grid;gap:2px;min-width:0;padding:7px 9px;border:1px solid var(--line);border-radius:6px;background:#0d151c}
body.product-foundation #calls-panel .calls-active-project bdi{color:var(--muted);font-size:.62rem}
body.product-foundation #calls-panel .calls-active-project strong,
body.product-foundation #calls-panel .calls-active-project span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.product-foundation #calls-panel .calls-active-project strong{font-size:.72rem}
body.product-foundation #calls-panel .calls-active-project span{color:var(--muted);font-size:.64rem}
body.product-foundation #calls-panel .calls-workbench{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start}
body.product-foundation #calls-panel .calls-view-card{padding:0;border:1px solid var(--line);border-radius:8px;background:#080d12;box-shadow:none}
body.product-foundation #calls-panel .calls-queue-heading{min-height:48px;padding:6px 10px;background:#0b1218}
body.product-foundation #calls-panel .calls-queue-heading h3{font-size:.9rem}
body.product-foundation #calls-panel .calls-view-tabs>.tab{min-height:44px;padding-block:8px}
body.product-foundation #calls-panel #calls-tabpanel{padding:0}
body.product-foundation #calls-panel .call-list-head,
body.product-foundation #calls-panel .call-row-open{display:grid;grid-template-columns:minmax(190px,1.45fr) minmax(120px,.9fr) minmax(100px,.58fr) minmax(112px,.62fr);align-items:center;gap:10px}
body.product-foundation #calls-panel .call-list-head{min-height:28px;padding:0 12px;border-block-end:1px solid var(--line)}
body.product-foundation #calls-panel #calls.calls{gap:0}
body.product-foundation #calls-panel #calls.calls>.call-card{display:block;min-height:0;padding:0;border:0;border-block-end:1px solid #24313a;border-inline-start:3px solid #53616d;border-radius:0;background:transparent;box-shadow:none}
body.product-foundation #calls-panel #calls.calls>.call-card:hover{background:#0d151c}
body.product-foundation #calls-panel #calls.calls>.call-card.selected{background:#102027;box-shadow:inset 3px 0 var(--info)}
body.product-foundation #calls-panel .call-row-open{width:100%;min-height:52px;padding:6px 12px;border:0;border-radius:0;color:inherit;text-align:start;background:transparent;box-shadow:none;cursor:pointer}
body.product-foundation #calls-panel .call-row-open:focus-visible{position:relative;z-index:1;outline:3px solid var(--focus);outline-offset:-3px}
body.product-foundation #calls-panel .call-card-main{display:grid;gap:3px;min-width:0}
body.product-foundation #calls-panel .call-card-title{overflow:hidden;font-size:.78rem;text-overflow:ellipsis;white-space:nowrap}
body.product-foundation #calls-panel .call-card-kicker{display:flex;gap:5px;min-width:0}
body.product-foundation #calls-panel .call-card-location,
body.product-foundation #calls-panel .call-card-team,
body.product-foundation #calls-panel .call-card-sla{display:grid;gap:2px;min-width:0}
body.product-foundation #calls-panel .call-card-team small{color:var(--muted);font-size:.62rem}
body.product-foundation #calls-panel .call-card-sla{padding-inline-start:10px}
body.product-foundation #calls-panel .board .call-card{display:block;padding:0}
body.product-foundation #calls-panel .board .call-row-open{grid-template-columns:minmax(0,1fr) auto;gap:6px;min-height:82px;padding:8px}
body.product-foundation #calls-panel .board .call-card-main{grid-column:1/-1}
body.product-foundation #calls-panel .board .call-card-location{grid-column:1/-1;padding-block-start:5px;border-block-start:1px solid var(--line)}
body.product-foundation #calls-panel .board .call-card-team{grid-column:1}
body.product-foundation #calls-panel .board .call-card-sla{grid-column:2}
body.product-foundation #calls-panel .calendar .call-card{display:block;padding:0}

body.product-foundation #calls-panel .call-detail-heading{padding:12px 14px;border-block-end:1px solid var(--line);background:#0b1218}
body.product-foundation #calls-panel .call-detail-heading h2{font-size:1.08rem}
body.product-foundation #calls-panel .call-detail-heading-actions{flex-wrap:wrap}
body.product-foundation #calls-panel #detail-content:not(.hidden){gap:10px;padding:12px 14px 18px}
body.product-foundation #calls-panel #detail-checklist-bind button[type="submit"]{width:auto;min-height:44px;border-color:transparent;color:#c5d0d7;background:transparent;box-shadow:none}
body.product-foundation #calls-panel #detail-checklist-bind button[type="submit"]:hover{border-color:#40515d;color:#fff;background:#111922}
body.product-foundation #calls-panel #detail-checklist-bind button[type="submit"]:active{background:#0d151c}
body.product-foundation:has(#calls-panel .service-calls-workspace.call-editor-open) .command-actions .quick-action{border-color:#35424e;color:#dce4ea;background:var(--surface-raised)}
body.product-foundation:has(#calls-panel .service-calls-workspace.call-editor-open) .command-actions .quick-action:hover{border-color:#536471;color:#fff;background:#16232d}
body.product-foundation #calls-panel .call-next-action{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:9px 11px;border-width:1px;border-radius:7px}
body.product-foundation #calls-panel .call-next-action h3{font-size:.84rem}
body.product-foundation #calls-panel .call-next-action .muted{font-size:.68rem}
body.product-foundation #calls-panel .call-progress{padding:10px 12px;border-block:1px solid var(--line)}
body.product-foundation #calls-panel .call-progress-heading{display:flex;align-items:baseline;gap:8px;margin-block-end:10px}
body.product-foundation #calls-panel .call-progress-heading :is(p,h3){margin:0}
body.product-foundation #calls-panel .call-progress-heading h3{font-size:.8rem}
body.product-foundation #calls-panel #detail-progress{display:grid;grid-template-columns:repeat(6,minmax(82px,1fr));margin:0;padding:0;list-style:none;direction:rtl}
body.product-foundation #calls-panel #detail-progress li{position:relative;display:grid;grid-template-rows:18px auto;gap:5px;min-width:0;text-align:center}
body.product-foundation #calls-panel #detail-progress li::before{position:absolute;inset-block-start:8px;inset-inline:0;height:2px;background:#36434c;content:""}
body.product-foundation #calls-panel #detail-progress li:first-child::before{inset-inline-start:50%}
body.product-foundation #calls-panel #detail-progress li:last-child::before{inset-inline-end:50%}
body.product-foundation #calls-panel .call-progress-dot{position:relative;z-index:1;display:block;width:16px;height:16px;margin-inline:auto;border:3px solid #8b99a3;border-radius:50%;background:#0b1218}
body.product-foundation #calls-panel [data-progress-state=done] .call-progress-dot,
body.product-foundation #calls-panel [data-progress-state=current] .call-progress-dot{border-color:#55e0ad;background:#55e0ad}
body.product-foundation #calls-panel [data-progress-state=paused] .call-progress-dot{border-color:#ffc963;background:#ffc963}
body.product-foundation #calls-panel [data-progress-state=cancelled] .call-progress-dot{border-color:#ff817b;background:#ff817b}
body.product-foundation #calls-panel #detail-progress strong{display:block;overflow:hidden;font-size:.69rem;text-overflow:ellipsis;white-space:nowrap}
body.product-foundation #calls-panel #detail-progress small{display:block;margin-block-start:2px;color:var(--muted);font-size:.6rem;font-variant-numeric:tabular-nums}
body.product-foundation #calls-panel .call-detail-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;padding:1px;background:var(--line)}
body.product-foundation #calls-panel .call-detail-grid>div{min-height:48px;padding:7px 9px;border:0;border-radius:0;background:#0b1218}
body.product-foundation #calls-panel .call-detail-grid .wide{grid-column:1/-1}
body.product-foundation #calls-panel .call-detail-grid dt{font-size:.62rem}
body.product-foundation #calls-panel .call-detail-grid dd{font-size:.72rem;line-height:1.35}
body.product-foundation #calls-panel .call-source-details,
body.product-foundation #calls-panel .call-full-history{border:1px solid var(--line);border-radius:7px;background:#091016}
body.product-foundation #calls-panel :is(.call-source-details,.call-full-history)>summary{min-height:44px;padding:8px 10px;font-size:.72rem;font-weight:900;cursor:pointer}
body.product-foundation #calls-panel .call-source-details .call-detail-grid,
body.product-foundation #calls-panel .call-full-history .call-history-grid{margin:0 8px 8px}
body.product-foundation #calls-panel .call-detail-surfaces{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
body.product-foundation #calls-panel .call-detail-surfaces :is(#detail-pricing-section,#detail-quotations-section){grid-column:1/-1;min-width:0}
body.product-foundation #calls-panel .call-detail-surfaces .quotation-step{border:1px solid var(--line);border-radius:7px;background:#091016}
body.product-foundation #calls-panel .call-detail-surfaces .quotation-step summary{min-height:44px;padding:8px 10px}
body.product-foundation #calls-panel .call-media-gallery{grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:6px}
body.product-foundation #calls-panel .call-media-item{gap:5px;padding:5px;border-radius:7px}
body.product-foundation #calls-panel .call-media-item button{min-height:104px}
body.product-foundation #calls-panel .call-media-item :is(img,video){height:104px}
body.product-foundation #calls-panel .call-document-list{gap:0;margin-block-start:6px;border-block-start:1px solid var(--line)}
body.product-foundation #calls-panel .call-document-row{display:grid;min-width:0;gap:2px;padding:9px 6px;border-block-end:1px solid var(--line);color:var(--text);text-decoration:none}
body.product-foundation #calls-panel .call-document-row:hover{background:#101820}
body.product-foundation #calls-panel .call-document-row strong{overflow:hidden;font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}
body.product-foundation #calls-panel .call-document-row small{color:var(--muted);font-size:.62rem}
body.product-foundation .call-media-actions{grid-template-columns:auto minmax(60px,1fr) auto auto auto auto}
body.product-foundation .call-media-actions #media-viewer-status{grid-column:1/-1;min-height:20px;margin:0;text-align:center}

@media(min-width:901px){
  body.product-foundation #calls-panel .calls-workbench:has(dialog.call-detail[open]){grid-template-columns:minmax(320px,.64fr) minmax(520px,1.36fr)}
  body.product-foundation #calls-panel .calls-workbench:has(dialog.call-detail[open]) .call-list-head{display:none}
  body.product-foundation #calls-panel .calls-workbench:has(dialog.call-detail[open]) .call-row-open{grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;min-height:72px}
  body.product-foundation #calls-panel .calls-workbench:has(dialog.call-detail[open]) .call-card-main{grid-column:1/-1}
  body.product-foundation #calls-panel .calls-workbench:has(dialog.call-detail[open]) .call-card-location{grid-column:1}
  body.product-foundation #calls-panel .calls-workbench:has(dialog.call-detail[open]) .call-card-team{display:none}
  body.product-foundation #calls-panel .calls-workbench:has(dialog.call-detail[open]) .call-card-sla{grid-column:2}
  body.product-foundation #calls-panel dialog.call-detail[open]:not(:modal){position:sticky;inset-block-start:8px;width:100%;height:calc(100vh - 118px);margin:0;border:1px solid #40505c;border-radius:8px;box-shadow:0 20px 48px #0008}
}
@media(max-width:1100px){
  body.product-foundation #calls-panel .calls-command{grid-template-columns:1fr;align-items:start}
  body.product-foundation #calls-panel .calls-pulse,
  body.product-foundation #calls-panel .calls-filters{grid-column:1;grid-row:auto}
  /* Restore stacked filters below the pulse; keep disclosure full-width when open. */
  body.product-foundation #calls-panel .calls-filters{display:grid;grid-template-columns:1fr;align-content:start;gap:0}
  body.product-foundation #calls-panel .calls-query-bar,
  body.product-foundation #calls-panel .calls-filter-disclosure,
  body.product-foundation #calls-panel .calls-filter-disclosure[open],
  body.product-foundation #calls-panel .calls-active-filters{flex:none;grid-column:1;align-self:stretch}
  body.product-foundation #calls-panel .calls-active-projects{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  body.product-foundation #calls-panel .calls-command{padding:0 0 8px}
  body.product-foundation #calls-panel .calls-query-bar{grid-template-columns:2fr 1fr 1fr}
  body.product-foundation #calls-panel .calls-query-bar .calls-search{grid-column:1/-1}
  body.product-foundation #calls-panel .call-list-head{display:none}
  body.product-foundation #calls-panel .call-row-open{grid-template-columns:minmax(0,1.3fr) minmax(110px,.8fr) auto;min-height:68px}
  body.product-foundation #calls-panel .call-card-team{display:none}
  body.product-foundation #calls-panel dialog.call-detail[open]{position:fixed;inset:0;width:100vw;height:100dvh;margin:0;border:0;border-radius:0}
}
@media(max-width:620px){
  /* Keep immediate workload and the actionable overdue count above the fold. */
  body.product-foundation #calls-panel .calls-pulse{grid-template-columns:repeat(2,1fr);height:auto}
  body.product-foundation #calls-panel .calls-pulse article,
  body.product-foundation #calls-panel .calls-pulse>button{min-height:44px;border-block-end:1px solid var(--line)}
  body.product-foundation #calls-panel .calls-pulse article:nth-of-type(2),
  body.product-foundation #calls-panel .calls-pulse article:nth-of-type(3){display:none}
  body.product-foundation #calls-panel .calls-query-bar{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.product-foundation #calls-panel .calls-query-bar .calls-search{grid-column:1/3;grid-row:1}
  body.product-foundation #calls-panel .calls-query-bar label:not(.calls-search){display:grid;grid-row:2}
  body.product-foundation #calls-panel .calls-query-bar button{grid-column:3;grid-row:1;min-width:72px}
  body.product-foundation #calls-panel .calls-projects-heading{align-items:start;flex-direction:column}
  body.product-foundation #calls-panel .calls-projects-heading .button{width:100%}
  body.product-foundation #calls-panel .calls-active-projects{grid-template-columns:1fr}
  body.product-foundation #calls-panel .call-row-open{grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;min-height:72px;padding:8px 10px}
  body.product-foundation #calls-panel .call-card-main{grid-column:1/-1}
  body.product-foundation #calls-panel .call-card-location{grid-column:1}
  body.product-foundation #calls-panel .call-card-sla{grid-column:2}
  body.product-foundation #calls-panel .call-next-action{grid-template-columns:1fr}
  body.product-foundation #calls-panel #detail-progress{display:grid;grid-template-columns:1fr;gap:0}
  body.product-foundation #calls-panel #detail-progress li{grid-template-columns:18px 1fr;grid-template-rows:auto;gap:9px;min-height:48px;text-align:start}
  body.product-foundation #calls-panel #detail-progress li::before{inset-block:0;inset-inline-start:8px;inset-inline-end:auto;width:2px;height:auto}
  body.product-foundation #calls-panel #detail-progress li:first-child::before{inset-block-start:8px}
  body.product-foundation #calls-panel #detail-progress li:last-child::before{inset-block-end:calc(100% - 8px)}
  body.product-foundation #calls-panel .call-progress-dot{margin:0}
  body.product-foundation #calls-panel #detail-progress strong{white-space:normal}
  body.product-foundation #calls-panel .call-editor-form{display:flex;flex-direction:column}
  body.product-foundation #calls-panel .call-form-actions{position:sticky;z-index:3;inset-block-start:0;order:-1;padding:8px;border:1px solid #31414c;border-radius:8px;background:#111922}
  body.product-foundation #calls-panel .call-detail-grid{grid-template-columns:1fr 1fr}
  body.product-foundation #calls-panel .call-detail-surfaces{grid-template-columns:1fr}
  body.product-foundation #calls-panel .call-detail-surfaces :is(#detail-pricing-section,#detail-quotations-section){grid-column:auto}
  body.product-foundation .call-media-actions{grid-template-columns:repeat(3,1fr)}
  body.product-foundation .call-media-actions #media-viewer-status{grid-column:1/-1}
}
@media(prefers-reduced-motion:reduce){body.product-foundation #calls-panel *{scroll-behavior:auto!important;transition:none!important}}
