/* TAir Minimalist Workshop Order Console — Pure White Default + Supplier RBAC + 1:1 Cut Lines (v9.3) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: #0b0f17;
  color: #e2e8f0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.admin-topbar {
  background: #111827;
  border-bottom: 1px solid #1f2937;
  padding: 8px 16px;
  flex-shrink: 0;
}

.admin-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0d9488 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19.5px;
}

.admin-brand h1 {
  margin: 0;
  font-size: 17.5px;
  font-weight: 900;
  color: #f8fafc;
}

.admin-top-stats {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 4px;
}

.stat-chip {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 14px;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stat-chip.pending strong {
  color: #fbbf24;
  font-size: 14.5px;
}

.stat-chip.done strong {
  color: #34d399;
  font-size: 14.5px;
}

/* Supplier RBAC Role Switcher Cluster */
.rbac-bar-cluster {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #0b111e;
  border: 1px solid #29384e;
  border-radius: 9px;
  padding: 4px 8px;
}

.rbac-role-label {
  font-size: 14px;
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
}

.rbac-role-select {
  background: #162032;
  color: #f8fafc;
  border: 1px solid #38bdf8;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 800;
  outline: none;
  cursor: pointer;
  max-width: 240px;
}

.rbac-scope-pill {
  font-size: 14px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.rbac-scope-pill.is-admin {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
}

.rbac-scope-pill.is-supplier {
  background: rgba(250, 204, 21, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.5);
  color: #fde047;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.adm-btn {
  border: 1px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.adm-btn:hover {
  border-color: #64748b;
  background: #273549;
}

.adm-btn.rbac-btn {
  background: #1e1b4b;
  border-color: #818cf8;
  color: #e0e7ff;
}

.adm-btn.rbac-btn:hover {
  background: #312e81;
  color: #ffffff;
}

.adm-btn.primary-teal {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  border-color: #14b8a6;
  color: #ffffff;
}

.adm-btn.accent-blue {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.adm-btn.artwork-dl-btn {
  background: #1e293b;
  border-color: #60a5fa;
  color: #93c5fd;
  padding: 7px 14px;
  font-size: 14.5px;
}

.adm-btn.artwork-dl-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.adm-btn.export-hero-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  border: 1px solid #38bdf8;
  color: #ffffff;
  padding: 7px 16px;
  font-size: 14.5px;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.adm-btn.export-hero-btn:hover {
  filter: brightness(1.08);
}

/* Collapsible Importer Drawer */
.importer-drawer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1f2937;
  display: flex;
  gap: 8px;
  align-items: center;
}

#pasteOrderInput {
  flex: 1;
  background: #090d16;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 7px 10px;
  font-family: Consolas, monospace;
  font-size: 14px;
}

#pasteOrderNote {
  width: 200px;
  background: #090d16;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 14px;
}

/* Main Split Workspace */
.admin-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 356px minmax(0, 1fr);
  min-height: 0;
}

/* Left Visual Order Queue */
.order-queue-panel {
  background: #0f172a;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.queue-filter-bar {
  padding: 9px 10px 8px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.queue-search-row {
  position: relative;
  display: flex;
  align-items: center;
}

.queue-search {
  width: 100%;
  background: #090d16;
  border: 1.5px solid #334155;
  color: #f8fafc;
  border-radius: 7px;
  padding: 6px 28px 6px 10px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.15s ease;
}

.queue-search:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.search-clear-btn {
  position: absolute;
  right: 6px;
  background: #1e293b;
  border: none;
  color: #cbd5e1;
  border-radius: 999px;
  width: 18px;
  height: 18px;
  font-size: 14.5px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  background: #334155;
  color: #ffffff;
}

.queue-sub-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 3px;
}

