/*
  Orders page
  Scope: merchant order list, order row actions, and the order action menu.
*/

#merchantOrdersTable.table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

#merchantOrdersTable .merchant-orders-clean-table,
#merchantOrdersTable .merchant-orders-clean-table *,
#merchantOrdersTable .merchant-orders-clean-table *::before,
#merchantOrdersTable .merchant-orders-clean-table *::after {
  box-sizing: border-box;
}

#merchantOrdersTable .merchant-orders-clean-table {
  --order-list-strong: var(--theme-text);
  --order-list-secondary: color-mix(in srgb, var(--theme-text) 68%, var(--theme-muted));
  --order-list-muted: color-mix(in srgb, var(--theme-text) 56%, var(--theme-muted));
  width: 100%;
  min-width: 980px;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: auto;
  text-rendering: optimizeLegibility;
}

#merchantOrdersTable .merchant-orders-clean-table th,
#merchantOrdersTable .merchant-orders-clean-table td {
  height: auto !important;
  min-height: 0 !important;
  padding: 14px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--theme-border-soft) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 14.5px;
  line-height: 1.42;
  text-align: left;
  vertical-align: middle;
  transform: none !important;
}

#merchantOrdersTable .merchant-orders-clean-table th {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  font-size: 12.5px;
  font-weight: 760;
  letter-spacing: .02em;
  white-space: nowrap;
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr,
#merchantOrdersTable .merchant-orders-clean-table tbody tr:hover {
  box-shadow: none !important;
  filter: none !important;
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr {
  transition: border-color 140ms ease, background-color 140ms ease !important;
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr:hover,
#merchantOrdersTable .merchant-orders-clean-table tbody tr.is-menu-open {
  transform: none !important;
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr:nth-child(odd) td {
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr:nth-child(even) td {
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr:hover td {
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr:hover td,
#merchantOrdersTable .merchant-orders-clean-table tbody tr.is-menu-open td {
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(1),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(1) {
  width: max-content;
  min-width: 236px;
  max-width: max-content;
  white-space: nowrap;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(2),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(2) {
  width: auto;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(3),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(3) {
  width: 132px;
  text-align: center;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(4),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(4) {
  width: 142px;
}

#merchantOrdersTable .merchant-orders-clean-table td:nth-child(1),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(2),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(3),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(4) {
  vertical-align: top !important;
}

#merchantOrdersTable .merchant-orders-clean-table tr.is-canceled td {
  opacity: .62;
}

#merchantOrdersTable .merchant-orders-clean-table tr.is-canceled .order-no {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

#merchantOrdersTable .merchant-orders-clean-table tr.is-canceled:hover {
  transform: none !important;
}

#merchantOrdersTable .order-number-cell {
  width: 100%;
  min-width: 0;
  display: grid !important;
  gap: 5px !important;
}

#merchantOrdersTable .order-source-tags {
  min-width: 0;
  min-height: 22px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px !important;
}

#merchantOrdersTable .order-source-tags.is-empty {
  pointer-events: none;
}

#merchantOrdersTable .order-source-tag {
  width: fit-content !important;
  max-width: 100% !important;
  min-height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 7px !important;
  border: 1px solid var(--theme-border-soft) !important;
  border-radius: 0 !important;
  font-size: 11px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-source-tag.region {
}

#merchantOrdersTable .order-source-tag.store {
  font-weight: 820 !important;
}

#merchantOrdersTable .order-no-line {
  min-width: 0;
  display: inline-flex !important;
  align-items: flex-start !important;
  gap: 6px !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-no {
  display: inline-block;
  max-width: none;
  font-size: 14px !important;
  font-weight: 820 !important;
  line-height: 1.28 !important;
  overflow-wrap: normal;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-copy-button {
  flex: 0 0 auto;
  position: relative !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid var(--theme-border-soft) !important;
  border-radius: 6px !important;
  color: var(--order-list-muted) !important;
  font-size: 0 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

#merchantOrdersTable .order-copy-button::before,
#merchantOrdersTable .order-copy-button::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  transition: border-color 140ms ease, background-color 140ms ease;
}

#merchantOrdersTable .order-copy-button::before {
  transform: translate(-2px, 2px);
  opacity: .48;
}

#merchantOrdersTable .order-copy-button::after {
  background: var(--theme-surface, #fff);
  transform: translate(2px, -2px);
}

#merchantOrdersTable .order-copy-button:hover {
  transform: none !important;
}

#merchantOrdersTable .order-customer {
  min-width: 0;
  display: grid !important;
  gap: 7px !important;
  padding-top: 0 !important;
}

#merchantOrdersTable .order-summary-head {
  min-width: 0;
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

#merchantOrdersTable .order-summary-head time {
  flex: 0 0 auto;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 680 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-customer-primary-wrap {
  min-width: 0;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
}

