/* Flex: measured Hatu sales UI, with only local fictional order data. */
:is(.sales-page, .modal) {
  --fxf-gray-50: oklch(.985 .002 247.839);
  --fxf-gray-100: oklch(.967 .003 264.542);
  --fxf-gray-200: oklch(.928 .006 264.531);
  --fxf-gray-300: oklch(.872 .01 258.338);
  --fxf-gray-400: oklch(.707 .022 261.325);
  --fxf-gray-500: oklch(.551 .027 264.364);
  --fxf-gray-600: oklch(.446 .03 256.802);
  --fxf-gray-700: oklch(.373 .034 259.733);
  --fxf-gray-900: oklch(.21 .034 264.665);
  --fxf-blue-50: oklch(.97 .014 254.604);
  --fxf-blue-500: oklch(.623 .214 259.815);
  --fxf-blue-600: oklch(.546 .245 262.881);
  --fxf-blue-700: oklch(.488 .243 264.376);
  --fxf-green-600: oklch(.627 .194 149.214);
  --fxf-red-500: oklch(.637 .237 25.331);
  --fxf-amber-50: oklch(.987 .022 95.277);
  --fxf-amber-100: oklch(.962 .059 95.617);
  --fxf-amber-200: oklch(.924 .12 95.746);
  --fxf-amber-300: oklch(.879 .169 91.605);
  --fxf-amber-600: oklch(.666 .179 58.318);
  --fxf-amber-700: oklch(.555 .163 48.998);
  --fxf-amber-800: oklch(.473 .137 46.201);
}

:is(.sales-page, .modal) .fxf-icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
:is(.sales-page, .modal) .fxf-positive { color: var(--fxf-green-600); }
:is(.sales-page, .modal) .fxf-negative { color: var(--fxf-red-500); }
:is(.sales-page, .modal) .fxf-neutral { color: var(--fxf-gray-600); }
:is(.sales-page, .modal) .fxf-muted { color: var(--fxf-gray-400); }
:is(.sales-page, .modal) .fxf-pending { color: var(--fxf-amber-600); }
:is(.sales-page, .modal) .fxf-badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 4px; background: var(--fxf-blue-50); color: var(--fxf-blue-700); font-size: 10px; font-weight: 700; line-height: 14px; white-space: nowrap; }
.sales-page .fxf-channel-badge { display: block; margin-top: 2px; text-align: center; line-height: 14px; }
.sales-page .fxf-shipping-value { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 12px; line-height: 16px; white-space: nowrap; }
.sales-page .fxf-shipping-value b { font-weight: 700; }
.sales-page .fxf-shipping-note { display: block; margin-top: 2px; font-size: 9px; line-height: 12px; font-weight: 400; color: var(--fxf-amber-600); white-space: nowrap; }
.sales-page .fxf-estimated { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; color: var(--fxf-amber-600); font-size: 10px; font-weight: 400; line-height: 14px; }