.ftab {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ftab.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

.model-quick-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.mchip {
  background: #162032;
  border: 1px solid #29384e;
  color: #cbd5e1;
  border-radius: 5px;
  padding: 2px 6px;
  font-family: Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.mchip:hover {
  border-color: #475569;
  color: #ffffff;
}

.mchip.active {
  background: rgba(250, 204, 21, 0.18);
  border-color: #facc15;
  color: #fde047;
}

.order-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.empty-queue-tip {
  padding: 28px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 14.5px;
  line-height: 1.5;
}

.order-card {
  background: #162032;
  border: 1.5px solid #263449;
  border-radius: 11px;
  padding: 9px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.order-card:hover {
  border-color: #475569;
  background: #1a273d;
}

.order-card.active {
  border-color: #38bdf8;
  background: #172a45;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 6px 16px rgba(0, 0, 0, 0.35);
}

.oc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.oc-id {
  font-family: Consolas, monospace;
  font-size: 14px;
  font-weight: 900;
  color: #fde047;
  background: #0b101b;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 5px;
  padding: 1px 7px;
  cursor: pointer;
  letter-spacing: 0.3px;
}

.oc-id:hover {
  border-color: #facc15;
  background: #172133;
}

.oc-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.oc-status {
  font-size: 13px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.oc-status.pending {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.oc-status.exported {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.oc-pay-pill {
  font-size: 13px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
}

.oc-pay-pill.paid {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.38);
}

.oc-pay-pill.unpaid {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.adm-btn, .mini-pill, .oc-id, .aob-id, .oc-dxf-btn, .lpd-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.f3k-ico {
  flex-shrink: 0;
  vertical-align: -2px;
}

.customer-shipping-strip {
  background: #121c2d;
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 9px;
  padding: 7px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #cbd5e1;
  flex-shrink: 0;
}

.css-left {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
}

.css-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.css-fx-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
}

.oc-del-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 16.5px;
  font-weight: 900;
  cursor: pointer;
  padding: 0 3px;
  line-height: 1;
}

.oc-del-btn:hover {
  color: #f87171;
}

/* Pure White Default Thumbnail Stage */
.oc-thumb-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  margin-bottom: 7px;
  background: #ffffff;
  line-height: 0;
}

.oc-thumb-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.oc-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.oc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.oc-model {
  font-size: 15.5px;
  font-weight: 900;
  color: #f8fafc;
}

.oc-hand {
  font-size: 13px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #94a3b8;
}

.oc-hand.lh-warn {
  background: rgba(250, 204, 21, 0.18);
  border-color: #facc15;
  color: #fef08a;
}

.oc-dxf-btn {
  border: 1px solid #14b8a6;
  background: rgba(13, 148, 136, 0.22);
  color: #5eead4;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.oc-dxf-btn:hover {
  background: #0d9488;
  color: #ffffff;
}

.oc-note {
  margin-top: 6px;
  font-size: 14px;
  color: #fbbf24;
  line-height: 1.35;
}

/* Right Visual Dual-Stage Workstation */
.visual-workstation {
  display: flex;
  flex-direction: column;
  background: #0d121c;
  min-height: 0;
  padding: 10px 14px 12px;
  gap: 10px;
}

.active-order-bar {
  background: #151e2e;
  border: 1px solid #263449;
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.aob-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  min-width: 0;
}

.aob-model {
  font-size: 19.5px;
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
}

.aob-id {
  font-family: Consolas, monospace;
  font-size: 16px;
  font-weight: 900;
  color: #fde047;
  background: #0b101b;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  cursor: pointer;
  white-space: nowrap;
}

.aob-id:hover {
  border-color: #facc15;
  background: #17253b;
}

.aob-hand {
  font-size: 14.5px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 7px;
  white-space: nowrap;
}

.aob-hand.is-rh {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

.aob-hand.is-lh {
  background: rgba(250, 204, 21, 0.22);
  border: 1.5px solid #facc15;
  color: #fef08a;
}

.aob-note {
  font-size: 14.5px;
  font-weight: 800;
  color: #fbbf24;
}

.aob-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Dual Stacked Visual Panels */
.dual-stage-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: 1.12fr 0.88fr;
  gap: 10px;
}

.stage-panel {
  background: #131b29;
  border: 1px solid #263449;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel-bar {
  padding: 6px 12px;
  background: #172133;
  border-bottom: 1px solid #243247;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: #f1f5f9;
}

.step-badge {
  font-size: 14px;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 6px;
}

.step-badge.gold {
  background: rgba(250, 204, 21, 0.18);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.45);
}

.step-badge.cyan {
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.4);
}

.mirror-tag {
  font-size: 14px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 6px;
}

.mirror-tag.is-inmold {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.mirror-tag.is-warn {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid #ef4444;
}

.scene-switch,
.cad-mini-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-pill {
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.mini-pill:hover {
  border-color: #64748b;
  color: #ffffff;
}

.mini-pill.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

/* Stage 1: Full-Color Real Order Artwork Container — Pure White Default (#ffffff) */
.artwork-svg-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: #ffffff;
}

.artwork-svg-stage.scene-grass {
  background: #0e1420;
}

.artwork-svg-stage svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Stage 2: Clean 1:1 Cut Canvas Container */
.cad-viewport-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  cursor: grab;
  background: #131720;
}

.cad-viewport-wrap.dragging {
  cursor: grabbing;
}

#cadCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Supplier RBAC Permission Modal */
.rbac-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.78);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 20px;
}

