.od-workspace {
 --od-ink: #30382a;
 --od-muted: #5e6955;
 --od-green: #456133;
 --od-border: #dce2d0;
 --od-surface: #fcfcf8;
 --od-active: #e4efce;
 display: grid;
 gap: 16px;
 min-width: 0;
 color: var(--od-ink);
}
.od-workspace .od-header > .od-backline:first-child { flex-basis: 100%; }
.od-workspace .od-back { min-height: 30px; padding: 3px 0; }
.od-workspace .od-header { display: grid; gap: 14px; margin: 0 0 4px; }
.od-workspace .od-header > .od-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.od-workspace .od-heading h1 { margin: 0; font-size: clamp(22px, 3vw, 34px); line-height: 1.15; overflow-wrap: anywhere; }
.od-heading time { margin-inline-start: 6px; color: var(--od-muted); font-size: 14px; }
.od-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.od-workspace .od-action, .od-workspace .od-copy {
 display: inline-flex; align-items: center; justify-content: center; gap: 8px;
 min-height: 44px; max-width: 100%; padding: 8px 13px; border-radius: 10px;
 font-size: 14px; font-weight: 700; line-height: 1.25; white-space: normal;
}
.od-workspace .od-action.secondary, .od-workspace .od-copy { background: #f5f7ed; border: 1px solid #d6dfc9; color: #3a502e; box-shadow: none; }
.od-workspace .od-action.secondary:hover, .od-workspace .od-copy:hover { background: var(--od-active); }
.od-workspace .od-action.danger { background: #ac4035; border: 1px solid #a2382f; color: #fff; box-shadow: none; }
.od-workspace .od-action.danger:hover { background: #91342c; }
.od-workspace .od-action[data-order-detail="copy"], .od-workspace .od-copy { width: 44px; min-width: 44px; padding: 0; }
.od-section-actions {
 display: flex; align-items: center; flex-wrap: wrap; column-gap: 12px; margin-top: 5px;
}
.od-workspace .od-text-action {
 min-height: 30px; padding: 2px 0; border: 0; background: transparent; box-shadow: none;
 color: var(--od-green); font-size: 13px; font-weight: 700; text-align: start;
}
.od-workspace .od-text-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.od-editor legend + button { margin-bottom: 9px; }
.od-workspace svg { width: 20px; height: 20px; flex: none; }
.od-surface { min-width: 0; background: linear-gradient(140deg, #fffefb, var(--od-surface)); border: 1px solid var(--od-border); border-radius: 16px; box-shadow: 0 3px 12px #41522c08; }
.od-journey { min-width: 0; padding: 8px 0 4px; }
.od-journey header { display: flex; justify-content: end; }
.od-journey header h2, .od-step:is(.od-step--done,.od-step--future) div span {
 position: absolute; width: 1px; height: 1px; overflow: hidden;
 clip-path: inset(50%); white-space: nowrap;
}
.od-workspace h2 { margin: 0; font-size: 18px; line-height: 1.25; color: var(--od-ink); }
.od-stop { display: inline-flex; align-items: center; gap: 6px; color: #8a4035; background: #f9ede9; border-radius: 7px; padding: 3px 8px; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.od-steps {
 --od-node: 52px; --od-step-gap: 8px;
 display: grid; grid-template-columns: repeat(5,minmax(0,1fr));
 padding: 0; margin: 0; gap: var(--od-step-gap); list-style: none;
}
.od-step { position: relative; z-index: 0; display: grid; justify-items: center; align-content: start; text-align: center; gap: 5px; min-width: 0; color: var(--od-muted); }
.od-step::after {
 content: ""; position: absolute; z-index: -1; top: calc(var(--od-node) / 2 - 1.5px);
 left: calc(50% + var(--od-node) / 2 - 1px); width: calc(100% + var(--od-step-gap) - var(--od-node) + 2px);
 height: 3px; background: #d3d7ca;
}
.od-step:last-child::after { display: none; }
.od-step--done::after { background: #7c9f4b; }
.od-step-icon {
 display: grid; place-items: center; width: var(--od-node); height: var(--od-node);
 border-radius: 50%; border: 1px solid #d0d6c8; background: #f7f7f0;
}
.od-step-illustration {
 width: 84%; aspect-ratio: 1; display: block;
 background: url("/assets/brand/order-path-3d.png") 0 0 / 300% 200% no-repeat;
}
.od-step-illustration--reviewed { background-position: 50% 0; }
.od-step-illustration--document { background-position: 100% 0; }
.od-step-illustration--created { background-position: 0 100%; }
.od-step-illustration--delivered { background-position: 50% 100%; }
.od-step-illustration--courier { background-position: 100% 100%; }
.od-step--future .od-step-illustration { filter: grayscale(1); opacity: .72; }
.od-step--done .od-step-icon { background: #e2edcf; border-color: #dce8cb; }
.od-step--current .od-step-icon { background: linear-gradient(145deg,#b6d77c,#84a749); border-color: #83a748; }
.od-step--stopped .od-step-icon { background: #faeee9; border-color: #e4bdb2; }
.od-step--stopped .od-step-illustration { filter: saturate(.5); }
.od-step-icon--cancelled { color: #a23932; }
.od-step-icon--cancelled svg { width: 55%; height: 55%; }
.od-step strong { display: block; color: var(--od-ink); font-size: 15px; line-height: 1.25; }
.od-step--future strong { color: var(--od-muted); }
.od-step--stopped strong, .od-step--stopped div span { color: #8a4035; }
.od-step div span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.3; }
.od-step--current:not(.od-step--stopped) div span { font-weight: 650; color: #3b562d; }
.od-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; min-width: 0; }
.od-card { padding: 18px 20px; overflow-wrap: anywhere; }
.od-card h2 { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.od-card-illustration {
 flex: 0 0 34px;
 inline-size: 34px;
 block-size: 34px;
 background: url("/assets/brand/order-card-3d.png") 0 0 / 200% 200% no-repeat;
}
.od-card-illustration--delivery { background-position: 100% 0; }
.od-card-illustration--cost { background-position: 0 100%; }
.od-card-illustration--goods { background-position: 100% 100%; }
.od-name { margin: 0 0 8px; font-size: 17px; font-weight: 750; line-height: 1.35; }
.od-recipient-lines { display: grid; gap: 5px; color: var(--od-muted); }
.od-recipient-lines p, .od-shipment, .od-pay { margin: 0; font-size: 15px; line-height: 1.45; }
.od-recipient-lines a { color: var(--od-ink); text-decoration: underline; text-decoration-color: #9aa58f; text-underline-offset: 3px; }
.od-shipment, .od-pay { display: flex; align-items: center; gap: 7px; color: var(--od-muted); }
.od-shipment--good, .od-pay--paid { color: var(--od-green); }
.od-shipment--stop { color: #8a4035; }
.od-tracking { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px 8px; margin-top: 10px; }
.od-tracking > span:first-child { grid-column: 1 / -1; color: var(--od-muted); font-size: 14px; }
.od-tracking-number { font-size: 14px; font-weight: 750; }
.od-packing, .od-amounts { display: grid; gap: 7px; margin: 0; font-size: 15px; line-height: 1.4; }
.od-packing { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--od-border); }
.od-packing > div, .od-amounts > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: baseline; }
.od-packing > div { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
.od-packing dt, .od-amounts dt { color: var(--od-muted); }
.od-packing dd, .od-amounts dd { margin: 0; font-weight: 650; text-align: end; font-variant-numeric: tabular-nums; }
.od-amounts small { display: block; font-size: 14px; }
.od-amounts .od-grand { padding-top: 8px; border-top: 1px solid var(--od-border); font-weight: 750; }
.od-grand dt { color: var(--od-ink); }
.od-grand dd { font-size: 22px; }
.od-payment-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0 9px; margin-bottom: 9px; }
.od-pay { font-weight: 700; }
.od-workspace .od-payment-summary .od-text-action { min-height: 22px; font-size: 12px; }
.od-payment-summary .od-pay svg { width: 16px; height: 16px; }
.od-balance { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--od-border); font-size: 14px; }
.od-empty-price { margin: 0; color: var(--od-muted); line-height: 1.45; }
.od-balance + .od-empty-price, .od-cost .receipt-history { margin-top: 8px; font-size: 14px; }
.od-goods { grid-column: 1 / -1; }
.od-items { width: 100%; border-spacing: 0; table-layout: fixed; white-space: normal; }
.od-items th, .od-items td { padding: 10px 12px; text-align: end; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.od-items tr > :first-child { width: 52%; text-align: start; }
.od-items thead th { background: #ebf1df; color: #3c4b32; }
.od-items thead th:first-child { border-radius: 8px 0 0 8px; }
.od-items thead th:last-child { border-radius: 0 8px 8px 0; }
.od-items tbody tr > * { border-bottom: 1px solid var(--od-border); }
.od-items tbody th { color: var(--od-ink); background: transparent; font-weight: 650; }
.od-items thead th { font-weight: 700; }
.od-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.od-workspace .od-photo {
 display: grid; place-items: center; width: 104px; height: 92px; padding: 0;
 color: var(--od-green); background: #eff2e8; border: 1px solid var(--od-border);
 border-radius: 10px; box-shadow: none; overflow: hidden; white-space: normal;
 font-size: 13px; line-height: 1.25; cursor: zoom-in;
}
.od-photo img { width: 100%; height: 100%; min-height: 0; display: block; object-fit: contain; }
.od-photo-view { display: grid; justify-items: center; }
.od-photo-view img { display: block; width: auto; max-width: 100%; max-height: 67vh; object-fit: contain; border-radius: 8px; }
#dialog:has(.od-photo-view) { width: min(850px, calc(100% - 32px)); }
.od-editor:not([open]), .od-editor > summary[hidden] { display: none; }
.od-editor[open] { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--od-border); }
.od-editor .review-fieldset { min-width: 0; }
.od-editor legend { padding: 0; margin-bottom: 10px; font-weight: 750; }
.od-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.od-editor-actions button { max-width: 100%; white-space: normal; }
@media(max-width: 850px) {
 .od-grid { grid-template-columns: 1fr; }
}
@media(max-width: 590px) {
 .od-workspace { gap: 12px; }
 .od-card { padding: 14px; }
 .od-heading time { flex-basis: 100%; margin-inline-start: 0; }
 .od-journey { padding: 4px 6px; }
 .od-journey header { justify-content: start; }
 .od-steps { --od-node: 42px; --od-step-gap: 8px; grid-template-columns: 1fr; }
 .od-step { grid-template-columns: var(--od-node) minmax(0,1fr); align-items: center; justify-items: start; text-align: start; gap: 11px; }
 .od-step::after { left: calc(var(--od-node) / 2 - 1px); top: calc(var(--od-node) - 1px); width: 2px; height: calc(100% + var(--od-step-gap) - var(--od-node) + 2px); }
 .od-step div span { margin-top: 2px; }
 .od-items tr > :first-child { width: 35%; }
 .od-items th, .od-items td { padding: 8px 4px; font-size: 14px; }
}

/* Use the width of the cabinet to keep a regular order in view. */
@media (min-width: 1100px) {
 .pearl-cabinet > .main:has(.od-workspace) { padding-block: 10px 8px; }
 .od-workspace, .od-grid { gap: 10px; }
 .od-workspace .od-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 10px; margin: 0;
 }
 .od-workspace .od-back { min-height: 24px; }
 .od-workspace .od-heading { column-gap: 8px; }
 .od-workspace .od-toolbar { gap: 6px; justify-content: start; }
 .od-workspace .od-toolbar .od-action { padding-inline: 10px; }
 .od-workspace .od-toolbar .secondary { background: #fcfcf8; border-color: #aab99b; }
 .od-workspace .od-toolbar .secondary:hover { background: var(--od-active); }
 .od-workspace .od-action, .od-workspace .od-copy { min-height: 40px; padding-block: 6px; }
 .od-workspace .od-action[data-order-detail="copy"], .od-workspace .od-copy { width: 40px; min-width: 40px; }

 .od-journey { padding: 5px 0 4px; }
 .od-steps { --od-node: 52px; }

 .od-card { padding: 12px 14px; }
 .od-card h2 { margin-bottom: 7px; }
 .od-name { margin-bottom: 3px; }
 .od-recipient-lines { gap: 2px; }
 .od-tracking {
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 6px; margin-top: 4px;
 }
 .od-tracking > span:first-child { grid-column: auto; }
 .od-packing, .od-amounts { gap: 3px; }
 .od-packing { margin-top: 4px; padding-top: 5px; }
 .od-packing > div { grid-template-columns: minmax(0,1fr) auto; }
 .od-packing dd { max-width: 192px; }
 .od-payment-summary { margin-bottom: 4px; column-gap: 6px; }
 .od-amounts .od-grand, .od-balance { padding-top: 4px; }
 .od-balance { margin-top: 6px; }

 .od-goods:has(.od-photos) {
  display: grid; align-items: start; gap: 0 14px;
  grid-template-columns: minmax(0,1fr) auto;
 }
 .od-goods > h2, .od-goods > .od-editor { grid-column: 1 / -1; }
 .od-items th, .od-items td { padding-block: 7px; }
 .od-photos { margin: 0; gap: 6px; max-width: 248px; }
 .od-workspace .od-photo { width: 76px; height: 62px; }
}

.od-workspace--editing .od-toolbar [data-order-detail="edit"],
.od-workspace--editing .od-journey,
.od-workspace--editing .order-test { display: none; }
.od-workspace .od-toolbar:has(.od-action--payment) {
 margin-inline-start: auto;
 justify-content: flex-end;
 align-items: stretch;
}
.od-workspace .od-toolbar:has(.od-action--payment) > .od-action { min-height: 48px; }
.od-workspace .od-toolbar .od-action--payment {
 min-width: 200px;
 padding-inline: 20px;
 font-size: 16px;
}
.od-edit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.od-edit-grid .od-card { min-width: 0; padding: clamp(14px, 1.25vw, 20px); }
.od-edit-grid .od-card h2 { margin-bottom: 14px; }
.od-edit-grid .od-cost { background: linear-gradient(155deg, #fffefb 42%, #f0f5e7); }
.od-edit-carrier {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 max-width: 100%;
 margin: 0 0 14px;
 padding: 4px 10px;
 border-radius: 8px;
 background: var(--od-active);
 color: var(--od-green);
 font-size: 14px;
 font-weight: 700;
}
.od-edit-carrier .mg-brand {
 width: 22px;
 height: 22px;
 flex: 0 0 22px;
 object-fit: contain;
}
.od-edit-price-rule { padding-top: 12px; border-top: 1px solid var(--od-border); }
.od-edit-fields, .od-edit-actions { display: grid; gap: 12px; }
.od-edit-fields label { min-width: 0; }
.od-edit-fields input:not([type="checkbox"]):not([type="radio"]) { width: 100%; min-height: 44px; }
.od-edit-fields input[type="checkbox"] { accent-color: #56783a; }
.od-edit-pair { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.od-edit-locations { display: flex; flex-wrap: wrap; gap: 6px; }
.od-edit-locations:empty { display: none; }
.od-edit-locations button { white-space: normal; text-align: left; max-width: 100%; }
.od-edit-totals { margin-bottom: 14px; color: var(--od-muted); }
.od-edit-totals .od-grand { margin-block: 4px; padding: 8px 10px; border: 0; border-radius: 8px; background: var(--od-active); color: var(--od-ink); }
.od-edit-totals .od-grand dd { font-size: 18px; }
.od-edit-grid #items { margin-bottom: 10px; }
.od-edit-grid .od-goods > button { justify-self: start; }
.od-edit-grid .od-goods:has(.od-photos) > button { grid-column: 1; }
.od-edit-grid .od-goods:has(.od-photos) .od-photos { grid-column: 2; grid-row: 2; }
.od-edit-grid .od-amounts dd { white-space: nowrap; }
.od-edit-grid .detail-item { margin-bottom: 10px; grid-template-columns: minmax(0, 3fr) repeat(3,minmax(0,1fr)) auto; }
.od-edit-grid .detail-item input { min-width: 0; width: 100%; }
.od-edit-grid .form-error[hidden] { display: none; }
.od-edit-actions button { min-height: 44px; white-space: normal; }
@media(max-width: 1050px) {
 .od-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .od-edit-grid .od-cost { grid-column: 1 / -1; grid-row: auto; order: 1; }
 .od-edit-actions { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media(max-width: 680px) {
 .od-edit-grid, .od-edit-actions { grid-template-columns: minmax(0,1fr); }
 .od-edit-grid .detail-item { grid-template-columns: repeat(2, minmax(0,1fr)); }
 .od-edit-grid .detail-item > label:first-child { grid-column: 1 / -1; }
 .od-edit-grid .od-goods:has(.od-photos) .od-photos { grid-column: auto; grid-row: auto; }
}
.od-edit-payment {
 padding: 12px 0 14px;
 margin-bottom: 12px;
 border-block: 1px solid var(--od-border);
}
.od-edit-payment .pm-editor { border: 0; padding: 0; }

.od-edit-sender,
.od-edit-sender-summary {
 padding-bottom: 12px;
 border-bottom: 1px solid var(--od-border);
 overflow-wrap: anywhere;
}
.od-edit-sender-summary { margin: 0; }
.od-edit-sender .choice-group legend {
 padding-bottom: 9px;
 margin-bottom: 8px;
 width: 100%;
 border-bottom: 1px solid var(--od-border);
}
.od-edit-sender .choice-option { min-height: 48px; }
.od-edit-sender .choice-option:has(input:checked) { background: #edf4e1; border-color: #becdad; }
.od-edit-sender [data-new-order-sender] { margin-top: 8px; }
.od-edit-sender .choice-option[hidden] { display: none; }

/* Owner review follows the order in which the merchant checks the application. */
.od-edit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; }
.od-edit-grid .od-card { padding: 14px; }
.od-edit-grid .od-card h2 { margin: 0 0 10px; font-size: 17px; }
.od-edit-grid :is(.od-sender, .od-recipient, .od-review-footer) { grid-column: 1 / -1; }
.od-edit-grid .od-goods { grid-column: auto; }
.od-edit-grid .od-goods:has(.od-photos) { display: block; }
.od-edit-grid .od-goods .od-photos { margin-top: 10px; }
.od-edit-grid .od-edit-fields { gap: 8px; }
.od-edit-grid .od-edit-fields input:not([type="checkbox"]):not([type="radio"]) { min-height: 36px; }
.od-recipient-fields, .od-sender-details {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.45fr);
 gap: 8px;
}
.od-recipient-fields > label:first-child { grid-column: auto; }
.od-recipient-fields .od-edit-locations { grid-column: 1 / -1; }
.od-recipient-fields > label:nth-last-child(2):has([name="recipient_address"]) { grid-column: span 2; }
.od-sender-details { margin: 0; }
.od-sender-details > div, .od-recipient-fields > label {
 min-width: 0;
 margin: 0;
 padding: 6px 9px;
 border: 1px solid var(--od-border);
 border-radius: 9px;
}
.od-sender-details dt, .od-recipient-fields > label { color: var(--od-muted); font-size: 12px; }
.od-sender-details dd { margin: 4px 0 0; color: var(--od-ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.od-recipient-fields > label input:not([type="checkbox"]):not([type="radio"]) {
 min-height: 26px;
 padding: 2px 0;
 margin: 1px 0 0;
 border: 0;
 box-shadow: none;
 background: transparent;
 font-size: 14px;
}
.od-recipient-fields > label:focus-within { outline: 2px solid #769858; outline-offset: 1px; }
.od-edit-grid .od-edit-sender { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; }
.od-edit-sender > [data-order-sender-details] { flex: 0 0 100%; min-width: 0; }
.od-edit-grid .od-edit-sender legend { margin: 0 0 4px; padding: 0; border: 0; }
.od-edit-grid .choice-option { min-height: 36px; gap: 7px; padding: 6px 8px; font-size: 13px; }
.od-edit-grid .od-edit-sender [data-new-order-sender] { margin: 0; min-height: 36px; padding: 6px 10px; }
.od-edit-grid .od-edit-payment { border: 0; margin: 0; padding: 0; }
.od-edit-grid .detail-item { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 5px; }
.od-edit-grid .detail-item > label:first-child { grid-column: 1 / -1; }
.od-edit-grid .od-review-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; background: #f2f6eb; }
.od-review-footer .od-edit-totals { flex: 1 1 340px; margin: 0; }
.od-review-footer .od-edit-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.od-review-footer .od-amounts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.od-review-footer .od-amounts > div { display: grid; gap: 3px; border: 0; }
.od-review-footer :is(.form-error, .note) { flex-basis: 100%; margin: 0; }

@media (max-width: 1050px) {
 .od-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .od-edit-grid .od-payment { grid-column: 1 / -1; }
 .od-recipient-fields, .od-sender-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
 .od-edit-grid { grid-template-columns: minmax(0, 1fr); }
 .od-review-footer .od-edit-actions { width: 100%; }
}