.sales-page .fxf-summary { margin: 24px 0; padding: 20px; border: 1px solid var(--fxf-gray-100); border-radius: 18px; background: #fff; box-shadow: 0 1px 3px #0000000d, 0 1px 2px #0000000d; }
.sales-page .fxf-summary p { margin: 0; }
.sales-page .fxf-summary-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.sales-page .fxf-summary-heading { display: flex; align-items: center; gap: 12px; }
.sales-page .fxf-summary-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 14px; color: var(--fxf-blue-600); background: var(--fxf-blue-50); }
.sales-page .fxf-summary-title { color: var(--fxf-gray-600); font-size: 12px; font-weight: 800; line-height: 16px; letter-spacing: .6px; text-transform: uppercase; }
.sales-page .fxf-summary-subtitle { color: var(--fxf-gray-500); font-size: 11px; line-height: 16px; }
.sales-page .fxf-import-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--fxf-gray-200); border-radius: 10px; color: var(--fxf-gray-700); background: #fff; font: inherit; font-size: 12px; font-weight: 600; line-height: 16px; cursor: pointer; }
.sales-page .fxf-import-button:hover { color: oklch(.592 .249 .584); border-color: oklch(.823 .12 346.018); }
.sales-page .fxf-summary-equation { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; margin-top: 16px; }
.sales-page .fxf-summary-card { min-width: 0; padding: 12px 16px; border-radius: 14px; background: var(--fxf-gray-50); }
.sales-page .fxf-summary-label { color: var(--fxf-gray-500); font-size: 11px; line-height: 16px; }
.sales-page .fxf-summary p.fxf-summary-value { margin-top: 4px; font-size: 20px; font-weight: 800; line-height: 28px; font-variant-numeric: tabular-nums; }
.sales-page .fxf-summary p.fxf-summary-caption { margin-top: 2px; color: var(--fxf-gray-500); font-size: 10px; line-height: 14px; }
.sales-page .fxf-math { display: flex; align-items: center; justify-content: center; }
.sales-page .fxf-math > span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: var(--fxf-gray-500); background: var(--fxf-gray-100); font-size: 14px; font-weight: 700; line-height: 20px; }
.sales-page .fxf-summary-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 16px; }
.sales-page .fxf-coverage { min-width: 220px; flex: 1; }
.sales-page .fxf-coverage-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; color: var(--fxf-gray-500); font-size: 11px; line-height: 16px; }
.sales-page .fxf-coverage-label b { font-weight: 600; }
.sales-page .fxf-progress { height: 6px; overflow: hidden; border-radius: 9999px; background: var(--fxf-gray-100); }
.sales-page .fxf-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--fxf-blue-500); }
.sales-page .fxf-pending-filter { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--fxf-amber-200); border-radius: 10px; color: var(--fxf-amber-800); background: var(--fxf-amber-50); font: inherit; font-size: 11px; line-height: 16px; text-align: left; cursor: pointer; }
.sales-page .fxf-pending-filter:hover:enabled { background: var(--fxf-amber-100); }
.sales-page .fxf-pending-filter:disabled { cursor: default; color: var(--fxf-gray-500); border-color: var(--fxf-gray-200); background: var(--fxf-gray-50); }