.rbac-modal-backdrop.open {
  display: flex;
}

.rbac-modal-panel {
  width: min(920px, 96vw);
  max-height: 88vh;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rbac-modal-head {
  padding: 14px 18px;
  background: #162032;
  border-bottom: 1px solid #263449;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rbac-modal-head h3 {
  margin: 0;
  font-size: 17.5px;
  font-weight: 900;
  color: #f8fafc;
}

.rbac-close-btn {
  background: #1e293b;
  border: 1px solid #475569;
  color: #e2e8f0;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 19.5px;
  line-height: 1;
  cursor: pointer;
}

.rbac-modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rbac-intro-note {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14px;
  color: #bae6fd;
  line-height: 1.45;
}

.rbac-supplier-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rbac-supplier-card {
  background: #162032;
  border: 1px solid #29384e;
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rbac-supplier-card.is-current-actor {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35);
}

.rbac-sup-top {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1.2fr auto;
  gap: 8px;
  align-items: center;
}

.rbac-input {
  background: #090d16;
  border: 1px solid #334155;
  color: #f8fafc;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
}

.rbac-sup-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rbac-mini-btn {
  background: #1e293b;
  border: 1px solid #475569;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.rbac-mini-btn.preview {
  background: rgba(2, 132, 199, 0.24);
  border-color: #38bdf8;
  color: #7dd3fc;
}

.rbac-mini-btn.danger {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

.rbac-model-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rbac-mcheck-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0b111e;
  border: 1px solid #29384e;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.rbac-mcheck-label.checked {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10b981;
  color: #ecfdf5;
}

.rbac-modal-foot {
  padding: 12px 18px;
  background: #162032;
  border-top: 1px solid #263449;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #f8fafc;
  border: 1.5px solid #38bdf8;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 120;
}

.admin-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  body {
    height: auto;
    overflow: auto;
  }
  .admin-workspace {
    grid-template-columns: 1fr;
  }
  .dual-stage-grid {
    grid-template-rows: 420px 360px;
  }
  .rbac-sup-top {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   v9.5: Linked Parts & Servo Sub-Order (#ORDER-ACC) Badges & Collapsible Drawer
   ========================================================================== */
.oc-linked-pill {
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.38);
  color: #5eead4;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.oc-linked-pill:hover {
  background: rgba(20, 184, 166, 0.26);
  border-color: #2dd4bf;
  color: #ffffff;
}

.adm-btn.linked-parts-btn {
  background: rgba(20, 184, 166, 0.18);
  border: 1.5px solid #14b8a6;
  color: #5eead4;
  font-weight: 900;
}

.adm-btn.linked-parts-btn:hover,
.adm-btn.linked-parts-btn.active {
  background: #0d9488;
  border-color: #2dd4bf;
  color: #ffffff;
}

.linked-parts-drawer {
  background: #132030;
  border: 1.5px solid #14b8a6;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.lpd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(45, 212, 191, 0.25);
}

.lpd-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lpd-id-badge {
  font-family: Consolas, monospace;
  font-size: 14.5px;
  font-weight: 900;
  color: #042f2e;
  background: #5eead4;
  padding: 2px 9px;
  border-radius: 6px;
}

.lpd-split-summary {
  font-size: 14px;
  font-weight: 800;
  color: #cbd5e1;
}

.lpd-split-summary strong {
  color: #fde047;
}

.lpd-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.lp-sku-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.lp-sku-table th {
  text-align: left;
  padding: 5px 8px;
  color: #94a3b8;
  font-weight: 800;
  border-bottom: 1px solid #263449;
  font-size: 14px;
}

.lp-sku-table td {
  padding: 6px 8px;
  color: #f1f5f9;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.18);
  vertical-align: middle;
}

.lp-sku-table tr:last-child td {
  border-bottom: none;
}

.lp-sku-code {
  font-family: Consolas, monospace;
  font-size: 14px;
  font-weight: 900;
  color: #67e8f9;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

.lp-usage-tag {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 700;
}

/* === v12.1 Dimmed-Light Workshop Mode === */
body.theme-light-dim {
  background: #cfd8e4;
  color: #16202e;
}
body.theme-light-dim .admin-topbar {
  background: #233041;
  border-bottom-color: #33455c;
}
body.theme-light-dim .order-queue-panel {
  background: #dde5f0;
  border-right-color: #b7c6db;
}
body.theme-light-dim .queue-filter-bar {
  background: #d4deec;
  border-bottom-color: #b7c6db;
}
body.theme-light-dim .queue-search {
  background: #eaf0f7;
  border-color: #b2c2d8;
  color: #16202e;
}
body.theme-light-dim .order-card {
  background: #e9eff7;
  border-color: #bdcce0;
  color: #16202e;
}
body.theme-light-dim .order-card.active {
  background: #dce7f7;
  border-color: #2563eb;
}
body.theme-light-dim .visual-workstation {
  background: #d4dde8;
}
body.theme-light-dim .active-order-bar,
body.theme-light-dim .customer-shipping-strip,
body.theme-light-dim .stage-panel {
  background: #e5ecf4;
  border-color: #b8c7da;
  color: #16202e;
}
body.theme-light-dim .panel-bar {
  background: #dae3ef;
  border-bottom-color: #b8c7da;
  color: #16202e;
}
body.theme-light-dim .panel-title strong {
  color: #16202e;
}

/* ==========================================================================
   v12.4 FAIL-CLOSED ADMIN AUTHENTICATION GATE (#adminAuthGate)
   Prevents ANY order list, customer PII, or 1:1 DWG toolpath from rendering
   unless authenticated as WordPress Administrator or Authorized Supplier!
   ========================================================================== */
body:not(.admin-auth-unlocked) .admin-topbar,
body:not(.admin-auth-unlocked) .admin-workspace,
body:not(.admin-auth-unlocked) #rbacModal {
  display: none !important;
}

body.admin-auth-unlocked #adminAuthGate {
  display: none !important;
}

.admin-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 20%, #172033 0%, #090d16 70%);
  color: #f8fafc;
  overflow-y: auto;
}

