/* Record view: one identity group, then boxes, then source-order contents. */
.record-panel[hidden] {
  display: none;
}
.record-panel {
  border-color: #dce5da;
  box-shadow: 0 4px 18px #34523108;
}
.record-panel .records-heading {
  padding: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.record-panel .records-heading h2 {
  font-size: 17px;
  gap: 10px;
}
.record-panel .records-heading p {
  font-size: 12px;
  margin-top: 8px;
  color: #778a78;
}
.record-panel .record-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.record-panel .record-actions input {
  width: 220px;
  height: 38px;
  font-size: 12px;
}
.record-panel .record-actions select {
  height: 38px;
  font-size: 12px;
}
.record-panel .record-actions .button {
  height: 38px;
  font-size: 11px;
}
.record-panel .table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}
.record-panel table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.record-panel thead,
.record-panel th {
  position: static;
}
.record-panel th {
  font-size: 12px;
  color: #697e6b;
  background: #f1f5ee;
  padding: 15px 18px;
  border-top: 1px solid #e2e9de;
  border-bottom: 1px solid #dfe7dc;
  font-weight: 600;
}
.record-panel th:first-child {
  width: 14%;
}
.record-panel th:nth-child(2) {
  width: 22%;
}
.record-panel th:nth-child(3) {
  width: 25%;
}
.record-panel th:nth-child(4) {
  width: 39%;
}
.record-panel td {
  padding: 16px 18px;
  border-bottom: 1px solid #edf1e9;
  vertical-align: middle;
  white-space: normal;
}
.record-panel .box-group-start:not(:first-child) > td {
  border-top: 1px solid #dfe7db;
}
.record-panel .identity-group-start:not(:first-child) > td {
  border-top: 7px solid #f3f6f0;
}
.record-panel .record-identity-cell {
  vertical-align: top;
  background: #fbfcf9;
  border-right: 1px solid #e6ece1;
}
.record-identity-cell > strong {
  display: inline-block;
  font:
    650 15px Consolas,
    "Microsoft YaHei",
    monospace;
  color: #326045;
  background: #edf4e8;
  border: 1px solid #dce8d5;
  padding: 7px 10px;
  border-radius: 5px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.record-identity-cell > span {
  display: block;
  color: #8b9b85;
  font-size: 11px;
  margin-top: 10px;
  padding-left: 2px;
}
.record-panel .record-box-cell {
  vertical-align: top;
  background: white;
  border-right: 1px solid #edf1e8;
}
.record-box-cell > strong {
  display: inline-block;
  font:
    650 15px Consolas,
    "Microsoft YaHei",
    monospace;
  color: #244d36;
  vertical-align: middle;
  margin-right: 8px;
}
.record-status {
  display: inline-block;
  vertical-align: middle;
  padding: 4px 6px;
  border-radius: 4px;
  background: #eaf3e5;
  color: #5e8659;
  font-size: 10px;
  font-weight: 500;
  margin-top: 0;
  white-space: nowrap;
}
.record-status.closed {
  background: #f0f2ed;
  color: #8a9583;
}
.record-box-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 13px;
}
.record-box-actions .text-button {
  padding: 6px 8px;
  border: 1px solid #dde6d7;
  border-radius: 4px;
  background: #fbfdf9;
  color: #5a785a;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.record-box-actions .text-button:hover {
  background: #ecf4e6;
  border-color: #aac59a;
}
.record-box-actions .record-seal-action {
  color: #8b6838;
  background: #fffdf6;
  border-color: #e9dfc6;
}
.record-panel .record-order-cell {
  font:
    13px/1.5 Consolas,
    "Microsoft YaHei",
    monospace;
  color: #506e57;
  overflow-wrap: anywhere;
}
.record-panel .record-sku-items {
  gap: 8px;
  align-items: center;
}
.record-panel .record-sku-item {
  padding: 7px 10px;
  gap: 10px;
  border-color: #e2e9dc;
  background: #f8faf5;
  border-radius: 4px;
}
.record-panel .record-sku-item code {
  font-size: 13px;
  color: #3f604b;
}
.record-panel .record-sku-item b {
  font-size: 14px;
  color: #2b6a45;
}
.record-panel .table-footer {
  padding: 16px 24px;
  font-size: 11px;
  background: #fcfdfb;
  gap: 14px;
  color: #82927c;
}
.record-panel .table-footer #tableSummary {
  color: #637d60;
  font-weight: 500;
}
@media (max-width: 1200px) {
  .record-panel .record-actions {
    width: 100%;
    margin-left: 0;
  }
  .record-panel .record-actions input {
    flex: 1;
    min-width: 190px;
  }
  .record-panel table {
    min-width: 810px;
  }
  .record-panel .records-heading {
    align-items: flex-start;
  }
}
@media (max-width: 760px) {
  .record-panel .records-heading {
    padding: 20px;
  }
  .record-panel .record-actions input {
    flex-basis: 100%;
  }
  .record-panel .record-actions .button {
    flex: 1;
  }
  .record-panel th:first-child {
    width: 14%;
  }
  .record-panel th:nth-child(2) {
    width: 23%;
  }
  .record-panel th:nth-child(3) {
    width: 25%;
  }
  .record-panel th:nth-child(4) {
    width: 38%;
  }
  .record-panel td {
    padding: 15px;
  }
  .record-panel .table-footer {
    padding: 15px 20px;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* SKU and quantity stay separate; supporting times sit below their own field. */
.record-panel table {
  min-width: 1000px;
}
.record-panel th:first-child {
  width: 11%;
}
.record-panel th:nth-child(2) {
  width: 27%;
}
.record-panel th:nth-child(3) {
  width: 22%;
}
.record-panel th:nth-child(4) {
  width: 30%;
}
.record-panel th:nth-child(5) {
  width: 10%;
  text-align: right;
  padding-right: 24px;
}
.record-panel .record-order-cell {
  vertical-align: top;
  padding-top: 18px;
  font-weight: 500;
}
.record-panel .record-sku-cell {
  vertical-align: top;
  padding-top: 16px;
}
.record-panel .record-quantity-cell {
  text-align: right;
  vertical-align: top;
  padding: 17px 24px 16px 8px;
  font-variant-numeric: tabular-nums;
}
.record-quantity-cell > strong {
  font:
    650 21px/1.1 Consolas,
    monospace;
  color: #2b6643;
}
.record-quantity-cell > small {
  display: block;
  font-size: 10px;
  margin-top: 6px;
  color: #9b856e;
}
.box-selection,
.record-sku-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
}
.box-selection input,
.record-sku-line input,
#selectFiltered {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #34724e;
  flex-shrink: 0;
  cursor: pointer;
}
.box-selection strong {
  font:
    650 15px Consolas,
    "Microsoft YaHei",
    monospace;
  color: #285039;
  overflow-wrap: anywhere;
}
.record-sku-line code {
  font:
    500 14px Consolas,
    "Microsoft YaHei",
    monospace;
  color: #31563f;
  overflow-wrap: anywhere;
}
.record-box-cell > .record-status {
  margin: 9px 0 2px 24px;
}
.record-box-times {
  margin: 9px 0 0 24px;
  display: grid;
  gap: 5px;
  font-size: 10px;
  color: #87937f;
}
.record-box-times > span {
  display: flex;
  gap: 7px;
  align-items: baseline;
  flex-wrap: wrap;
}
.record-box-times time {
  font:
    11px/1.5 Consolas,
    "Microsoft YaHei",
    monospace;
  color: #73846c;
}
.record-box-cell .record-box-actions {
  margin-left: 24px;
  margin-top: 12px;
}
.record-scan-time {
  font:
    11px/1.7 Consolas,
    "Microsoft YaHei",
    monospace;
  color: #84917d;
  margin: 7px 0 0 24px;
}
.scan-time-detail {
  margin: 5px 0 0 24px;
  font-size: 10px;
  color: #61805e;
}
.scan-time-detail summary {
  cursor: pointer;
  width: fit-content;
}
.scan-time-list {
  max-height: 180px;
  overflow-y: auto;
  margin: 8px 0 0;
  padding: 10px 10px 10px 30px;
  background: #f5f8f1;
  border: 1px solid #e2e9db;
  border-radius: 4px;
  font:
    10px/1.9 Consolas,
    monospace;
  color: #77866d;
}
.record-filterbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 0 24px 16px;
}
.record-filterbar > label {
  font-size: 11px;
  margin: 0 3px 0 0;
  color: #71876c;
}
.record-filterbar select,
.record-filterbar input {
  height: 34px;
  font-size: 11px;
  padding: 5px 9px;
}
.record-filterbar select {
  min-width: 126px;
}
.record-filterbar input {
  width: 144px;
}
.record-filterbar > span {
  font-size: 11px;
  color: #8b9785;
}
.record-filterbar > small {
  margin-left: auto;
  color: #8d9a86;
  font-size: 10px;
}
.record-filterbar .text-button {
  font-size: 11px;
}
.record-filter-error {
  margin: 0;
  padding: 0 24px 12px;
  font-size: 12px;
  color: #ac684a;
}
.record-filter-error[hidden] {
  display: none;
}
.record-filter-hint {
  margin: 0;
  padding: 0 24px 12px;
  color: #8c987f;
  font-size: 11px;
}
.record-filter-hint[hidden] {
  display: none;
}
.export-selection-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  border-top: 1px solid #edf1e8;
  background: #fafcf8;
  padding: 12px 24px;
}
.export-selection-bar label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: #617b5d;
}
.export-selection-bar > span {
  font-size: 10px;
  color: #8c9985;
}
.export-selection-bar .text-button {
  font-size: 11px;
  margin-left: auto;
}
@media (max-width: 760px) {
  .record-panel table {
    min-width: 1000px;
  }
  .record-panel th:first-child {
    width: 11%;
  }
  .record-panel th:nth-child(2) {
    width: 27%;
  }
  .record-panel th:nth-child(3) {
    width: 22%;
  }
  .record-panel th:nth-child(4) {
    width: 30%;
  }
  .record-panel th:nth-child(5) {
    width: 10%;
  }
  .record-filterbar,
  .export-selection-bar {
    padding-left: 20px;
    padding-right: 20px;
  }
  .record-filterbar > small {
    margin-left: 0;
    flex-basis: 100%;
  }
}
.box-details-dialog{width:min(850px,calc(100vw - 40px));padding:28px;border:1px solid #dce5df;border-radius:16px;color:#254538}
.box-details-meta{white-space:pre-line;line-height:1.9;margin:16px 0 8px}
.box-details-note{font-size:13px;color:#7b8e81;margin-bottom:18px}
.box-details-table-wrap{max-height:55vh;overflow:auto;border:1px solid #e1e9e3;border-radius:8px}
.box-details-table-wrap table{width:100%;border-collapse:collapse}
.box-details-table-wrap th{position:sticky;top:0;background:#f0f5ef;text-align:left}
.box-details-table-wrap td,.box-details-table-wrap th{padding:14px 16px;border-bottom:1px solid #e8eee9}
.detail-time{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:14px}
.detail-tracking{overflow-wrap:anywhere}.detail-voided{color:#89958e;background:#f7f8f7}.detail-void-label{display:block;color:#ac7053}
.box-details-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;font-size:14px;color:#718578}
.record-sku-code{font-size:14px}
.language-switch{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:13px;color:#607b6c}.language-switch select{min-width:105px;padding:8px 10px;border:1px solid #dce5df;border-radius:7px;background:white;color:#254538}html[lang="es"] .nav{white-space:normal}html[lang="es"] .scan-options{flex-wrap:wrap}html[lang="es"] .header-right{flex-wrap:wrap}html[lang="es"] .button{white-space:normal}html[lang="es"] .record-actions{flex-wrap:wrap}@media(max-width:700px){.language-switch{font-size:12px}.header-right #today{display:none}}
