/* Owner-selected presentations share the same records, controls and handlers. */
.shop-layout-settings { grid-column:1 / -1; }
.shop-layout-settings > form { padding:24px; }
.shop-layout-settings fieldset { margin:0 0 24px; padding:0; border:0; }
.shop-layout-settings legend { margin-bottom:14px; font-size:16px; font-weight:700; }
.shop-layout-options { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.shop-layout-option { display:flex; flex-direction:column; position:relative; gap:10px; border:2px solid #dde3ed; border-radius:8px; padding:14px; cursor:pointer; background:#fff; }
.shop-layout-option:has(input:checked) { border-color:#4265c7; background:#f5f8ff; }
.shop-layout-option:focus-within { outline:3px solid #a6bafa; outline-offset:2px; }
.shop-layout-option > input { width:18px; height:18px; margin:0; align-self:flex-end; }
.shop-layout-option > strong { font-size:16px; }
.shop-layout-option > span:not(.shop-layout-mini) { font-size:14px; line-height:1.5; color:#536174; font-weight:400; }
.shop-layout-mini { height:100px; display:grid; grid-template-columns:20px repeat(3,1fr); grid-template-rows:16px 1fr 1fr; gap:5px; margin:0; background:#e9edf4; padding:7px; border:1px solid #d1d9e6; overflow:hidden; }
.shop-layout-mini i { grid-row:1/4; background:#20314b; }
.shop-layout-mini b { background:white; border-top:2px solid #7192d6; }
.shop-layout-mini b:first-of-type { grid-column:2/5; }
.shop-layout-mini--storefront { grid-template-columns:repeat(3,1fr); }
.shop-layout-mini--storefront i { grid-row:1; grid-column:1/4; background:#4265c7; }
.shop-layout-mini--storefront b:first-of-type { grid-column:auto; }
.shop-layout-mini--task-map { background:#f7f8fa; }
.shop-layout-mini--task-map i { background:#bcc4d2; }
.shop-layout-mini--task-map b { border:1px solid #879fc5; margin:3px; }
.shop-layout-mini--workshop { grid-template-columns:repeat(4,1fr); background:#172938; }
.shop-layout-mini--workshop i { grid-row:1; grid-column:1/5; background:#71b9b6; }
.shop-layout-mini--workshop b:first-of-type { grid-column:auto; }
.shop-layout-mini--command { background:#f1f3f5; }
.shop-layout-mini--command i { background:#0d1b29; }
.shop-work-order-choice { display:flex; gap:24px; flex-wrap:wrap; }
.shop-work-order-choice label { display:flex; align-items:flex-start; gap:10px; border:1px solid #dce3ed; border-radius:6px; padding:16px; flex:1 1 260px; }
.shop-work-order-choice input { width:18px; height:18px; }
.shop-work-order-choice strong,.shop-work-order-choice small { display:block; font-size:14px; line-height:1.5; }
.shop-work-order-choice small { font-weight:400; color:#617084; }
.shop-task-map { display:grid; gap:18px; margin-bottom:24px; }
.shop-task-map__group { background:white; border:1px solid #bfc8d6; }
.shop-task-map__group > h2 { margin:0; padding:12px 18px; background:#e5e8ee; border-bottom:1px solid #c5ccd7; font-size:16px; }
.shop-task-map__flow { display:flex; flex-wrap:wrap; padding:28px 20px; gap:28px; }
.shop-task-map__flow > button { position:relative; flex:1 1 130px; max-width:250px; min-width:0; border:0; padding:12px; background:white; color:#243c5a; cursor:pointer; text-align:center; }
.shop-task-map__flow > button:hover { background:#f0f5ff; }
.shop-task-map__flow > button + button::before { content:''; position:absolute; right:calc(100% - 7px); top:35px; width:42px; height:1px; background:#a9b9cf; }
.shop-task-map__flow strong,.shop-task-map__flow small { display:block; margin-top:10px; }
.shop-task-map__flow strong { font-size:14px; text-decoration:underline; }
.shop-task-map__flow small { font-size:12px; line-height:1.5; color:#617188; }
.shop-task-map__number { display:inline-grid; place-items:center; width:42px; height:42px; border:1px solid #a8bed8; border-radius:8px; color:#416d98; font-size:18px; }
.shop-launch-grid,.shop-bay-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:24px; }
.shop-launch-grid > button,.shop-bay-strip > button { display:flex; flex-direction:column; gap:8px; padding:18px; border:1px solid #dbe3f0; border-radius:8px; background:white; color:#233651; text-align:left; cursor:pointer; }
.shop-launch-grid strong { font-size:18px; }
.shop-launch-grid span { font-size:14px; line-height:1.5; color:#65748a; }
.shop-bay-strip strong { font-size:16px; }
.shop-bay-strip span { font-size:14px; }
.shop-workshop-board { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.shop-workshop-lane { padding:14px; border:1px solid #d8e1e7; background:#e8eef2; border-radius:8px; }
.shop-workshop-lane > header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 0 14px; }
.shop-workshop-lane h2 { margin:0; font-size:16px; }
.shop-workshop-lane header > span { padding:3px 8px; background:white; border-radius:4px; font-weight:700; }
.shop-workshop-job { margin-bottom:12px; padding:16px; background:white; border:1px solid #d8e1e7; border-left:3px solid #3b9291; border-radius:6px; }
.shop-workshop-job > span { font-size:13px; color:#367272; font-weight:700; }
.shop-workshop-job h3 { margin:10px 0 6px; font-size:16px; line-height:1.4; }
.shop-workshop-job p { margin:6px 0; font-size:14px; }
.shop-workshop-job small { display:block; font-size:12px; color:#63727f; margin-bottom:16px; }
.shop-workshop-job button { width:100%; white-space:normal; }
.shop-workshop-empty { padding:28px 6px; color:#667986; font-size:14px; text-align:center; }
.ticket-sheet-heading { display:none; }
[data-ticket-form][data-presentation="sheet"] .ticket-sheet-heading { display:block; grid-column:1/-1; margin:0 0 16px; padding:14px 0 10px; border-bottom:2px solid #cedae9; font-size:20px; }
[data-ticket-form][data-presentation="sheet"] > [data-ticket-panel] { scroll-margin-top:140px; }
[data-ticket-form][data-presentation="sheet"] .ticket-workflow-tabs { border-bottom:0; }
.ticket-workflow-tabs .ticket-presentation-toggle { margin-left:auto; border:1px solid #9cacc5; }
body[data-shop-layout="task-map"] { --canvas:#f2f4f7; --sidebar-width:200px; }
body[data-shop-layout="task-map"] .portal-sidebar { background:#dce1e9; color:#253753; }
body[data-shop-layout="task-map"] .nav-item { color:#2f4059; }
body[data-shop-layout="task-map"] .nav-item.is-active { background:#c2cee1; }
body[data-shop-layout="task-map"] .nav-heading { color:#58677e; }
body[data-shop-layout="task-map"] .portal-sidebar__footer span { color:#34455f; }
body[data-shop-layout="task-map"] .panel,body[data-shop-layout="task-map"] .metric-card { box-shadow:none; border-color:#c3ccda; }
body[data-shop-layout="command"] { --sidebar-width:246px; --canvas:#f4f6f8; --navy-900:#101e2b; }
body[data-shop-layout="command"] .workspace-header h1 { font-family:Georgia,serif; font-size:32px; font-weight:500; }
body[data-shop-layout="command"] .panel,body[data-shop-layout="command"] .metric-card { border-radius:10px; }
body[data-shop-layout="command"] .metric-card { border-top:0; border-left:3px solid #536fce; }
body[data-shop-layout="command"] .metric-card:nth-child(2) { border-left-color:#c29542; }
body[data-shop-layout="command"] .metric-card:nth-child(3) { border-left-color:#438880; }
body[data-shop-layout="command"] .metric-card:nth-child(4) { border-left-color:#8671b3; }
body[data-shop-layout="workshop"] { --canvas:#f0f5f6; --navy-900:#183440; --blue-700:#246e74; --blue-600:#297d82; }
body[data-shop-layout="workshop"] .workspace-header { border-bottom:3px solid #4c9fa2; }
body[data-shop-layout="storefront"] { --canvas:#f7f9ff; --blue-700:#4367c9; --blue-600:#5175da; }
body[data-shop-layout="storefront"] .portal-topbar { background:#fff; color:#1e304b; border-top:6px solid #14233b; }
body[data-shop-layout="storefront"] .portal-topbar .button { color:#3659a4; border-color:#d1dcf0; }
body[data-shop-layout="storefront"] .panel,body[data-shop-layout="storefront"] .metric-card { border-radius:12px; border-color:#e0e7f4; }
body[data-shop-layout="storefront"] .workspace-header { padding-top:30px; padding-bottom:28px; background:#eef3ff; }
body[data-shop-layout="storefront"] .workspace-header h1 { font-size:30px; letter-spacing:-.03em; }
@media(min-width:1001px) {
  body[data-shop-layout="storefront"] .portal-layout { display:flex; flex-direction:column; }
  body[data-shop-layout="storefront"] .portal-sidebar { flex:none; padding:8px 24px; background:white; border-bottom:1px solid #dce3f1; overflow:visible; }
  body[data-shop-layout="storefront"] .portal-sidebar nav { display:flex; flex-wrap:wrap; gap:4px; }
  body[data-shop-layout="storefront"] .portal-sidebar .nav-heading,body[data-shop-layout="storefront"] .portal-sidebar__footer { display:none; }
  body[data-shop-layout="storefront"] .nav-item { width:auto; color:#23334f; padding:9px 12px; }
  body[data-shop-layout="storefront"] .nav-item.is-active { color:white; background:#4469cd; }
  body[data-shop-layout="storefront"] .portal-workspace { flex:1; overflow:auto; }
  body[data-shop-layout="storefront"] .workspace-content { max-width:1600px; margin:auto; }
}
@media(max-width:1200px) { .shop-layout-options { grid-template-columns:repeat(3,minmax(0,1fr)); } .shop-workshop-board { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) {
  .shop-layout-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .shop-layout-settings > form { padding:16px; }
  .shop-task-map__flow { flex-wrap:wrap; padding:12px; gap:12px; }
  .shop-task-map__flow > button { flex:1 1 40%; }
  .shop-task-map__flow > button + button::before { display:none; }
  .shop-launch-grid,.shop-bay-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .shop-workshop-board { grid-template-columns:1fr; }
  .ticket-workflow-tabs .ticket-presentation-toggle { margin-left:0; }
}
@media(max-width:420px) { .shop-layout-options { grid-template-columns:1fr; } }
/* The full accounting client keeps its own task windows inside this shop. */
.shop-office-frame { width:100%; height:max(760px,calc(100vh - 290px)); border:1px solid #cbd5e1; background:white; border-radius:8px; margin-top:16px; }
/* Accounting already supplies the selected layout's tools and record navigation. */
body[data-workspace-view="office"] .workspace-content { display:block; max-width:none; }
body[data-workspace-view="office"] .layout-workspace-tools,
body[data-workspace-view="office"] .shop-task-map--section,
body[data-workspace-view="office"] .context-search { display:none; }
body[data-workspace-view="office"] .shop-office-frame { display:block; min-height:650px; height:calc(100dvh - 260px); }

/* Every section uses its selected workspace composition, including subtabs. */
.layout-workspace-tools { margin:0 0 22px; padding:22px; border:1px solid #d9e2ee; background:#fff; border-radius:10px; min-width:0; }
.layout-workspace-tools h2 { margin:7px 0 18px; font-size:20px; line-height:1.25; }
.layout-workspace-tools h3 { margin:24px 0 10px; font-size:12px; letter-spacing:.06em; color:#627187; text-transform:uppercase; }
.layout-section-actions { display:grid; gap:10px; }
.layout-section-actions button,.layout-section-index button { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; border:1px solid #dce4ef; border-radius:6px; background:#f8faff; color:#263e5a; cursor:pointer; text-align:left; line-height:1.4; min-width:0; }
.layout-section-actions button:hover,.layout-section-index button:hover { background:#eaf0fc; border-color:#b4c6e8; }
.layout-section-actions button:disabled { opacity:.45; cursor:not-allowed; }
.layout-section-actions strong { font-size:14px; }
.layout-section-actions span { font-size:12px; color:#60789d; }
.layout-section-index { display:grid; gap:5px; }
.layout-section-index button { border:0; background:transparent; padding:10px 0; font-size:13px; }
body[data-shop-layout="task-map"] .workspace-content > .workspace-section-tabs { display:none; }
body[data-shop-layout="task-map"] .workspace-section-tabs { border-radius:0; background:#e8ecf2; }
body[data-shop-layout="task-map"] .workspace-content .panel > header { background:#e3e7ed; padding:12px 18px; }
body[data-shop-layout="task-map"] .workspace-content table tbody tr:nth-child(even) { background:#fffcf1; }
body[data-shop-layout="task-map"] dialog { border-radius:0; }
body[data-shop-layout="task-map"] dialog fieldset { border-radius:0; background:#fcfcfd; }

/* Storefront: horizontal categories, action cards and a catalog of records. */
.layout-workspace-tools--storefront { background:linear-gradient(120deg,#edf3ff,#fff); padding:26px 30px; }
.layout-workspace-tools--storefront .layout-section-actions { grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); }
.layout-workspace-tools--storefront .layout-section-actions button { min-height:82px; background:#fff; padding:17px; align-items:flex-start; flex-direction:column; box-shadow:0 4px 14px #263e5a07; }
body[data-shop-layout="storefront"] .workspace-section-tabs { padding:12px; gap:10px; border:0; background:transparent; }
body[data-shop-layout="storefront"] .workspace-section-tabs button { border:1px solid #dce4f3; border-radius:22px; padding:10px 18px; background:#fff; }
body[data-shop-layout="storefront"] .workspace-section-tabs button.is-active,body[data-shop-layout="storefront"] .workspace-section-tabs button[aria-selected="true"] { background:#4265c7; color:#fff; }
body[data-shop-layout="storefront"] table[data-layout-table="records"] { width:100%; table-layout:auto; border-collapse:separate; display:block; min-width:0; }
body[data-shop-layout="storefront"] table[data-layout-table="records"] thead { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
body[data-shop-layout="storefront"] table[data-layout-table="records"] tbody { display:grid; grid-template-columns:repeat(auto-fill,minmax(275px,1fr)); gap:18px; padding:20px; }
body[data-shop-layout="storefront"] table[data-layout-table="records"] tbody > tr { display:flex; flex-direction:column; gap:0; border:1px solid #dbe4f4; border-radius:12px; padding:18px; background:#fff; box-shadow:0 5px 20px #21375407; min-width:0; }
body[data-shop-layout="storefront"] table[data-layout-table="records"] td { display:flex; flex-wrap:wrap; gap:5px 12px; align-items:center; justify-content:space-between; padding:8px 0; border:0; text-align:left; white-space:normal; overflow-wrap:anywhere; }
body[data-shop-layout="storefront"] table[data-layout-table="records"] td[data-column-label]::before { content:attr(data-column-label); font-size:11px; color:#7b879c; letter-spacing:.025em; }
body[data-shop-layout="storefront"] table[data-layout-table="records"] td:first-child { padding-bottom:14px; margin-bottom:6px; border-bottom:1px solid #edf0f6; font-size:17px; font-weight:700; }
body[data-shop-layout="storefront"] table[data-layout-table="records"] tr:has(td[colspan]) { grid-column:1/-1; }
body[data-shop-layout="storefront"] dialog { border-radius:16px; border-color:#d7e1f5; }
body[data-shop-layout="storefront"] dialog fieldset { border:1px solid #dce5f4; border-radius:12px; background:#f9fbff; padding:22px; }
body[data-shop-layout="storefront"] dialog input,body[data-shop-layout="storefront"] dialog select,body[data-shop-layout="storefront"] dialog textarea { border-radius:7px; }

/* Command: a working document with a persistent contextual control rail. */
body[data-shop-layout="command"] .workspace-content { display:grid; grid-template-columns:minmax(0,1fr) 250px; gap:20px; align-items:start; }
body[data-shop-layout="command"] .workspace-content > * { grid-column:1; min-width:0; margin-bottom:0; }
body[data-shop-layout="command"] .workspace-content > .layout-workspace-tools { grid-column:2; position:sticky; top:18px; padding:20px; margin:0; }
body[data-shop-layout="command"] .workspace-section-tabs { border:1px solid #dce2e9; border-radius:8px; padding:7px; background:white; }
body[data-shop-layout="command"] .panel > header { padding:22px; }
body[data-shop-layout="command"] table thead { background:#f3f5f8; }
body[data-shop-layout="command"] table tbody tr:hover { background:#f6f8fc; }
body[data-shop-layout="command"] dialog { border-radius:12px; box-shadow:0 30px 110px #10203133; }
body[data-shop-layout="command"] dialog fieldset { border-radius:8px; border:1px solid #dde3eb; background:white; }

/* Workshop: large tools and row cards keep records usable at the bay. */
.layout-workspace-tools--workshop { position:sticky; top:0; z-index:8; border:0; border-left:4px solid #348c92; background:#e2eff0; display:flex; gap:24px; align-items:center; padding:16px 20px; }
.layout-workspace-tools--workshop h2 { margin:5px 0 0; font-size:18px; min-width:145px; }
.layout-workspace-tools--workshop .layout-section-actions { display:flex; flex:1; gap:10px; overflow-x:auto; padding:4px; }
.layout-workspace-tools--workshop .layout-section-actions button { min-height:52px; min-width:150px; flex:1; background:#fff; border-color:#bad1d4; }
body[data-shop-layout="workshop"] .workspace-section-tabs { display:flex; flex-wrap:wrap; gap:10px; background:transparent; padding:8px 0; border:0; }
body[data-shop-layout="workshop"] .workspace-section-tabs button { min-height:46px; padding:12px 20px; border:1px solid #c2d6d9; border-radius:6px; background:white; }
body[data-shop-layout="workshop"] .panel { border-radius:8px; border-color:#cedde0; box-shadow:none; }
body[data-shop-layout="workshop"] .panel > header { border-left:4px solid #62a4a6; padding:18px; }
body[data-shop-layout="workshop"] table[data-layout-table="records"] { display:block; min-width:0; }
body[data-shop-layout="workshop"] table[data-layout-table="records"] thead { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
body[data-shop-layout="workshop"] table[data-layout-table="records"] tbody { display:grid; gap:12px; padding:16px; }
body[data-shop-layout="workshop"] table[data-layout-table="records"] tr { display:flex; align-items:stretch; flex-wrap:wrap; border:1px solid #cbdde0; border-left:4px solid #458f93; background:#fff; border-radius:6px; padding:12px; }
body[data-shop-layout="workshop"] table[data-layout-table="records"] td { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; flex:1 1 125px; gap:5px; padding:10px 12px; border:0; text-align:left; white-space:normal; }
body[data-shop-layout="workshop"] table[data-layout-table="records"] td::before { content:attr(data-column-label); font-size:11px; color:#627d82; text-transform:uppercase; letter-spacing:.03em; }
body[data-shop-layout="workshop"] .button,body[data-shop-layout="workshop"] dialog button { min-height:42px; }
body[data-shop-layout="workshop"] dialog { border-radius:8px; border:2px solid #5a9d9f; }
body[data-shop-layout="workshop"] dialog fieldset { border:1px solid #c4d9dc; border-left:4px solid #5b9fa2; border-radius:6px; padding:20px; }
body[data-shop-layout="workshop"] dialog input,body[data-shop-layout="workshop"] dialog select { min-height:42px; }
@media(max-width:1200px){ body[data-shop-layout="command"] .workspace-content { grid-template-columns:minmax(0,1fr) 210px; } }
@media(max-width:900px){ body[data-shop-layout="command"] .workspace-content { display:block; } body[data-shop-layout="command"] .workspace-content > .layout-workspace-tools { position:static; margin-bottom:18px; } .layout-workspace-tools--command .layout-section-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } .layout-workspace-tools--command .layout-section-index { display:flex; flex-wrap:wrap; gap:8px 16px; } .layout-workspace-tools--workshop { position:static; flex-direction:column; align-items:stretch; } }
@media(max-width:600px){.layout-workspace-tools { padding:16px; } body[data-shop-layout="storefront"] table[data-layout-table="records"] tbody { grid-template-columns:1fr; padding:12px; } .layout-workspace-tools--storefront .layout-section-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } .layout-workspace-tools--storefront .layout-section-actions button { min-height:72px; padding:12px; } }
.shop-icon { flex:none; vertical-align:middle; color:currentColor; }
.portal-sidebar .nav-item { gap:10px; }
.portal-sidebar .nav-item .shop-icon { width:18px; height:18px; opacity:.85; }
.portal-sidebar .nav-item > span { flex:1; }
.shop-task-map__icon { display:grid; place-items:center; width:44px; height:44px; color:#4789a8; }
.shop-task-map__icon .shop-icon { width:30px; height:30px; }
.layout-section-actions .shop-icon { color:#527f9b; }
.shop-launch-grid .shop-icon { margin-bottom:10px; }
.workspace-module-tabs { display:flex; flex-wrap:wrap; gap:5px; padding:10px 24px; border-bottom:1px solid #dae1eb; background:white; }
.workspace-module-tabs button { display:flex; align-items:center; gap:8px; min-height:38px; padding:8px 15px; border:0; border-radius:5px; background:transparent; color:#65738a; font:600 13px inherit; cursor:pointer; }
.workspace-module-tabs button.is-active { color:#234f87; background:#eaf1fc; box-shadow:inset 0 -2px #507bb1; }
body[data-shop-layout="classic"] .workspace-module-tabs { background:#f7f9fc; }
body[data-shop-layout="task-map"] .workspace-module-tabs { background:#e7eaf0; padding:6px 20px; }
body[data-shop-layout="task-map"] .workspace-module-tabs button { border-radius:0; }
body[data-shop-layout="storefront"] .workspace-module-tabs { justify-content:center; padding:14px 20px; border:0; background:#f5f8ff; }
body[data-shop-layout="storefront"] .workspace-module-tabs button { border:1px solid #dae2f5; border-radius:24px; padding:10px 22px; background:white; }
body[data-shop-layout="command"] .workspace-module-tabs { padding-left:32px; background:#f4f6f9; }
body[data-shop-layout="workshop"] .workspace-module-tabs button { min-height:46px; border:1px solid #bcd4d6; border-radius:6px; }
.shop-layout-settings .form-status:not(:empty) { padding:14px; border:1px solid #e5b3aa; background:#fff3ee; color:#8e2c20; border-radius:6px; }
.portal-topbar .portal-layout-context { display:flex; flex-direction:column; gap:6px; align-items:center; border-right:1px solid #ffffff24; padding-right:18px; margin-right:6px; color:#c2d5ed; }
.portal-layout-context > span { font-size:12px; white-space:nowrap; }
.portal-topbar__search > label > .shop-icon { position:absolute; left:14px; z-index:1; width:18px; color:#6a7b92; pointer-events:none; }
.portal-topbar__search input { padding-left:42px; min-height:42px; box-shadow:none; font-size:14px; }
.portal-account-menu { position:relative; }
.portal-account-menu summary { display:flex; gap:9px; align-items:center; cursor:pointer; padding:10px 14px; border:1px solid #ffffff35; border-radius:6px; font-size:14px; }
.portal-account-menu summary::-webkit-details-marker { display:none; }
.portal-account-menu__items { position:absolute; z-index:70; right:0; top:calc(100% + 9px); min-width:200px; display:flex; flex-direction:column; gap:8px; padding:12px; color:#25374f; background:white; box-shadow:0 12px 40px #17253c30; border:1px solid #d8e0ec; border-radius:8px; }
.portal-topbar .portal-account-menu__items .text-link,.portal-topbar .portal-account-menu__items .button { display:block; padding:12px; text-align:left; color:#273d62; border:0; background:#f4f7fb; font-size:14px; }
.portal-topbar__brand { padding:12px 20px; }
.portal-topbar .portal-brand strong { font-size:15px; }
.portal-topbar .portal-topbar__context strong { font-size:15px; }
.portal-topbar__context small { font-size:12px; }
body[data-shop-layout="classic"] .portal-topbar { min-height:78px; grid-template-columns:var(--sidebar-width) minmax(270px,1fr) minmax(240px,480px) auto; background:#14273f; border-bottom:3px solid #456f9e; }
body[data-shop-layout="task-map"] .portal-topbar { grid-template-areas:"brand context actions" "brand search actions"; grid-template-columns:var(--sidebar-width) minmax(0,1fr) auto; background:#e3e7ee; color:#24364e; border-top:5px solid #384b65; border-bottom:1px solid #bbc6d6; }
body[data-shop-layout="task-map"] .portal-topbar__context { padding:8px 20px 0; }
body[data-shop-layout="task-map"] .portal-topbar__context small { display:none; }
body[data-shop-layout="task-map"] .portal-topbar__search { padding:5px 20px 10px; max-width:780px; }
body[data-shop-layout="task-map"] .portal-topbar__search input { min-height:32px; }
body[data-shop-layout="task-map"] .portal-layout-context { flex-direction:row; color:#476387; border-color:#bec9d8; }
body[data-shop-layout="task-map"] .portal-account-menu summary { border-color:#b6c2d4; background:#f5f7fa; border-radius:2px; }
body[data-shop-layout="task-map"] .portal-brand small { color:#64778d; }
body[data-shop-layout="storefront"] .portal-topbar { grid-template-areas:"brand search actions" "context context context"; grid-template-columns:230px minmax(200px,780px) auto; justify-content:center; padding-top:10px; border-top:5px solid #182b46; box-shadow:none; }
body[data-shop-layout="storefront"] .portal-topbar__context { justify-content:center; border-top:1px solid #e9eef7; background:#f4f7fd; margin-top:8px; padding:7px 20px; }
body[data-shop-layout="storefront"] .portal-topbar__context > span:not(.portal-layout-context) { display:flex; align-items:center; gap:15px; }
body[data-shop-layout="storefront"] .portal-layout-context { flex-direction:row; color:#496cc0; border-color:#d3ddef; }
body[data-shop-layout="storefront"] .portal-topbar__context small { color:#657a99; }
body[data-shop-layout="storefront"] .portal-account-menu summary { border-color:#d6dff0; border-radius:24px; }
body[data-shop-layout="storefront"] .portal-topbar__brand { border:0; }
body[data-shop-layout="storefront"] .portal-brand small { color:#7888a0; }
body[data-shop-layout="command"] .portal-topbar { grid-template-columns:var(--sidebar-width) minmax(290px,1fr) minmax(230px,480px) auto; color:#283b54; background:white; border-bottom:1px solid #dce3eb; min-height:80px; }
body[data-shop-layout="command"] .portal-topbar__brand { color:white; background:#101e2b; }
body[data-shop-layout="command"] .portal-layout-context { color:#4d6689; border-color:#dbe3ed; }
body[data-shop-layout="command"] .portal-topbar__context small { color:#7b8a9e; }
body[data-shop-layout="command"] .portal-account-menu summary { border-color:#dce3ee; }
body[data-shop-layout="command"] .portal-topbar__search input { background:#f6f8fb; border-color:#e2e7ef; }
body[data-shop-layout="workshop"] .portal-topbar { grid-template-areas:"brand context actions" "brand search search"; grid-template-columns:var(--sidebar-width) minmax(220px,1fr) auto; background:#14323d; border-bottom:4px solid #5ca4a4; }
body[data-shop-layout="workshop"] .portal-topbar__brand { align-items:flex-start; padding-top:24px; }
body[data-shop-layout="workshop"] .portal-layout-context { flex-direction:row; color:#9fd4d1; }
body[data-shop-layout="workshop"] .portal-topbar__search { padding:0 18px 12px; max-width:980px; }
body[data-shop-layout="workshop"] .portal-topbar__context small { display:none; }
.shop-task-map__icon { margin:auto; }
.workspace-module-tabs button { font-family:inherit; font-size:14px; font-weight:600; }
@media(max-width:1150px){body[data-shop-layout] .portal-topbar { grid-template-areas:"brand context actions" "search search search"; grid-template-columns:190px minmax(0,1fr) auto; }body[data-shop-layout] .portal-topbar__search { max-width:none; padding:8px 16px; }body[data-shop-layout] .portal-topbar__context { margin:0; border:0; }body[data-shop-layout] .portal-layout-context { display:none; }}
@media(max-width:700px){body[data-shop-layout] .portal-topbar { grid-template-areas:"brand actions" "context context" "search search"; grid-template-columns:minmax(0,1fr) auto; }body[data-shop-layout] .portal-topbar__brand { padding:10px 14px; }body[data-shop-layout] .portal-topbar__context { padding:7px 14px; }body[data-shop-layout] .portal-topbar__context strong { font-size:14px; }body[data-shop-layout] .portal-account-menu summary { padding:8px; }body[data-shop-layout] .portal-account-menu summary span { display:none; }.workspace-module-tabs { padding:8px 12px; }.workspace-module-tabs button { padding:8px 10px; } }
.portal-sidebar .nav-item { display:grid; grid-template-columns:20px minmax(0,1fr) auto; column-gap:10px; padding:10px 12px; min-height:44px; font-size:14px; line-height:1.4; }
.portal-sidebar .nav-item > span { min-width:0; white-space:normal; overflow:visible; overflow-wrap:break-word; text-align:left; }
.portal-sidebar .nav-item > .shop-icon { grid-column:1; grid-row:1; align-self:center; }
.portal-sidebar .nav-item > span { grid-column:2; }
.portal-sidebar .nav-item > strong { grid-column:3; }
.workspace-content,.workspace-content > *,.panel,.panel > header,.settings-grid { min-width:0; }
.layout-section-actions button strong,.shop-task-map__flow strong { white-space:normal; overflow-wrap:break-word; }
.portal-context-controls { flex-wrap:wrap; min-width:0; }
.portal-context-controls select { max-width:100%; }
body[data-shop-layout="task-map"] .portal-topbar .button--quiet { color:#334d6f; border-color:#b9c7da; background:#f7f9fc; }
body:is([data-shop-layout="task-map"],[data-shop-layout="storefront"]) .portal-menu-button { color:#263e59; border-color:#aebdd0; background:#f7f9fc; }
/* Keep each composition aligned without squeezing navigation or hiding labels. */
@media(min-width:1001px) {
  body[data-shop-layout="storefront"] .portal-sidebar nav { max-width:1544px; margin-inline:auto; justify-content:center; }
  body[data-shop-layout="storefront"] .workspace-header { padding-inline:max(28px,calc((100% - 1544px) / 2)); }
  body[data-shop-layout="storefront"] .portal-topbar { grid-template-columns:230px minmax(200px,1034px) 180px; }
}
.shop-task-map__flow { justify-content:center; }
.portal-topbar > *, .portal-topbar__context > *, .portal-topbar__search > label { min-width:0; }
.portal-topbar__context strong { overflow-wrap:anywhere; }
.portal-sidebar .nav-item { overflow:visible; }
.workspace-section-tabs, .form-actions, .panel > header { flex-wrap:wrap; }
.workspace-section-tabs button, .workspace-module-tabs button { white-space:normal; overflow-wrap:break-word; }
/* One page scroller uses the actual header height, including wrapping and zoom. */
.portal-workspace { scroll-padding-block:20px; }
.workspace-content { padding-bottom:40px; }
.portal-layout, .portal-workspace { min-width:0; }
.portal-dialog .dialog-body { scroll-padding-block:16px 90px; }
.portal-dialog .record-form-workspace { min-height:0; }
.portal-dialog .record-form-panel > .form-grid,
.portal-dialog .record-detail-panel > .record-detail-content { max-height:none; overflow:visible; }
.portal-dialog .record-form-tabs button { display:grid; grid-template-columns:24px minmax(0,1fr); gap:4px 9px; }
.portal-dialog .record-form-tabs button > .shop-icon { grid-row:1 / span 2; margin-top:2px; }
.portal-dialog .record-form-tabs button > span { font-size:14px; }
.portal-dialog .record-form-tabs button > small { grid-column:2; font-size:12px; line-height:1.45; }
.portal-dialog .record-form-panel > header .eyebrow { font-size:14px; letter-spacing:0; }
.portal-dialog .record-form-panel > header p { font-size:13px; }
.portal-dialog .field-note { font-size:12px; }
.portal-dialog .form-actions { position:sticky; z-index:4; bottom:-22px; margin:18px -22px -22px; padding:16px 22px; background:white; box-shadow:0 -3px 14px #172c4210; }
.portal-dialog .form-actions > div { min-width:0; }
.portal-dialog .record-form-panel { scroll-margin-block:16px; }
body[data-shop-layout="classic"] .record-form-tabs { background:#edf2f8; }
body[data-shop-layout="classic"] .record-form-panel > header { background:#f4f7fb; }
body[data-shop-layout="task-map"] .record-form-workspace { grid-template-columns:minmax(0,1fr); }
body[data-shop-layout="task-map"] .record-form-tabs { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); border-right:0; border-bottom:1px solid #c7d0de; padding:16px; background:#f8f9fb; }
body[data-shop-layout="task-map"] .record-form-tabs button { grid-template-columns:minmax(0,1fr); justify-items:center; text-align:center; padding:14px; border-left:0; border-bottom:3px solid transparent; }
body[data-shop-layout="task-map"] .record-form-tabs button .shop-icon { grid-row:auto; width:30px; height:30px; color:#4789a8; margin-bottom:7px; }
body[data-shop-layout="task-map"] .record-form-tabs button small { grid-column:1; }
body[data-shop-layout="task-map"] .record-form-tabs button.is-active { border-bottom-color:#4789a8; }
.record-form-workspace[data-record-presentation="sheet"] { display:block; border:0; background:transparent; }
.record-form-workspace[data-record-presentation="sheet"] > .record-form-tabs { display:flex; flex-direction:row; flex-wrap:wrap; gap:8px; padding:0 0 18px; border:0; background:transparent; }
.record-form-workspace[data-record-presentation="sheet"] > .record-form-tabs button { display:flex; align-items:center; gap:9px; width:auto; padding:11px 15px; border:1px solid #d3dfed; background:white; }
.record-form-workspace[data-record-presentation="sheet"] > .record-form-tabs button small { display:none; }
.record-form-workspace[data-record-presentation="sheet"] > .record-form-panels { display:grid; gap:22px; }
.record-form-workspace[data-record-presentation="sheet"] .record-form-panel { border:1px solid #dce5f0; border-radius:10px; background:white; }
body[data-shop-layout="storefront"] .portal-dialog--wide { width:min(1100px,calc(100vw - 30px)); }
body[data-shop-layout="storefront"] .portal-dialog .dialog-body { background:#f5f8ff; }
body[data-shop-layout="storefront"] .record-form-tabs button { border-radius:24px; }
body[data-shop-layout="storefront"] .record-form-panel > header { border-radius:10px 10px 0 0; padding:20px 24px; background:#edf3ff; }
body[data-shop-layout="storefront"] .record-form-panel > .form-grid { padding:24px; gap:20px; }
body[data-shop-layout="command"] .portal-dialog:not(.portal-dialog--compact):not(.portal-dialog--workspace):not(.portal-dialog--nested) { inset:12px 12px 12px auto; margin:0; height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); width:min(1180px,calc(100vw - 24px)); }
body[data-shop-layout="command"] .portal-dialog:not(.portal-dialog--compact):not(.portal-dialog--workspace):not(.portal-dialog--nested) .dialog-card { height:100%; max-height:100%; }
body[data-shop-layout="command"] .record-form-workspace { grid-template-columns:190px minmax(0,1fr); }
body[data-shop-layout="command"] .record-form-tabs { background:#182a3b; }
body[data-shop-layout="command"] .record-form-tabs button { color:#d6e3f3; }
body[data-shop-layout="command"] .record-form-tabs button small { color:#a5b8ce; }
body[data-shop-layout="command"] .record-form-tabs button.is-active,body[data-shop-layout="command"] .record-form-tabs button:hover { color:#1d3553; }
body[data-shop-layout="command"] .record-form-tabs button.is-active small { color:#526b86; }
body[data-shop-layout="workshop"] .record-form-panel { border-left:4px solid #458f93; }
body[data-shop-layout="workshop"] .record-form-panel > header { background:#e6f0f0; }
body[data-shop-layout="workshop"] .record-form-panel input,body[data-shop-layout="workshop"] .record-form-panel select { min-height:46px; font-size:16px; }
/* Team records are a directory, catalog, control list or shift board by layout. */
.team-card > *, .team-card h2 { min-width:0; overflow-wrap:anywhere; }
.team-card__actions { flex-wrap:wrap; gap:12px; }
body[data-shop-layout="task-map"] .team-grid { grid-template-columns:1fr; gap:0; border:1px solid #c9d2de; }
body[data-shop-layout="task-map"] .team-card { grid-template-columns:44px minmax(180px,1fr) minmax(180px,auto); border:0; border-bottom:1px solid #dbe1e9; padding:14px 18px; align-items:center; }
body[data-shop-layout="task-map"] .team-card:nth-child(even) { background:#fffcf1; }
body[data-shop-layout="task-map"] .team-card__actions { grid-column:3; border:0; padding:0; justify-content:flex-end; }
body[data-shop-layout="task-map"] .team-card .avatar { width:40px; height:40px; background:#e6eef5; color:#427190; }
body[data-shop-layout="storefront"] .team-grid { grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:22px; }
body[data-shop-layout="storefront"] .team-card { grid-template-columns:1fr; text-align:center; justify-items:center; padding:28px 24px 20px; border-radius:14px; box-shadow:0 6px 20px #28498108; }
body[data-shop-layout="storefront"] .team-card .avatar { border-radius:50%; width:64px; height:64px; background:#edf2ff; color:#4567bd; font-size:22px; }
body[data-shop-layout="storefront"] .team-card__actions { width:100%; margin-top:8px; }
body[data-shop-layout="command"] .team-grid { grid-template-columns:1fr; gap:12px; }
body[data-shop-layout="command"] .team-card { grid-template-columns:52px minmax(0,1fr) auto; align-items:center; border-radius:8px; border-left:3px solid #4f73af; }
body[data-shop-layout="command"] .team-card__actions { grid-column:3; border:0; padding:0; }
body[data-shop-layout="command"] .team-card .avatar { border-radius:9px; }
body[data-shop-layout="workshop"] .team-grid { grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:18px; }
body[data-shop-layout="workshop"] .team-card { border-radius:8px; border-top:5px solid #729093; padding:22px; }
body[data-shop-layout="workshop"] .team-card:has(.status-pill--clocked_in) { border-top-color:#278269; }
body[data-shop-layout="workshop"] .team-card__actions .button { flex:1; min-height:48px; font-size:16px; }
body[data-shop-layout="workshop"] .team-card .avatar { border-radius:6px; background:#e0eded; color:#286b70; }
@media(max-width:1240px) { body[data-shop-layout] .portal-topbar__context { display:flex; } }
@media(max-width:820px) {
  body[data-shop-layout] .portal-topbar { position:relative; }
  body[data-shop-layout] .portal-sidebar { inset:0 auto 0 0; padding-top:18px; }
  body.portal-nav-open::before { inset:0; }
  body[data-shop-layout] .portal-context-controls { display:flex; }
  .portal-dialog .record-form-workspace { display:block; }
  .portal-dialog .record-form-tabs { flex-direction:row; flex-wrap:wrap; border:0; }
  .portal-dialog .record-form-tabs button { width:auto; flex:1 1 145px; }
  .portal-dialog .record-form-tabs button small { display:none; }
  .portal-dialog .form-grid { grid-template-columns:1fr; }
  .portal-dialog .field-span-2,.portal-dialog .field-span-3 { grid-column:1/-1; }
  body[data-shop-layout] .team-card { grid-template-columns:48px minmax(0,1fr); }
  body[data-shop-layout] .team-card__actions { grid-column:1/-1; }
  body[data-shop-layout="storefront"] .team-card { grid-template-columns:1fr; }
  body[data-shop-layout="command"] .record-form-tabs { background:#edf2f7; }
  body[data-shop-layout="command"] .record-form-tabs button { color:#1d3553; }
}
@media(max-width:700px) {
  body[data-shop-layout] .portal-topbar__context { flex-wrap:wrap; gap:8px; }
  body[data-shop-layout] .portal-topbar__context > span:not(.portal-layout-context) { flex-wrap:wrap; }
  body[data-shop-layout] .portal-context-controls { width:100%; margin:0; }
  body[data-shop-layout] .portal-context-controls select { flex:1; min-width:0; }
  .shop-task-map__flow > button { max-width:none; }
  .layout-section-actions, .layout-workspace-tools--storefront .layout-section-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workspace-content .form-grid, .workspace-content .settings-grid { grid-template-columns:1fr; }
}

/* One shell for service and accounting. The editor owns only its content area. */
body.integrated-accounting .portal-workspace { display:flex; flex-direction:column; overflow:hidden; }
body.integrated-accounting .workspace-header,body.integrated-accounting .workspace-module-tabs { flex:none; }
body.integrated-accounting .workspace-content { display:flex!important; flex:1; min-height:0; max-width:none!important; width:100%; margin:0!important; padding:0!important; }
body.integrated-accounting .shop-office-frame { display:block; flex:1; width:100%; min-width:0; height:100%!important; min-height:0!important; border:0; border-radius:0; margin:0; }
body[data-shop-layout="task-map"] { --sidebar-width:250px; }
.portal-sidebar .nav-item > span { overflow-wrap:normal; word-break:normal; hyphens:none; }
.portal-sidebar .nav-item { grid-template-columns:20px minmax(min-content,1fr) auto; }
.portal-loading { min-height:100dvh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; text-align:center; padding:32px; background:radial-gradient(ellipse at top,#e9f1fa,#f9fbfd 65%); color:#263d56; }
.portal-loading[hidden] { display:none; }
.portal-loading h1 { margin:0; font:600 clamp(24px,4vw,34px)/1.2 system-ui; }
.portal-loading p { max-width:420px; margin:0; color:#60758b; }
.portal-loading__mark { display:block; width:96px; height:96px; margin-bottom:12px; object-fit:contain; }
/* Phone and tablet screens use the same bounded shell and one page scroller. */
body.portal-session-active { overflow:hidden; }
body.portal-session-active .portal-app { display:flex; flex-direction:column; height:100dvh; min-height:0; overflow:hidden; }
body.portal-session-active .portal-topbar { flex:0 0 auto; }
body.portal-session-active .portal-layout { flex:1 1 auto; height:auto; min-height:0; }
body.portal-session-active .portal-workspace { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
body.portal-session-active.integrated-accounting .portal-workspace { overflow:hidden; scrollbar-gutter:auto; }
@media(min-width:1001px){body[data-shop-layout="storefront"] .portal-sidebar .nav-item { font-size:13px; column-gap:8px; padding:9px; }}
@media(max-width:820px){body.integrated-accounting .workspace-header { padding:14px 16px; }body.integrated-accounting .workspace-header p { display:none; }body.integrated-accounting .workspace-header h1 { font-size:23px; }.workspace-module-tabs { gap:4px; }.portal-workspace { scroll-padding:12px; }}
@media(max-width:700px) {
  body.integrated-accounting .workspace-header { gap:0; min-height:auto; }
  body.integrated-accounting .workspace-header .workspace-actions:empty { display:none; }
  body.integrated-accounting .workspace-module-tabs { display:grid; grid-template-columns:repeat(auto-fit,minmax(100px,1fr)); overflow:visible; padding:8px 12px; }
  body.integrated-accounting .workspace-module-tabs button { min-width:0; padding:8px; white-space:normal; justify-content:center; text-align:center; font-size:13px; }
  body[data-shop-layout] .portal-topbar__context:has(.portal-context-controls) > span:not(.portal-layout-context) { display:none; }
  body[data-shop-layout] .portal-topbar__brand { gap:10px; }
  [data-ticket-form] .ticket-workflow-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
  [data-ticket-form] .ticket-workflow-tabs button { min-width:0; flex-wrap:wrap; padding:8px; }
  [data-ticket-form] .ticket-workflow-tabs .ticket-presentation-toggle { grid-column:1/-1; }
  [data-ticket-form] > .form-actions { bottom:0; margin:18px 0 0; padding:10px; gap:0; width:auto; }
  [data-ticket-form] > .form-actions > div:first-child { display:none; }
  [data-ticket-form] > .form-actions > div:last-child { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  [data-ticket-form] > .form-actions .button { min-width:0; white-space:normal; padding:10px 6px; }
}

/* Compact shared chrome: one identity row, one navigation row where needed. */
body[data-shop-layout] .portal-topbar { grid-template-areas:"brand context search actions"; grid-template-columns:var(--sidebar-width) minmax(200px,1fr) minmax(210px,440px) auto; min-height:60px; padding:0; border-top:0; }
body[data-shop-layout] .portal-topbar__brand { padding:8px 16px; align-items:center; }
body[data-shop-layout] .portal-brand__mark { width:34px; height:34px; }
body[data-shop-layout] .portal-brand small { font-size:10px; }
body[data-shop-layout] .portal-topbar__context { margin:0; border:0; padding:8px 16px; background:transparent; gap:12px; justify-content:flex-start; }
body[data-shop-layout] .portal-topbar__context > span:not(.portal-layout-context) { display:block; }
body[data-shop-layout] .portal-topbar__context small { display:none; }
body[data-shop-layout] .portal-layout-context { display:none; }
body[data-shop-layout] .portal-topbar__search { padding:8px 16px; max-width:none; }
body[data-shop-layout] .portal-topbar__search input { min-height:36px; height:36px; }
body[data-shop-layout] .portal-account-menu summary { padding:8px 12px; }
body[data-shop-layout] .workspace-header { padding:14px 28px; min-height:0; gap:12px; align-items:center; }
body[data-shop-layout] .workspace-header .eyebrow { display:none; }
body[data-shop-layout] .workspace-header h1 { margin:0; font-size:24px; line-height:1.3; }
body[data-shop-layout] .workspace-header p { margin:4px 0 0; font-size:13px; line-height:1.4; }
body[data-shop-layout] .workspace-module-tabs { padding:5px 24px; gap:4px; }
body[data-shop-layout] .workspace-module-tabs button { min-height:32px; padding:6px 12px; font-size:13px; }
body[data-shop-layout] .workspace-content { padding-top:18px; }
body[data-shop-layout=storefront] .portal-topbar { grid-template-columns:220px minmax(200px,500px) minmax(220px,580px) auto; }
body[data-shop-layout=storefront] .portal-sidebar nav { padding:3px 16px; }
body[data-shop-layout=storefront] .portal-sidebar .nav-item { min-height:38px; padding:8px 12px; }
body[data-shop-layout=storefront] .workspace-header { padding-inline:max(24px,calc((100% - 1544px) / 2)); }
body[data-shop-layout=command] .workspace-content { display:block; position:relative; }
body[data-shop-layout=command] .workspace-content:has(>.layout-workspace-tools) { padding-right:290px; }
body[data-shop-layout=command] .workspace-content > * { margin-bottom:16px; }
body[data-shop-layout=command] .workspace-content > .layout-workspace-tools { position:absolute; top:18px; right:28px; width:238px; margin:0; }
body[data-shop-layout=command] .workspace-content > .layout-workspace-tools h3 { margin-top:0; }
body[data-shop-layout=task-map] .shop-task-map { gap:12px; margin-bottom:18px; }
body[data-shop-layout=task-map] .shop-task-map__flow { padding:12px 16px; gap:14px; }
body[data-shop-layout=task-map] .shop-task-map__flow small { display:none; }
body[data-shop-layout=task-map] .shop-task-map__flow > button { padding:8px; }
body[data-shop-layout=task-map] .shop-task-map__group > h2 { padding:8px 16px; font-size:14px; }
body[data-shop-layout] .portal-sidebar .nav-item > span { word-break:normal; overflow-wrap:normal; hyphens:none; }
body[data-shop-layout] .portal-sidebar { --sidebar-width:248px; }
body[data-shop-layout] .shop-work-order-choice { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.shop-work-order-choice label:has(input:checked) { border-color:var(--blue-600); background:var(--blue-050); }
.shop-work-order-choice .shop-icon { margin-bottom:8px; color:var(--blue-600); }
@media(max-width:1100px) {
 body[data-shop-layout] .portal-topbar { grid-template-areas:"brand context actions" "search search search"; grid-template-columns:210px minmax(0,1fr) auto; }
 body[data-shop-layout] .portal-topbar__search { padding:0 16px 8px; }
 body[data-shop-layout] .shop-work-order-choice { grid-template-columns:repeat(3,minmax(0,1fr)); }
 body[data-shop-layout=command] .workspace-content:has(>.layout-workspace-tools) { padding-right:24px; }
 body[data-shop-layout=command] .workspace-content > .layout-workspace-tools { position:static; width:auto; }
 .layout-workspace-tools--command .layout-section-index { display:flex; flex-wrap:wrap; gap:12px; }
}
@media(max-width:700px) {
 body[data-shop-layout] .portal-topbar { grid-template-areas:"brand actions" "context context" "search search"; grid-template-columns:minmax(0,1fr) auto; }
 body[data-shop-layout] .portal-topbar__context { padding:4px 14px; }
 body[data-shop-layout] .portal-topbar__context strong { font-size:13px; }
 body[data-shop-layout] .workspace-header { padding:12px 16px; flex-wrap:wrap; }
 body[data-shop-layout] .workspace-header h1 { font-size:21px; }
 body[data-shop-layout] .workspace-header p { display:none; }
 body[data-shop-layout] .workspace-module-tabs { padding:5px 12px; }
 body[data-shop-layout] .shop-work-order-choice { grid-template-columns:1fr; }
}

/* Bay editors share one form and financial workflow, with five independent compositions. */
body[data-shop-layout] .portal-dialog { inset:0; margin:auto; max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); }
/* The shell cannot scroll: section anchors and focus must only move the form. */
body[data-shop-layout] .portal-dialog--workspace { inset:0; margin:auto; width:calc(100vw - 32px); max-width:1800px; height:calc(100dvh - 32px); max-height:calc(100dvh - 32px); border-radius:10px; padding:0; overflow:clip; }
body[data-shop-layout] .portal-dialog--workspace .dialog-card { height:100%; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); }
body[data-shop-layout] .portal-dialog--workspace .dialog-card > header { position:static; min-height:0; padding:12px 20px; }
body[data-shop-layout] .portal-dialog--workspace .dialog-card > header .eyebrow { display:none; }
body[data-shop-layout] .portal-dialog--workspace .dialog-card > header h2 { font-size:21px; margin:0; }
/* Keep absolute form helpers inside this scrolling containing block. */
body[data-shop-layout] .portal-dialog--workspace .dialog-body { position:relative; min-height:0; overflow:auto; overscroll-behavior:contain; padding:16px 20px 0; }
body[data-shop-layout] [data-ticket-form] { max-width:none; margin:0; display:block; }
body[data-shop-layout] .ticket-workspace-nav { position:static; top:auto; padding:0; border:0; margin:0 0 16px; background:transparent; box-shadow:none; }
body[data-shop-layout] .ticket-workspace-nav__lower { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:12px; }
body[data-shop-layout] .ticket-bay-shortcuts { padding:0; margin:0; flex:none; }
.bay-layout-name { color:var(--blue-700); font-weight:600; font-size:13px; margin-left:auto; }
.bay-save-note { font-size:12px; color:var(--ink-500); }
body[data-shop-layout] .ticket-workflow-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:0; overflow:visible; }
body[data-shop-layout] .ticket-workflow-tabs > button { justify-content:flex-start; min-width:0; min-height:56px; text-align:left; padding:10px 14px; white-space:normal; }
body[data-shop-layout] .ticket-workflow-tabs > button > span { display:block; font-size:14px; }
body[data-shop-layout] .ticket-workflow-tabs > button > span > small { display:block; background:none; color:var(--ink-500); padding:0; margin-bottom:3px; font-size:11px; }
body[data-shop-layout] .ticket-workflow-tabs [data-service-ready-badge] { display:none; }
.ticket-work-sections { min-width:0; display:grid; gap:16px; }
.ticket-work-section { min-width:0; border:1px solid var(--line-200); background:white; padding:18px; border-radius:8px; }
.ticket-work-section > [data-ticket-panel] { min-width:0; margin:0 0 14px; }
body[data-shop-layout] .ticket-work-section fieldset { padding:14px; margin:0 0 14px; }
.bay-section-heading { display:none; }
body[data-shop-layout] [data-ticket-form] > .form-status:empty { display:none; }
body[data-shop-layout] [data-ticket-form] > .form-status:not(:empty) { padding:12px; margin:12px 0; }
body[data-shop-layout] .bay-workspace-footer { position:sticky; bottom:0; z-index:10; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:12px 0; margin:16px 0 0; border-top:1px solid var(--line-200); background:var(--paper); box-shadow:0 -8px 12px #25354805; }
body[data-shop-layout] .bay-workspace-footer > div { display:flex; flex-wrap:wrap; gap:8px; }
/* Complete sheet has a reading width and section anchors. */
[data-ticket-form][data-presentation=sheet] .ticket-work-sections { max-width:1280px; margin:auto; }
[data-ticket-form][data-presentation=sheet] .ticket-work-section { scroll-margin-top:16px; }
/* Split view keeps customer context next to the current work. */
[data-ticket-form][data-presentation=split] .ticket-work-sections { grid-template-columns:minmax(290px,.7fr) minmax(0,1.8fr); align-items:start; }
[data-ticket-form][data-presentation=split] [data-bay-section=customer] { position:sticky; top:0; }
body[data-shop-layout] [data-presentation=split] [data-bay-section=customer] .form-grid { grid-template-columns:minmax(0,1fr); }
body[data-shop-layout] [data-presentation=split] [data-bay-section=customer] .form-grid > * { grid-column:auto; }
/* Wide fields must span the actual rail, never create an implicit second column. */
body[data-shop-layout] .portal-dialog--workspace [data-ticket-form][data-presentation=split] [data-ticket-panel=customer] > .form-grid > .field-wide { grid-column:1/-1; }
/* Board lanes expand the selected section; all lanes remain discoverable. */
[data-ticket-form][data-presentation=board] .ticket-workflow-tabs { display:none; }
[data-ticket-form][data-presentation=board] .ticket-work-sections { grid-template-columns:repeat(4,minmax(0,1fr)); align-items:start; }
[data-ticket-form][data-presentation=board] .ticket-work-section { padding:0; border-top:3px solid var(--blue-600); background:var(--blue-050); }
[data-ticket-form][data-presentation=board] .bay-section-heading { display:flex; flex-wrap:wrap; width:100%; gap:8px; align-items:center; padding:18px; text-align:left; border:0; background:transparent; color:var(--ink-900); cursor:pointer; }
[data-ticket-form][data-presentation=board] .bay-section-heading span { flex-basis:100%; color:var(--ink-500); font-size:12px; }
[data-ticket-form][data-presentation=board] .ticket-work-section.is-expanded { grid-column:1/-1; grid-row:2; padding-bottom:14px; }
[data-ticket-form][data-presentation=board] .ticket-work-section > [data-ticket-panel] { margin:0 14px 14px; }
/* Technician Focus uses a vertical step rail and one spacious panel. */
body[data-shop-layout] [data-ticket-form][data-presentation=focus] { display:grid; grid-template-columns:220px minmax(0,1fr); gap:16px; align-items:start; }
[data-ticket-form][data-presentation=focus] > :not(.ticket-workspace-nav):not(.ticket-work-sections) { grid-column:1/-1; }
[data-ticket-form][data-presentation=focus] .ticket-workspace-nav { position:sticky; top:0; grid-column:1; }
[data-ticket-form][data-presentation=focus] .ticket-workspace-nav__lower { flex-direction:column; align-items:stretch; }
[data-ticket-form][data-presentation=focus] .ticket-bay-shortcuts { display:grid; grid-template-columns:1fr 1fr; }
[data-ticket-form][data-presentation=focus] .bay-layout-name { margin-left:0; }
[data-ticket-form][data-presentation=focus] .bay-save-note { display:none; }
body[data-shop-layout] [data-ticket-form][data-presentation=focus] .ticket-workflow-tabs { grid-template-columns:1fr; }
[data-ticket-form][data-presentation=focus] .ticket-work-sections { grid-column:2; }
@media(max-width:1000px) {
 body[data-shop-layout] [data-ticket-form][data-presentation=focus] { grid-template-columns:180px minmax(0,1fr); }
 [data-ticket-form][data-presentation=split] .ticket-work-sections { grid-template-columns:1fr; }
 [data-ticket-form][data-presentation=split] [data-bay-section=customer] { position:static; }
 body[data-shop-layout] [data-presentation=split] [data-bay-section=customer] .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
 body[data-shop-layout] .portal-dialog--workspace { width:100%; height:100dvh; max-width:100%; max-height:100dvh; border-radius:0; }
 body[data-shop-layout] .portal-dialog--workspace .dialog-body { padding:12px 12px 0; }
 body[data-shop-layout] .ticket-workflow-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body[data-shop-layout] .ticket-workflow-tabs > button { padding:8px; }
 body[data-shop-layout] [data-ticket-form][data-presentation=focus] { display:block; }
 [data-ticket-form][data-presentation=focus] .ticket-workspace-nav { position:static; }
 body[data-shop-layout] [data-ticket-form][data-presentation=focus] .ticket-workflow-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
 [data-ticket-form][data-presentation=focus] .ticket-bay-shortcuts { grid-template-columns:repeat(4,1fr); }
 [data-ticket-form][data-presentation=board] .ticket-work-sections { grid-template-columns:repeat(2,minmax(0,1fr)); }
 [data-ticket-form][data-presentation=board] .ticket-work-section.is-expanded { grid-row:3; }
 .ticket-work-section { padding:10px; }
 .bay-save-note { display:none; }
 body[data-shop-layout] [data-ticket-form] .form-grid { grid-template-columns:1fr; }
 body[data-shop-layout] [data-ticket-form] .form-grid > * { grid-column:auto; }
 body[data-shop-layout] .portal-dialog--workspace [data-ticket-form] [data-ticket-panel=customer] > .form-grid > .field-wide { grid-column:1/-1; }
 body[data-shop-layout] .bay-workspace-footer { position:static; }
}
body[data-shop-layout=task-map]:not(.integrated-accounting):not([data-workspace-view=orders]) [data-workspace-actions] > :not([data-action="close-page-task"]):not([data-setup-return]) { display:none; }
/* Accounting uses the Service title/actions row; no second navigation shell. */
body.integrated-accounting .workspace-header { min-height:50px; padding:8px 24px; gap:12px; align-items:center; }
body.integrated-accounting .workspace-header :is(.eyebrow,[data-workspace-description]) { display:none; }
body.integrated-accounting .workspace-header h1 { margin:0; font-size:22px; line-height:1.35; }
body.integrated-accounting [data-workspace-actions] { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
body.integrated-accounting [data-workspace-actions] button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:6px 10px; }
body.integrated-accounting [data-workspace-actions] svg { width:16px; height:16px; flex:none; }
.office-work-switcher select { width:auto; max-width:270px; min-height:32px; padding:5px 8px; }
body.integrated-accounting .workspace-module-tabs { padding-top:3px; padding-bottom:3px; }
/* The title and tools follow the same centered measure as the Storefront forms. */
body[data-shop-layout=storefront].integrated-accounting .workspace-header { padding-inline:max(24px,calc((100% - 1440px) / 2)); }
body[data-shop-layout=storefront].integrated-accounting .workspace-header > div:first-child { flex:1; min-width:0; }
@media(max-width:700px){body.integrated-accounting .workspace-header { padding:8px 12px; flex-wrap:wrap; }body.integrated-accounting .workspace-header h1 { font-size:19px; }.office-work-switcher select { max-width:180px; }}

/* One centered measure for Storefront pages, accounting and their headings. */
body[data-shop-layout=storefront] {--service-content-width:100%;}
body[data-shop-layout=storefront] .workspace-header {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr);
  align-items:center;
  padding-inline:max(24px,calc((100% - var(--service-content-width)) / 2));
}
body[data-shop-layout=storefront] .workspace-header > div:first-child {grid-column:2;min-width:0;text-align:center;}
body[data-shop-layout=storefront] .workspace-header [data-workspace-actions] {grid-column:3;min-width:0;justify-content:flex-end;}
body[data-shop-layout=storefront] .workspace-header h1 {overflow-wrap:break-word;}
body[data-shop-layout=storefront] .workspace-header p {margin-inline:auto;}
body[data-shop-layout=storefront]:not(.integrated-accounting) .portal-workspace {scrollbar-gutter:stable both-edges;}
body[data-shop-layout=storefront]:not(.integrated-accounting) .workspace-content {width:100%;max-width:none;padding-inline:24px;margin-inline:auto;}
body[data-shop-layout=storefront] .workspace-section-tabs {justify-content:center;}
body[data-shop-layout=storefront] .workspace-content :is(.panel > header,.layout-workspace-tools > header) {justify-content:center;flex-wrap:wrap;text-align:center;}
body[data-shop-layout=storefront] .workspace-content :is(.panel > header,.layout-workspace-tools > header) > div {flex:1 1 100%;}
body[data-shop-layout=storefront] .workspace-content :is(h2,h3) {text-align:center;}
body[data-shop-layout=storefront] .portal-dialog > .dialog-header {justify-content:center;text-align:center;}
body[data-shop-layout=storefront] .portal-dialog .record-form-panel > header {text-align:center;}
@media(max-width:1100px) {
  body[data-shop-layout=storefront] .workspace-header {grid-template-columns:minmax(0,1fr);gap:6px;padding-inline:16px;}
  body[data-shop-layout=storefront] .workspace-header > div:first-child,
  body[data-shop-layout=storefront] .workspace-header [data-workspace-actions] {grid-column:1;justify-content:center;}
}
@media(max-width:650px) {
  body[data-shop-layout=storefront]:not(.integrated-accounting) .workspace-content {padding-inline:12px;}
}

/* Wholesale ordering owns its records and stages. Generic table-to-card rules
   must not impose row heights or nested page scrollers on this workspace. */
body[data-workspace-view=orders] .workspace-content {min-height:0;}
body[data-shop-layout][data-workspace-view=orders] .workspace-content > .orders-workspace-tabs {display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px;}
.wholesale-record-section,.wholesale-order-shell {container:wholesale / inline-size;min-width:0;}
.wholesale-section-note {margin:0 0 16px;color:var(--ink-500);font-size:13px;line-height:1.5;}
.wholesale-record-list {display:grid;gap:12px;min-width:0;}
.wholesale-record-list > article {display:grid;grid-template-columns:minmax(200px,1fr) minmax(400px,2fr) auto;align-items:center;gap:20px;padding:18px;border:1px solid var(--line-200);background:white;min-width:0;height:auto;}
.wholesale-record-identity {display:flex;align-items:center;gap:12px;min-width:0;}
.wholesale-record-identity > .shop-icon {flex:none;color:var(--blue-700);}
.wholesale-record-identity strong {display:block;font-size:16px;overflow-wrap:anywhere;}
.wholesale-record-identity small {display:block;font-size:11px;line-height:1.5;color:var(--ink-500);margin-top:4px;}
.wholesale-record-list dl {display:grid;grid-template-columns:1.4fr 1.2fr .6fr 1fr;gap:12px;margin:0;min-width:0;}
.wholesale-record-list dl > div {min-width:0;}
.wholesale-record-list dt {font-size:11px;color:var(--ink-500);margin-bottom:6px;}
.wholesale-record-list dd {margin:0;font-size:13px;line-height:1.5;overflow-wrap:anywhere;}
.wholesale-record-total {font-weight:750;color:var(--navy-800);}
.wholesale-record-list .button {gap:8px;}
.wholesale-history-list > article {grid-template-columns:minmax(200px,1fr) minmax(400px,2fr);}
body[data-shop-layout=task-map] .wholesale-record-list > article {border-left:4px solid #698dae;background:#fbfcfe;}
body[data-shop-layout=command] .wholesale-record-list > article {border-radius:8px;box-shadow:0 2px 8px #13294008;}
body[data-shop-layout=workshop] .wholesale-record-list > article {border-left:5px solid #7c989c;border-radius:6px;}
body[data-shop-layout=workshop] .wholesale-record-list > article.is-awaiting {border-left-color:#bc832d;}
body[data-shop-layout=storefront] .wholesale-section-note {text-align:center;max-width:840px;margin:0 auto 18px;}
body[data-shop-layout=storefront] .wholesale-record-list {display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;}
body[data-shop-layout=storefront] .wholesale-record-list > article {display:flex;flex:0 1 310px;flex-direction:column;align-items:stretch;gap:18px;border-radius:14px;padding:22px;height:auto;}
body[data-shop-layout=storefront] .wholesale-record-identity {justify-content:center;text-align:center;}
body[data-shop-layout=storefront] .wholesale-record-list dl {grid-template-columns:repeat(2,minmax(0,1fr));text-align:center;gap:18px 10px;border-block:1px solid var(--line-100);padding:18px 0;}
body[data-shop-layout=storefront] .wholesale-record-list .button {margin-top:auto;justify-content:center;}

.order-draft-bar {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 24px;padding:12px 0 16px;color:var(--ink-500);font-size:12px;}
.order-draft-bar > span {display:flex;gap:8px;align-items:center;}
[data-order-summary] {display:flex;flex-wrap:wrap;gap:10px 24px;align-items:center;}
[data-order-summary] strong {color:var(--ink-900);}
.wholesale-order-grid {display:grid;gap:18px;align-items:start;grid-template-columns:minmax(0,1fr);grid-template-areas:"catalog" "basket" "checkout";}
.order-stage {min-width:0;border:1px solid var(--line-200);background:#fff;}
.order-stage--catalog {grid-area:catalog;}
.order-stage--basket {grid-area:basket;}
.order-stage--checkout {grid-area:checkout;}
.order-stage > header {display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line-100);min-height:0;background:var(--paper-100);}
.order-stage h2 {margin:0;font-size:16px;line-height:1.4;}
.order-stage-number {display:inline-grid;place-items:center;flex:none;width:26px;height:26px;border:1px solid var(--line-200);background:#fff;font-weight:750;color:var(--blue-700);font-size:12px;}
.order-catalog-search {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:16px 18px;margin:0;}
.order-catalog-search > label {min-width:0;}
.order-catalog-search .button {gap:7px;}
.order-stage [data-order-results] {padding:0 18px 18px;}
.order-catalog-empty {display:grid;justify-items:center;gap:10px;padding:30px 18px;text-align:center;color:var(--ink-500);}
.order-catalog-empty > .shop-icon {width:28px;height:28px;color:var(--blue-700);}
.order-catalog-empty strong {color:var(--ink-900);font-size:15px;}
.order-catalog-empty p {margin:0;max-width:480px;font-size:13px;line-height:1.6;}
.wholesale-order-shell .order-product-grid {margin:0;gap:12px;background:transparent;border:0;}
.wholesale-order-shell .order-product-grid article {min-height:0;border:1px solid var(--line-200);gap:16px;padding:14px;}
.wholesale-order-shell .order-product-summary {grid-template-columns:64px minmax(0,1fr);gap:12px;}
.wholesale-order-shell .order-product-image {width:64px;height:64px;}
.wholesale-order-shell .order-product-grid article > div:first-child strong {overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.45;}
.wholesale-order-shell .order-product-grid small {font-size:11px;}
.wholesale-order-shell .order-product-grid label {width:80px;max-width:100%;}
.wholesale-order-shell .order-product-grid label span {font-size:11px;}
.wholesale-order-shell .order-product-grid article > div:last-child > b {font-size:18px;}
.wholesale-order-shell .order-product-grid .button {white-space:normal;min-height:36px;padding:8px 12px;}
.order-stage [data-order-cart] {padding:16px 18px;}
.wholesale-order-shell .portal-order-cart {border:0;}
.wholesale-order-shell .portal-order-cart > article {padding:12px 0;}
.wholesale-order-shell .portal-order-cart__copy strong {font-size:13px;line-height:1.5;}
.wholesale-order-shell .portal-order-cart small {font-size:11px;}
.wholesale-order-shell .portal-order-cart .empty-state {min-height:0;padding:24px 8px;gap:8px;}
.wholesale-order-shell .portal-order-cart .empty-state p {margin:0;font-size:13px;line-height:1.6;}
.wholesale-order-shell .portal-order-total {border:0;border-top:1px solid var(--line-200);padding:14px 0 0;background:transparent;}
.wholesale-order-shell .portal-order-total small {font-size:11px;line-height:1.5;}
.order-stage [data-order-checkout] {padding:18px;}
.order-checkout-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.order-checkout-fields > label {display:grid;gap:6px;min-width:0;font-size:12px;}
.order-checkout-fields .order-notes-field,.order-checkout-fields .fulfillment-choice {grid-column:1/-1;}
.order-checkout-fields :is(input,select,textarea) {max-width:100%;width:100%;}
.order-checkout-fields textarea {resize:vertical;min-height:76px;}
.order-checkout-fields .fulfillment-choice {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;padding:12px;border-color:var(--line-200);}
.order-checkout-fields .fulfillment-choice legend {font-size:12px;}
.order-checkout-fields .fulfillment-choice label {display:flex;min-width:0;padding:10px;gap:8px;border:1px solid var(--line-200);border-radius:4px;cursor:pointer;}
.order-checkout-fields .fulfillment-choice label:has(input:checked) {background:var(--blue-050);border-color:var(--blue-600);color:var(--blue-700);}
.order-checkout-fields .fulfillment-choice input {width:16px;height:16px;min-height:0;flex:none;margin:0;}
.order-checkout-fields .fulfillment-choice span {display:flex;align-items:center;gap:8px;}
.order-submit-area {display:grid;gap:12px;margin-top:16px;}
.order-submit-area p {margin:0;color:var(--ink-500);font-size:12px;line-height:1.6;}
.order-submit-area .button {justify-content:center;white-space:normal;min-height:42px;height:auto;padding:10px 16px;}
.order-submit-area .form-status:empty {display:none;}
.order-step-actions {display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:14px 18px;border-top:1px solid var(--line-100);}
.order-step-nav {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 18px;border:1px solid var(--line-200);background:#fff;}
.order-step-nav button {display:flex;gap:12px;align-items:center;min-width:0;padding:18px;border:0;border-bottom:3px solid transparent;color:var(--ink-700);background:transparent;cursor:pointer;text-align:left;}
.order-step-nav button.is-active {background:var(--blue-050);border-bottom-color:var(--blue-700);}
.order-step-nav b {display:grid;place-items:center;width:30px;height:30px;flex:none;border:1px solid var(--line-200);border-radius:50%;}
.order-step-nav strong,.order-step-nav small {display:block;}
.order-step-nav strong {font-size:14px;}
.order-step-nav small {margin-top:4px;font-size:11px;line-height:1.5;color:var(--ink-500);}
.wholesale-order-shell [hidden],.wholesale-record-list [hidden] {display:none!important;}
.wholesale-order-shell .restock-edit-banner {margin:0 0 16px;}

/* Classic: full-width lookup rows, order ledger, then a compact checkout sheet. */
.wholesale-order-shell--classic .order-product-grid {grid-template-columns:1fr;gap:0;}
.wholesale-order-shell--classic .order-product-grid article {display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.8fr);border-bottom:0;align-items:center;}
.wholesale-order-shell--classic .order-product-grid article:last-child {border-bottom:1px solid var(--line-200);}
.wholesale-order-shell--classic .order-product-grid article > div:last-child {grid-template-columns:auto minmax(0,1fr) 70px auto;align-items:center;}
.wholesale-order-shell--classic .order-product-grid article > div:last-child > small {grid-column:auto;}
.wholesale-order-shell--classic .portal-order-cart > article {grid-template-columns:minmax(0,1fr) 84px 110px 80px;grid-template-areas:"copy quantity total remove";gap:20px;}
.wholesale-order-shell--classic .order-checkout-fields {grid-template-columns:repeat(3,minmax(0,1fr));}
.wholesale-order-shell--classic .order-checkout-fields .fulfillment-choice {grid-column:auto;grid-row:1/3;align-self:start;}
.wholesale-order-shell--classic .order-notes-field {grid-column:2/-1;}
.wholesale-order-shell--classic .order-submit-area {grid-template-columns:minmax(0,1fr) auto;align-items:center;}

/* Task Map: persistent fields in three focused steps with explicit navigation. */
.wholesale-order-shell--task-map .order-stage > header {background:#e4eaf1;}
.wholesale-order-shell--task-map .wholesale-order-grid {display:block;}
.wholesale-order-shell--task-map .order-product-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));}
.wholesale-order-shell--task-map .order-checkout-fields,.wholesale-order-shell--task-map .order-submit-area {max-width:860px;margin-inline:auto;}
.wholesale-order-shell--task-map .order-stage--basket [data-order-cart] {max-width:980px;margin-inline:auto;}

/* Storefront: centered product browsing above the basket and checkout. */
.wholesale-order-shell--storefront .wholesale-order-grid {grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"catalog catalog" "basket checkout";gap:22px;}
.wholesale-order-shell--storefront .order-draft-bar {justify-content:center;flex-direction:column;padding-top:0;text-align:center;}
.wholesale-order-shell--storefront [data-order-summary] {justify-content:center;}
.wholesale-order-shell--storefront .order-stage {border-radius:14px;}
.wholesale-order-shell--storefront .order-stage > header {justify-content:center;text-align:center;background:transparent;padding:18px;border-radius:14px 14px 0 0;}
.wholesale-order-shell--storefront .order-stage-number {border-radius:50%;background:var(--blue-050);}
.wholesale-order-shell--storefront .order-catalog-search {max-width:880px;margin:auto;}
.wholesale-order-shell--storefront .order-product-grid {display:flex;flex-wrap:wrap;justify-content:center;gap:16px;}
.wholesale-order-shell--storefront .order-product-grid article {flex:0 1 280px;border-radius:12px;}
.wholesale-order-shell--storefront .order-product-summary {display:flex;flex-direction:column;text-align:center;}
.wholesale-order-shell--storefront .order-product-image {width:96px;height:96px;border:0;}
.wholesale-order-shell--storefront .order-checkout-fields .fulfillment-choice legend {margin:auto;}
.wholesale-order-shell--storefront .order-checkout-fields label > span {text-align:center;}
.wholesale-order-shell--storefront .order-submit-area {text-align:center;}
.wholesale-order-shell--storefront .order-checkout-fields :is(input,select,textarea),.wholesale-order-shell--storefront .button {border-radius:8px;}

/* Command: dense live catalog beside a basket and checkout rail. */
.wholesale-order-shell--command .wholesale-order-grid {grid-template-columns:minmax(0,1.5fr) minmax(340px,1fr);grid-template-areas:"catalog basket" "catalog checkout";}
.wholesale-order-shell--command .order-stage {border-radius:8px;}
.wholesale-order-shell--command .order-stage > header {background:#f3f6fa;border-radius:8px 8px 0 0;}
.wholesale-order-shell--command .order-draft-bar {background:#1c2b41;color:#e2e9f2;padding:16px 20px;margin-bottom:16px;border-radius:8px;}
.wholesale-order-shell--command [data-order-summary] strong {color:#fff;}
.wholesale-order-shell--command .order-product-grid {grid-template-columns:1fr;}
.wholesale-order-shell--command .order-product-grid article {display:grid;grid-template-columns:minmax(0,1fr) 190px;border-radius:6px;gap:12px;}
.wholesale-order-shell--command .order-product-summary {grid-template-columns:48px minmax(0,1fr);}
.wholesale-order-shell--command .order-product-image {width:48px;height:48px;}
.wholesale-order-shell--command .order-checkout-fields {grid-template-columns:1fr;}

/* Workshop Board: catalog, basket and receiving details in separate work lanes. */
.wholesale-order-shell--workshop .wholesale-order-grid {grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"catalog basket checkout";gap:14px;}
.wholesale-order-shell--workshop .order-stage {background:#f4f8f8;border-radius:7px;border-top:4px solid #6c9097;}
.wholesale-order-shell--workshop .order-stage--basket {border-top-color:#c29342;}
.wholesale-order-shell--workshop .order-stage--checkout {border-top-color:#38877d;}
.wholesale-order-shell--workshop .order-stage > header {background:transparent;padding:16px 12px;}
.wholesale-order-shell--workshop .order-product-grid,.wholesale-order-shell--workshop .order-checkout-fields {grid-template-columns:1fr;}
.wholesale-order-shell--workshop .order-product-grid article,.wholesale-order-shell--workshop .portal-order-cart > article {background:white;border:1px solid #d6e3e3;border-radius:5px;padding:14px;margin-bottom:10px;}
.wholesale-order-shell--workshop .order-stage [data-order-results],.wholesale-order-shell--workshop .order-stage [data-order-cart],.wholesale-order-shell--workshop .order-stage [data-order-checkout],.wholesale-order-shell--workshop .order-catalog-search {padding-inline:12px;}
.wholesale-order-shell--workshop .portal-order-cart {background:transparent;}
.wholesale-order-shell--workshop .portal-order-cart > article {grid-template-areas:"copy copy" "quantity total" "remove remove";grid-template-columns:70px minmax(0,1fr);}

@container wholesale (max-width:1050px) {
  .wholesale-order-shell--workshop .wholesale-order-grid {grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"catalog basket" "checkout checkout";}
  .wholesale-order-shell--command .order-product-grid article {display:flex;}
  .wholesale-record-list > article {grid-template-columns:minmax(0,1fr) auto;gap:14px;}
  .wholesale-record-list dl {grid-column:1/-1;grid-row:2;}
  .wholesale-record-list > article > .button {grid-column:2;grid-row:1;}
}
@container wholesale (max-width:760px) {
  .wholesale-order-shell .wholesale-order-grid {grid-template-columns:minmax(0,1fr);grid-template-areas:"catalog" "basket" "checkout";}
  .wholesale-order-shell--classic .order-product-grid article {display:flex;}
  .wholesale-order-shell--classic .order-product-grid article > div:last-child {grid-template-columns:1fr auto;}
  .wholesale-order-shell--classic .order-product-grid article > div:last-child > small {grid-column:1/-1;}
  .wholesale-order-shell--classic .order-checkout-fields {grid-template-columns:repeat(2,minmax(0,1fr));}
  .wholesale-order-shell--classic .order-checkout-fields .fulfillment-choice {grid-column:1/-1;grid-row:auto;}
  .wholesale-order-shell--classic .order-notes-field {grid-column:1/-1;}
  .order-step-nav button {padding:12px;gap:8px;}
  .order-step-nav small {display:none;}
}
@container wholesale (max-width:500px) {
  .wholesale-record-list dl {grid-template-columns:repeat(2,minmax(0,1fr));}
  .wholesale-record-list > article {padding:14px;gap:12px;}
  .wholesale-record-identity > .shop-icon {display:none;}
  .wholesale-record-identity strong {font-size:14px;}
  .wholesale-order-shell .order-product-grid {grid-template-columns:1fr;}
  .wholesale-order-shell .order-checkout-fields {grid-template-columns:1fr;}
  .wholesale-order-shell--classic .order-submit-area {grid-template-columns:1fr;}
  .wholesale-order-shell .portal-order-cart > article {grid-template-columns:70px minmax(0,1fr);grid-template-areas:"copy copy" "quantity total" "remove remove";gap:8px;}
  .wholesale-order-shell--storefront .order-product-grid article {flex-basis:100%;}
  .order-step-nav button {flex-direction:column;text-align:center;padding:10px 5px;}
  .order-step-nav strong {font-size:12px;}
  .order-draft-bar {justify-content:center;text-align:center;}
  [data-order-summary] {justify-content:center;gap:8px 14px;}
}

@media(max-width:600px) {
  body[data-shop-layout][data-workspace-view=orders] .workspace-content > .orders-workspace-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
  body[data-shop-layout][data-workspace-view=orders] .orders-workspace-tabs button {min-width:0;min-height:46px;padding:8px 6px;white-space:normal;justify-content:center;font-size:11px;line-height:1.4;}
}