.auth-gate-card {
  width: 100%;
  max-width: 480px;
  background: #111827;
  border: 1.5px dashed rgba(245, 158, 11, 0.72);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.auth-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
}

.auth-gate-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  color: #f8fafc;
}

.auth-gate-desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #94a3b8;
}

.auth-gate-alert {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 14px;
}

.auth-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-gate-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.auth-gate-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid #334155;
  background: #0b111e;
  color: #f8fafc;
  font-size: 14px;
  outline: none;
}
.auth-gate-input:focus {
  border-color: #f59e0b;
}

.auth-gate-submit {
  margin-top: 4px;
  padding: 11px 16px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #111827;
  font-size: 14.5px;
  font-weight: 900;
  cursor: pointer;
}
.auth-gate-submit:hover {
  filter: brightness(1.06);
}

.auth-gate-local-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px dashed rgba(245, 158, 11, 0.55);
  background: repeating-linear-gradient(
    -45deg,
    rgba(245, 158, 11, 0.08) 0px,
    rgba(245, 158, 11, 0.08) 6px,
    rgba(15, 23, 42, 0.65) 6px,
    rgba(15, 23, 42, 0.65) 12px
  );
}

.auth-gate-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-gate-link {
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.auth-gate-link:hover {
  text-decoration: underline;
}

.adm-local-sim-btn {
  border: 1.5px dashed #f59e0b !important;
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fde68a !important;
  font-weight: 800 !important;
}

/* ==========================================================================
   v13.4 ORDER REVIEW GATE, INDEPENDENT `已排产未付款` BADGES & EXTERNAL PAYMENT MODAL
   ========================================================================== */
body:not(.admin-auth-unlocked) #externalPayModal {
  display: none !important;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ftab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  padding: 3px 7px;
}

.ftab-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 900;
}

.ftab-cnt.warn {
  background: rgba(168, 85, 247, 0.32);
  color: #f3e8ff;
}

.ftab-cnt.orange {
  background: rgba(249, 115, 22, 0.36);
  color: #ffedd5;
}