#merchantOrdersTable .order-customer-primary {
  min-width: 0;
  display: block !important;
  color: var(--order-list-strong) !important;
  font-size: 13.5px !important;
  font-weight: 820 !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-store-pill {
  flex: 0 0 auto;
  max-width: 118px;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 20px !important;
  padding: 0 7px !important;
  border: 1px solid var(--theme-primary-border) !important;
  background: var(--theme-primary-soft) !important;
  color: var(--theme-primary) !important;
  font-size: 11px !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-address-line {
  min-width: 0;
  display: block !important;
  color: var(--order-list-secondary) !important;
  font-size: 12px !important;
  font-weight: 520 !important;
  line-height: 1.4 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-compact-meta {
  min-width: 0;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

#merchantOrdersTable .order-compact-meta > span {
  min-width: 0;
  max-width: min(100%, 260px);
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 7px !important;
  border: 1px solid var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
  color: var(--order-list-secondary) !important;
  font-size: 11.5px !important;
  font-weight: 580 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-compact-meta b {
  flex: 0 0 auto;
  color: var(--theme-muted) !important;
  font-size: 11px !important;
  font-weight: 760 !important;
}

#merchantOrdersTable .order-sales-channel-text,
#merchantOrdersTable .order-store-name-text {
  color: var(--theme-muted) !important;
}

#merchantOrdersTable .merchant-orders-clean-table .tag {
  min-width: max-content !important;
  max-width: max-content !important;
  min-height: 30px !important;
  border-radius: 999px !important;
  padding: 0 11px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

#merchantOrdersTable .merchant-order-actions {
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  overflow: visible !important;
}

#merchantOrdersTable .merchant-order-mail-status {
  width: fit-content !important;
  min-height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-inline: auto !important;
  padding: 0 7px !important;
  border: 1px solid var(--theme-border-soft) !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .merchant-order-mail-status.warn {
}

#merchantOrdersTable .merchant-order-mail-status.ok {
}

#merchantOrdersTable .merchant-order-mail-status.danger {
}

#merchantOrdersTable .merchant-order-split-action {
  display: inline-flex !important;
  align-items: stretch !important;
  overflow: visible !important;
}

#merchantOrdersTable .merchant-order-actions .btn,
#merchantOrdersTable .merchant-order-more-menu .btn[data-merchant-order-more-toggle] {
  width: auto !important;
  min-width: max-content !important;
  max-width: max-content !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .merchant-order-edit-button {
  min-width: 92px !important;
}

#merchantOrdersTable .merchant-order-dropdown-button {
  min-width: 34px !important;
  width: 34px !important;
  max-width: 34px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 16px !important;
}

#merchantOrdersTable .merchant-order-more-menu {
  position: relative !important;
  flex: 0 0 auto !important;
}

#merchantOrdersTable .merchant-order-more-menu > div {
  display: none !important;
}

#merchantOrdersTable .order-action-with-status {
  position: relative;
  display: inline-flex;
}

#merchantOrdersTable .order-action-dot {
  top: -2px;
  right: -2px;
}

#merchantOrdersTable .order-date-sort,
#merchantOrdersTable .order-date-sort:hover {
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  font: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}

#merchantOrdersTable .order-date-sort-icon {
  font-size: 10px !important;
  line-height: 1 !important;
}

