.inbound-order-groups {
  display: grid;
}

.inbound-status-group {
  border-bottom: 1px solid var(--line);
}

.inbound-status-group > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 16px;
  background: #dfe9e5;
  cursor: pointer;
}

.inbound-status-completed > summary,
.inbound-status-cancelled > summary {
  background: #edf1f2;
}

.inbound-status-group > summary span {
  color: var(--muted);
  font-size: 12px;
}

.inbound-status-group > .inbound-order-groups {
  border-top: 1px solid var(--line);
}

.inbound-order-group {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.inbound-order-group > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: #f7f9f9;
  cursor: pointer;
}

.inbound-order-group > summary strong,
.inbound-order-group > summary small,
.inbound-spec-group header strong,
.inbound-spec-group header small {
  display: block;
}

.inbound-order-group > summary small,
.inbound-spec-group header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.inbound-order-group > summary b,
.inbound-spec-group header b {
  font-size: 12px;
  white-space: nowrap;
}

.inbound-spec-groups {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #eef2f3;
}

.inbound-spec-group {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
}

.inbound-spec-group header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.inbound-spec-group table {
  min-width: 640px;
}

.inbound-quantity-stepper {
  display: inline-grid;
  grid-template-columns: 32px minmax(72px, auto) 32px;
  align-items: center;
  gap: 7px;
}

.inbound-quantity-stepper form {
  margin: 0;
}

.inbound-quantity-stepper button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #b8c5ca;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.inbound-quantity-stepper button:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

.inbound-quantity-stepper button:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.inbound-quantity-stepper strong {
  text-align: center;
}

.inbound-input-line { display:grid; grid-template-columns:repeat(2,minmax(100px,1.2fr)) repeat(4,minmax(74px,1fr)) minmax(140px,1.2fr) 32px; gap:10px; padding:14px 0; border-bottom:1px solid var(--line); align-items:start; }
.inbound-input-line[hidden] { display:none; }
.inbound-input-line input,.inbound-input-line select { width:100%; min-width:0; }
.inbound-input-line .form-field { min-width:0; }
.inbound-input-line .remove-inbound-line { margin-top:23px; width:32px; height:36px; padding:0; font-size:20px; }
.inbound-lines-section { padding:16px; }
.inbound-bulk-toolbar { display:flex; gap:16px; align-items:center; flex-wrap:wrap; padding:12px; background:#fff; }
.inbound-receipt-date { padding:12px 12px 0; background:#fff; }
.inbound-receipt-date label { display:grid; gap:7px; max-width:320px; }
.inbound-receipt-date input { width:100%; min-width:0; }
.inbound-spec-edit-row > td { text-align:left; white-space:normal; }
.inbound-spec-editor { width:min(100%,calc(100vw - 84px)); }
.inbound-spec-editor > summary { cursor:pointer; color:var(--green); padding:8px 0; font-weight:700; }
.inbound-spec-editor[open] > summary { margin-bottom:8px; }
.inbound-receipt-spec-fields { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.inbound-input-line { grid-template-columns:repeat(4,minmax(0,1fr)); }
.inbound-receipt-spec-fields .form-field { min-width:0; }
.inbound-receipt-spec-fields input,.inbound-receipt-spec-fields select { width:100%; min-width:0; }
@media(max-width:700px) { .inbound-receipt-spec-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.inbound-bulk-toolbar label { display:inline-flex; align-items:center; gap:7px; }
.inbound-bulk-toolbar input[type="checkbox"] { margin:0; }
.inbound-bulk-toolbar button { border:1px solid var(--green); border-radius:4px; cursor:pointer; }
.inbound-bulk-toolbar button:disabled { opacity:.5; cursor:not-allowed; }
.inbound-selection-count,.inbound-list-note { font-size:12px; color:var(--muted); }
.inbound-list-note { margin:0; padding:0 12px 10px; background:#fff; line-height:1.6; }
.inbound-received-quantity { width:100px; padding:7px; border:1px solid #b8c5ca; border-radius:3px; }
.inbound-list-filter { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.inbound-list-filter label { display:grid; gap:6px; }
.inbound-list-filter input,.inbound-list-filter select { min-height:36px; padding:6px; border:1px solid var(--line); }
@media(max-width:1100px) { .inbound-input-line { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:600px) { .inbound-input-line { grid-template-columns:repeat(2,minmax(0,1fr)); } }

@media (max-width: 620px) {
  .inbound-status-group > summary,
  .inbound-order-group > summary,
  .inbound-spec-group header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