.ftab.is-review-tab.has-items {
  border-color: rgba(192, 132, 252, 0.55);
  color: #e9d5ff;
}
.ftab.is-review-tab.active {
  background: rgba(147, 51, 234, 0.28);
  border-color: #c084fc;
  color: #faf5ff;
}

.ftab.is-sched-unpaid-tab.has-items {
  border-color: rgba(249, 115, 22, 0.58);
  color: #fed7aa;
}
.ftab.is-sched-unpaid-tab.active {
  background: rgba(234, 88, 12, 0.30);
  border-color: #fb923c;
  color: #fff7ed;
}

.stat-chip.clickable-stat {
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.stat-chip.clickable-stat:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.stat-chip.is-review-alert {
  background: rgba(147, 51, 234, 0.22);
  border: 1.5px dashed #c084fc;
  color: #f3e8ff;
  font-weight: 800;
}
.stat-chip.is-review-alert strong {
  color: #fde047;
  font-size: 15px;
}
.stat-chip.is-sched-unpaid-stat {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.28) 0%, rgba(217, 119, 6, 0.24) 100%);
  border: 1.5px solid #fb923c;
  color: #ffedd5;
  font-weight: 900;
}
.stat-chip.is-sched-unpaid-stat strong {
  color: #fde047;
  font-size: 15px;
}

/* Unified High-Contrast Independent Lifecycle Badges */
.f3k-lc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.35;
  white-space: nowrap;
}

.f3k-lc-badge.lg {
  font-size: 13.5px;
  padding: 4px 11px;
}

/* Independent Badge #1: 待管理审核 */
.f3k-lc-badge.is-pending-review {
  background: rgba(147, 51, 234, 0.24);
  border: 1.5px dashed #c084fc;
  color: #f3e8ff;
}

