.expected-delivery-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.expected-summary-card {
  min-width: 130px;
  padding: 11px 14px;
  border: 1px solid #e5e5e9;
  border-radius: 14px;
  background: #fff;
}

.expected-summary-card.is-awaiting {
  border-color: #f1d5af;
  background: #fff1df;
}

.expected-summary-card.is-received {
  border-color: #cde8d7;
  background: #e8f7ee;
}

.expected-summary-card span {
  display: block;
  color: #85858b;
  font-size: .67rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.expected-summary-card strong {
  display: block;
  margin-top: 2px;
  color: #252529;
  font-size: 1.15rem;
}

.expected-filter-card {
  margin-bottom: 16px;
  padding: 14px 16px;
}

.expected-status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.expected-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #e0e0e4;
  border-radius: 999px;
  background: #f8f8f9;
  color: #66676d;
  font-size: .74rem;
  font-weight: 750;
}

.expected-filter-pill:hover {
  color: #222226;
  border-color: #c9c9ce;
}

.expected-filter-pill.is-active {
  border-color: #292a2e;
  background: #292a2e;
  color: #fff;
}

.expected-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 170px auto;
  gap: 10px;
  align-items: end;
}

.expected-filter-form .field {
  margin-bottom: 0;
}

.expected-filter-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.expected-table-card {
  padding: 0;
  overflow: hidden;
}

.expected-table-scroll {
  overflow-x: auto;
}

.expected-delivery-table {
  min-width: 1220px;
  background: transparent;
}

.expected-delivery-table th {
  padding: 15px 20px;
  border-color: #ededf0;
  color: #8a8a90;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .045em;
  white-space: nowrap;
}

.expected-delivery-table td {
  padding: 15px 20px;
  vertical-align: middle;
  border-color: #ededf0;
  color: #35353a;
  font-size: .875rem;
  line-height: 1.35;
}

.expected-delivery-table td > strong,
.expected-delivery-table td > span,
.expected-delivery-table td > small {
  display: block;
}

.expected-material-cell {
  min-width: 250px;
  max-width: 360px;
}

.expected-material-cell > strong {
  color: #27272b;
  font-size: .875rem;
}

.expected-material-cell > span,
.expected-material-cell > small,
.expected-user,
.expected-muted,
.expected-human-time {
  margin-top: 4px;
  color: #85858b;
  font-size: .72rem;
  line-height: 1.35;
}

.expected-material-cell > small {
  color: #6d6d73;
}

.expected-file-count {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  margin-top: 5px !important;
  color: #62748e !important;
}

.expected-quantity-cell {
  min-width: 125px;
}

.expected-quantity-cell > strong {
  color: #222226;
  font-size: .88rem;
}

.is-overdue-date strong,
.is-overdue-date span {
  color: #b33c34 !important;
}

.expected-status {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .67rem !important;
  font-weight: 800;
  white-space: nowrap;
}

.expected-status.pending {
  background: #eef4ff;
  color: #315f9c;
}

.expected-status.received {
  background: #edf8f0;
  color: #27723d;
}

.expected-status.overdue {
  background: #fff0ef;
  color: #ad3932;
}

.expected-row-actions {
  min-width: 250px;
  white-space: nowrap;
}

.expected-row-actions .button {
  margin-left: 4px;
}

.expected-form-card {
  max-width: 940px;
  margin: 0 auto;
}

.expected-form-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, .7fr) 180px 210px;
  gap: 12px;
  align-items: end;
}

.expected-form-grid .field,
.expected-receipt-grid .field {
  margin-bottom: 0;
}

.expected-material-field {
  min-width: 0;
}

.expected-quantity-input {
  margin-bottom: 0 !important;
}

.expected-quantity-input .button.is-static {
  min-width: 58px;
  color: #626268;
  font-weight: 750;
}