.merchant-order-floating-menu {
  --merchant-order-menu-bg: var(--theme-surface-high);
  position: fixed !important;
  z-index: 9999 !important;
  min-width: 0 !important;
  display: grid !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.merchant-order-floating-menu .btn {
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  justify-content: center !important;
  min-height: 34px !important;
  border-radius: 0 !important;
  border: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.merchant-order-floating-menu .btn.danger {
  border: 0 !important;
}

.merchant-order-floating-menu .btn:hover,
.merchant-order-floating-menu .btn.danger:hover {
  border: 0 !important;
  transform: none !important;
}

.merchant-orders-table,
.merchant-orders-table tbody,
.merchant-orders-table tr,
.merchant-orders-table td {
  overflow: visible;
}

.merchant-orders-table th,
.merchant-orders-table td {
  vertical-align: middle;
}

.merchant-orders-table tbody tr[data-merchant-order-row] {
  cursor: default;
}

.merchant-orders-table .order-no {
  font-size: 13px;
  font-weight: 900;
}

/* Orders visual pass: soften the filter bar and make dense rows easier to scan. */
body.theme-fresh .app-content.view-orders .merchant-review-main > .table-shell-card {
  border-color: rgba(148, 163, 184, .34) !important;
  background: #ffffff !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.theme-fresh .app-content.view-orders .table-shell-card .reviews-table-head {
  border-bottom: 1px solid rgba(23, 107, 135, .14) !important;
  background:
    linear-gradient(
      135deg,
      rgba(23, 107, 135, .085) 0%,
      rgba(22, 132, 94, .045) 58%,
      #ffffff 100%
    ) !important;
}

body.theme-fresh .app-content.view-orders .table-shell-card .reviews-table-head h3 {
  color: var(--fresh-text) !important;
}

body.theme-fresh .app-content.view-orders .table-shell-card .reviews-table-meta span {
  border-color: rgba(23, 107, 135, .18) !important;
  background: rgba(255, 255, 255, .76) !important;
  color: var(--fresh-accent) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrderFilterForm.reviews-filter-bar {
  padding: 12px 16px 14px !important;
  border-bottom: 1px solid rgba(148, 163, 184, .26) !important;
  background:
    linear-gradient(
      135deg,
      rgba(23, 107, 135, .06) 0%,
      rgba(96, 112, 128, .045) 100%
    ) !important;
}

body.theme-fresh .app-content.view-orders .merchant-order-filter-controls {
  gap: 9px !important;
}

body.theme-fresh .app-content.view-orders .merchant-order-filter-controls label {
  display: grid !important;
  gap: 5px !important;
}

body.theme-fresh .app-content.view-orders .merchant-order-filter-controls label > span {
  color: #567083 !important;
  font-size: 11px !important;
  font-weight: 820 !important;
}

body.theme-fresh .app-content.view-orders .merchant-order-filter-controls :where(select, input[type="search"]) {
  height: 38px !important;
  min-height: 38px !important;
  border-color: rgba(148, 163, 184, .36) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: var(--fresh-text) !important;
  box-shadow: none !important;
}

body.theme-fresh .app-content.view-orders .merchant-order-filter-controls :where(select, input[type="search"]):focus {
  border-color: rgba(23, 107, 135, .46) !important;
  box-shadow: 0 0 0 3px rgba(23, 107, 135, .09) !important;
}

body.theme-fresh .app-content.view-orders .merchant-order-filter-controls > .btn {
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 6px !important;
  background: var(--fresh-accent) !important;
  color: #ffffff !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable.table-wrap {
  padding: 10px 12px 14px !important;
  background: #ffffff !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table {
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table th {
  padding: 8px 14px 6px !important;
  border: 0 !important;
  background: transparent !important;
  color: #6a7f90 !important;
  font-size: 11.5px !important;
  font-weight: 820 !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table td {
  border: 0 !important;
  background: #ffffff !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:nth-child(even) td {
  background: #f7fafb !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:hover td,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr.is-menu-open td {
  background: #eef6f8 !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody td:first-child {
  border-radius: 8px 0 0 8px !important;
  box-shadow: inset 0 0 0 transparent !important;
  transition: box-shadow .18s ease, background-color .18s ease;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:hover td:first-child,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr.is-menu-open td:first-child,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:focus-within td:first-child {
  box-shadow: inset 4px 0 0 rgba(23, 107, 135, .46) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.warn):hover td:first-child,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.warn).is-menu-open td:first-child,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.warn):focus-within td:first-child {
  box-shadow: inset 4px 0 0 rgba(180, 83, 9, .74) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.ok):hover td:first-child,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.ok).is-menu-open td:first-child,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.ok):focus-within td:first-child {
  box-shadow: inset 4px 0 0 rgba(22, 132, 94, .68) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.danger):hover td:first-child,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.danger).is-menu-open td:first-child,
body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody tr:has(.merchant-order-mail-status.danger):focus-within td:first-child {
  box-shadow: inset 4px 0 0 rgba(185, 28, 28, .70) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-orders-clean-table tbody td:last-child {
  border-radius: 0 8px 8px 0 !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .order-no {
  color: #142131 !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .order-copy-button {
  background: rgba(255, 255, 255, .78) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .order-copy-button:hover {
  background: #ffffff !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .order-store-pill {
  border-color: rgba(23, 107, 135, .24) !important;
  border-radius: 999px !important;
  background: rgba(23, 107, 135, .085) !important;
  color: var(--fresh-accent) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .order-compact-meta > span {
  border-color: rgba(148, 163, 184, .24) !important;
  border-radius: 5px !important;
  background: rgba(255, 255, 255, .74) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-order-mail-status {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 9px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 820 !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-order-mail-status.warn {
  border-color: rgba(180, 83, 9, .28) !important;
  background: rgba(180, 83, 9, .105) !important;
  color: var(--fresh-warn) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-order-mail-status.ok {
  border-color: rgba(22, 132, 94, .26) !important;
  background: rgba(22, 132, 94, .10) !important;
  color: var(--fresh-good) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-order-mail-status.danger {
  border-color: rgba(185, 28, 28, .24) !important;
  background: rgba(185, 28, 28, .09) !important;
  color: var(--fresh-bad) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-order-actions .merchant-order-edit-button {
  min-width: 98px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 6px 0 0 6px !important;
  background: var(--fresh-accent) !important;
}

body.theme-fresh .app-content.view-orders #merchantOrdersTable .merchant-order-actions .merchant-order-dropdown-button {
  width: 38px !important;
  min-width: 38px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 0 6px 6px 0 !important;
  background: #11627c !important;
}

body.theme-fresh .app-content.view-orders .merchant-review-layout > aside.stack {
  gap: 12px !important;
}

body.theme-fresh .app-content.view-orders .merchant-review-layout > aside.stack > .card {
  border-color: rgba(148, 163, 184, .30) !important;
  background: #ffffff !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.theme-fresh .app-content.view-orders .merchant-review-layout > aside.stack .side-card-heading {
  padding: 16px 18px 12px !important;
  border-bottom-color: rgba(148, 163, 184, .24) !important;
  background:
    linear-gradient(
      135deg,
      rgba(23, 107, 135, .055) 0%,
      rgba(255, 255, 255, .96) 72%
    ) !important;
}

body.theme-fresh .app-content.view-orders .merchant-review-layout > aside.stack .side-card-heading span {
  color: var(--fresh-accent) !important;
  font-weight: 780 !important;
}

body.theme-fresh .app-content.view-orders .merchant-review-layout > aside.stack .side-card-heading strong {
  margin-top: 4px !important;
  color: var(--fresh-text) !important;
  font-size: 18px !important;
}

body.theme-fresh .app-content.view-orders .merchant-review-layout > aside.stack .side-card-heading p {
  margin-top: 6px !important;
  color: #617184 !important;
  line-height: 1.5 !important;
}

body.theme-fresh .app-content.view-orders .merchant-review-layout > aside.stack .card-body {
  padding: 14px 18px 18px !important;
}

body.theme-fresh .app-content.view-orders .quick-parse-body textarea {
  min-height: 136px !important;
  border-color: rgba(148, 163, 184, .34) !important;
  background: #fbfdfe !important;
}

body.theme-fresh .app-content.view-orders .quick-parse-body textarea:focus {
  background: #ffffff !important;
}

body.theme-fresh .app-content.view-orders .order-import-dropzone {
  min-height: 126px !important;
  padding: 20px 16px !important;
  border-color: rgba(23, 107, 135, .24) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(
      180deg,
      rgba(23, 107, 135, .045),
      rgba(255, 255, 255, .94)
    ) !important;
}

body.theme-fresh .app-content.view-orders .order-import-dropzone::before {
  content: "+";
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 107, 135, .22);
  border-radius: 999px;
  background: #ffffff;
  color: var(--fresh-accent);
  font-size: 19px;
  font-weight: 520;
  line-height: 1;
}

body.theme-fresh .app-content.view-orders .order-import-dropzone strong {
  font-size: 14px !important;
  color: var(--fresh-text) !important;
}

body.theme-fresh .app-content.view-orders .order-import-dropzone span {
  font-size: 12px !important;
  color: #617184 !important;
}

body.theme-fresh .app-content.view-orders .manual-order-action-card .side-card-heading {
  border-bottom: 0 !important;
}

body.theme-fresh .merchant-order-floating-menu {
  min-width: 138px !important;
  padding: 6px !important;
  border: 1px solid rgba(148, 163, 184, .30) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .16) !important;
  gap: 4px !important;
  animation: order-menu-in 120ms ease-out both !important;
}

body.theme-fresh .merchant-order-floating-menu .btn {
  min-height: 36px !important;
  justify-content: flex-start !important;
  padding: 0 11px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--fresh-text) !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease !important;
}

body.theme-fresh .merchant-order-floating-menu .btn:hover {
  border-color: rgba(23, 107, 135, .18) !important;
  background: rgba(23, 107, 135, .075) !important;
  color: var(--fresh-accent) !important;
}

body.theme-fresh .merchant-order-floating-menu .btn.danger {
  background: transparent !important;
  color: #b42318 !important;
}

body.theme-fresh .merchant-order-floating-menu .btn.danger:hover {
  border-color: rgba(180, 35, 24, .18) !important;
  background: rgba(180, 35, 24, .075) !important;
  color: #991b1b !important;
}

@keyframes order-menu-in {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.merchant-orders-table .order-subtle {
  font-size: 12px;
  font-weight: 520;
  line-height: 1.45;
}

.merchant-orders-table .order-store-product {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.merchant-orders-table .order-store-product > span {
  font-size: 12px;
  font-weight: 560;
}

.merchant-orders-table .order-store-product > small {
  min-width: 0;
  font-size: 11px;
  font-weight: 520;
  line-height: 1.35;
}

.merchant-orders-table .order-address {
  display: inline-block;
  max-width: 18rem;
  white-space: normal;
}

.merchant-orders-table .order-date-sort {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  font: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}

.merchant-orders-table .order-date-sort-icon {
  font-size: 10px;
  line-height: 1;
}

.merchant-orders-table tr.is-canceled td {
  opacity: 0.56;
}

.merchant-orders-table tr.is-canceled .order-no {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.merchant-orders-table tr.is-expanded td {
  border-bottom: 0 !important;
  box-shadow: none;
}

.merchant-orders-table tr.is-expanded td:first-child {
  border-radius: 0;
}

.merchant-orders-table tr.is-expanded td:last-child {
  border-radius: 0;
}

.merchant-orders-table tr.is-expanded:hover + .merchant-order-drawer-row,
.merchant-order-drawer-row:hover {
  transform: translateY(-11px) !important;
}

.merchant-order-drawer-row,
.merchant-order-drawer-row:hover {
  transform: translateY(-11px) !important;
  cursor: default;
}

.merchant-order-drawer-row td {
  padding: 0 13px 13px;
  border-top: 0;
  border-radius: 0 !important;
  border-inline-start: 1px solid var(--theme-border-soft);
  border-right: 1px solid var(--theme-border-soft);
  border-bottom: 1px solid var(--theme-border-soft);
  box-shadow: none !important;
}

.merchant-order-drawer-row,
.merchant-order-drawer-row:hover,
.merchant-order-drawer-row td,
.merchant-order-drawer-row:hover td,
.merchant-order-drawer {
  box-shadow: none !important;
}

.merchant-order-drawer-row td,
.merchant-order-drawer-row:hover td {
  padding-top: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
}

.merchant-order-drawer {
  display: grid;
  gap: 0;
  margin-top: 0 !important;
  padding: 0 8px 8px;
  border-top: 0 !important;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.merchant-order-drawer * {
  user-select: text;
  -webkit-user-select: text;
}

.merchant-order-drawer-section {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-top: 1px solid var(--theme-border-soft);
}

.merchant-order-drawer-section:first-child {
  border-top: 0;
}

.merchant-order-drawer-section span {
  font-size: 12px;
  font-weight: 850;
}

.merchant-order-drawer-section strong {
  font-size: 13px;
  font-weight: 820;
}

.merchant-order-drawer-section p {
  margin: 0;
  font-size: 12px;
  font-weight: 520;
  line-height: 1.55;
}

.merchant-order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.merchant-order-detail-grid dl {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
}

.merchant-order-detail-grid dt {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.merchant-order-detail-grid dd {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 520;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.merchant-order-actions .btn.primary,
.merchant-order-actions .btn.danger {
  width: 84px;
  min-width: 84px;
}

.merchant-order-actions .btn.soft-primary {
  box-shadow: none;
}

.order-more-actions {
  position: relative;
  flex: 0 0 auto;
}

.order-more-actions summary {
  list-style: none;
  cursor: pointer;
}

.order-more-actions summary::-webkit-details-marker {
  display: none;
}

.order-more-actions > div {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  min-width: 112px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--theme-border);
  box-shadow: none;
}

.order-more-actions > div .btn {
  width: 100%;
  min-width: 96px;
  justify-content: center;
}

.order-action-with-status {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
}

.order-action-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow:
    0 0 0 2px var(--theme-surface),
    0 0 0 4px var(--theme-success-border);
}

@media (max-width: 1180px) {
  #merchantOrdersTable.table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
}

@media (max-width: 760px) {
  .merchant-order-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.order-confirm-modal {
  width: min(620px, 100%);
}

.parsed-order-confirm-modal {
  width: min(920px, 100%);
}

.parsed-order-confirm-form {
  margin-top: 16px;
}

.parsed-order-confirm-form .field {
  min-width: 0;
}

.parsed-order-confirm-form .parsed-customer-name-field {
  grid-column: span 2;
}

.parsed-order-confirm-form textarea[name="raw_address"] {
  min-height: 112px;
}

.notice-letter-modal {
  width: min(760px, 100%);
}

.notice-letter-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.notice-letter-modal-head > div {
  min-width: 0;
}

.notice-letter-modal-head .eyebrow {
  display: block;
  margin: 0;
}

.notice-letter-modal-head h2 {
  margin-top: 4px;
  white-space: normal;
}

.notice-letter-modal-head h3 {
  white-space: normal;
}

.notice-letter-modal-head p:not(.eyebrow),
.inline-order-confirm-head p:not(.eyebrow) {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.55;
}

.notice-letter-preview {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.notice-letter-preview textarea {
  min-height: 260px;
  resize: vertical;
  white-space: pre-wrap;
}

.notice-letter-copy-status {
  min-width: 0;
  margin-right: auto;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.submit-mail-summary,
.parsed-order-summary {
  display: grid;
  border: 1px solid var(--theme-warning-border);
  border-radius: var(--radius-control);
}

.submit-mail-summary {
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
}

.submit-mail-summary .detail-row {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.submit-mail-summary .detail-row span {
  font-size: 12px;
  font-weight: 780;
}

.submit-mail-summary .detail-row strong {
  font-size: 13px;
  font-weight: 720;
}

.cancel-order-summary {
}

.parsed-order-summary {
  gap: 6px;
  margin-top: 14px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--theme-surface) 72%, transparent);
}

.parsed-order-summary strong {
  font-size: 16px;
}

.order-items-confirm-list {
  gap: 12px;
}

.order-item-row,
.order-view-item-row {
  align-items: end;
}

.order-item-row.form-grid {
  grid-template-columns: minmax(0, 1fr) 76px auto;
}

.order-item-quantity-field {
  width: 76px;
}

.order-item-quantity-field input[name="item_quantity"] {
  width: 76px !important;
  min-width: 76px !important;
  text-align: center;
}

.order-item-actions-field {
  min-width: 0;
}

.order-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: var(--theme-control-height);
}

.order-item-actions .btn {
  min-height: var(--theme-control-height) !important;
  white-space: nowrap;
}

.inline-order-confirm-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.inline-order-confirm-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.18;
}

.merchant-order-filter-controls {
  display: grid !important;
  grid-template-columns: minmax(0, 8.5rem) minmax(0, 10rem) minmax(0, 11.5rem) minmax(0, 8rem) minmax(0, 11rem) auto !important;
  column-gap: 10px !important;
  row-gap: 10px !important;
  align-items: end !important;
  max-width: none !important;
}

.merchant-order-filter-controls label {
  min-width: 0 !important;
}

.merchant-order-filter-controls select,
.merchant-order-filter-controls input[type="search"] {
  width: 100% !important;
  min-width: 0 !important;
}

.merchant-order-filter-controls .mail-status-filter select {
  min-width: 0;
}

.merchant-order-filter-controls .search-pill-filter input {
  border-radius: var(--radius-pill);
  padding-inline: 16px;
}

.order-view-summary {
  margin-bottom: 18px;
}

.merchant-order-editor-modal {
  width: min(860px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.order-view-items-form,
.order-editor-section,
.order-address-collapse {
  display: grid;
  gap: 12px;
}

.order-view-items-form {
  gap: 14px;
  margin-top: 16px;
}

.order-editor-section {
  padding: 14px;
  border: 1px solid var(--theme-border-soft);
}

.order-editor-channel-section {
}

.order-editor-section .order-view-items-head {
  padding-top: 0;
  border-top: 0;
}

.order-editor-grid {
  gap: 12px;
}

.order-editor-channel-grid {
  grid-template-columns: minmax(180px, 1.25fr) minmax(190px, 1.2fr) minmax(86px, .48fr) minmax(138px, .74fr);
}

.order-editor-customer-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.order-editor-customer-grid .field.full {
  grid-column: 1 / -1;
}

.order-editor-customer-grid .field {
  grid-column: span 6;
}

.order-editor-customer-grid .order-customer-name-field,
.order-editor-customer-grid .order-phone-field,
.order-editor-customer-grid .order-whatsapp-field,
.order-editor-customer-grid .order-whatsapp-supported-field {
  grid-column: span 3;
}

.order-editor-customer-grid .order-city-field {
  grid-column: span 4;
}

.order-editor-customer-grid .order-state-field,
.order-editor-customer-grid .order-country-field {
  grid-column: span 2;
}

.order-editor-customer-grid .order-zip-field {
  grid-column: span 3;
}

.order-editor-customer-grid textarea {
  min-height: 76px;
  max-height: 132px;
}

.order-address-collapse {
  min-width: 0;
}

.order-address-collapse-toggle {
  width: fit-content !important;
  min-height: 32px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  font-size: 12px !important;
}

.order-address-collapse-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr) minmax(72px, .32fr) minmax(104px, .45fr) minmax(72px, .32fr);
  gap: 12px;
  padding-top: 2px;
}

.order-address-collapse-body[hidden] {
  display: none !important;
}

.order-address-collapse-body .field {
  grid-column: auto;
}

.order-editor-muted {
  font-size: 13px;
  font-weight: 650;
}

.order-view-items-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--theme-border-soft);
}

.order-view-items-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.order-view-items-head strong {
  font-size: 16px;
  font-weight: 760;
}

.order-view-items-head span:not(.order-editor-muted) {
  font-size: 12px;
  font-weight: 620;
  line-height: 1.45;
}

.order-view-items-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 12px;
  align-items: start;
}

.order-view-item-row {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 82px 40px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--theme-border-soft);
}

.order-view-item-row .field {
  margin: 0;
}

.order-view-quantity-field input {
  text-align: center;
}

.order-view-product-field {
  width: min(100%, 210px);
}

.order-view-add-item-button {
  min-width: 40px !important;
  width: 40px !important;
  min-height: 40px !important;
  height: 40px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

@media (max-width: 900px) {
  .order-editor-customer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .order-editor-customer-grid .field,
  .order-editor-customer-grid .order-customer-name-field,
  .order-editor-customer-grid .order-phone-field,
  .order-editor-customer-grid .order-whatsapp-field,
  .order-editor-customer-grid .order-whatsapp-supported-field,
  .order-editor-customer-grid .order-city-field,
  .order-editor-customer-grid .order-state-field,
  .order-editor-customer-grid .order-country-field,
  .order-editor-customer-grid .order-zip-field {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .order-editor-channel-grid,
  .order-editor-customer-grid,
  .order-address-collapse-body,
  .order-view-items-grid,
  .order-view-item-row {
    grid-template-columns: 1fr;
  }

  .order-item-row.form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-view-items-head {
    display: grid;
  }

  .order-editor-customer-grid .field,
  .order-editor-customer-grid .order-customer-name-field,
  .order-editor-customer-grid .order-phone-field,
  .order-editor-customer-grid .order-whatsapp-field,
  .order-editor-customer-grid .order-whatsapp-supported-field,
  .order-editor-customer-grid .order-city-field,
  .order-editor-customer-grid .order-state-field,
  .order-editor-customer-grid .order-country-field,
  .order-editor-customer-grid .order-zip-field {
    grid-column: 1 / -1;
  }
}

/* Orders visual pass: make order modals feel lighter and easier to scan. */
body.theme-fresh .modal-backdrop:has(.order-confirm-modal) {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, .16), transparent 34%),
    rgba(15, 23, 42, .46);
  backdrop-filter: blur(2px);
}

body.theme-fresh .order-confirm-modal {
  border: 1px solid rgba(143, 162, 181, .42);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 22px 58px rgba(15, 23, 42, .22);
  overflow: hidden;
}

body.theme-fresh .order-confirm-modal .notice-letter-modal-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(203, 213, 225, .82);
  background:
    linear-gradient(135deg, rgba(239, 247, 251, .94), rgba(255, 255, 255, .98) 54%),
    #fff;
}

body.theme-fresh .merchant-order-editor-modal .notice-letter-modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
}

body.theme-fresh .order-confirm-modal .notice-letter-modal-head .eyebrow {
  color: #176f89;
  font-size: 12px;
  font-weight: 820;
}

body.theme-fresh .order-confirm-modal .notice-letter-modal-head h2 {
  margin-top: 5px;
  color: #111827;
  font-size: 23px;
  letter-spacing: 0;
}

body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal) {
  width: min(560px, calc(100vw - 40px));
}

body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal) .notice-letter-modal-head h2 {
  font-size: 21px;
}

body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal):has(.btn.danger) .notice-letter-modal-head {
  background:
    linear-gradient(135deg, rgba(254, 242, 242, .98), rgba(255, 255, 255, .98) 58%),
    #fff;
}

body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal):has(.btn.danger) .notice-letter-modal-head .eyebrow {
  color: #b45309;
}

