/* Shared CRM shell layout for the website and the Mac app.
   Keep this before styles.css, matching the Mac app document-start injection. */
html[data-trello-native] body {
  margin: 0 !important;
  padding: 0 !important;
}

html[data-trello-native] .app-shell {
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html[data-trello-native] body:has(#kanbanView:not(.is-hidden)) .app-shell {
  height: 100vh !important;
}

html[data-trello-native] .topbar {
  top: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  /* The native window has no title-bar buttons to reserve space for. */
  padding-left: 24px !important;
}

/* Align the visible hamburger stroke with the 248px sidebar edge.
   Subtract header padding, half the button, and the SVG's painted half-width. */
@media (min-width: 901px) {
  html[data-trello-native] body.is-crm-view-active #catalogOpenButton {
    left: calc(248px - 24px - 28px - 9px);
  }
}

html[data-trello-native] .app { margin: 0 !important; border: 0 !important; border-radius: 0 !important; max-width: none !important; min-height: 100vh; }
html[data-trello-native] .app > header { border-radius: 0 !important; top: 0 !important; }

/* Let the purchase table meet the toolbar and window edges. */
html[data-trello-native] .app > .layout > main {
  margin: 0 !important;
}
html[data-trello-native] .app > .layout > main .table-panel {
  border-radius: 0 !important;
}

/* The same connection indicator stays in the sidebar online and offline. */
#roomView .room-sidebar:has(#crm-native-connection) { display: flex; flex-direction: column; padding-bottom: 0; }
#crm-native-connection {
  margin: auto 12px 0; padding: 0; height: 50px; box-sizing: border-box; display: flex; align-items: center;
  gap: 9px; flex-shrink: 0; color: #cccccc; font: 12px/1.35 -apple-system, sans-serif;
}
#crm-native-connection[hidden] { display: none; }
#crm-native-connection[data-state="offline"], #crm-native-connection[data-state="stale"] { color: #ff8b7b; }
#crm-native-connection[data-state="empty"] { color: #ff8b7b; }
#crm-native-connection > span { display: flex; flex-direction: column; gap: 1px; }
#crm-native-connection time { font-size: 11px; opacity: .8; font-variant-numeric: tabular-nums; }
#crm-native-connection button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer;
}
#crm-native-connection button:hover { background: #ffffff0c; }
#crm-native-connection button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#crm-native-connection button:disabled { cursor: default; }

#crm-native-connection button svg { width: 28.8px; height: 28.8px; stroke: none; animation: none; }

#crm-native-connection[data-manual="true"] button svg { animation: crm-manual-refresh .7s linear infinite; }
@keyframes crm-manual-refresh { to { transform: rotate(360deg); } }

/* Size the CRM content from the actual header, including narrow windows. */
html[data-trello-native] body.is-crm-view-active .app-shell {
  display: flex !important;
  flex-direction: column;
  height: 100vh !important;
  min-height: 100vh !important;
  background: #202124;
}
html[data-trello-native] body.is-crm-view-active .app-shell > .topbar {
  flex: 0 0 auto;
}
html[data-trello-native] body.is-crm-view-active .app-shell > .app-main {
  flex: 1 1 0 !important;
  height: 0 !important;
  min-height: 0 !important;
}

