:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d6deea;
  --accent: #214c97;
  --accent-dark: #183b78;
  --accent-soft: #e8f0ff;
  --red: #b42318;
  --red-soft: #fee4e2;
  --green: #067647;
  --green-soft: #dcfae6;
  --blue: #1d5fd6;
  --blue-soft: #dbeafe;
  --shadow: 0 14px 34px rgba(21, 45, 82, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #102f6b;
}

.login-box {
  width: min(360px, calc(100vw - 40px));
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.login-box strong {
  font-size: 22px;
}

.login-box span {
  color: var(--muted);
}

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

.warehouse-attention {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(180, 35, 24, 0.28);
}

button {
  cursor: pointer;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  padding: 22px 18px;
  background: #102f6b;
  color: #f6f9ff;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 22px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: #b8c8e8;
}

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

.nav-button,
.ghost-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  text-align: left;
  color: #dbe7ff;
  background: transparent;
}

.nav-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.nav-button small {
  color: #b8c8e8;
  font-size: 11px;
  white-space: nowrap;
  align-self: center;
}

.nav-button.active,
.nav-button:hover,
.ghost-button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.nav-submenu {
  display: none;
  gap: 6px;
  margin-top: -4px;
  padding-left: 12px;
}

.nav-submenu.open {
  display: grid;
}

.nav-sub-button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: #dbe7ff;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.nav-sub-button small {
  color: #b8c8e8;
  font-size: 11px;
  white-space: nowrap;
}

.nav-sub-button.active,
.nav-sub-button:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.sidebar-actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.data-status {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  color: #dbe7ff;
  background: rgba(255, 255, 255, 0.06);
  line-height: 1.35;
  text-align: left;
}

.data-status span {
  font-size: 14px;
}

.data-status small {
  color: #b8c8e8;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-status:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hidden-file-input {
  display: none;
}

.file-button {
  display: block;
}

.file-button input {
  display: none;
}

.danger {
  color: #ffd5d2;
}

main {
  min-width: 0;
  padding: 26px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 17px;
}

.topbar p,
.today,
.muted {
  color: var(--muted);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

#dashboard.view.active {
  display: grid;
  gap: 16px;
}

.dashboard-top {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 16px;
  align-items: stretch;
}

.alert {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  width: min(420px, calc(100vw - 48px));
  margin-bottom: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #e8f0ff;
  color: var(--accent-dark);
  border: 1px solid #b7c9ef;
  box-shadow: 0 18px 42px rgba(16, 47, 107, 0.18);
}

.material-warning {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #fedf89;
  border-radius: 8px;
  background: #fffaeb;
  color: #93370d;
  line-height: 1.5;
}

.hidden {
  display: none;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-height: 100%;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

#dashboard .inventory-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.dashboard-inventory-panel {
  padding-bottom: 14px;
}

.inventory-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.inventory-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(30, 74, 139, 0.1);
}

.inventory-card strong {
  font-size: 16px;
}

.inventory-card span {
  font-size: 18px;
  font-weight: 760;
}

.inventory-card-warehouses {
  display: grid;
  gap: 4px;
}

.inventory-card small {
  color: var(--muted);
  line-height: 1.5;
}

.inventory-card em {
  color: var(--accent-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.inventory-total-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
}

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

.inventory-total-card strong {
  color: var(--accent-dark);
  font-size: 26px;
}

.inventory-batch-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.inventory-batch-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
}

.inventory-batch-box small {
  color: var(--muted);
  line-height: 1.6;
}

.batch-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.batch-chip-list span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #344054;
  background: #eef3fb;
  font-size: 12px;
  font-weight: 650;
}

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

.metric {
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

button.metric {
  color: var(--ink);
}

.metric:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(33, 76, 151, 0.14);
}

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

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 25px;
}

.flow {
  margin: 0;
  min-height: 100%;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.flow-node {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
  text-align: left;
}

.flow-node:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(33, 76, 151, 0.14);
}

.flow-node span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
}

.flow-node strong,
.flow-node small {
  display: block;
}

.flow-node strong {
  margin-top: 12px;
  font-size: 18px;
}

