/* 一寻3 v1.5.0：P5 信息密度，OMS 视觉与交互。 */
.create-modal.create-yixun3-modal {
  width: min(1760px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
}

.create-yixun3-modal .create-modal-head,
.create-yixun3-modal .create-modal-foot {
  padding: 13px 16px;
}

.create-yixun3-modal .create-modal-head h2 {
  margin-top: 5px;
  font-size: 19px;
}

.create-yixun3-modal .create-modal-head p {
  margin-top: 5px;
}

.create-yixun3-modal .create-modal-badge {
  color: #8fcaff;
  background: rgba(22, 119, 255, .16);
}

.create-yixun3-modal .create-modal-body {
  padding: 12px 14px 16px;
  scroll-padding-top: 10px;
}

.create-yixun3-modal .create-modal-foot {
  align-items: center;
}

.create-yixun3-modal .create-modal-foot .y3-save-note {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.y3-order-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.y3-intake {
  display: grid;
  gap: 12px;
}

.y3-intake-copy {
  min-width: 0;
}

.y3-intake-copy h3 {
  margin: 0;
}

.y3-dropzone {
  cursor: pointer;
  outline: none;
}

.y3-dropzone:focus-visible {
  outline: 2px solid var(--primary, #1677ff);
  outline-offset: 2px;
}

.y3-dropzone.is-processing {
  cursor: progress;
}

.y3-intake-status {
  text-align: center;
}

.y3-intake-status strong {
  color: inherit;
  font: inherit;
}

.y3-intake-status p {
  display: inline;
  margin: 0;
  color: inherit;
  font: inherit;
}

.y3-intake-status p::before {
  content: " · ";
}

.y3-source-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.y3-source-list[hidden] {
  display: none;
}

.y3-source-chip {
  max-width: 340px;
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .045);
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.y3-source-warning {
  flex: 1 1 100%;
  margin: 3px 0 0;
  color: #ffc96f;
  font-size: 10px;
  line-height: 1.45;
}

.y3-section,
.y3-details {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, .025);
}

.y3-section {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 10px;
}

.y3-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

.y3-section-head > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.y3-section-head > div > span,
.y3-details summary > span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 6px;
  color: #9ccfff;
  background: rgba(22, 119, 255, .15);
  font-size: 9px;
  font-weight: 950;
}

.y3-section-head h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 900;
}

.y3-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.y3-grid-24,
.y3-grid-12 {
  display: grid;
  min-width: 0;
  gap: 7px 8px;
}

.y3-grid-24 { grid-template-columns: repeat(24, minmax(0, 1fr)); }
.y3-grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.y3-span-2 { grid-column: span 2; }
.y3-span-3 { grid-column: span 3; }
.y3-span-4 { grid-column: span 4; }
.y3-span-5 { grid-column: span 5; }
.y3-span-6 { grid-column: span 6; }
.y3-span-8 { grid-column: span 8; }
.y3-span-9 { grid-column: span 9; }
.y3-span-11 { grid-column: span 11; }
.y3-span-12 { grid-column: span 12; }
.y3-span-24 { grid-column: span 24; }

.y3-field {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 4px;
}

.y3-field > span {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.y3-field > span > b {
  margin-left: 3px;
  color: var(--red);
  font-size: 12px;
}

.y3-field input,
.y3-field select,
.y3-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  font: inherit;
  font-size: 11px;
  outline: none;
  transition: border-color .13s ease, box-shadow .13s ease, background .13s ease;
}

.y3-field input,
.y3-field select {
  height: 33px;
  padding: 0 8px;
}

.y3-field .oms-entrust-combobox {
  width: 100%;
}

.y3-field .oms-entrust-combobox > input {
  height: 33px;
  padding-right: calc(var(--oms-dropdown-arrow-width, 35px) + 8px);
}

.y3-field textarea {
  min-height: 70px;
  padding: 8px;
  line-height: 1.42;
  resize: vertical;
}

.y3-field input:focus,
.y3-field select:focus,
.y3-field textarea:focus {
  border-color: #3298ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, .12);
}

