:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --ink: #1f2933;
  --muted: #68737d;
  --line: #d8dfdd;
  --brand: #0f766e;
  --brand-2: #334155;
  --accent: #b45309;
  --danger: #b91c1c;
  --ok: #047857;
  --warn: #a16207;
  --shadow: 0 16px 36px rgba(31, 41, 51, 0.08);
  --site-footer-height: 52px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

#app {
  flex: 1 0 auto;
  min-width: 0;
}

.site-footer {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  min-height: var(--site-footer-height);
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  text-align: center;
  font-size: 13px;
  line-height: 20px;
}

.site-footer a {
  padding: 6px 8px;
  color: #4b5563;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 8px 12px;
}

button:hover {
  border-color: var(--brand);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

button.quiet {
  background: transparent;
}

button.icon {
  width: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

textarea {
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

td small,
.brand small,
.operator small,
.panel-title p,
.hint,
.muted {
  color: var(--muted);
}

.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - var(--site-footer-height));
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
  background: #fbfbf9;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: calc(100vh - var(--site-footer-height));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand.wide {
  margin-bottom: 24px;
}

.brand strong {
  display: block;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--brand-2);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  justify-content: flex-start;
  text-align: left;
  background: transparent;
}

.nav button.active {
  background: var(--surface-2);
  border-color: #b8c8c4;
  color: var(--brand);
  font-weight: 700;
}

.operator {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar-actions,
.toolbar-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.guard {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--surface);
  font-size: 13px;
}

.guard.safe {
  color: var(--ok);
}

.guard.danger {
  color: var(--danger);
}

.order-notice {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  padding: 10px;
}

.order-notice.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.order-notice.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.order-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  display: grid;
  gap: 10px;
  min-height: 98px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric small {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  font-size: 30px;
  line-height: 1;
}