/* Independent Badge #2 (CORE REQUIREMENT): 已排产未付款 */
.f3k-lc-badge.is-scheduled-unpaid {
  background: linear-gradient(135deg, #c2410c 0%, #d97706 100%);
  border: 1.5px solid #fdba74;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.42);
}

/* Independent Badge #3: 已在外部平台 xx 付款 */
.f3k-lc-badge.is-paid-external {
  background: rgba(13, 148, 136, 0.26);
  border: 1.5px solid #2dd4bf;
  color: #99f6e4;
}

/* Independent Badge #4: 已在线付款 */
.f3k-lc-badge.is-paid-online {
  background: rgba(16, 185, 129, 0.20);
  border: 1.5px solid rgba(52, 211, 153, 0.52);
  color: #6ee7b7;
}

/* Independent Badge #5: 审核未通过 */
.f3k-lc-badge.is-rejected {
  background: rgba(220, 38, 38, 0.22);
  border: 1.5px solid #f87171;
  color: #fecaca;
}

/* Left Order Queue Card State Highlights & Independent Bottom Strip */
.order-card.state-pending-review {
  border-left: 4px solid #c084fc;
  background: linear-gradient(90deg, rgba(147, 51, 234, 0.11) 0%, #162032 38%);
}

.order-card.state-scheduled-unpaid {
  border-left: 4px solid #fb923c;
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.14) 0%, #162032 42%);
}

.order-card.state-paid-external {
  border-left: 4px solid #2dd4bf;
}

.oc-lifecycle-banner {
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.oc-lifecycle-banner.is-scheduled-unpaid {
  background: rgba(234, 88, 12, 0.20);
  border: 1px solid rgba(251, 146, 60, 0.55);
  color: #ffedd5;
}

.oc-lifecycle-banner.is-pending-review {
  background: rgba(147, 51, 234, 0.18);
  border: 1px dashed rgba(192, 132, 252, 0.55);
  color: #f3e8ff;
}

.oc-lifecycle-banner.is-paid-external {
  background: rgba(13, 148, 136, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.45);
  color: #ccfbf1;
}

.oc-approve-quick-btn {
  border: 1.5px solid #4ade80;
  background: linear-gradient(135deg, #15803d 0%, #0d9488 100%);
  color: #ffffff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.oc-approve-quick-btn:hover {
  filter: brightness(1.1);
}

.oc-extpay-quick-link {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde047;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.oc-extpay-quick-link:hover {
  background: #f59e0b;
  color: #0f172a;
}

/* Workstation Settlement & Review Control Bar */
.customer-shipping-strip {
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 8px 13px;
}

.css-row-main,
.css-row-settlement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  flex-wrap: wrap;
}

.css-row-settlement {
  padding-top: 7px;
  border-top: 1px dashed rgba(148, 163, 184, 0.24);
}

.css-row-settlement.no-top-border {
  padding-top: 0;
  border-top: none;
}

.css-settlement-status {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  font-weight: 800;
}

.css-settlement-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.adm-btn.approve-hero-btn {
  background: linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
  border-color: #4ade80;
  color: #ffffff;
  padding: 5px 12px;
  font-size: 13.5px;
  box-shadow: 0 3px 12px rgba(22, 163, 74, 0.35);
}

.adm-btn.extpay-btn {
  background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
  border-color: #fdba74;
  color: #ffffff;
  padding: 5px 12px;
  font-size: 13.5px;
}

.adm-btn.extpay-edit-btn {
  background: rgba(13, 148, 136, 0.22);
  border-color: #2dd4bf;
  color: #99f6e4;
  padding: 5px 11px;
  font-size: 13px;
}

.adm-btn.is-blocked-dwg {
  opacity: 0.52;
  border-style: dashed;
}

/* External Platform Payment Modal */
.extpay-modal-panel {
  width: min(640px, 95vw);
}

.extpay-order-digest {
  background: #162032;
  border: 1px solid #29384e;
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 14px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.extpay-field-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.extpay-label {
  font-size: 13.5px;
  font-weight: 800;
  color: #cbd5e1;
}

.extpay-req {
  color: #fb923c;
  font-size: 12.5px;
}

.extpay-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ext-plat-chip {
  background: #162032;
  border: 1px solid #334155;
  color: #cbd5e1;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}

.ext-plat-chip:hover,
.ext-plat-chip.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
}

.extpay-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.extpay-input-lg {
  padding: 8px 11px;
  font-size: 14.5px;
}

.extpay-form-err {
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fecaca;
  font-size: 13.5px;
  font-weight: 700;
}

.extpay-revert-btn {
  background: rgba(234, 88, 12, 0.18);
  border-color: #fb923c;
  color: #fed7aa;
}

@media (max-width: 640px) {
  .extpay-two-col {
    grid-template-columns: 1fr;
  }
}

/* Dimmed-Light Mode Contrast Overrides for v13.4 Badges */
body.theme-light-dim .f3k-lc-badge.is-pending-review {
  background: #f3e8ff;
  border-color: #9333ea;
  color: #6b21a8;
}
body.theme-light-dim .f3k-lc-badge.is-paid-external {
  background: #ccfbf1;
  border-color: #0d9488;
  color: #115e59;
}
body.theme-light-dim .f3k-lc-badge.is-paid-online {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}
body.theme-light-dim .oc-lifecycle-banner.is-scheduled-unpaid {
  background: #ffedd5;
  border-color: #ea580c;
  color: #9a3412;
}
body.theme-light-dim .oc-lifecycle-banner.is-pending-review {
  background: #f3e8ff;
  border-color: #9333ea;
  color: #6b21a8;
}
body.theme-light-dim .oc-lifecycle-banner.is-paid-external {
  background: #ccfbf1;
  border-color: #0d9488;
  color: #115e59;
}
body.theme-light-dim .order-card.state-pending-review {
  background: #f5f0ff;
}
body.theme-light-dim .order-card.state-scheduled-unpaid {
  background: #fff7ed;
}

/* v13.6.3 WeChat Scan / 1-Click Login CTA on Order Console Gate */
.auth-wx-login-btn {
  width: 100%;
  height: 45px;
  border: 1px solid #34d399;
  border-radius: 10px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
  transition: filter 0.15s, transform 0.12s;
}
.auth-wx-login-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.auth-gg-login-btn {
  width: 100%;
  height: 41px;
  margin-top: 8px;
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-radius: 10px;
  background: rgba(30, 58, 138, 0.32);
  color: #e0f2fe;
  font-size: 13.8px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.auth-gg-login-btn:hover {
  background: rgba(37, 99, 235, 0.42);
  border-color: #60a5fa;
  transform: translateY(-1px);
}
.auth-gate-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 13px 0 11px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.auth-gate-divider::before,
.auth-gate-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #243552;
}