.flow-node small {
  margin-top: 5px;
  color: var(--muted);
}

.flow-line {
  display: none;
}

.masked-password {
  -webkit-text-security: disc;
}

.admin-password-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 47, 107, 0.42);
}

.admin-password-box {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-password-box strong {
  font-size: 18px;
}

.split,
.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

#dashboard .split {
  grid-template-columns: minmax(0, 1fr);
}

.orders-workspace {
  grid-template-columns: 1fr;
}

.panel {
  padding: 16px;
}

.panel-head {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.panel-actions .search {
  min-width: 240px;
}

.text-button {
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  font-weight: 650;
}

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

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.field label.section-label {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 760;
}

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

textarea {
  resize: vertical;
  height: 88px;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.line-editor {
  display: grid;
  gap: 8px;
}

.line-table {
  display: grid;
  gap: 8px;
}

.line-header,
.line-row {
  display: grid;
  grid-template-columns: 0.7fr 1.35fr 1fr 0.62fr 0.62fr 0.62fr 0.68fr 0.78fr 40px;
  gap: 8px;
  align-items: center;
}

.delivery-line-header,
.delivery-line-row {
  display: grid;
  grid-template-columns: 0.78fr 1.38fr 0.65fr 0.58fr 0.68fr 0.86fr 1fr 120px;
  gap: 8px;
  align-items: center;
}

.transfer-line-header,
.transfer-line-row {
  display: grid;
  grid-template-columns: 0.8fr 1.45fr 0.72fr 0.62fr 0.72fr 1fr 42px;
  gap: 8px;
  align-items: center;
}

.delivery-line-header,
.transfer-line-header {
  padding: 0 2px;
  color: #475467;
  font-size: 14px;
  font-weight: 700;
}

.delivery-line-row input,
.delivery-line-row select,
.transfer-line-row input,
.transfer-line-row select {
  height: 42px;
}

.delivery-row-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px;
}

.delivery-row-actions .secondary-button {
  min-height: 42px;
  padding: 8px 10px;
}

.delivery-row-actions .icon-button {
  width: 42px;
}

.line-header {
  padding: 0 2px;
  color: #475467;
  font-size: 14px;
  font-weight: 700;
}

.line-row input,
.line-row select {
  height: 42px;
}

.icon-button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 720;
}