.y3-field.is-readonly input {
  color: #9fc8ff;
  background: rgba(56, 118, 196, .08);
}

.y3-field.is-autofilled > span::after {
  max-width: 62px;
  overflow: hidden;
  margin-left: auto;
  padding: 1px 4px;
  border-radius: 999px;
  color: #64d3a3;
  background: rgba(35, 179, 116, .12);
  content: attr(data-y3-source);
  font-size: 8px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.y3-field.is-autofilled input,
.y3-field.is-autofilled select,
.y3-field.is-autofilled textarea {
  border-color: rgba(49, 191, 132, .36);
  background: rgba(35, 179, 116, .055);
}

.y3-field.is-conflict input,
.y3-field.is-conflict select,
.y3-field.is-conflict textarea {
  border-color: rgba(244, 173, 48, .65);
  background: rgba(236, 157, 32, .08);
}

.y3-field.is-missing input,
.y3-field.is-missing select,
.y3-field.is-missing textarea {
  border-color: rgba(255, 111, 125, .74);
  background: rgba(225, 63, 77, .075);
  box-shadow: 0 0 0 2px rgba(225, 63, 77, .08);
}

.y3-checks {
  display: flex;
  align-items: center;
  min-height: 33px;
  gap: 5px;
}

.y3-checks-wide {
  flex-wrap: wrap;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, .025);
}

.y3-check {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  color: var(--text);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.y3-check input {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin: 0;
  accent-color: var(--primary);
}

.y3-p5-primary {
  display: grid;
  grid-template-columns: minmax(250px, 4fr) minmax(430px, 9fr) minmax(520px, 11fr);
  align-items: stretch;
  gap: 10px;
}

.y3-party-column .y3-field {
  grid-column: auto;
}

.y3-party-column .y3-field textarea {
  min-height: 62px;
}

.y3-bill-groups {
  display: grid;
  gap: 8px;
}

.y3-bill-groups article {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, .018);
}

.y3-bill-groups h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 900;
}

.y3-bill-groups h4 > span {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  color: #a8d4ff;
  background: rgba(22, 119, 255, .13);
  font-size: 9px;
}

.y3-container-card {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, .02);
}

.y3-container-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.y3-container-title small {
  color: var(--muted-2);
  font-size: 8px;
}

.y3-container-rows {
  display: grid;
  gap: 4px;
}

.y3-container-row {
  display: grid;
  grid-template-columns: 54px 64px 1fr 1fr;
  align-items: center;
  gap: 5px;
}

.y3-container-row > input {
  width: 54px;
  height: 26px;
  min-width: 0;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  font-size: 10px;
}

.y3-container-row > b {
  color: var(--text);
  font-size: 9px;
}

.y3-details {
  overflow: hidden;
}

.y3-details summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--text-strong);
  cursor: pointer;
  list-style: none;
}

.y3-details summary::-webkit-details-marker { display: none; }

.y3-details summary strong {
  font-size: 12px;
  font-weight: 900;
}

.y3-details summary em {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}

.y3-details[open] summary {
  border-bottom: 1px solid var(--border);
}

.y3-details-body {
  padding: 9px 10px 10px;
}

.y3-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.y3-notes-grid .y3-field {
  grid-column: auto;
}

.y3-notes-grid textarea {
  min-height: 96px;
}

body.theme-light .y3-intake,
body.theme-light .y3-section,
body.theme-light .y3-details,
body.theme-light .y3-bill-groups article,
body.theme-light .y3-container-card {
  background-color: #fff;
}

body.theme-light .y3-field input,
body.theme-light .y3-field select,
body.theme-light .y3-field textarea,
body.theme-light .y3-container-row > input {
  color: #172238;
  background-color: #fff;
}

body.theme-light .y3-field.is-autofilled input,
body.theme-light .y3-field.is-autofilled select,
body.theme-light .y3-field.is-autofilled textarea {
  background-color: rgba(35, 179, 116, .055);
}

/* Native selects inherit the single OMS dropdown-arrow treatment. */
.create-yixun3-modal .y3-field select:not([multiple]):not([size]),
.create-yixun3-modal .y3-field select[size="1"]:not([multiple]) {
  cursor: pointer;
}

