@media (min-width: 901px) {
  /*
   * M3 management archetype grammar.
   * Feature pages may own business geometry inside these zones, but not the zone lifecycle itself.
   */
  html[data-runtime="browser-desktop"] .salesmap-archetype-management {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  html[data-runtime="browser-desktop"] :is(
    .salesmap-layout-navigation-zone,
    .salesmap-layout-identity-zone,
    .salesmap-layout-page-action-zone,
    .salesmap-layout-utility-zone,
    .salesmap-layout-commit-zone
  ) {
    min-width: 0;
    flex: 0 0 auto;
  }

  html[data-runtime="browser-desktop"] .salesmap-layout-content-zone {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
  }

  html[data-runtime="browser-desktop"] .salesmap-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  /*
   * Mandatory Desktop page geometry.
   * Every new full workspace must use `bottom-sheet desktop-fill-sheet`.
   * Child management pages also add `salesmap-workspace-sheet`.
   */
  html[data-runtime="browser-desktop"] body > .bottom-sheet.desktop-fill-sheet,
  html[data-runtime="browser-desktop"] body > .bottom-sheet.desktop-fill-sheet.open,
  html[data-runtime="browser-desktop"] .bottom-sheet.desktop-fill-sheet,
  html[data-runtime="browser-desktop"] .bottom-sheet.desktop-fill-sheet.open {
    left: var(--desktop-main-left) !important;
    right: var(--desktop-shell-gap) !important;
    top: var(--desktop-shell-gap) !important;
    bottom: var(--desktop-shell-gap) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 24px 14px !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow: hidden !important;
  }

  html[data-runtime="browser-desktop"] body > .bottom-sheet.desktop-fill-sheet.open {
    display: flex !important;
    flex-direction: column !important;
  }

  html[data-runtime="browser-desktop"] .bottom-sheet.desktop-fill-sheet > .sheet-header {
    flex: 0 0 auto;
    min-height: 62px;
    margin: 0 -10px 8px !important;
    padding: 8px 10px 10px !important;
  }

  html[data-runtime="browser-desktop"] .bottom-sheet.desktop-fill-sheet > .desktop-fill-body {
    min-width: 0;
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
  }

  /* Generic remaining-height contract. Add `salesmap-fill-layout` to the direct page layout. */
  html[data-runtime="browser-desktop"] .desktop-fill-body.salesmap-fill-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html[data-runtime="browser-desktop"] .desktop-fill-body.salesmap-fill-body > .salesmap-fill-layout {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
  }

  /* Customer/Product child workspaces use one identical full-page page skeleton. */
  html[data-runtime="browser-desktop"] .salesmap-workspace-sheet[hidden] {
    display: none !important;
  }

  html[data-runtime="browser-desktop"] body > .salesmap-workspace-sheet.open {
    display: flex !important;
    flex-direction: column !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-sheet > .sheet-handle {
    flex: 0 0 auto;
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-sheet > .salesmap-workspace-dialog {
    min-width: 0 !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--theme-surface) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-head,
  html[data-runtime="browser-desktop"] .salesmap-workspace-actions {
    flex: 0 0 auto;
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    background: var(--theme-surface);
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-head {
    justify-content: space-between;
    border-bottom: 1px solid var(--theme-line);
    text-align: left;
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-head > div {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 3px;
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-head b {
    color: var(--theme-ink);
    font-size: 21px;
    font-weight: 700;
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-head span {
    color: var(--theme-muted);
    font-size: 10px;
    font-weight: 600;
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-body {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding: 14px 18px;
    background: color-mix(in srgb, var(--theme-surface-soft) 28%, var(--theme-surface));
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--theme-line);
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-actions button {
    width: 150px;
    min-width: 150px;
    min-height: 42px;
    border-radius: 12px;
    font-size: 11px;
  }

  /* Shared full-page Edit Selected pattern used by Customer and Product Management. */
  html[data-runtime="browser-desktop"] .salesmap-bulk-edit-dialog .salesmap-workspace-body {
    --salesmap-bulk-preview-size: 62%;
    display: grid;
    grid-template-rows: minmax(150px, var(--salesmap-bulk-preview-size)) 12px minmax(120px, 1fr);
    gap: 0;
    overflow: hidden;
    padding-inline: 0;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-splitter {
    position: relative;
    min-height: 12px;
    cursor: row-resize;
    touch-action: none;
    outline: none;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-splitter::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 5px;
    height: 2px;
    border-radius: 999px;
    background: var(--theme-line);
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-splitter > span {
    position: absolute;
    left: 50%;
    top: 2px;
    width: 54px;
    height: 8px;
    transform: translateX(-50%);
    border: 1px solid var(--theme-line);
    border-radius: 999px;
    background: var(--theme-surface);
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-splitter:is(:hover,:focus-visible)::before,
  html[data-runtime="browser-desktop"] .salesmap-bulk-edit-dialog.is-resizing .salesmap-bulk-splitter::before {
    background: var(--theme-primary);
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-preview-frame {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: auto;
    border: 1px solid var(--theme-line);
    border-radius: 12px;
    background: var(--theme-surface);
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-form-scroll {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: auto;
    padding: 0 0 8px;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-form-panel {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 0;
    padding: 9px 12px;
    border: 0;
    /* Preserve the initial radius previously produced by the undefined variable. */
    border-radius: initial;
    background: var(--theme-surface);
  }

  /* Product bulk edit keeps Product Changes and Product Tags as two equal responsibility columns. */
  html[data-runtime="browser-desktop"] .product-bulk-dialog .salesmap-bulk-form-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Customer bulk edit uses three equal responsibility columns: master fields, business profile and services. */
  html[data-runtime="browser-desktop"] .customer-bulk-dialog .salesmap-bulk-form-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-form-section {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 5px;
    margin: 0;
    padding: 0 14px;
    border: 0;
  }

  /* Equal internal padding keeps every bulk-edit column aligned without nested cards. */
  html[data-runtime="browser-desktop"] .salesmap-bulk-form-section + .salesmap-bulk-form-section {
    border: 0;
  }

  /* Both bulk-edit columns belong to one visual panel; nested fieldsets never create a second card. */
  html[data-runtime="browser-desktop"] .salesmap-bulk-form-panel > .salesmap-bulk-form-section {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-form-section > legend {
    padding: 0;
    color: var(--theme-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-form-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(126px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 34px;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-form-row > label,
  html[data-runtime="browser-desktop"] .salesmap-bulk-form-row > .salesmap-bulk-row-label {
    color: var(--theme-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-form-row :is(select,input[type="text"]) {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    height: 32px;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-form-row[hidden] {
    display: none !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-control {
    justify-self: start;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    cursor: pointer;
    user-select: none;
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-track {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-muted) 68%, var(--theme-surface));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-ink) 18%, transparent);
    transition: background .16s ease;
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-track::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f8fbfa;
    box-shadow: 0 1px 4px rgba(30,47,54,.28);
    transition: transform .16s ease;
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-control input:checked + .salesmap-switch-track {
    background: var(--theme-primary) !important;
    box-shadow: inset 0 0 0 1px var(--theme-primary-dark) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-control input:checked + .salesmap-switch-track::before {
    transform: translateX(20px);
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-control input:indeterminate + .salesmap-switch-track {
    background: color-mix(in srgb, var(--theme-primary) 54%, var(--theme-surface)) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-control input:indeterminate + .salesmap-switch-track::before {
    transform: translateX(10px);
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-control input:indeterminate + .salesmap-switch-track::after {
    content: none;
  }

  html[data-runtime="browser-desktop"] .salesmap-switch-control input:focus-visible + .salesmap-switch-track {
    outline: 3px solid color-mix(in srgb, var(--theme-primary) 28%, transparent);
    outline-offset: 2px;
  }

  html[data-runtime="browser-desktop"] .salesmap-bulk-scope-badge {
    color: var(--theme-muted);
    font-size: 10px;
    font-weight: 800;
  }

  html[data-runtime="browser-desktop"] :is(#customerManagementClearSelectionBtn,#productClearSelectionBtn) {
    color: var(--theme-ink) !important;
    background: var(--theme-surface) !important;
    border-color: var(--theme-line) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
  }

  html[data-runtime="browser-desktop"] :is(#customerManagementClearSelectionBtn,#productClearSelectionBtn):is(:hover,:focus-visible) {
    color: var(--theme-primary-dark) !important;
    background: var(--theme-primary-soft) !important;
    border-color: var(--theme-primary-line) !important;
  }

  /* One shared database overview layout for Customer and Product Management. */
  html[data-runtime="browser-desktop"] .salesmap-management-overview {
    min-width: 0;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(250px, .8fr) minmax(460px, 1.2fr);
    gap: 10px;
    align-items: stretch;
    padding: 10px 12px;
    border: 1px solid var(--theme-line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--theme-surface-soft) 58%, var(--theme-surface));
  }

  html[data-runtime="browser-desktop"] .salesmap-management-overview-summary {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 4px 6px;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-overview-summary > span {
    color: var(--theme-muted);
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-overview-summary > b {
    color: var(--theme-ink);
    font-size: 14px;
    font-weight: 850;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-overview-summary > b strong {
    font-size: 20px;
    font-weight: 950;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-overview-actions {
    min-width: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    align-items: stretch;
    gap: 8px;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-overview-actions button {
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
  }

  @media (max-width: 1180px) {
    html[data-runtime="browser-desktop"] .salesmap-bulk-change-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-runtime="browser-desktop"] .salesmap-management-overview {
      grid-template-columns: 1fr;
    }
  }
}


  /* Shared Customer/Product Management page chrome contract. */
  html[data-runtime="browser-desktop"] .salesmap-management-shell {
    --salesmap-management-header-height: 62px;
    --salesmap-management-control-height: 42px;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-header {
    flex: 0 0 var(--salesmap-management-header-height) !important;
    min-height: var(--salesmap-management-header-height) !important;
    height: var(--salesmap-management-header-height) !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 10px 8px !important;
    border-bottom: 1px solid var(--theme-line) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-header .sheet-title {
    margin: 0 !important;
    color: var(--theme-ink) !important;
    font-size: 26px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-header :is(.customer-management-header-actions, .product-header-actions) {
    margin-left: auto !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-header [data-ui-icon="refresh"] {
    min-width: 132px !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-header > div > .mini-btn {
    display: none !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-page {
    gap: 8px !important;
    padding-top: 8px !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview {
    grid-template-columns: minmax(320px, .9fr) minmax(480px, 1.1fr) !important;
    gap: 12px !important;
    min-height: 86px !important;
    padding: 10px 14px !important;
    border: 1px solid var(--theme-primary-line) !important;
    border-radius: 16px !important;
    background: color-mix(in srgb, var(--theme-primary-soft) 40%, var(--theme-surface)) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-summary {
    grid-template-columns: max-content max-content !important;
    align-content: center !important;
    align-items: center !important;
    gap: 4px 18px !important;
    padding: 2px 6px !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-summary > span:first-child {
    grid-column: 1 / -1 !important;
    color: var(--theme-primary) !important;
    font-size: 9px !important;
    font-weight: 950 !important;
    letter-spacing: .08em !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-summary > :is(b, button) {
    min-height: 25px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--theme-ink) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-summary > :is(b, button) strong {
    color: var(--theme-primary-dark) !important;
    font-size: 15px !important;
    font-weight: 950 !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-last-action {
    min-width: 0 !important;
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    overflow: hidden !important;
    color: var(--theme-muted) !important;
    font-size: 9px !important;
    font-weight: 800 !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-last-action i {
    flex: 0 0 auto !important;
    font-style: normal !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-last-action > :last-child {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-actions {
    grid-template-columns: repeat(3, minmax(150px, 190px)) !important;
    grid-auto-flow: initial !important;
    grid-auto-columns: initial !important;
    justify-content: end !important;
    align-items: center !important;
    gap: 8px !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-workbench {
    gap: 7px !important;
    padding: 10px !important;
    border: 1px solid var(--theme-primary-line) !important;
    border-radius: 16px !important;
    background: color-mix(in srgb, var(--theme-primary-soft) 36%, var(--theme-surface)) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-toolbar {
    display: grid !important;
    grid-template-columns: minmax(300px, 1fr) 112px 112px 132px !important;
    align-items: center !important;
    gap: 8px !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-search-wrap {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    flex: none !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-search-wrap input {
    width: 100% !important;
    min-height: var(--salesmap-management-control-height) !important;
    height: var(--salesmap-management-control-height) !important;
    padding: 0 84px 0 40px !important;
    border: 1px solid var(--theme-line) !important;
    border-radius: 12px !important;
    background: var(--theme-surface) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-toolbar-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: var(--salesmap-management-control-height) !important;
    height: var(--salesmap-management-control-height) !important;
    padding: 0 12px !important;
    border: 1px solid var(--theme-line) !important;
    border-radius: 12px !important;
    background: var(--theme-surface) !important;
    color: var(--theme-ink) !important;
    font-size: 10px !important;
    font-weight: 900 !important;
  }

  html[data-runtime="browser-desktop"] #customerManagementSheet .customer-toolbar-spacer {
    display: none !important;
  }

  @media (max-width: 1260px) {
    html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview {
      grid-template-columns: 1fr !important;
    }
    html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-toolbar {
      grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(100px, 118px)) !important;
    }
  }


  @media (max-width: 1180px) {
    html[data-runtime="browser-desktop"] .customer-bulk-dialog .salesmap-bulk-form-panel {
      grid-template-columns: repeat(3, minmax(250px, 1fr));
      min-width: 780px;
    }
  }


  /* Shared Browser management primitives used by Customer, Product and reporting workspaces. */
  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-workbench {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
  }

  html[data-runtime="browser-desktop"] .salesmap-segmented-control {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--salesmap-ds-component-tab-line);
    border-radius: var(--salesmap-ds-radius-md);
    background: var(--salesmap-ds-component-tab-bg);
  }

  html[data-runtime="browser-desktop"] .salesmap-segmented-control > button {
    min-height: 32px;
    padding: 5px var(--salesmap-ds-space-3);
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--salesmap-ds-component-tab-text);
    font-size: 10px;
    font-weight: var(--salesmap-ds-font-weight-heavy);
    white-space: nowrap;
    cursor: pointer;
  }

  html[data-runtime="browser-desktop"] .salesmap-segmented-control > button:is(.active,[aria-selected="true"]) {
    border-color: var(--salesmap-ds-component-tab-selected-line);
    background: var(--salesmap-ds-component-tab-selected-bg);
    color: var(--salesmap-ds-component-tab-selected-text);
    box-shadow: var(--salesmap-ds-component-tab-selected-shadow);
  }

  html[data-runtime="browser-desktop"] .salesmap-status-banner {
    min-width: 0;
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border: 1px solid var(--theme-line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--theme-surface-soft) 58%, var(--theme-surface));
    color: var(--theme-muted);
    font-size: 9px;
    font-weight: 800;
  }

  html[data-runtime="browser-desktop"] .salesmap-status-banner[hidden] { display: none !important; }
  html[data-runtime="browser-desktop"] .salesmap-status-banner > b { color: var(--theme-primary-dark); font-size: 9px; font-weight: 950; }
  html[data-runtime="browser-desktop"] .salesmap-status-banner.is-warning { border-color: color-mix(in srgb, #8b744d 54%, var(--theme-line)); background: color-mix(in srgb, #8b744d 10%, var(--theme-surface)); }
  html[data-runtime="browser-desktop"] .salesmap-status-banner.is-warning > b { color: #8b744d; }

  html[data-runtime="browser-desktop"] .salesmap-management-active-filters {
    min-width: 0;
    min-height: 28px;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid var(--theme-line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--theme-surface-soft) 45%, var(--theme-surface));
    color: var(--theme-muted);
    font-size: 9px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-results-layout {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
    gap: 10px;
    overflow: hidden;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-summary-panel,
  html[data-runtime="browser-desktop"] .salesmap-management-results-panel {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 14px;
    background: var(--theme-surface);
  }

  html[data-runtime="browser-desktop"] .salesmap-management-panel-head {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--theme-line);
    color: var(--theme-muted);
    font-size: 9px;
    font-weight: 850;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-panel-head > b { color: var(--theme-ink); font-size: 11px; font-weight: 950; }
  html[data-runtime="browser-desktop"] .salesmap-management-summary-body { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 0 8px 8px; }
  html[data-runtime="browser-desktop"] .salesmap-management-results-body { min-height: 0; flex: 1 1 auto; overflow: hidden; display: flex; flex-direction: column; }

  html[data-runtime="browser-desktop"] .salesmap-management-footer {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-top: 1px solid var(--theme-line);
    color: var(--theme-muted);
    font-size: 9px;
    font-weight: 850;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-footer-actions { display: flex; align-items: center; gap: 8px; }
  html[data-runtime="browser-desktop"] .salesmap-management-footer-actions button { min-width: 72px; min-height: 38px; }

  html[data-runtime="browser-desktop"] .salesmap-filter-workspace-grid {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(420px, .82fr) minmax(520px, 1.18fr);
    gap: 14px;
    overflow: hidden;
  }

  html[data-runtime="browser-desktop"] .salesmap-filter-workspace-calendar,
  html[data-runtime="browser-desktop"] .salesmap-filter-workspace-fields {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--theme-line);
    border-radius: 14px;
    background: var(--theme-surface);
  }

  html[data-runtime="browser-desktop"] .salesmap-filter-workspace-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 12px; }
  html[data-runtime="browser-desktop"] .salesmap-filter-workspace-fields > .salesmap-filter-range { grid-column: 1 / -1; }
  html[data-runtime="browser-desktop"] .salesmap-filter-workspace-fields label { min-width: 0; display: grid; gap: 5px; }
  html[data-runtime="browser-desktop"] .salesmap-filter-workspace-fields label > span { color: var(--theme-muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }

  @media (max-width: 1180px) {
    html[data-runtime="browser-desktop"] .salesmap-management-results-layout { grid-template-columns: minmax(225px, 280px) minmax(0, 1fr); }
    html[data-runtime="browser-desktop"] .salesmap-filter-workspace-grid { grid-template-columns: 1fr; overflow: auto; }
  }
@media (min-width: 901px) {
  /* Map Filter: selection is already shown by the check mark; keep the row surface clean. */
  html[data-runtime="browser-desktop"] #filterSheet :is(.area-filter-section, .filter-area-list) {
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-option.selected {
    background: transparent !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list {
    scrollbar-color: color-mix(in srgb, var(--theme-muted) 58%, transparent) transparent;
  }

  /* Close, Reset and Apply are text actions, not Filter actions. */
  html[data-runtime="browser-desktop"] #filterSheet :is(#closeFilterBtn, #resetFilterBtn, #applyFilterBtn)::before {
    display: none !important;
    content: none !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet :is(#closeFilterBtn, #resetFilterBtn, #applyFilterBtn) {
    font-size: var(--desktop-font-button) !important;
  }

  /* DSR Monitoring: align the numeric block and remove the reserved empty scrollbar gutter. */
  html[data-runtime="browser-desktop"] #dsrDailySummarySheet .salesmap-management-table-frame {
    scrollbar-gutter: auto !important;
  }




  html[data-runtime="browser-desktop"] #dsrDailySummarySheet .dsr-status-pill {
    min-width: 82px !important;
    font-size: 10px !important;
  }

  /* DSR History: the summary is already inside the right zone, so remove the second card frame. */
  html[data-runtime="browser-desktop"] #dsrHistorySheet .compact-history-summary.salesmap-summary-list {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-runtime="browser-desktop"] #dsrHistorySheet .compact-history-summary.salesmap-summary-list > .dsr-summary-item {
    min-height: 34px !important;
    padding: 5px 12px !important;
  }

  html[data-runtime="browser-desktop"] #dsrHistorySheet .compact-history-summary.salesmap-summary-list .dsr-summary-label {
    font-size: 9px !important;
  }

  html[data-runtime="browser-desktop"] #dsrHistorySheet .compact-history-summary.salesmap-summary-list .dsr-summary-value {
    font-size: 12px !important;
  }

  html[data-runtime="browser-desktop"] #dsrHistorySheet .history-results-section {
    background: var(--theme-surface) !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html[data-runtime="browser-desktop"] #dsrHistorySheet .history-results-list {
    background: var(--theme-surface) !important;
    scrollbar-gutter: auto !important;
  }
}
@media (min-width: 901px) {
  /* Map Filter: keep the three Area actions visually equal and on one line. */
  html[data-runtime="browser-desktop"] #filterSheet .inline-area-actions {
    display: grid !important;
    grid-template-columns: repeat(3, 132px) !important;
    align-items: center !important;
    justify-content: end !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .inline-area-actions > :is(
    #activeFilterPickerBtn,
    #selectAllAreasBtn,
    #clearAreasBtn
  ) {
    box-sizing: border-box !important;
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    justify-content: center !important;
  }

  /* Map Filter: Areas are one continuous list, not a stack of separate cards. */
  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list {
    display: block !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid var(--theme-line) !important;
    border-radius: 12px !important;
    background: var(--theme-surface) !important;
    box-shadow: none !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-row {
    position: relative !important;
    min-height: 44px !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-bottom: 1px solid var(--theme-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-row:last-child {
    border-bottom: 0 !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-option,
  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-option.selected,
  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-option:is(:active, :focus, :focus-visible) {
    min-height: 44px !important;
    height: auto !important;
    padding: 8px 13px !important;
    padding-right: 13px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-option-main {
    gap: 52px !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-check {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-name {
    font-weight: 500 !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-picker-row:hover {
    background: color-mix(in srgb, var(--theme-primary-soft) 34%, var(--theme-surface)) !important;
  }

  /* The colour swatch is the control; do not place it on a second white button tile. */
  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-colour-button {
    position: absolute !important;
    z-index: 2 !important;
    left: 48px !important;
    top: 0 !important;
    box-sizing: border-box !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-runtime="browser-desktop"] #filterSheet .filter-area-list .area-colour-swatch {
    width: 28px !important;
    height: 28px !important;
    border: 0 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
  }

  /* DSR Monitoring: numeric and status columns share one larger centred rhythm. */
  html[data-runtime="browser-desktop"] #dsrDailySummarySheet #dsrManagerSummaryList {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto !important;
  }

  html[data-runtime="browser-desktop"] #dsrDailySummarySheet #managerSummaryTable {
    width: 100% !important;
  }

  html[data-runtime="browser-desktop"] #dsrDailySummarySheet #managerSummaryTable :is(th, td):nth-child(n + 3):nth-child(-n + 10) {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
  }

  html[data-runtime="browser-desktop"] #dsrDailySummarySheet #managerSummaryTable td:nth-child(n + 3):nth-child(-n + 10) {
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  html[data-runtime="browser-desktop"] #dsrDailySummarySheet #managerSummaryTable :is(th, td):last-child {
    padding-right: 7px !important;
    border-right: 0 !important;
  }

  html[data-runtime="browser-desktop"] #dsrDailySummarySheet #managerSummaryTable .dsr-status-pill {
    min-width: 84px !important;
    font-size: 11px !important;
  }
}
@media (min-width: 901px) {
  /* Workspace chrome consumes the approved shared rhythm instead of late page-local values. */
  html[data-runtime="browser-desktop"] :is(.salesmap-workspace-head,.salesmap-workspace-actions) {
    gap: var(--salesmap-ds-spacing-control-gap);
    padding-left: var(--salesmap-ds-spacing-page-gutter-desktop);
    padding-right: var(--salesmap-ds-spacing-page-gutter-desktop);
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-head > div > b {
    font-size: var(--salesmap-ds-type-page-title-size);
    font-weight: var(--salesmap-ds-type-page-title-weight);
    line-height: var(--salesmap-ds-type-page-title-line-height);
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-head > div > span {
    font-size: var(--salesmap-ds-type-metadata-size);
    font-weight: var(--salesmap-ds-type-metadata-weight);
    line-height: var(--salesmap-ds-type-metadata-line-height);
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-body {
    gap: var(--salesmap-ds-spacing-section-gap);
    padding: var(--salesmap-ds-spacing-section-gap) var(--salesmap-ds-spacing-page-gutter-desktop);
  }

  html[data-runtime="browser-desktop"] .salesmap-workspace-actions button {
    min-height: var(--salesmap-ds-density-touch-target);
    font-size: var(--salesmap-ds-type-button-label-size);
    font-weight: var(--salesmap-ds-type-button-label-weight);
    line-height: var(--salesmap-ds-type-button-label-line-height);
  }

  /* Management page identity and overview use Page Title / Metadata / Label / Metric roles. */
  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-header .sheet-title {
    font-size: var(--salesmap-ds-type-page-title-size) !important;
    font-weight: var(--salesmap-ds-type-page-title-weight) !important;
    line-height: var(--salesmap-ds-type-page-title-line-height) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-header [data-ui-icon="refresh"] {
    min-height: var(--salesmap-ds-density-touch-target) !important;
    height: var(--salesmap-ds-density-touch-target) !important;
    font-size: var(--salesmap-ds-type-button-label-size) !important;
    font-weight: var(--salesmap-ds-type-button-label-weight) !important;
    line-height: var(--salesmap-ds-type-button-label-line-height) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview {
    gap: var(--salesmap-ds-spacing-section-gap) !important;
    padding: var(--salesmap-ds-spacing-card-padding-desktop) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-summary > span:first-child,
  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-last-action {
    font-size: var(--salesmap-ds-type-metadata-size) !important;
    font-weight: var(--salesmap-ds-type-metadata-weight) !important;
    line-height: var(--salesmap-ds-type-metadata-line-height) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-summary > :is(b,button) {
    font-size: var(--salesmap-ds-type-label-size) !important;
    font-weight: var(--salesmap-ds-type-label-weight) !important;
    line-height: var(--salesmap-ds-type-label-line-height) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-summary > :is(b,button) strong {
    font-size: var(--salesmap-ds-type-metric-size) !important;
    font-weight: var(--salesmap-ds-type-metric-weight) !important;
    line-height: var(--salesmap-ds-type-metric-line-height) !important;
  }

  /* Management actions and toolbar share the approved Button Label / touch-target contract. */
  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-actions,
  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-toolbar {
    gap: var(--salesmap-ds-spacing-control-gap) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-overview-actions button,
  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-toolbar-btn {
    min-height: var(--salesmap-ds-density-touch-target) !important;
    height: var(--salesmap-ds-density-touch-target) !important;
    font-size: var(--salesmap-ds-type-button-label-size) !important;
    font-weight: var(--salesmap-ds-type-button-label-weight) !important;
    line-height: var(--salesmap-ds-type-button-label-line-height) !important;
  }

  html[data-runtime="browser-desktop"] .salesmap-management-shell .salesmap-management-search-wrap input {
    min-height: var(--salesmap-ds-density-touch-target) !important;
    height: var(--salesmap-ds-density-touch-target) !important;
    font-size: var(--salesmap-ds-type-body-size) !important;
    font-weight: var(--salesmap-ds-type-body-weight) !important;
    line-height: var(--salesmap-ds-type-body-line-height) !important;
  }
}
@media (min-width: 901px) {
  html[data-runtime="browser-desktop"] .salesmap-page-archetype {
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  html[data-runtime="browser-desktop"] .salesmap-page-archetype .salesmap-layout-content-zone {
    min-height: 0;
  }

  /* Nested zones keep their feature-owned horizontal geometry; the workspace owns page gutters. */

  html[data-runtime="browser-desktop"] .salesmap-page-archetype .salesmap-layout-commit-zone {
    min-height: var(--salesmap-ds-density-touch-target);
    padding-top: var(--salesmap-ds-spacing-control-gap);
    padding-bottom: var(--salesmap-ds-spacing-control-gap);
    border-top: 1px solid var(--salesmap-ds-color-line);
  }

  html[data-runtime="browser-desktop"] .salesmap-ux-state {
    padding: var(--salesmap-ds-spacing-card-padding-desktop);
  }
}
/* Stage 8 full-page identity owner: one title row, no header subtitle, no legacy title pill. */
@media (min-width: 901px) {
  html[data-runtime="browser-desktop"] .bottom-sheet.desktop-fill-sheet > .sheet-header {
    min-height: 62px !important;
    height: 62px !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 -10px 8px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: 1px solid var(--salesmap-ds-color-line) !important;
    background: var(--salesmap-ds-color-surface) !important;
  }

  html[data-runtime="browser-desktop"] .bottom-sheet.desktop-fill-sheet > .sheet-header .sheet-title {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--salesmap-ds-color-text) !important;
    font-family: var(--salesmap-ds-font-family-sans) !important;
    font-size: var(--salesmap-ds-type-page-title-size) !important;
    font-weight: var(--salesmap-ds-type-page-title-weight) !important;
    line-height: var(--salesmap-ds-type-page-title-line-height) !important;
    letter-spacing: 0 !important;
  }

  html[data-runtime="browser-desktop"] .bottom-sheet.desktop-fill-sheet > .sheet-header :is(
    .sheet-subtitle,
    .schedule-management-subtitle,
    .team-performance-subtitle,
    .stock-check-monitoring-subtitle
  ) {
    display: none !important;
  }
}