.sales-page .sales-detail-row.fxf-detail-row > td { padding: 0 !important; background: var(--fxf-gray-50); }
.sales-page .fxf-order-detail { padding: 16px 24px; }
:is(.sales-page, .modal) .fxf-section-title { margin: 0 0 8px; color: var(--fxf-gray-400); font-size: 10px; font-weight: 700; line-height: 15px; letter-spacing: .5px; text-transform: uppercase; }
.sales-page .fxf-item-card { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(7, auto); align-items: center; gap: 24px; padding: 16px; border: 1px solid var(--fxf-gray-200); border-radius: 14px; background: #fff; }
.sales-page .fxf-item-product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sales-page .fxf-item-product .product-thumb { display: block; flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 8px; background: #fff; overflow: hidden; }
.sales-page .fxf-item-product > div { min-width: 0; }
.sales-page .fxf-item-product > div > strong { display: block; color: var(--fxf-gray-900); font-size: 12px; font-weight: 600; line-height: 16px; white-space: normal; }
.sales-page .fxf-item-product > div > span { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--fxf-gray-400); font-size: 10px; font-weight: 400; line-height: 14px; white-space: nowrap; }
.sales-page .fxf-item-metric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sales-page .fxf-item-metric > span { display: block; margin-top: 2px; color: var(--fxf-gray-400); font-size: 10px; font-weight: 400; line-height: 14px; }
.sales-page .fxf-item-metric > strong { display: block; font-size: 12px; font-weight: 600; line-height: 16px; }
.sales-page .fxf-item-metric > small { display: block; font-size: 10px; font-weight: 600; line-height: 14px; }
.sales-page .fxf-margin-low { color: oklch(.705 .213 47.604); }

:is(.sales-page, .modal) .fxf-cost-detail { margin-top: 16px; }
:is(.sales-page, .modal) .fxf-result-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 12px 16px; border: 1px solid var(--fxf-gray-200); border-radius: 14px; background: #fff; box-shadow: 0 1px 3px #0000000d, 0 1px 2px #0000000d; font-size: 12px; line-height: 16px; }
:is(.sales-page, .modal) .fxf-result-strip.fxf-result-pending { border-color: var(--fxf-amber-300); }
:is(.sales-page, .modal) .fxf-result-type { display: flex; align-items: center; gap: 8px; min-width: 140px; color: var(--fxf-blue-600); }
:is(.sales-page, .modal) .fxf-result-item { text-align: right; font-variant-numeric: tabular-nums; }
:is(.sales-page, .modal) .fxf-result-amount { margin: 0; font-size: 12px; font-weight: 400; line-height: 16px; white-space: nowrap; }
.modal .fxf-result-amount { color: inherit; }
:is(.sales-page, .modal) .fxf-result-label { margin: 0; color: var(--fxf-gray-400); font-size: 10px; font-weight: 400; line-height: 14px; white-space: nowrap; }
:is(.sales-page, .modal) .fxf-result-transfer .fxf-result-amount { font-weight: 600; }
:is(.sales-page, .modal) .fxf-result-carrier .fxf-result-amount,
:is(.sales-page, .modal) .fxf-result-net .fxf-result-amount { font-weight: 700; }
:is(.sales-page, .modal) .fxf-result-net { padding-left: 24px; border-left: 1px solid var(--fxf-gray-200); }
:is(.sales-page, .modal) .fxf-pending-explainer { flex: 1; min-width: 220px; margin: 0; color: var(--fxf-amber-700); font-size: 11px; line-height: 16px; white-space: normal; }
:is(.sales-page, .modal) .fxf-cost-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 8px; }
:is(.sales-page, .modal) .fxf-cost-field { display: flex; flex-direction: column; gap: 4px; color: var(--fxf-gray-500); font-size: 11px; font-weight: 400; line-height: 16px; }
:is(.sales-page, .modal) .fxf-cost-field > input { width: 144px; height: 36px; box-sizing: border-box; margin: 0; padding: 0 12px; border: 1px solid var(--fxf-gray-300); border-radius: 10px; outline: none; background: #fff; color: var(--fxf-gray-900); font-family: inherit; font-size: 12px; font-weight: 400; line-height: 16px; }
:is(.sales-page, .modal) .fxf-cost-field > input::placeholder { color: var(--fxf-gray-400); }
:is(.sales-page, .modal) .fxf-cost-field > input:focus { border-color: var(--fxf-blue-500); box-shadow: 0 0 0 2px oklch(.623 .214 259.815 / .15); }
:is(.sales-page, .modal) .fxf-cost-field > input[aria-invalid="true"] { border-color: var(--fxf-red-500); }
:is(.sales-page, .modal) .fxf-save-button { height: 36px; padding: 0 16px; border: 0; border-radius: 10px; color: #fff; background: var(--fxf-gray-900); font-family: inherit; font-size: 12px; font-weight: 700; line-height: 16px; cursor: pointer; }
:is(.sales-page, .modal) .fxf-save-button:hover { background: oklch(.278 .033 256.848); }
:is(.sales-page, .modal) .fxf-save-button:disabled { cursor: default; opacity: .5; }
:is(.sales-page, .modal) .fxf-cost-error { margin: 6px 0 0; color: var(--fxf-red-500); font-size: 11px; line-height: 16px; white-space: normal; }
.sales-page .fxf-excluded-note { margin: 12px 0 0; color: var(--fxf-gray-500); font-size: 11px; line-height: 16px; }
:is(.sales-page, .modal) :is(.fxf-save-button, .fxf-import-button, .fxf-pending-filter):focus-visible { outline: 2px solid var(--fxf-blue-600); outline-offset: 3px; }

@media (max-width: 767px) {
  .sales-page .fxf-summary { padding: 16px; }
  .sales-page .fxf-summary-equation { grid-template-columns: 1fr; }
  .sales-page .fxf-math { display: none; }
  .sales-page .fxf-summary-header { align-items: flex-start; }
  .sales-page .fxf-summary-heading { align-items: flex-start; }
  .sales-page .fxf-coverage { min-width: 0; flex-basis: 100%; }
  .sales-page .fxf-pending-filter { width: 100%; }
  .modal .fxf-result-strip { gap: 16px; }
  .modal .fxf-result-type { width: 100%; }
  .modal .fxf-pending-explainer { min-width: 0; flex-basis: 100%; }
  .modal .fxf-result-net { padding-left: 16px; }
}