body.theme-fresh .submit-mail-summary {
  margin: 18px 22px 0;
  padding: 4px;
  gap: 0;
  border: 1px solid rgba(203, 213, 225, .92);
  border-radius: 8px;
  background: #f8fbfd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

body.theme-fresh .submit-mail-summary > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 6px;
}

body.theme-fresh .submit-mail-summary > div:nth-child(odd) {
  background: rgba(255, 255, 255, .74);
}

body.theme-fresh .submit-mail-summary > div + div {
  border-top: 1px solid rgba(226, 232, 240, .92);
}

body.theme-fresh .submit-mail-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 760;
}

body.theme-fresh .submit-mail-summary strong {
  min-width: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.42;
  word-break: break-word;
}

body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal) .modal-actions {
  padding: 16px 22px 20px;
  border-top: 0;
}

body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal) .btn {
  min-height: 38px !important;
  border-radius: 7px;
}

body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal) .btn.danger {
  border-color: rgba(248, 113, 113, .34) !important;
  background: #fff1f2 !important;
  color: #b42318 !important;
}

body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal) .btn.danger:hover {
  background: #ffe4e6 !important;
  border-color: rgba(239, 68, 68, .46) !important;
}

body.theme-fresh .merchant-order-editor-modal {
  width: min(920px, calc(100vw - 44px)) !important;
  padding: 0;
}