.expected-upload-zone {
  position: relative;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 16px;
  overflow: hidden;
  border: 1.5px dashed #cfcfd4;
  border-radius: 16px;
  background: #fafafa;
  color: #77777d;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}

.expected-upload-zone.is-dragover {
  border-color: #55565d;
  background: #f0f1f3;
}

.expected-upload-zone > i {
  font-size: 1.35rem;
}

.expected-upload-zone > strong {
  color: #414146;
  font-size: .8rem;
}

.expected-upload-zone > span {
  color: #919197;
  font-size: .68rem;
}

.expected-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.expected-upload-preview,
.expected-existing-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.expected-upload-preview:empty {
  display: none;
}

.expected-preview-item,
.expected-existing-file {
  width: 126px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e1e1e5;
  border-radius: 12px;
  background: #fff;
  color: #3f4045;
}

.expected-preview-thumb,
.expected-existing-thumb {
  width: 100%;
  height: 78px;
  overflow: hidden;
  background: #f0f0f2;
}

.expected-preview-thumb img,
.expected-existing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.expected-preview-icon,
.expected-existing-file-icon {
  height: 78px;
  display: grid;
  place-items: center;
  background: #f3f3f5;
  color: #a1453d;
  font-size: 1.5rem;
}

.expected-preview-copy,
.expected-existing-file-copy {
  min-width: 0;
  padding: 7px 8px;
}

.expected-preview-copy strong,
.expected-existing-file-copy strong,
.expected-existing-file-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expected-preview-copy strong,
.expected-existing-file-copy strong {
  font-size: .66rem;
}

.expected-existing-file-copy span {
  margin-top: 2px;
  color: #929298;
  font-size: .61rem;
}

.expected-preview-item {
  position: relative;
}

.expected-preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 23, .82);
  color: #fff;
  cursor: pointer;
}

.expected-receive-summary {
  max-width: 940px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0;
  overflow: hidden;
}

.expected-receive-metric {
  padding: 18px 20px;
  background: #fff;
}

.expected-receive-metric + .expected-receive-metric {
  border-left: 1px solid #ececef;
}

.expected-receive-metric span,
.expected-receive-metric strong {
  display: block;
}

.expected-receive-metric span {
  color: #85858b;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.expected-receive-metric strong {
  margin-top: 4px;
  color: #27272b;
  font-size: 1rem;
}

.expected-receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 1000px) {
  .expected-filter-form {
    grid-template-columns: minmax(240px, 1fr) 160px 160px;
  }

  .expected-filter-actions {
    grid-column: 1 / -1;
  }

  .expected-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .expected-delivery-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .expected-summary-card {
    min-width: 0;
  }

  .expected-filter-form,
  .expected-form-grid,
  .expected-receipt-grid,
  .expected-receive-summary {
    grid-template-columns: 1fr;
  }

  .expected-filter-actions {
    grid-column: auto;
  }

  .expected-filter-actions .button {
    flex: 1;
  }

  .expected-table-card {
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 0;
  }

  .expected-delivery-table {
    min-width: 820px;
  }

  .expected-receive-metric + .expected-receive-metric {
    border-left: 0;
    border-top: 1px solid #ececef;
  }

  .expected-existing-file,
  .expected-preview-item {
    width: calc(50% - 4px);
  }
}


.expected-material-link {
  display: block;
  color: #27272b;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.expected-material-link:hover {
  color: #245b9f;
}

.expected-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.expected-detail-grid.is-receipt {
  grid-template-columns: repeat(2, minmax(0, 220px));
  justify-content: start;
}

.expected-detail-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #e5e5e9;
  border-radius: 16px;
  background: #fff;
}

.expected-detail-card > span,
.expected-detail-card > strong {
  display: block;
}

.expected-detail-card > span {
  color: #85858b;
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.expected-detail-card > strong {
  margin-top: 5px;
  color: #26262a;
  font-size: .95rem;
}

.expected-detail-comment {
  color: #4c4c52;
  font-size: .84rem;
  line-height: 1.55;
}

.expected-detail-comment p:last-child {
  margin-bottom: 0;
}

@media (max-width: 850px) {
  .expected-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .expected-detail-grid,
  .expected-detail-grid.is-receipt {
    grid-template-columns: 1fr;
  }
}


/* Table refinements: align with the document/inventory journals. */
.expected-center-col,
.expected-center-cell {
  text-align: center !important;
}

.expected-center-col .journal-sort-link {
  justify-content: center;
}

.expected-delivery-table tbody tr[data-row-href] {
  cursor: pointer;
  transition: background .14s ease;
}

.expected-delivery-table tbody tr[data-row-href]:hover {
  background: #f7f7f9;
}

.expected-comment-box {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #f0dfab;
  border-radius: 9px;
  background: #fff8df;
  color: #74612f;
  font-size: .72rem;
  line-height: 1.4;
}

.expected-comment-box i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #ae8733;
}

.expected-comment-box span {
  min-width: 0;
}

.expected-human-time {
  display: block;
  margin-top: 7px;
  color: #6f737c;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.3;
}

.is-overdue-date .expected-human-time {
  color: #b33c34 !important;
}

.expected-files-cell {
  min-width: 86px;
}

