/* Order-entry layout owns its spacing here. Keep rules scoped: lists, reports,
   print documents and the desktop shell must not inherit phone form overrides. */
.entry-workspace [hidden] { display: none !important; }
.entry-workspace input:focus-visible,
.order-picker input:focus-visible { outline: 2px solid #21745e; outline-offset: 2px; }
.entry-workspace input { font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  html[data-native-shell="true"] .app-shell:is([data-route="new-order"], [data-route="return-order"], [data-route="edit-order"]) {
    padding-bottom: 0;
  }
  .app-shell:is([data-route="new-order"], [data-route="return-order"], [data-route="edit-order"]) .main-content {
    padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom: 100px;
    background: #fff;
  }
  #order-form.entry-workspace {
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  #order-form.entry-workspace > :is(.order-v3-customer, .order-v3-products, details) {
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 18px !important;
    border: 0 !important;
    border-bottom: 8px solid #f3f5f3 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  #order-form.entry-workspace .order-v6-draft-notice {
    min-height: 40px;
    margin: 0;
    padding: 6px 18px;
    border: 0;
    border-radius: 0;
    background: #f7f8f6;
    box-shadow: none;
  }
  .entry-workspace .order-v6-draft-notice > span { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
  .entry-workspace .order-v6-draft-notice strong,
  .entry-workspace .order-v6-draft-notice small { font-size: 12px; }
  #order-form.entry-workspace .order-v6-draft-notice :is(strong, small) { color: #707970; font-weight: 400; }
  #order-form.entry-workspace .order-v6-draft-notice > button { min-height: 36px; padding: 0; border: 0; background: none; color: #777d77; box-shadow: none; font-size: 12px; }
  .entry-workspace.has-customer .order-v3-customer > header { display: none; }
  #order-form.entry-workspace .order-v3-customer-row {
    display: flex;
    min-height: 54px !important;
    gap: 10px;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    text-align: left;
  }
  .entry-workspace .order-v3-customer-row > span:nth-child(2) { display: flex; flex: 1; flex-direction: column-reverse; min-width: 0; gap: 5px; }
  .entry-workspace .order-v3-customer-row strong { font-size: 18px !important; line-height: 1.3; }
  .entry-workspace .order-v3-customer-row small { font-size: 12px !important; }
  .entry-workspace .order-v3-customer-row > b { flex: none; font-size: 12px !important; }
  .entry-workspace .order-v3-customer-avatar { width: 36px; height: 36px; border-radius: 10px; }
  .entry-workspace .v221-customer-account { display: none; }
  /* The customer's balance remains available in the customer picker / ledger. */
  #order-form.entry-workspace .v221-order-meta {
    margin: 10px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-top: 1px solid #edf0ee !important;
    border-radius: 0 !important;
  }
  .entry-workspace .v221-order-meta > summary { min-height: 42px; padding: 8px 0 0 !important; }
  .entry-workspace .v221-order-meta > summary > span { display: flex; min-width: 0; gap: 8px; align-items: center; }
  .entry-workspace .v221-order-meta > summary strong { flex: none; font-size: 12px !important; font-weight: 500; color: #69766f; }
  .entry-workspace .v221-order-meta > summary small { overflow: hidden; font-size: 12px !important; text-overflow: ellipsis; white-space: nowrap; }
  .entry-workspace .v221-order-meta > summary b { font-size: 12px; }
  .entry-workspace .order-v3-products > header { margin: 0 0 10px !important; padding: 0 !important; }
  .entry-workspace .order-v3-products > header h2 { font-size: 16px !important; }
  .entry-workspace .order-v3-products > header h2 small { font-size: 12px !important; }
  .entry-workspace .order-v3-products > header > button {
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: #edf5f1;
    color: #18634e;
    font-size: 14px !important;
    font-weight: 650;
  }
  .entry-workspace #line-items { gap: 0; margin: 0; }
  #order-form.entry-workspace :is(.v7-inline-line, .order-v9-line) {
    margin: 0 !important;
    padding: 14px 0 !important;
    border: 0 !important;
    border-top: 1px solid #edf0ee !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .entry-workspace .v7-inline-line.simple { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px 14px; }
  .entry-workspace .v7-inline-line .v6-line-main { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto 36px; gap: 10px; align-items: start; }
  .entry-workspace .v6-line-main > span strong { font-size: 16px !important; line-height: 1.5; white-space: normal !important; overflow: visible; text-overflow: clip; font-weight: 600; }
  .entry-workspace .v6-line-main > span small,
  .entry-workspace .v6-line-main > span em { font-size: 12px !important; }
  .entry-workspace .v6-line-main > b { color: #25382f; font-size: 18px !important; font-variant-numeric: tabular-nums; }
  .entry-workspace .order-v9-line-more { width: 36px; height: 44px; font-size: 12px; border-radius: 0; background: none; border: 0; color: #707970; }
  .entry-workspace .v7-inline-line .v6-inline-stepper {
    display: grid;
    width: 100%;
    height: 46px;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    grid-column: 1;
    grid-row: 2;
    border: 1px solid #dce5df;
    border-radius: 9px;
    overflow: visible;
    background: #f7f9f8;
  }
  .entry-workspace .v6-inline-stepper button { width: 38px; height: 44px; min-height: 44px; font-size: 21px; background: transparent; }
  .entry-workspace .v6-inline-stepper input { width: 100%; min-width: 0; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 5px; background: transparent; font-size: 18px; text-align: center; }
  .entry-workspace .v7-inline-line .v7-inline-price { display: flex; grid-column: 2; grid-row: 2; gap: 7px; width: 100%; margin: 0; padding: 0 8px; border: 1px solid #dce5df; border-radius: 9px; background: #f7f9f8; }
  .entry-workspace .v7-inline-price span { flex: none; font-size: 12px; }
  .entry-workspace .v7-inline-price input { min-width: 0; width: 100%; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 5px; background: transparent; font-size: 18px; text-align: right; }
  .entry-workspace [aria-invalid="true"] { outline: 2px solid #ac5b42; outline-offset: 2px; }
  .entry-workspace .needs-correction [data-line-amount] { color: #96533d; font-size: 14px !important; }
  .entry-workspace [data-order-line-summary] { scroll-margin-block: 110px; }
  .entry-workspace .order-v8-line-summary { padding: 0; }
  .entry-workspace .order-v8-line-summary strong { font-size: 16px; line-height: 1.5; font-weight: 600; white-space: normal !important; overflow: visible; text-overflow: clip; }
  .entry-workspace .order-v8-line-summary em { font-size: 14px; }
  .entry-workspace .v221-order-settlement > summary { display: flex; min-height: 36px; padding: 0 !important; }
  .entry-workspace .v221-order-settlement > summary > span { display: flex; flex: 1; gap: 16px; align-items: center; }
  .entry-workspace .v221-order-settlement > summary small { font-size: 13px; }
  .entry-workspace .v221-order-settlement > summary strong { font-size: 16px; }
  .entry-workspace .v221-order-settlement > summary b { font-size: 12px; }
  .entry-workspace :is(.v221-order-meta, .v221-order-settlement)[open] > summary b { font-size: 0 !important; }
  .app-shell > .order-footer[data-order-action-dock] {
    position: fixed;
    z-index: 55;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid !important;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 43%) !important;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    border: 0;
    border-top: 1px solid #e0e6e2;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }
  .app-shell > .order-footer[data-order-action-dock] .v231-order-total { grid-column: 1; grid-row: 1; min-width: 0; }
  .app-shell > .order-footer[data-order-action-dock] .v231-order-total > strong { font-size: 24px; letter-spacing: -.5px; }
  .app-shell > .order-footer[data-order-action-dock] .v231-order-total > span { font-size: 12px; }
  .app-shell > .order-footer[data-order-action-dock] .v231-order-total em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell > .order-footer[data-order-action-dock] > .button.primary {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border-radius: 10px;
    background: #17644f;
    font-size: 16px;
  }
}