html[data-trello-native], html[data-trello-native] body { background: #202124 !important; }
html[data-crm-loading] .app-shell { visibility: hidden !important; }
html[data-crm-loading] body::before {
  content: "Загрузка CRM…"; position: fixed; inset: 0; display: grid;
  place-items: center; color: #f4f5f7; font: 16px -apple-system, sans-serif;
}

/* CRM list: compact status controls and a separated bottom toolbar. */
html[data-trello-native] body.is-crm-view-active .crm-orders-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
html[data-trello-native] body.is-crm-view-active .room-order-card-status-cell .room-order-status-control {
  width: 81%;
  margin-inline: auto;
}
html[data-trello-native] body.is-crm-view-active .room-order-card-status-cell
.room-order-status-control[data-room-order-status-context="table"] .room-order-status-trigger {
  height: calc(32px * 0.94);
  min-height: 0;
  padding-block: 0;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-tabs button[aria-pressed="true"] {
  background: linear-gradient(135deg, #34363a 0%, #292b2e 100%);
  color: #ffffff;
  border-color: #34363a;
}

/* Keep the bottom toolbar and sidebar refresh area aligned at +10% height. */
html[data-trello-native] body.is-crm-view-active .crm-orders-footer {
  height: 55px;
  min-height: 55px;
  max-height: 55px;
}
html[data-trello-native] #crm-native-connection { height: 55px; }

/* Continue the footer across the sidebar, with a shared muted text tone. */
html[data-trello-native] #crm-native-connection {
  margin-inline: 0;
  padding-inline: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #202124;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer,
html[data-trello-native] body.is-crm-view-active .crm-orders-footer :is(button, span) {
  color: #cccccc !important;
}

/* Footer tabs: only the selected view has an outline and white text. */
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-tabs button {
  background: transparent;
  border-color: transparent;
  color: #cccccc !important;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-tabs button[aria-pressed="true"] {
  border-color: #ffffff;
  color: #ffffff !important;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-tabs button[aria-pressed="true"] span {
  color: #ffffff !important;
}

/* Keep page navigation together at the right edge of the order footer. */
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-pagination {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-pagination button {
  position: static;
  transform: none;
  flex: 0 0 25px;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-pagination button:first-child:disabled {
  visibility: hidden;
  pointer-events: none;
}

/* Match the lower bar to the sidebar; make the header a deeper charcoal. */
html[data-trello-native] body.is-crm-view-active .room-orders-table-head,
html[data-trello-native] body.is-crm-view-active .crm-orders-footer,
html[data-trello-native] body.is-crm-view-active #crm-native-connection {
  background: #1c1d20 !important;
}
html[data-trello-native] body.is-crm-view-active .topbar,
html[data-trello-native] body.is-crm-view-active .topbar-search,
html[data-trello-native] body.is-crm-view-active .topbar-search input,
html[data-trello-native] body.is-crm-view-active .topbar-search-icon {
  background: #121316 !important;
}

/* Match the table heading to a 42px sidebar navigation row. */
html[data-trello-native] body.is-crm-view-active .room-orders-table-head {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  box-sizing: border-box;
}

html[data-trello-native].crm-table-heading-hidden body.is-crm-view-active .room-orders-table-head {
  display: none !important;
}
#crm-table-heading-toggle { display: none; }
html[data-trello-native] body.is-crm-view-active #crm-table-heading-toggle {
  display: inline-flex;
  flex-shrink: 0;
}
html[data-trello-native] body.is-crm-view-active #crm-table-heading-toggle + .topbar-logo--image {
  display: none !important;
}
html[data-trello-native] #crm-table-heading-toggle[aria-pressed="false"] { color: #cccccc; }
#crm-table-heading-toggle[aria-pressed="false"] .crm-heading-icon-row { visibility: hidden; }

/* Native CRM authorization: neutral charcoal surfaces with readable controls. */
html[data-trello-native] body #authModal.auth-modal { color-scheme: dark; color: #f4f4f4; }
html[data-trello-native] body #authModal.auth-modal::backdrop {
  background: #181818;
}
html[data-trello-native] body #authModal #authForm {
  background: #212121 !important;
  border: 1px solid #383838 !important;
  box-shadow: none !important;
}
html[data-trello-native] body #authModal #authForm h2,
html[data-trello-native] body #authModal .auth-field,
html[data-trello-native] body #authModal .auth-field span { color: #f4f4f4 !important; }
html[data-trello-native] body #authModal .auth-field input {
  appearance: none;
  background: #292929 !important;
  border: 1px solid #454545 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  box-shadow: none !important;
}
html[data-trello-native] body #authModal .auth-field input::placeholder {
  color: #bcbcbc !important;
  -webkit-text-fill-color: #bcbcbc !important;
  opacity: 1;
}
html[data-trello-native] body #authModal .auth-field input:focus {
  border-color: #777777 !important;
  outline: none !important;
  outline-offset: 0;
}
html[data-trello-native] body #authModal .auth-field input:-webkit-autofill {
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 0 0 100px #383838 inset !important;
}
html[data-trello-native] body #authModal .auth-submit {
  background: #404040 !important;
  border: 1px solid #505050 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: none !important;
}
html[data-trello-native] body #authModal .auth-submit:hover { background: #4b4b4b !important; }
html[data-trello-native] body #authModal .auth-submit:focus-visible,
html[data-trello-native] body #authModal .auth-modal-close:focus-visible { outline: 2px solid #888888 !important; outline-offset: 3px; }
html[data-trello-native] body #authModal .auth-submit:disabled { opacity: .65; cursor: wait; }
html[data-trello-native] body #authModal .auth-status { color: #c6c6c6; }
html[data-trello-native] body #authModal .auth-status.is-error { color: #ff8999; }
html[data-trello-native] body #authModal .auth-modal-close { background: #292929; color: #f4f4f4; }

