/* Cabinet payroll only. Keep the existing client forms and calculation engine. */
html body #payroll-workspace-modal.modal:not(.hidden){position:fixed!important;inset:0!important;z-index:2150!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:16px!important;overflow:hidden!important;background:rgba(12,31,46,.55)!important;border-radius:0!important}
html body .modal.az-modal-over-payroll{z-index:2160!important}
html body #action-note-modal.az-modal-over-payroll{z-index:2170!important}
html body #payroll-workspace-modal.hidden,html body #payroll-workspace-modal [hidden]{display:none!important}
html body #payroll-workspace-modal.modal .modal-card.payroll-modal-card{width:min(1480px,calc(100vw - 32px))!important;max-width:1480px!important;height:calc(100dvh - 32px)!important;max-height:calc(100dvh - 32px)!important;min-width:0!important;padding:0!important;margin:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border:1px solid #d8e5ec!important;border-radius:18px!important;background:#fff!important;box-shadow:0 24px 80px rgba(8,24,38,.28)!important}
html body #payroll-workspace-modal .modal-head{flex:0 0 auto!important;gap:16px;margin:0!important;padding:14px 20px!important;border-bottom:1px solid #e1e9ed;background:#fff}
html body #payroll-workspace-modal .modal-head>div{min-width:0}
html body #payroll-workspace-modal .modal-head h3{font-size:18px!important;margin:0!important}
html body #payroll-workspace-modal .modal-head .muted{margin:4px 0 0;font-size:12px}
html body #payroll-workspace-modal .modal-head .muted,html body #payroll-workspace-modal .modal-head .eyebrow{display:none}
html body #payroll-workspace-modal .modal-head .icon-btn{flex:0 0 40px!important;width:40px!important;height:40px!important;min-height:40px!important}
html body #payroll-workspace-modal .payroll-modal-body{flex:1 1 auto;min-height:0;min-width:0;overflow:hidden!important;padding:16px 20px!important;background:#f5f8fa}
html body #payroll-workspace-modal .payroll-shell{max-width:none!important;width:100%;min-width:0;gap:12px}
html body #payroll-workspace-modal .payroll-collaborator-shell{display:flex!important;flex-direction:column;height:100%;min-height:0}
html body #payroll-workspace-modal .payroll-collaborator-shell>section,html body #payroll-workspace-modal .payroll-collaborator-pilot,html body #payroll-workspace-modal .payroll-collaborator-steps,html body #payroll-workspace-modal .payroll-global-warnings,html body #payroll-workspace-modal .payroll-collaborator-advanced{flex:0 0 auto}
html body #payroll-workspace-modal .payroll-shell .card{min-width:0!important;margin:0!important}
html body #payroll-workspace-modal .payroll-head{gap:20px;padding:10px 16px!important;box-shadow:none!important}
html body #payroll-workspace-modal .payroll-head>div:first-child{flex:1;min-width:0}
html body #payroll-workspace-modal .payroll-head h2{font-size:20px!important;line-height:1.3!important}
html body #payroll-workspace-modal .payroll-head p{display:none}
html body #payroll-workspace-modal .payroll-period-picker{flex:0 0 auto;max-width:320px;align-items:end}
html body #payroll-workspace-modal .payroll-period-picker input{min-width:165px;width:165px!important;max-width:100%}
html body #payroll-workspace-modal .payroll-collaborator-pilot{grid-template-columns:1.25fr repeat(3,minmax(0,1fr))}
html body #payroll-workspace-modal .payroll-collaborator-pilot>div{min-height:48px!important;padding:6px 14px}
html body #payroll-workspace-modal .payroll-collaborator-pilot strong{font-size:18px}
html body #payroll-workspace-modal .payroll-global-warnings{padding:9px 13px;max-height:120px;overflow-y:auto}
html body #payroll-workspace-modal .payroll-global-warnings summary{font-size:12px}
html body #payroll-workspace-modal .payroll-recovery-help p{margin:10px 0;color:#745c29;font-size:12px;line-height:1.6}
html body #payroll-workspace-modal .payroll-recovery-check{display:flex!important;align-items:flex-start;gap:9px;font-size:12px;line-height:1.5}
html body #payroll-workspace-modal .payroll-recovery-check input{width:18px!important;height:18px!important;min-height:18px!important;margin:0!important;flex:0 0 18px}
html body #payroll-workspace-modal .payroll-collaborator-steps{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible!important}
html body #payroll-workspace-modal .payroll-collaborator-steps button{min-width:0!important;min-height:44px!important;height:auto!important;padding:7px 10px!important}
html body #payroll-workspace-modal .payroll-collaborator-steps button b{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.3}
html body #payroll-workspace-modal .payroll-collaborator-stage{flex:1;min-height:0;overflow:auto}
html body #payroll-workspace-modal .payroll-collaborator-advanced{padding:0!important;max-height:130px;overflow:auto}
html body #payroll-workspace-modal .payroll-collaborator-advanced>summary{padding:9px 14px!important;font-size:12px}
html body #payroll-workspace-modal .payroll-review-desk-stage{flex:1;min-height:180px}
html body #payroll-workspace-modal .payroll-review-desk{display:grid;grid-template-columns:minmax(270px,340px) minmax(0,1fr);height:100%;min-width:0;gap:14px}
html body #payroll-workspace-modal .payroll-review-roster,html body #payroll-workspace-modal .payroll-review-editor{display:flex;flex-direction:column;min-height:0;min-width:0;border:1px solid #dce6ec;border-radius:14px;background:#fff;overflow:hidden}
html body #payroll-workspace-modal .payroll-review-roster-head{flex:0 0 auto;padding:14px;border-bottom:1px solid #e4ecef;display:grid;gap:8px}
html body #payroll-workspace-modal .payroll-review-roster-head h3{display:flex;align-items:center;justify-content:space-between;margin:0;font-size:16px;color:#173b51}
html body #payroll-workspace-modal .payroll-review-roster-head h3 span{padding:3px 8px;border-radius:20px;background:#e8f5f1;color:#077267;font-size:12px}
html body #payroll-workspace-modal .payroll-review-roster-head label{display:grid;gap:4px;min-width:0;font-size:11px;color:#5b7080;font-weight:700}
html body #payroll-workspace-modal .payroll-review-roster-head .control{width:100%!important;min-width:0!important;height:38px!important;min-height:38px!important;margin:0!important;font-size:12px!important}
html body #payroll-workspace-modal .payroll-review-roster-head small{font-size:11px;color:#6b7d8a}
html body #payroll-workspace-modal .payroll-review-roster-list{overflow-y:auto;min-height:0;flex:1;padding:6px;display:block}
html body #payroll-workspace-modal .payroll-review-roster-row{display:grid!important;grid-template-columns:26px minmax(0,1fr) auto;gap:8px;align-items:start;width:100%!important;min-width:0!important;height:auto!important;min-height:84px!important;padding:11px 8px!important;margin:0 0 5px!important;text-align:left!important;white-space:normal!important;border:1px solid transparent!important;border-radius:10px!important;background:#fff!important;color:#173b51!important;cursor:pointer}
html body #payroll-workspace-modal .payroll-review-roster-row:hover{background:#f5faf9!important}
html body #payroll-workspace-modal .payroll-review-roster-row.is-selected{border-color:#15968b!important;background:#edf9f5!important;box-shadow:inset 3px 0 #0a8175!important}
html body #payroll-workspace-modal .payroll-review-avatar{display:grid;place-items:center;width:26px;height:26px;border-radius:8px;background:#eaf0f4;color:#5b7180;font-size:11px;font-weight:800}
html body #payroll-workspace-modal .payroll-review-roster-person{display:grid;gap:3px;min-width:0}
html body #payroll-workspace-modal .payroll-review-roster-person strong{font-size:12px;line-height:1.4;overflow-wrap:anywhere}
html body #payroll-workspace-modal .payroll-review-roster-person small{font-size:10px;color:#6d7f8b}
html body #payroll-workspace-modal .payroll-review-roster-person .payroll-review-chip{font-size:10px;padding:3px 6px;max-width:100%}
html body #payroll-workspace-modal .payroll-review-roster-net{text-align:right;font-size:11px;font-weight:800;white-space:nowrap}
html body #payroll-workspace-modal .payroll-review-roster-net small{display:block;margin-top:4px;font-size:9px;font-weight:400;color:#6d7f8b}
html body #payroll-workspace-modal .payroll-roster-empty{padding:14px;font-size:12px}
html body #payroll-workspace-modal .payroll-review-editor-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 16px;border-bottom:1px solid #e3ecef;flex:0 0 auto}
html body #payroll-workspace-modal .payroll-review-editor-heading h3{margin:3px 0 0;font-size:16px;color:#173b51}
html body #payroll-workspace-modal [data-payroll-selected-position]{font-size:12px;color:#6b7d8a;white-space:nowrap}
html body #payroll-workspace-modal .payroll-review-editor-scroll{flex:1 1 auto;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;padding:14px}
html body #payroll-workspace-modal .payroll-employee-head{align-items:flex-start;gap:12px;padding:14px!important}
html body #payroll-workspace-modal .payroll-employee-head>div:first-child{min-width:0}
html body #payroll-workspace-modal .payroll-employee-head strong{font-size:16px;overflow-wrap:anywhere}
html body #payroll-workspace-modal .payroll-employee-head .payroll-employee-result{flex:0 0 auto}
html body #payroll-workspace-modal .payroll-fields{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
html body #payroll-workspace-modal .payroll-fields .control{height:auto!important;min-height:42px!important;max-height:none!important;font-size:14px!important;box-sizing:border-box}
html body #payroll-workspace-modal .payroll-fields textarea.control{min-height:72px!important}
html body #payroll-workspace-modal .payroll-fields .wide{grid-column:1/-1}
html body #payroll-workspace-modal .payroll-employee-more{grid-column:1/-1;border:1px solid #e1eaee;border-radius:10px;background:#f9fbfc;overflow:hidden}
html body #payroll-workspace-modal .payroll-employee-more summary{padding:12px;cursor:pointer;font-size:12px;color:#4a6576;font-weight:700}
html body #payroll-workspace-modal .payroll-employee-more p{padding:0 12px;font-size:11px;line-height:1.5}
html body #payroll-workspace-modal .payroll-employee-more .control[readonly],html body #payroll-workspace-modal .payroll-employee-more .control:disabled{background:#f0f4f7!important;color:#697c8a!important}
html body #payroll-workspace-modal .payroll-employee-calculation{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:0 14px 14px}
html body #payroll-workspace-modal .payroll-employee-calculation h4{grid-column:1/-1;margin:0;font-size:11px;color:#6b7c88}
html body #payroll-workspace-modal .payroll-employee-calculation>div{display:grid;gap:4px;padding:10px;border-radius:9px;background:#f3f7fa;min-width:0}
html body #payroll-workspace-modal .payroll-employee-calculation span{font-size:10px;color:#607484}
html body #payroll-workspace-modal .payroll-employee-calculation strong{font-size:13px;color:#1f4256;overflow-wrap:anywhere}
html body #payroll-workspace-modal .payroll-employee-calculation .is-net{background:#eaf7f1}
html body #payroll-workspace-modal .payroll-employee-calculation .is-net strong{color:#067369}
html body #payroll-workspace-modal .payroll-employee-warnings{margin:0 14px 14px;border:1px solid #f0d5a0;border-radius:10px;background:#fffaf0}
html body #payroll-workspace-modal .payroll-employee-warnings summary{padding:10px 12px;font-size:12px;font-weight:700;color:#805c14;cursor:pointer}
html body #payroll-workspace-modal .payroll-employee-warnings .payroll-warning-list{margin:0;padding-top:0;background:transparent;line-height:1.6;overflow-wrap:anywhere}
html body #payroll-workspace-modal .payroll-review-footer{flex:0 0 auto;display:grid;gap:7px;padding:12px 14px;background:#fff;border-top:1px solid #e1eaee;box-shadow:0 -6px 18px rgba(15,45,66,.04)}
html body #payroll-workspace-modal .payroll-review-footer p{margin:0;font-size:11px;color:#607888;line-height:1.4}
html body #payroll-workspace-modal .payroll-review-footer p.has-changes{color:#9a6410}
html body #payroll-workspace-modal .payroll-review-footer-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
html body #payroll-workspace-modal .payroll-review-footer .btn{width:auto!important;height:auto!important;min-height:40px!important;padding:9px 12px!important;font-size:12px!important;white-space:normal!important}
html body #payroll-workspace-modal .payroll-review-footer small{font-size:10px;color:#687d8b}
/* Keep the working sheet dominant; supplementary context opens above it. */
html body #payroll-workspace-modal .modal-head{padding:8px 16px!important}
html body #payroll-workspace-modal .modal-head .icon-btn{flex-basis:34px!important;width:34px!important;height:34px!important;min-height:34px!important}
html body #payroll-workspace-modal .payroll-modal-body{padding:10px 16px!important}
html body #payroll-workspace-modal .payroll-shell{gap:8px}
html body #payroll-workspace-modal .payroll-head{padding:8px 12px!important;align-items:center}
html body #payroll-workspace-modal .payroll-head h2{font-size:17px!important;margin:0!important}
html body #payroll-workspace-modal .payroll-review-period-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:5px;font-size:11px;color:#657d8b}
html body #payroll-workspace-modal .payroll-review-period-meta>div{display:flex!important;align-items:center;gap:5px;margin:0!important}
html body #payroll-workspace-modal .payroll-review-period-meta .payroll-state-badge{font-size:10px;padding:4px 7px}
html body #payroll-workspace-modal .payroll-period-picker{display:flex;align-items:end;gap:8px}
html body #payroll-workspace-modal .payroll-period-picker label{font-size:10px;gap:3px}
html body #payroll-workspace-modal .payroll-period-picker input,html body #payroll-workspace-modal .payroll-period-picker .btn{min-height:34px!important;height:34px!important;font-size:12px!important;padding:6px 10px!important}
html body #payroll-workspace-modal .payroll-review-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;min-height:32px}
html body #payroll-workspace-modal .payroll-review-indicators{display:flex;gap:14px;align-items:center;flex-wrap:wrap;color:#587282;font-size:11px}
html body #payroll-workspace-modal .payroll-review-indicators strong{color:#1c4157;font-size:12px}
html body #payroll-workspace-modal .payroll-period-details{position:relative;flex:0 0 auto;min-width:0}
html body #payroll-workspace-modal .payroll-period-details>summary{display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid #d7e6eb;border-radius:8px;background:#fff;color:#335c6f;font-size:11px;font-weight:700;cursor:pointer;list-style:none}
html body #payroll-workspace-modal .payroll-period-details>summary:after{content:'⌄';font-size:14px}
html body #payroll-workspace-modal .payroll-period-details[open]>summary:after{content:'⌃'}
html body #payroll-workspace-modal .payroll-period-details>summary span{padding:3px 6px;border-radius:6px;background:#fff3d9;color:#835a14;font-size:10px}
html body #payroll-workspace-modal .payroll-period-details-panel{position:absolute;right:0;top:calc(100% + 6px);z-index:20;display:grid;gap:10px;width:min(540px,calc(100vw - 70px));max-height:calc(100dvh - 220px);overflow:auto;overscroll-behavior:contain;padding:16px;background:#fff;border:1px solid #d3e1e8;border-radius:12px;box-shadow:0 14px 45px rgba(15,42,59,.22)}
html body #payroll-workspace-modal .payroll-period-details-panel h3{margin:0;font-size:14px;color:#21475b}
html body #payroll-workspace-modal .payroll-period-details-panel .payroll-global-warnings,html body #payroll-workspace-modal .payroll-period-details-panel .payroll-collaborator-advanced{max-height:none;overflow:visible}
html body #payroll-workspace-modal .payroll-period-details-panel .payroll-notice{font-size:12px}
html body #payroll-workspace-modal .payroll-collaborator-steps button{min-height:36px!important;padding:5px 8px!important}
html body #payroll-workspace-modal .payroll-review-editor-heading{padding:8px 14px}
html body #payroll-workspace-modal .payroll-review-editor-heading .eyebrow{display:none}
html body #payroll-workspace-modal .payroll-review-editor-heading h3{font-size:14px;margin:0}
html body #payroll-workspace-modal .payroll-review-roster-head{padding:10px;gap:6px}
html body #payroll-workspace-modal .payroll-review-roster-head .control{height:34px!important;min-height:34px!important}
html body #payroll-workspace-modal .payroll-employee-head{padding:10px 14px!important}
html body #payroll-workspace-modal .payroll-review-footer{padding:8px 14px;gap:5px}
html body #payroll-workspace-modal button:focus-visible,html body #payroll-workspace-modal input:focus-visible,html body #payroll-workspace-modal select:focus-visible{outline:2px solid #158d83;outline-offset:2px}
@media(max-width:1000px){
  html body #payroll-workspace-modal .payroll-review-desk{grid-template-columns:minmax(235px,280px) minmax(0,1fr)}
  html body #payroll-workspace-modal .payroll-review-roster-row{grid-template-columns:24px minmax(0,1fr)}
  html body #payroll-workspace-modal .payroll-review-roster-net{grid-column:2;text-align:left}
  html body #payroll-workspace-modal .payroll-review-roster-net small{display:inline;margin-left:6px}
  html body #payroll-workspace-modal .payroll-collaborator-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
  html body #payroll-workspace-modal .payroll-employee-calculation{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  html body #payroll-workspace-modal.modal:not(.hidden){padding:0!important}
  html body #payroll-workspace-modal.modal .modal-card.payroll-modal-card{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border:0!important;border-radius:0!important}
  html body #payroll-workspace-modal .modal-head{padding:12px!important}
  html body #payroll-workspace-modal .modal-head .muted{display:none}
  html body #payroll-workspace-modal .payroll-modal-body{padding:10px!important;overflow-y:auto!important}
  html body #payroll-workspace-modal .payroll-collaborator-shell{height:auto}
  html body #payroll-workspace-modal .payroll-collaborator-stage{overflow:visible}
  html body #payroll-workspace-modal .payroll-review-toolbar{align-items:stretch;flex-direction:column;gap:6px}
  html body #payroll-workspace-modal .payroll-review-indicators{gap:6px 12px}
  html body #payroll-workspace-modal .payroll-period-details>summary{min-height:38px;font-size:12px;justify-content:space-between}
  html body #payroll-workspace-modal .payroll-period-details-panel{width:100%;max-height:65dvh;box-sizing:border-box}
  html body #payroll-workspace-modal .payroll-head{display:grid;padding:12px!important;gap:8px}
  html body #payroll-workspace-modal .payroll-period-picker{width:100%;max-width:none;display:flex;flex-wrap:nowrap;align-items:end}
  html body #payroll-workspace-modal .payroll-period-picker label{flex:1;min-width:0}
  html body #payroll-workspace-modal .payroll-period-picker input{width:100%!important;min-width:0;font-size:16px!important}
  html body #payroll-workspace-modal .payroll-collaborator-pilot{grid-template-columns:repeat(2,minmax(0,1fr))}
  html body #payroll-workspace-modal .payroll-collaborator-pilot>div:first-child{grid-column:auto}
  html body #payroll-workspace-modal .payroll-review-desk{grid-template-columns:1fr;height:auto;gap:10px}
  html body #payroll-workspace-modal .payroll-review-roster-list{max-height:205px;flex:none}
  html body #payroll-workspace-modal .payroll-review-roster-head{grid-template-columns:1fr 1fr;padding:10px;gap:6px 10px}
  html body #payroll-workspace-modal .payroll-review-roster-head h3,html body #payroll-workspace-modal .payroll-review-roster-head small{grid-column:1/-1}
  html body #payroll-workspace-modal .payroll-review-roster-head .control{font-size:16px!important}
  html body #payroll-workspace-modal .payroll-review-roster-row{grid-template-columns:26px minmax(0,1fr) auto;min-height:72px!important}
  html body #payroll-workspace-modal .payroll-review-roster-net{grid-column:auto;text-align:right}
  html body #payroll-workspace-modal .payroll-review-roster-net small{display:block;margin-left:0}
  html body #payroll-workspace-modal .payroll-review-editor-scroll{overflow:visible;padding:10px}
  html body #payroll-workspace-modal .payroll-review-editor{overflow:visible}
  html body #payroll-workspace-modal .payroll-fields{grid-template-columns:1fr}
  html body #payroll-workspace-modal .payroll-fields .control{font-size:16px!important}
  html body #payroll-workspace-modal .payroll-employee-head{flex-wrap:wrap}
  html body #payroll-workspace-modal .payroll-review-footer{position:sticky;bottom:-10px;z-index:5;border-radius:0 0 14px 14px;padding:10px}
  html body #payroll-workspace-modal .payroll-review-footer-actions{display:grid;grid-template-columns:1fr 1fr}
  html body #payroll-workspace-modal .payroll-review-footer .btn{width:100%!important;min-height:44px!important}
}