.expected-files-indicator {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 56px;
  padding: 6px 9px;
  border-radius: 10px;
  background: #f1f3f6;
  color: #5f6b7b;
}

.expected-files-indicator i {
  font-size: .86rem;
}

.expected-files-indicator strong {
  font-size: .78rem;
  font-weight: 800;
}

.expected-filter-actions .button.is-light {
  background: #f0f0f2;
  border-color: transparent;
}

.expected-filter-actions .button.is-white {
  background: transparent;
  border-color: transparent;
}

.expected-filter-actions .button.is-white:hover {
  background: #f5f5f7;
}

.expected-row-actions .button {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 0 6px;
  font-size: .72rem;
}

.expected-row-actions .button:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .expected-delivery-table {
    min-width: 1100px;
  }
}


/* Final expected-delivery list/detail/form refinements. */
.expected-row-actions {
  min-width: 270px;
  padding-right: 32px !important;
}

.expected-action-stack {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.expected-action-stack .button {
  min-height: 38px;
  margin: 0 !important;
  padding: 0 15px;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
}

.expected-delivery-table th:last-child {
  padding-right: 32px;
}

.expected-due-stack {
  display: grid;
  justify-items: center;
  gap: 1px;
  margin-top: 9px;
  line-height: 1.05;
}

.expected-due-prefix,
.expected-due-unit {
  color: #727780;
  font-size: .73rem;
  font-weight: 700;
}

.expected-due-number {
  display: block;
  margin: 2px 0;
  color: #383b42;
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -.035em;
}

.expected-due-stack.is-overdue .expected-due-prefix,
.expected-due-stack.is-overdue .expected-due-number,
.expected-due-stack.is-overdue .expected-due-unit {
  color: #b33c34;
}

.expected-due-stack.is-today .expected-due-prefix {
  color: #9a650f;
  font-size: .8rem;
}

.expected-user {
  margin-top: 11px !important;
}

.expected-detail-material-link {
  color: inherit;
}

.expected-detail-material-link:hover {
  color: #245b9f;
}

.expected-detail-card {
  text-align: center;
}

.expected-detail-due {
  margin-top: 10px;
}

.expected-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.expected-detail-section {
  min-width: 0;
  height: 100%;
}

.expected-created-at {
  white-space: nowrap;
}

.expected-detail-comment {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid #f0dfab;
  border-radius: 11px;
  background: #fff8df;
  color: #66582f;
  font-size: .84rem;
  line-height: 1.55;
}

.expected-detail-comment p {
  margin: 0;
}

.expected-receipt-empty {
  min-height: 180px;
}

.expected-image-file {
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}

.expected-image-file:hover {
  border-color: #bdc6d3;
  box-shadow: 0 5px 16px rgba(31, 39, 52, .08);
}

.expected-form-card {
  width: 100%;
  max-width: none;
  margin: 0;
}

.expected-form-grid {
  align-items: start;
}

.expected-form-comment {
  margin-top: 20px !important;
}

.js-expected-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none !important;
}

@media (max-width: 850px) {
  .expected-detail-columns {
    grid-template-columns: 1fr;
  }
}


/* Purchase UX corrections. */
.expected-delivery-table th:last-child,
.expected-delivery-table td:last-child {
  padding-right: 48px !important;
}

.expected-row-actions {
  min-width: 300px;
}

.expected-action-stack {
  width: 220px;
  min-width: 220px;
  margin: 0 auto;
}

.expected-primary-success,
.expected-primary-success:visited {
  background: #48c78e !important;
  border-color: #48c78e !important;
  color: #fff !important;
}

.expected-primary-success:hover,
.expected-primary-success:focus-visible {
  background: #3abb81 !important;
  border-color: #3abb81 !important;
  color: #fff !important;
}

.expected-detail-status {
  min-width: 0;
  padding: 6px 11px;
  font-size: .74rem !important;
  white-space: nowrap;
}

.expected-order-meta {
  margin-top: 10px !important;
}

.expected-created-at {
  display: block;
  margin-top: 5px;
  color: #8a8a90;
  font-size: .7rem;
  line-height: 1.4;
}

.expected-existing-file-wrap {
  position: relative;
  width: 126px;
  min-width: 0;
}

.expected-existing-file-wrap .expected-existing-file {
  width: 100%;
}

.expected-existing-file-delete-form {
  position: absolute;
  z-index: 4;
  top: 5px;
  right: 5px;
  margin: 0 !important;
}

