/* v1.12.02 — MSA Staff Desk desktop popup workspace.
   Loaded for Staff pages, but activated only by the installed Desktop app. */
:root{--msa-desk-blue:#0b5f94;--msa-desk-teal:#0a927f;--msa-desk-ink:#173f5e;--msa-desk-line:#d7e2ea}
body.msa-desktop-popup-open{overflow:hidden!important}
.msa-desk-work-overlay[hidden]{display:none!important}
.msa-desk-work-overlay{position:fixed;inset:0;z-index:60000;display:grid;place-items:center;padding:14px;background:rgba(7,28,44,.68);backdrop-filter:blur(3px)}
.msa-desk-work-shell{width:min(1540px,98.5vw);height:min(940px,96vh);display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;border:1px solid rgba(255,255,255,.55);border-radius:20px;background:#f4f8fb;box-shadow:0 34px 100px rgba(0,0,0,.36)}
.msa-desk-work-head{min-height:68px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;background:linear-gradient(105deg,#0a4f83 0%,#0b73a4 54%,#0b937f 100%);color:#fff;border-bottom:1px solid rgba(0,0,0,.08)}
.msa-desk-work-mark{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:rgba(255,255,255,.96);color:#0b6597;font-size:20px;font-weight:950;box-shadow:0 4px 12px rgba(0,0,0,.15)}
.msa-desk-work-title{min-width:0}.msa-desk-work-title span{display:block;font-size:9px;font-weight:950;letter-spacing:.12em;color:#cfeef4}.msa-desk-work-title strong{display:block;margin-top:2px;font-size:17px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.msa-desk-work-title small{display:block;margin-top:2px;font-size:10px;color:#ddf2f5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msa-desk-work-tools{display:flex;align-items:center;gap:7px}.msa-desk-work-tools button{height:38px;min-width:38px;border:1px solid rgba(255,255,255,.23);border-radius:10px;background:rgba(255,255,255,.12);color:#fff;font:900 11px "Segoe UI",Arial,sans-serif;cursor:pointer;padding:0 11px}.msa-desk-work-tools button:hover{background:rgba(255,255,255,.22)}.msa-desk-work-tools .msa-desk-work-close{font-size:21px;padding:0;width:40px;background:rgba(118,22,22,.25)}
.msa-desk-work-body{position:relative;min-height:0;background:#edf3f7}.msa-desk-work-frame{width:100%;height:100%;border:0;background:#eef4f8;display:block}.msa-desk-work-loading{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:linear-gradient(135deg,#edf5fa,#f8fbfd);color:#315a75;font:900 13px "Segoe UI",Arial,sans-serif}.msa-desk-work-loading[hidden]{display:none!important}.msa-desk-work-loading span{display:grid;place-items:center;gap:10px}.msa-desk-work-loading i{width:34px;height:34px;border:4px solid #c9dce9;border-top-color:#0c7caa;border-radius:50%;animation:msaDeskSpin .8s linear infinite}@keyframes msaDeskSpin{to{transform:rotate(360deg)}}
.msa-desk-work-foot{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 12px;border-top:1px solid #d5e0e8;background:#fff;color:#657b8c;font:700 10px "Segoe UI",Arial,sans-serif}.msa-desk-work-foot b{color:#1c5c83}.msa-desk-work-foot-actions{display:flex;gap:7px}.msa-desk-work-foot button{height:31px;border:1px solid #cad8e2;border-radius:8px;background:#f5f8fa;color:#31566f;font:900 10px "Segoe UI",Arial,sans-serif;padding:0 11px;cursor:pointer}.msa-desk-work-foot button.primary{border-color:#0f7a65;background:#118b70;color:#fff}
body.msa-desktop-popup-child{background:#edf3f7!important;overflow-x:hidden!important}
body.msa-desktop-popup-child>.portal-topbar,body.msa-desktop-popup-child>.footer,body.msa-desktop-popup-child>.admin-mobile-dock,body.msa-desktop-popup-child>.portal-mobile-dock{display:none!important}
body.msa-desktop-popup-child>main.wrap{width:100%!important;max-width:none!important;margin:0!important;padding:14px 16px 28px!important}
body.msa-desktop-popup-child>main.wrap>.staff-alert-switch{display:none!important}
body.msa-desktop-popup-child .msa-desktop-workspace-bar{display:none!important}
body.msa-desktop-popup-child.msa-desktop-client-workspace>main.wrap{padding:14px 16px 28px!important}
html.msa-desktop-popup-child{background:#edf3f7!important}
@media(max-width:900px){.msa-desk-work-overlay{padding:5px}.msa-desk-work-shell{width:100%;height:98vh;border-radius:13px}.msa-desk-work-head{grid-template-columns:auto minmax(0,1fr) auto;min-height:58px;padding:7px}.msa-desk-work-mark{width:38px;height:38px}.msa-desk-work-title strong{font-size:14px}.msa-desk-work-title small{display:none}.msa-desk-work-tools button:not(.msa-desk-work-close){display:none}.msa-desk-work-foot{display:none}}

/* v1.12.36 — cleaner professional Staff popup chrome. */
.msa-desk-work-overlay{padding:10px;background:rgba(5,24,40,.67);backdrop-filter:blur(6px) saturate(115%);-webkit-backdrop-filter:blur(6px) saturate(115%)}
.msa-desk-work-shell{width:min(1560px,99vw);height:min(950px,97vh);border-radius:18px;border:1px solid rgba(255,255,255,.72);background:#eef4f8;box-shadow:0 34px 110px rgba(0,0,0,.38)}
.msa-desk-work-head{min-height:62px;padding:8px 10px 8px 12px;gap:10px;background:linear-gradient(108deg,#0b446f 0%,#0a6f9d 58%,#0b8f79 100%)}
.msa-desk-work-mark{width:42px;height:42px;border-radius:11px;font-size:17px;letter-spacing:-.03em;box-shadow:0 5px 16px rgba(0,0,0,.16)}
.msa-desk-work-title span{font-size:8.5px;letter-spacing:.14em;color:#cdeef3}.msa-desk-work-title strong{font-size:17px}.msa-desk-work-title small{font-size:9.5px;color:#d9f0f3}
.msa-desk-work-tools{gap:6px}.msa-desk-work-tools button{height:36px;border-radius:9px;padding:0 10px;font-size:10px;background:rgba(255,255,255,.10)}
.msa-desk-work-tools button:hover{background:rgba(255,255,255,.20);transform:translateY(-1px)}
.msa-desk-work-tools .msa-desk-work-close{width:38px;min-width:38px;height:38px;border-radius:10px;background:rgba(112,20,20,.24);font-size:20px}
.msa-desk-work-body{background:#edf3f7}.msa-desk-work-loading{background:linear-gradient(135deg,#eef5f8,#fbfdff);font-size:12px}.msa-desk-work-loading i{width:30px;height:30px;border-width:3px}
.msa-desk-work-foot{min-height:42px;padding:6px 10px;background:#fff;color:#63798a;font-size:9.5px}.msa-desk-work-foot b{color:#164e74}
.msa-desk-work-foot button{height:30px;border-radius:8px;padding:0 10px}.msa-desk-work-foot button.primary{background:linear-gradient(135deg,#0c7b68,#0c9278);border-color:#0c7b68;box-shadow:0 4px 10px rgba(12,123,104,.18)}
@media(max-width:900px){.msa-desk-work-overlay{padding:4px}.msa-desk-work-shell{height:99vh;border-radius:12px}.msa-desk-work-head{min-height:56px}.msa-desk-work-title strong{font-size:14px}.msa-desk-work-tools button:not(.msa-desk-work-close){display:none}.msa-desk-work-foot{display:none}}

/* v1.12.38 — Staff Desk popup shell: compact, work-first and less repetitive. */
.msa-desk-work-overlay{padding:8px;background:rgba(4,20,34,.63);backdrop-filter:blur(7px) saturate(112%);-webkit-backdrop-filter:blur(7px) saturate(112%)}
.msa-desk-work-shell{width:min(1580px,99.2vw);height:min(960px,98vh);border-radius:16px;border-color:rgba(255,255,255,.82);background:#f1f6f9;box-shadow:0 30px 105px rgba(0,0,0,.36)}
.msa-desk-work-head{min-height:58px;padding:7px 9px 7px 11px;gap:9px;background:linear-gradient(108deg,#0a456f 0%,#0a719d 58%,#0b8e78 100%)}
.msa-desk-work-mark{width:40px;height:40px;border-radius:10px;font-size:16px}
.msa-desk-work-title span{font-size:8px;letter-spacing:.15em}.msa-desk-work-title strong{font-size:16px;line-height:1.15}.msa-desk-work-title small{margin-top:1px;font-size:9px;color:#d8edf2}
.msa-desk-work-tools button{height:34px;min-width:34px;border-radius:9px;padding:0 10px;font-size:10px}.msa-desk-work-tools .msa-desk-work-close{width:36px;min-width:36px;height:36px;border-radius:10px}
.msa-desk-work-body{background:#edf3f7}
.msa-desk-work-foot{min-height:39px;padding:5px 9px;font-size:9px}.msa-desk-work-foot span{display:flex;align-items:center;gap:6px}.msa-desk-work-foot span:before{content:"✓";width:18px;height:18px;display:inline-grid;place-items:center;border-radius:50%;background:#e6f5ef;color:#08705b;font-size:10px;font-weight:950}
.msa-desk-work-foot button{height:29px;border-radius:8px;padding:0 10px}.msa-desk-work-foot button.primary{background:linear-gradient(135deg,#0a765f,#0b9176);box-shadow:0 4px 12px rgba(11,145,118,.18)}
.msa-desk-work-foot button[data-desk-close]{background:#f5f8fa;color:#31566f}
body.msa-desktop-popup-child>main.wrap{padding:10px 12px 22px!important}
body.msa-desktop-popup-child.msa-desktop-client-workspace>main.wrap{padding:10px 12px 22px!important}
@media(max-width:900px){.msa-desk-work-overlay{padding:3px}.msa-desk-work-shell{height:99.4vh;border-radius:10px}.msa-desk-work-head{min-height:53px;padding:6px 7px}.msa-desk-work-mark{width:36px;height:36px}.msa-desk-work-title strong{font-size:13px}.msa-desk-work-title span{font-size:7.5px}.msa-desk-work-foot{display:none}}

/* v1.12.39 — Unified work popup: one compact shell, list → work → save. */
.msa-desk-work-shell{grid-template-rows:56px minmax(0,1fr) 38px}
.msa-desk-work-head{min-height:56px;padding:6px 8px 6px 10px;gap:9px}
.msa-desk-work-mark{width:38px;height:38px;border-radius:10px;font-size:15px}
.msa-desk-work-title{display:grid;align-content:center;gap:2px}
.msa-desk-work-title strong{font-size:16px;line-height:1.15}
.msa-desk-work-title small{margin:0;font-size:9.5px;color:#dcf1f4}
.msa-desk-work-title span{display:none!important}
.msa-desk-work-tools{gap:5px}
.msa-desk-work-tools button{height:34px;min-width:34px;padding:0 10px;border-radius:9px;font-size:10px}
.msa-desk-work-tools button[hidden]{display:none!important}
.msa-desk-work-tools [data-desk-home]{background:rgba(255,255,255,.18);font-weight:950}
.msa-desk-work-tools .msa-desk-work-close{width:36px;height:36px;min-width:36px}
.msa-desk-work-foot{min-height:38px;padding:4px 9px;font-size:9px}
.msa-desk-work-foot span:before{display:none}
.msa-desk-work-foot button{height:29px}
.msa-desk-work-body{min-height:0;overflow:hidden}
.msa-desk-work-frame{height:100%;min-height:0}
body.msa-desktop-popup-child>main.wrap,
body.msa-desktop-popup-child.msa-desktop-client-workspace>main.wrap{padding:8px 10px 16px!important}
@media(max-width:900px){
  .msa-desk-work-shell{grid-template-rows:52px minmax(0,1fr)}
  .msa-desk-work-head{min-height:52px;padding:5px 6px 5px 8px}
  .msa-desk-work-mark{width:35px;height:35px}
  .msa-desk-work-title strong{font-size:13px}.msa-desk-work-title small{font-size:8.5px}
  .msa-desk-work-tools button[data-desk-home]{display:inline-flex;align-items:center!important;justify-content:center;max-width:88px;padding:0 8px}
  .msa-desk-work-tools button[data-desk-refresh],.msa-desk-work-tools button[data-desk-open-full]{display:none!important}
}