@media (max-width: 1450px) {
  .y3-p5-primary {
    grid-template-columns: minmax(250px, 4fr) minmax(520px, 9fr);
  }

  .y3-bill-column {
    grid-column: 1 / -1;
  }

  .y3-bill-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .create-modal.create-yixun3-modal {
    width: min(100%, calc(100vw - 24px));
  }

  .y3-grid-24 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .y3-grid-24 > .y3-span-24,
  .y3-grid-24 > .y3-span-12 { grid-column: span 12; }
  .y3-grid-24 > .y3-span-11,
  .y3-grid-24 > .y3-span-9,
  .y3-grid-24 > .y3-span-8 { grid-column: span 8; }
  .y3-grid-24 > .y3-span-6 { grid-column: span 6; }
  .y3-grid-24 > .y3-span-5,
  .y3-grid-24 > .y3-span-4 { grid-column: span 4; }

  .y3-p5-primary {
    grid-template-columns: 1fr;
  }

  .y3-bill-column { grid-column: auto; }
}

@media (max-width: 820px) {
  .y3-bill-groups,
  .y3-notes-grid {
    grid-template-columns: 1fr;
  }

  .y3-source-list { grid-column: auto; }

  .y3-grid-24 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .y3-grid-24 > .y3-span-24,
  .y3-grid-24 > .y3-span-12,
  .y3-grid-24 > .y3-span-11,
  .y3-grid-24 > .y3-span-9,
  .y3-grid-24 > .y3-span-8,
  .y3-grid-24 > .y3-span-6 { grid-column: span 6; }
  .y3-grid-24 > .y3-span-5,
  .y3-grid-24 > .y3-span-4,
  .y3-grid-24 > .y3-span-3 { grid-column: span 3; }
  .y3-grid-24 > .y3-span-2 { grid-column: span 2; }

  .y3-grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .y3-grid-12 > .y3-span-12,
  .y3-grid-12 > .y3-span-11,
  .y3-grid-12 > .y3-span-9,
  .y3-grid-12 > .y3-span-8,
  .y3-grid-12 > .y3-span-6 { grid-column: span 6; }
  .y3-grid-12 > .y3-span-5,
  .y3-grid-12 > .y3-span-4,
  .y3-grid-12 > .y3-span-3 { grid-column: span 3; }

  .create-yixun3-modal .create-modal-foot .y3-save-note {
    flex-basis: 100%;
  }
}

/* v1.5.0 master / house mode switch. It is a flat control strip, not another card. */
.y3-order-level-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  padding: 2px 0 9px;
  border-bottom: 1px solid var(--border);
}

.y3-order-level-switch > div:first-child {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 9px;
}