html[data-trello-native] #crm-recent-logins { display:flex; flex-wrap:wrap; gap:8px; margin-top:-8px; }
html[data-trello-native] #crm-recent-logins[hidden] { display:none; }
html[data-trello-native] #crm-recent-logins > span { flex-basis:100%; color:#a6a6a6; font-size:12px; font-weight:400; }
html[data-trello-native] #crm-recent-logins > button { background:#292929; color:#f4f4f4; border:1px solid #454545; border-radius:8px; padding:7px 12px; font:inherit; font-size:14px; cursor:pointer; box-shadow:none; }
html[data-trello-native] #crm-recent-logins > button:hover { background:#353535; }
html[data-trello-native] #crm-recent-logins > button:focus-visible { outline:none; border-color:#888; }

/* Same control styling and pressed-state feedback as the left header toggle. */
#crm-two-columns-toggle { display: none; }
html[data-trello-native] body.is-crm-view-active #crm-two-columns-toggle {
  display: inline-flex;
  flex-shrink: 0;
}
html[data-trello-native] #crm-two-columns-toggle[aria-pressed="false"] { color: #cccccc; }

/* Hide the orders trash tab in both bundled and previously cached shells. */
html[data-trello-native] .crm-orders-tabs [data-crm-orders-view="trash"] {
  display: none !important;
}

/* Match CRM heading icons to the rail wrench and empty staff avatar. */
body.is-crm-view-active .crm-staff-heading-icon {
  width: 22px;
  height: 22px;
  color: #ccc;
}
body.is-crm-view-active [data-crm-header-filter="managerId"] .crm-staff-heading-icon {
  stroke-width: 1.5;
}

/* Center the sidebar controls within the same footer row. */
@media (min-width: 768px) {
  html[data-trello-native] body.is-crm-view-active #roomView:not(.crm-menu-collapsed) #crmSidebarToggle {
    bottom: 0;
    height: var(--crm-list-row-height);
    box-sizing: border-box;
    border-top: 1px solid transparent;
  }
  html[data-trello-native] body.is-crm-view-active #roomView #crmSidebarToggle svg,
  html[data-trello-native] body.is-crm-view-active #roomView #crm-native-connection button svg {
    width: 21px;
    height: 21px;
  }
}

/* Order detail navigation, immediately to the right of the main menu. */
#crm-order-back-button { display: none; }
html[data-trello-native] body.is-crm-view-active #crm-order-back-button:not([hidden]) {
  display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; padding: 8px; margin: 0; color: #eeeeee;
  border: 0; background: transparent; box-shadow: none; cursor: pointer;
}
#crm-order-back-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#crm-order-back-button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

