:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    sans-serif;
  color: #183431;
  background: #f3f6f5;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #147d6b;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a.button {
  border: 0;
  border-radius: 7px;
  padding: 10px 16px;
  background: #176b5d;
  color: white;
  cursor: pointer;
  text-decoration: none;
}
button:hover {
  background: #105447;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #e6eeeb;
  color: #23433a;
}
.danger {
  background: #a53c39;
}
input,
select,
textarea {
  border: 1px solid #c9d7d0;
  border-radius: 6px;
  padding: 10px;
  background: white;
  color: #183431;
  max-width: 100%;
}
input:focus,
textarea:focus {
  outline: 2px solid #86c9b5;
}
input[type="checkbox"] {
  width: auto;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: #536a62;
}
.check {
  flex-direction: row;
  align-items: center;
}
header {
  background: #123d34;
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
header small {
  color: #b2d0c5;
}
header h1 {
  font-size: 20px;
  margin: 4px 0;
}
nav {
  display: flex;
  gap: 6px;
  background: white;
  border-bottom: 1px solid #dce5e0;
  padding: 10px 28px;
  flex-wrap: wrap;
}
nav button {
  background: transparent;
  color: #456456;
}
nav button.active {
  background: #e4f0e9;
  color: #12513e;
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 28px;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.5px;
  margin: 0 0 20px;
}
h3 {
  margin: 0 0 14px;
  font-size: 17px;
}
.muted {
  color: #72847a;
  font-size: 13px;
}
.card {
  background: white;
  border: 1px solid #dce5df;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat strong {
  display: block;
  font-size: 32px;
  margin-top: 16px;
}
.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar input {
  max-width: 230px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
}
th {
  text-align: left;
  color: #6d8277;
  font-size: 12px;
  letter-spacing: 0.5px;
  background: #f4f7f5;
  padding: 13px;
}
td {
  padding: 14px 13px;
  border-bottom: 1px solid #ecf0ed;
  font-size: 14px;
}
td button {
  padding: 6px 10px;
  margin-right: 4px;
}
td input {
  max-width: 160px;
}
.badge {
  display: inline-block;
  background: #edf5f0;
  color: #267353;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 12px;
}
.billed-order-mark {
  display: block;
  width: max-content;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e1f0e7;
  color: #24634c;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}
.warning {
  color: #995820;
  background: #fff4e4;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-aside {
  background: #123d34;
  color: #fff;
  padding: 12vh 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-aside h1 {
  font-size: 44px;
  line-height: 1.3;
  font-weight: 550;
  max-width: 470px;
}
.login-aside p {
  line-height: 1.9;
  color: #b7d2c7;
  max-width: 380px;
}
.eyebrow {
  letter-spacing: 3px;
  font-size: 11px;
}
.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}
.login-box {
  width: 370px;
}
.login-box label {
  margin: 20px 0;
}
.login-box button {
  width: 100%;
  margin-top: 10px;
}
.login-box h2 {
  font-size: 30px;
}
.total {
  font-size: 24px;
  font-weight: 600;
}
.details p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pager {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 20px;
}
.notice {
  padding: 12px;
  background: #fff5e5;
  border-radius: 6px;
  color: #825721;
  line-height: 1.6;
}
.wide {
  grid-column: 1/-1;
}
[hidden] {
  display: none !important;
}
.small {
  max-width: 600px;
}
.empty {
  text-align: center;
  color: #83948a;
  padding: 35px;
}
@media (max-width: 800px) {
  .login {
    grid-template-columns: 1fr;
  }
  .login-aside {
    padding: 30px;
  }
  .login-aside h1 {
    font-size: 28px;
  }
  .login-aside p {
    display: none;
  }
  .grid,
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  main {
    padding: 16px;
  }
  .card {
    padding: 16px;
  }
  header {
    padding: 15px;
  }
  nav {
    padding: 8px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar label {
    flex: 1;
  }
}
@media (max-width: 500px) {
  .grid,
  .stats {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
}
/* Spreadsheet-style order entry */
main.sheet-page {
  max-width: none;
  padding: 24px 20px 30px;
  background: #f5f7f8;
}
.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.sheet-heading h2 {
  margin: 0 0 8px;
  font-size: 25px;
}
.sheet-heading p {
  margin: 0;
  font-size: 13px;
  color: #6a7c74;
}
.sheet-heading button {
  white-space: nowrap;
}
.sheet-hint {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: #6b7880;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d5dce0;
  border-bottom: 0;
}
.order-grid-wrap {
  overflow: auto;
  border: 1px solid #cdd6dc;
  background: white;
  max-height: 70vh;
}
.order-grid {
  table-layout: fixed;
  min-width: 1800px;
  white-space: normal;
  font-size: 13px;
}
.order-grid .col-date {
  width: 65px;
}
.order-grid .col-sku {
  width: 320px;
}
.order-grid .col-count {
  width: 65px;
}
.order-grid .col-person {
  width: 135px;
}
.order-grid .col-phone {
  width: 145px;
}
.order-grid .col-state {
  width: 140px;
}
.order-grid .col-city {
  width: 140px;
}
.order-grid .col-zip {
  width: 120px;
}
.order-grid .col-address {
  width: 245px;
}
.order-grid .col-tracking {
  width: 175px;
}
.order-grid .col-money {
  width: 110px;
}
.order-grid .col-actions {
  width: 130px;
}
.order-grid th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff52a;
  color: #b63320;
  border-right: 1px solid #d2d7c5;
  border-bottom: 1px solid #c5cdd2;
  text-align: center;
  font-size: 13px;
  padding: 11px 6px;
  letter-spacing: 0;
}
.order-grid th.result {
  background: #13afe0;
  color: #08364c;
}
.order-grid th.neutral {
  background: #eef1f3;
  color: #43515a;
}
.order-grid td {
  border-right: 1px solid #dce2e6;
  border-bottom: 1px solid #dce2e6;
  padding: 10px 7px;
  vertical-align: top;
  font-size: 13px;
}
.order-grid input,
.order-grid select {
  width: 100%;
  max-width: none;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 5px;
  border-radius: 3px;
  font-size: 13px;
  color: #263b46;
}
.order-grid input:hover,
.order-grid select:hover {
  border-color: #d8e2e4;
}
.order-grid input:focus,
.order-grid select:focus {
  background: #fff;
  outline: 2px solid #16896d;
  outline-offset: 0;
}
.order-grid input::placeholder {
  color: #9aa6ad;
  font-size: 12px;
}
.order-grid .order-quantity {
  text-align: center;
  font-size: 17px;
  font-weight: 650;
  padding-top: 18px;
  color: #214637;
}
.record-date {
  text-align: center;
  color: #74838b;
}
.row-number {
  display: block;
  font-size: 10px;
  color: #a2adb3;
  margin-bottom: 10px;
}
.order-date {
  font-size: 12px;
}
.sku-entry {
  margin-bottom: 8px;
}
.sku-entry-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}
.sku-entry-controls .sku-code {
  flex: 1;
  min-width: 100px;
  background: #f8fafb;
  border-color: #e3e8eb;
}
.sku-entry-controls .sku-quantity {
  width: 59px;
  border-color: #e3e8eb;
  background: #fff;
}
.sku-entry-controls .times {
  font-size: 13px;
  color: #8e9da3;
}
.order-grid .remove-sku {
  padding: 3px 6px;
  background: transparent;
  color: #a77d7d;
  font-size: 18px;
  margin: 0;
}
.sku-stock {
  font-size: 10px;
  color: #7e8d93;
  line-height: 1.5;
  padding: 3px 2px;
  overflow-wrap: anywhere;
}
.order-grid .add-sku {
  background: #eaf5ef;
  color: #187252;
  padding: 5px 10px;
  font-size: 12px;
}
.order-grid .submit-row {
  font-size: 12px;
  padding: 8px 12px;
  margin: 2px 0 8px;
}
.order-grid .remove-row {
  font-size: 11px;
  padding: 5px 10px;
  margin: 0;
  color: #788990;
  background: #f3f5f6;
}
.order-goods {
  display: block;
  color: #1b6254;
  font-size: 16px;
  margin: 9px 0 7px;
}
.amount-caption {
  font-size: 10px;
  color: #85949c;
}
.order-tracking {
  color: #8a989f;
  font-size: 11px !important;
  overflow-wrap: anywhere;
}
.row-result {
  font-size: 11px;
  color: #4b7d6c;
  line-height: 1.5;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.order-grid .order-extra td {
  background: #fafcfb;
  padding: 8px 14px;
  border-bottom: 2px solid #bdcbd0;
}
.row-extras {
  display: grid;
  grid-template-columns: 185px 220px 270px minmax(260px, 1fr);
  gap: 18px;
  align-items: center;
  max-width: 1750px;
}
.row-extras label {
  font-size: 10px;
  color: #87969b;
  gap: 2px;
}
.row-extras input,
.row-extras select {
  padding: 5px;
  background: #fff;
  border: 1px solid #e2e9e6;
  font-size: 12px;
}
.row-recommendation {
  font-size: 11px;
  color: #648474;
  line-height: 1.6;
}
.sheet-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 0;
  font-size: 12px;
  color: #75838b;
}
.submitted .order-record td {
  background: #f4faf6;
}
.submitted .sku-stock {
  color: #a4b1a8;
}
@media (max-width: 700px) {
  main.sheet-page {
    padding: 16px 10px;
  }
  .sheet-heading {
    align-items: flex-start;
  }
  .sheet-heading h2 {
    font-size: 21px;
  }
  .sheet-heading p {
    line-height: 1.6;
  }
  .sheet-hint {
    flex-direction: column;
    gap: 5px;
  }
  .order-grid-wrap {
    max-height: 65vh;
  }
}

/* Keep per-order actions reachable while viewing a wide order sheet. */
.order-grid thead th:nth-child(12) {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #e9eff1;
}
.order-grid .order-record > td:nth-child(12) {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -4px 0 8px #17372f12;
}

.paste-panel{background:white;border:1px solid #ccd9d4;border-radius:8px;padding:16px 18px;margin:0 0 18px}.paste-panel summary{cursor:pointer;font-weight:700;color:#174b40}.paste-panel p{font-size:13px;color:#52655e}.paste-panel textarea{width:100%;box-sizing:border-box;font-family:inherit;margin:6px 0 12px}.paste-panel .toolbar{align-items:center}.paste-panel #paste-result{font-size:13px;color:#416056}.paste-review{padding:8px 12px;background:#fff3cd;color:#664d03;white-space:normal;max-width:950px}.paste-review p{margin:4px 0}

.order-grid .paste-review .check {display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;white-space:normal;}
.order-grid .paste-review input[type="checkbox"] {width:16px;min-width:16px;height:16px;flex:0 0 16px;margin:0;padding:0;}

/* Compact SKU text with inline editing on click. */
.sku-lines {display:flex;flex-wrap:wrap;align-items:center;gap:3px 0;}
.order-grid .sku-entry {display:inline-flex;align-items:center;margin:0;max-width:100%;}
.order-grid .sku-entry:not(:last-child):not(.editing)::after {content:'，';color:#536a62;}
.order-grid .sku-summary {background:transparent;border:0;color:#174b40;padding:4px 2px;border-radius:3px;font-size:13px;white-space:nowrap;}
.order-grid .sku-summary:hover {background:#e6f2ec;text-decoration:underline;}
.order-grid .sku-entry:not(.editing) .sku-entry-controls,
.order-grid .sku-entry:not(.editing) .sku-stock,
.order-grid .sku-entry:not(.editing) .sku-done {display:none;}
.order-grid .sku-entry.editing {display:block;flex-basis:100%;padding:8px;background:#f2f7f4;border:1px solid #c9d7d0;border-radius:5px;margin:4px 0;box-sizing:border-box;}
.order-grid .sku-entry.editing .sku-summary {display:none;}
.order-grid .sku-done {padding:4px 12px;font-size:12px;margin-top:6px;}

/* Small inline editor: controls share one row, stock stays visible below. */
.order-grid .sku-entry.editing {
 display:inline-grid;grid-template-columns:84px 8px 44px 34px 18px;
 gap:2px 3px;align-items:center;flex:0 0 auto;width:auto;
 padding:3px;margin:2px 3px 2px 0;border-radius:4px;
}
.order-grid .sku-entry.editing .sku-entry-controls {display:contents;}
.order-grid .sku-entry.editing .sku-code,
.order-grid .sku-entry.editing .sku-quantity {
 min-width:0;width:100%;height:25px;box-sizing:border-box;
 padding:2px 4px;font-size:12px;line-height:19px;border-radius:3px;
}
.order-grid .sku-entry.editing .sku-code {grid-column:1;grid-row:1;}
.order-grid .sku-entry.editing .times {grid-column:2;grid-row:1;}
.order-grid .sku-entry.editing .sku-quantity {grid-column:3;grid-row:1;}
.order-grid .sku-entry.editing .remove-sku {
 grid-column:5;grid-row:1;padding:0;width:18px;height:25px;font-size:16px;
}
.order-grid .sku-entry.editing .sku-done {
 grid-column:4;grid-row:1;padding:0 4px;margin:0;height:25px;
 font-size:11px;line-height:25px;border-radius:3px;
}
.order-grid .sku-entry.editing .sku-stock {
 grid-column:1 / -1;grid-row:2;padding:0 1px;font-size:10px;line-height:13px;
}

.order-grid {min-width:0;}
.order-grid .col-address2 {width:180px;}
.order-grid th {padding-right:12px;}
.column-resize {position:absolute;right:0;top:0;width:9px;height:100%;cursor:col-resize;touch-action:none;user-select:none;z-index:5;}
.column-resize::after {content:'';position:absolute;right:0;top:15%;height:70%;width:2px;background:#8c9d9a70;}
.column-resize:hover::after,.column-resize.dragging::after,.column-resize:focus::after {width:3px;background:#176d55;}
.column-resize:focus-visible {outline:2px solid #176d55;outline-offset:-2px;}
.row-extras {grid-template-columns:185px 270px minmax(260px,1fr);}
.order-grid .order-record > td {overflow-wrap:anywhere;}

.paste-format-wrap{overflow-x:auto;margin:10px 0;border:1px solid #d3dfd9;border-radius:4px;}
.paste-panel .paste-format{width:100%;min-width:1000px;border-collapse:collapse;font-size:12px;}
.paste-panel .paste-format th,.paste-panel .paste-format td{padding:8px 10px;text-align:left;border-right:1px solid #d3dfd9;white-space:nowrap;}
.paste-panel .paste-format th{background:#edf5f0;color:#234c40;font-weight:600;}
.paste-panel .paste-format td{background:white;color:#52655e;}
.paste-panel .paste-help{font-size:12px;line-height:1.65;margin:8px 0;}

.shortage-banner {position:sticky;top:0;z-index:50;padding:12px 18px;background:#fff0ed;border:1px solid #e1a298;color:#942b1e;font-weight:600;box-shadow:0 2px 5px #0001;}
.shortage-banner[hidden] {display:none;}
.order-grid .col-fulfillment {width:130px;}
.fulfillment-cell {color:#174b40;font-weight:600;}

/* Notes occupy the last column; only review warnings remain below an order. */
.order-grid .col-note {width:220px;}
.order-grid tbody:not(.source-order) .row-extras {display:none;}
.order-grid tbody:not(.source-order) .order-extra:not(:has(.paste-review:not([hidden]))) {display:none;}
.order-grid .shortage-only > .order-record,
.order-grid .shortage-only > .order-extra {display:none;}
.order-grid .shortage-message[hidden] {display:none;}
.order-grid .shortage-message td {padding:8px 12px;background:#fff4df;color:#925317;border-top:1px solid #ebd9b9;}
.order-grid .shortage-message span {position:sticky;left:12px;display:inline-block;white-space:normal;max-width:75vw;}

/* Compact default rows; wrapped SKU chips determine height as needed. */
.order-grid .order-record > td {padding:5px 6px;vertical-align:middle;height:auto;}
.order-grid .order-record input[data-field],.order-grid .order-record select {padding:4px 3px;height:28px;box-sizing:border-box;}
.order-grid .order-quantity {padding-top:5px;}
.order-grid .row-number {margin-bottom:2px;}
.order-grid .sku-summary {padding:2px;line-height:20px;}
.order-grid .sku-lines {gap:0;}
.order-grid .add-sku {padding:2px 7px;line-height:20px;}
.order-grid .submit-row {padding:4px 8px;margin:0 0 3px;line-height:18px;}
.order-grid .remove-row {padding:2px 6px;line-height:16px;}
.order-grid .row-result:empty {display:none;}

.order-grid .remove-shortage {position:sticky;left:260px;background:transparent;color:#925317;text-decoration:underline;padding:0 5px;margin-left:12px;}

.sheet-hint[hidden] {display:none;}

.order-grid .sku-entry.editing .sku-stock:empty {display:none;}

.order-grid .save-draft,.order-grid .save-origin-draft {font-size:11px;padding:3px 5px;margin:2px 2px 0 0;}
.order-grid .save-shortage {position:sticky;left:230px;color:#925317;background:transparent;text-decoration:underline;}

.order-grid .origin-draft-bar[hidden] {display:none;}
.order-grid .origin-draft-bar > td {padding:5px 8px;background:#f0f6f3;border-top:1px solid #cdded5;}
.origin-draft-actions {position:sticky;left:8px;display:inline-flex;align-items:center;gap:12px;max-width:80vw;}
.origin-draft-label {font-size:12px;color:#536b61;}
.order-grid .origin-draft-actions .save-origin-draft {margin:0;padding:3px 9px;white-space:nowrap;}

.order-date-group {margin:12px 0;border:1px solid #d2dfdb;border-radius:6px;overflow:hidden;}
.order-date-group > summary {cursor:pointer;padding:14px 16px;background:#edf5f2;color:#174f45;font-weight:600;}
.order-date-group > summary span {margin-left:12px;font-size:13px;font-weight:400;}
.order-date-group[open] > summary {border-bottom:1px solid #d2dfdb;}

.paste-footer-actions {display:flex;justify-content:flex-end;margin-top:12px;}

.return-reason {white-space:pre-wrap;overflow-wrap:anywhere;max-width:360px;}

.order-grid .sku-insufficient .sku-summary, .order-grid .sku-insufficient .sku-code, .order-grid .shortage-sku {color:#c62828;font-weight:700;}

[data-date="returned"] .return-reason {min-width:240px;width:28%;max-width:420px;}
.returned-actions {min-width:150px;}
.returned-actions-top {display:flex;gap:6px;align-items:center;white-space:nowrap;}
.returned-actions-bottom {margin-top:8px;}
.returned-actions button {margin:0;white-space:nowrap;}
/* Admin date range: two calendars with quick ranges. */
.date-range{position:relative;display:flex;align-items:center;gap:8px;align-self:end;margin-bottom:0}.date-caption{white-space:nowrap;font-size:13px;color:#536865}.range-trigger{min-width:275px;border:1px solid #bfd0d4;background:white;text-align:left;color:#233c39}.range-popup[hidden]{display:none}.range-popup{position:absolute;top:calc(100% + 6px);left:0;z-index:80;display:flex;width:720px;max-width:calc(100vw - 60px);background:white;border:1px solid #d7dfe2;border-radius:6px;box-shadow:0 6px 24px #173d3026;color:#313c44;padding:10px}.range-popup aside{display:flex;flex-direction:column;width:98px;flex-shrink:0;border-right:1px solid #e6ebed;padding:0 8px 0 0}.range-popup button{background:transparent;color:#35424b;border:0;padding:6px;font-weight:400;border-radius:4px;font-size:13px}.range-popup button:hover{background:#edf4f8}.range-popup aside button{text-align:left;padding:8px}.range-calendars{display:flex;flex-wrap:wrap;flex:1;min-width:0}.range-month{width:50%;padding:0 8px}.range-month header{background:transparent;color:inherit;display:flex;gap:2px;padding:0;margin:0 0 12px;border-bottom:1px solid #eef0f2;align-items:center;min-height:40px}.range-month header strong{flex:1;text-align:center;font-size:14px;white-space:nowrap}.range-week,.range-days{display:grid;grid-template-columns:repeat(7,1fr);text-align:center}.range-week span{font-size:12px;color:#71818a;padding:8px 0}.range-popup .range-day{height:35px;padding:0;border-radius:0}.range-popup .outside{color:#b1b8c1}.range-popup .between{background:#f0f2f5}.range-popup .selected{background:#0868ef;color:white;border-radius:50%}.range-calendars footer{width:100%;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e9edef;margin-top:10px;padding-top:6px;font-size:12px;color:#72848c}@media(max-width:760px){.range-popup{position:fixed;top:20%;left:10px;width:calc(100vw - 20px);max-width:none}.range-popup aside{width:75px}.range-month{padding:0 3px}.range-month header strong{font-size:12px}.range-popup button{padding:4px}}

.date-range .range-trigger:hover,
.date-range .range-trigger:focus,
.date-range .range-trigger:active,
.date-range .range-trigger[aria-expanded="true"] { background:#fff; color:#233c39; border-color:#9ab7b1; }
.date-range .range-trigger:focus-visible { outline:2px solid #176d55; outline-offset:2px; }

.warehouse-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.warehouse-metrics{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:16px;margin-top:24px}.warehouse-metrics strong{display:block;font-size:28px;margin-top:10px;overflow-wrap:anywhere}.warehouse-metrics small{font-size:13px;font-weight:400}.warehouse-stats h3{margin-top:0}@media(max-width:850px){.warehouse-stats{grid-template-columns:1fr}}

#filters a.button.secondary, #filters a.button.secondary:hover, #filters a.button.secondary:focus, #filters a.button.secondary:active { background:#e6eeeb; color:#23433a; }

.pending-sku{width:250px;min-width:250px;max-width:300px;line-height:1.5;font-size:13px}.pending-sku span{white-space:nowrap}.pending-quantity{white-space:nowrap;font-weight:600;text-align:center}

.pending-address{min-width:150px;max-width:250px;overflow-wrap:anywhere}.pending-date{white-space:nowrap}.pending-date > span{display:block;line-height:1.5}

.pending-recipient{width:110px;min-width:110px;max-width:110px;white-space:normal;overflow-wrap:anywhere;line-height:1.5}

.return-order-dialog{width:420px;max-width:calc(100vw - 36px);border:1px solid #d2dfda;border-radius:10px;padding:24px;color:#183431;box-shadow:0 12px 40px #18343130}.return-order-dialog::backdrop{background:#0005}.return-order-dialog h3{margin:0 0 18px}.return-order-dialog textarea{width:100%;resize:vertical}.return-order-dialog .actions{justify-content:flex-end}.return-dialog-error{color:#b3261e;font-size:13px}

button.tracking-copy{background:transparent;color:#147d6b;padding:0;border:0;text-align:left;font-size:inherit;overflow-wrap:anywhere}button.tracking-copy:hover{background:transparent;color:#105447;text-decoration:underline}.shipped-date{width:100px;min-width:100px;white-space:nowrap}.shipped-date span{display:block;line-height:1.5}

.shipped-tracking{width:22ch;min-width:22ch;white-space:nowrap;font-variant-numeric:tabular-nums}.shipped-tracking button.tracking-copy{white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}

.allocation-dialog{width:640px;max-height:80vh;overflow:auto}.allocation-dialog section{border-bottom:1px solid #d2dfda;padding:8px 0}.allocation-dialog li{margin:8px 0;line-height:1.6}

.allocation-dialog{width:560px;padding:16px 20px}.allocation-dialog h3{margin:0 0 10px}.allocation-dialog section{padding:4px 0}.allocation-dialog h4{margin:6px 0}.allocation-dialog ul{margin:6px 0;padding-left:20px}.allocation-dialog li{margin:5px 0;line-height:1.5}.allocation-dialog .actions{justify-content:center;margin:12px 0 0}.allocation-dialog .actions button{min-width:88px}

.paste-input-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}.paste-input-heading label{margin:0}.paste-input-heading button{padding:5px 12px;font-size:13px}

.batch-submit-bar{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;color:#183431}.batch-submit-bar[hidden]{display:none}.batch-summary{font-size:14px}.batch-result{font-size:13px}.sheet-footer:has(.batch-submit-bar){align-items:center;gap:12px;flex-wrap:wrap}

.paste-address-reminder{flex:1;font-size:13px;line-height:1.5;color:#506b65}.paste-input-heading{flex-wrap:wrap}.paste-input-heading label,.paste-input-heading button{flex-shrink:0}@media(max-width:640px){.paste-address-reminder{flex-basis:100%;order:3}}

.detail-products-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 8px;font-size:13px}.detail-products-title span{color:#627a73}.detail-products-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:6px}.detail-product{padding:8px 10px;background:#f3f8f6;border:1px solid #dfebe5;border-radius:4px;font-size:13px;overflow-wrap:anywhere}.detail-product strong{font-weight:500}.detail-product-prices{display:flex;flex-direction:column;gap:3px;margin-top:6px;font-size:12px;color:#627a73}

.pending-order-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:92px}

.intercept-confirm-dialog{position:fixed;inset:auto;margin:0;width:380px;padding:20px;max-height:calc(100dvh - 24px);overflow:auto}.intercept-confirm-dialog h3{padding-right:24px;margin-bottom:12px}.intercept-confirm-dialog .actions{justify-content:center}.intercept-confirm-dialog .dialog-close{position:absolute;right:8px;top:6px;padding:2px 8px;background:transparent;color:#506b65;font-size:24px;line-height:1.2}.intercept-confirm-dialog .dialog-close:hover{background:#edf4f1}.intercept-confirm-dialog .actions button{min-width:88px}

.order-grid .buyer-separator>td{background:#fff5df;border-top:1px solid #ead9af;border-bottom:1px solid #ead9af;padding:8px 12px;color:#725627;font-size:13px;line-height:1.5}.buyer-separator-content{position:sticky;left:12px;width:max-content;max-width:calc(100vw - 90px);white-space:normal}

.order-grid .buyer-grouped>.shortage-message{display:none}.buyer-separator-content .paste-review{margin:4px 0;padding:4px 0;background:transparent}.buyer-shortage{margin-top:4px;color:#a33c0b;font-weight:600}

.order-grid .buyer-separator:not(.has-issues)>td{height:7px;padding:0;line-height:0;font-size:0}.buyer-separator:not(.has-issues) .buyer-separator-content{display:none}.order-grid .buyer-separator.has-issues>td{height:auto;padding:6px 12px}

.paste-table-preview{border:1px solid #c4d8d0;border-radius:6px;overflow:auto;max-height:340px;background:white;margin-bottom:12px}.paste-table-preview table{width:100%;min-width:900px;border-collapse:collapse;font-size:13px}.paste-table-preview td{padding:9px 10px;border:1px solid #dce7e2;vertical-align:top;min-width:65px;max-width:300px;white-space:pre-wrap;overflow-wrap:anywhere}.paste-table-preview td:first-child{min-width:220px}.paste-table-preview[hidden],#paste-input[hidden],#edit-paste[hidden]{display:none}
.shipment-bill .bill-errors{max-height:220px;overflow:auto;background:#fff3df;color:#a1441b;padding:10px 14px;margin:12px 0;line-height:1.8}
.shipment-bill .bill-checks{min-width:210px;max-width:340px;white-space:normal}
.shipment-bill .bill-error{color:#a1441b}
.shipment-bill #bill-message:empty{display:none}
.shipment-bill input[type=file]{max-width:350px}
.single-shipment-dialog label{display:block;margin-top:12px}
.single-shipment-dialog input,.single-shipment-dialog select{width:100%;margin-top:5px}
.single-shipment-dialog .actions{margin-top:16px}
.sku-edit-dialog{width:520px;max-width:calc(100vw - 24px)}
.sku-edit-dialog .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sku-edit-dialog .grid label{min-width:0}
.sku-edit-dialog input:not([type=checkbox]){width:100%;min-width:0}
.sku-edit-dialog .check{grid-column:1/-1}
.sku-edit-dialog .actions{margin-top:12px}
@media(max-width:440px){.sku-edit-dialog .grid{grid-template-columns:1fr}}
.bulk-stock-dialog{width:760px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
.bulk-stock-dialog textarea{display:block;width:100%;margin-top:6px;white-space:pre;resize:vertical;font:13px/1.6 ui-monospace,monospace}
.bulk-stock-tools{display:flex;gap:10px;margin-top:10px}
.bulk-stock-result{max-height:32vh;overflow:auto}
.bulk-stock-result th{position:sticky;top:0;z-index:1}
.bulk-stock-message:empty{display:none}
.bulk-stock-dialog .actions{margin-top:14px}
.bulk-stock-errors,.bulk-stock-error{color:#a1441b;white-space:normal}
.bulk-stock-errors{padding:8px 12px;background:#fff3df;margin-bottom:8px}
#sku-table th:first-child,#sku-table td:first-child{width:44px;text-align:center}
#sku-table input[type="checkbox"]{width:16px;height:16px;accent-color:#176d5b;vertical-align:middle}
.bulk-sku-delete-dialog .bulk-stock-result{max-height:42vh}
.sku-delete-complete{color:#176b5d;font-weight:600}

#bill-fee-options{margin-top:12px}
.bill-fee-amount{min-width:150px}
.bill-fee-approval{margin-top:8px;min-width:210px;white-space:normal}

.receivables .billing-filter-card{margin-bottom:16px}
.billing-dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.billing-dashboard .card{margin-bottom:16px}
.billing-metric{padding:18px 20px}
.billing-metric>span{display:block;color:#5d746c;font-size:13px}
.billing-metric>strong{display:block;font-size:27px;line-height:1.3;margin-top:10px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.billing-metric:first-child>strong{color:#176d5b}
.billing-metric small{font-size:13px;font-weight:400}
.billing-message{min-height:0;margin:0 0 12px;color:#176d5b;font-size:14px}
.billing-message:empty,.billing-notices:empty{display:none}
.billing-notices{background:#fff5df;border:1px solid #e9d9b3;padding:9px 14px;margin-bottom:16px;border-radius:5px;color:#825a21;font-size:13px}
.billing-error{color:#b3261e}
.billing-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.billing-section-heading h3{margin:0}
.billing-section-heading>.muted{font-size:13px}
.billing-detail[hidden]{display:none}
.billing-detail{scroll-margin-top:18px}
.billing-detail-toolbar,.billing-selection{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.billing-detail-toolbar{margin-bottom:12px}
.billing-detail-toolbar>label{display:flex;align-items:center;gap:8px;margin:0;white-space:nowrap}
.billing-selection{font-size:13px}
.billing-selection button{padding:8px 13px}
.receivables table{font-size:13px}
.receivables th{white-space:nowrap}
.receivables td{vertical-align:middle;font-variant-numeric:tabular-nums}
.receivables td:not(.billing-note):not(.billing-receipt-orders){white-space:nowrap}
.receivables td button{white-space:nowrap;padding:7px 12px}
.receivables input[type=checkbox]{width:16px;height:16px;accent-color:#176d5b;vertical-align:middle}
.billing-secondary,.billing-credit{display:block;margin-top:4px;font-size:12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.billing-secondary{color:#637970}
.billing-credit,.billing-pending{color:#99601c}
.billing-order-number{min-width:105px;max-width:170px}
.billing-order-status{display:inline-block;max-width:145px;white-space:normal;line-height:1.5;text-align:left}
.billing-receipt-orders{min-width:180px;max-width:300px}
.billing-receipt-orders>span{display:block;line-height:1.8;overflow-wrap:anywhere}
.billing-note{min-width:130px;max-width:260px;white-space:pre-wrap;overflow-wrap:anywhere}
.billing-voided{color:#748279}
.billing-voided .billing-receipt-orders{opacity:.8}
.billing-dialog{width:420px}
.billing-dialog label{display:block;margin-top:12px}
.billing-dialog input,.billing-dialog textarea{width:100%;margin-top:5px}
.billing-dialog input{min-width:0}
.billing-dialog-summary{margin:0 0 14px;font-size:14px}
.billing-dialog .billing-pending{font-size:13px;margin:12px 0 0}
.billing-dialog .actions{margin-top:14px}
.billing-pager{font-size:13px}
@media(max-width:950px){.billing-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}.billing-metric>strong{font-size:24px}}
@media(max-width:540px){.billing-dashboard{gap:10px}.billing-metric{padding:14px 12px}.billing-metric>strong{font-size:21px}.billing-section-heading{align-items:flex-start;flex-wrap:wrap}.billing-detail-toolbar{align-items:stretch}.billing-selection{width:100%}.billing-dialog{padding:18px}}

/* Inventory freshness and totals; refresh text without replacing order forms. */
.inventory-summary{display:flex;flex-wrap:wrap;gap:8px 28px;align-items:center;color:#395d55;font-size:14px;padding:12px 16px;background:#eaf2ef;border:1px solid #d5e3dc;border-radius:8px}
.inventory-summary[hidden]{display:none}
.inventory-summary small{font-size:12px;color:#6b8179}
.inventory-admin{max-width:1360px;margin:18px auto 0;width:calc(100% - 40px)}
.inventory-customer{margin:0 0 16px;padding:8px 12px;background:#f4f7f5}

.customer-password-dialog{width:440px}
.customer-password-dialog .customer-password-value{width:100%;font:600 18px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.4px;background:#f4f8f6;cursor:pointer;padding:12px;border:1px solid #bbd2c7;border-radius:6px}
.customer-password-dialog .password-copy-status{min-height:1.5em;font-size:13px;color:#176b5d;margin:8px 0}
.customer-password-dialog .actions{gap:12px}
.customer-password-dialog label{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
.customer-password-dialog label[hidden]{display:none}
.customer-password-dialog .actions{flex-wrap:wrap}

/* Keep split acknowledgement in the current viewport. */
.allocation-dialog{position:fixed;inset:0;margin:auto}

.bill-order-card{border:1px solid #d7e2df;border-radius:10px;margin:14px 0;padding:18px;background:#fff;min-width:0}
.bill-order-card>header{display:flex;position:static;gap:12px;justify-content:space-between;align-items:flex-start;background:transparent;padding:0 0 12px;border-bottom:1px solid #e6ece9;color:inherit}
.bill-order-card>header .muted{display:block;margin-top:4px;font-size:12px}
.bill-status{padding:4px 10px;background:#f5f1df;border-radius:6px;white-space:nowrap;font-size:13px}
.bill-order-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:14px 0}
.bill-order-meta dt{font-size:12px;color:#647971}.bill-order-meta dd{margin:4px 0 0;overflow-wrap:anywhere}
.bill-sku-detail{padding:10px 12px;background:#f5f8f7;border-radius:6px}.bill-sku-detail p{margin:6px 0 0;line-height:1.7;overflow-wrap:anywhere}
.bill-differences{margin-top:12px;padding:12px;background:#fff8e6;border:1px solid #eddbac;border-radius:6px}
.bill-differences h4{margin:0 0 8px}.bill-differences table{table-layout:fixed;width:100%;min-width:0;background:transparent}.bill-differences th,.bill-differences td{width:auto;padding:9px 12px;white-space:normal;overflow-wrap:anywhere;text-align:left}
.bill-differences p,.bill-freight-detail p{margin:8px 0 0;font-size:13px;line-height:1.6}
.bill-blocking{margin-top:12px;padding:12px;background:#fff2ef;color:#a02f17;border-radius:6px}.bill-blocking ul{margin:6px 0 0;padding-left:20px;line-height:1.8}
.bill-freight-detail{margin-top:12px;padding:12px;background:#eef6f3;border-radius:6px}.bill-quantity-match{font-size:13px;color:#647971}
@media(max-width:600px){.bill-order-card{padding:12px}.bill-order-meta{grid-template-columns:1fr 1fr;gap:10px}.bill-order-card>header{flex-wrap:wrap}.bill-differences th,.bill-differences td{padding:8px 5px}}

.bill-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:12px 0}.bill-tools label{display:flex;align-items:center;gap:8px}.bill-tools select{width:auto;min-width:120px}
.bill-compact-row{padding:10px 12px;border:1px solid #d7e2df;border-radius:7px;margin:7px 0;background:white;min-width:0}.bill-compact-row[hidden],.bill-tools[hidden]{display:none}
.bill-compact-summary{display:grid;grid-template-columns:minmax(180px,1.2fr) 60px minmax(150px,1fr) auto auto;gap:12px;align-items:center}.bill-compact-summary small{display:block;color:#637870;margin-top:3px;font-size:12px;overflow-wrap:anywhere}.bill-logistics{min-width:0}.bill-status{font-size:12px}
.bill-row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.bill-row-actions button{padding:6px 10px;font-size:12px;min-height:30px}
.bill-compact-diff{display:flex;flex-wrap:wrap;gap:6px 18px;background:#fff6df;color:#865a19;border-radius:4px;padding:7px 10px;margin-top:7px;font-size:13px;line-height:1.6}.bill-compact-diff ul{flex-basis:100%;margin:0;padding-left:16px;color:#a02f17}.bill-compact-fee{font-size:13px;margin-top:6px}
.bill-compact-details{margin-top:4px;font-size:12px;color:#647971}.bill-compact-details summary{cursor:pointer;display:list-item;padding:3px 0}.bill-collapse-label{display:none}.bill-compact-details[open] .bill-expand-label{display:none}.bill-compact-details[open] .bill-collapse-label{display:inline}.bill-detail-content{border-top:1px solid #e7edeb;padding:4px 0;color:#253d36;overflow-wrap:anywhere}.bill-detail-content p{margin:7px 0;line-height:1.7}.bill-row-error{font-size:13px;color:#a02f17;margin:7px 0}
@media(max-width:850px){.bill-compact-summary{grid-template-columns:minmax(150px,1fr) auto auto}.bill-logistics{grid-column:1/3;grid-row:2}.bill-row-actions{grid-column:3;grid-row:2}.bill-tools{flex-wrap:wrap}}
@media(max-width:500px){.bill-compact-summary{grid-template-columns:1fr auto;gap:7px}.bill-logistics{grid-column:1/-1;grid-row:auto}.bill-row-actions{grid-column:1/-1;grid-row:auto;justify-content:flex-start}.bill-compact-summary .bill-status{grid-column:1/-1;justify-self:start}.bill-compact-row{padding:9px}}

.admin-column-note{margin:7px 0;font-size:12px;color:#637970}.admin-column-note [role=status]{margin-left:8px}
.admin-order-resizable{table-layout:fixed;min-width:0}.admin-order-resizable th{position:relative;padding-right:16px;white-space:normal;overflow-wrap:anywhere;min-width:0}
.admin-order-resizable td{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:none}.admin-order-resizable td button{max-width:100%;white-space:normal}
.admin-column-handle{position:absolute;top:0;right:0;width:8px;height:100%;cursor:col-resize;touch-action:none;user-select:none;border-right:2px solid transparent;box-sizing:border-box}
.admin-column-handle:hover,.admin-column-handle:focus-visible,.admin-column-handle.is-dragging{border-right-color:#1c7568;background:#1c756820;outline:none}
:root { --customer-access-accent: #9a5b0a; }
.customer-access-banner { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 24px; background:#fff4d7; color:#583604; border-bottom:1px solid #e6c677; position:sticky; top:0; z-index:25; }
.customer-access-banner strong { font-size:16px; }
.customer-access-banner span { font-size:13px; }
.customer-access-banner button { margin-left:auto; white-space:nowrap; }
.finance-access-banner { display:flex; align-items:center; flex-wrap:wrap; gap:10px 14px; padding:11px 24px; background:#edf5f2; color:#173f36; border-bottom:1px solid #cbded5; position:sticky; top:0; z-index:25; }
.finance-access-banner strong { font-size:15px; }
.finance-access-banner span { font-size:13px; color:#55736a; }
.finance-access-banner button { margin-left:auto; white-space:nowrap; }
.finance-enter-link { margin-bottom:4px; }
@media(max-width:600px){.finance-access-banner{padding:10px 14px;gap:8px}.finance-access-banner strong,.finance-access-banner span{flex-basis:100%}.finance-access-banner button{margin-left:0}}

.customer-enter-link { display:inline-block; padding:8px 10px; margin-right:4px; border-radius:6px; background:#e4efeb; color:#174f45; text-decoration:none; white-space:nowrap; font-size:13px; }
.customer-enter-link:hover { background:#cfe4dc; }

/* Persisted origin marker, displayed above the existing date. */
.delegated-mark { display:block; color:#196b5c; font-size:12px; font-weight:600; line-height:1.5; margin-bottom:3px; white-space:nowrap; }

.warehouse-choice {width:100%; min-width:85px; color:#174b40; font-weight:600; background:#fff;}
.warehouse-choice-note {display:block; font-size:11px; line-height:1.4; margin-top:4px; font-weight:400; color:#647970;}
.warehouse-choice-warning {color:#a43619;}
.order-grid .row-extras > label:has(select[data-field="warehouse"]) {display:none;}

/* Administrator list widths remain independent of cell content and old table rules. */
table.admin-order-resizable{table-layout:fixed;min-width:0}
table.admin-order-resizable th,table.admin-order-resizable td{width:auto;min-width:0;max-width:none;white-space:normal;overflow-wrap:anywhere}
table.admin-order-resizable td:first-child{min-width:0}
table.admin-order-resizable .pending-sku span,table.admin-order-resizable .as-status,table.admin-order-resizable td:last-child button{white-space:normal;overflow-wrap:anywhere}
table.admin-order-resizable .pending-order-actions{min-width:0}
table.admin-order-resizable .as-brief{max-width:none}

.bill-sku-decision{padding:10px 12px;margin-top:10px;background:#f4f8f7;border:1px solid #dce8e3;border-radius:6px}.bill-sku-decision p{margin:5px 0;overflow-wrap:anywhere}.bill-sku-decision label{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.bill-sku-decision select{min-width:260px;max-width:100%}

.recipient-character-hint{margin:6px 0 0;padding:8px;border-radius:4px;background:#fff5db;color:#805600;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.6}.recipient-character-hint[hidden]{display:none}

.bill-unmatched{margin:12px 0;padding:12px;background:#fff5df;border:1px solid #edd49b;border-radius:6px}.bill-unmatched summary{cursor:pointer;font-weight:600}.bill-unmatched-row{border-top:1px solid #edd49b;padding:10px 0}.bill-unmatched-row p{margin:5px 0;overflow-wrap:anywhere}.bill-unmatched-row input{max-width:280px;margin-left:8px}

/* Admin-only saved freight calculation. */
.order-freight-detail{margin:20px 0;padding-top:12px;border-top:1px solid var(--line,#d7e3df)}
.order-freight-table{overflow-x:auto}
.order-freight-table table{width:100%;min-width:560px;table-layout:auto}
.order-freight-table th,.order-freight-table td{padding:9px 12px;white-space:normal;text-align:left}
.order-freight-table tbody th{font-weight:500;width:24%}
.order-freight-table td:nth-child(2){width:22%;white-space:nowrap}
.order-freight-formula{padding:12px;background:#edf5f1;border-radius:6px;font-weight:600;overflow-wrap:anywhere}

.release-label{font-size:12px;opacity:.85;margin-right:12px;white-space:nowrap}

.bulk-stock-selection-tools{flex-wrap:wrap;margin-bottom:10px}.bulk-stock-selection-tools:has(>button:not([hidden])){padding-bottom:4px}
.bulk-stock-selection-tools:not(:has(>button:not([hidden]))){display:none}

/* Use the available screen width for the administrator's two order lists. */
body.admin-orders-wide #content{max-width:none;width:100%;padding:24px 20px}
body.admin-orders-wide .inventory-admin{max-width:none;width:calc(100% - 40px)}
body.admin-orders-wide #content>.card{padding:20px 18px}
body.admin-orders-wide table.admin-order-resizable th{padding:12px 12px 12px 8px;letter-spacing:0}
body.admin-orders-wide table.admin-order-resizable td{padding:12px 8px;line-height:1.5}
body.admin-orders-wide .admin-order-resizable .pending-sku span{display:inline-block;max-width:100%}
body.admin-orders-wide .pending-order-actions{min-width:0}
body.admin-orders-wide .pending-order-actions button{margin-right:0}
body.admin-orders-wide .admin-order-resizable .badge{padding:4px 6px}
.admin-column-note.has-fit-control{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;margin:8px 0}
.admin-column-note .admin-column-fit{font-size:12px;padding:5px 10px;white-space:nowrap}
.admin-column-note .admin-column-fit[aria-pressed=true]{background:#e4f0e9;color:#12513e}
@media(max-width:800px){
 body.admin-orders-wide #content{padding:20px 12px}
 body.admin-orders-wide .inventory-admin{width:calc(100% - 24px)}
 body.admin-orders-wide #content>.card{padding:16px 12px}
}

/* Customer pending and shipped orders share the full-width list layout. */
body.customer-orders-wide #content{max-width:none;width:100%;padding:24px 20px}
body.customer-orders-wide #content>.card{padding:20px 18px}
body.customer-orders-wide table.admin-order-resizable th{padding:12px 12px 12px 8px;letter-spacing:0}
body.customer-orders-wide table.admin-order-resizable td{padding:12px 8px;line-height:1.5}
body.customer-orders-wide .admin-order-resizable .pending-sku span{display:inline-block;max-width:100%}
body.customer-orders-wide .pending-order-actions{min-width:0}
body.customer-orders-wide .admin-order-resizable td button{margin-right:0}
body.customer-orders-wide .admin-order-resizable .badge{padding:4px 6px}
body.customer-orders-wide .shipped-tracking button.tracking-copy{white-space:normal;overflow-wrap:anywhere}
body.customer-orders-wide .returned-actions{min-width:0}
body.customer-orders-wide .returned-actions-top{flex-wrap:wrap}
@media(max-width:800px){
 body.customer-orders-wide #content{padding:20px 12px}
 body.customer-orders-wide #content>.card{padding:16px 12px}
}

/* Order notes: shared by customer, admin, and finance views. */

.order-number-with-note{min-width:170px!important;width:210px!important;max-width:250px;vertical-align:top}
.order-note-inline{margin-top:9px;background:#fff6e7;border:1px solid #f0d9b0;border-left:3px solid #d58c32;border-radius:5px;padding:8px 9px;line-height:1.5;font-size:14px;font-weight:400;color:#754a17;white-space:normal;overflow-wrap:anywhere}
.order-note-inline strong,.order-note-full strong{display:block;font-size:12px;color:#a1641e;margin-bottom:3px}.order-note-inline span{white-space:pre-wrap}.order-note-expand summary{list-style:none;cursor:pointer}.order-note-expand summary::-webkit-details-marker{display:none}.order-note-expand p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 0}.note-expand-hint{display:block;margin-top:5px;font-size:12px;text-decoration:underline;color:#94611e}.order-note-expand[open] .note-summary-text{display:none}.order-note-expand[open] .note-expand-hint{font-size:0}.order-note-expand[open] .note-expand-hint:after{content:'收起备注';font-size:12px}
.order-timeline{margin-top:18px;padding:14px 16px;background:#f5faf8;border:1px solid #d7e8e0;border-radius:10px}.order-timeline h3{margin:0 0 9px}.order-timeline dl{display:flex;flex-wrap:wrap;gap:10px 24px;margin:0}.order-timeline dl>div{display:flex;gap:7px}.order-timeline dt{color:#61766f}.order-timeline dd{margin:0;font-variant-numeric:tabular-nums}@media(max-width:640px){.order-timeline dl{display:block}.order-timeline dl>div{margin-top:7px}}
.order-note-full{margin:16px 0;padding:12px 14px;background:#fff6e7;border:1px solid #f0d9b0;border-left:3px solid #d58c32;border-radius:6px;max-height:210px;overflow:auto;line-height:1.6}.order-note-full p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}
.order-grid textarea[data-field=note]{width:100%;min-height:90px;resize:vertical;font:inherit;font-size:14px;padding:10px;border:1px solid #c4d7d2;border-radius:5px}.order-grid .col-note{width:230px}
@media(max-width:700px){.order-number-with-note{max-width:none;min-width:0!important;width:auto!important}.order-note-inline{grid-column:1/-1;flex-basis:100%;width:100%;box-sizing:border-box;font-size:14px}.order-note-full{max-height:32vh}.single-shipment-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:18px!important}.order-grid textarea[data-field=note]{font-size:16px}.customer-card-table td:has(.order-note-inline){display:block!important}.customer-card-table td:has(.order-note-inline):before{display:block;margin-bottom:4px}}

.business-customer-bindings{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px 18px;margin:18px 0;padding:14px 16px;border:1px solid #cbded5;border-radius:8px}.business-customer-bindings legend{padding:0 5px;color:#315e53;font-weight:600}.business-customer-bindings .check{margin:0}
.business-search-form{align-items:end}.business-search-form label{flex:1;max-width:640px}.business-search-form textarea{display:block;box-sizing:border-box;width:100%;min-height:78px;margin-top:5px;line-height:1.45}
.business-query-page #content{max-width:1700px;width:100%;padding:28px 24px}.business-query-page #content>.card{padding:26px}.business-orders{width:100%;min-width:0;table-layout:fixed;font-size:14px}.business-orders th,.business-orders td{padding:11px 9px;vertical-align:top;overflow-wrap:anywhere}.business-orders th{font-size:13px;white-space:nowrap}.business-orders .business-col-warehouse{width:68px}.business-orders .business-col-prefix{width:54px}.business-orders .business-col-order{width:138px}.business-orders .business-col-sku{width:clamp(190px,30vw,430px)}.business-orders .business-col-quantity{width:48px}.business-orders .business-col-tracking{width:160px}.business-orders .business-col-recipient{width:130px}.business-orders .business-col-postal{width:90px}.business-orders .business-col-carrier{width:70px}.business-orders .business-col-time{width:140px}
.business-copy{display:inline;text-align:left;border:0;border-radius:0;background:transparent;color:#174b40;padding:0;font:inherit;line-height:1.5;overflow-wrap:anywhere;cursor:copy}.business-copy:hover,.business-copy:focus-visible{background:transparent;color:#0c7161;text-decoration:underline;outline:0}.business-copy.copied{color:#19724d;font-weight:700;text-decoration:none}.business-sku .business-copy{display:inline-block;max-width:520px;white-space:normal}.business-sku wbr{display:inline}
@media(max-width:1120px){.business-orders{font-size:13px}.business-orders th,.business-orders td{padding:10px 7px}.business-orders .business-col-warehouse{width:56px}.business-orders .business-col-prefix{width:48px}.business-orders .business-col-order{width:114px}.business-orders .business-col-sku{width:clamp(130px,24vw,260px)}.business-orders .business-col-recipient{width:78px}.business-orders .business-col-postal{width:64px}.business-orders .business-col-tracking{width:112px}.business-orders .business-col-carrier{width:54px}.business-orders .business-col-time{width:112px}}
@media(max-width:1800px){.business-orders,.business-orders tbody{display:block;width:100%;box-sizing:border-box}.business-orders colgroup,.business-orders thead{display:none}.business-orders tbody{border:0}.business-orders tr{display:grid;width:100%;box-sizing:border-box;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;margin:0 0 12px;border:1px solid #d8e5df;border-radius:8px;background:#fff;padding:12px 16px;box-shadow:0 1px 2px #16382d08}.business-orders td{display:grid;grid-template-columns:82px minmax(0,1fr);gap:8px;padding:7px 0;border:0;text-align:left}.business-orders td::before{content:attr(data-label);font-size:12px;color:#61766f}.business-orders td:nth-child(3),.business-orders td:nth-child(4),.business-orders td:nth-child(6){grid-column:1/-1}.business-orders .empty{display:block;grid-column:1/-1;text-align:center}.business-orders .empty::before{display:none}}
@media(max-width:800px){.business-query-page #content{padding:16px}.business-query-page #content>.card{padding:16px}}
@media(max-width:760px){.business-search-form{align-items:stretch}.business-search-form label{max-width:none}.business-search-form button{align-self:flex-start}.business-orders tr{grid-template-columns:1fr;padding:10px 12px;gap:0}.business-orders td.business-sku{grid-template-columns:82px minmax(0,1fr)}.business-sku .business-copy{max-width:100%}}
