.local-review-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 28px;
  border: 1px solid #d6b464;
  border-radius: 10px;
  background: #fff9e9;
  color: #604812;
  font-size: 13px;
}
.local-review-banner strong {
  font-size: 12px;
  letter-spacing: 0.04em;
}
.workspace-filters {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 22px;
}
.workspace-filters > .order-filter-search,
.workspace-filters > .order-status-options,
.workspace-filters > .workspace-filter-grid { grid-column: 1 / -1; }
.workspace-filters .order-filter-search label,
.order-choice {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}
.order-choice input,
.order-choice select,
.order-choice textarea {
  width: 100%;
  min-width: 0;
  font-weight: 400;
}
.order-status-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.order-status-options legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.order-status-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #e4e7e5;
  border-radius: 9px;
  cursor: pointer;
  user-select: none;
}
.order-status-choice:has(input:checked) {
  border-color: #345b42;
  background: #f4f8f4;
}
.order-status-choice input {
  width: 17px;
  height: 17px;
  accent-color: #234d35;
  margin: 0;
}
.order-status-choice .tag {
  white-space: nowrap;
}
.workspace-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}
.order-quick-views {
  flex-wrap: wrap;
}
.order-quick-views button.active {
  border-bottom-color: #111;
  color: #111;
}
.order-quick-views button[data-view="preorder"].active {
  color: #4c4096;
  border-bottom-color: currentColor;
}
.order-saved-views {
  padding: 0 24px 24px;
  font-size: 13px;
}
.order-saved-views input {
  max-width: 340px;
}
.saved-order-view {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.order-history-table td {
  vertical-align: top;
}
.order-click-row { cursor: pointer; }
.order-click-row:hover td { background: #f1f6f2; }
.order-click-row:focus-visible { outline: 2px solid #27583c; outline-offset: -2px; }
.order-finance-cards { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:22px 0; }
.order-finance-card { background:white;border:1px solid #dce5df;border-radius:12px;padding:24px;min-width:0; }
.order-finance-card > span { display:block;font-size:14px;color:#5a665e;margin-bottom:14px; }
.order-finance-card strong { display:block;font-size:30px;line-height:1.3;overflow-wrap:anywhere; }
.order-finance-card:last-child { background:#edf7f0;border-color:#a9cdb5; }
.order-finance-card small { display:block;font-size:12px;color:#69746c;margin-top:14px; }
.order-finance-card .unconfirmed-amount { font-size:22px;color:#8d671b; }
.order-amount-notice { padding:12px 16px;border:1px solid #ead4a3;border-radius:8px;background:#fff9ed;color:#795619;font-size:13px;margin:12px 0 24px; }
.order-edit-form [data-edit-error]:not(:empty) { color:#a62525;background:#fff3f3;padding:14px 18px;border:1px solid #f2c0c0;border-radius:8px;margin-bottom:20px; }
.order-zero-confirm { display:flex;align-items:center;gap:10px;font-size:13px; }
.order-zero-confirm input { width:17px;height:17px;margin:0; }
.metric-link { text-decoration:none;color:inherit;display:flex;flex-direction:column;gap:14px;transition:border-color .15s,box-shadow .15s; }
.metric-link:hover { border-color:#7da98a;box-shadow:0 4px 15px #23482d0d; }
.metric-link:focus-visible { outline:2px solid #2a6742;outline-offset:3px; }
.metric-link small { color:#778279;font-size:13px;line-height:1.6; }
.metric-detail-link { margin-top:auto;font-size:12px;color:#356846; }
.dashboard-cash-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
.breakdown-total { display:flex;flex-direction:column;gap:10px; }
.breakdown-total strong { font-size:32px; }
.breakdown-total small { color:#707a73; }
.breakdown-contribution { font-weight:700;background:#f3f8f4; }
.order-identity { display:flex;align-items:baseline;gap:18px;flex-wrap:wrap; }
.order-customer-heading { font-family:"Be Vietnam Pro",sans-serif;font-size:25px;font-weight:600;line-height:1.5;letter-spacing:0;overflow-wrap:anywhere; }
.refund-action-form { max-width:900px;margin:auto; }
.refund-proof-preview { display:block;max-width:100%;max-height:400px;object-fit:contain;margin-top:18px;border:1px solid #dce5df;border-radius:8px; }
.refund-proof-preview[hidden] { display:none; }
.order-refund-notice { padding:14px 18px;background:#fff0ef;color:#8a3028;border-radius:8px;font-size:14px;margin-bottom:20px; }
.pos-customer-fields { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px; }
.pos-address-fields { display:grid;grid-template-columns:3fr 1fr;gap:18px;margin-top:18px; }
.pos-address-fields[hidden] { display:none; }
.pos-catalog-filters { display:grid;grid-template-columns:2fr 1fr 1fr;gap:15px; }
.pos-product-controls { margin-bottom:20px; }
.pos-order-form .pos-layout { align-items:start; }
.pos-order-form .pos-bill { position:static;max-height:none;overflow:visible; }
.pos-order-form .pos-bill { order:2; }
.pos-order-form .pos-catalog-pane { order:1;min-width:0; }
.checkout-layout .order-summary { order:1; }
.pos-order-form .pos-cart { max-height:420px;overflow:auto; }
.pos-empty-cart { padding:24px;color:#778279;font-size:14px; }
.order-entry-product-filters { display:grid;grid-template-columns:2fr 1fr;gap:18px; }
@media(max-width:1100px){.pos-customer-fields{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){
  .order-customer-heading{font-size:21px;}.order-identity{gap:8px;}
  .dashboard-cash-metrics,.pos-address-fields,.order-entry-product-filters{grid-template-columns:1fr;}
  .pos-customer-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
  .pos-customer-fields>.field:first-child{grid-column:1/-1;}
  .pos-catalog-filters{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pos-catalog-filters>.order-choice:first-child{grid-column:1/-1;}
  .pos-order-form .pos-layout{grid-template-columns:minmax(0,1fr);}
  .pos-order-form .pos-products{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pos-order-form .pos-products .sizes{display:block;}
}
.source-production-line + .source-production-line {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eee;
}
.order-entry-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.order-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.order-entry-form>.order-entry-grid:first-of-type{grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr);align-items:start}
.order-entry-form .entry-additional .workspace-filter-grid{grid-template-columns:1fr;gap:10px}
.order-entry-form .entry-additional .order-choice{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;font-size:12px}
.order-entry-form .entry-additional details{grid-column:1/-1}
.order-entry-form .entry-additional details .order-choice{margin-top:10px}
.order-entry-form .entry-additional summary{cursor:pointer;font-size:12px}
.customer-search-anchor{position:relative}
.customer-search-popup{position:absolute;top:100%;left:0;right:0;z-index:20;margin-top:4px;background:#fff;box-shadow:0 8px 24px #0002}
.customer-search-popup p{padding:12px}
.customer-search-popup [aria-selected=true]{background:#edf3ef}
.order-customer-selected{display:flex;justify-content:space-between;gap:12px;padding:16px 0 0}
.order-customer-selected p{margin-top:5px;overflow-wrap:anywhere}
.order-customer-selected>.action-row{align-items:start;flex-shrink:0}
.order-customer-empty{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:18px;min-height:74px}
.order-customer-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #ddd;border-radius:12px;color:#151515;background:white;box-shadow:0 24px 80px #0003}
.order-customer-dialog::backdrop{background:#0006}
.customer-dialog-head,.customer-dialog-footer{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;gap:16px;background:#fff}
.customer-dialog-head{position:sticky;top:0;z-index:1;border-bottom:1px solid #eee}
.customer-dialog-head h2{font:600 21px var(--font-body,sans-serif);margin:0}
.customer-dialog-footer{position:sticky;bottom:0;justify-content:flex-end;border-top:1px solid #eee}
.customer-dialog-body{padding:20px 24px}
.customer-dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.customer-dialog-body>.customer-dialog-grid:first-of-type{margin-top:16px}
.customer-extra summary{font-size:13px;cursor:pointer}
.order-stock-filter{display:flex;align-items:center;gap:7px;font-size:12px;white-space:nowrap;cursor:pointer}
.order-stock-filter input{accent-color:#111;width:16px;height:16px}
@media(max-width:850px){.order-entry-form>.order-entry-grid:first-of-type{grid-template-columns:1fr}.order-customer-selected{flex-wrap:wrap}}
@media(max-width:520px){.customer-dialog-grid{grid-template-columns:1fr;gap:12px}.customer-dialog-head,.customer-dialog-footer{padding:14px 16px}.customer-dialog-body{padding:16px}.order-customer-empty{align-items:start;flex-direction:column}.order-customer-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.order-stock-filter{white-space:normal}}
.order-entry-grid .workspace-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.order-entry-lines {
  min-width: 880px;
}
.order-entry-lines td:first-child {
  min-width: 310px;
}
.order-entry-lines input {
  min-width: 75px;
  max-width: 140px;
}
.order-search-results:empty {
  display: none;
}
.order-search-results {
  margin-top: 10px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e2e6e3;
  border-radius: 8px;
}
.order-search-results button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 14px;
  background: white;
  border: 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.order-search-results button:hover {
  background: #f4f7f4;
}
.order-search-results button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.order-search-results small {
  display: block;
  color: #747e76;
  margin-top: 6px;
}
.order-grand-total {
  font-size: 18px;
  padding-top: 18px;
  border-top: 1px solid #eee;
}
.order-delivery-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.order-delivery-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #345b42;
}
.order-delivery-choice:has(input:checked) {
  border-color: #345b42;
  background: #f4f8f4;
}
.order-entry-form [data-entry-error]:not(:empty) {
  padding: 14px 18px;
  border: 1px solid #f2c0c0;
  border-radius: 8px;
  background: #fff3f3;
  color: #a62525;
  margin-bottom: 18px;
}
@media (max-width: 1200px) {
  .workspace-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .order-entry-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .order-finance-cards { grid-template-columns:1fr;gap:10px; }
  .order-finance-card { padding:18px; }
  .order-finance-card strong { font-size:26px; }
  .workspace-filters {
    padding: 18px;
    gap: 18px;
  }
  .workspace-filter-grid,
  .order-entry-grid .workspace-filter-grid {
    grid-template-columns: 1fr;
  }
  .order-status-options {
    gap: 8px;
  }
  .order-status-choice {
    padding: 8px;
  }
  .order-entry-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .order-entry-toolbar .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .order-saved-views {
    padding: 0 18px 18px;
  }
  .local-review-banner {
    font-size: 12px;
    gap: 7px;
  }
  .order-entry-grid {
    gap: 18px;
  }
}
.production-link-list{display:grid;gap:16px}.production-link-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,1fr);gap:24px}.production-link-suggestions{display:flex;flex-wrap:wrap;gap:8px}.production-link-suggestions button{white-space:normal;text-align:left}.production-link-suggestions small{display:block;font-weight:400}.inventory-factory-progress{max-width:360px;margin-top:8px}.inventory-factory-progress small,.catalog-factory-progress{display:block}.catalog-factory-progress .factory-line{margin:4px 0}.catalog-factory-progress .factory-stages{display:flex;flex-wrap:wrap;gap:3px}.catalog-factory-progress{font-size:11px;line-height:1.4}.catalog-picker-row:has(.catalog-factory-progress){align-items:start}.production-link-row .order-choice input{min-width:0}.production-link-row form{min-width:0}.production-link-row form.stack{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end}.production-link-row form>label:has([name=sku]),.production-link-suggestions,.production-link-row [data-link-result]{grid-column:1/-1}.production-link-suggestions:empty,.production-link-row [data-link-result]:empty{display:none}.production-link-row .order-choice{gap:5px;margin:0}@media(max-width:720px){.production-link-row{grid-template-columns:1fr;gap:16px}.production-link-row input{width:100%}.production-link-suggestions button{max-width:100%}}

.catalog-picker-count{border-bottom:1px solid #e4e9e6;background:#f8faf9}.order-search-results .catalog-picker-more{display:block;width:100%;padding:12px 8px;border:0;border-radius:0;background:#f2f5f3;text-align:center;font-size:12px;cursor:pointer}.order-search-results .catalog-picker-more:hover,.order-search-results .catalog-picker-more[aria-selected=true]{background:#e2eee5}
.order-workflow-summary{margin:12px 0;padding:12px 16px;border:1px solid #dfe6e1;border-radius:12px;background:#fff}.order-workflow-summary .action-row:empty{display:none}.order-return-cases .return-case{padding:12px 0;border-bottom:1px solid #e3e7e4}.order-return-cases .return-case:last-child{border:0}.order-return-cases p{margin:6px 0}.order-audit-details{margin-top:6px;font-size:12px}.order-audit-details pre{max-height:280px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.order-activity-detail{overflow-wrap:anywhere}[data-workflow-form] label:not(.check){display:grid;gap:5px;margin:10px 0}[data-workflow-form] .fields{align-items:end}[data-workflow-form] select,[data-workflow-form] input,[data-workflow-form] textarea{max-width:100%;min-width:0}[data-workflow-form] .fields>*{min-width:0}.order-workflow-summary p{margin:8px 0}

/* Compact customer selection on the order form. */
.order-entry-form>.order-entry-grid{grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);align-items:start}
.order-entry-form .entry-additional .workspace-filter-grid{grid-template-columns:1fr;gap:10px}
.entry-additional .workspace-filter-grid>label{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center}
.entry-additional details{grid-column:1/-1;font-size:12px}.entry-additional details[open]{display:grid;gap:10px}.entry-additional details>label{margin-top:10px}
.customer-search-anchor{position:relative}.customer-search-popup{position:absolute;top:100%;left:0;right:0;z-index:25;margin-top:4px;box-shadow:0 6px 22px #0002;max-height:300px;background:white}
.customer-search-popup button{display:block}.customer-search-popup button[aria-selected=true]{background:#edf5ee}.customer-search-popup small{display:block}
.customer-search-popup .customer-add{font-weight:600;color:#1f5b3b;background:#f7faf8}.customer-search-popup [hidden]{display:none}
.order-customer-empty{display:grid;justify-items:center;gap:10px;padding:22px 12px;color:#788079;text-align:center}.order-customer-empty p{margin:0}
.order-customer-selected{display:flex;justify-content:space-between;gap:16px;padding:16px 0 0;min-height:90px}.order-customer-selected p{margin:6px 0;overflow-wrap:anywhere}.order-customer-selected .action-row{align-self:start;flex-wrap:nowrap}
.order-customer-dialog{width:min(760px,calc(100vw - 40px));max-height:calc(100dvh - 48px);padding:0;border:1px solid #dfe4df;border-radius:16px;background:#fff;color:#151515;box-shadow:0 20px 70px #0004;overflow:auto}
.order-customer-dialog::backdrop{background:#0006}.order-customer-dialog .customer-dialog-head{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid #e5e8e5}.customer-dialog-head h2{margin:0;font:600 22px Arial,sans-serif}
.customer-dialog-body{padding:20px 24px}.customer-dialog-footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:12px;background:#fff;padding:16px 24px;border-top:1px solid #e5e8e5}
.customer-dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.customer-dialog-body details{margin-top:18px}.customer-dialog-body summary{cursor:pointer;font-size:13px}.customer-dialog-body .order-choice{font-size:13px}.customer-dialog-body details>.customer-dialog-grid{margin-top:14px}.customer-dialog-body .form-error:empty{display:none}
.order-entry-form .panel-head{flex-wrap:wrap}.order-entry-form .panel-head .order-zero-confirm,.order-edit-form .panel-head .order-zero-confirm{margin:0;font-size:12px}
@media(max-width:1100px){.order-entry-form>.order-entry-grid{grid-template-columns:1fr}.order-entry-form .entry-additional .workspace-filter-grid{grid-template-columns:1fr 1fr}.entry-additional .workspace-filter-grid>label{grid-template-columns:1fr}}
@media(max-width:600px){.customer-dialog-grid,.order-entry-form .entry-additional .workspace-filter-grid{grid-template-columns:1fr}.order-customer-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.order-customer-dialog .customer-dialog-head,.customer-dialog-body{padding:16px}.customer-dialog-footer{padding:12px 16px}.order-customer-selected{flex-wrap:wrap}}
.admin-content .order-entry-form .order-entry-product-filters{grid-template-columns:minmax(0,1fr) minmax(100px,180px)}
.admin-content .order-entry-form .catalog-search-anchor{max-width:none}
@media(max-width:600px){.admin-content .order-entry-form .order-entry-product-filters{grid-template-columns:1fr}}

/* V1.4A: one compact entry header, explicit payment, separate handoff. */
.order-entry-heading{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin:0 0 10px}
.order-entry-heading h1{font-size:24px;line-height:1.2;margin:0}.order-entry-heading p{font-size:11px;color:#748178;margin:0}
.admin:has(#order-entry-app) .admin-topbar{min-height:52px;padding-block:8px}
.order-entry-form .order-entry-toolbar{margin:0 0 12px;gap:10px}.order-entry-toolbar .btn{min-height:34px;padding:7px 12px;font-size:12px}
.order-entry-form .panel-head{padding:12px 16px}.order-entry-form .panel-head h3{font-size:20px}.order-entry-form .panel-body{padding:14px 16px}
.order-entry-form>.order-entry-grid{gap:16px}.order-entry-form .order-customer-empty{padding:12px 0}.order-entry-form .order-customer-selected{min-height:0;padding-top:10px}
.order-entry-form .order-customer-selected strong{font-size:14px}.order-entry-form .order-choice{font-size:12px;gap:5px}.order-entry-form .order-choice input,.order-entry-form .order-choice select{padding:8px 10px;min-height:36px}
.entry-checkout-options{display:grid;gap:12px;margin-top:12px}.entry-delivery-method{border-top:1px solid #e1e5e2;padding-top:12px}.entry-delivery-method .panel-head,.entry-delivery-method .panel-body{padding:0;border:0}.entry-delivery-method .panel-head h3{font-family:inherit;font-weight:600;font-size:12px;margin:0 0 10px}
.entry-delivery-method .action-row{display:grid;grid-template-columns:1fr;gap:6px}.entry-delivery-method .order-delivery-choice{padding:9px 10px;min-height:38px;font-size:12px;border-radius:8px}.entry-delivery-method .order-delivery-choice input{margin-right:6px}
.entry-checkout-button{width:100%}.entry-checkout-options>p{margin:0}.entry-delivery-method .packing-group{margin-top:12px}.entry-delivery-method .packing-group label{font-size:11px}
.order-primary-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.order-primary-actions .btn{font-size:12px;min-height:39px;padding:8px;white-space:normal}
.order-finance-card:has(.order-primary-actions){justify-content:flex-start}.order-finance-card:has(.order-primary-actions)>strong{font-size:26px}
.order-entry-form .order-grand-total{padding-block:12px;margin-top:8px}.order-entry-form .order-grand-total strong{font-size:18px}
.order-entry-form .ad-hoc-toolbar{margin-top:8px}.order-entry-form [data-entry-stock-note]{font-size:10px;margin-top:7px}
@media(max-width:600px){.order-entry-heading{gap:5px}.order-entry-heading h1{font-size:22px}.order-entry-heading p{width:100%;font-size:10px}.order-entry-form .order-entry-toolbar{flex-direction:row;justify-content:space-between}.order-entry-form .order-entry-toolbar .action-row{display:flex}.order-entry-form>.order-entry-grid{gap:12px}.order-entry-form .entry-additional .workspace-filter-grid{grid-template-columns:1fr 1fr;gap:8px}.order-entry-form .entry-additional .order-choice{grid-template-columns:1fr}.order-entry-form .panel-head h3{font-size:18px}.order-primary-actions .btn{font-size:11px}}

.entry-additional>summary{cursor:pointer;list-style:none}.entry-additional>summary::after{content:"⌄";margin-left:auto}.entry-additional>summary>span{font-size:10px}.entry-additional:not([open])>summary{border-bottom:0}
@media(max-width:600px){.order-entry-form .order-customer-empty{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;padding:10px 0}.order-entry-form .order-customer-empty>span{max-width:60%;font-size:10px}.order-entry-form .order-customer-empty>button{font-size:10px}.order-entry-form .entry-additional>summary{padding-block:10px}.order-entry-form .entry-additional>summary h3{font-size:16px}.order-entry-form .entry-additional>summary span{font-size:9px}.admin:has(#order-entry-app) .sidebar{padding-block:10px}.admin:has(#order-entry-app) .sidebar .brand img{max-width:110px;height:auto}.admin:has(#order-entry-app) .admin-content{padding-top:12px}.admin:has(#order-entry-app) .admin-topbar{padding-block:7px}}