#crm-mac-profiles {
  position: fixed;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: none;
}
#crm-mac-profiles button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: var(--crm-profile-size);
  height: var(--crm-profile-size);
  appearance: none;
  border: 0;
  border-radius: 50%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--crm-palette-text-muted, #c4c4c4);
  background: var(--crm-profile-background, var(--crm-second-menu-background, var(--crm-menu-background, var(--crm-palette-panel, #1c1d20))));
  font: 500 calc(var(--crm-profile-size) * .53) / 1 system-ui;
  cursor: pointer;
}
#crm-mac-profiles button img { width: 100%; height: 100%; object-fit: cover; }
#crm-mac-profiles button svg {
  display: block;
  width: 55%;
  height: 55%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#crm-mac-profiles button:is(:focus, :focus-visible) { outline: none; box-shadow: none; }
#crm-mac-profiles button:focus-visible { color: var(--crm-palette-text, #fff); }

/* Swap the retail menu and order list surfaces in the Mac app. */
html[data-trello-native] body.is-crm-view-active #roomView .room-page:has(> #crmRetailMenu:not([hidden])) {
  --crm-retail-menu-surface: #18191c;
  --crm-retail-content-surface: var(--crm-retail-orders-background, #1c1c20);
}
html[data-trello-native] body.is-crm-view-active #roomView #crmRetailMenu:not([hidden]) {
  background-color: var(--crm-retail-menu-surface) !important;
}
html[data-trello-native] body.is-crm-view-active #roomView
.room-page:has(> #crmRetailMenu:not([hidden])) > .room-main,
html[data-trello-native] body.is-crm-view-active #roomView
.room-page:has(> #crmRetailMenu:not([hidden])) .room-order-card:not(:hover):not(:has(:focus-visible)) {
  background-color: var(--crm-retail-content-surface) !important;
}

/* The Mac CRM uses the same vertical unit for chrome and list rows. */
@media (min-width: 901px) {
  html[data-trello-native] body.is-crm-view-active {
    --crm-mac-row-height: calc(48.25px * 1.15);
  }
  html[data-trello-native] body.is-crm-view-active,
  html[data-trello-native] body.is-crm-view-active #roomView > .room-page {
    --crm-menu-row-height: var(--crm-mac-row-height);
    --crm-list-row-height: var(--crm-mac-row-height);
    --crm-sidebar-toggle-height: var(--crm-mac-row-height);
  }
  html[data-trello-native] body.is-crm-view-active .app-shell > .topbar,
  html[data-trello-native] body.is-crm-view-active #roomView .room-nav button,
  html[data-trello-native] body.is-crm-view-active #roomView .crm-retail-nav > button:not([hidden]),
  html[data-trello-native] body.is-crm-view-active #roomView .room-orders-table-head,
  html[data-trello-native] body.is-crm-view-active .crm-orders-footer {
    box-sizing: border-box;
    height: var(--crm-mac-row-height) !important;
    min-height: var(--crm-mac-row-height) !important;
    max-height: var(--crm-mac-row-height) !important;
  }
  html[data-trello-native] body.is-crm-view-active .app-shell > .topbar {
    padding-block: 0 !important;
    align-items: center;
    align-content: center;
  }
}

/* Extend section borders across the order column while keeping its content inset. */
@media (min-width: 701px) {
  html[data-trello-native] .crm-order-page-root .crm-order-main-column
  :is(.room-order-modal-head, .room-order-modal-summary, .crm-delivery) {
    margin-inline: calc(-1 * var(--crm-order-content-inset));
    padding-inline: var(--crm-order-content-inset);
  }
}

html[data-trello-native] .crm-order-page-root .crm-comment-actions button[type="submit"] {
  background: var(--crm-palette-selected, #383a3d);
  color: var(--crm-palette-text, #fff);
}
html[data-trello-native] .crm-order-page-root .crm-comment-actions button[type="submit"]:enabled:hover {
  border-color: var(--crm-palette-text-muted, #afafaf);
}

html[data-trello-native] .crm-pickup-drawer .crm-pickup-body {
  --crm-pickup-body-gutter: 24px;
  padding-inline: var(--crm-pickup-body-gutter);
}
html[data-trello-native] .crm-pickup-drawer .crm-pickup-list {
  margin-inline: calc(-1 * var(--crm-pickup-body-gutter));
  padding-inline: var(--crm-pickup-body-gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}
html[data-trello-native] .crm-pickup-list > :not(h3, .crm-pickup-history) {
  grid-column: 1 / -1;
}
html[data-trello-native] .crm-pickup-drawer .crm-pickup-history {
  justify-self: end;
  margin: 0;
  font-size: 0;
  gap: 0;
}
html[data-trello-native] .crm-pickup-history input {
  appearance: none;
  order: 1;
  flex: none;
  box-sizing: border-box;
  inline-size: 18.4px;
  block-size: 18.4px;
  margin: 0;
  border: 1.5px solid #afafaf;
  border-radius: 3px;
  background: transparent;
  display: grid;
  place-items: center;
}
html[data-trello-native] .crm-pickup-history input:checked {
  background: var(--crm-palette-lime, #d6fa55);
  border-color: transparent;
}
html[data-trello-native] .crm-pickup-history input:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border: solid #18191c;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
}


/* Keep the left end of the Mac CRM header clear. */
html[data-trello-native] body.is-crm-view-active .topbar .topbar-logo--image:has(.topbar-logo-wordmark) {
  display: none !important;
}

html[data-trello-native] body.is-crm-view-active #roomView {
  --crm-rail-icon-size: 22px;
}
html[data-trello-native] body.is-crm-view-active #roomView
:is(.room-nav, #crmRetailNav) button > .crm-nav-icon,
html[data-trello-native] body.is-crm-view-active #roomView .crm-order-icon svg {
  width: var(--crm-rail-icon-size) !important;
  height: var(--crm-rail-icon-size) !important;
  flex: 0 0 var(--crm-rail-icon-size);
}
html[data-trello-native] body.is-crm-view-active #roomView
:is(.room-nav, #crmRetailNav) button:not(.is-active, [aria-current="page"], [aria-pressed="true"], [aria-selected="true"]) > .crm-nav-icon,
html[data-trello-native] body.is-crm-view-active #roomView .crm-order-icon:not([aria-expanded="true"]) svg {
  color: var(--crm-palette-text-secondary, #cdcdcd) !important;
}

/* Filled active glyph and inset tile on the outer navigation rail. */
html:root[data-trello-native] body.is-crm-view-active #roomView .room-sidebar
button:is(#crm-rail-downloads-button, [data-room-action="mail"]) {
  background: transparent !important;
}
html:root[data-trello-native] body.is-crm-view-active #roomView .room-sidebar
button:is(#crm-rail-downloads-button, [data-room-action="mail"]) > svg {
  width: var(--crm-rail-icon-size, 22px) !important;
  height: var(--crm-rail-icon-size, 22px) !important;
}
html:root[data-trello-native] body.is-crm-view-active #roomView .room-sidebar
button:is(#crm-rail-downloads-button, [data-room-action="mail"]):is(.is-active, [aria-expanded="true"]) > svg {
  background-color: #383a3d !important;
  border-radius: 4px;
  box-shadow: 0 0 0 7px #383a3d !important;
}
html[data-trello-native] body.is-crm-view-active #roomView .room-sidebar .room-nav button.is-active {
  background: transparent !important;
  color: #fff;
}
html[data-trello-native] body.is-crm-view-active #roomView .room-sidebar .room-nav button.is-active > .crm-nav-icon {
  background-color: #383a3d !important;
  border-radius: 4px;
  box-shadow: 0 0 0 7px #383a3d !important;
}

@media (min-width: 901px) {
  html[data-trello-native] .crm-shift-sidebar .crm-shift-operation {
    box-sizing: border-box;
    /* One heading and seven days in the adjacent weekly table. */
    min-height: calc(8 * var(--crm-list-row-height));
  }
  html[data-trello-native] .crm-shift-sidebar [data-shift-fields] {
    margin-bottom: 4px;
  }
  html[data-trello-native] .crm-shift-submit-footer {
    flex: none;
  }
}

html[data-trello-native] .crm-shift-sidebar:has(.crm-shift-staff) {
  display: flex;
  flex-direction: column;
}
html[data-trello-native] .crm-shift-staff {
  flex: 1 0 auto;
  display: grid;
  grid-template-rows: 1fr 1fr auto var(--crm-list-row-height);
}
html[data-trello-native] .crm-shift-staff section {
  border-bottom: var(--crm-panel-divider);
  padding: 16px;
}
html[data-trello-native] .crm-shift-staff h3 {
  margin: 0 0 12px;
  font: inherit;
}
html[data-trello-native] .crm-shift-staff-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
html[data-trello-native] .crm-shift-staff-avatars button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  overflow: hidden;
  background: #18191c;
  color: #fff;
  cursor: pointer;
}
html[data-trello-native] .crm-shift-staff-avatars button[aria-pressed="true"] {
  border-color: var(--crm-palette-lime, #d6fa55);
}
html[data-trello-native] .crm-shift-staff-avatars button[aria-pressed="false"] {
  border-color: var(--crm-palette-text-muted, #afafaf);
}
html[data-trello-native] .crm-shift-staff-avatars img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
html[data-trello-native] .crm-shift-staff > button {
  width: 100%;
  justify-content: center;
  color: #fff;
  cursor: pointer;
}

html[data-trello-native] .crm-shift-staff .crm-shift-staff-off-heading {
  margin-top: 16px;
}

html[data-trello-native] body.is-crm-view-active .crm-orders-footer
:is(.crm-orders-delivery-filters, .crm-orders-payment-filters) {
  position: static !important;
  margin: 0;
  padding: 0;
  flex: none;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-payment-filters {
  border-inline-start: 1px solid var(--crm-palette-divider, #383a3d);
  padding-inline-start: 8px;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer [data-crm-payment-filter] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: transparent !important;
  border-color: transparent !important;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer
:is([data-crm-order-delivery], [data-crm-payment-filter])[aria-pressed="true"] span {
  background: var(--crm-palette-lime, #d6fa55) !important;
  color: #18191c !important;
  -webkit-text-fill-color: #18191c !important;
}

html[data-trello-native] body.is-crm-view-active .crm-order-page-root > .crm-order-dates-footer {
  background: #252628 !important;
}

html[data-trello-native] body.is-crm-view-active .crm-orders-footer:has(.crm-orders-payment-filters) > .crm-orders-tabs:not(.crm-orders-delivery-filters, .crm-orders-payment-filters) {
  margin-inline-end: 0;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-delivery-filters {
  order: 1;
  margin-inline-start: auto !important;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer .crm-orders-payment-filters {
  order: 2;
}
html[data-trello-native] body.is-crm-view-active .crm-orders-footer:has(.crm-orders-payment-filters) > [data-crm-paid-filter] {
  order: 3;
  margin-inline-start: 0;
}

html[data-trello-native] body.is-crm-view-active .crm-orders-footer:has(
  :is([data-crm-order-delivery], [data-crm-payment-filter])[aria-pressed="true"]
) [data-crm-paid-filter] {
  color: var(--crm-palette-lime, #d6fa55) !important;
}
html[data-trello-native] body.is-crm-view-active #roomView #roomOrdersList {
  background-color: var(--crm-retail-content-surface, #1c1c20) !important;
}

html[data-trello-native] body.is-crm-view-active #crm-order-icon-picker:has([aria-pressed="true"])
button:first-child[aria-pressed="false"]:focus-visible {
  outline: none !important;
}

html[data-trello-native] #roomView [data-room-order-status-context="table"] .room-order-status-menu {
  left: var(--crm-native-status-left, 100%);
  top: var(--crm-native-status-top, 0px);
  width: 240px;
  min-width: 0;
  max-width: 100vw;
  max-height: var(--crm-native-status-height, 100vh);
  box-sizing: border-box;
  overflow-y: auto;
  transform: none;
  gap: 0;
  padding: 6px;
  border: 1px solid #555;
  border-radius: 10px;
  background: #232426;
}

html[data-trello-native] #roomView [data-room-order-status-context="table"] .room-order-status-option {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 400;
}

html[data-trello-native] #roomView [data-room-order-status-context="table"] .room-order-status-option.is-selected {
  background: #36383a;
}

html[data-trello-native] #roomView [data-room-order-status-context="table"] .room-order-status-option.is-selected span {
  color: white !important;
}

html[data-trello-native] body.is-crm-view-active .crm-pickup-drawer .crm-pickup-head {
  box-sizing: border-box;
  height: var(--crm-mac-row-height, 54px);
  padding-block: 0;
}

html[data-trello-native] body.is-crm-view-active .crm-pickup-head .crm-pickup-brand .crm-pickup-logo {
  width: 44.8px;
  height: 12.8px;
}

html[data-trello-native] .crm-pickup-head > button[data-pickup-close] {
  background: var(--crm-palette-hover, #303236);
}

html[data-trello-native] .crm-pickup-head > button[data-pickup-close]:hover {
  background: color-mix(in srgb, var(--crm-palette-hover, #303236), white 5%);
}

html[data-trello-native] .crm-pickup-drawer :is(.crm-pickup-times label, .crm-pickup-list > h3, .crm-pickup-empty) {
  color: var(--crm-palette-muted, #aaacaf) !important;
  font: inherit;
  font-size: 14px;
}

html[data-trello-native] .crm-pickup-drawer .crm-pickup-history input {
  border-color: var(--crm-palette-muted, #aaacaf);
}

html[data-trello-native] .crm-pickup-drawer .crm-pickup-history input:checked {
  background: var(--crm-palette-muted, #aaacaf);
}

html[data-trello-native] body.is-crm-view-active #crmPickupDrawer {
  --crm-palette-divider: #292b2d;
}

html[data-trello-native] #crmPickupDrawer #crmPickupLocations {
  border-color: var(--crm-palette-divider);
}

html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar,
.crm-receipt-calendar {
  position: relative;
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar summary,
.crm-receipt-calendar summary {
  display: flex;
  align-items: center;
  height: 44px;
  padding-inline: 12px;
  box-sizing: border-box;
  border: 1px solid var(--crm-palette-divider);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar > div,
.crm-receipt-calendar > div {
  position: absolute;
  z-index: 2;
  inset-block-start: calc(100% + 4px);
  width: min(100%, 290px);
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--crm-palette-divider);
  border-radius: 10px;
  background: var(--crm-palette-workspace, #232426);
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar header,
.crm-receipt-calendar header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar-days,
.crm-receipt-calendar .crm-pickup-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar-days span,
.crm-receipt-calendar .crm-pickup-calendar-days span {
  padding-block: 6px;
  color: var(--crm-palette-muted, #aaacaf);
  font-size: 12px;
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar button,
.crm-receipt-calendar button {
  border: 0;
  padding: 0;
  min-width: 28px;
  min-height: 32px;
  font-size: 14px;
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar button:disabled,
.crm-receipt-calendar button:disabled {
  opacity: .35;
  cursor: default;
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-calendar button[aria-pressed="true"],
.crm-receipt-calendar button[aria-pressed="true"] {
  background: var(--crm-palette-lime, #d6fa55);
  color: #18191c;
}

html[data-trello-native] #crmPickupDrawer {
  --crm-pickup-button-spacing: 30px;
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-create {
  margin-block-start: calc(var(--crm-pickup-button-spacing) - 18px);
}
html[data-trello-native] #crmPickupDrawer .crm-pickup-list {
  margin-block-start: var(--crm-pickup-button-spacing);
}

html[data-trello-native] #crmOrderSearch::-webkit-search-cancel-button {
  transform: translateX(var(--crm-clear-offset, 0px));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='%23cdcdcd'/%3E%3Cpath d='m9 9 6 6m0-6-6 6' stroke='%23121316' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

html[data-trello-native] body.is-crm-view-active
.room-order-status-control[data-room-order-status-context="table"] .room-order-status-trigger::after {
  opacity: 0.5;
}

/* Content toolbar controls share one stable vertical center, including Mac hosts
   whose older alignment observer still writes an inline SVG translation. */
html[data-trello-native] body.is-crm-view-active:has(#roomView.is-crm-content-open) .topbar :is(#crmContentColumns > summary, #crmCardBlocks > summary, #crm-two-columns-toggle) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  height: 56px;
  min-height: 56px;
  padding-block: 0;
}
html[data-trello-native] body.is-crm-view-active:has(#roomView.is-crm-content-open) .topbar :is(#crmContentColumns > summary, #crmCardBlocks > summary, #crm-two-columns-toggle) > svg {
  width: 21px !important;
  height: 21px !important;
  translate: none !important;
  transform: none !important;
}

/* Content display options own the heading switch, including installed wrappers. */
body.is-crm-view-active:has(.crm-content-page:not(.is-hidden)) .topbar
:is(#crm-table-heading-toggle, #crm-two-columns-toggle) { display: none !important; }
html.crm-content-heading-hidden #catalogView :is(.catalog-table thead, .sticky-table-head) {
  display: none !important;
}

/* Selected original Iconsax pairs: contour at rest, white filled on hover/active. */
:is(body.is-crm-view-active, body.crm-iconsax-document) svg[data-iconsax] {
  color: var(--crm-iconsax-muted, #afafaf) !important;
  fill: none !important; stroke: none !important;
}
:is(body.is-crm-view-active, body.crm-iconsax-document) svg[data-iconsax] > .crm-iconsax-bold { display: none; }
:is(body.is-crm-view-active, body.crm-iconsax-document) :is(button:hover, button.is-active, button[aria-current="page"], button[aria-pressed="true"], button[aria-selected="true"], #settingsMenuButton[aria-expanded="true"]) > svg[data-iconsax] {
  color: #fff !important;
}
:is(body.is-crm-view-active, body.crm-iconsax-document) :is(button:hover, button.is-active, button[aria-current="page"], button[aria-pressed="true"], button[aria-selected="true"], #settingsMenuButton[aria-expanded="true"]) > svg[data-iconsax] > .crm-iconsax-linear { display: none; }
:is(body.is-crm-view-active, body.crm-iconsax-document) :is(button:hover, button.is-active, button[aria-current="page"], button[aria-pressed="true"], button[aria-selected="true"], #settingsMenuButton[aria-expanded="true"]) > svg[data-iconsax] > .crm-iconsax-bold { display: inline; }
:is(body.is-crm-view-active, body.crm-iconsax-document) #crm-mac-profiles button:has(svg[data-iconsax]) { background: transparent; }
:is(body.is-crm-view-active, body.crm-iconsax-document) #crm-mac-profiles button:has(svg[data-iconsax]) img { display: none; }
:is(body.is-crm-view-active, body.crm-iconsax-document) #crm-mac-profiles svg[data-iconsax] { width: 22px; height: 22px; }

:is(body.is-crm-view-active, body.crm-iconsax-document) #crm-mac-profiles button:has(svg[data-iconsax]) { font-size: 0; }

:is(body.is-crm-view-active, body.crm-iconsax-document) svg[data-iconsax] > g { color: var(--crm-iconsax-muted, #afafaf); }
:is(body.is-crm-view-active, body.crm-iconsax-document) :is(button:hover, button.is-active, button[aria-current="page"], button[aria-pressed="true"], button[aria-selected="true"], #settingsMenuButton[aria-expanded="true"]) > svg[data-iconsax] > g { color: #fff; }
:is(body.is-crm-view-active, body.crm-iconsax-document) #roomView #authOpenButton:has(svg[data-iconsax]) { display: grid; place-items: center; }
:is(body.is-crm-view-active, body.crm-iconsax-document) #authOpenButton:has(svg[data-iconsax]) .topbar-user-avatar { display: none; }
:is(body.is-crm-view-active, body.crm-iconsax-document) #authOpenButton > svg[data-iconsax] { width: 22px; height: 22px; }

body.is-crm-settings-active #settingsMenuButton > svg[data-iconsax] > .crm-iconsax-linear,
body.is-crm-profile-active #authOpenButton > svg[data-iconsax] > .crm-iconsax-linear { display: none; }
body.is-crm-settings-active #settingsMenuButton > svg[data-iconsax] > .crm-iconsax-bold,
body.is-crm-profile-active #authOpenButton > svg[data-iconsax] > .crm-iconsax-bold { display: inline; color: #fff; }

:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-control="close-circle"]::before,
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-control="close-circle"]::after { display:none !important; }
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-control] > svg[data-iconsax] { flex-shrink:0; }
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-control="close-circle"] > svg { width:20px;height:20px; }
:is(body.is-crm-view-active, body.crm-iconsax-document) summary:hover > svg[data-iconsax] > .crm-iconsax-linear,
:is(body.is-crm-view-active, body.crm-iconsax-document) details[open] > summary > svg[data-iconsax] > .crm-iconsax-linear { display:none; }
:is(body.is-crm-view-active, body.crm-iconsax-document) summary:hover > svg[data-iconsax] > .crm-iconsax-bold,
:is(body.is-crm-view-active, body.crm-iconsax-document) details[open] > summary > svg[data-iconsax] > .crm-iconsax-bold { display:inline;color:#fff; }

:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-control]:hover > svg[data-iconsax] > .crm-iconsax-linear { display:none; }
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-control]:hover > svg[data-iconsax] > .crm-iconsax-bold { display:inline;color:#fff; }

:is(body.is-crm-view-active, body.crm-iconsax-document) .crm-order-marker-filter > summary.is-active > svg[data-iconsax] > .crm-iconsax-linear { display:none; }
:is(body.is-crm-view-active, body.crm-iconsax-document) .crm-order-marker-filter > summary.is-active > svg[data-iconsax] > .crm-iconsax-bold { display:inline;color:#fff; }

/* Collapse keeps its original contour; refresh uses the selected mixed Linear pair. */
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-utility="collapse"] > svg[data-iconsax] > .crm-iconsax-linear { display: inline !important; }
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-utility="collapse"] > svg[data-iconsax] > .crm-iconsax-bold { display: none !important; }
:is(body.is-crm-view-active, body.crm-iconsax-document) :is([data-purchase-control="open-cart"], #open-cart)[aria-expanded="true"] > svg[data-iconsax] > .crm-iconsax-linear { display:none; }
:is(body.is-crm-view-active, body.crm-iconsax-document) :is([data-purchase-control="open-cart"], #open-cart)[aria-expanded="true"] > svg[data-iconsax] > .crm-iconsax-bold { display:inline;color:#fff; }

/* Original grid-4 has its narrow strip at left; clockwise 90deg puts it on top. */
:is(body.is-crm-view-active, body.crm-iconsax-document) #crm-two-columns-toggle > svg[data-iconsax="grid-4"] { transform:rotate(90deg);transform-origin:center; }

body.is-crm-view-active .topbar-search:is(:hover, :focus-within) > [data-crm-iconsax-control="search-normal-1"] > svg > .crm-iconsax-linear { display:none; }
body.is-crm-view-active .topbar-search:is(:hover, :focus-within) > [data-crm-iconsax-control="search-normal-1"] > svg > .crm-iconsax-bold { display:inline;color:#fff; }

/* Keep the selected filter pair on hover while preserving the reset action. */
body.is-crm-view-active .crm-purchases-filter-reset > svg[data-iconsax="filter"] { display:block !important; }
body.is-crm-view-active .crm-purchases-filter-reset > .crm-purchases-reset-icon { display:none !important; }

/* Keep the original refresh outline; only its colour and rotation change. */
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-utility="refresh"]:hover { background: transparent !important; }
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-utility="refresh"] > svg[data-iconsax] > .crm-iconsax-linear { display: inline !important; }
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-utility="refresh"] > svg[data-iconsax] > .crm-iconsax-bold { display: none !important; }
:is(body.is-crm-view-active, body.crm-iconsax-document) [data-crm-iconsax-utility="refresh"] > svg[data-iconsax] { animation: none !important; transform-origin: center; transform-box: view-box; }

/* Shared refresh hint: roomy CRM typography and palette, including stock time. */
.crm-refresh-tooltip {
  position: fixed;
  z-index: 10050;
  box-sizing: border-box;
  width: max-content;
  max-width: min(360px, calc(100vw - 16px));
  padding: 14px 18px;
  border: 1px solid var(--crm-divider-color, #383a3d);
  border-radius: 8px;
  background: var(--crm-palette-header, #242528);
  color: var(--crm-palette-text, #cdcdcd);
  font: 400 14px/1.5 system-ui, sans-serif;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 8px 24px #0005;
}
.crm-refresh-tooltip[hidden] { display: none; }
