/* CRM v2.4.96 — Mobile Workbench v3.
   Progressive mobile-only layer over Record Highlights / Attention / Summary / Context
   and Activity Composer. No entity detail template overrides. */

@media (max-width:820px){
  body.mobile-workbench-v2496-ready main>.wrap{padding-top:8px}
  .mobile-workbench-v2496{display:grid;gap:9px;margin:0 0 12px;padding:12px;border:1px solid #dfe5ec;border-radius:18px;background:linear-gradient(180deg,#fff 0%,#fbfcfe 100%);box-shadow:0 5px 18px rgba(25,44,72,.055)}
  .mobile-workbench-v2496[hidden]{display:none!important}
  .mobile-workbench-v2496__head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:start}
  .mobile-workbench-v2496__identity{min-width:0}
  .mobile-workbench-v2496__eyebrow{display:block;margin-bottom:2px;color:#7d899a;font-size:9px;font-weight:850;letter-spacing:.075em;text-transform:uppercase}
  .mobile-workbench-v2496__title{margin:0;overflow:hidden;color:#17263b;font-size:19px;line-height:1.15;text-overflow:ellipsis}
  .mobile-workbench-v2496__subtitle{display:block;margin-top:4px;overflow:hidden;color:#6f7c8f;font-size:10.5px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
  .mobile-workbench-v2496__status{display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:4px 8px;border-radius:999px;background:#eef2f6;color:#526174;font-size:9.5px;font-weight:800;white-space:nowrap}
  .mobile-workbench-v2496__status[data-tone="success"]{background:#eaf8ef;color:#217a49}
  .mobile-workbench-v2496__status[data-tone="warn"]{background:#fff5df;color:#96660b}
  .mobile-workbench-v2496__status[data-tone="danger"]{background:#ffefed;color:#b8352b}

  .mobile-workbench-v2496__metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .mobile-workbench-v2496__metric{display:flex;min-width:0;min-height:55px;flex-direction:column;justify-content:center;padding:8px;border:1px solid #e6eaf0;border-radius:12px;background:#fff;color:inherit;text-decoration:none}
  .mobile-workbench-v2496__metric small{overflow:hidden;color:#8a95a5;font-size:8.5px;font-weight:760;text-overflow:ellipsis;white-space:nowrap}
  .mobile-workbench-v2496__metric strong{margin-top:4px;overflow:hidden;color:#26364c;font-size:12px;font-weight:820;line-height:1.15;text-overflow:ellipsis;white-space:nowrap}
  .mobile-workbench-v2496__metric em{margin-top:2px;overflow:hidden;color:#8a95a5;font-size:8px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}
  .mobile-workbench-v2496__metric[data-tone="danger"] strong{color:#b42318}.mobile-workbench-v2496__metric[data-tone="warn"] strong{color:#9a6708}.mobile-workbench-v2496__metric[data-tone="success"] strong{color:#18794e}

  .mobile-workbench-v2496__summary{position:relative;padding:10px 11px;border-radius:13px;background:#f4f7fb}
  .mobile-workbench-v2496__summary-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
  .mobile-workbench-v2496__summary-head strong{color:#536175;font-size:9px;font-weight:850;letter-spacing:.055em;text-transform:uppercase}
  .mobile-workbench-v2496__copy{min-height:30px;padding:5px 8px;border:0;border-radius:8px;background:#fff;color:#315b94;font:760 9px/1 system-ui;box-shadow:inset 0 0 0 1px #dde4ee}
  .mobile-workbench-v2496__summary p{margin:0;color:#34445a;font-size:11.5px;line-height:1.42}
  .mobile-workbench-v2496__summary p+p{margin-top:4px}

  .mobile-workbench-v2496__section-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .mobile-workbench-v2496__section-head strong{color:#536175;font-size:9px;font-weight:850;letter-spacing:.055em;text-transform:uppercase}
  .mobile-workbench-v2496__section-head a{color:#315c9c;font-size:9px;font-weight:760;text-decoration:none}
  .mobile-workbench-v2496__issues{display:grid;gap:5px}
  .mobile-workbench-v2496__issue{display:grid;grid-template-columns:4px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 8px 8px 5px;border:1px solid #e7ebf0;border-radius:12px;background:#fff}
  .mobile-workbench-v2496__issue-bar{align-self:stretch;border-radius:999px;background:#9ba7b6}.mobile-workbench-v2496__issue[data-tone="danger"] .mobile-workbench-v2496__issue-bar{background:#d92d20}.mobile-workbench-v2496__issue[data-tone="warn"] .mobile-workbench-v2496__issue-bar{background:#f79009}.mobile-workbench-v2496__issue[data-tone="info"] .mobile-workbench-v2496__issue-bar{background:#4b78c7}
  .mobile-workbench-v2496__issue-copy{display:flex;min-width:0;flex-direction:column}.mobile-workbench-v2496__issue-copy strong{overflow:hidden;color:#29394f;font-size:11.5px;text-overflow:ellipsis;white-space:nowrap}.mobile-workbench-v2496__issue-copy small{margin-top:2px;display:-webkit-box;overflow:hidden;color:#788599;font-size:9px;line-height:1.3;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .mobile-workbench-v2496__issue>a{display:flex;align-items:center;justify-content:center;min-height:34px;padding:6px 8px;border-radius:9px;background:#eef4ff;color:#2859a5;text-decoration:none;font-size:9px;font-weight:780;white-space:nowrap}
  .mobile-workbench-v2496__ok{display:flex;align-items:center;gap:7px;padding:8px 9px;border-radius:11px;background:#edf9f1;color:#28744a;font-size:10px;font-weight:720}.mobile-workbench-v2496__ok:before{content:'✓';display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#d8f2e2;font-weight:900}

  .mobile-workbench-v2496__relations{display:flex;gap:5px;overflow-x:auto;padding-bottom:1px;scrollbar-width:none}.mobile-workbench-v2496__relations::-webkit-scrollbar{display:none}
  .mobile-workbench-v2496__relation{display:inline-flex;align-items:center;gap:5px;min-height:36px;padding:7px 9px;border:1px solid #e2e7ee;border-radius:11px;background:#fff;color:#536175;text-decoration:none;white-space:nowrap}.mobile-workbench-v2496__relation strong{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#eef2f7;color:#34455d;font-size:9px}.mobile-workbench-v2496__relation span{font-size:9.5px;font-weight:740}

  .mobile-workbench-v2496__actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
  .mobile-workbench-v2496__action{display:flex;min-width:0;min-height:45px;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px;border:1px solid #e3e8ef;border-radius:11px;background:#fff;color:#526176;text-decoration:none;font-size:8.5px;font-weight:760;text-align:center}.mobile-workbench-v2496__action i{font-size:16px;font-style:normal;line-height:1}.mobile-workbench-v2496__action.primary{border-color:#d4e1f6;background:#edf4ff;color:#2458aa}

  .mobile-workbench-v2496__activity{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding-top:1px}
  .mobile-workbench-v2496__activity button{display:flex;min-width:0;min-height:42px;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px;border:0;border-radius:11px;background:#f1f4f8;color:#536175;font:740 8.5px/1.1 system-ui}.mobile-workbench-v2496__activity button span{font-size:15px}.mobile-workbench-v2496__activity button:first-child{background:#edf4ff;color:#275aa5}

  /* Existing desktop-only progressive layers remain suppressed; Workbench is their mobile projection. */
  .record-highlights-v2489,.record-attention-v2487,.record-summary-v2493,.record-context-rail-v2488{display:none!important}

  /* Move the existing Activity Composer into a bottom sheet instead of duplicating forms/endpoints. */
  html.mobile-composer-open-v2496,html.mobile-composer-open-v2496 body{overflow:hidden!important}
  .mobile-composer-sheet-v2496{position:fixed;inset:0;z-index:1400;display:grid;grid-template-rows:1fr auto}
  .mobile-composer-sheet-v2496[hidden]{display:none!important}
  .mobile-composer-sheet-v2496__backdrop{grid-row:1/3;grid-column:1;align-self:stretch;border:0;background:rgba(13,24,40,.42);backdrop-filter:blur(2px)}
  .mobile-composer-sheet-v2496__panel{position:relative;grid-row:2;grid-column:1;max-height:min(88vh,760px);overflow:auto;padding:8px 8px calc(12px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;background:#f7f9fc;box-shadow:0 -14px 42px rgba(15,25,42,.22)}
  .mobile-composer-sheet-v2496__handle{width:38px;height:4px;margin:0 auto 7px;border-radius:999px;background:#d4dbe4}
  .mobile-composer-sheet-v2496__head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 5px 8px}.mobile-composer-sheet-v2496__head>div{display:flex;min-width:0;flex-direction:column}.mobile-composer-sheet-v2496__head small{color:#8a95a5;font-size:8.5px;font-weight:820;text-transform:uppercase;letter-spacing:.05em}.mobile-composer-sheet-v2496__head strong{margin-top:2px;color:#27374d;font-size:15px}.mobile-composer-sheet-v2496__close{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:11px;background:#e9eef4;color:#5d6b7d;font:400 23px/1 system-ui}
  .mobile-composer-sheet-v2496__slot .crm-activity-composer-v2491{margin:0;border-radius:15px;box-shadow:none}.mobile-composer-sheet-v2496__slot .crm-activity-composer-panel{padding:10px}.mobile-composer-sheet-v2496__slot .crm-activity-composer-tabs{position:sticky;top:0;z-index:2;background:#f4f7fb}.mobile-composer-sheet-v2496__slot .crm-activity-composer-tab{flex:1;justify-content:center;min-width:84px}
  body.mobile-composer-open-v2496 .mobile-context-dock{display:none!important}

  /* Native workspace stays in the document as the source of truth, but its duplicated composer is hidden until opened as a sheet. */
  body.mobile-workbench-v2496-ready [data-crm-workspace][data-composer-v2491="ready"] .crm-activity-composer-v2491{display:none}
  body.mobile-composer-open-v2496 .mobile-composer-sheet-v2496__slot .crm-activity-composer-v2491{display:block}
}

@media(max-width:390px){
  .mobile-workbench-v2496{padding:10px;border-radius:16px}.mobile-workbench-v2496__metrics{gap:4px}.mobile-workbench-v2496__metric{padding:7px 6px}.mobile-workbench-v2496__metric strong{font-size:11px}.mobile-workbench-v2496__actions,.mobile-workbench-v2496__activity{gap:4px}.mobile-workbench-v2496__action,.mobile-workbench-v2496__activity button{font-size:8px}
}

@media(max-width:820px){
  /* v3 replaces the older template-specific mobile summary cards with one consistent workbench. */
  body.mobile-workbench-v2496-ready .mobile-focus-card{display:none!important}
  body.mobile-workbench-v2496-ready .org-hero{display:none!important}
}