.metric.alert strong {
  color: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.table-panel {
  overflow: auto;
}

.delivery-breakdown {
  min-width: 0;
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.delivery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.delivery-heading h2 { margin: 0; font-size: 18px; }
.delivery-views { display: flex; flex-wrap: wrap; gap: 4px; }
.delivery-views button { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.delivery-views button[aria-pressed="true"] { background: var(--brand); color: white; }
.delivery-table-scroll { width: 100%; overflow-x: auto; background: var(--surface); }
.delivery-table { min-width: 880px; font-variant-numeric: tabular-nums; }
.delivery-table th, .delivery-table td { white-space: nowrap; text-align: right; }
.delivery-table th:first-child, .delivery-table td:first-child { text-align: left; }
.delivery-table .delivery-shop { white-space: normal; overflow-wrap: anywhere; min-width: 180px; max-width: 280px; text-align: left; }
.delivery-table .delivery-positive, .delivery-table .delivery-rate { color: #08765a; }
.delivery-table tfoot { font-weight: 700; background: #eef4f3; }

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
  font-size: 17px;
}

.panel-title h3,
.detail-panel h3 {
  margin: 18px 0 8px;
  font-size: 14px;
}

.panel-title p {
  margin: 4px 0 0;
  font-size: 13px;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.facts.compact {
  grid-template-columns: repeat(2, 1fr);
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 700;
}

.shipment-facts dt {
  flex-shrink: 0;
}

.shipment-facts dd {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.tracking-fact {
  grid-column: 1 / -1;
}

.tracking-state.tracking-received {
  color: #087857;
  font-weight: 700;
}

.tracking-state.tracking-pending {
  color: #946000;
  font-weight: 700;
}

.status-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.status-rail button {
  display: grid;
  justify-items: start;
  min-height: 72px;
}

.status-rail b {
  font-size: 22px;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) minmax(120px, 2fr) minmax(76px, auto);
  gap: 10px;
  align-items: center;
}

.bar-label {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.bar-row strong {
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.bulk-bar,
.bulk-result {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 12px;
}

.bulk-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.bulk-bar > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 120px;
}

.bulk-bar span {
  color: var(--muted);
  font-size: 12px;
}

.bulk-result {
  overflow-x: auto;
}

.bulk-history { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.bulk-history span { color: var(--muted); font-size: 12px; }
.bulk-result-table { max-height: 360px; overflow: auto; margin-top: 12px; }
.bulk-result-table th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.confirmation-reason { display: grid; gap: 8px; margin-top: 16px; }
.confirmation-reason textarea { width: 100%; min-width: 0; resize: vertical; }
.cancellation-field { display: grid; gap: 6px; margin-top: 12px; }
.cancellation-field input, .cancellation-field select, .cancellation-field textarea { width: 100%; min-width: 0; }
.cancellation-field input[type=datetime-local] { box-sizing: border-box; max-width: 100%; }
.cancellation-record { border-top: 1px solid var(--line); padding: 14px 0; overflow-wrap: anywhere; }
.cancellation-record .panel-title { align-items: center; flex-wrap: wrap; gap: 8px; }
.cancellation-record h3, .cancellation-record p { margin: 0 0 8px; }
.cancellation-record small { color: var(--muted); }
.cancellation-label { color: #a15215; }
.cancellation-history { padding-left: 20px; }
.cancellation-history li { padding: 8px 0; }
.cancellation-record details { margin-top: 12px; }
.cancellation-items { padding-left: 20px; overflow-wrap: anywhere; }
.allocation-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 36px; gap: 10px; align-items: end; }
.allocation-source { display: grid; gap: 4px; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.allocation-source > span:first-child { color: var(--muted); font-size: 12px; }
.allocation-row label { min-width: 0; }
.allocation-row select { width: 100%; }
.allocation-modal label.allocation-ack { display: flex; align-items: center; gap: 8px; }
.allocation-ack input { width: 18px; height: 18px; flex: 0 0 18px; }
.modal.allocation-modal { display: flex; flex-direction: column; overflow: hidden; }
.allocation-modal .allocation-form { min-height: 0; overflow-y: auto; padding: 2px; }
.allocation-modal > .panel-title, .allocation-modal > .allocation-footer { flex-shrink: 0; }
.allocation-modal > .allocation-footer { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
@media (max-width: 540px) {
  .allocation-row { grid-template-columns: minmax(0, 1fr) 36px; }
  .allocation-row label:first-child { grid-column: 1 / -1; }
}

.bulk-result .panel-title {
  margin-bottom: 8px;
}

#bulk-task-result .panel-title {
  flex-wrap: wrap;
}

#bulk-task-result > label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

#bulk-task-result select {
  max-width: 100%;
}

#bulk-task-result progress {
  display: block;
  width: 100%;
  height: 8px;
  margin: 14px 0;
  accent-color: var(--accent);
}

#analytics-filter-form {
  min-width: 0;
  max-width: 100%;
}

#analytics-filter-form label {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 280px;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 12px;
}

.customer-table-scroll { max-width: 100%; overflow-x: auto; }
.customer-table { min-width: 1200px; }
.customer-table th { white-space: nowrap; }
.customer-table td:first-child { min-width: 150px; overflow-wrap: anywhere; }
.customer-table td:nth-child(2) { min-width: 160px; }
.customer-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.customer-table .customer-address { min-width: 240px; max-width: 360px; overflow-wrap: anywhere; }

.pagination-bar > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 120px;
}

.pagination-bar span,
.pagination-ellipsis {
  color: var(--muted);
  font-size: 12px;
}

.pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.pagination-actions label {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pagination-actions select {
  width: 76px;
}

.pagination-ellipsis {
  padding: 8px 2px;
}

.select-col {
  width: 44px;
  text-align: center;
}

.select-col input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

tr.bulk-selected {
  background: #f0fdfa;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.inline-form label,
.form-stack label,
.form-grid label {
  display: grid;
  gap: 6px;
}

.inline-form label {
  min-width: 180px;
}

#order-filter-form {
  max-width: 100%;
}

#order-filter-form .order-search-field {
  width: 300px;
  max-width: 100%;
  min-width: 0;
}

#order-filter-form textarea {
  height: 62px;
  min-height: 62px;
  max-height: 160px;
  line-height: 1.4;
}

.sync-test-tools {
  margin: 12px 0 20px;
}

.sync-test-tools summary {
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 10px;
}

.inline-form span,
.form-stack span,
.form-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.orders-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 16px;
  align-items: start;
}

tr[data-order-id],
tr[data-order-pull-batch] {
  cursor: pointer;
}

tr.selected td {
  background: #edf7f5;
}

td strong {
  display: block;
}

td small {
  display: block;
  margin-top: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--surface-2);
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 700;
}