.secondary-button {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.order-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.order-total-row strong {
  font-size: 16px;
}

.table-wrap {
  overflow: auto;
}

.bank-ledger-panel {
  grid-column: 1 / -1;
}

.bank-ledger-wrap {
  max-height: 560px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
}

.bank-ledger-table {
  min-width: 1080px;
}

.bank-ledger-table th,
.bank-ledger-table td {
  padding: 7px 8px;
}

.bank-ledger-table th:nth-child(2),
.bank-ledger-table td:nth-child(2) {
  min-width: 280px;
}

.table-input {
  height: 34px;
  border-radius: 4px;
  padding: 5px 7px;
}

.number-input,
.number-cell {
  text-align: right;
  white-space: nowrap;
}

.danger-link {
  color: var(--red);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.filter-row input,
.filter-row select,
.filter-row button {
  min-width: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid #e8edf5;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  background: #f6f9ff;
  color: #475467;
  font-size: 14px;
  text-transform: uppercase;
}

.search {
  max-width: 260px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #344054;
  background: #eef3fb;
}

.badge.open {
  color: var(--muted);
  background: #eef3fb;
}

.badge.paid {
  color: var(--green);
  background: var(--green-soft);
}

.badge.partial {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.due {
  color: var(--red);
  background: var(--red-soft);
}

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

.list-item {
  padding: 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #f9fbff;
}

.clickable-list-item {
  width: 100%;
  text-align: left;
  color: var(--ink);
}

.clickable-list-item:hover {
  border-color: var(--accent);
  background: #eef5ff;
}

.list-item strong,
.list-item small {
  display: block;
}

.list-item small {
  color: var(--muted);
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
}

.tab.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

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

.modal {
  width: min(1080px, 100%);
  max-height: min(860px, 92vh);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.modal-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-body {
  overflow: auto;
  padding: 16px;
}

.modal-form {
  gap: 16px;
}

.device-name-form {
  display: grid;
  max-width: 420px;
}

.device-name-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.form-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

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

.detail-item {
  padding: 10px 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #f9fbff;
}

.detail-item span,
.detail-item strong {
  display: block;
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

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

.mini-row {
  display: grid;
  grid-template-columns: 0.8fr 1.25fr 0.7fr 0.7fr 1fr 72px 40px;
  gap: 8px;
  align-items: center;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.mini-check input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.mini-head {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.modal h3 {
  margin: 0;
  font-size: 15px;
}

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

.pick-header,
.pick-row {
  display: grid;
  grid-template-columns: 40px 0.9fr 1.9fr 0.8fr 0.9fr 0.8fr 0.9fr;
  gap: 8px;
  align-items: center;
}

.pick-header {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.pick-row {
  padding: 8px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #f9fbff;
}

.pick-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  justify-self: center;
}

.payment-pick-header,
.payment-pick-row {
  grid-template-columns: 40px 1fr 1fr 0.9fr 0.9fr;
}

.danger-action {
  color: #fff;
  background: var(--red);
}

.modal-actions {
  margin-top: 8px;
}

.print-mount {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 9mm;
  }

  body {
    display: block;
    background: #fff;
  }

  .sidebar,
  main,
  .modal-backdrop {
    display: none;
  }

  .print-mount {
    display: block;
  }

  .print-mount .print-document {
    position: relative;
    width: 192mm;
    min-height: 0;
    margin: 0 auto;
    color: #000;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 9.6pt;
    line-height: 1.32;
    overflow: hidden;
    box-sizing: border-box;
  }

  .print-mount .print-header {
    display: grid;
    grid-template-columns: 1fr 44mm;
    align-items: start;
    gap: 8mm;
    min-height: 0;
    padding-bottom: 3mm;
    border-bottom: 1pt solid #1f2937;
  }

  .print-mount .print-logo-wrap {
    display: none;
  }

  .print-mount .print-logo {
    display: none;
  }

  .print-mount .print-company {
    text-align: left;
    padding-top: 0;
    min-width: 0;
  }

  .print-mount .print-company strong,
  .print-mount .print-company span {
    display: block;
  }

  .print-mount .print-company strong {
    font-size: 18pt;
    line-height: 1.15;
    white-space: nowrap;
  }

  .print-mount .print-company span {
    margin-top: .8mm;
    font-size: 9.5pt;
    white-space: nowrap;
  }

  .print-mount .print-meta {
    position: static;
    right: 0;
    width: 44mm;
    display: grid;
    gap: .9mm;
    margin-left: 0;
    padding-top: 0;
  }

  .print-mount .print-meta div {
    display: grid;
    grid-template-columns: 14mm 1fr;
    gap: 1mm;
  }

  .print-mount .registry-grid div {
    display: grid;
    grid-template-columns: 24mm 1fr;
    gap: 3mm;
  }

  .print-mount .print-meta span,
  .print-mount .registry-grid span,
  .print-mount .party-card dt {
    color: #000;
    font-size: 8pt;
    font-weight: 700;
  }

  .print-mount .print-meta strong {
    font-size: 8pt;
    font-weight: 400;
  }

  .print-mount .print-title {
    margin: 4mm 0 3.5mm;
    text-align: center;
  }

  .print-mount .print-title h1 {
    margin: 0;
    font-size: 21pt;
    letter-spacing: 4pt;
    font-weight: 700;
  }

  .print-mount .print-title p {
    margin: 1mm 0 0;
    color: #000;
    font-size: 8.8pt;
  }

  .print-mount .party-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4mm;
    margin-bottom: 3.5mm;
  }

  .print-mount .party-card {
    box-sizing: border-box;
    min-width: 0;
    border: 1px solid #9aa8ba;
    border-radius: 4px;
    padding: 2.4mm 3mm;
  }

  .print-mount .party-card h2,
  .print-mount .print-section h2,
  .print-mount .signature-card h2 {
    margin: 0 0 1.4mm;
    color: #000;
    font-size: 10.2pt;
  }

  .print-mount .party-card dl {
    display: grid;
    grid-template-columns: 20mm 1fr;
    gap: .9mm 3mm;
    margin: 0;
  }

  .print-mount .party-card dd {
    margin: 0;
    font-size: 8.4pt;
    font-weight: 400;
  }

  .print-mount .print-section {
    margin-top: 3mm;
  }

  .print-mount .product-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    border: 0;
    outline: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .print-mount .product-table th,
  .print-mount .product-table td {
    border: 1px solid #222;
    box-sizing: border-box;
    padding: 1.7mm 1.1mm;
    font-size: 9pt;
    vertical-align: middle;
  }

  .print-mount .product-table th {
    color: #000;
    background: #fff;
    font-weight: 700;
    text-align: center;
  }

  .print-mount .product-table td {
    text-align: center;
  }

  .print-mount .product-table td:nth-child(2) {
    text-align: left;
    white-space: normal;
    font-size: 9pt;
  }

  .print-mount .product-name-cell {
    text-align: left;
  }

  .print-mount .product-table tfoot td {
    background: #f7f9fc;
    font-weight: 700;
  }

  .print-mount .product-table th:nth-child(4),
  .print-mount .product-table td:nth-child(4),
  .print-mount .product-table tfoot td:nth-child(2) {
    text-align: center;
  }

  .print-mount .tax-note {
    margin: 1.6mm 0 0;
    font-size: 8.9pt;
    color: #000;
    text-align: center;
  }

  .print-mount .terms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9mm 5mm;
    padding: 2.2mm 2.6mm;
    border: 1px solid #9aa8ba;
    border-radius: 4px;
    background: #fff;
  }

  .print-mount .term-item {
    break-inside: avoid;
  }

  .print-mount .term-item strong,
  .print-mount .term-item span {
    display: block;
  }

  .print-mount .term-item strong {
    margin-bottom: .25mm;
    color: #000;
    font-size: 7.9pt;
  }

  .print-mount .term-item span {
    font-size: 7.1pt;
    color: #000;
    display: block;
    text-indent: 2em;
    line-height: 1.22;
  }

  .print-mount .signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4mm;
    margin-top: 3mm;
  }

  .print-mount .signature-card {
    position: relative;
    min-height: 30mm;
    border: 1px solid #9aa8ba;
    border-radius: 4px;
    padding: 2.4mm 3mm;
  }

  .print-mount .signature-card strong {
    display: block;
    margin-top: 4mm;
    position: relative;
    z-index: 1;
  }

  .print-mount .supplier-sign {
    overflow: visible;
  }

  .print-mount .print-stamp {
    position: absolute;
    right: 14mm;
    bottom: 0;
    width: 36mm;
    height: 36mm;
    object-fit: contain;
    border-radius: 50%;
    opacity: .9;
  }

  .print-mount .registry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7mm 6mm;
    margin-top: 2.4mm;
    padding-top: 2mm;
    border-top: 1px solid #9aa8ba;
    font-size: 7.3pt;
  }

  .print-mount .registry-grid strong {
    font-weight: 500;
  }
}

@media (max-width: 1060px) {
  body {
    grid-template-columns: 1fr;
  }

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

  .flow,
  .metrics,
  .dashboard-top,
  .split,
  .workspace {
    grid-template-columns: 1fr;
  }

  #dashboard .split,
  #dashboard .inventory-grid {
    grid-template-columns: 1fr;
  }

  .flow-line {
    height: 28px;
    width: 2px;
    justify-self: center;
  }
}

@media (max-width: 640px) {
  main {
    padding: 18px;
  }

  .topbar,
  .panel-head,
  .row,
  .line-row,
  .line-header,
  .delivery-line-row,
  .delivery-line-header,
  .transfer-line-row,
  .transfer-line-header,
  .delivery-row-actions,
  .detail-grid,
  .mini-row,
  .pick-header,
  .pick-row,
  .payment-pick-header,
  .payment-pick-row {
    grid-template-columns: 1fr;
    display: grid;
  }
}
