:root {
  --ink:hsl(222 28% 12%);
  --muted:hsl(218 11% 42%);
  --line:hsl(214 18% 84%);
  --paper:#fff;
  --canvas:hsl(210 20% 98%);
  --navy:var(--ink);
  --navy-2:#334b5b;
  --teal:hsl(188 70% 28%);
  --teal-soft:#e5f1f3;
  --orange:#b77a16;
  --orange-soft:#fff4df;
  --red:#b52f3c;
  --red-soft:#ffeded;
  --shadow:0 1px 3px #10182808;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--ink);
  background:var(--canvas);
  font-feature-settings:'tnum' 1
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  min-width:360px
}
button,input,select,textarea {
  font:inherit
}
button {
  cursor:pointer
}
button:disabled {
  opacity:.5;
  cursor:wait
}
button,a,input,select,textarea,[tabindex]:focus-visible {
  outline-offset:3px
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible {
  outline:2px solid var(--teal)
}
input[type=checkbox] {
  accent-color:var(--teal)
}
.hidden {
  display:none!important
}
.app-shell {
  display:grid;
  grid-template:64px calc(100dvh - 64px)/264px minmax(0,1fr);
  min-height:100dvh
}
.topbar {
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  background:#fff;
  border-bottom:1px solid var(--line);
  z-index:4
}
.brand {
  display:flex;
  gap:12px;
  align-items:center
}
.brand-mark {
  width:40px;
  height:40px;
  object-fit:contain
}
.brand>span {
  display:flex;
  flex-direction:column;
  gap:3px
}
.brand strong {
  font-size:17px;
  font-weight:500;
  letter-spacing:-.025em
}
.brand b {
  font-size:15px;
  letter-spacing:.05em
}
.brand small {
  color:var(--muted);
  font-size:11px
}
.topbar-status {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:12px
}
.live-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--teal)
}
.icon-button {
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--muted);
  font-size:20px
}
.icon-button:hover {
  background:var(--teal-soft);
  color:var(--teal)
}
.sidebar {
  grid-row:2;
  display:flex;
  flex-direction:column;
  overflow:auto;
  background:#fff;
  border-right:1px solid var(--line)
}
.sidebar-section {
  padding:18px 16px;
  border-bottom:1px solid var(--line)
}
.workspace-label {
  display:flex;
  align-items:center;
  gap:10px;
  margin:-4px -6px 22px;
  padding:11px 12px;
  background:var(--teal-soft);
  border-radius:6px;
  color:var(--teal);
  font-size:13px;
  font-weight:600
}
.nav-icon {
  font-size:18px
}
.section-kicker,.eyebrow {
  margin:0 0 7px;
  color:var(--muted);
  font-size:10px;
  font-weight:600;
  letter-spacing:.1em;
  text-transform:uppercase
}
.dropzone {
  display:flex;
  min-height:136px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:16px 10px;
  border:1px dashed #aab9c5;
  border-radius:8px;
  background:var(--canvas);
  text-align:center;
  cursor:pointer
}
.dropzone:hover,.dropzone.dragging {
  border-color:var(--teal);
  background:var(--teal-soft)
}
.dropzone strong {
  font-size:13px;
  font-weight:600
}
.dropzone small {
  font-size:11px;
  line-height:1.5;
  color:var(--muted)
}
.drop-icon {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--teal);
  font-size:20px
}
.upload-progress {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
  font-size:11px;
  color:var(--muted)
}
.upload-progress span {
  width:8px;
  height:8px;
  background:var(--teal);
  border-radius:50%;
  animation:pulse 1s infinite
}
.upload-progress em {
  font-style:normal
}
@keyframes pulse {
  50% {
    opacity:.25
  }
}
.secondary-button,.primary-button,.danger-button,.text-button,.add-line-button {
  border-radius:6px;
  font-weight:600;
  font-size:12px
}
.secondary-button {
  padding:10px 14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink)
}
.secondary-button:hover {
  background:var(--canvas)
}
.secondary-button.compact {
  padding:8px 10px
}
.primary-button {
  padding:11px 16px;
  background:var(--teal);
  color:#fff;
  border:1px solid var(--teal)
}
.primary-button:hover {
  filter:brightness(.93)
}
.primary-button span {
  margin-left:8px
}
.danger-button {
  padding:10px 14px;
  color:var(--red);
  border:1px solid #e7bac0;
  background:#fff
}
.text-button {
  padding:4px;
  border:0;
  background:transparent;
  color:var(--teal)
}
.queue-section {
  flex:1;
  border-bottom:0;
  padding:18px 8px
}
.queue-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 8px 12px
}
.queue-heading strong {
  font-size:12px
}
.order-queue {
  display:flex;
  flex-direction:column;
  gap:4px
}
.queue-empty {
  padding:24px 10px;
  font-size:12px;
  color:var(--muted);
  text-align:center
}
.queue-card {
  display:grid;
  grid-template-columns:26px 1fr auto;
  align-items:center;
  gap:8px;
  width:100%;
  padding:12px 10px;
  border:0;
  border-radius:6px;
  background:transparent;
  text-align:left
}
.queue-card:hover {
  background:var(--canvas)
}
.queue-card.active {
  background:var(--teal-soft);
  color:var(--teal)
}
.queue-index {
  font-size:11px;
  color:var(--muted)
}
.queue-info {
  min-width:0
}
.queue-info strong,.queue-info small {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.queue-info strong {
  font-size:12px
}
.queue-info small {
  margin-top:5px;
  color:var(--muted);
  font-size:10px
}
.queue-badge {
  padding:3px 6px;
  border-radius:4px;
  background:var(--orange-soft);
  color:#865711;
  font-size:10px
}
.queue-badge.ok {
  background:var(--teal-soft);
  color:var(--teal)
}
.workspace {
  grid-row:2;
  min-width:0;
  overflow:auto;
  background:var(--canvas)
}
.empty-state {
  max-width:660px;
  margin:8vh auto;
  padding:40px;
  text-align:center
}
.empty-illustration {
  position:relative;
  width:90px;
  height:95px;
  margin:0 auto 24px
}
.paper {
  position:absolute;
  display:block;
  width:62px;
  height:80px;
  border:1px solid var(--line);
  border-radius:6px;
  background:white
}
.paper-back {
  left:8px;
  top:9px;
  transform:rotate(-8deg);
  background:var(--teal-soft)
}
.paper-front {
  left:23px;
  top:0;
  padding:18px 12px
}
.paper-front i {
  display:block;
  height:4px;
  margin:8px 0;
  background:var(--line);
  border-radius:2px
}
.spark {
  position:absolute;
  right:-3px;
  top:6px;
  color:var(--teal);
  font-size:24px
}
.empty-state h1 {
  margin:12px 0 18px;
  font-size:32px;
  font-weight:600;
  letter-spacing:-.04em
}
.empty-state>p:not(.eyebrow) {
  color:var(--muted);
  font-size:14px;
  line-height:1.8
}
.empty-steps {
  display:flex;
  justify-content:center;
  gap:22px;
  margin-top:28px
}
.empty-steps span {
  color:var(--muted);
  font-size:11px
}
.empty-steps b {
  display:inline-grid;
  place-items:center;
  width:22px;
  height:22px;
  border:1px solid var(--line);
  border-radius:5px;
  margin-right:7px;
  background:white;
  color:var(--teal)
}
.order-editor {
  max-width:1660px;
  margin:auto;
  padding:24px 28px 32px
}
.editor-toolbar {
  position:sticky;
  top:0;
  z-index:25;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:-24px -28px 20px;
  padding:20px 28px 16px;
  border-bottom:1px solid var(--line);
  background:var(--canvas)
}
.editor-toolbar h1 {
  margin:3px 0 6px;
  font-size:26px;
  font-weight:600;
  letter-spacing:-.04em
}
.source-caption {
  margin:0;
  color:var(--muted);
  font-size:11px;
  overflow-wrap:anywhere
}
.toolbar-actions {
  display:flex;
  gap:8px;
  flex-shrink:0
}
.warning-banner {
  margin:12px 0;
  padding:12px 14px;
  border:1px solid #efd8a9;
  border-radius:6px;
  background:var(--orange-soft);
  color:#805715;
  font-size:12px;
  line-height:1.6
}
.summary-strip {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px
}
.summary-item {
  display:flex;
  gap:10px;
  align-items:center;
  padding:14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff
}
.summary-icon {
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:5px;
  color:var(--teal);
  background:var(--teal-soft);
  font-size:13px;
  font-weight:600
}
.summary-item.warn .summary-icon {
  background:var(--orange-soft);
  color:#805715
}
.summary-item.issue .summary-icon {
  background:var(--red-soft);
  color:var(--red)
}
.summary-item strong,.summary-item small {
  display:block
}
.summary-item strong {
  font-size:19px;
  font-weight:600
}
.summary-item small {
  margin-top:3px;
  font-size:10px;
  color:var(--muted)
}
.card {
  margin-top:16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:white;
  box-shadow:var(--shadow)
}
.card-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid var(--line)
}
.card-heading h2,.modal h2 {
  margin:0;
  font-size:15px;
  font-weight:600;
  letter-spacing:-.02em
}
.edit-hint,.legend {
  font-size:10px;
  color:var(--muted)
}
.legend {
  display:flex;
  align-items:center;
  gap:6px
}
.dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--teal);
  margin-left:6px
}
.dot.review {
  background:var(--orange)
}
.dot.issue {
  background:var(--red)
}
.field-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  padding:18px
}
.field {
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0
}
.field.wide {
  grid-column:span 2
}
.field>span {
  font-size:11px;
  color:var(--muted);
  font-weight:500
}
.field input,.field select,.field textarea,.table-input,.product-input,.special-input {
  width:100%;
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--ink);
  background:#fff
}
.field input,.field select {
  height:36px;
  padding:0 10px;
  font-size:12px
}
.field textarea {
  padding:9px 10px;
  font-size:12px;
  line-height:1.6;
  resize:vertical
}
.field input:focus,.field select:focus,.field textarea:focus,.table-input:focus,.product-input:focus,.special-input:focus {
  border-color:var(--teal);
  outline:2px solid #137b8b25;
  outline-offset:0
}
.table-wrap {
  overflow:auto;
  max-height:65vh;
  scrollbar-gutter:stable
}
.line-table,.plate-table {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  min-width:960px
}
.line-table th,.plate-table th {
  position:sticky;
  top:0;
  z-index:2;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background:var(--canvas);
  text-align:left;
  font-size:10px;
  font-weight:500;
  color:var(--muted)
}
.line-table td,.plate-table td {
  padding:14px 12px;
  border-bottom:1px solid #e8ecf0;
  vertical-align:top;
  font-size:12px;
  overflow-wrap:anywhere
}
.line-table tbody tr:hover,.plate-table tbody tr:hover {
  background:#fafcfd
}
.line-table tbody tr:last-child td,.plate-table tbody tr:last-child td {
  border-bottom:0
}
.line-table th:nth-child(1) {
  width:84px
}
.line-table th:nth-child(2) {
  width:26%
}
.line-table th:nth-child(3) {
  width:31%
}
.line-table th:nth-child(4) {
  width:130px
}
.line-table th:nth-child(5) {
  width:112px
}
.line-table th:nth-child(6) {
  width:82px
}
.line-table th:nth-child(7) {
  width:40px
}
.status-chip {
  display:inline-block;
  padding:4px 6px;
  border-radius:4px;
  font-size:10px;
  font-weight:600;
  background:var(--teal-soft);
  color:var(--teal)
}
.status-chip.review,.status-chip.suggested,.status-chip.conflict {
  background:var(--orange-soft);
  color:#805715
}
.status-chip.unmatched {
  background:var(--red-soft);
  color:var(--red)
}
.source-product>strong,.source-product>span {
  display:block
}
.source-product>strong {
  margin-bottom:5px;
  font:600 11px Consolas,monospace;
  color:var(--navy-2)
}
.source-product>span {
  line-height:1.5;
  color:#475564
}
.source-product small {
  display:block;
  margin-top:7px;
  font-size:10px;
  line-height:1.5;
  color:var(--muted)
}
.product-picker {
  position:relative
}
.product-input {
  height:34px;
  padding:0 9px;
  font:600 11px Consolas,monospace
}
.matched-description {
  margin:6px 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.5
}
.match-issue {
  color:#805715;
  font-size:11px;
  line-height:1.5
}
.product-results {
  position:fixed;
  z-index:40;
  width:min(440px,80vw);
  max-height:260px;
  overflow:auto;
  padding:5px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  box-shadow:0 10px 30px #14243125
}
.product-option {
  display:grid;
  grid-template-columns:105px 1fr;
  gap:6px;
  width:100%;
  padding:10px;
  border:0;
  border-radius:4px;
  background:white;
  text-align:left;
  font-size:11px
}
.product-option:hover {
  background:var(--teal-soft)
}
.product-option code {
  color:var(--teal)
}
.product-option small {
  grid-column:2;
  color:var(--muted)
}
.remember-row {
  display:flex;
  align-items:flex-start;
  gap:6px;
  margin-top:8px;
  color:var(--muted);
  font-size:10px;
  line-height:1.5
}
.remember-row input {
  flex:0 0 auto;
  margin:2px 0;
  width:13px;
  height:13px
}
.table-input {
  height:34px;
  padding:0 7px;
  font-size:12px
}
.currency-input {
  text-align:right
}
.quantity-rule {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  margin-top:7px;
  font-size:10px;
  color:var(--muted)
}
.quantity-rule.active {
  color:#805715
}
.quantity-rule label {
  display:flex;
  align-items:center;
  gap:3px
}
.quantity-multiplier-input {
  width:44px;
  height:24px;
  padding:2px 4px;
  border:1px solid var(--line);
  border-radius:4px;
  font-size:10px
}
.price-source {
  display:inline-block;
  margin-top:7px;
  padding:3px 5px;
  border-radius:4px;
  background:#eef1f4;
  color:var(--muted);
  font-size:9px;
  line-height:1.4
}
.price-source.pricelist,.price-source.customer-rule {
  background:var(--teal-soft);
  color:var(--teal)
}
.price-source.manual {
  background:var(--orange-soft);
  color:#805715
}
.line-total {
  display:block;
  padding-top:9px;
  font-weight:600;
  text-align:right
}
.row-action {
  width:26px;
  height:30px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:var(--muted);
  font-size:18px
}
.row-action:hover {
  color:var(--red);
  background:var(--red-soft)
}
.add-line-button {
  margin:10px 12px;
  padding:8px;
  border:0;
  background:transparent;
  color:var(--teal);
  font-size:11px
}
.special-pill {
  padding:5px 7px;
  border-radius:4px;
  background:var(--orange-soft);
  color:#805715;
  font-size:10px
}
.special-summary {
  display:grid;
  grid-template-columns:120px minmax(200px,1fr) 130px 150px 90px 90px;
  gap:12px;
  align-items:end;
  padding:18px;
  border-bottom:1px solid var(--line)
}
.special-input {
  height:35px;
  padding:0 8px;
  font-size:11px
}
.plate-table th:nth-child(1) {
  width:30%
}
.plate-table th:nth-child(2),.plate-table th:nth-child(3),.plate-table th:nth-child(4) {
  width:80px
}
.plate-table th:nth-child(5) {
  width:200px
}
.plate-table th:nth-child(6) {
  width:80px
}
.plate-table th:nth-child(7) {
  width:40px
}
.plate-cost {
  display:block;
  padding-top:8px;
  text-align:right;
  font-weight:600
}
.order-totals {
  display:grid;
  grid-template-columns:1fr 1fr 1.5fr 1fr;
  gap:24px;
  margin-top:20px;
  padding:20px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff
}
.order-totals>div {
  display:flex;
  flex-direction:column;
  gap:8px
}
.order-totals span,.order-totals small {
  color:var(--muted);
  font-size:11px
}
.order-totals strong {
  font-size:13px;
  font-weight:600
}
.order-totals .net-total {
  text-align:right
}
.net-total strong {
  font-size:24px;
  color:var(--teal);
  letter-spacing:-.035em
}
.modal {
  width:min(760px,94vw);
  max-height:90dvh;
  padding:0;
  border:1px solid var(--line);
  border-radius:10px;
  color:var(--ink);
  background:#fff;
  box-shadow:0 20px 80px #14243133
}
.modal::backdrop {
  background:#16233265
}
.modal form {
  margin:0
}
.modal-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px 22px;
  border-bottom:1px solid var(--line)
}
.settings-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  max-height:65dvh;
  overflow:auto;
  padding:20px 22px
}
.settings-grid .wide {
  grid-column:1/-1
}
.settings-section-title {
  padding-top:14px;
  border-top:1px solid var(--line)
}
.settings-section-title strong,.settings-section-title small {
  display:block
}
.settings-section-title strong {
  font-size:13px
}
.settings-section-title small {
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
  line-height:1.6
}
.toggle-field {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:12px;
  line-height:1.5
}
.toggle-field input {
  width:16px;
  height:16px;
  flex-shrink:0
}
.settings-import-actions {
  display:flex;
  gap:10px;
  align-items:center
}
.settings-import-actions small,#sageStatus {
  color:var(--muted);
  font-size:11px;
  line-height:1.5
}
.modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  align-items:center;
  padding:16px 22px;
  border-top:1px solid var(--line)
}
.modal-spacer {
  flex:1
}
.modal-actions.single {
  justify-content:center;
  border:0
}
.result-modal {
  max-width:560px;
  text-align:center
}
.result-modal>form {
  padding:28px
}
.result-icon {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  margin:0 auto 20px;
  border-radius:8px;
  background:var(--teal-soft);
  color:var(--teal);
  font-size:22px
}
.result-modal h2 {
  font-size:23px
}
.result-modal p {
  font-size:13px;
  color:var(--muted);
  line-height:1.7
}
.result-allocation:empty {
  display:none
}
.allocation-result {
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
  text-align:left;
  font-size:12px
}
.allocation-result>.warning-banner {
  margin:12px 0
}
.allocation-table-wrap {
  overflow-x:auto
}
.allocation-table {
  width:100%;
  border-collapse:collapse;
  font-size:12px
}
.allocation-table th,.allocation-table td {
  padding:10px 6px;
  border-bottom:1px solid var(--line);
  text-align:right;
  vertical-align:top
}
.allocation-table th:first-child,.allocation-table td:first-child {
  text-align:left
}
.allocation-table small {
  display:block;
  margin-top:4px;
  color:var(--muted);
  overflow-wrap:anywhere
}
.allocation-short {
  color:#a45916;
  font-weight:700
}
.result-files {
  margin:20px 0;
  border:1px solid var(--line);
  border-radius:6px
}
.result-files:empty {
  display:none
}
.result-file {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:11px
}
.result-file:last-child {
  border:0
}
.result-file strong,.result-file small {
  display:block
}
.result-file small {
  margin-top:6px;
  color:var(--muted);
  overflow-wrap:anywhere
}
.result-file span {
  color:var(--teal)
}
.result-download {
  border:0;
  background:transparent;
  color:var(--teal);
  font-size:11px;
  white-space:nowrap
}
.result-warnings {
  color:#805715;
  text-align:left;
  font-size:12px;
  line-height:1.6
}
.toast-region {
  position:fixed;
  bottom:20px;
  right:20px;
  display:flex;
  flex-direction:column;
  gap:8px;
  z-index:100
}
.toast {
  max-width:440px;
  padding:14px 18px;
  border-radius:6px;
  color:#fff;
  background:#273947;
  box-shadow:var(--shadow);
  font-size:12px;
  line-height:1.6
}
.toast.error {
  background:#8f2934
}
.toast.success {
  background:var(--teal)
}
.recovery-line-button {
  display:inline-flex;
  margin:8px 0 4px;
  padding:2px 0;
  border:0;
  background:transparent;
  color:var(--teal);
  font-size:11px;
  font-weight:600;
  text-decoration:underline;
  text-underline-offset:3px
}
.recovery-modal {
  width:min(800px,94vw)
}
.recovery-modal .modal-heading {
  position:sticky;
  top:0;
  z-index:1;
  background:#fff
}
.recovery-body {
  padding:22px
}
.recovery-intro,#recoveryMessage {
  font-size:12px;
  color:var(--muted);
  line-height:1.7
}
.recovery-search {
  display:flex;
  align-items:end;
  gap:12px
}
.recovery-search .field {
  flex:1
}
#recoveryResults {
  display:grid;
  gap:16px
}
.recovery-card {
  padding:20px;
  border:1px solid var(--line);
  border-radius:8px
}
.recovery-source {
  display:inline-block;
  padding:5px 8px;
  border-radius:4px;
  background:var(--teal-soft);
  color:var(--teal);
  font-size:10px
}
.recovery-card h3 {
  font-size:17px;
  line-height:1.5
}
.recovery-card p {
  font-size:12px;
  color:var(--muted);
  line-height:1.6
}
.recovery-facts {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  padding:16px;
  border-radius:6px;
  background:var(--canvas)
}
.recovery-facts dt {
  font-size:10px;
  color:var(--muted);
  margin-bottom:8px
}
.recovery-facts dd {
  font-size:13px;
  font-weight:600;
  margin:0;
  overflow-wrap:anywhere
}
.recovery-confirm {
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:16px 0;
  border-top:1px solid var(--line);
  font-size:12px;
  line-height:1.6
}
.recovery-actions {
  display:flex;
  justify-content:flex-end
}
.recovery-card .settings-grid {
  padding:8px 0;
  max-height:none;
  overflow:visible
}
.pcg-delivery {
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:6px
}
.pcg-delivery label {
  display:flex;
  gap:5px;
  align-items:center;
  font-size:10px;
  font-weight:600
}
.source-product .stock-level {
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  margin-top:10px;
  padding:8px;
  background:var(--teal-soft);
  border-radius:4px;
  font-size:11px;
  color:var(--teal)
}
.stock-level strong {
  font-weight:600
}
.stock-unit {
  font-size:10px
}
.table-input.stock-shortage {
  border-color:var(--red);
  background:var(--red-soft);
  color:var(--red)
}
@media(max-width:1280px) {
  .field-grid {
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
  .special-summary {
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
  .order-editor {
    padding:20px
  }
  .editor-toolbar {
    margin:-20px -20px 20px;
    padding:16px 20px
  }
  .summary-item {
    padding:12px 9px
  }
  .summary-item small {
    font-size:9px
  }
}
@media(max-width:900px) {
  .app-shell {
    grid-template:64px auto/220px minmax(0,1fr)
  }
  .sidebar,.workspace {
    height:calc(100dvh - 64px)
  }
  .field-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .summary-strip {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .editor-toolbar {
    align-items:flex-start;
    flex-direction:column;
    gap:12px
  }
  .order-totals {
    grid-template-columns:1fr 1fr
  }
  .legend,.edit-hint {
    display:none
  }
  .empty-steps {
    flex-direction:column;
    align-items:flex-start
  }
  .empty-state {
    padding:28px 22px
  }
  .empty-state h1 {
    font-size:27px
  }
}
@media(max-width:620px) {
  .app-shell {
    display:block
  }
  .topbar {
    height:64px;
    padding:0 16px
  }
  .topbar-status>span {
    display:none
  }
  .sidebar {
    height:auto;
    border-right:0;
    border-bottom:1px solid var(--line)
  }
  .source-section {
    padding:14px 16px
  }
  .workspace-label {
    display:none
  }
  .dropzone {
    min-height:100px
  }
  .queue-section {
    padding:12px
  }
  .order-queue {
    max-height:180px;
    overflow:auto
  }
  .workspace {
    height:auto;
    min-height:55vh
  }
  .order-editor {
    padding:16px
  }
  .editor-toolbar {
    position:static;
    margin:-16px -16px 16px;
    padding:16px
  }
  .toolbar-actions {
    width:100%
  }
  .toolbar-actions .primary-button {
    flex:1
  }
  .field-grid {
    gap:12px;
    padding:14px
  }
  .card-heading {
    padding:14px
  }
  .special-summary {
    grid-template-columns:1fr 1fr
  }
  .order-totals {
    gap:20px 12px;
    padding:16px
  }
  .order-totals .net-total {
    text-align:left
  }
  .settings-grid {
    grid-template-columns:1fr
  }
  .field.wide {
    grid-column:1/-1
  }
  .modal-actions {
    flex-wrap:wrap;
    padding:14px
  }
  .settings-import-actions {
    flex-wrap:wrap
  }
  .recovery-facts {
    grid-template-columns:1fr 1fr
  }
  .recovery-search {
    flex-direction:column;
    align-items:stretch
  }
  .toast-region {
    right:12px;
    left:12px
  }
  .toast {
    max-width:none
  }
  .empty-steps {
    align-items:center
  }
  .empty-state {
    margin:30px auto
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
}