.status-stockout,
.status-waybill_failed,
.inv-shortage {
  background: #fff7ed;
  color: var(--accent);
}

.pill.inv-eligible,
.pill.inv-committed,
.pill.inv-reserved,
.pill.inv-shortage,
.pill.inv-unknown {
  white-space: nowrap;
}

.status-pending_review,
.inv-unknown {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-delivered,
.inv-committed,
.inv-reserved,
.inv-eligible,
.inv-healthy {
  background: #ecfdf5;
  color: var(--ok);
}

.status-voided,
.status-on_hold {
  background: #fef2f2;
  color: var(--danger);
}

.detail-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-list > div,
.address-box,
.timeline > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  padding: 10px;
}

.mini-list span,
.address-box span,
.timeline span,
.timeline time {
  color: var(--muted);
  font-size: 13px;
}

.sku-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.sku-item small {
  color: var(--muted);
  font-size: 12px;
}

.sku-item .item-warning {
  color: #b45309;
  font-weight: 700;
}

.sku-item .item-ok {
  color: #047857;
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 20px;
}

.modal {
  width: min(860px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.wide-field,
.modal-actions {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-field {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.checkbox-field input {
  width: auto;
  min-height: auto;
}

.shop-dispatch-cell { min-width: 156px; }
.shop-dispatch-toggle { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.shop-dispatch-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary, #0f766e); }
.shop-dispatch-cell small { white-space: normal; overflow-wrap: anywhere; }

.choice-group {
  display: grid;
  gap: 8px;
}

.choice-group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.choice-group small {
  color: var(--muted);
  font-size: 12px;
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-list.disabled-block {
  opacity: 0.6;
  pointer-events: none;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  padding: 6px 9px;
}

.choice input {
  width: auto;
  min-height: auto;
}

.secret-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  background: #fff7ed;
}

.secret {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--site-footer-height));
  min-height: calc(100svh - var(--site-footer-height));
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.10), transparent 38%),
    var(--bg);
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}

.form-stack {
  display: grid;
  gap: 14px;
}

.wide-button {
  width: 100%;
}

.hint {
  margin: 14px 0 0;
  font-size: 13px;
}

.loading,
.empty,
.empty-line {
  color: var(--muted);
}

.loading,
.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 8px;
  background: var(--brand-2);
  color: #fff;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
}

.toast.error {
  background: var(--danger);
}

.bulk-void {
  color: var(--danger);
}

.action-confirmation {
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.22);
  overflow: auto;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.action-confirmation::backdrop { background: rgba(20, 28, 30, 0.48); }