.expected-existing-file-delete {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  background: rgba(25,25,28,.72);
  color: #fff;
  font-size: .68rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.expected-existing-file-delete:hover {
  background: rgba(171,49,49,.94);
  color: #fff;
}

.expected-receive-summary {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.expected-receive-metric {
  text-align: center;
}

.expected-receive-form-card {
  width: 100%;
  max-width: none;
}

.expected-receipt-comment {
  margin-top: 20px !important;
}

.js-expected-receipt-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .expected-action-stack {
    width: 210px;
    min-width: 210px;
  }

  .expected-existing-file-wrap {
    width: calc(50% - 4px);
  }
}


/* Keep row actions visually inset from the table edge. */
.expected-row-actions {
  min-width: 280px;
  padding-left: 20px !important;
  padding-right: 28px !important;
}

.expected-action-stack {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  margin: 0 auto;
}

.expected-action-stack .button {
  width: 100%;
}

.expected-primary-success,
.expected-primary-success:hover,
.expected-primary-success:focus,
.expected-primary-success:active {
  background: #48c78e !important;
  border-color: #48c78e !important;
  color: #fff !important;
}

.expected-primary-success .icon,
.expected-primary-success span {
  color: #fff !important;
}

/* Detail page uses a compact one-line human status. */
.expected-detail-status {
  min-width: 0;
  padding: 6px 11px;
  font-size: .76rem !important;
  line-height: 1.2;
}

/* Separate audit metadata from the card heading. */
.expected-order-meta {
  margin-top: 10px !important;
}

.expected-created-at {
  display: block;
  margin-top: 5px;
  color: #8b8b91;
  font-size: .69rem;
}

/* Existing attachments can be deleted from edit/receive screens. */
.expected-existing-file-wrap {
  position: relative;
  width: 126px;
}

.expected-existing-file-wrap > .expected-existing-file {
  width: 100%;
}

.expected-existing-file-delete-form {
  position: absolute;
  z-index: 4;
  top: -6px;
  right: -6px;
  margin: 0 !important;
}

.expected-existing-file-delete {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #27272b;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.expected-existing-file-delete:hover {
  background: #b23a34;
  color: #fff;
}

/* Receipt screen should use the full workspace width just like plan forms. */
.expected-receive-summary,
.expected-receive-form-card {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.expected-receive-summary {
  text-align: center;
}

.expected-receive-metric {
  text-align: center;
}

.expected-receipt-grid {
  align-items: start;
}

.expected-receipt-comment {
  margin-top: 20px !important;
}

.js-expected-receipt-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none !important;
}


/* Expected deliveries: compact actions, centered forms and polished confirmation. */

/* Expected-deliveries index uses one wider layout for heading, filters and table. */
@media (min-width: 1100px) {
  .expected-deliveries-index-page .app-shell {
    width: min(1480px, calc(100% - 40px));
  }

  .expected-deliveries-index-page .expected-table-card {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .expected-delivery-table {
    min-width: 1100px;
  }

  .expected-delivery-table th,
  .expected-delivery-table td {
    padding-left: 14px;
    padding-right: 14px;
  }

  .expected-row-actions {
    min-width: 196px;
    padding-left: 10px !important;
    padding-right: 20px !important;
  }

  .expected-action-stack {
    width: 168px;
    min-width: 168px;
    max-width: 168px;
    gap: 6px;
    margin: 0 auto;
  }

  .expected-action-stack .button {
    min-height: 36px;
    padding: 0 10px;
    font-size: .74rem;
  }

  .expected-delivery-table th:last-child,
  .expected-delivery-table td:last-child {
    padding-right: 20px !important;
  }
}

/* New/edit/receive actions are a single centered control group. */
.expected-delivery-form > .form-actions {
  justify-content: center;
}

/* One-line audit metadata on the detail page. */
.expected-order-meta-line {
  margin-top: 10px;
  color: #5f6066;
  font-size: .84rem;
  font-weight: 400;
  line-height: 1.45;
}

/* Keep the receipt card balanced against the order card. */
.expected-receipt-section {
  display: flex;
  flex-direction: column;
}

.expected-receipt-section-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.expected-receipt-section-body .expected-receipt-empty {
  min-height: 0;
}

/* Existing attachment deletion is an explicit action under the preview. */
.expected-existing-file-wrap {
  text-align: center;
}

.expected-existing-file-delete {
  width: auto;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 7px auto 0;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #f1f1f3;
  color: #9d3833;
  font-size: .72rem;
  font-weight: 700;
  box-shadow: none;
  backdrop-filter: none;
}

.expected-existing-file-delete:hover {
  background: #fdeceb;
  color: #a5322c;
}

/* Receive summary: TMC + three order facts. */
.expected-receive-summary {
  grid-template-columns: minmax(280px, 1.55fr) repeat(3, minmax(0, 1fr));
}

.expected-receive-material strong {
  line-height: 1.35;
}

/* Confirmation uses the same Bulma modal language as scanner / quick TMC. */
.expected-confirm-modal-card {
  width: min(520px, calc(100vw - 32px));
  border-radius: 24px;
  overflow: hidden;
}

.expected-confirm-modal-card .modal-card-head,
.expected-confirm-modal-card .modal-card-foot {
  background: #fff;
  border-color: #ececef;
}

.expected-confirm-modal-card .modal-card-title {
  color: #29292d;
  font-size: 1rem;
  font-weight: 750;
}

.expected-confirm-body {
  padding: 30px 28px 26px;
  background: #fff;
  text-align: center;
}

.expected-confirm-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: #e8f7ee;
  color: #2d8050;
  font-size: 1.35rem;
}

.expected-confirm-body .title {
  margin-bottom: 7px !important;
}

.expected-confirm-copy {
  margin: 0 auto;
  max-width: 360px;
  color: #77777d;
  font-size: .84rem;
  line-height: 1.5;
}

.expected-confirm-summary {
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr;
  gap: 8px;
  margin-top: 22px;
  text-align: left;
}

.expected-confirm-summary-item {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e8e8eb;
  border-radius: 13px;
  background: #f8f8f9;
}

.expected-confirm-summary-item span,
.expected-confirm-summary-item strong {
  display: block;
}

.expected-confirm-summary-item span {
  color: #929298;
  font-size: .63rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.expected-confirm-summary-item strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #303035;
  font-size: .79rem;
  line-height: 1.3;
}

.expected-confirm-actions {
  justify-content: center;
  gap: 9px;
  padding: 16px 20px 18px;
}

@media (max-width: 900px) {
  .expected-receive-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expected-confirm-summary {
    grid-template-columns: 1fr 1fr;
  }

  .expected-confirm-summary-item:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .expected-receive-summary,
  .expected-confirm-summary {
    grid-template-columns: 1fr;
  }

  .expected-confirm-summary-item:first-child {
    grid-column: auto;
  }

  .expected-delivery-form > .form-actions {
    justify-content: center;
  }
}


/* Ensure both detail cards share a row height so receipt content can truly center. */
.expected-detail-columns {
  align-items: stretch;
}

.expected-detail-section {
  height: auto;
}


/* Plain, readable status on the delivery detail card. */
.expected-detail-status-text {
  font-size: 1.05rem !important;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
}

.expected-detail-status-text.pending {
  color: #315f9c;
}

.expected-detail-status-text.received {
  color: #27723d;
}

.expected-detail-status-text.overdue {
  color: #ad3932;
}

/* Attachment delete confirmation mirrors the receive confirmation dialog. */
.expected-confirm-icon.is-danger {
  background: #fff0ef;
  color: #ad3932;
}

.expected-delete-file-name {
  margin: 18px auto 0;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid #e8e8eb;
  border-radius: 12px;
  background: #f8f8f9;
  color: #303035;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}


/* Clickable expected-delivery summary cards and stock warning. */
a.expected-summary-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

a.expected-summary-card:hover {
  color: inherit;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(0,0,0,.055);
}

.expected-receipt-stock-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 16px !important;
  padding: 11px 13px !important;
  border: 1px solid #f1d29d;
  border-radius: 13px;
  background: #fff4df !important;
  color: #775018 !important;
  font-size: .79rem;
  line-height: 1.45;
}

.expected-receipt-stock-notice > i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #d68417;
}

.expected-receipt-stock-notice strong {
  color: #a55d00;
}


/* Latest expected-delivery spacing refinements. */
.expected-receipt-edit-button {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

@media (min-width: 1100px) {
  .expected-action-stack {
    width: 190px;
    min-width: 190px;
    max-width: 190px;
  }

  .expected-row-actions {
    min-width: 214px;
  }
}

.expected-receipt-stock-notice-copy {
  min-width: 0;
}

.expected-receipt-stock-warning,
.expected-receipt-stock-hint {
  margin: 0;
}

.expected-receipt-stock-warning {
  color: #70450d;
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.4;
}

.expected-receipt-stock-warning strong {
  color: #a55d00;
  font-weight: 850;
}

.expected-receipt-stock-hint {
  margin-top: 4px;
  color: #805719;
  font-size: .79rem;
  line-height: 1.45;
}