.y3-order-level-switch strong {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.y3-order-level-switch span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.y3-order-level-actions {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-solid, #fff) 86%, var(--primary, #1677ff) 14%);
}

.y3-order-level-actions button {
  min-width: 62px;
  min-height: 28px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  cursor: pointer;
  transition: color .13s ease, background .13s ease, box-shadow .13s ease;
}

.y3-order-level-actions button:hover {
  color: var(--primary, #1677ff);
}

.y3-order-level-actions button.active,
.y3-order-level-actions button[aria-pressed="true"] {
  background: var(--primary, #1677ff);
  box-shadow: 0 2px 8px rgba(22, 119, 255, .2);
  color: #fff;
}

/* P5 master sheet: one continuous working surface with a 5 / 19 party-to-order split. */
.y3-master-order-form {
  gap: 10px;
}

.y3-master-order-form .y3-master-order-head {
  padding: 9px 0 13px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.y3-master-order-form .y3-master-order-head > .y3-section-head {
  padding-inline: 2px;
}

.y3-master-order-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 5fr) minmax(0, 19fr);
  align-items: stretch;
  min-width: 0;
  gap: 0;
  border-top: 1px solid var(--border);
}

.y3-master-party-rail,
.y3-master-order-main {
  min-width: 0;
}

.y3-master-party-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  padding: 12px 14px 14px 0;
  border-right: 1px solid var(--border);
  background: transparent;
}

.y3-master-party-rail > .y3-section-head,
.y3-master-party-rail > .y3-field,
.y3-master-party-rail > .y3-master-party-flags,
.y3-master-party-rail > .y3-master-party-card {
  grid-column: 1 / -1;
}

.y3-master-party-rail > .y3-section-head {
  margin-bottom: 1px;
}

.y3-master-party-flags {
  display: flex;
  align-items: center;
  min-height: 28px;
  gap: 12px;
}

.y3-master-party-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

.y3-master-party-card h4 {
  margin: 0;
  color: var(--primary, #1677ff);
  font-size: 11px;
  font-weight: 900;
}

.y3-master-party-line {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(72px, 1fr);
  gap: 6px;
}

.y3-master-party-line > .y3-field {
  grid-column: auto;
}

.y3-master-party-card textarea {
  min-height: 96px;
}

.y3-master-order-main {
  padding-left: 14px;
}

.y3-master-sheet-section {
  min-width: 0;
  padding: 12px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.y3-master-sheet-section:last-child {
  border-bottom: 0;
}

.y3-master-route-upper {
  display: grid;
  grid-template-columns: minmax(0, 14fr) minmax(310px, 10fr);
  min-width: 0;
  gap: 0;
}

.y3-master-port-schedule,
.y3-master-route-side {
  min-width: 0;
}

.y3-master-port-schedule {
  padding-right: 14px;
}

.y3-master-route-side {
  display: grid;
  align-content: start;
  gap: 11px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.y3-master-port-row {
  display: grid;
  grid-template-columns: 42px repeat(3, minmax(0, 1fr));
  align-items: end;
  min-width: 0;
  gap: 6px;
  margin-bottom: 6px;
}

.y3-master-port-row > strong {
  align-self: center;
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.y3-master-port-row > .y3-field {
  grid-column: auto;
  gap: 0;
}

.y3-master-port-row > .y3-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.y3-master-order-form .y3-field input,
.y3-master-order-form .y3-field select,
.y3-master-order-form .y3-field .oms-entrust-combobox > input {
  height: 31px;
}

.y3-master-schedule-grid {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.y3-master-mbl {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.y3-master-mbl h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 900;
}

.y3-master-mbl h4 > span {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 6px;
  color: var(--primary, #1677ff);
  background: color-mix(in srgb, var(--primary, #1677ff) 13%, transparent);
  font-size: 10px;
}

.y3-master-cargo-copy {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 7fr) minmax(270px, 10fr);
  min-width: 0;
  gap: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.y3-master-cargo-copy > .y3-field {
  grid-column: auto;
  padding-right: 12px;
}

.y3-master-cargo-copy > .y3-field + .y3-field {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.y3-master-cargo-copy textarea {
  min-height: 112px;
}

.y3-master-container-card {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.y3-master-container-card > .y3-field {
  grid-column: auto;
}

.y3-master-container-card .y3-container-row {
  grid-template-columns: 58px 67px minmax(0, 1fr);
}

.y3-master-cargo-summary {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

body.theme-light .y3-master-order-head,
body.theme-light .y3-master-party-rail,
body.theme-light .y3-master-sheet-section {
  background: transparent;
}

@media (max-width: 1320px) {
  .y3-master-route-upper {
    grid-template-columns: minmax(0, 1fr);
  }

  .y3-master-port-schedule {
    padding-right: 0;
  }

  .y3-master-route-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .y3-master-mbl {
    padding: 0 0 0 12px;
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .y3-master-cargo-copy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .y3-master-container-card {
    grid-column: 1 / -1;
    grid-template-columns: minmax(130px, .7fr) minmax(0, 2.3fr);
    margin-top: 10px;
    padding: 10px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .y3-master-container-card .y3-container-title,
  .y3-master-container-card > .y3-field {
    grid-column: 1;
  }

  .y3-master-container-card .y3-container-rows {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 1180px) {
  .y3-master-order-form .y3-grid-24 {
    grid-template-columns: repeat(24, minmax(0, 1fr));
  }

  .y3-master-order-form .y3-grid-24 > .y3-span-24 { grid-column: span 24; }
  .y3-master-order-form .y3-grid-24 > .y3-span-12 { grid-column: span 12; }
  .y3-master-order-form .y3-grid-24 > .y3-span-11 { grid-column: span 11; }
  .y3-master-order-form .y3-grid-24 > .y3-span-9 { grid-column: span 9; }
  .y3-master-order-form .y3-grid-24 > .y3-span-8 { grid-column: span 8; }
  .y3-master-order-form .y3-grid-24 > .y3-span-6 { grid-column: span 6; }
  .y3-master-order-form .y3-grid-24 > .y3-span-5 { grid-column: span 5; }
  .y3-master-order-form .y3-grid-24 > .y3-span-4 { grid-column: span 4; }
  .y3-master-order-form .y3-grid-24 > .y3-span-3 { grid-column: span 3; }
  .y3-master-order-form .y3-grid-24 > .y3-span-2 { grid-column: span 2; }
}

@media (max-width: 1080px) {
  .y3-master-order-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .y3-master-party-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .y3-master-party-rail > .y3-section-head,
  .y3-master-party-rail > .y3-field,
  .y3-master-party-flags {
    grid-column: 1 / -1;
  }

  .y3-master-party-card {
    grid-column: auto;
    padding: 0 0 0 10px;
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .y3-master-party-card:first-of-type {
    padding-left: 0;
    border-left: 0;
  }

  .y3-master-order-main {
    padding-left: 0;
  }

  .y3-master-order-form .y3-grid-24 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .y3-master-order-form .y3-grid-24 > .y3-span-24,
  .y3-master-order-form .y3-grid-24 > .y3-span-12 { grid-column: span 12; }
  .y3-master-order-form .y3-grid-24 > .y3-span-11,
  .y3-master-order-form .y3-grid-24 > .y3-span-9,
  .y3-master-order-form .y3-grid-24 > .y3-span-8 { grid-column: span 8; }
  .y3-master-order-form .y3-grid-24 > .y3-span-6 { grid-column: span 6; }
  .y3-master-order-form .y3-grid-24 > .y3-span-5,
  .y3-master-order-form .y3-grid-24 > .y3-span-4 { grid-column: span 4; }
  .y3-master-order-form .y3-grid-24 > .y3-span-3 { grid-column: span 3; }
  .y3-master-order-form .y3-grid-24 > .y3-span-2 { grid-column: span 2; }
}

@media (max-width: 760px) {
  .y3-order-level-switch,
  .y3-order-level-switch > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .y3-order-level-actions {
    width: 100%;
  }

  .y3-order-level-actions button {
    flex: 1 1 50%;
  }

  .y3-master-party-rail,
  .y3-master-route-side,
  .y3-master-cargo-copy,
  .y3-master-container-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .y3-master-party-card,
  .y3-master-party-card:first-of-type {
    padding: 9px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .y3-master-route-side,
  .y3-master-mbl,
  .y3-master-cargo-copy > .y3-field + .y3-field,
  .y3-master-container-card {
    padding-left: 0;
    border-left: 0;
  }

  .y3-master-mbl,
  .y3-master-cargo-copy > .y3-field + .y3-field,
  .y3-master-container-card {
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .y3-master-cargo-copy > .y3-field {
    padding-right: 0;
  }

  .y3-master-container-card .y3-container-title,
  .y3-master-container-card .y3-container-rows,
  .y3-master-container-card > .y3-field {
    grid-column: auto;
    grid-row: auto;
  }

  .y3-master-port-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .y3-master-port-row > .y3-field {
    grid-column: 2;
  }

  .y3-master-order-form .y3-grid-24 {
    grid-template-columns: minmax(0, 1fr);
  }

  .y3-master-order-form .y3-grid-24 > .y3-field,
  .y3-master-order-form .y3-grid-24 > [class*="y3-span-"] {
    grid-column: 1 / -1;
  }
}