body.theme-fresh .merchant-order-editor-modal .order-view-items-form {
  margin: 0;
  padding: 16px 22px 0;
  gap: 14px;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-section {
  padding: 15px;
  border: 1px solid rgba(203, 213, 225, .86);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbfd 0%, #ffffff 58%);
}

body.theme-fresh .merchant-order-editor-modal .order-view-items-head {
  padding: 0 0 12px;
  border-top: 0;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
}

body.theme-fresh .merchant-order-editor-modal .order-view-items-head strong {
  color: #111827;
  font-size: 16px;
  font-weight: 820;
}

body.theme-fresh .merchant-order-editor-modal .order-view-items-head span:not(.order-editor-muted) {
  color: #5f7185;
  font-size: 12px;
  font-weight: 660;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-muted {
  align-self: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf6f9;
  color: #176f89;
  font-size: 12px;
}

body.theme-fresh .merchant-order-editor-modal :where(input, select, textarea) {
  border-color: rgba(183, 198, 213, .95);
  border-radius: 7px;
  background-color: #fff;
}

body.theme-fresh .merchant-order-editor-modal :where(input, select, textarea):focus {
  border-color: #176f89;
  box-shadow: 0 0 0 3px rgba(23, 111, 137, .14);
}

body.theme-fresh .merchant-order-editor-modal .field label {
  margin-bottom: 6px;
  color: #526579;
  font-size: 12px;
  font-weight: 760;
}

body.theme-fresh .merchant-order-editor-modal textarea[name="raw_address"] {
  min-height: 92px;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid {
  grid-template-columns:
    minmax(150px, .9fr)
    minmax(150px, .9fr)
    minmax(220px, 1.15fr) !important;
  column-gap: 12px;
  row-gap: 13px;
  max-width: 100%;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-customer-name-field {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-phone-field {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid > .field:nth-child(3) {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid > .field.order-whatsapp-supported-field {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid > .field.order-whatsapp-field {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid > .field.order-whatsapp-field:not(.full):not(.order-customer-name-field):not(.order-phone-field):not(.order-whatsapp-supported-field) {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .field.full,
body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-address-collapse.full {
  grid-column: 1 / -1 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .field:not(.full) :where(input, select) {
  min-width: 0;
}

body.theme-fresh .merchant-order-editor-modal .order-address-collapse {
  gap: 10px;
}

body.theme-fresh .merchant-order-editor-modal .order-address-collapse-body {
  grid-template-columns:
    minmax(180px, 1.2fr)
    minmax(84px, .42fr)
    minmax(118px, .58fr)
    minmax(84px, .42fr) !important;
  align-items: end;
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 8px;
  background: #f8fbfd;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-address-collapse .order-address-collapse-body > .field:not(.full):not(.order-customer-name-field):not(.order-phone-field):not(.order-whatsapp-supported-field) {
  grid-column: auto !important;
  grid-row: auto !important;
  min-width: 0;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-address-collapse .order-address-collapse-body > .field:nth-child(1) {
  grid-column: 1 / -1 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-address-collapse .order-address-collapse-body > .field:nth-child(2) {
  grid-column: 1 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-address-collapse .order-address-collapse-body > .field:nth-child(3) {
  grid-column: 2 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-address-collapse .order-address-collapse-body > .field:nth-child(4) {
  grid-column: 3 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-address-collapse .order-address-collapse-body > .field:nth-child(5) {
  grid-column: 4 !important;
}

body.theme-fresh .merchant-order-editor-modal .order-address-collapse-body :where(input, select) {
  min-width: 0;
}

body.theme-fresh .merchant-order-editor-modal .order-address-collapse-body .order-city-field {
  grid-column: auto !important;
}

body.theme-fresh .merchant-order-editor-modal .order-address-collapse-body .order-state-field,
body.theme-fresh .merchant-order-editor-modal .order-address-collapse-body .order-country-field,
body.theme-fresh .merchant-order-editor-modal .order-address-collapse-body .order-zip-field {
  grid-column: auto !important;
}

body.theme-fresh .parsed-order-confirm-modal .notice-letter-modal-head {
  background:
    linear-gradient(135deg, rgba(236, 253, 245, .92), rgba(255, 255, 255, .98) 58%),
    #fff;
}

body.theme-fresh .parsed-order-confirm-modal .order-view-items-form::before {
  content: "已解析订单文本，请补齐店铺、订单日期和商品后保存。";
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 8px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

body.theme-fresh .merchant-order-editor-modal .order-view-item-row {
  border-color: rgba(203, 213, 225, .92);
  border-radius: 8px;
  background: #fff;
}

body.theme-fresh .merchant-order-editor-modal .order-view-add-item-button {
  border-radius: 8px !important;
}

body.theme-fresh .merchant-order-editor-modal .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 16px -22px 0;
  padding: 15px 22px 18px;
  border-top: 1px solid rgba(203, 213, 225, .82);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
}

body.theme-fresh .merchant-order-editor-modal .modal-actions .btn {
  min-height: 38px !important;
  border-radius: 7px;
}

body.theme-fresh .merchant-order-editor-modal .notice-letter-modal-head > .btn {
  min-height: 36px !important;
  padding-inline: 14px !important;
  border-radius: 7px !important;
}

@media (max-width: 720px) {
  body.theme-fresh .order-confirm-modal .notice-letter-modal-head,
  body.theme-fresh .merchant-order-editor-modal .order-view-items-form,
  body.theme-fresh .submit-mail-confirm-modal:not(.merchant-order-editor-modal) .modal-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.theme-fresh .merchant-order-editor-modal .modal-actions {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  body.theme-fresh .submit-mail-summary {
    margin-left: 16px;
    margin-right: 16px;
  }

  body.theme-fresh .submit-mail-summary > div {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .field:not(.full),
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-customer-name-field,
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-phone-field,
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-whatsapp-field,
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-whatsapp-supported-field,
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid > .field:nth-child(3) {
    grid-column: span 1 !important;
    grid-row: auto !important;
  }

  body.theme-fresh .merchant-order-editor-modal .order-address-collapse-body {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid {
    grid-template-columns: 1fr !important;
  }

  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .field:not(.full),
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-customer-name-field,
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-phone-field,
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-whatsapp-field,
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid .order-whatsapp-supported-field,
  body.theme-fresh .merchant-order-editor-modal .order-editor-customer-grid > .field:nth-child(3) {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  body.theme-fresh .merchant-order-editor-modal .order-address-collapse-body {
    grid-template-columns: 1fr !important;
  }
}