.order-export-dialog { width: min(760px, calc(100vw - 32px)); }
.export-field-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.export-field-toolbar button { padding: 6px 12px; }
.export-field-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.export-field-group { min-width: 0; padding: 0; margin: 0; border: 0; }
.export-field-group legend { font-weight: 700; margin-bottom: 8px; }
.export-field-option { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 14px; overflow-wrap: anywhere; }
.export-field-option input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 2px 0 0; accent-color: var(--brand); }
@media (max-width: 520px) { .export-field-groups { grid-template-columns: minmax(0, 1fr); } }
.action-confirmation-body { padding: 24px; }
.action-confirmation h2 { margin: 10px 0 20px; font-size: 22px; line-height: 1.4; }
.action-confirmation-badge { color: #9a4d00; font-size: 13px; font-weight: 700; }
.action-confirmation-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.action-confirmation-count strong { font-size: 24px; line-height: 1.4; }
.action-confirmation .address-box, .address-confirmation-number { overflow-wrap: anywhere; }
.action-confirmation-description { margin: 18px 0 8px; font-weight: 600; }
.action-confirmation-points { margin: 0; padding-left: 20px; }
.action-confirmation-points li { margin: 8px 0; }
.action-confirmation-orders { margin-top: 16px; }
.action-confirmation-orders summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.action-confirmation-orders ul { max-height: 120px; overflow: auto; margin: 8px 0; padding-left: 20px; }
.action-confirmation-ack {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.action-confirmation-ack input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 3px 0 0; flex: 0 0 18px; accent-color: var(--brand); }
.action-confirmation-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.action-confirmation-footer button { min-height: 44px; white-space: normal; font-size: 15px; }
.action-confirmation.is-danger .action-confirmation-badge { color: var(--danger); }
.action-confirmation.is-danger button.primary { background: var(--danger); }
.channel-choice-group { padding: 18px 0; border-top: 1px solid var(--line); }
.channel-choice-label { display: grid; gap: 10px; }
.channel-choice-label select { max-width: 100%; min-width: 0; font-size: 14px; }
.channel-default-ack { margin-top: 12px; padding-top: 0; border-top: 0; }
@media (max-width: 480px) {
  .action-confirmation-body { padding: 20px; }
  .action-confirmation-footer { padding: 14px 20px; }
  .action-confirmation-footer button { flex: 1; min-width: 0; }
}

@media (max-width: 1080px) {
  .shell,
  .orders-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .detail-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .topbar,
  .toolbar,
  .bulk-bar,
  .pagination-bar {
    display: grid;
  }

  .metric-grid,
  .status-rail,
  .form-grid,
  .facts.compact,
  .sku-item,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .bar-row strong {
    text-align: left;
  }

  .sidebar {
    padding: 16px;
  }
}
.parcel-settings { padding: 20px 0; border-bottom: 1px solid #d7dfdf; margin-bottom: 20px; }
.parcel-settings .form-grid { align-items: center; }
.parcel-settings .parcel-check { display: flex; align-items: center; gap: 8px; }
.parcel-check input { width: 18px; height: 18px; flex: 0 0 18px; }
.parcel-tracking { margin: 20px 0; border-top: 1px solid #d7dfdf; padding-top: 12px; overflow-wrap: anywhere; }
.parcel-tracking .panel-title { flex-wrap: wrap; }
.parcel-tracking .panel-title h3 { margin: 0; }
.parcel-events { max-height: 360px; overflow: auto; margin-top: 12px; }
.parcel-events small { display: block; }
.parcel-error { color: #a54209; }
.parcel-tracking summary { cursor: pointer; padding: 8px 0; }
.parcel-latest { margin: 12px 0; }
.parcel-description { min-width: 0; }
.parcel-description .parcel-description-text { color: var(--ink); line-height: 1.6; }
.parcel-tracking .parcel-original { margin-top: 2px; font-size: 12px; color: var(--muted); }
.parcel-tracking .parcel-original summary { padding: 6px 0; width: fit-content; }
.parcel-original p { margin: 2px 0 6px; line-height: 1.5; overflow-wrap: anywhere; }
.parcel-original summary:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }

#current-inventory { min-width: 0; }
#current-inventory .panel-title { flex-wrap: wrap; gap: 12px; }
.inventory-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}
.inventory-filters label { display: grid; gap: 6px; min-width: 0; }
.inventory-filters label > span,
.inventory-range legend { font-size: 12px; color: var(--muted); }
.inventory-filters input,
.inventory-filters select { width: 100%; min-width: 0; }
.inventory-range {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.inventory-range legend { margin-bottom: 6px; padding: 0; }
.inventory-range > span { font-size: 12px; color: var(--muted); }
.inventory-table-scroll { overflow-x: auto; max-width: 100%; }
.inventory-table-scroll table { min-width: 900px; }
.inventory-table-scroll td { overflow-wrap: anywhere; }
.inventory-table-scroll th:last-child { min-width: 140px; }
