/* Two roles, one visual vocabulary. Scoped so the operator and older studies are independent. */
body.fx-cabinets{
  --fm-violet:#6c3bff;--fm-violet-ink:#512bc5;--fm-coral:#ff684a;
  --fm-green:#14764c;--fm-green-bg:#eaf6ee;--fm-orange:#a14a09;--fm-orange-bg:#fff1df;
  --fm-ink:#24252d;--fm-secondary:#5d616b;--fm-line:#e0e3e7;
  --line:var(--fm-line);--ink:var(--fm-ink);--violet:var(--fm-violet-ink);
  --lilac:#f2effb;--muted:var(--fm-secondary);
  min-height:100vh;color:var(--fm-ink);background:#f2f4f6;line-height:1.45;
}
.fx-cabinets .wrap{width:min(1520px,100%);min-width:0;padding:16px clamp(12px,2.2vw,36px) 26px}
.fx-cabinets .chooser{gap:12px;margin:0 0 12px}
.fx-cabinets .chooser-label{font-size:12px;color:#626772;font-weight:600}
.fx-cabinets .role-switch{background:#e8ebef;border:1px solid #dde1e6;border-radius:9px;gap:3px;padding:3px}
.fx-cabinets .role-switch button{font-size:13px;font-weight:550;line-height:17px;color:#535964;padding:6px 12px}
.fx-cabinets .role-switch button[aria-pressed=true]{background:white;color:#472c9a;box-shadow:0 1px 4px #26334a20}
.fx-cabinets .role-switch button:focus-visible,.fx-cabinets #preview :is(button,a):focus-visible{outline:2px solid var(--fm-violet);outline-offset:-2px}
.fx-cabinets #preview{
  display:grid;grid-template-areas:"top top" "nav work";grid-template-columns:174px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);
  min-height:clamp(520px,76vh,740px);background:white;border:1px solid #dadee2;border-radius:14px;overflow:clip;
  box-shadow:0 5px 20px -14px #28304052;
}
.fx-cabinets #preview .appbar{grid-area:top;background:#fff;border-bottom:1px solid var(--fm-line);min-height:58px;padding:11px 19px;gap:10px}
.fx-cabinets #preview .logo{width:30px;height:30px}
.fx-cabinets #preview .wordmark{font:720 23px/1.05 "Segoe UI",Arial,sans-serif;color:var(--fm-ink);letter-spacing:-1.1px}
.fx-cabinets #context{color:#565c65;border-color:var(--fm-line);font-size:13px}
.fx-cabinets #initials{width:31px;height:31px;background:#f0f1f3;border:1px solid #e1e4e8;color:#46505a}
.fx-cabinets #preview .profile{color:var(--fm-secondary)}
.fx-cabinets #sectionNav{
  grid-area:nav;min-width:0;display:flex;align-items:stretch;align-content:flex-start;flex-direction:column;flex-wrap:nowrap;
  gap:4px;padding:20px 10px;background:#f7f8f9;border:0;border-right:1px solid var(--fm-line);
}
.fx-cabinets #sectionNav .nav-heading{margin:4px 9px 9px;font-weight:650;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:#656974}
.fx-cabinets #sectionNav button{display:flex;gap:9px;align-items:center;text-align:left;border:1px solid transparent;border-radius:7px;margin:0;padding:7px 8px;min-height:36px;font:600 13px/18px 'Segoe UI',Arial,sans-serif;color:#535763;background:transparent}
.fx-cabinets #sectionNav button:hover{background:#eeeff2;color:var(--fm-ink);border-color:transparent}
.fx-cabinets #sectionNav button.active,.fx-cabinets #sectionNav button[aria-current=page]{background:#fff;color:var(--fm-violet-ink);border:1px solid #dddbe7;box-shadow:inset 3px 0 var(--fm-violet),0 1px 2px #20212c08}
.fx-cabinets .nav-glyph{width:18px;min-width:18px;display:inline-flex;align-items:center;justify-content:center}
.fx-cabinets .nav-glyph svg{width:17px;height:17px;display:block}
.fx-cabinets #preview .main{grid-area:work;min-width:0;padding:clamp(17px,2vw,26px) clamp(15px,2.1vw,29px) 24px}
.fx-cabinets #preview .intro{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.fx-cabinets #preview .section-tag{display:inline-flex;align-items:center;gap:7px;color:#626674;font-size:11px;font-weight:650;letter-spacing:.065em;text-transform:uppercase;margin:0 0 5px}
.fx-cabinets #preview .section-tag::before{content:"";width:16px;height:3px;border-radius:3px;background:linear-gradient(to right,var(--fm-violet) 0 55%,var(--fm-coral) 55%)}
.fx-cabinets #preview h1{font:650 clamp(23px,2.3vw,33px)/1.13 "Segoe UI",Arial,sans-serif;letter-spacing:-.8px;color:var(--fm-ink)}
.fx-cabinets #subtitle{font-size:14px;color:var(--fm-secondary);margin:5px 0 0}
.fx-cabinets #preview .section-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 19px}
.fx-cabinets #preview .brief-metric{--signal:var(--fm-violet);--signal-bg:#f6f4fd;position:relative;display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:2px 9px;min-width:0;min-height:50px;padding:7px 12px 7px 16px;border:1px solid var(--fm-line);border-radius:8px;background:linear-gradient(110deg,var(--signal-bg),white 75%)}
.fx-cabinets #preview .brief-metric[data-tone=good]{--signal:#1c8254;--signal-bg:#eff8f1}
.fx-cabinets #preview .brief-metric[data-tone=attention]{--signal:#d5751e;--signal-bg:#fff4e8}
.fx-cabinets #preview .brief-metric[data-tone=neutral]{--signal:#858d98;--signal-bg:#f3f5f7}
.fx-cabinets #preview .brief-metric::before{content:"";position:absolute;left:0;top:13px;bottom:13px;width:3px;border-radius:0 3px 3px 0;background:var(--signal)}
.fx-cabinets #preview .brief-metric strong{font:650 23px/1.1 "Segoe UI",Arial,sans-serif;color:var(--fm-ink);font-variant-numeric:tabular-nums;letter-spacing:-.6px}
.fx-cabinets #preview .brief-metric[data-tone=brand] strong{color:var(--fm-violet-ink)}
.fx-cabinets #preview .brief-metric[data-tone=good] strong{color:var(--fm-green)}
.fx-cabinets #preview .brief-metric[data-tone=attention] strong{color:var(--fm-orange)}
.fx-cabinets #preview .brief-metric span{color:#505661;font-size:13px;font-weight:550;overflow-wrap:anywhere}
.fx-cabinets #preview .layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(220px,24%,300px);gap:clamp(12px,1.4vw,21px);align-items:start}
.fx-cabinets #worklist{min-width:0}
.fx-cabinets #filters{gap:5px;margin:0 0 9px}
.fx-cabinets #filters button{font:550 12px/16px "Segoe UI",Arial,sans-serif;padding:4px 9px;color:#555b65;background:#fff;border:1px solid #dadfe4;border-radius:6px}
.fx-cabinets #filters button[aria-pressed=true]{border-color:#b9a4ff;color:var(--fm-violet-ink);background:#f4f1ff}
.fx-cabinets #filters button[data-filter=flag][aria-pressed=true]{border-color:#e8b17e;color:var(--fm-orange);background:var(--fm-orange-bg)}
.fx-cabinets #preview .tablewrap{width:100%;min-width:0;border:1px solid #dfe2e6;border-radius:8px;overflow:auto}
.fx-cabinets #preview table{width:100%;border-collapse:collapse;font-size:13px;line-height:18px;font-variant-numeric:tabular-nums}
.fx-cabinets #preview thead{background:#f4f5f7;color:#555b65}
.fx-cabinets #preview th{height:30px;padding:4px 8px;font-size:12px;font-weight:650;border-bottom:1px solid var(--fm-line)}
.fx-cabinets #preview td{height:35px;padding:0 8px;color:#343943}
.fx-cabinets #preview tbody tr+tr{border-top:1px solid #edf0f1}
.fx-cabinets #preview tbody tr:hover{background:#f6f7f8}
.fx-cabinets #preview tbody tr.selected{background:#f5f4f8}
.fx-cabinets #preview tbody tr.selected td:first-child{box-shadow:inset 3px 0 var(--fm-violet)}
.fx-cabinets #preview .rowbutton{font-size:13px;color:#272830;padding:6px 1px;font-weight:640}
.fx-cabinets #preview[data-section=leads] #tbody td:first-child{padding-block:3px}
.fx-cabinets #preview[data-section=leads] .rowbutton{padding:0 1px;line-height:16px}
.fx-cabinets #preview[data-section=leads] .lead-source{display:block;color:#596477;font-size:11px;font-weight:450;line-height:14px;white-space:normal}
.fx-cabinets #preview[data-section=leads] .lead-name-line{display:flex;align-items:center;gap:6px;min-width:0}
.fx-cabinets #preview[data-section=leads] .lead-name-line .rowbutton{width:auto;min-width:0;overflow-wrap:anywhere}
.fx-cabinets #preview[data-section=leads] .lead-received{display:inline-flex;align-items:baseline;gap:4px;flex:none;border-inline-start:1px solid #c5c9d0;padding-inline-start:6px;color:#596477;font-size:12px;line-height:1.2;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:768px){
  .fx-cabinets #preview[data-section=leads] .lead-source{display:none}
  .fx-cabinets #preview[data-section=leads] .lead-received{flex-direction:column;gap:0}
}
.fx-cabinets #preview .lead-filter-bar{display:flex;align-items:baseline;flex-wrap:wrap;gap:1px 6px;margin-top:2px;white-space:normal}
.fx-cabinets #preview .lead-filter-bar small,.fx-cabinets #preview .lead-channel-selection{color:#596477;font-size:11px;font-weight:450;line-height:1.3}
.fx-cabinets #preview .lead-filter-edit{padding:0;border:0;background:transparent;color:#54359e;font-family:inherit;font-weight:500;font-size:11px;line-height:1.35;text-decoration:underline;text-underline-offset:2px;cursor:pointer;text-align:left}
.fx-cabinets #preview .lead-channel-selection:not([hidden]){display:block;margin-top:1px;color:#533795;white-space:normal}
.fx-cabinets #leadChannelPicker:not([hidden]){display:grid;gap:8px;margin:3px 0 8px;padding:9px 11px;background:#f6f4fb;border:1px solid var(--fm-line);border-radius:6px}
.fx-cabinets #leadChannelPicker .lead-picker-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fx-cabinets #leadChannelPicker [hidden]{display:none}
.fx-cabinets #leadChannelPicker label{display:grid;gap:3px;font-size:12px;font-weight:600;color:#434453}
.fx-cabinets #leadChannelPicker :is(input,select){font:inherit;min-width:0;width:100%;min-height:34px;border:1px solid #b6afc2;border-radius:5px;padding:4px 6px;background:#fff;color:#302b37;box-sizing:border-box}
.fx-cabinets #leadChannelPicker :is(button,input,select):focus-visible{outline:2px solid #633eab;outline-offset:1px}
.fx-cabinets #leadChannelPicker .lead-picker-actions{display:flex;gap:5px;flex-wrap:wrap}
.fx-cabinets #leadChannelPicker button{font:inherit;font-size:13px;line-height:1.3;min-height:32px;padding:4px 9px;border:1px solid var(--fm-line);border-radius:5px;background:white;color:#434453;cursor:pointer}
.fx-cabinets #leadChannelPicker .lead-apply{background:#563695;border-color:#563695;color:white}
.fx-cabinets #leadChannelPicker :is(.lead-picker-hint,#leadFilterError){margin:0;font-size:12px;line-height:1.4;color:#596477}
.fx-cabinets #leadChannelPicker #leadFilterError{color:#9b3043}
@media(max-width:600px){
  .fx-cabinets #leadChannelPicker .lead-picker-fields:first-child{grid-template-columns:minmax(0,1fr)}
}
.fx-cabinets #preview .lead-empty{padding-block:14px;color:#596477;white-space:normal}
.fx-cabinets #preview .state{display:inline-flex;align-items:center;gap:5px;min-height:21px;padding:1px 7px;border-radius:5px;background:#eff2f5;color:#495a69;font-size:12px;line-height:17px;font-weight:600}
.fx-cabinets #preview .state:has(.dot.ok){color:var(--fm-green);background:var(--fm-green-bg)}
.fx-cabinets #preview .state:has(.dot.wait){color:var(--fm-orange);background:var(--fm-orange-bg)}
.fx-cabinets #preview .state:has(.dot.bad){color:#a03032;background:#fceceb}
.fx-cabinets #preview .state:has(.dot.info){color:#3c5c78;background:#edf3f8}
.fx-cabinets #preview .state .dot{width:5px;height:5px;flex:none;border-radius:50%;background:currentColor}
.fx-cabinets #listFoot{margin-top:8px;color:#686e77;font-size:12px}
.fx-cabinets #inspector{min-width:0;background:#fafbfc;border:1px solid var(--fm-line);border-radius:9px;padding:14px;overflow-wrap:anywhere}
.fx-cabinets #inspector .eyebrow,.fx-cabinets #kind{color:#676974;font-size:10.5px;letter-spacing:.08em;display:inline-flex;align-items:center;gap:6px}
.fx-cabinets #inspector .eyebrow::before,.fx-cabinets #kind::before{content:"";width:14px;height:3px;border-radius:2px;background:var(--fm-coral)}
.fx-cabinets #inspector h2{color:#26272f;font-size:19px;margin:4px 0 12px}
.fx-cabinets #inspector .details>div{align-items:baseline;border-bottom:1px solid #e9ebed;padding:5px 0;margin:0}
.fx-cabinets #inspector .details dt{color:#616873;font-size:12px}
.fx-cabinets #inspector .details dd{font-size:13px;font-weight:550;color:#2d333b}
.fx-cabinets #preview #inspector .note{background:#fff;border:1px solid #e4e6ea;border-left:2px solid #b9c2cc;border-radius:6px;padding:8px 10px;margin:10px 0 2px;color:#454a53}
.fx-cabinets #inspector .bubble{background:#eff1f4;border-radius:8px}
.fx-cabinets #inspector .bubble.out{background:#ffefe8;box-shadow:inset -2px 0 var(--fm-coral)}
.fx-cabinets #inspector .detail-link{background:white;color:var(--fm-violet-ink);border-color:#d6cfec}
.fx-cabinets #inspector .detail-link:hover{background:#f3f0fb}
.fx-cabinets #tabIntro .summary-strip{background:#f0f7f2;border-color:#d7e6db}
.fx-cabinets #tabIntro .summary-item strong{color:var(--fm-green)}
@media(max-width:1150px){
  .fx-cabinets #preview{grid-template-columns:150px minmax(0,1fr)}
  .fx-cabinets #preview .main{padding:18px 15px}
  .fx-cabinets #preview .layout{grid-template-columns:minmax(0,1fr) 215px;gap:12px}
  .fx-cabinets #inspector{padding:11px}
}
@media(max-width:940px){
  .fx-cabinets #preview{grid-template-columns:146px minmax(0,1fr)}
  .fx-cabinets #preview .layout{grid-template-columns:minmax(0,1fr)}
  .fx-cabinets #preview .brief-metric{padding:7px 9px 7px 12px}
  .fx-cabinets #preview .section-summary{margin-bottom:13px}
}
@media(max-width:660px){
  .fx-cabinets .wrap{padding:8px 5px 16px}
  .fx-cabinets .chooser{gap:4px;margin-bottom:7px}
  .fx-cabinets .chooser-label{display:none}
  .fx-cabinets .role-switch button{padding:5px 7px;font-size:12px}
  .fx-cabinets #preview{display:grid;grid-template-areas:"top" "nav" "work";grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 1fr;min-height:0;border-radius:10px}
  .fx-cabinets #preview .appbar{min-height:49px;padding:8px 10px}
  .fx-cabinets #preview .wordmark{font-size:19px}
  .fx-cabinets #context{font-size:12px}
  .fx-cabinets #sectionNav{flex-direction:row;overflow:auto;gap:2px;border:0;border-bottom:1px solid var(--fm-line);padding:4px 5px}
  .fx-cabinets #sectionNav .nav-heading{display:none}
  .fx-cabinets #sectionNav button{flex:none;gap:5px;min-height:33px;white-space:nowrap;padding:5px 8px;font-size:12px}
  .fx-cabinets #sectionNav button.active,.fx-cabinets #sectionNav button[aria-current=page]{box-shadow:inset 0 -2px var(--fm-violet)}
  .fx-cabinets #sectionNav .nav-glyph{min-width:14px;width:14px}
  .fx-cabinets #sectionNav .nav-glyph svg{width:14px;height:14px}
  .fx-cabinets #preview .main{padding:14px 9px}
  .fx-cabinets #preview .section-summary{gap:4px}
  .fx-cabinets #preview .brief-metric{display:grid;align-content:center;gap:2px;min-height:54px;padding:5px 6px 5px 9px}
  .fx-cabinets #preview .brief-metric span{font-size:11px;line-height:1.3}
  .fx-cabinets #preview .brief-metric strong{font-size:19px}
  .fx-cabinets #preview td,.fx-cabinets #preview th{padding-inline:6px}
  .fx-cabinets #preview .profile #person{display:none}
}
@media(forced-colors:active){.fx-cabinets .state,.fx-cabinets .brief-metric{border:1px solid CanvasText}}
.fx-cabinets #preview :is(#customerAssignments,#overviewLayout,#tabIntro)[hidden]{display:none}
.fx-cabinets #preview :is(#customerOptional,#shiftReportTitle)[hidden]{display:none}
.fx-cabinets #shiftReportTitle{margin:22px 0 8px;font-size:18px}
/* Hosted version of the original #client/leads cabinet. Its demo role picker is intentionally absent. */
.sd-page.fx-cabinets > .sd-header{display:none}
.sd-page.fx-cabinets #staff-app{max-width:none;width:100%;min-width:0;padding:0;background:transparent}
#stom-client-cabinet{font:14px/1.45 "Segoe UI",Arial,sans-serif;margin-inline:auto}
#stom-client-cabinet [hidden]{display:none!important}
#stom-client-cabinet :is(.appbar,.brand,.profile){display:flex;align-items:center;gap:8px}
#stom-client-cabinet .appbar{justify-content:space-between}
#stom-client-cabinet .brand{min-width:0}
#stom-client-cabinet #context{border-left:1px solid var(--line);padding-left:12px;margin-left:4px;overflow-wrap:anywhere;font-weight:600}
#stom-client-cabinet #initials{display:grid;place-items:center;border-radius:50%;font-weight:650}
#stom-client-cabinet .profile{font-size:12px;flex-wrap:wrap;justify-content:flex-end}
#stom-client-cabinet button{font-family:inherit;line-height:1.35;cursor:pointer;box-shadow:none}
#stom-client-cabinet button:disabled{cursor:default}
#stom-client-cabinet #sectionNav{flex-wrap:nowrap}
#stom-client-cabinet .intro{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
#stom-client-cabinet :is(.intro h1,.intro p){margin:0}
#stom-client-cabinet .intro h1{font-size:clamp(24px,3.8vw,32px);margin-block:4px}
#stom-client-cabinet :is(.intro p,.cab-note,#listFoot){color:var(--fm-secondary)}
#stom-client-cabinet #tabIntro{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
#stom-client-cabinet #filters{display:flex;align-items:center;flex-wrap:wrap}
#stom-client-cabinet :is(thead th,td,caption){text-align:left}
#stom-client-cabinet #preview .rowpick{display:block;padding:1px 0;text-align:left;color:var(--fm-ink);border:0;background:transparent;font-weight:650}
#stom-client-cabinet #preview .rowpick:hover{text-decoration:underline;color:var(--fm-violet-ink)}
#stom-client-cabinet .cab-footer-action{display:inline-flex;align-items:center;width:auto;min-height:32px;padding:4px 9px;border:1px solid var(--fm-line);border-radius:6px;background:white;color:var(--fm-violet-ink);font:600 12px "Segoe UI",sans-serif}
#stom-client-cabinet #inspector .cab-footer-action{margin-top:8px}
#stom-client-cabinet #inspector p,#stom-client-cabinet #inspector dd{overflow-wrap:anywhere}
#stom-client-cabinet .cab-empty{padding:20px 9px;text-align:center;color:var(--fm-secondary)}
#stom-client-cabinet .cab-facts{margin:10px 0 0}
#stom-client-cabinet .cab-facts div{padding:6px 0;border-bottom:1px solid var(--fm-line)}
#stom-client-cabinet .cab-facts dt{font-size:12px;color:var(--fm-secondary)}
#stom-client-cabinet .cab-facts dd{margin:0;font-weight:600}
#stom-client-cabinet #listFoot{font-size:12px}
#stom-client-cabinet .readonly-badge{font-size:12px;padding:5px 8px;background:#f1effa;color:var(--fm-violet-ink);border-radius:5px}
@media(max-width:680px){#stom-client-cabinet #sectionNav{overflow-x:auto}#stom-client-cabinet .appbar{align-items:flex-start;flex-wrap:wrap}#stom-client-cabinet .profile{gap:4px}#stom-client-cabinet .brand{flex-wrap:wrap}}
@media print{body.fx-cabinets #sectionNav,body.fx-cabinets .cab-footer-action{display:none!important}}

/* STOM senior report. Horizontal scrolling, if needed, belongs to the log only. */
#stom-client-cabinet .stom-report{min-width:0;max-width:100%;color:var(--fm-ink)}
#stom-client-cabinet .stom-report [hidden]{display:none}
#stom-client-cabinet .report-filter,#stom-client-cabinet .report-dates{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px 12px}
#stom-client-cabinet .stom-report label{font-weight:600;color:#4d4857;font-size:13px}
#stom-client-cabinet .stom-report :is(input,select){width:auto;max-width:100%;min-height:34px;margin-top:3px;border:1px solid #c2c2ce;border-radius:6px;background:white;color:#24252d;padding:4px 7px;font:inherit}
#stom-client-cabinet .report-filter button{min-height:34px;border:0;border-radius:6px;background:#f0eaf9;color:#482770;padding:5px 12px;font-weight:650}
#stom-client-cabinet .report-filter button:hover{color:#39225c;background:#e8ddf4}
#stom-client-cabinet .stom-report :is(input,select,button,[tabindex]):focus-visible{outline:2px solid #64408f;outline-offset:2px}
#stom-client-cabinet .stom-report .report-note,#stom-client-cabinet .report-status{font-size:13px;line-height:1.45;color:#575864}
#stom-client-cabinet .report-status{min-height:1.4em;margin:.6rem 0}
#stom-client-cabinet .report-results,#stom-client-cabinet .report-totals{display:grid;gap:10px;min-width:0}
#stom-client-cabinet .report-totals{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
#stom-client-cabinet .report-block{min-width:0;background:white;border:1px solid var(--fm-line);border-radius:10px;padding:12px 14px}
#stom-client-cabinet .report-block h2{margin:0 0 8px;font-size:17px}
#stom-client-cabinet .report-block p{margin:7px 0 0}
#stom-client-cabinet .report-unavailable{font-weight:600;color:#544379}
#stom-client-cabinet .report-metrics{display:flex;gap:6px 18px;flex-wrap:wrap;margin:3px 0 0}
#stom-client-cabinet .report-metrics dt{font-size:12px;color:#565663}
#stom-client-cabinet .report-metrics dd{margin:0;font-size:21px;font-weight:650;line-height:1.3}
#stom-client-cabinet .report-table-wrap{overflow:auto;max-width:100%;margin-top:10px}
#stom-client-cabinet .report-table-wrap table{border-collapse:collapse;table-layout:auto;width:100%;font-size:13px}
#stom-client-cabinet .report-table-wrap :is(th,td){text-align:left;border:0;border-bottom:1px solid var(--fm-line);padding:5px 8px;line-height:1.4;overflow-wrap:anywhere}
#stom-client-cabinet .report-table-wrap th{background:#f5f5f8;font-weight:600}
#stom-client-cabinet .report-table-wrap td:first-child{font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:760px){
 #stom-client-cabinet .report-totals{grid-template-columns:minmax(0,1fr)}
 #stom-client-cabinet .report-block{padding:10px}
 #stom-client-cabinet .report-table-wrap table{min-width:510px}
}
#stom-client-cabinet .report-print-action{
 min-height:34px;margin-top:12px;border:0;border-radius:6px;background:#f0eaf9;color:#482770;padding:5px 12px;font-weight:650;
}
#stom-client-cabinet .report-print-action:hover:enabled{background:#e8ddf4;color:#39225c}
#stom-client-cabinet .report-print-action:disabled{background:#f1f2f4;color:#5d616b}
#stom-director-output{display:none}
#stom-director-preview{
 box-sizing:border-box;width:min(830px,calc(100% - 24px));max-height:calc(100dvh - 24px);
 padding:0;overflow:auto;border:0;border-radius:14px;background:#f3f2f6;color:#24252d;
 box-shadow:0 16px 54px #24203938;font:14px/1.42 "Segoe UI",Arial,sans-serif;
}
#stom-director-preview::backdrop{background:#211c39a6}
#stom-director-preview .director-preview-bar{
 position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;
 padding:10px clamp(12px,2.6vw,22px);background:#fff;border-bottom:1px solid #e3e0e9;
}
#stom-director-preview .director-preview-label{font-weight:650;color:#4c435b}
#stom-director-preview .director-preview-actions{display:flex;flex-wrap:wrap;gap:8px}
#stom-director-preview button{min-height:34px;padding:5px 12px;border:0;border-radius:6px;font:inherit;font-weight:650;cursor:pointer}
#stom-director-preview .director-preview-print{background:#eee8f8;color:#45266e}
#stom-director-preview .director-preview-print:hover{background:#e7dbf4;color:#382258}
#stom-director-preview .director-preview-close{background:transparent;color:#494052}
#stom-director-preview .director-preview-close:hover{text-decoration:underline}
#stom-director-preview button:focus-visible{outline:2px solid #68468e;outline-offset:2px}
#stom-director-preview .director-preview-sheet{padding:clamp(8px,2.6vw,24px)}
#stom-director-preview .director-document{
 box-sizing:border-box;padding:clamp(12px,4vw,44px);min-height:min(440px,56vh);
 background:#fff;border:1px solid #e6e3eb;border-radius:4px;box-shadow:0 2px 12px #2e224010;
}
.director-document h1{margin:0 0 8px;font-size:clamp(21px,3.8vw,30px);line-height:1.15;color:#222}
.director-document header p{margin:0 0 6px}
.director-document .director-print-clinic{font-weight:650;color:#43394d}
.director-document .director-print-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:20px 0}
.director-document .director-print-totals div{border-bottom:1px solid #d9d5e0;padding:0 3px 7px}
.director-document .director-print-totals dt{font-size:12px;color:#575161}
.director-document dd{margin:3px 0 0;font-size:21px;font-weight:650}
.director-document table{width:100%;border-collapse:collapse;table-layout:fixed}
.director-document caption{font-weight:650;text-align:left;margin-bottom:5px}
.director-document :is(th,td){padding:6px;text-align:left;vertical-align:top;border-bottom:1px solid #dedbe4;overflow-wrap:anywhere}
.director-document thead th:first-child{width:26%}
.director-document thead th:last-child{width:26%}
.director-document tbody th{font-weight:500}
.director-document .director-print-note{font-size:12px;color:#514b58}
@media(max-width:480px){
 #stom-director-preview .director-document{min-height:0}
 .director-document :is(th,td){padding:5px 3px;font-size:12px}
}
@media print{
 body.fx-cabinets:has(> #stom-director-output){display:block!important;margin:0!important;min-height:0;background:white!important;color:black!important}
 body.fx-cabinets:has(> #stom-director-output)>:not(#stom-director-output){display:none!important}
 #stom-director-preview::backdrop{display:none!important}
 #stom-director-output{display:block!important;margin:0;padding:0;color:#161616;font:11pt/1.42 "Segoe UI",Arial,sans-serif}
 #stom-director-output h1{font-size:19pt;margin:0 0 3mm}
 #stom-director-output header{break-inside:avoid}
 #stom-director-output header p{margin:0 0 2mm}
 #stom-director-output .director-print-totals{gap:4mm;margin:5mm 0;break-inside:avoid}
 #stom-director-output .director-print-totals div{border-bottom:1pt solid #bbb;padding:0 2mm 2mm}
 #stom-director-output .director-print-totals dt{font-size:10pt}
 #stom-director-output dd{margin:1mm 0 0;font-size:16pt}
 #stom-director-output caption{margin-bottom:2mm}
 #stom-director-output thead{display:table-header-group}
 #stom-director-output tr{break-inside:avoid;page-break-inside:avoid}
 #stom-director-output :is(th,td){padding:1.8mm 2mm;border-bottom:.5pt solid #bfbfbf;font-size:11pt}
 #stom-director-output .director-print-note{font-size:9.5pt;break-inside:avoid}
}
/* The approved operator workspace is the clinic-wide shell, not a framed study.
   One rail has two groups (work above, settings/account below); patient data and
   role-specific routes remain owned by the existing controllers. */
body.stom-clinic-shell{
  --clinic-rail:88px;
  --fm-violet:#6c3bff;--fm-violet-ink:#4c27bc;--fm-coral:#ff684a;
  --fm-ink:#24232c;--fm-secondary:#5e606c;--fm-line:#e3e4e9;
  --lilac:#f3f1fa;--line:var(--fm-line);--ink:var(--fm-ink);--muted:var(--fm-secondary);
  height:100dvh;min-height:0;overflow:hidden;background:#fff;color:var(--fm-ink);
  font:400 14px/1.42 "Segoe UI",system-ui,-apple-system,Arial,sans-serif;
}
body.stom-clinic-shell #staff-app{max-width:none;width:100%;min-width:0;margin:0;padding:0;background:#fff}
body.stom-clinic-shell .wrap{width:100%;min-width:0;padding:0;margin:0}
body.stom-clinic-shell #preview{
  display:grid;grid-template-areas:"rail top" "rail work";
  grid-template-columns:var(--clinic-rail) minmax(0,1fr);grid-template-rows:66px minmax(0,1fr);
  width:100%;height:calc(100dvh - 26px);min-height:0;border:0;border-radius:0;
  box-shadow:none;overflow:hidden;background:#fff;
}
body.stom-clinic-shell>.sd-footer{height:26px;padding:4px 8px;font:11px/18px "Segoe UI",system-ui,sans-serif;background:#fafafb;border-top:1px solid var(--fm-line);color:var(--fm-secondary)}
body.stom-clinic-shell>.sd-footer .staff-owner-link{display:none}
body.stom-clinic-shell #sectionNav.clinic-primary-rail{
  grid-area:rail;display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0;min-height:0;
  padding:11px 6px 10px;overflow:auto;scrollbar-width:thin;scrollbar-color:#dbdce2 transparent;
  background:#f6f6f8;border:0;border-right:1px solid var(--fm-line);
}
body.stom-clinic-shell #sectionNav :is(.nav-heading,.owner-nav-heading){display:none}
body.stom-clinic-shell .clinic-rail-main,body.stom-clinic-shell .clinic-rail-bottom{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0}
body.stom-clinic-shell .clinic-rail-bottom{margin-top:auto;padding-top:16px}
body.stom-clinic-shell #sectionNav .clinic-brand{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  min-height:49px;margin:0 0 12px;padding:0;border:0;border-radius:0;background:transparent;
  color:#322849;text-decoration:none;box-shadow:none;font:650 11px/1.2 "Segoe UI",system-ui,sans-serif;
}
body.stom-clinic-shell #sectionNav .clinic-brand img{width:33px;height:33px;object-fit:contain}
body.stom-clinic-shell #sectionNav .section-link{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  width:100%;min-height:54px;min-width:0;padding:6px 2px;margin:0;border:0;border-radius:7px;
  background:transparent;box-shadow:none;text-align:center;text-decoration:none;
  color:#535461;font:550 12px/1.15 "Segoe UI",system-ui,sans-serif;
  overflow-wrap:normal;word-break:normal;
}
body.stom-clinic-shell #sectionNav .section-link>span:last-child{max-width:100%;overflow-wrap:normal;word-break:normal}
body.stom-clinic-shell #sectionNav .section-link .nav-glyph{display:grid;place-items:center;min-height:19px;font-size:19px;line-height:19px}
body.stom-clinic-shell #sectionNav .section-link .nav-glyph svg{display:block;width:20px;height:20px}
body.stom-clinic-shell #sectionNav .section-link:hover{background:#eeeef2;color:var(--fm-violet-ink)}
body.stom-clinic-shell #sectionNav .section-link:is(.active,[aria-current=page]){background:#fff;color:var(--fm-violet-ink);box-shadow:inset 3px 0 var(--fm-violet);font-weight:700}
body.stom-clinic-shell #sectionNav .section-link:focus-visible{outline:2px solid #6232ed;outline-offset:-2px}
body.stom-clinic-shell #sectionNav .clinic-rail-role{font-size:9px;line-height:1.3;text-align:center;color:#777985;padding:3px 1px}
body.stom-clinic-shell #sectionNav .clinic-rail-exit{display:flex;align-items:center;justify-content:center;min-height:31px;padding:5px 1px;border:0;border-top:1px solid #e3e4e9;border-radius:0;background:none;box-shadow:none;color:#535461;font:11px/1.2 "Segoe UI",system-ui,sans-serif}
body.stom-clinic-shell #preview .appbar{grid-area:top;display:flex;align-items:center;justify-content:space-between;min-width:0;min-height:0;gap:14px;padding:9px clamp(15px,2.2vw,30px);background:#fff;border:0;border-bottom:1px solid var(--fm-line)}
body.stom-clinic-shell #preview .clinic-headings{display:flex;flex:1;flex-direction:column;align-items:flex-start;min-width:0;gap:2px;margin:0;padding:0}
body.stom-clinic-shell #preview :is(.clinic-caption,#clinic,#context){max-width:100%;min-width:0;margin:0;padding:0;border:0;color:var(--fm-secondary);font-size:10px;font-weight:650;line-height:1.2;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.stom-clinic-shell #preview h1{max-width:100%;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--fm-ink);font:600 clamp(20px,2.2vw,29px)/1.12 "Segoe UI",system-ui,sans-serif;letter-spacing:-.35px}
body.stom-clinic-shell #preview .appbar .brand:empty{display:none}
body.stom-clinic-shell #preview .profile,body.stom-clinic-shell #preview .who{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--fm-secondary);font-size:12px}
body.stom-clinic-shell #preview #person{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.stom-clinic-shell #preview #initials{width:30px;height:30px;flex:none;background:#f1f2f4;color:#535461;font-size:11px}
body.stom-clinic-shell #preview .who select{max-width:180px;font-size:12px}
body.stom-clinic-shell #preview .appbar .cab-footer-action{display:none}
body.stom-clinic-shell #preview .main{grid-area:work;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;padding:0;background:#fff}
body.stom-clinic-shell #preview .clinic-subtitle{flex:none;margin:0;padding:13px 24px 0;color:var(--fm-secondary);font-size:13px;line-height:1.4}
body.stom-clinic-shell #preview .clinic-work{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px 24px 24px;scrollbar-width:thin}
body.stom-clinic-shell #preview .main>.cab-note{flex:none;margin:0;padding:0 24px;font-size:12px}
body.stom-clinic-shell #preview .main>.cab-note:empty{display:none}
body.stom-clinic-shell #preview .section-tag{display:none}
body.stom-clinic-shell #preview[data-section=dialogs] .clinic-subtitle{display:none}
body.stom-clinic-shell #preview[data-section=dialogs] .clinic-work{padding:0;overflow:hidden}
body.stom-clinic-shell .clinic-dialog-host{width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;border:0;border-radius:0;box-shadow:none}
body.stom-clinic-shell .clinic-dialog-host #fx-work{position:relative;inset:auto;z-index:0;display:block;width:100%;height:100%;min-height:0;border:0;border-radius:0}
body.stom-clinic-shell .clinic-dialog-host #fx-work>.fx-rail,body.stom-clinic-shell .clinic-dialog-host #fx-work .fx-head{display:none}
body.stom-clinic-shell .clinic-dialog-host #fx-work>.fx-main{height:100%;min-height:0;min-width:0;display:flex;flex-direction:column}
body.stom-clinic-shell .clinic-dialog-host #fx-work .fx-toolbar{padding:8px clamp(12px,2vw,28px)}
body.stom-clinic-shell .clinic-dialog-host #fx-work .fx-compose .sd-info{margin:0;font-size:12px;line-height:1.4;padding:7px 10px}
body.stom-clinic-shell #preview .brief-metric{box-shadow:none;border-radius:7px;min-height:66px}
body.stom-clinic-shell #preview table{font-size:13px}
body.stom-clinic-shell #preview :is(th,td){padding:7px 10px;line-height:1.35}
body.stom-clinic-shell #preview .state{font-size:11px;padding:3px 6px;border-radius:4px}
@media(max-width:1100px){
 body.stom-clinic-shell{--clinic-rail:76px}
 body.stom-clinic-shell #sectionNav .section-link{font-size:11px}
 body.stom-clinic-shell #preview .clinic-work{padding:16px 18px 20px}
 body.stom-clinic-shell #preview .clinic-subtitle{padding-inline:18px}
 body.stom-clinic-shell #preview[data-section=dialogs] .clinic-work{padding:0}
}
@media(min-width:761px) and (max-width:900px){body.stom-clinic-shell{--clinic-rail:67px}}
@media(max-width:760px){
 body.stom-clinic-shell{--clinic-rail:66px}
 body.stom-clinic-shell #preview #person{display:none}
 body.stom-clinic-shell #preview .who select{max-width:120px}
 body.stom-clinic-shell #preview .appbar{padding-inline:12px;gap:8px}
 body.stom-clinic-shell #sectionNav .section-link{font-size:10.5px}
 body.stom-clinic-shell #preview .clinic-work{padding:14px 12px 18px}
 body.stom-clinic-shell #preview .clinic-subtitle{padding-inline:12px;font-size:12px}
 body.stom-clinic-shell #preview[data-section=dialogs] .clinic-work{padding:0}
}
@media(max-width:590px){
 body.stom-clinic-shell{--clinic-rail:60px}
 body.stom-clinic-shell #preview{grid-template-rows:50px minmax(0,1fr)}
 body.stom-clinic-shell #sectionNav.clinic-primary-rail{padding:8px 3px;gap:4px}
 body.stom-clinic-shell .clinic-rail-main,body.stom-clinic-shell .clinic-rail-bottom{gap:4px}
 body.stom-clinic-shell #sectionNav .clinic-brand{min-height:41px;margin-bottom:7px}
 body.stom-clinic-shell #sectionNav .clinic-brand img{width:28px;height:28px}
 body.stom-clinic-shell #sectionNav .section-link{min-height:47px;font-size:10px}
 body.stom-clinic-shell #sectionNav .clinic-rail-role{display:none}
 body.stom-clinic-shell #preview h1{font-size:20px}
 body.stom-clinic-shell #preview :is(.clinic-caption,#clinic,#context){font-size:9px;letter-spacing:.03em}
 body.stom-clinic-shell #preview #initials{width:26px;height:26px}
 body.stom-clinic-shell #preview .who:has(select) #initials{display:none}
 body.stom-clinic-shell #preview .who select{max-width:110px}
 body.stom-clinic-shell #preview .clinic-work{padding:12px 10px 16px}
 body.stom-clinic-shell #preview .clinic-subtitle{padding:10px 10px 0}
 body.stom-clinic-shell #preview[data-section=dialogs] .clinic-work{padding:0}
 body.stom-clinic-shell .clinic-dialog-host #fx-work .fx-toolbar{padding:5px 7px}
}
@media print{body.stom-clinic-shell{height:auto!important;min-height:0!important;overflow:visible!important}}
