﻿:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --ink: #18202f;
  --muted: #667085;
  --line: #d8dee8;
  --soft: #f7f9fc;
  --nav: #111827;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-muted: #f4f8fb;
  --focus: rgba(23, 107, 135, 0.18);
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 10px 24px rgba(24, 32, 47, 0.06);
  --shadow-md: 0 18px 44px rgba(24, 32, 47, 0.09);
  --accent: #176b87;
  --accent-dark: #0f4c5c;
  --green: #2f9e44;
  --green-soft: #e7f6ec;
  --amber: #b7791f;
  --amber-soft: #fff4d6;
  --red: #c92a2a;
  --red-soft: #ffe3e3;
}

.theme-toggle-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.workbench-subtab {
  display: none;
}

body.jonathan-workspace .theme-toggle-button {
  border-color: rgba(255, 255, 255, 0.09);
  background: #101720;
  color: #dce4ef;
}

body.jonathan-workspace .top-alerts {
  display: none !important;
}

body.jonathan-workspace .today-workspace-panel {
  grid-template-columns: minmax(0, 1fr);
}

body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(260px, 0.56fr) minmax(460px, 1fr);
}

body.jonathan-workspace .workspace-kpi-grid {
  grid-template-columns: repeat(4, minmax(128px, 1fr));
}

body.jonathan-workspace .workspace-kpi-card {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

body.jonathan-workspace .workspace-kpi-card:hover,
body.jonathan-workspace .workspace-kpi-card.active {
  border-color: rgba(103, 212, 232, 0.46);
  background: #111923;
}

body.jonathan-workspace .backend-main-column {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

body.jonathan-workspace .backend-workbench-switch {
  position: sticky;
  top: 14px;
  grid-column: 1;
  grid-row: 1 / span 4;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 6px;
  padding: 8px;
}

body.jonathan-workspace .workbench-tab,
body.jonathan-workspace .workbench-subtab {
  min-height: 46px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #dce4ef;
  text-align: left;
  cursor: pointer;
}

body.jonathan-workspace .workbench-subtab {
  display: grid;
  margin-left: 22px;
  min-height: 36px;
  color: var(--jonathan-muted);
  font-size: 12px;
}

body.jonathan-workspace .workbench-subtab:hover {
  border-color: rgba(103, 212, 232, 0.25);
  background: #111923;
  color: #f7fbff;
}

body.jonathan-workspace .workbench-subtab svg {
  width: 15px;
  height: 15px;
  color: currentColor;
}

body.jonathan-workspace .workspace-analytics-panel {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.jonathan-workspace .workspace-analytics-panel[hidden] {
  display: none !important;
}

body.jonathan-workspace .workspace-chart-card {
  min-height: 120px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--jonathan-line);
  border-radius: 8px;
  background: var(--jonathan-surface);
}

body.jonathan-workspace .workspace-chart-card h3 {
  margin: 0 0 8px;
  color: #f7fbff;
  font-size: 15px;
}

body.jonathan-workspace .workspace-chart-card p {
  margin: 3px 0 0;
  color: var(--jonathan-muted);
  font-size: 12px;
  font-weight: 800;
}

body.jonathan-workspace .workspace-donut {
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: conic-gradient(var(--jonathan-accent) calc(var(--value) * 1%), rgba(148, 163, 184, 0.18) 0);
  position: relative;
}

body.jonathan-workspace .workspace-donut::after {
  content: "";
  width: 58px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--jonathan-surface);
  position: absolute;
}

body.jonathan-workspace .workspace-donut span {
  position: relative;
  z-index: 1;
  color: #f7fbff;
  font-size: 15px;
  font-weight: 900;
}

body.jonathan-workspace .backend-workbench,
body.jonathan-workspace .nodes-workbench,
body.jonathan-workspace .query-workbench,
body.jonathan-workspace .kingdee-sn-workbench {
  grid-column: 2;
  min-width: 0;
}

body.jonathan-workspace .query-report-grid {
  display: none;
}

body.jonathan-workspace .workspace-progress-track {
  display: none;
}

body.jonathan-workspace .progress-panel p {
  color: #f7fbff;
  font-size: 14px;
}

body.jonathan-workspace .workspace-activity-item {
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 46px;
}

body.jonathan-workspace .workspace-activity-item span {
  min-width: 0;
}

.task-pool-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.task-pool-tabs button {
  min-height: 70px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.task-pool-tabs button.active,
.task-pool-tabs button:hover {
  border-color: rgba(23, 107, 135, 0.38);
  background: rgba(23, 107, 135, 0.07);
}

.task-pool-tabs svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.task-pool-tabs span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-pool-tabs strong {
  color: var(--accent-dark);
  font-size: 24px;
}

.task-pool-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

body.jonathan-workspace .task-pool-tabs button {
  border-color: var(--jonathan-line);
  background: var(--jonathan-surface);
  color: #f7fbff;
}

body.jonathan-workspace .task-pool-tabs button.active,
body.jonathan-workspace .task-pool-tabs button:hover {
  border-color: rgba(103, 212, 232, 0.46);
  background: #111923;
}

body.jonathan-workspace .task-pool-tabs svg,
body.jonathan-workspace .task-pool-tabs strong {
  color: var(--jonathan-accent);
}

body.jonathan-workspace.jonathan-light {
  background: #f3f6fb;
  color: #132033;
  --jonathan-surface: #ffffff;
  --jonathan-surface-2: #f8fbff;
  --jonathan-surface-3: #edf4fb;
  --jonathan-line: #d8e2ee;
  --jonathan-muted: #5f6f84;
  --jonathan-accent: #176b87;
  --jonathan-accent-strong: #0f5b73;
  --jonathan-success: #238636;
  --jonathan-warning: #9a6700;
  --jonathan-danger: #c92a2a;
}

body.jonathan-workspace.jonathan-light .app-shell,
body.jonathan-workspace.jonathan-light .workspace {
  background: #f3f6fb;
}

body.jonathan-workspace.jonathan-light .sidebar {
  background: #ffffff;
  border-right-color: #dbe4ef;
  box-shadow: 16px 0 34px rgba(20, 39, 63, 0.06);
}

body.jonathan-workspace.jonathan-light .brand-mark {
  background: #176b87;
  color: #ffffff;
}

body.jonathan-workspace.jonathan-light .brand strong,
body.jonathan-workspace.jonathan-light #pageTitle,
body.jonathan-workspace.jonathan-light .today-headline h2,
body.jonathan-workspace.jonathan-light .workspace-kpi-card strong,
body.jonathan-workspace.jonathan-light .workspace-chart-card h3,
body.jonathan-workspace.jonathan-light #backendView .section-head.compact h3,
body.jonathan-workspace.jonathan-light .workspace-panel-head h3,
body.jonathan-workspace.jonathan-light .task-pool-section header h3,
body.jonathan-workspace.jonathan-light .task-pool-item-head strong,
body.jonathan-workspace.jonathan-light .task-pool-detail-row strong,
body.jonathan-workspace.jonathan-light .workspace-activity-item strong {
  color: #132033;
}

body.jonathan-workspace.jonathan-light .brand span,
body.jonathan-workspace.jonathan-light .side-tool span,
body.jonathan-workspace.jonathan-light .side-tool div,
body.jonathan-workspace.jonathan-light .today-summary-line span,
body.jonathan-workspace.jonathan-light .workspace-kpi-card span,
body.jonathan-workspace.jonathan-light .workspace-chart-card p,
body.jonathan-workspace.jonathan-light .workspace-panel-head span,
body.jonathan-workspace.jonathan-light #backendView label span,
body.jonathan-workspace.jonathan-light #backendView .form-message,
body.jonathan-workspace.jonathan-light #backendView .result-box,
body.jonathan-workspace.jonathan-light .task-pool-updated,
body.jonathan-workspace.jonathan-light .task-pool-section header p,
body.jonathan-workspace.jonathan-light .task-pool-item-head span,
body.jonathan-workspace.jonathan-light .task-pool-item-meta,
body.jonathan-workspace.jonathan-light .task-pool-detail-row,
body.jonathan-workspace.jonathan-light .workspace-empty {
  color: #5f6f84;
}

body.jonathan-workspace.jonathan-light .nav-item {
  color: #53657d;
}

body.jonathan-workspace.jonathan-light .nav-item:hover,
body.jonathan-workspace.jonathan-light .nav-item.active {
  color: #132033;
  background: #eef6fb;
  border-color: #cfe2ef;
}

body.jonathan-workspace.jonathan-light .side-tool,
body.jonathan-workspace.jonathan-light .today-workspace-main,
body.jonathan-workspace.jonathan-light .workspace-info-panel,
body.jonathan-workspace.jonathan-light .workspace-chart-card,
body.jonathan-workspace.jonathan-light .backend-workbench-switch,
body.jonathan-workspace.jonathan-light #backendView .panel,
body.jonathan-workspace.jonathan-light #backendView .backend-card,
body.jonathan-workspace.jonathan-light #backendView .query-results-card,
body.jonathan-workspace.jonathan-light .task-pool-tabs button,
body.jonathan-workspace.jonathan-light .task-pool-section,
body.jonathan-workspace.jonathan-light .task-pool-item,
body.jonathan-workspace.jonathan-light .task-pool-detail-table {
  border-color: #d8e2ee;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(20, 39, 63, 0.05);
}

body.jonathan-workspace.jonathan-light .workspace-kpi-card,
body.jonathan-workspace.jonathan-light .workspace-activity-item,
body.jonathan-workspace.jonathan-light .workspace-empty {
  border-color: #d8e2ee;
  background: #f8fbff;
}

body.jonathan-workspace.jonathan-light .workbench-tab,
body.jonathan-workspace.jonathan-light .workbench-subtab,
body.jonathan-workspace.jonathan-light .top-actions .language-toggle,
body.jonathan-workspace.jonathan-light .top-actions a,
body.jonathan-workspace.jonathan-light .user-badge,
body.jonathan-workspace.jonathan-light .theme-toggle-button {
  border-color: #d8e2ee;
  background: #ffffff;
  color: #132033;
}

body.jonathan-workspace.jonathan-light .workbench-tab:hover,
body.jonathan-workspace.jonathan-light .workbench-subtab:hover,
body.jonathan-workspace.jonathan-light .workbench-tab.active,
body.jonathan-workspace.jonathan-light .task-pool-tabs button.active,
body.jonathan-workspace.jonathan-light .task-pool-tabs button:hover,
body.jonathan-workspace.jonathan-light .workspace-kpi-card:hover,
body.jonathan-workspace.jonathan-light .workspace-kpi-card.active {
  border-color: rgba(23, 107, 135, 0.35);
  background: #e9f5fa;
  color: #0f4c5c;
}

body.jonathan-workspace.jonathan-light .workbench-tab.active strong,
body.jonathan-workspace.jonathan-light .workbench-tab.active svg,
body.jonathan-workspace.jonathan-light .workbench-tab:hover strong,
body.jonathan-workspace.jonathan-light .workbench-tab:hover svg {
  color: #0f4c5c;
}

body.jonathan-workspace.jonathan-light #backendView input,
body.jonathan-workspace.jonathan-light #backendView select {
  color: #132033;
  background: #ffffff;
  border-color: #cbd7e5;
}

body.jonathan-workspace.jonathan-light .workspace-donut::after {
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .workspace-donut span,
body.jonathan-workspace.jonathan-light .progress-panel p {
  color: #132033;
}

@media (max-width: 1050px) {
  body.jonathan-workspace .backend-workspace-grid,
  body.jonathan-workspace .backend-main-column,
  body.jonathan-workspace .today-workspace-main,
  body.jonathan-workspace .workspace-kpi-grid,
  body.jonathan-workspace .workspace-analytics-panel,
  .task-pool-tabs {
    grid-template-columns: 1fr;
  }

  body.jonathan-workspace .backend-workbench-switch,
  body.jonathan-workspace .workspace-analytics-panel,
  body.jonathan-workspace .backend-workbench,
  body.jonathan-workspace .nodes-workbench,
  body.jonathan-workspace .query-workbench,
  body.jonathan-workspace .kingdee-sn-workbench {
    grid-column: 1;
  }

  body.jonathan-workspace .backend-workbench-switch {
    position: static;
    grid-row: auto;
  }
}

/* Final Jonathan layout override: parent nav owns controls; canvas owns work. */
body.jonathan-workspace .backend-workbench-switch,
body.jonathan-workspace .task-pool-tabs {
  display: none !important;
}

body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(300px, 0.34fr) minmax(520px, 1fr) !important;
}

body.jonathan-workspace .backend-main-column {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.jonathan-workspace .workspace-analytics-panel,
body.jonathan-workspace .backend-workbench,
body.jonathan-workspace .nodes-workbench,
body.jonathan-workspace .query-workbench,
body.jonathan-workspace .kingdee-sn-workbench {
  grid-column: 1 !important;
}

body.jonathan-workspace .workspace-analytics-panel {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

body.jonathan-workspace .sidebar-subnav {
  border-left-color: rgba(255, 255, 255, 0.08);
}

body.jonathan-workspace .sidebar-subnav button {
  color: #9ba8ba;
}

body.jonathan-workspace .sidebar-subnav button:hover,
body.jonathan-workspace .sidebar-subnav button.active {
  border-color: rgba(103, 212, 232, 0.42);
  background: #111923;
  color: #f7fbff;
}

body.jonathan-workspace.jonathan-light .sidebar-subnav {
  border-left-color: #d8e2ee;
}

body.jonathan-workspace.jonathan-light .sidebar-subnav button {
  color: #5f7085;
}

body.jonathan-workspace.jonathan-light .sidebar-subnav button:hover,
body.jonathan-workspace.jonathan-light .sidebar-subnav button.active {
  border-color: rgba(23, 107, 135, 0.26);
  background: rgba(23, 107, 135, 0.08);
  color: #132033;
}

body.jonathan-workspace.jonathan-light .task-pool-subnav strong {
  color: #176b87;
}

@media (max-width: 1050px) {
  body.jonathan-workspace .workspace-analytics-panel {
    grid-template-columns: 1fr;
  }
}

/* Effective final pass: these rules intentionally live at EOF. */
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .backend-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .nodes-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .query-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .kingdee-sn-workbench {
  display: none !important;
}

body.jonathan-workspace.backend-operation-mode #workspaceAnalyticsPanel,
body.jonathan-workspace.backend-operation-mode .workspace-analytics-panel {
  display: none !important;
}

body.jonathan-workspace.backend-home-mode .backend-main-column {
  align-content: start;
  min-height: 330px;
}

body.jonathan-workspace.backend-home-mode .workspace-analytics-panel {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(340px, 1fr)) !important;
  gap: 16px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-chart-card {
  min-height: 174px !important;
  gap: 24px !important;
  padding: 24px 28px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-chart-card h3 {
  font-size: 20px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-chart-card p {
  font-size: 14px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-donut {
  width: 132px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-donut::after {
  width: 86px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-donut span {
  font-size: 21px !important;
}

body.jonathan-workspace.jonathan-light {
  background: #edf3f8 !important;
  color: #0e1d2f !important;
  --jonathan-surface: #ffffff;
  --jonathan-surface-2: #f4f8fc;
  --jonathan-surface-3: #e7f0f7;
  --jonathan-line: #b9c8d7;
  --jonathan-muted: #33465d;
  --jonathan-accent: #176b87;
  --jonathan-accent-strong: #0c536b;
}

body.jonathan-workspace.jonathan-light .workspace,
body.jonathan-workspace.jonathan-light .app-shell {
  background: #edf3f8 !important;
}

body.jonathan-workspace.jonathan-light .sidebar,
body.jonathan-workspace.jonathan-light .today-workspace-main,
body.jonathan-workspace.jonathan-light .workspace-info-panel,
body.jonathan-workspace.jonathan-light .workspace-chart-card,
body.jonathan-workspace.jonathan-light #backendView .panel,
body.jonathan-workspace.jonathan-light #backendView .backend-card,
body.jonathan-workspace.jonathan-light #backendView .query-results-card,
body.jonathan-workspace.jonathan-light .task-pool-section,
body.jonathan-workspace.jonathan-light .task-pool-item,
body.jonathan-workspace.jonathan-light .task-pool-detail-table {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
  box-shadow: 0 12px 30px rgba(15, 31, 51, 0.07) !important;
}

body.jonathan-workspace.jonathan-light .workspace-kpi-card,
body.jonathan-workspace.jonathan-light .workspace-activity-item,
body.jonathan-workspace.jonathan-light .workspace-empty,
body.jonathan-workspace.jonathan-light .side-tool,
body.jonathan-workspace.jonathan-light .sidebar-subnav button,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card {
  border-color: #c5d2df !important;
  background: #f6f9fc !important;
  color: #17304a !important;
}

body.jonathan-workspace.jonathan-light .nav-item,
body.jonathan-workspace.jonathan-light .workbench-tab,
body.jonathan-workspace.jonathan-light .workbench-subtab,
body.jonathan-workspace.jonathan-light .top-actions .language-toggle,
body.jonathan-workspace.jonathan-light .top-actions a,
body.jonathan-workspace.jonathan-light .theme-toggle-button,
body.jonathan-workspace.jonathan-light .user-badge {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #17304a !important;
}

body.jonathan-workspace.jonathan-light .nav-item:hover,
body.jonathan-workspace.jonathan-light .nav-item.active,
body.jonathan-workspace.jonathan-light .sidebar-subnav button:hover,
body.jonathan-workspace.jonathan-light .sidebar-subnav button.active,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card:hover,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card.active,
body.jonathan-workspace.jonathan-light .workbench-tab:hover,
body.jonathan-workspace.jonathan-light .workbench-tab.active,
body.jonathan-workspace.jonathan-light .workbench-subtab:hover,
body.jonathan-workspace.jonathan-light .workbench-subtab.active,
body.jonathan-workspace.jonathan-light .workspace-kpi-card:hover,
body.jonathan-workspace.jonathan-light .workspace-kpi-card.active {
  border-color: #6f9db2 !important;
  background: #e4f2f8 !important;
  color: #0c2d3c !important;
}

body.jonathan-workspace.jonathan-light .brand strong,
body.jonathan-workspace.jonathan-light #pageTitle,
body.jonathan-workspace.jonathan-light .today-headline h2,
body.jonathan-workspace.jonathan-light .workspace-kpi-card strong,
body.jonathan-workspace.jonathan-light .workspace-chart-card h3,
body.jonathan-workspace.jonathan-light #backendView .section-head.compact h3,
body.jonathan-workspace.jonathan-light .workspace-panel-head h3,
body.jonathan-workspace.jonathan-light .task-pool-section header h3,
body.jonathan-workspace.jonathan-light .task-pool-item-head strong,
body.jonathan-workspace.jonathan-light .task-pool-detail-row strong,
body.jonathan-workspace.jonathan-light .workspace-activity-item strong,
body.jonathan-workspace.jonathan-light #backendView label span {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .brand span,
body.jonathan-workspace.jonathan-light .side-tool span,
body.jonathan-workspace.jonathan-light .side-tool div,
body.jonathan-workspace.jonathan-light .today-summary-line span,
body.jonathan-workspace.jonathan-light .workspace-kpi-card span,
body.jonathan-workspace.jonathan-light .workspace-chart-card p,
body.jonathan-workspace.jonathan-light .workspace-panel-head span,
body.jonathan-workspace.jonathan-light .task-pool-updated,
body.jonathan-workspace.jonathan-light .task-pool-section header p,
body.jonathan-workspace.jonathan-light .task-pool-item-head span,
body.jonathan-workspace.jonathan-light .task-pool-item-meta,
body.jonathan-workspace.jonathan-light .task-pool-detail-row,
body.jonathan-workspace.jonathan-light .workspace-empty,
body.jonathan-workspace.jonathan-light .drawer-table-row span,
body.jonathan-workspace.jonathan-light .order-report-row span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .workspace-label,
body.jonathan-workspace.jonathan-light .workspace-section-label,
body.jonathan-workspace.jonathan-light .eyebrow,
body.jonathan-workspace.jonathan-light .workspace-activity-item time {
  color: #176b87 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light #backendView input,
body.jonathan-workspace.jonathan-light #backendView select,
body.jonathan-workspace.jonathan-light #backendView textarea,
body.jonathan-workspace.jonathan-light .dispatch-node-field input,
body.jonathan-workspace.jonathan-light .dispatch-node-field select,
body.jonathan-workspace.jonathan-light .lead-time-value {
  border-color: #9fb0c2 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light #backendView input::placeholder,
body.jonathan-workspace.jonathan-light #backendView textarea::placeholder {
  color: #66788d !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill,
body.jonathan-workspace.jonathan-light .status-pill {
  border: 1px solid #7ba2b4 !important;
  background: #e6f3f8 !important;
  color: #0e536a !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill.green,
body.jonathan-workspace.jonathan-light .status-pill.green {
  border-color: #6ea883 !important;
  background: #dff3e7 !important;
  color: #135b2c !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill.amber,
body.jonathan-workspace.jonathan-light .status-pill.amber {
  border-color: #bf9652 !important;
  background: #fff2cf !important;
  color: #714d00 !important;
}

body.jonathan-workspace #backendView .cipl-dropzone,
body.jonathan-workspace #backendView .cipl-dropzone.hk-dropzone,
body.jonathan-workspace #backendView .upload-box,
body.jonathan-workspace #backendView .transfer-upload-box,
body.jonathan-workspace #backendView .cipl-pi-upload,
body.jonathan-workspace #backendView .kingdee-sn-upload {
  border: 1.5px dashed rgba(103, 212, 232, 0.42) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(180deg, rgba(103, 212, 232, 0.12), rgba(103, 212, 232, 0.04)),
    #0b1118 !important;
  color: #edf6fb !important;
}

body.jonathan-workspace #backendView .cipl-dropzone strong,
body.jonathan-workspace #backendView .hk-dropzone strong,
body.jonathan-workspace #backendView .upload-box strong,
body.jonathan-workspace #backendView .transfer-upload-box strong,
body.jonathan-workspace #backendView .cipl-pi-upload label,
body.jonathan-workspace #backendView .kingdee-sn-upload span {
  color: #f7fbff !important;
}

body.jonathan-workspace #backendView .cipl-dropzone span:not(.upload-icon),
body.jonathan-workspace #backendView .upload-box span,
body.jonathan-workspace #backendView .transfer-upload-box span,
body.jonathan-workspace #backendView .cipl-pi-upload span {
  color: #9fb0c1 !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone,
body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone.hk-dropzone,
body.jonathan-workspace.jonathan-light #backendView .upload-box,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload,
body.jonathan-workspace.jonathan-light #backendView .kingdee-sn-upload {
  border-color: #7591aa !important;
  background: linear-gradient(180deg, #ffffff, #f4f9fc) !important;
  color: #0e1d2f !important;
  box-shadow: inset 0 0 0 1px rgba(23, 107, 135, 0.08), 0 12px 24px rgba(15, 31, 51, 0.06) !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone:hover,
body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone.hk-dropzone:hover,
body.jonathan-workspace.jonathan-light #backendView .upload-box:hover,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box:hover,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload:hover,
body.jonathan-workspace.jonathan-light #backendView .kingdee-sn-upload:hover {
  border-color: #176b87 !important;
  background: #edf8fc !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone strong,
body.jonathan-workspace.jonathan-light #backendView .hk-dropzone strong,
body.jonathan-workspace.jonathan-light #backendView .upload-box strong,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box strong,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload label,
body.jonathan-workspace.jonathan-light #backendView .kingdee-sn-upload span {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone span:not(.upload-icon),
body.jonathan-workspace.jonathan-light #backendView .upload-box span,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box span,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone .upload-icon,
body.jonathan-workspace.jonathan-light #backendView .upload-icon {
  color: #176b87 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light .drawer-body,
body.jonathan-workspace.jonathan-light .inline-drawer-body {
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field,
body.jonathan-workspace.jonathan-light .dispatch-node-field.filled,
body.jonathan-workspace.jonathan-light .drawer-ci-header,
body.jonathan-workspace.jonathan-light .drawer-table-row,
body.jonathan-workspace.jonathan-light .order-report-row {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field.filled {
  border-color: #7ab28c !important;
  background: #edf8f1 !important;
}

/* Daive backend routing: level one chooses Dubai/HK, level two shows tools. */
.backend-scope-home {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.backend-scope-home[hidden] {
  display: none !important;
}

.backend-scope-card {
  min-height: 164px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 8px 14px;
  align-content: center;
  align-items: center;
  padding: 24px;
  text-align: left;
  border: 1px solid #263449;
  border-radius: 8px;
  background: #0f1724;
  color: #f7fbff;
  cursor: pointer;
}

.backend-scope-card svg {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  color: #67d4e8;
}

.backend-scope-card span {
  color: #f7fbff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

.backend-scope-card strong {
  color: #aab7c8;
  font-size: 14px;
  line-height: 1.35;
}

.backend-scope-card:hover,
.backend-scope-card.active {
  border-color: rgba(103, 212, 232, 0.52);
  background: #121d2b;
}

body.jonathan-workspace .hk-workbench-switch {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 12px;
}

body.jonathan-workspace .hk-workbench-switch .workbench-tab {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: "title" "meta" !important;
  gap: 5px !important;
  min-height: 72px !important;
  padding: 14px 16px !important;
  align-items: center;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

body.jonathan-workspace .hk-workbench-switch .workbench-tab strong,
body.jonathan-workspace .hk-workbench-switch .workbench-tab span {
  display: block !important;
  grid-area: auto !important;
  min-width: 0;
  overflow: hidden;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  text-overflow: clip;
}

body.jonathan-workspace .hk-workbench-switch .workbench-tab strong {
  grid-area: title !important;
  color: #f7fbff !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
}

body.jonathan-workspace .hk-workbench-switch .workbench-tab span {
  grid-area: meta !important;
  color: #aab7c8 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-card {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
  box-shadow: 0 12px 30px rgba(15, 31, 51, 0.07) !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-card svg,
body.jonathan-workspace.jonathan-light .backend-scope-card span {
  color: #0c536b !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-card strong {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-card:hover,
body.jonathan-workspace.jonathan-light .backend-scope-card.active {
  border-color: #6f9db2 !important;
  background: #e4f2f8 !important;
}

body.jonathan-workspace.jonathan-light .hk-workbench-switch .workbench-tab strong {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .hk-workbench-switch .workbench-tab span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav {
  border-left-color: #d8e2ee !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav button {
  border-color: #c5d2df !important;
  background: #f6f9fc !important;
  color: #17304a !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav button strong {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav button span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav button:hover,
body.jonathan-workspace.jonathan-light .backend-scope-nav button.active {
  border-color: #6f9db2 !important;
  background: #e4f2f8 !important;
  color: #0c2d3c !important;
}

@media (max-width: 860px) {
  .backend-scope-home {
    grid-template-columns: 1fr;
  }
}

/* Final backend action visibility guard.
   Single-scope backend accounts keep the canvas action cards.
   Dual-scope accounts keep Daive/Admin actions under the left Dubai/Hong Kong tabs. */
body.jonathan-workspace:not(.backend-dual-scope) #backendView .backend-workbench-switch {
  display: grid !important;
}

body.jonathan-workspace:not(.backend-dual-scope) #backendView .hk-workbench-switch,
body.jonathan-workspace:not(.backend-dual-scope) #backendScopeSwitch,
body.jonathan-workspace:not(.backend-dual-scope) #hongkongSubnav,
body.jonathan-workspace:not(.backend-dual-scope) #backendSubnav {
  display: none !important;
}

body.jonathan-workspace.backend-dual-scope #backendView .backend-workbench-switch,
body.jonathan-workspace.backend-dual-scope #backendView .hk-workbench-switch {
  display: none !important;
}

/* Final backend action visibility guard.
   Single-scope backend accounts keep the canvas action cards.
   Dual-scope accounts keep Daive/Admin actions under the left Dubai/Hong Kong tabs. */
body.jonathan-workspace:not(.backend-dual-scope) #backendView .backend-workbench-switch {
  display: grid !important;
}

body.jonathan-workspace:not(.backend-dual-scope) #backendView .hk-workbench-switch,
body.jonathan-workspace:not(.backend-dual-scope) #backendScopeSwitch,
body.jonathan-workspace:not(.backend-dual-scope) #hongkongSubnav,
body.jonathan-workspace:not(.backend-dual-scope) #backendSubnav {
  display: none !important;
}

body.jonathan-workspace.backend-dual-scope #backendView .backend-workbench-switch,
body.jonathan-workspace.backend-dual-scope #backendView .hk-workbench-switch {
  display: none !important;
}

/* Backend scope safety: only Daive/Admin dual-scope accounts move actions to the left rail. */
body.jonathan-workspace:not(.backend-dual-scope) #backendView .backend-workbench-switch {
  display: grid !important;
}

body.jonathan-workspace:not(.backend-dual-scope) #backendScopeSwitch,
body.jonathan-workspace:not(.backend-dual-scope) #hongkongSubnav {
  display: none !important;
}

body.jonathan-workspace:not(.backend-dual-scope) #backendSubnav {
  display: none !important;
}

body.jonathan-workspace.backend-dual-scope #backendView .backend-workbench-switch,
body.jonathan-workspace.backend-dual-scope #backendView .hk-workbench-switch {
  display: none !important;
}

/* Daive backend actions live in the left scope tabs, not as canvas cards. */
#backendView .backend-workbench-switch,
#backendView .hk-workbench-switch {
  display: none !important;
}

.backend-scope-nav .backend-scope-subnav {
  margin: -2px 0 4px 10px !important;
  padding: 2px 0 4px 10px !important;
  border-left: 1px solid rgba(148, 163, 184, 0.24) !important;
}

.backend-scope-nav .backend-scope-subnav button {
  min-height: 34px !important;
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 10px !important;
  text-align: left !important;
  color: #aeb9c8 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

.backend-scope-nav .backend-scope-subnav button:hover,
.backend-scope-nav .backend-scope-subnav button.active {
  color: #f7fbff !important;
  background: rgba(103, 212, 232, 0.09) !important;
  border-color: rgba(103, 212, 232, 0.34) !important;
  box-shadow: none !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav .backend-scope-subnav {
  border-left-color: #d8e2ee !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav .backend-scope-subnav button {
  color: #17304a !important;
  background: transparent !important;
  border-color: transparent !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav .backend-scope-subnav button:hover,
body.jonathan-workspace.jonathan-light .backend-scope-nav .backend-scope-subnav button.active {
  color: #0c2d3c !important;
  background: #e4f2f8 !important;
  border-color: #6f9db2 !important;
}

@media (max-width: 1050px) {
  body.jonathan-workspace.backend-home-mode .workspace-analytics-panel {
    grid-template-columns: 1fr !important;
  }
}

/* Final ops shell pass: clear home/operation states and readable light mode. */
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .backend-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .nodes-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .query-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .kingdee-sn-workbench {
  display: none !important;
}

body.jonathan-workspace.backend-operation-mode #workspaceAnalyticsPanel,
body.jonathan-workspace.backend-operation-mode .workspace-analytics-panel {
  display: none !important;
}

body.jonathan-workspace.backend-home-mode .backend-workspace-grid {
  align-items: stretch;
}

body.jonathan-workspace.backend-home-mode .backend-main-column {
  display: grid;
  align-content: start;
  min-height: 330px;
}

body.jonathan-workspace.backend-home-mode .workspace-analytics-panel {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(340px, 1fr)) !important;
  gap: 16px;
}

body.jonathan-workspace.backend-home-mode .workspace-chart-card {
  min-height: 174px;
  gap: 24px;
  padding: 24px 28px;
}

body.jonathan-workspace.backend-home-mode .workspace-chart-card h3 {
  font-size: 20px;
  line-height: 1.2;
}

body.jonathan-workspace.backend-home-mode .workspace-chart-card p {
  font-size: 14px;
}

body.jonathan-workspace.backend-home-mode .workspace-donut {
  width: 132px;
}

body.jonathan-workspace.backend-home-mode .workspace-donut::after {
  width: 86px;
}

body.jonathan-workspace.backend-home-mode .workspace-donut span {
  font-size: 21px;
}

body.jonathan-workspace.jonathan-light {
  background: #edf3f8 !important;
  color: #0e1d2f !important;
  --jonathan-surface: #ffffff;
  --jonathan-surface-2: #f4f8fc;
  --jonathan-surface-3: #e7f0f7;
  --jonathan-line: #b9c8d7;
  --jonathan-muted: #33465d;
  --jonathan-accent: #176b87;
  --jonathan-accent-strong: #0c536b;
}

body.jonathan-workspace.jonathan-light .workspace,
body.jonathan-workspace.jonathan-light .app-shell {
  background: #edf3f8 !important;
}

body.jonathan-workspace.jonathan-light .sidebar,
body.jonathan-workspace.jonathan-light .today-workspace-main,
body.jonathan-workspace.jonathan-light .workspace-info-panel,
body.jonathan-workspace.jonathan-light .workspace-chart-card,
body.jonathan-workspace.jonathan-light #backendView .panel,
body.jonathan-workspace.jonathan-light #backendView .backend-card,
body.jonathan-workspace.jonathan-light #backendView .query-results-card,
body.jonathan-workspace.jonathan-light .task-pool-section,
body.jonathan-workspace.jonathan-light .task-pool-item,
body.jonathan-workspace.jonathan-light .task-pool-detail-table {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
  box-shadow: 0 12px 30px rgba(15, 31, 51, 0.07) !important;
}

body.jonathan-workspace.jonathan-light .workspace-kpi-card,
body.jonathan-workspace.jonathan-light .workspace-activity-item,
body.jonathan-workspace.jonathan-light .workspace-empty,
body.jonathan-workspace.jonathan-light .side-tool,
body.jonathan-workspace.jonathan-light .sidebar-subnav button,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card {
  border-color: #c5d2df !important;
  background: #f6f9fc !important;
  color: #17304a !important;
}

body.jonathan-workspace.jonathan-light .nav-item,
body.jonathan-workspace.jonathan-light .workbench-tab,
body.jonathan-workspace.jonathan-light .workbench-subtab,
body.jonathan-workspace.jonathan-light .top-actions .language-toggle,
body.jonathan-workspace.jonathan-light .top-actions a,
body.jonathan-workspace.jonathan-light .theme-toggle-button,
body.jonathan-workspace.jonathan-light .user-badge {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #17304a !important;
}

body.jonathan-workspace.jonathan-light .nav-item:hover,
body.jonathan-workspace.jonathan-light .nav-item.active,
body.jonathan-workspace.jonathan-light .sidebar-subnav button:hover,
body.jonathan-workspace.jonathan-light .sidebar-subnav button.active,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card:hover,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card.active,
body.jonathan-workspace.jonathan-light .workbench-tab:hover,
body.jonathan-workspace.jonathan-light .workbench-tab.active,
body.jonathan-workspace.jonathan-light .workbench-subtab:hover,
body.jonathan-workspace.jonathan-light .workbench-subtab.active,
body.jonathan-workspace.jonathan-light .workspace-kpi-card:hover,
body.jonathan-workspace.jonathan-light .workspace-kpi-card.active {
  border-color: #6f9db2 !important;
  background: #e4f2f8 !important;
  color: #0c2d3c !important;
}

body.jonathan-workspace.jonathan-light .brand strong,
body.jonathan-workspace.jonathan-light #pageTitle,
body.jonathan-workspace.jonathan-light .today-headline h2,
body.jonathan-workspace.jonathan-light .workspace-kpi-card strong,
body.jonathan-workspace.jonathan-light .workspace-chart-card h3,
body.jonathan-workspace.jonathan-light #backendView .section-head.compact h3,
body.jonathan-workspace.jonathan-light .workspace-panel-head h3,
body.jonathan-workspace.jonathan-light .task-pool-section header h3,
body.jonathan-workspace.jonathan-light .task-pool-item-head strong,
body.jonathan-workspace.jonathan-light .task-pool-detail-row strong,
body.jonathan-workspace.jonathan-light .workspace-activity-item strong,
body.jonathan-workspace.jonathan-light #backendView label span {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .brand span,
body.jonathan-workspace.jonathan-light .side-tool span,
body.jonathan-workspace.jonathan-light .side-tool div,
body.jonathan-workspace.jonathan-light .today-summary-line span,
body.jonathan-workspace.jonathan-light .workspace-kpi-card span,
body.jonathan-workspace.jonathan-light .workspace-chart-card p,
body.jonathan-workspace.jonathan-light .workspace-panel-head span,
body.jonathan-workspace.jonathan-light .task-pool-updated,
body.jonathan-workspace.jonathan-light .task-pool-section header p,
body.jonathan-workspace.jonathan-light .task-pool-item-head span,
body.jonathan-workspace.jonathan-light .task-pool-item-meta,
body.jonathan-workspace.jonathan-light .task-pool-detail-row,
body.jonathan-workspace.jonathan-light .workspace-empty,
body.jonathan-workspace.jonathan-light .drawer-table-row span,
body.jonathan-workspace.jonathan-light .order-report-row span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .workspace-label,
body.jonathan-workspace.jonathan-light .workspace-section-label,
body.jonathan-workspace.jonathan-light .eyebrow,
body.jonathan-workspace.jonathan-light .workspace-activity-item time {
  color: #176b87 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light #backendView input,
body.jonathan-workspace.jonathan-light #backendView select,
body.jonathan-workspace.jonathan-light #backendView textarea,
body.jonathan-workspace.jonathan-light .dispatch-node-field input,
body.jonathan-workspace.jonathan-light .dispatch-node-field select,
body.jonathan-workspace.jonathan-light .lead-time-value {
  border-color: #9fb0c2 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light #backendView input::placeholder,
body.jonathan-workspace.jonathan-light #backendView textarea::placeholder {
  color: #66788d !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill,
body.jonathan-workspace.jonathan-light .status-pill {
  border: 1px solid #7ba2b4 !important;
  background: #e6f3f8 !important;
  color: #0e536a !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill.green,
body.jonathan-workspace.jonathan-light .status-pill.green {
  border-color: #6ea883 !important;
  background: #dff3e7 !important;
  color: #135b2c !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill.amber,
body.jonathan-workspace.jonathan-light .status-pill.amber {
  border-color: #bf9652 !important;
  background: #fff2cf !important;
  color: #714d00 !important;
}

body.jonathan-workspace #backendView .cipl-dropzone,
body.jonathan-workspace #backendView .cipl-dropzone.hk-dropzone,
body.jonathan-workspace #backendView .upload-box,
body.jonathan-workspace #backendView .transfer-upload-box,
body.jonathan-workspace #backendView .cipl-pi-upload,
body.jonathan-workspace #backendView .kingdee-sn-upload {
  border: 1.5px dashed rgba(103, 212, 232, 0.42) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(180deg, rgba(103, 212, 232, 0.12), rgba(103, 212, 232, 0.04)),
    #0b1118 !important;
  color: #edf6fb !important;
}

body.jonathan-workspace #backendView .cipl-dropzone strong,
body.jonathan-workspace #backendView .hk-dropzone strong,
body.jonathan-workspace #backendView .upload-box strong,
body.jonathan-workspace #backendView .transfer-upload-box strong,
body.jonathan-workspace #backendView .cipl-pi-upload label,
body.jonathan-workspace #backendView .kingdee-sn-upload span {
  color: #f7fbff !important;
}

body.jonathan-workspace #backendView .cipl-dropzone span:not(.upload-icon),
body.jonathan-workspace #backendView .upload-box span,
body.jonathan-workspace #backendView .transfer-upload-box span,
body.jonathan-workspace #backendView .cipl-pi-upload span {
  color: #9fb0c1 !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone,
body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone.hk-dropzone,
body.jonathan-workspace.jonathan-light #backendView .upload-box,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload,
body.jonathan-workspace.jonathan-light #backendView .kingdee-sn-upload {
  border-color: #7591aa !important;
  background:
    linear-gradient(180deg, #ffffff, #f4f9fc) !important;
  color: #0e1d2f !important;
  box-shadow: inset 0 0 0 1px rgba(23, 107, 135, 0.08), 0 12px 24px rgba(15, 31, 51, 0.06) !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone:hover,
body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone.hk-dropzone:hover,
body.jonathan-workspace.jonathan-light #backendView .upload-box:hover,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box:hover,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload:hover,
body.jonathan-workspace.jonathan-light #backendView .kingdee-sn-upload:hover {
  border-color: #176b87 !important;
  background: #edf8fc !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone strong,
body.jonathan-workspace.jonathan-light #backendView .hk-dropzone strong,
body.jonathan-workspace.jonathan-light #backendView .upload-box strong,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box strong,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload label,
body.jonathan-workspace.jonathan-light #backendView .kingdee-sn-upload span {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone span:not(.upload-icon),
body.jonathan-workspace.jonathan-light #backendView .upload-box span,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box span,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone .upload-icon,
body.jonathan-workspace.jonathan-light #backendView .upload-icon {
  color: #176b87 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light .drawer-body,
body.jonathan-workspace.jonathan-light .inline-drawer-body {
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field,
body.jonathan-workspace.jonathan-light .dispatch-node-field.filled,
body.jonathan-workspace.jonathan-light .drawer-ci-header,
body.jonathan-workspace.jonathan-light .drawer-table-row,
body.jonathan-workspace.jonathan-light .order-report-row {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field.filled {
  border-color: #7ab28c !important;
  background: #edf8f1 !important;
}

@media (max-width: 1050px) {
  body.jonathan-workspace.backend-home-mode .workspace-analytics-panel {
    grid-template-columns: 1fr !important;
  }
}

/* Final inline result theme fix for Jonathan node/query reports. */
body.jonathan-workspace .inline-drawer-result {
  border-color: rgba(255, 255, 255, 0.09) !important;
  background: #11161f !important;
  color: #f7fbff !important;
}

body.jonathan-workspace .inline-drawer-head,
body.jonathan-workspace .inline-drawer-actions {
  border-color: rgba(255, 255, 255, 0.09) !important;
  background: #0d121a !important;
}

body.jonathan-workspace .inline-drawer-head h3,
body.jonathan-workspace .inline-drawer-body,
body.jonathan-workspace .inline-drawer-body h1,
body.jonathan-workspace .inline-drawer-body h2,
body.jonathan-workspace .inline-drawer-body h3 {
  color: #f7fbff !important;
}

body.jonathan-workspace .inline-drawer-body .drawer-table-head,
body.jonathan-workspace .inline-drawer-body .order-report-row.head {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: #151c26 !important;
}

body.jonathan-workspace .inline-drawer-body .drawer-table-row,
body.jonathan-workspace .inline-drawer-body .order-report-row,
body.jonathan-workspace .inline-drawer-body .dispatch-items-summary-row {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: #0e1117 !important;
}

body.jonathan-workspace .inline-drawer-body .drawer-table-row span,
body.jonathan-workspace .inline-drawer-body .order-report-row span,
body.jonathan-workspace .inline-drawer-body .dispatch-items-summary-row span,
body.jonathan-workspace .inline-drawer-body .dispatch-node-field span,
body.jonathan-workspace .inline-drawer-body .drawer-ci-header strong {
  color: #f7fbff !important;
}

body.jonathan-workspace .inline-drawer-body .drawer-table-head span,
body.jonathan-workspace .inline-drawer-body .order-report-row.head span,
body.jonathan-workspace .inline-drawer-body .dispatch-items-summary-head span,
body.jonathan-workspace .inline-drawer-body .dispatch-node-field small,
body.jonathan-workspace .inline-drawer-body .drawer-ci-header span {
  color: #94a3b8 !important;
}

body.jonathan-workspace .inline-drawer-body .drawer-ci-header,
body.jonathan-workspace .inline-drawer-body .dispatch-items-summary,
body.jonathan-workspace .inline-drawer-body .dispatch-node-field {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: #101720 !important;
}

body.jonathan-workspace .inline-drawer-body .dispatch-items-summary-head {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: #151c26 !important;
}

body.jonathan-workspace .inline-drawer-body .dispatch-node-field.filled {
  border-color: rgba(67, 191, 121, 0.34) !important;
  background: rgba(22, 101, 52, 0.16) !important;
}

body.jonathan-workspace .inline-drawer-body .dispatch-node-field input,
body.jonathan-workspace .inline-drawer-body .dispatch-node-field select,
body.jonathan-workspace .inline-drawer-body .lead-time-value {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: #080d13 !important;
  color: #f7fbff !important;
}

body.jonathan-workspace.jonathan-light .inline-drawer-result,
body.jonathan-workspace.jonathan-light .inline-drawer-head,
body.jonathan-workspace.jonathan-light .inline-drawer-actions {
  border-color: #d8e2ee !important;
  background: #ffffff !important;
  color: #132033 !important;
}

body.jonathan-workspace.jonathan-light .inline-drawer-head h3,
body.jonathan-workspace.jonathan-light .inline-drawer-body,
body.jonathan-workspace.jonathan-light .inline-drawer-body h1,
body.jonathan-workspace.jonathan-light .inline-drawer-body h2,
body.jonathan-workspace.jonathan-light .inline-drawer-body h3,
body.jonathan-workspace.jonathan-light .inline-drawer-body .drawer-table-row span,
body.jonathan-workspace.jonathan-light .inline-drawer-body .order-report-row span,
body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-items-summary-row span,
body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-node-field span,
body.jonathan-workspace.jonathan-light .inline-drawer-body .drawer-ci-header strong,
body.jonathan-workspace.jonathan-light .inline-drawer-body .lead-time-value {
  color: #132033 !important;
}

body.jonathan-workspace.jonathan-light .inline-drawer-body .drawer-table-head,
body.jonathan-workspace.jonathan-light .inline-drawer-body .order-report-row.head {
  border-color: #d8e2ee !important;
  background: #f5f8fc !important;
}

body.jonathan-workspace.jonathan-light .inline-drawer-body .drawer-table-row,
body.jonathan-workspace.jonathan-light .inline-drawer-body .order-report-row,
body.jonathan-workspace.jonathan-light .inline-drawer-body .drawer-ci-header,
body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-items-summary,
body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-items-summary-row,
body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-node-field {
  border-color: #d8e2ee !important;
  background: #ffffff !important;
}

body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-items-summary-head {
  border-color: #d8e2ee !important;
  background: #f5f8fc !important;
}

body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-items-summary-head span {
  color: #53677f !important;
}

body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-node-field.filled {
  border-color: #b7dec8 !important;
  background: #f2fbf5 !important;
}

body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-node-field input,
body.jonathan-workspace.jonathan-light .inline-drawer-body .dispatch-node-field select,
body.jonathan-workspace.jonathan-light .inline-drawer-body .lead-time-value {
  border-color: #cbd7e5 !important;
  background: #ffffff !important;
  color: #132033 !important;
}

/* Jonathan drawer and query-mode polish. Keep at EOF so legacy drawer colors cannot win. */
body.jonathan-workspace .query-card[hidden] {
  display: none !important;
}

body.jonathan-workspace .side-drawer {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1117;
  color: #f7fbff;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.38);
}

body.jonathan-workspace .drawer-head,
body.jonathan-workspace .drawer-actions {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0b0f15;
}

body.jonathan-workspace .drawer-head h2,
body.jonathan-workspace .drawer-body,
body.jonathan-workspace .order-report-head,
body.jonathan-workspace .order-inline-title,
body.jonathan-workspace .drawer-table-row span,
body.jonathan-workspace .dispatch-node-field span {
  color: #f7fbff;
}

body.jonathan-workspace .drawer-ci-header,
body.jonathan-workspace .order-ci-status-card,
body.jonathan-workspace .order-summary-card,
body.jonathan-workspace .order-customer-block,
body.jonathan-workspace .order-pi-block,
body.jonathan-workspace .order-ci-block,
body.jonathan-workspace .order-shortage-block {
  border-color: rgba(255, 255, 255, 0.1);
  background: #111923;
}

body.jonathan-workspace .drawer-ci-header span,
body.jonathan-workspace .dispatch-node-field small,
body.jonathan-workspace .order-report-row.head span,
body.jonathan-workspace .drawer-table-head span,
body.jonathan-workspace .order-node-status span,
body.jonathan-workspace .order-summary-card span {
  color: #94a3b8;
}

body.jonathan-workspace .drawer-ci-header strong,
body.jonathan-workspace .lead-time-value,
body.jonathan-workspace .order-ci-status-head strong,
body.jonathan-workspace .order-node-status strong,
body.jonathan-workspace .order-summary-card strong {
  color: #f7fbff;
}

body.jonathan-workspace .dispatch-node-field {
  border-color: rgba(255, 255, 255, 0.1);
  background: #101720;
}

body.jonathan-workspace .dispatch-node-field.filled {
  border-color: rgba(67, 191, 121, 0.34);
  background: rgba(22, 101, 52, 0.16);
}

body.jonathan-workspace .dispatch-node-field.readonly {
  background: #10141b;
}

body.jonathan-workspace .dispatch-node-field input,
body.jonathan-workspace .dispatch-node-field select,
body.jonathan-workspace .lead-time-value {
  border-color: rgba(255, 255, 255, 0.1);
  background: #080d13;
  color: #f7fbff;
}

body.jonathan-workspace .dispatch-node-field input:focus,
body.jonathan-workspace .dispatch-node-field select:focus {
  outline: 3px solid rgba(103, 212, 232, 0.14);
  border-color: rgba(103, 212, 232, 0.52);
}

body.jonathan-workspace .drawer-table-head,
body.jonathan-workspace .order-report-row.head {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151c26;
}

body.jonathan-workspace .drawer-table-row,
body.jonathan-workspace .order-report-row {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0e1117;
}

body.jonathan-workspace .order-node-status {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.18);
}

body.jonathan-workspace .order-node-status.ok {
  border-color: rgba(67, 191, 121, 0.28);
  background: rgba(22, 101, 52, 0.16);
}

body.jonathan-workspace.jonathan-light .side-drawer {
  border-left-color: #d8e2ee;
  background: #ffffff;
  color: #132033;
  box-shadow: -18px 0 44px rgba(20, 39, 63, 0.12);
}

body.jonathan-workspace.jonathan-light .drawer-head,
body.jonathan-workspace.jonathan-light .drawer-actions {
  border-color: #d8e2ee;
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .drawer-head h2,
body.jonathan-workspace.jonathan-light .drawer-body,
body.jonathan-workspace.jonathan-light .order-report-head,
body.jonathan-workspace.jonathan-light .order-inline-title,
body.jonathan-workspace.jonathan-light .drawer-table-row span,
body.jonathan-workspace.jonathan-light .dispatch-node-field span,
body.jonathan-workspace.jonathan-light .drawer-ci-header strong,
body.jonathan-workspace.jonathan-light .lead-time-value,
body.jonathan-workspace.jonathan-light .order-ci-status-head strong,
body.jonathan-workspace.jonathan-light .order-node-status strong,
body.jonathan-workspace.jonathan-light .order-summary-card strong {
  color: #132033;
}

body.jonathan-workspace.jonathan-light .drawer-ci-header,
body.jonathan-workspace.jonathan-light .order-ci-status-card,
body.jonathan-workspace.jonathan-light .order-summary-card,
body.jonathan-workspace.jonathan-light .order-customer-block,
body.jonathan-workspace.jonathan-light .order-pi-block,
body.jonathan-workspace.jonathan-light .order-ci-block,
body.jonathan-workspace.jonathan-light .order-shortage-block,
body.jonathan-workspace.jonathan-light .dispatch-node-field {
  border-color: #d8e2ee;
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field.filled {
  border-color: #b7dec8;
  background: #f2fbf5;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field input,
body.jonathan-workspace.jonathan-light .dispatch-node-field select,
body.jonathan-workspace.jonathan-light .lead-time-value {
  border-color: #cbd7e5;
  background: #ffffff;
  color: #132033;
}

/* Jonathan drawer and query-mode polish. Keep at EOF so legacy drawer colors cannot win. */
body.jonathan-workspace .query-card[hidden] {
  display: none !important;
}

body.jonathan-workspace .side-drawer {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1117;
  color: #f7fbff;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.38);
}

body.jonathan-workspace .drawer-head,
body.jonathan-workspace .drawer-actions {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0b0f15;
}

body.jonathan-workspace .drawer-head h2,
body.jonathan-workspace .drawer-body,
body.jonathan-workspace .order-report-head,
body.jonathan-workspace .order-inline-title,
body.jonathan-workspace .drawer-table-row span,
body.jonathan-workspace .dispatch-node-field span {
  color: #f7fbff;
}

body.jonathan-workspace .drawer-ci-header,
body.jonathan-workspace .order-ci-status-card,
body.jonathan-workspace .order-summary-card,
body.jonathan-workspace .order-customer-block,
body.jonathan-workspace .order-pi-block,
body.jonathan-workspace .order-ci-block,
body.jonathan-workspace .order-shortage-block {
  border-color: rgba(255, 255, 255, 0.1);
  background: #111923;
}

body.jonathan-workspace .drawer-ci-header span,
body.jonathan-workspace .dispatch-node-field small,
body.jonathan-workspace .order-report-row.head span,
body.jonathan-workspace .drawer-table-head span,
body.jonathan-workspace .order-node-status span,
body.jonathan-workspace .order-summary-card span {
  color: #94a3b8;
}

body.jonathan-workspace .drawer-ci-header strong,
body.jonathan-workspace .lead-time-value,
body.jonathan-workspace .order-ci-status-head strong,
body.jonathan-workspace .order-node-status strong,
body.jonathan-workspace .order-summary-card strong {
  color: #f7fbff;
}

body.jonathan-workspace .dispatch-node-field {
  border-color: rgba(255, 255, 255, 0.1);
  background: #101720;
}

body.jonathan-workspace .dispatch-node-field.filled {
  border-color: rgba(67, 191, 121, 0.34);
  background: rgba(22, 101, 52, 0.16);
}

body.jonathan-workspace .dispatch-node-field.readonly {
  background: #10141b;
}

body.jonathan-workspace .dispatch-node-field input,
body.jonathan-workspace .dispatch-node-field select,
body.jonathan-workspace .lead-time-value {
  border-color: rgba(255, 255, 255, 0.1);
  background: #080d13;
  color: #f7fbff;
}

body.jonathan-workspace .dispatch-node-field input:focus,
body.jonathan-workspace .dispatch-node-field select:focus {
  outline: 3px solid rgba(103, 212, 232, 0.14);
  border-color: rgba(103, 212, 232, 0.52);
}

body.jonathan-workspace .drawer-table-head,
body.jonathan-workspace .order-report-row.head {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151c26;
}

body.jonathan-workspace .drawer-table-row,
body.jonathan-workspace .order-report-row {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0e1117;
}

body.jonathan-workspace .order-node-status {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.18);
}

body.jonathan-workspace .order-node-status.ok {
  border-color: rgba(67, 191, 121, 0.28);
  background: rgba(22, 101, 52, 0.16);
}

body.jonathan-workspace.jonathan-light .side-drawer {
  border-left-color: #d8e2ee;
  background: #ffffff;
  color: #132033;
  box-shadow: -18px 0 44px rgba(20, 39, 63, 0.12);
}

body.jonathan-workspace.jonathan-light .drawer-head,
body.jonathan-workspace.jonathan-light .drawer-actions {
  border-color: #d8e2ee;
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .drawer-head h2,
body.jonathan-workspace.jonathan-light .drawer-body,
body.jonathan-workspace.jonathan-light .order-report-head,
body.jonathan-workspace.jonathan-light .order-inline-title,
body.jonathan-workspace.jonathan-light .drawer-table-row span,
body.jonathan-workspace.jonathan-light .dispatch-node-field span,
body.jonathan-workspace.jonathan-light .drawer-ci-header strong,
body.jonathan-workspace.jonathan-light .lead-time-value,
body.jonathan-workspace.jonathan-light .order-ci-status-head strong,
body.jonathan-workspace.jonathan-light .order-node-status strong,
body.jonathan-workspace.jonathan-light .order-summary-card strong {
  color: #132033;
}

body.jonathan-workspace.jonathan-light .drawer-ci-header,
body.jonathan-workspace.jonathan-light .order-ci-status-card,
body.jonathan-workspace.jonathan-light .order-summary-card,
body.jonathan-workspace.jonathan-light .order-customer-block,
body.jonathan-workspace.jonathan-light .order-pi-block,
body.jonathan-workspace.jonathan-light .order-ci-block,
body.jonathan-workspace.jonathan-light .order-shortage-block,
body.jonathan-workspace.jonathan-light .dispatch-node-field {
  border-color: #d8e2ee;
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field.filled {
  border-color: #b7dec8;
  background: #f2fbf5;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field input,
body.jonathan-workspace.jonathan-light .dispatch-node-field select,
body.jonathan-workspace.jonathan-light .lead-time-value {
  border-color: #cbd7e5;
  background: #ffffff;
  color: #132033;
}

/* Jonathan final corrections for dashboard KPIs, monthly charts, and query shortcuts. */
body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(300px, 0.34fr) minmax(520px, 1fr) !important;
}

body.jonathan-workspace .workspace-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(128px, 1fr)) !important;
  gap: 10px;
}

body.jonathan-workspace .backend-main-column {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.jonathan-workspace .query-report-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

body.jonathan-workspace .workspace-analytics-panel {
  grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
}

body.jonathan-workspace .workspace-analytics-head {
  grid-column: 1 / -1;
}

body.jonathan-workspace .sidebar-query-shortcuts {
  display: grid;
}

body.jonathan-workspace .sidebar-query-shortcuts[hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  body.jonathan-workspace .today-workspace-main,
  body.jonathan-workspace .workspace-kpi-grid,
  body.jonathan-workspace .query-report-grid,
  body.jonathan-workspace .workspace-analytics-panel {
    grid-template-columns: 1fr !important;
  }
}
/* Active correction for Jonathan dashboard metrics and query shortcuts. */
body.jonathan-workspace .workspace-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 10px;
}

body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(300px, 0.34fr) minmax(520px, 1fr) !important;
}

body.jonathan-workspace .backend-main-column {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Restore dashboard metrics; keep only controls in the left rail. */
body.jonathan-workspace .workspace-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 10px;
}

body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(300px, 0.34fr) minmax(520px, 1fr) !important;
}

body.jonathan-workspace .backend-main-column {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.jonathan-workspace .workspace-analytics-panel {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.workspace-analytics-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 4px;
}

.workspace-analytics-head > div {
  display: grid;
  gap: 4px;
}

.workspace-analytics-head span {
  color: #8fa1b8;
  font-size: 12px;
  font-weight: 760;
}

.workspace-analytics-head strong {
  color: #f7fbff;
  font-size: 15px;
}

.workspace-analytics-head label {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.workspace-analytics-head input {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  padding: 0 10px;
  background: #0d1219;
  color: #f7fbff;
  font: inherit;
  font-weight: 760;
}

.sidebar-query-shortcuts {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin: -2px 0 2px 22px;
}

.sidebar-query-shortcuts[hidden] {
  display: none !important;
}

.sidebar-query-shortcuts .sidebar-query-card {
  min-height: 42px;
  grid-template-columns: 16px minmax(0, 1fr);
  padding: 8px 10px;
  border: 1px solid rgba(103, 212, 232, 0.18);
  background: rgba(13, 18, 25, 0.92);
  color: #b8c4d3;
}

.sidebar-query-shortcuts .sidebar-query-card:hover {
  border-color: rgba(103, 212, 232, 0.46);
  background: #111923;
  color: #f7fbff;
}

body.jonathan-workspace.jonathan-light .workspace-analytics-head span {
  color: #64748b;
}

body.jonathan-workspace.jonathan-light .workspace-analytics-head strong {
  color: #132033;
}

body.jonathan-workspace.jonathan-light .workspace-analytics-head input {
  border-color: #cbd7e5;
  background: #ffffff;
  color: #132033;
}

body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card {
  border-color: #d8e2ee;
  background: #ffffff;
  color: #5f7085;
}

body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card:hover {
  border-color: rgba(23, 107, 135, 0.32);
  background: rgba(23, 107, 135, 0.08);
  color: #132033;
}

@media (max-width: 1050px) {
  body.jonathan-workspace .today-workspace-main,
  body.jonathan-workspace .workspace-kpi-grid,
  body.jonathan-workspace .workspace-analytics-panel {
    grid-template-columns: 1fr !important;
  }
}

/* Jonathan sidebar accordions: controls live in the left rail, not the canvas. */
.sidebar-subnav {
  display: grid;
  gap: 6px;
  margin: -2px 0 8px 22px;
  padding: 4px 0 4px 10px;
  border-left: 1px solid rgba(148, 163, 184, 0.24);
}

.sidebar-subnav[hidden] {
  display: none !important;
}

.sidebar-subnav button {
  min-height: 34px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #aeb9c8;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.sidebar-subnav button:hover,
.sidebar-subnav button.active {
  border-color: rgba(103, 212, 232, 0.34);
  background: rgba(103, 212, 232, 0.09);
  color: #f7fbff;
}

.sidebar-subnav svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.sidebar-subnav span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-pool-subnav button {
  grid-template-columns: 16px minmax(0, 1fr) auto;
}

.task-pool-subnav strong {
  min-width: 24px;
  color: #72d8ea;
  font-size: 13px;
  text-align: right;
}

body.jonathan-workspace .backend-workbench-switch,
body.jonathan-workspace .task-pool-tabs {
  display: none !important;
}

body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(300px, 0.34fr) minmax(520px, 1fr) !important;
}

body.jonathan-workspace .backend-main-column {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.jonathan-workspace .today-workspace-main {
  align-content: start;
}

body.jonathan-workspace .workspace-analytics-panel,
body.jonathan-workspace .backend-workbench,
body.jonathan-workspace .nodes-workbench,
body.jonathan-workspace .query-workbench,
body.jonathan-workspace .kingdee-sn-workbench {
  grid-column: 1 !important;
}

body.jonathan-workspace .workspace-analytics-panel {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

body.jonathan-workspace.jonathan-light .sidebar-subnav {
  border-left-color: #d8e2ee;
}

body.jonathan-workspace.jonathan-light .sidebar-subnav button {
  color: #5f7085;
}

body.jonathan-workspace.jonathan-light .sidebar-subnav button:hover,
body.jonathan-workspace.jonathan-light .sidebar-subnav button.active {
  border-color: rgba(23, 107, 135, 0.26);
  background: rgba(23, 107, 135, 0.08);
  color: #132033;
}

body.jonathan-workspace.jonathan-light .task-pool-subnav strong {
  color: #176b87;
}

@media (max-width: 1050px) {
  body.jonathan-workspace .workspace-analytics-panel {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(23, 107, 135, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 107, 135, 0.028) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Inter", "Aptos", "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

:lang(en) body {
  font-family: "Inter", "Aptos", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

:lang(zh-CN) body {
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.language-toggle {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.language-toggle button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.language-toggle button.active {
  color: #fff;
  background: var(--accent);
}

.top-actions .language-toggle {
  margin-bottom: 0;
  background: #fff;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 18px;
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.login-form,
.panel,
.command-panel,
.upload-box {
  display: grid;
  gap: 12px;
  align-content: start;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button,
.login-form button {
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-xs);
}

.login-form .lark-login-button {
  color: #fff;
  background: #176b87;
}

.login-form .lark-login-button + #loginSubmitBtn {
  color: var(--accent-dark);
  background: #e8f3f7;
  border: 1px solid #cce1e8;
}

.secondary-button {
  color: var(--accent-dark);
  background: #e8f3f7;
  border: 1px solid #cce1e8;
  box-shadow: var(--shadow-xs);
}

.logout-button {
  color: #dbe5ee;
  background: #1d2939;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #101827 0%, #0e1624 100%);
  color: #f8fafc;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: #a7b0bf;
  font-size: 12px;
}

.side-tool {
  display: grid;
  gap: 6px;
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 8px;
  background: rgba(23, 33, 51, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.side-tool strong {
  color: #fff;
  font-size: 14px;
}

.side-tool span,
.side-tool div {
  color: #a7b0bf;
  font-size: 12px;
  word-break: break-all;
}

.side-tool #manualStandaloneCiResult:empty {
  display: none;
}

.side-tool #manualStandaloneCiResult {
  display: grid;
  gap: 3px;
  padding-top: 2px;
}

.side-tool #manualStandaloneCiResult span {
  color: #a7b0bf;
  font-size: 11px;
}

.side-tool #manualStandaloneCiResult strong {
  color: #e6f6fb;
  font-size: 15px;
  letter-spacing: 0;
}

.side-tool button {
  min-height: 34px;
}

.side-tool input,
.side-tool textarea {
  min-height: 34px;
  padding: 8px 10px;
  color: #fff;
  background: #0f1726;
  border: 1px solid #344054;
  border-radius: 6px;
  resize: vertical;
}

.side-tool input::placeholder,
.side-tool textarea::placeholder {
  color: #708099;
}

.ops-quick-tool {
  gap: 8px;
}

.ops-quick-tool .secondary-button {
  min-height: 36px;
  color: #d8f4fb;
  background: rgba(23, 107, 135, 0.34);
  border-color: rgba(125, 211, 232, 0.26);
}

.side-tool-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.side-tool-actions .secondary-button {
  width: 100%;
  font-size: 12px;
}

.inventory-ean-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.inventory-ean-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 7px;
  align-items: center;
}

.inventory-ean-input {
  min-width: 0;
}

.inventory-add-ean {
  width: 34px;
  min-width: 34px;
  height: 34px;
  color: #145c69;
  background: #e8f5f8;
  border-color: #a9ccd7;
}

.inventory-remove-ean {
  width: 34px;
  min-width: 34px;
  height: 34px;
  color: #8a1f11;
  background: #fff3ef;
  border-color: #f1c4ba;
}

.side-inventory-ean-list .inventory-ean-row {
  grid-template-columns: minmax(0, 1fr) 32px 32px;
  gap: 6px;
}

.side-inventory-ean-list .inventory-add-ean {
  width: 32px;
  min-width: 32px;
  height: 32px;
  color: #e6f7fb;
  background: rgba(121, 214, 232, 0.16);
  border-color: rgba(121, 214, 232, 0.48);
}

.side-inventory-ean-list .inventory-remove-ean {
  width: 32px;
  min-width: 32px;
  height: 32px;
  color: #f0c6ba;
  background: rgba(122, 43, 30, 0.28);
  border-color: rgba(241, 150, 134, 0.28);
}

.compact-secondary {
  min-height: 32px;
  font-size: 12px;
}

nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #dbe5ee;
  background: rgba(17, 24, 39, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 0 12px;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active {
  color: #fff;
  background: #257889;
  border-color: #2b8fa2;
  box-shadow: inset 3px 0 0 #9fe8f5;
}

.backend-scope-nav {
  display: grid;
  gap: 6px;
  margin: -2px 0 4px 12px;
  padding-left: 10px;
  border-left: 1px solid #2f3a4d;
}

.backend-scope-nav[hidden] {
  display: none;
}

.backend-scope-nav button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 9px 11px;
  text-align: left;
  color: #cbd5e1;
  background: #121c2d;
  border: 1px solid #263449;
  border-radius: 7px;
}

.backend-scope-nav button strong {
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.2;
}

.backend-scope-nav button span {
  color: #96a3b6;
  font-size: 11px;
  font-weight: 700;
}

.backend-scope-nav button.active {
  background: #0f4c5c;
  border-color: #1d6f7f;
  box-shadow: inset 3px 0 0 #9fe8f5;
}

.backend-scope-nav button.active span {
  color: #d5f4f9;
}

.workspace {
  width: min(1760px, 100%);
  padding: 22px 26px 34px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-head.compact {
  align-items: center;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.top-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #cfdbe6;
  border-radius: 8px;
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 8px 20px rgba(18, 38, 63, 0.08);
  cursor: pointer;
}

.top-icon-button:hover {
  border-color: var(--accent);
  background: #eef8fb;
}

.top-icon-button svg {
  width: 18px;
  height: 18px;
}

.top-icon-button.has-alerts {
  border-color: #2f855a;
  color: #1f7a4d;
}

.top-icon-button.has-error {
  border-color: #c2410c;
  color: #c2410c;
}

.top-icon-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}

.user-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.user-badge {
  color: var(--accent-dark);
  background: #e8f3f7;
}

.status-pill.green {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.view {
  display: none;
  gap: 16px;
}

.view.active {
  display: grid;
}

#backendView {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  align-items: start;
  gap: 14px 16px;
}

#backendView > .section-head {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

#backendView > .section-head h2 {
  font-size: 18px;
}

#backendView > .section-head p {
  font-size: 13px;
}

#backendView > .backend-intro {
  min-height: 0;
  margin-top: -4px;
  margin-bottom: -2px;
}

#backendView > .backend-intro p {
  font-size: 13px;
  margin: 0;
  max-width: none;
}

#frontendView > .section-head p {
  margin: 0;
  font-size: 14px;
}

.frontend-grid,
.backend-grid {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(520px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.workbench-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.front-workbench-switch {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.backend-workbench-switch {
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

#backendView .backend-workbench {
  grid-column: 1 / -1;
}

.nodes-workbench,
.query-workbench {
  display: grid;
  gap: 16px;
}

.nodes-workbench {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: stretch;
}

.query-workbench {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: stretch;
}

.query-workbench .query-card,
.query-workbench .query-results-card {
  grid-column: 1 / -1;
}

.nodes-workbench .backend-card,
.query-workbench .order-report-card {
  min-height: 180px;
}

.backend-scope-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  min-width: 0;
}

.backend-scope-panel[hidden] {
  display: none;
}

.hk-workbench-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workbench-tab {
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 13px 15px;
  text-align: left;
  color: #10243d;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.workbench-tab:hover {
  transform: translateY(-1px);
  border-color: #b7d2dc;
  box-shadow: var(--shadow-sm);
}

.workbench-tab strong {
  font-size: 17px;
  line-height: 1.2;
}

.workbench-tab span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.workbench-tab.active {
  color: #fff;
  background: #1d6f7f;
  border-color: #1d6f7f;
  box-shadow: var(--shadow-sm);
}

.workbench-tab.active:hover {
  border-color: #1d6f7f;
}

.workbench-tab.active span {
  color: rgba(255, 255, 255, 0.78);
}

.front-workbench,
.backend-workbench {
  min-width: 0;
}

.workbench-panel {
  gap: 16px;
  padding: 20px;
  border-top: 3px solid rgba(23, 107, 135, 0.28);
}

.workbench-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.workbench-title-row h3 {
  margin: 0;
  color: #061b33;
  font-size: 22px;
  line-height: 1.2;
}

.workbench-title-row p {
  margin: 6px 0 0;
  font-size: 13px;
}

.allocation-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  align-items: start;
}

.task-section {
  display: grid;
  gap: 12px;
  min-height: 268px;
  padding: 16px;
  background: #fbfdff;
  border: 1px solid #dce7ef;
  border-radius: 8px;
}

.task-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.task-section-head h4 {
  margin: 0;
  color: #07213f;
  font-size: 18px;
}

.task-section-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.customer-routing-section {
  align-content: start;
}

.customer-routing-help {
  margin: -4px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.customer-routing-box {
  display: grid;
  gap: 12px;
}

.customer-routing-box label,
.customer-routing-grid label {
  display: grid;
  gap: 6px;
  color: #5d6f89;
  font-size: 12px;
  font-weight: 800;
}

.customer-routing-box input,
.customer-routing-grid select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d6e2eb;
  border-radius: 6px;
  background: #fff;
  color: #061b33;
  font: inherit;
  font-weight: 700;
}

.customer-routing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ghost-primary {
  color: #0f4c5c;
  background: #e8f3f7;
  border: 1px solid #cce1e8;
}

.workflow-result {
  display: grid;
  gap: 12px;
  min-height: 44px;
  padding: 13px;
  color: #344054;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.workflow-result[hidden] {
  display: none !important;
}

.workflow-result.ok {
  border-color: #b9e4c9;
  background: #f3fbf6;
}

.workflow-result.warn {
  border-color: #f1d08a;
  background: #fff9ea;
}

.workflow-result.error {
  border-color: #ffc9c9;
  background: #fff5f5;
  color: #b42318;
}

.pi-cancel-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 132px;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dde8ee;
}

.pi-cancel-note,
.pi-edit-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pi-edit-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dde8ee;
}

.pi-edit-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: end;
}

.pi-edit-controls label {
  display: grid;
  gap: 6px;
  color: #5d6f89;
  font-size: 12px;
  font-weight: 800;
}

.pi-edit-controls input,
.pi-edit-qty {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d6e2eb;
  border-radius: 6px;
  background: #fff;
  color: #061b33;
  font: inherit;
  font-weight: 800;
}

.pi-edit-list {
  display: grid;
  gap: 10px;
}

.pi-edit-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e3ed;
  border-radius: 8px;
  background: #fff;
}

.pi-edit-item-head {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.pi-edit-item-head strong,
.pi-edit-item-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pi-edit-item-head span {
  color: #4e6077;
  font-size: 13px;
  font-weight: 700;
}

.pi-edit-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pi-edit-stats div {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e0e8f0;
  border-radius: 6px;
  background: #f7fbff;
}

.pi-edit-stats span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.pi-edit-stats strong {
  display: block;
  margin-top: 2px;
  color: #061b33;
  font-size: 15px;
}

.pi-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
  align-items: end;
}

.pi-transfer-box {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #cddde7;
  border-radius: 10px;
  background: #f8fbfc;
}

.pi-transfer-head div,
.pi-transfer-head span,
.pi-transfer-grid label,
.pi-transfer-ci-warning {
  display: grid;
  gap: 5px;
}

.pi-transfer-head span,
.pi-transfer-grid span,
.pi-transfer-ci-warning small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pi-transfer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pi-transfer-grid input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d6e2eb;
  border-radius: 6px;
  background: #fff;
  color: #061b33;
  font: inherit;
  font-weight: 800;
}

.pi-transfer-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.pi-transfer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pi-transfer-summary > div,
.pi-transfer-ci-warning {
  min-width: 0;
  padding: 9px;
  border: 1px solid #dce7ee;
  border-radius: 7px;
  background: #fff;
}

.pi-transfer-summary span,
.pi-transfer-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.pi-transfer-summary strong {
  display: block;
  margin-top: 3px;
}

.pi-transfer-ci-warning.warn {
  border-color: #f0c36d;
  background: #fff9ec;
}

.danger-button,
.secondary-button.danger-button {
  color: #b42318;
  background: #fff1f0;
  border-color: #ffccc7;
}

.danger-button:hover,
.secondary-button.danger-button:hover {
  background: #ffe4e1;
}

.warning-button,
.secondary-button.warning-button {
  color: #8a4b00;
  background: #fff7e6;
  border-color: #ffd591;
}

.warning-button:hover,
.secondary-button.warning-button:hover {
  background: #fff1cf;
}

@media (max-width: 860px) {
  .pi-cancel-box {
    grid-template-columns: 1fr 1fr;
  }

  .pi-cancel-box label {
    grid-column: 1 / -1;
  }

  .pi-edit-controls,
  .pi-edit-actions,
  .pi-edit-item-head,
  .pi-edit-stats,
  .pi-transfer-grid,
  .pi-transfer-summary {
    grid-template-columns: 1fr;
  }

  .pi-transfer-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.workflow-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.workflow-summary-grid div {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(216, 222, 232, 0.75);
  border-radius: 6px;
}

.workflow-summary-grid span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.workflow-summary-grid strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #061b33;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-steps {
  display: grid;
  gap: 7px;
}

.workflow-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.workflow-step b {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: #667085;
  background: #eef2f7;
  border-radius: 50%;
  font-size: 12px;
}

.workflow-step.done b {
  color: #fff;
  background: #2f9e44;
}

.workflow-step.warn b {
  color: #7a4f01;
  background: #f6d78a;
}

.workflow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-links a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 11px;
  color: #0f4c5c;
  background: #e8f3f7;
  border: 1px solid #cce1e8;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.workflow-warning {
  color: #9a6700;
  font-weight: 700;
}

.transfer-inline-table {
  min-width: 0;
}

.transfer-inline-row {
  grid-template-columns: 110px 150px minmax(180px, 1fr) 70px;
}

.upload-pi-panel {
  grid-column: 1;
}

.transfer-cipl-panel {
  grid-column: 2;
}

.wide-panel {
  grid-column: 1 / -1;
}

.dispatch-builder {
  gap: 12px;
}

.dispatch-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 38px 150px;
  gap: 10px;
  align-items: end;
}

.pi-list {
  display: grid;
  gap: 6px;
}

.dispatch-pi-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.dispatch-pi-row:first-child {
  grid-template-columns: minmax(0, 1fr);
}

.pi-control input {
  font-weight: 700;
}

.square-icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  background: #e8f3f7;
  border: 1px solid #cce1e8;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.remove-pi-button {
  color: #9b1c1c;
  background: #fff3f2;
  border-color: #f1c6c0;
}

.ci-assist {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #cce1e8;
  border-radius: 8px;
  background: #f1f8fb;
}

.ci-assist span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ci-assist strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  color: var(--accent-dark);
}

.ci-assist p {
  margin-top: 2px;
  font-size: 12px;
}

.ci-action-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 130px;
  gap: 10px;
  align-items: end;
}

.ci-action-grid.compact-actions {
  grid-template-columns: minmax(160px, 210px);
  justify-content: start;
}

.compact-actions .primary-button,
.compact-actions .secondary-button {
  white-space: nowrap;
}

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-xs);
}

.tool-panel {
  gap: 14px;
  overflow: hidden;
  border-color: #dce5ee;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 254, 0.98));
  box-shadow: var(--shadow-sm);
}

.tool-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #176b87, #2f9e44 48%, #c98a2a);
}

.tool-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.tool-panel-head h3 {
  margin: 0;
  color: #061b33;
  font-size: 21px;
  line-height: 1.2;
}

.tool-panel-head span {
  display: block;
  margin-top: 5px;
  color: #65758b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.compact-head {
  min-height: 54px;
}

.tool-visual {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border: 1px solid #cfe0e9;
  border-radius: 8px;
  background: #edf6f8;
  box-shadow: inset 0 -10px 22px rgba(23, 107, 135, 0.08);
}

.tool-visual::after {
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: #0f4c5c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.pi-visual::after {
  content: "PI";
}

.transfer-visual::after {
  content: "CI";
}

.reservation-visual::after {
  content: "RSV";
}

.tool-visual i {
  position: absolute;
  display: block;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #c6d7e2;
}

.pi-visual i:nth-child(1) {
  left: 12px;
  top: 12px;
  width: 28px;
  height: 34px;
}

.pi-visual i:nth-child(2) {
  left: 17px;
  top: 20px;
  width: 18px;
  height: 3px;
  background: #176b87;
  border: 0;
}

.pi-visual i:nth-child(3) {
  left: 17px;
  top: 29px;
  width: 22px;
  height: 3px;
  background: #d59b32;
  border: 0;
}

.transfer-visual i:nth-child(1),
.transfer-visual i:nth-child(2) {
  top: 17px;
  width: 19px;
  height: 24px;
}

.transfer-visual i:nth-child(1) {
  left: 9px;
}

.transfer-visual i:nth-child(2) {
  right: 9px;
  background: #fef9ec;
}

.transfer-visual i:nth-child(3) {
  left: 25px;
  top: 27px;
  width: 10px;
  height: 3px;
  background: #2f9e44;
  border: 0;
}

.reservation-visual i:nth-child(1) {
  left: 10px;
  top: 22px;
  width: 38px;
  height: 20px;
  background: #fff8e1;
}

.reservation-visual i:nth-child(2) {
  left: 16px;
  top: 16px;
  width: 12px;
  height: 12px;
  background: #e7f6ec;
}

.reservation-visual i:nth-child(3) {
  right: 14px;
  top: 15px;
  width: 14px;
  height: 14px;
  background: #fff;
}

#backendView .panel {
  width: 100%;
  min-height: 0;
  overflow: visible;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid #d8e4ec;
  border-top: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

#backendView .pick-card,
#backendView .cipl-card {
  min-height: 0;
}

#backendView .nodes-card,
#backendView .query-card {
  min-height: 0;
}

#backendView .section-head.compact {
  gap: 8px;
  min-height: 30px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e7edf3;
}

#backendView .section-head.compact h3 {
  font-size: 18px;
}

#backendView label {
  gap: 5px;
}

#backendView label span {
  color: #5d6b82;
  font-size: 12px;
  line-height: 1;
}

#backendView input,
#backendView select,
#backendView button {
  min-height: 40px;
  font-size: 15px;
  line-height: 1.2;
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: 8px;
}

#backendView input,
#backendView select {
  background: #fbfdff;
}

#backendView input:focus,
#backendView select:focus {
  outline: 3px solid var(--focus);
  border-color: rgba(23, 107, 135, 0.42);
}

#backendView .status-pill {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 11px;
}

#backendView .dispatch-controls {
  grid-template-columns: minmax(260px, 1fr) 44px minmax(140px, 160px);
  gap: 10px;
}

#backendView .ci-action-grid.compact-actions {
  grid-template-columns: 1fr;
}

#backendView .compact-result {
  min-height: 0;
  font-size: 12px;
}

#backendView .backend-card,
#backendView .manual-ci-archive-card,
#backendView .query-report-card-panel,
#backendView .query-results-card {
  border: 1px solid #d9e6ee;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98));
  box-shadow: var(--shadow-xs);
}

#backendView .backend-card {
  padding: 16px;
}

#backendView .manual-ci-archive-card {
  grid-column: 1 / -1;
  padding: 16px;
}

#backendView .manual-ci-head {
  padding-bottom: 10px;
  border-bottom: 1px solid #e7edf3;
}

#backendView .manual-ci-search-line,
#backendView .manual-ci-bind-line {
  grid-template-columns: minmax(220px, 1fr) minmax(132px, 180px);
}

#backendView .drawer-table,
#backendView .manual-ci-table-wrap,
#backendView .hk-table-wrap {
  border-color: #d9e6ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#backendView .drawer-table-head,
#backendView .manual-ci-table th,
#backendView .hk-table th {
  color: #475467;
  background: #f4f8fb;
}

.cancel-ci-inline {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 112px;
  gap: 9px;
  align-items: end;
}

.cancel-ci-inline input {
  font-weight: 700;
}

.upload-box {
  position: relative;
  min-height: 132px;
  place-items: center;
  text-align: center;
  border: 1px dashed #a9bdcc;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fbfdff, #f3f8fb);
  padding: 18px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.upload-box strong,
.transfer-upload-box strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
}

.upload-box:hover,
.transfer-upload-box:hover {
  border-color: #176b87;
  background: #f0f8fb;
  box-shadow: inset 0 0 0 1px rgba(23, 107, 135, 0.06);
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box span,
.form-message,
.result-box {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-icon {
  width: 46px;
  height: 46px;
  padding: 9px;
  color: #176b87;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  border: 1px solid #bfd2df;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 247, 250, 0.92));
  box-shadow: 0 10px 22px rgba(23, 107, 135, 0.12);
}

.upload-icon path {
  vector-effect: non-scaling-stroke;
}

.upload-box:hover .upload-icon,
.transfer-upload-box:hover .upload-icon {
  color: #0f4c5c;
  border-color: #176b87;
  box-shadow: 0 12px 26px rgba(23, 107, 135, 0.18);
}

.transfer-cipl-panel {
  min-height: 0;
}

.transfer-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.transfer-upload-box {
  position: relative;
  min-height: 178px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #a9bdcc;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f5f9fc);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.transfer-upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.transfer-upload-box strong {
  color: var(--ink);
  font-size: 18px;
}

.transfer-upload-box span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-upload-box.dragging {
  border-color: var(--accent);
  background: #eef8fb;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
}

.inline-download {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.reservation-panel {
  gap: 12px;
  min-height: 0;
}

.reservation-panel .panel-title-row {
  align-items: flex-start;
}

.reservation-panel .inline-download {
  margin-top: 8px;
  padding: 7px 13px;
  border: 1px solid #cce1e8;
  border-radius: 999px;
  background: #eef8fb;
  font-size: 13px;
}

.office-stock-box {
  margin-top: 14px;
  padding: 13px;
  border-top: 1px solid #d8e3ea;
  border-radius: 8px;
  background: #f8fbfd;
  border: 1px solid #dce7ef;
}

.office-stock-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.inline-title {
  font-weight: 800;
  color: #07213f;
  margin-bottom: 2px;
}

.office-stock-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.office-stock-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 9px;
}

.office-stock-rows {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.office-stock-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 112px 34px;
  gap: 8px;
  align-items: end;
}

.office-stock-row label,
.office-stock-controls label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  color: #24445b;
}

.office-stock-row input,
.office-stock-controls select {
  min-height: 38px;
  border: 1px solid #b8c9d6;
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
  background: #fff;
}

.remove-office-stock-row {
  color: #9b1c1c;
  background: #fff3f2;
  border-color: #f1c6c0;
}

.reservation-actions {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 96px 96px;
  gap: 8px;
  align-items: stretch;
}

.reservation-upload {
  min-height: 88px;
  padding: 12px;
}

.reservation-bulk-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reservation-actions .primary-button,
.reservation-actions .secondary-button,
.reservation-bulk-actions .secondary-button {
  min-height: 42px;
  font-size: 15px;
}

.warning-button {
  color: #8a4b00;
  background: #fff8e6;
  border-color: #f6d28b;
}

.danger-button {
  color: #b42318;
  background: #fff1f0;
  border-color: #ffccc7;
}

.reservation-list {
  display: grid;
  gap: 10px;
}

.reservation-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.reservation-summary div {
  min-height: 58px;
  padding: 10px 12px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reservation-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reservation-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.reservation-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reservation-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.reservation-table th,
.reservation-table td {
  height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid #e3ebf1;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
  vertical-align: middle;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: #f6f9fc;
  font-weight: 800;
}

.reservation-table tr:last-child td {
  border-bottom: 0;
}

.reservation-table tbody tr:hover {
  background: #f8fbfd;
}

.reservation-table .select-col {
  width: 42px;
  text-align: center;
}

.reservation-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.mono-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.qty-cell {
  color: var(--accent-dark);
  font-weight: 800;
}

.muted-cell {
  color: #98a2b3;
  font-weight: 700;
}

.reservation-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.reservation-status.active {
  color: #096b2f;
  background: #e7f8ed;
}

.reservation-status.legacy {
  color: #8a4b00;
  background: #fff3d6;
}

.reservation-status.closed {
  color: #667085;
  background: #eef2f6;
}

.compact-empty {
  padding: 12px;
}

.drawer-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid #cce1e8;
  border-radius: 8px;
  background: #f4fbfd;
}

.drawer-progress strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.drawer-progress p {
  margin: 3px 0 0;
  font-size: 13px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 4px solid #d9e8ee;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.transfer-result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.transfer-result-card {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.transfer-result-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.transfer-result-card strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-source-line {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.transfer-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.transfer-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 13px;
}

.transfer-table th {
  padding: 9px 10px;
  color: var(--muted);
  background: #f3f6fa;
  text-align: left;
}

.transfer-table td {
  padding: 9px 10px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.form-message.error {
  color: var(--red);
}

.form-message.result-message {
  white-space: pre-wrap;
}

.form-message.ok {
  color: var(--green);
}

#backendView .form-message,
#backendView .result-box {
  font-size: 12px;
}

.warn-text {
  color: var(--amber);
  font-weight: 700;
}

.inventory-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.flow-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.flow-list li {
  padding-left: 4px;
}

.flow-list strong,
.flow-list span {
  display: block;
}

.flow-list span {
  color: var(--muted);
  margin-top: 2px;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.manual-date-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

#backendView .manual-date-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manual-ar-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 160px;
  gap: 10px;
  align-items: end;
}

.lookup-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px;
  gap: 10px;
  align-items: end;
}

#backendView .lookup-line {
  grid-template-columns: minmax(220px, 1fr) 132px;
  gap: 10px;
}

.manual-ci-archive {
  display: grid;
  gap: 12px;
}

.manual-ci-archive:not(.manual-ci-archive-card) {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.manual-ci-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manual-ci-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.manual-ci-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.manual-ci-search-line,
.manual-ci-bind-line {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px;
  gap: 10px;
  align-items: end;
}

.manual-ci-bind-line {
  grid-template-columns: minmax(220px, 1fr) 190px;
}

.manual-ci-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.manual-ci-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.manual-ci-table th,
.manual-ci-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e3e9f0;
  text-align: left;
  vertical-align: middle;
}

.manual-ci-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #5d6b82;
  background: #f5f8fb;
  font-size: 12px;
  font-weight: 800;
}

.manual-ci-table input {
  width: 96px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.manual-ci-table .disabled-row {
  color: #8b98a8;
  background: #f8fafc;
}

.manual-ci-notice {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #b7dec8;
  border-radius: 8px;
  background: #f2fbf5;
  color: #1f5f3b;
}

.manual-ci-notice.warn {
  border-color: #f4d6a0;
  background: #fff8e8;
  color: #7a5300;
}

.manual-ci-notice strong {
  font-size: 15px;
}

.manual-ci-notice span,
.manual-ci-notice small {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.kingdee-sn-card {
  display: grid;
  gap: 14px;
}

.kingdee-sn-embedded {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.kingdee-sn-embedded[hidden] {
  display: none !important;
}

.kingdee-sn-embedded .section-head p {
  margin: 4px 0 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.kingdee-sn-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.kingdee-sn-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(220px, 1fr) minmax(220px, 1fr) 140px;
  gap: 10px;
  align-items: end;
}

.kingdee-sn-upload input {
  padding: 7px;
}

.kingdee-sn-file-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kingdee-sn-file-line span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.kingdee-sn-result {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.kingdee-sn-preview-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-xs);
}

.kingdee-sn-preview-heading-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.kingdee-sn-preview-heading-copy span,
.kingdee-sn-preview-heading-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kingdee-sn-preview-heading-copy strong {
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.kingdee-sn-reupload {
  flex: 0 0 auto;
  white-space: nowrap;
}

.kingdee-sn-reupload:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.kingdee-price-cell {
  min-width: 150px;
}

.kingdee-price-value {
  display: block;
  white-space: nowrap;
}

.kingdee-price-zero-badge {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid #e6b85c;
  border-radius: 999px;
  color: #7a4a00;
  background: var(--amber-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.kingdee-price-error {
  display: inline-block;
  max-width: 190px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
}

body.jonathan-workspace .kingdee-sn-preview-heading {
  border-color: rgba(103, 212, 232, 0.24);
  border-left-color: #67d4e8;
  background: #0f1720;
}

body.jonathan-workspace .kingdee-sn-preview-heading-copy strong {
  color: #f7fbff;
}

body.jonathan-workspace .kingdee-sn-preview-heading-copy span,
body.jonathan-workspace .kingdee-sn-preview-heading-copy small {
  color: #9fb0c3;
}

body.jonathan-workspace .kingdee-price-zero-badge {
  color: #ffd98a;
  background: rgba(183, 121, 31, 0.2);
}

.kingdee-sn-result.warn {
  border-color: #f4d6a0;
}

.kingdee-sn-result.error {
  border-color: #f0b5b5;
}

.kingdee-sn-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kingdee-sn-section {
  display: grid;
  gap: 8px;
}

.kingdee-sn-section h4 {
  margin: 0;
  font-size: 14px;
}

.kingdee-sn-package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.kingdee-sn-package-actions .compact-action {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.kingdee-sn-plan {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.muted-download {
  background: #f3f4f6;
  color: var(--muted);
}

.kingdee-sn-table {
  min-width: 1280px;
}

.kingdee-sn-code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 360px;
}

.kingdee-sn-code {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #233955;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.kingdee-sn-code.muted {
  color: #64748b;
  background: #eef2f7;
}

.drawer-inventory-compare {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  font-weight: 800;
}

.drawer-inventory-compare input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.kingdee-compare-section {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.kingdee-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kingdee-compare-head h4 {
  margin: 0;
  font-size: 14px;
}

.kingdee-compare-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kingdee-compare-table {
  min-width: 720px;
}

.kingdee-pending-section {
  display: grid;
  gap: 10px;
}

.kingdee-pending-table {
  min-width: 1040px;
}

.kingdee-compare-table tr.has-diff {
  background: #fff8e8;
}

.inventory-diff {
  font-weight: 900;
}

.inventory-diff.positive {
  color: #256d3c;
}

.inventory-diff.negative {
  color: #a43a3a;
}

.inventory-diff.neutral {
  color: var(--muted);
}

body.jonathan-workspace:not(.jonathan-light) .drawer-inventory-compare {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.2);
}

body.jonathan-workspace:not(.jonathan-light) .kingdee-compare-table tr.has-diff {
  background: rgba(146, 64, 14, 0.18);
}

body.jonathan-workspace:not(.jonathan-light) .inventory-diff.positive {
  color: #8de0a7;
}

body.jonathan-workspace:not(.jonathan-light) .inventory-diff.negative {
  color: #f2a6a6;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  gap: 6px;
  color: var(--ink);
  font-weight: 700;
}

.segmented input {
  width: auto;
  min-height: 0;
}

.order-search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) 100px;
  gap: 10px;
  align-items: end;
}

#backendView .order-search-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#backendView .order-search-grid button {
  grid-column: 1 / -1;
}

#backendView .query-card .order-search-grid button {
  grid-column: auto;
}

.db-compare-card {
  display: grid;
  gap: 12px;
}

.db-compare-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.db-compare-summary-grid section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.db-compare-result {
  display: grid;
  gap: 12px;
}

.order-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.query-report-grid {
  grid-column: 1 / -1;
  gap: 14px;
}

.order-report-card {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 92px;
  padding: 16px;
  color: #0f4c5c;
  text-align: left;
  background: linear-gradient(180deg, #f8fcfd, #eef7fa);
  border: 1px solid #cfe2ea;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.order-report-card:hover {
  transform: translateY(-1px);
  border-color: #b7d2dc;
  box-shadow: var(--shadow-sm);
}

.query-report-card-panel {
  min-height: 210px;
  padding: 20px;
}

.order-report-card strong {
  font-size: 15px;
}

.order-report-card span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.hk-mode-bar {
  display: grid;
  grid-template-columns: minmax(280px, 440px);
}

.hk-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.hk-dropzone {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "meta";
  justify-items: center;
  align-content: center;
  min-height: 150px;
  background:
    linear-gradient(135deg, rgba(23, 107, 135, 0.04), rgba(15, 76, 92, 0.03)),
    #fbfcfe;
}

.hk-dropzone strong {
  font-size: 18px;
}

.full-action {
  width: 100%;
  justify-content: center;
}

.hk-result-box {
  display: grid;
  gap: 12px;
}

.hk-result-box.ok {
  border-color: #b7e1c1;
  background: #f7fbf8;
}

.hk-result-box.error {
  color: #9d1c1c;
  border-color: #f2b7b7;
  background: #fff7f7;
}

.hk-result-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.hk-result-head > div,
.hk-result-head > button {
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid #d5e0e9;
  border-radius: 8px;
  background: #fff;
}

.hk-result-head span {
  display: block;
  color: #5d6b82;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hk-result-head strong {
  color: #001f3f;
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hk-upload-summary {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  color: #52647a;
  background: #fff;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hk-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.hk-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.hk-cipl-table {
  min-width: 1120px;
}

.hk-order-state-table {
  min-width: 1320px;
}

.hk-table th,
.hk-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e3e9f0;
  text-align: left;
  vertical-align: middle;
}

.hk-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #5d6b82;
  background: #f5f8fb;
  font-size: 12px;
  font-weight: 800;
}

.inventory-panel {
  gap: 18px;
}

.inventory-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 152px));
  gap: 12px;
  justify-content: start;
}

.inventory-panel-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.inventory-module-button {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 138px;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.inventory-module-button:hover,
.inventory-module-button.active {
  border-color: var(--accent);
  background: #eef8fb;
}

.inventory-module-button:focus-visible {
  outline: 3px solid rgba(47, 126, 148, 0.24);
  outline-offset: 2px;
}

.inventory-module-button span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 28px;
  border-radius: 8px;
  background: #e8f3f7;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.inventory-module-button strong {
  font-size: 17px;
  line-height: 1.2;
}

.inventory-module-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.inventory-module-panel {
  display: grid;
  gap: 12px;
}

.inventory-module-panel[hidden] {
  display: none;
}

.inventory-search-grid {
  display: grid;
  grid-template-columns: 180px minmax(180px, 1fr) minmax(220px, 1.2fr) 140px;
  gap: 12px;
  align-items: end;
}

.inventory-result-box {
  display: grid;
  gap: 12px;
}

.aeronex-warranty-panel {
  padding: 18px;
  border: 1px solid #dbe6ea;
  border-radius: 14px;
  background: linear-gradient(145deg, #fbfdfd 0%, #f3f8f8 100%);
}

.aeronex-warranty-filters {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) minmax(240px, 1fr);
  gap: 12px;
}

.aeronex-warranty-filters label {
  display: grid;
  gap: 6px;
  color: #415466;
  font-size: 12px;
  font-weight: 750;
}

.aeronex-warranty-filters input {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd9df;
  border-radius: 9px;
  background: #fff;
  color: #172b3a;
  font: inherit;
}

.aeronex-warranty-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  gap: 16px;
  min-height: 390px;
}

.aeronex-warranty-list,
.aeronex-warranty-detail {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe6ea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.aeronex-warranty-list {
  max-height: 620px;
  overflow: auto;
}

.aeronex-warranty-task {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbe4e8;
  border-radius: 10px;
  background: #fff;
  color: #1a3140;
  text-align: left;
}

button.aeronex-warranty-task {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button.aeronex-warranty-task:hover,
button.aeronex-warranty-task.active {
  border-color: #43889a;
  box-shadow: 0 7px 18px rgba(24, 80, 94, 0.1);
  transform: translateY(-1px);
}

.aeronex-warranty-task.is-pending {
  border-color: #ead9ad;
  background: #fffaf0;
}

.aeronex-warranty-task.is-blocked,
.aeronex-warranty-blocker {
  border-color: #e6c8c4;
  background: #fff5f3;
  color: #8a332b;
}

.aeronex-warranty-task-head,
.aeronex-warranty-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.aeronex-warranty-task strong,
.aeronex-warranty-detail h4 {
  color: #102737;
}

.aeronex-warranty-task em,
.aeronex-warranty-detail-head em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f3f4;
  color: #246978;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.aeronex-warranty-task small {
  color: #617485;
  line-height: 1.45;
}

.aeronex-warranty-detail-head span {
  color: #607585;
  font-size: 12px;
  font-weight: 750;
}

.aeronex-warranty-detail h4 {
  margin: 3px 0 0;
  font-size: 19px;
}

.aeronex-warranty-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.aeronex-warranty-facts div {
  min-width: 0;
  padding: 10px;
  border-radius: 9px;
  background: #f4f8f9;
}

.aeronex-warranty-facts dt {
  color: #6b7d8b;
  font-size: 11px;
}

.aeronex-warranty-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #183140;
  font-size: 13px;
  font-weight: 750;
}

.aeronex-warranty-phases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.aeronex-warranty-phase {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cbdde2;
  border-radius: 10px;
  background: #f5f9fa;
}

.aeronex-warranty-phase-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.aeronex-warranty-phase-head > div {
  min-width: 0;
}

.aeronex-warranty-phase-head strong,
.aeronex-warranty-phase-head small {
  display: block;
  overflow-wrap: anywhere;
}

.aeronex-warranty-phase-head strong {
  color: #173244;
  font-size: 13px;
}

.aeronex-warranty-phase-head small {
  margin-top: 3px;
  color: #5b7080;
  font-size: 10px;
  font-weight: 700;
}

.aeronex-warranty-phase-status {
  flex: 0 1 auto;
  max-width: 56%;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e6f0f2;
  color: #1f5a68;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.aeronex-warranty-phase.is-saved_draft .aeronex-warranty-phase-status,
.aeronex-warranty-phase.is-existing_verified .aeronex-warranty-phase-status {
  background: #e7f3ee;
  color: #245f50;
}

.aeronex-warranty-phase.is-reconciliation_required .aeronex-warranty-phase-status,
.aeronex-warranty-phase.is-state_unavailable .aeronex-warranty-phase-status {
  background: #fbecea;
  color: #8a332b;
}

.aeronex-warranty-phase-number {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.aeronex-warranty-phase-number span {
  color: #526b7c;
  font-size: 11px;
  font-weight: 700;
}

.aeronex-warranty-phase-number code {
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 6px;
  background: #e8f1f3;
  color: #173f4c;
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.aeronex-warranty-sn-block,
.aeronex-warranty-preview,
.aeronex-warranty-blocker {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe6ea;
  border-radius: 10px;
}

.aeronex-warranty-sn-block > span,
.aeronex-warranty-preview > strong {
  color: #274858;
  font-size: 12px;
  font-weight: 800;
}

.aeronex-warranty-sn-block > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow: auto;
}

.aeronex-warranty-sn-block code {
  padding: 4px 7px;
  border-radius: 6px;
  background: #edf4f5;
  color: #204f5c;
  font-size: 11px;
}

.aeronex-warranty-preview {
  border-color: #bcd8d2;
  background: #f0faf6;
  color: #315c52;
}

.aeronex-warranty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.aeronex-warranty-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  padding: 20px;
  color: #728491;
  text-align: center;
}

@media (max-width: 980px) {
  .aeronex-warranty-filters,
  .aeronex-warranty-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .aeronex-warranty-phases {
    grid-template-columns: 1fr;
  }
}

.drawer-result-box {
  min-height: 120px;
}

.drawer-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fbfd;
}

.inventory-drawer-form {
  grid-template-columns: 160px minmax(220px, 1fr) minmax(180px, 0.75fr) 128px;
  align-items: end;
}

.combo-drawer-form {
  grid-template-columns: minmax(220px, 1fr) 128px 138px;
  align-items: end;
}

.combo-add-form {
  grid-template-columns: 1fr;
}

.combo-add-form .combo-product-fields,
.combo-add-form .combo-component-list,
.combo-add-form .drawer-note,
.combo-add-form #comboAddSubmitBtn {
  grid-column: 1 / -1;
}

.combo-product-fields {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.15fr);
  gap: 10px;
}

.combo-component-list {
  display: grid;
  gap: 10px;
}

.combo-component-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.combo-component-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.combo-component-row-head strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.combo-component-row-actions {
  display: inline-flex;
  gap: 7px;
  flex: 0 0 auto;
}

.combo-component-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) minmax(96px, 0.35fr);
  gap: 10px;
}

.combo-add-component-row {
  color: #145c69;
  background: #e8f5f8;
  border-color: #a9ccd7;
}

.combo-remove-component-row {
  color: #8a1f11;
  background: #fff3ef;
  border-color: #f1c4ba;
}

.combo-save-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.combo-save-summary span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #badbcc;
  border-radius: 999px;
  background: #f3fbf6;
  color: #1d6d3a;
  font-size: 12px;
  font-weight: 800;
}

.combo-save-summary strong {
  color: inherit;
  font-size: inherit;
}

.combo-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.drawer-note {
  padding: 10px 12px;
  border: 1px solid #dce7ef;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.combo-result-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.combo-result-head > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.combo-result-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.combo-result-head strong {
  color: var(--ink);
  font-size: 16px;
  word-break: break-word;
}

.combo-split-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #b8d7c3;
  background: #e8f7ed;
  color: #176139;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.combo-split-badge.virtual {
  border-color: #ead089;
  background: #fff4cf;
  color: #8a5a00;
}

.combo-virtual-row td {
  background: #fffdf5;
}

.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.inventory-summary-card {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.inventory-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inventory-summary-card strong {
  color: var(--ink);
  font-size: 20px;
}

.auto-allocation-inbox {
  display: grid;
  gap: 12px;
}

.auto-allocation-toolbar {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fbfd;
}

.auto-allocation-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auto-allocation-search input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
}

.auto-allocation-segments,
.auto-allocation-export {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auto-allocation-segments button {
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.auto-allocation-segments button.active {
  border-color: var(--accent);
  background: #e8f3f7;
  color: var(--accent-dark);
}

.auto-allocation-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.auto-allocation-summary-card {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.auto-allocation-summary-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.auto-allocation-summary-card strong {
  color: var(--ink);
  font-size: 20px;
}

.auto-allocation-list {
  display: grid;
  gap: 10px;
}

.auto-allocation-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
}

.auto-allocation-item.ok {
  border-left-color: #2f855a;
}

.auto-allocation-item.warn {
  border-left-color: #b7791f;
}

.auto-allocation-item.pending {
  border-left-color: #2b6cb0;
}

.auto-allocation-item.error {
  border-left-color: #c2410c;
}

.auto-allocation-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.auto-allocation-item-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.auto-allocation-item-head strong {
  color: var(--ink);
  font-size: 16px;
  word-break: break-word;
}

.auto-allocation-item-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auto-allocation-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.auto-allocation-status.ok {
  background: #e4f6ec;
  color: #1f7a4d;
}

.auto-allocation-status.warn {
  background: #fff3d6;
  color: #8a5b0c;
}

.auto-allocation-status.pending {
  background: #e8f2ff;
  color: #255f9e;
}

.auto-allocation-status.error {
  background: #fee8dc;
  color: #c2410c;
}

.auto-allocation-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.auto-allocation-meta span,
.auto-allocation-note {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.auto-allocation-meta b,
.auto-allocation-note b {
  display: inline-block;
  margin-right: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.auto-allocation-note.error-text {
  color: #c2410c;
}

.auto-allocation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.auto-allocation-actions .compact-action {
  min-width: 120px;
}

.inventory-po-head {
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.inventory-po-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px;
  gap: 12px;
  align-items: stretch;
}

.inventory-cipl-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.inventory-cipl-grid #inboundCiPlPreviewBtn {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 180px;
}

.inventory-sn-upload-hint {
  margin: 8px 0 0;
  color: #8a4b08;
  font-size: 13px;
  font-weight: 650;
}

.inventory-cipl-grid .inventory-sn-upload {
  border: 2px solid #d99a2b;
  background: #fff9e8;
  box-shadow: 0 0 0 3px rgb(217 154 43 / 10%);
}

.inventory-cipl-grid .inventory-sn-upload:hover,
.inventory-cipl-grid .inventory-sn-upload:focus-within {
  border-color: #ad6a00;
  background: #fff4cf;
}

.inventory-upload-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #ad6a00;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
}

.dji-import-preview-shell {
  min-width: 0;
  max-width: 100%;
}

.dji-import-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  border-bottom: 1px solid var(--line, #d9e2ec);
}

.dji-import-tab {
  min-width: 0;
  padding: 9px 12px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  color: var(--muted, #667085);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.dji-import-tab:hover {
  color: var(--accent-dark, #176b87);
  background: #eef8fb;
}

.dji-import-tab[aria-selected="true"] {
  border-bottom-color: var(--accent, #2f7e94);
  color: var(--accent-dark, #176b87);
  background: #f5fafc;
}

.dji-import-tab:focus-visible {
  outline: 3px solid rgba(47, 126, 148, 0.24);
  outline-offset: 2px;
}

.dji-import-panel {
  min-width: 0;
  padding-top: 12px;
}

.dji-import-panel[hidden] {
  display: none;
}

.dji-import-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 8px;
  background: #fff;
}

.dji-import-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
}

.dji-import-inventory-table {
  min-width: 560px;
}

.dji-import-table th,
.dji-import-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e3e9f0;
  text-align: left;
  vertical-align: top;
}

.dji-import-table th {
  color: #475467;
  background: #f4f8fb;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dji-import-table tbody tr:last-child td {
  border-bottom: 0;
}

.dji-import-sn-list {
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dji-import-sn-list summary {
  color: var(--accent-dark, #176b87);
  font-weight: 750;
  cursor: pointer;
}

.dji-import-sn-list div {
  display: grid;
  gap: 3px;
  max-height: 132px;
  margin-top: 7px;
  overflow: auto;
}

.dji-import-sn-list code {
  color: var(--ink, #1f2937);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.dji-import-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}

.dji-import-action-row > span {
  color: var(--muted, #667085);
  font-size: 12px;
}

@media (max-width: 720px) {
  .dji-import-tabs {
    align-items: stretch;
  }

  .dji-import-tab {
    flex: 1 1 0;
  }
}

.inventory-subflow {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line, #d9e2ec);
}

.inventory-subflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.inventory-subflow-head h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 16px;
}

.inventory-subflow-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.inventory-warranty-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px;
  gap: 12px;
  align-items: stretch;
}

.kingdee-instock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 7px;
  background: var(--panel-soft, #f8fbfd);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.kingdee-instock-summary strong {
  color: var(--ink);
}

.inventory-match-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.manual-inbound-rows {
  display: grid;
  gap: 10px;
}

.manual-inbound-row {
  display: grid;
  grid-template-columns: 140px minmax(160px, 1fr) minmax(180px, 1fr) 110px minmax(180px, 1fr) 40px;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.manual-inbound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inventory-po-upload {
  min-height: 110px;
}

.inventory-status {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f6ec;
  color: #237542;
  font-size: 12px;
  font-weight: 800;
}

.inventory-status.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.inventory-status.combo {
  background: #e8f3f7;
  color: var(--accent-dark);
}

.hk-node-editor {
  margin-top: 2px;
}

.hk-action-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.hk-source-plan-row select,
.hk-source-plan-row input {
  width: 100%;
  min-height: 34px;
}

.hk-source-choice-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.hk-source-choice-card.ok {
  border-color: #b7dfc8;
}

.hk-source-choice-card.warn {
  border-color: #f2c76b;
  background: #fffdf6;
}

.hk-source-choice-card.error {
  border-color: #f3b4ac;
  background: #fff8f7;
}

.hk-source-choice-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.hk-source-choice-head > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hk-source-choice-head strong,
.hk-source-choice-head span {
  overflow-wrap: anywhere;
}

.hk-source-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hk-source-choice-grid > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #f8fbfd;
}

.hk-source-choice-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hk-source-choice-grid strong {
  color: var(--ink);
  font-size: 15px;
}

.hk-source-choice-message {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.hk-source-candidate-wrap {
  max-height: 360px;
}

.hk-source-candidate-table {
  min-width: 1420px;
}

.hk-reservation-table {
  min-width: 1280px;
}

.hk-source-allocation {
  width: 88px;
  min-height: 34px;
}

.hk-manual-packing-table {
  min-width: 1180px;
}

.hk-manual-packing-row input {
  width: 100%;
  min-width: 84px;
  min-height: 34px;
}

.hk-manual-packing-row .hk-manual-size {
  min-width: 128px;
}

.hk-approval-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.secondary-button.danger {
  color: #b42318;
  background: #fff1f0;
  border-color: #ffccc7;
}

.hk-order-search-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hk-lock-grid {
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.8fr) minmax(160px, 1fr) 120px minmax(220px, 1.2fr) 130px 130px 140px;
}

.hk-lock-grid button {
  align-self: end;
}

.hk-order-search-grid button {
  grid-column: auto;
  align-self: end;
}

.hk-state-editor {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 260px;
}

.hk-state-editor input {
  min-width: 0;
}

.hk-state-editor .secondary-button {
  min-height: 38px;
  padding: 8px 12px;
}

.hk-order-state-message {
  grid-column: 1 / -1;
  min-height: 16px;
  color: #667085;
  font-size: 12px;
}

.hk-order-state-message.ok {
  color: #16794a;
}

.hk-order-state-message.error {
  color: #c2410c;
}

.cipl-dropzone {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  grid-template-areas:
    "title button"
    "meta button";
  gap: 4px 14px;
  align-items: center;
  min-height: 104px;
  border: 1px dashed #95a7bb;
  border-radius: 8px;
  background: var(--soft);
  padding: 18px;
}

#backendView .cipl-dropzone {
  grid-template-columns: 1fr;
  grid-template-areas:
    "icon"
    "title"
    "meta"
    "button";
  gap: 8px;
  justify-items: center;
  align-content: center;
  min-height: 175px;
  padding: 18px;
  border: 2px dashed #b7c1cf;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 107, 135, 0.04), rgba(47, 158, 68, 0.035)),
    #fbfcfe;
}

.cipl-dropzone.dragging {
  border-color: var(--accent);
  background: #e8f3f7;
}

.cipl-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cipl-dropzone strong {
  grid-area: title;
  font-size: 16px;
}

#backendView .cipl-dropzone strong {
  text-align: center;
  font-size: 17px;
}

.cipl-dropzone span:not(.upload-icon) {
  grid-area: meta;
  color: var(--muted);
  font-size: 13px;
}

#backendView .cipl-dropzone span:not(.upload-icon) {
  text-align: center;
  font-size: 14px;
}

.cipl-dropzone button {
  grid-area: button;
  position: relative;
  z-index: 1;
  min-width: 150px;
}

#backendView .cipl-dropzone button {
  min-width: 190px;
  margin-top: 4px;
}

.cipl-pi-upload {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cipl-pi-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cipl-pi-upload label {
  position: relative;
  z-index: 1;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.cipl-pi-upload span {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#backendView .cipl-dropzone .upload-icon {
  grid-area: icon;
  position: relative;
  width: 44px;
  height: 42px;
  margin-bottom: 2px;
}

.cipl-dropzone span.upload-icon::before,
.cipl-dropzone span.upload-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
}

.cipl-dropzone span.upload-icon::before {
  background:
    linear-gradient(135deg, transparent 0 70%, #c9b39a 70% 100%),
    linear-gradient(90deg, #d7a56e 0 50%, #b98355 50% 100%);
  box-shadow: inset 0 -9px 0 rgba(91, 54, 34, 0.18);
  transform: perspective(80px) rotateX(14deg);
}

.cipl-dropzone span.upload-icon::after {
  width: 18px;
  height: 9px;
  left: 13px;
  top: 3px;
  border-radius: 2px;
  background: rgba(255, 237, 206, 0.72);
}

#backendView .cipl-dropzone.hk-dropzone {
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "meta";
  min-height: 150px;
  padding: 20px;
}

#backendView .cipl-dropzone.hk-dropzone strong {
  font-size: 18px;
}

.dispatch-plan-list {
  display: grid;
  gap: 8px;
}

.dispatch-plan-row {
  display: grid;
  grid-template-columns: 28px minmax(220px, 1.6fr) 90px 90px 110px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dispatch-plan-empty {
  min-height: 56px;
}

.compact-result {
  min-height: 38px;
}

.cancel-ci-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.cancel-ci-summary strong {
  color: var(--ink);
}

.cancel-ci-summary span {
  color: var(--muted);
  font-size: 13px;
}

.cancel-ci-detail-table {
  margin-top: 6px;
}

.compact-result:empty,
.result-box:empty {
  display: none;
}

.dispatch-plan-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.dispatch-plan-row input[type="number"] {
  min-height: 34px;
}

.dispatch-plan-row strong,
.dispatch-plan-row span {
  display: block;
}

.dispatch-plan-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 38, 0.38);
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 41;
  width: min(860px, calc(100vw - 24px));
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(15, 23, 38, 0.18);
}

.drawer-head,
.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.drawer-reuse-ci-control {
  min-width: min(360px, 48vw);
  margin-right: auto;
  text-align: left;
}

.drawer-reuse-ci-control input {
  min-height: 38px;
  font-weight: 700;
}

.drawer-head h2 {
  font-size: 18px;
}

.drawer-body {
  display: grid;
  gap: 14px;
  align-content: start;
  overflow: auto;
  padding: 16px 18px;
  font-size: 13px;
}

.drawer-body > * {
  min-width: 0;
}

.drawer-table {
  display: grid;
  min-width: 640px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

.drawer-table-head,
.drawer-table-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.drawer-table-head {
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  font-weight: 700;
}

.drawer-table-row {
  min-height: 42px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.reservation-detail-head,
.reservation-detail-row {
  grid-template-columns: 76px 120px 160px 180px 150px 70px 92px 160px;
}

.drawer-table-head span,
.drawer-table-row span {
  min-width: 0;
  padding: 8px 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.drawer-table-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.compact-items-table {
  min-width: 0;
  font-size: 13px;
}

.compact-items-table .drawer-table-head,
.compact-items-table .drawer-table-row {
  min-height: 38px;
}

.compact-items-table .drawer-table-head span,
.compact-items-table .drawer-table-row span {
  padding: 8px 10px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dispatch-items-summary {
  display: block;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  max-height: min(240px, 34vh);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #fff;
}

.dispatch-items-summary-head,
.dispatch-items-summary-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(260px, 1.7fr) 80px;
  align-items: center;
}

.dispatch-items-summary-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  font-weight: 800;
}

.dispatch-items-summary-row {
  min-height: 38px;
  height: auto;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
}

.dispatch-items-summary span {
  min-width: 0;
  padding: 7px 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dispatch-items-summary-head span:last-child,
.dispatch-items-summary-row span:last-child {
  text-align: center;
}

.compact-items-table .drawer-table-head span:last-child,
.compact-items-table .drawer-table-row span:last-child {
  text-align: center;
}

.goods-table .drawer-table-head,
.goods-table .drawer-table-row {
  grid-template-columns: 42px 160px 170px minmax(260px, 1fr) 76px 76px 100px;
}

.goods-pi-list {
  display: grid;
  gap: 16px;
}

.goods-pi-section {
  display: grid;
  gap: 8px;
}

.goods-pi-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 800;
}

.goods-pi-subtitle {
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.goods-pi-table {
  min-width: 0;
}

.goods-pi-table .drawer-table-head,
.goods-pi-table .drawer-table-row {
  grid-template-columns: 42px minmax(142px, 170px) minmax(240px, 1fr) 76px 86px 86px 104px;
}

.goods-shortage-table .drawer-table-head,
.goods-shortage-table .drawer-table-row {
  grid-template-columns: minmax(142px, 170px) minmax(240px, 1fr) 76px 86px;
}

.shortage-section {
  border-color: #f0c7c7;
  background: #fffafa;
}

.shortage-row {
  background: #fff7f7;
}

.shortage-qty {
  color: #b42318;
  font-weight: 900;
}

.goods-table input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.goods-table input[type="number"] {
  min-height: 34px;
  padding: 6px 8px;
}

.goods-table .drawer-table-row span:nth-child(3),
.pick-result-table .drawer-table-row span:first-child,
.pick-result-table .drawer-table-row span:nth-child(2) {
  white-space: nowrap;
  overflow-wrap: normal;
}

.goods-pi-table .drawer-table-row span:nth-child(2) {
  white-space: nowrap;
  overflow-wrap: normal;
}

.goods-pi-table .drawer-table-row span:nth-child(3) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.ship-to-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cfe0e8;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbfd, #fbfcfe);
}

.ship-to-form h3 {
  margin: 0;
  color: #0b1b33;
  font-size: 15px;
  line-height: 1.2;
}

.ship-to-form.compact {
  margin-top: 12px;
}

.ship-to-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ship-to-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ship-to-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ship-to-grid label {
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.ship-to-grid label.wide {
  grid-column: 1 / -1;
}

.ship-to-grid input {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d3dce8;
  border-radius: 6px;
  color: #111827;
  background: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.cipl-file-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.cipl-file-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cipl-file-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pick-result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
}

.pick-result-summary.compact {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.pick-result-summary div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.pick-result-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pick-result-summary strong {
  color: var(--ink);
  font-size: 17px;
}

.pick-result-summary .pick-result-id-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  line-height: 1.2;
}

.pick-result-table .drawer-table-head,
.pick-result-table .drawer-table-row {
  grid-template-columns: minmax(210px, 0.95fr) minmax(145px, 0.7fr) minmax(260px, 1.35fr) 64px;
}

.pick-result-table .drawer-table-head span,
.pick-result-table .drawer-table-row span {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.pick-result-table .drawer-table-head span:last-child,
.pick-result-table .drawer-table-row span:last-child {
  text-align: center;
}

.drawer-loading {
  display: grid;
  gap: 12px;
}

.drawer-loading-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe0e8;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbfd 0%, #eef7fa 100%);
}

.drawer-loading-main strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.drawer-loading-main span:not(.drawer-spinner) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.drawer-spinner {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 3px solid #cfe0e8;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: drawer-spin 0.8s linear infinite;
}

.error-state {
  border-color: #f2c3c3;
  background: var(--red-soft);
}

.error-state strong {
  color: var(--red);
}

@keyframes drawer-spin {
  to {
    transform: rotate(360deg);
  }
}

.lookup-detail-table {
  min-width: 780px;
}

.lookup-detail-table .drawer-table-head,
.lookup-detail-table .drawer-table-row {
  grid-template-columns: 180px 130px minmax(260px, 1fr) 110px 70px;
}

.dispatch-link-table .drawer-table-head,
.dispatch-link-table .drawer-table-row {
  grid-template-columns: 130px 190px 150px minmax(260px, 1fr) 70px;
}

.dispatch-link-table .drawer-table-row {
  min-height: 42px;
  font-size: 14px;
}

.dispatch-link-table .drawer-table-head span,
.dispatch-link-table .drawer-table-row span {
  padding: 8px 10px;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-link-table .drawer-table-head span {
  font-size: 12px;
}

.dispatch-detail-table {
  min-width: 0;
  overflow: visible;
}

.dispatch-detail-table .drawer-table-head,
.dispatch-detail-table .drawer-table-row {
  grid-template-columns: 170px minmax(260px, 1fr) 72px;
}

.dispatch-detail-table .drawer-table-row {
  min-height: 0;
  align-items: start;
}

.dispatch-detail-table .drawer-table-head span,
.dispatch-detail-table .drawer-table-row span {
  padding: 8px 10px;
}

.dispatch-detail-table .drawer-table-row span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-detail-table .drawer-table-row span:nth-child(2) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.dispatch-detail-table .drawer-table-head span:last-child,
.dispatch-detail-table .drawer-table-row span:last-child {
  text-align: center;
}

.drawer-ci-header {
  width: fit-content;
  min-width: 180px;
  display: grid;
  gap: 4px;
  padding: 9px 12px;
  border: 1px solid #cfe0e8;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbfd, #eef7fa);
}

.drawer-ci-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.drawer-ci-header strong {
  color: var(--accent-dark);
  font-size: 18px;
  line-height: 1.15;
}

.dispatch-node-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 9px;
}

.dispatch-node-field {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 9px 10px;
}

.dispatch-node-field.filled {
  border-color: #b7dec8;
  background: #f2fbf5;
}

.dispatch-node-field.readonly {
  background: #f8fafc;
}

.dispatch-node-field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.dispatch-node-field small {
  min-height: 14px;
  color: var(--muted);
  font-size: 11px;
}

.dispatch-node-field input,
.dispatch-node-field select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.lead-time-value {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 800;
}

.order-detail-table {
  min-width: 980px;
}

.order-detail-table .drawer-table-head,
.order-detail-table .drawer-table-row {
  grid-template-columns: 160px 130px 130px minmax(220px, 1fr) 70px 70px 70px 130px;
}

.order-summary-card,
.order-customer-block,
.order-pi-block,
.order-ci-block,
.order-shortage-block {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-summary-card {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 12px;
  background: var(--soft);
}

.order-summary-card strong {
  font-size: 18px;
}

.order-summary-card span {
  color: var(--muted);
  font-weight: 700;
}

.order-customer-block,
.order-pi-block,
.order-ci-block,
.order-shortage-block {
  padding: 12px;
}

.order-customer-head,
.order-pi-head,
.order-ci-head,
.order-shortage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.order-customer-head::-webkit-details-marker,
.order-pi-head::-webkit-details-marker,
.order-ci-head::-webkit-details-marker,
.order-shortage-head::-webkit-details-marker {
  display: none;
}

.order-customer-head strong,
.order-pi-head strong,
.order-ci-head strong,
.order-shortage-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-customer-head span,
.order-pi-head span,
.order-ci-head span,
.order-shortage-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.shortage-pill {
  color: #b7791f !important;
  background: #fff3cd;
  border-radius: 999px;
  padding: 4px 10px;
}

.order-shortage-block {
  border-color: #efd79a;
  background: #fffaf0;
}

.order-shortage-head strong {
  color: #9a6200;
}

.order-items-table {
  min-width: 600px;
}

.order-items-table .drawer-table-head,
.order-items-table .drawer-table-row {
  grid-template-columns: 170px minmax(260px, 1fr) 80px;
}

.order-shortage-table {
  min-width: 600px;
}

.order-shortage-table .drawer-table-head,
.order-shortage-table .drawer-table-row {
  grid-template-columns: 170px minmax(260px, 1fr) 100px;
}

.order-landing-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px);
  gap: 10px;
  align-items: center;
}

.order-landing-head strong {
  font-size: 18px;
}

.order-landing-head input {
  min-height: 38px;
}

.order-landing-head.scope-head {
  grid-template-columns: 1fr;
}

.order-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.order-scope-card {
  min-height: 112px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: linear-gradient(135deg, #ffffff 0%, #f4fbfd 100%);
  border: 1px solid #cfe0e8;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(24, 32, 47, 0.05);
}

.order-scope-card strong {
  min-width: 0;
  font-size: 18px;
}

.order-scope-card span,
.order-scope-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.order-scope-card em {
  color: #b7791f;
  background: #fff3cd;
  border-radius: 999px;
  padding: 4px 10px;
}

.order-scope-card:hover {
  border-color: #8fb9c6;
  box-shadow: 0 16px 34px rgba(23, 107, 135, 0.12);
}

.order-pi-flat-list {
  display: grid;
  gap: 8px;
}

.order-pi-flat {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-pi-flat-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: center;
}

.order-pi-flat-head.pi-only {
  grid-template-columns: minmax(0, 1fr);
}

.order-pi-main {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 110px 90px auto;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid transparent;
}

.order-pi-main.pi-only {
  grid-template-columns: minmax(0, 1fr);
}

.order-pi-main:hover {
  border-color: #cfe0e8;
  background: #f7fbfd;
}

.order-pi-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-pi-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-pi-detail-btn {
  min-height: 38px;
  padding: 0 10px;
}

.order-pi-inline-title {
  padding: 4px 6px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.order-pi-ci-panel {
  padding: 0 4px 4px;
}

.order-ci-list {
  display: grid;
  gap: 6px;
}

.order-ci-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  color: var(--ink);
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.order-ci-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-ci-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.order-ci-stack {
  display: grid;
  gap: 6px;
}

.order-ci-status-panel {
  padding-left: 10px;
}

.order-inline-panel {
  display: grid;
  gap: 10px;
}

.order-inline-title,
.order-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.order-ci-status-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-ci-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-ci-status-head strong {
  color: var(--ink);
  font-size: 16px;
}

.order-node-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.order-node-status {
  display: grid;
  gap: 3px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid #f2d4a3;
  border-radius: 8px;
  background: #fff8ea;
}

.order-node-status.ok {
  border-color: #b7e1c1;
  background: #f3fbf6;
}

.order-node-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.order-node-status strong {
  color: var(--ink);
  font-size: 15px;
}

.order-node-status em {
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.order-report-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.order-report-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(150px, 1fr) minmax(220px, 1.5fr) minmax(110px, 0.8fr) minmax(130px, 0.9fr);
  min-height: 42px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.order-report-row:first-child {
  border-top: 0;
}

.order-report-row.head {
  color: #475467;
  background: #f5f8fb;
  font-size: 12px;
  font-weight: 900;
}

.order-report-row span {
  min-width: 0;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.order-detail-title strong {
  font-size: 18px;
}

.order-detail-title span {
  color: var(--muted);
  font-weight: 800;
}

.order-inline-empty {
  padding: 10px;
}

.node-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.node-summary div,
.success-card,
.empty-state {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.node-summary strong,
.success-card strong {
  color: var(--ink);
}

.node-summary span,
.success-card span {
  color: var(--muted);
  font-size: 13px;
}

.drawer-link {
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  border-radius: 6px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.excel-preview-title {
  display: grid;
  gap: 4px;
}

.excel-preview-title strong {
  color: var(--ink);
  font-size: 16px;
}

.excel-preview-title span {
  color: var(--muted);
  font-size: 13px;
}

.preview-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 4px;
}

.preview-tab {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.preview-tab.active {
  background: var(--accent);
  color: #fff;
}

.excel-preview-frame {
  overflow: auto;
  max-height: calc(100vh - 190px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.excel-preview-frame img {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
  background: #fff;
}

.result-box {
  min-height: 42px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

#backendView .result-box {
  min-height: 0;
  padding: 8px;
}

#backendView #saveDatesBtn {
  justify-self: stretch;
  min-width: 0;
  padding-left: 16px;
  padding-right: 16px;
}

.result-row,
.task-card,
.log-row {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.result-row:first-child,
.task-card:first-child,
.log-row:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.result-row span,
.task-card span,
.log-row span {
  color: var(--muted);
  font-size: 12px;
}

.task-list,
.log-list {
  display: grid;
  gap: 10px;
}

.inline-drawer-result {
  display: grid;
  gap: 14px;
  width: 100%;
}

.inline-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-drawer-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.inline-drawer-body {
  display: grid;
  gap: 14px;
}

.inline-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.jonathan-workspace {
  background: #080a0f;
  color: #eef2f6;
  --jonathan-surface: #0e1117;
  --jonathan-surface-2: #121821;
  --jonathan-surface-3: #17202a;
  --jonathan-line: rgba(255, 255, 255, 0.09);
  --jonathan-muted: #94a3b8;
  --jonathan-accent: #67d4e8;
  --jonathan-accent-strong: #2f9cad;
  --jonathan-success: #8ce99a;
  --jonathan-warning: #ffd43b;
  --jonathan-danger: #ff8787;
}

:lang(zh-CN) body.jonathan-workspace {
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif;
}

:lang(en) body.jonathan-workspace {
  font-family: "Inter", "Aptos", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body.jonathan-workspace .app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background: #080a0f;
}

body.jonathan-workspace .sidebar {
  background: #070a0f;
  border-right-color: rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.24);
}

body.jonathan-workspace .brand-mark {
  background: #f7fafc;
  color: #0b0f14;
}

body.jonathan-workspace .brand span,
body.jonathan-workspace .side-tool span,
body.jonathan-workspace .side-tool div {
  color: #8d99aa;
}

body.jonathan-workspace .side-tool {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0d1219;
}

body.jonathan-workspace .nav-item {
  color: #aeb8c8;
  background: transparent;
  border-color: transparent;
}

body.jonathan-workspace .nav-item:hover {
  color: #f4f7fb;
  background: #101720;
  border-color: rgba(255, 255, 255, 0.08);
}

body.jonathan-workspace .nav-item.active {
  color: #f8fafc;
  background: #141b24;
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: inset 3px 0 0 #66d9e8;
}

body.jonathan-workspace .backend-scope-nav {
  border-left-color: rgba(255, 255, 255, 0.08);
}

body.jonathan-workspace .backend-scope-nav button {
  background: #0d1219;
  border-color: rgba(255, 255, 255, 0.08);
}

body.jonathan-workspace .backend-scope-nav button.active {
  background: #111923;
  border-color: rgba(102, 217, 232, 0.42);
}

body.jonathan-workspace .workspace {
  width: 100%;
  padding: 20px 24px 30px;
  gap: 18px;
  background: #080a0f;
}

body.jonathan-workspace .topbar {
  min-height: 54px;
  padding: 2px 0 0;
}

body.jonathan-workspace .eyebrow {
  color: #7b8797;
  letter-spacing: 0.08em;
}

body.jonathan-workspace #pageTitle {
  margin-top: 8px;
  color: #f7fafc;
  font-size: 24px;
}

body.jonathan-workspace .top-actions .language-toggle,
body.jonathan-workspace .user-badge,
body.jonathan-workspace .top-actions a,
body.jonathan-workspace .top-icon-button {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #101720;
  color: #dce4ef;
}

body.jonathan-workspace .top-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
}

body.jonathan-workspace .today-workspace-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 14px;
  align-items: stretch;
}

body.jonathan-workspace .today-workspace-panel[hidden] {
  display: none !important;
}

body.jonathan-workspace .today-workspace-main,
body.jonathan-workspace .workspace-info-panel,
body.jonathan-workspace .workspace-alerts-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #10141b;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

body.jonathan-workspace .today-workspace-main {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(420px, 1fr);
  gap: 18px;
  padding: 18px;
}

body.jonathan-workspace .workspace-label,
body.jonathan-workspace .workspace-section-label {
  color: #7dd3e8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.jonathan-workspace .today-headline {
  display: grid;
  gap: 10px;
  align-content: center;
}

body.jonathan-workspace .today-headline h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 26px;
  line-height: 1.16;
}

body.jonathan-workspace .today-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.jonathan-workspace .today-summary-line span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #0b1017;
  color: #b7c1cf;
  font-size: 12px;
  font-weight: 700;
}

body.jonathan-workspace .workspace-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.jonathan-workspace .workspace-kpi-card {
  min-height: 96px;
  display: grid;
  align-content: space-between;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #0b1017;
}

body.jonathan-workspace .workspace-kpi-card span {
  color: #8f9bad;
  font-size: 12px;
  font-weight: 800;
}

body.jonathan-workspace .workspace-kpi-card strong {
  color: #f7fafc;
  font-size: 28px;
  line-height: 1;
}

body.jonathan-workspace .workspace-kpi-card.good strong {
  color: #8ce99a;
}

body.jonathan-workspace .workspace-kpi-card.bad strong {
  color: #ff8787;
}

body.jonathan-workspace .backend-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 14px;
  align-items: start;
}

body.jonathan-workspace .backend-main-column,
body.jonathan-workspace .backend-rail-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

body.jonathan-workspace #quickActionsHeader {
  margin-top: 2px;
}

body.jonathan-workspace .backend-workbench-switch {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

body.jonathan-workspace #kingdeeSnTab {
  display: none !important;
}

body.jonathan-workspace .workbench-tab {
  min-height: 106px;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon meta";
  align-content: center;
  column-gap: 12px;
  row-gap: 4px;
  padding: 16px;
  color: #e8edf5;
  background: #10141b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

body.jonathan-workspace .workbench-tab svg {
  grid-area: icon;
  width: 28px;
  height: 28px;
  color: #80deea;
}

body.jonathan-workspace .workbench-tab strong {
  grid-area: title;
  color: #f8fafc;
  font-size: 16px;
}

body.jonathan-workspace .workbench-tab span {
  grid-area: meta;
  color: #8f9bad;
}

body.jonathan-workspace .workbench-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 232, 0.34);
  background: #141a23;
}

body.jonathan-workspace .workbench-tab.active {
  background: #17202b;
  border-color: rgba(125, 211, 232, 0.5);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 232, 0.18), 0 14px 32px rgba(0, 0, 0, 0.24);
}

body.jonathan-workspace #backendView .panel,
body.jonathan-workspace #backendView .backend-card,
body.jonathan-workspace #backendView .manual-ci-archive-card,
body.jonathan-workspace #backendView .query-report-card-panel,
body.jonathan-workspace #backendView .query-results-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: #10141b;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

body.jonathan-workspace #backendView .section-head.compact {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.jonathan-workspace #backendView .section-head.compact h3,
body.jonathan-workspace .workspace-panel-head h3 {
  color: #f8fafc;
}

body.jonathan-workspace #backendView label span,
body.jonathan-workspace #backendView .form-message,
body.jonathan-workspace #backendView .result-box {
  color: #94a3b8;
}

body.jonathan-workspace #backendView input,
body.jonathan-workspace #backendView select {
  color: #f8fafc;
  background: #0b1017;
  border-color: rgba(255, 255, 255, 0.1);
}

body.jonathan-workspace #backendView input:focus,
body.jonathan-workspace #backendView select:focus {
  outline: 3px solid rgba(102, 217, 232, 0.13);
  border-color: rgba(102, 217, 232, 0.5);
}

body.jonathan-workspace #backendView .primary-button {
  background: #2f9cad;
  color: #061014;
}

body.jonathan-workspace #backendView .secondary-button {
  color: #dceff5;
  background: #141c26;
  border-color: rgba(255, 255, 255, 0.1);
}

body.jonathan-workspace #backendView .status-pill {
  color: #a6f4c5;
  background: rgba(47, 158, 68, 0.13);
}

body.jonathan-workspace .workspace-info-panel,
body.jonathan-workspace .workspace-alerts-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

body.jonathan-workspace .workspace-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.jonathan-workspace .workspace-panel-head h3 {
  margin: 0;
  font-size: 15px;
}

body.jonathan-workspace .workspace-panel-head span {
  color: #8f9bad;
  font-size: 12px;
  font-weight: 800;
}

body.jonathan-workspace .workspace-task-list,
body.jonathan-workspace .workspace-activity-list,
body.jonathan-workspace .workspace-alert-list {
  display: grid;
  gap: 8px;
}

body.jonathan-workspace .workspace-task-item,
body.jonathan-workspace .workspace-alert-item,
body.jonathan-workspace .workspace-activity-item {
  min-height: 54px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: #0b1017;
  text-align: left;
}

body.jonathan-workspace .workspace-task-item {
  color: #e8edf5;
}

body.jonathan-workspace .workspace-task-item:hover {
  border-color: rgba(125, 211, 232, 0.34);
  background: #111923;
}

body.jonathan-workspace .workspace-task-item.done {
  border-color: rgba(140, 233, 154, 0.2);
  background: rgba(47, 158, 68, 0.09);
}

body.jonathan-workspace .workspace-task-item svg,
body.jonathan-workspace .workspace-alert-item svg {
  width: 20px;
  height: 20px;
  color: #80deea;
}

body.jonathan-workspace .workspace-task-item strong,
body.jonathan-workspace .workspace-alert-item strong,
body.jonathan-workspace .workspace-activity-item strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.25;
}

body.jonathan-workspace .workspace-task-item small,
body.jonathan-workspace .workspace-alert-item small,
body.jonathan-workspace .workspace-activity-item small {
  display: block;
  margin-top: 3px;
  color: #8f9bad;
  font-size: 12px;
  line-height: 1.35;
}

body.jonathan-workspace .workspace-activity-item {
  grid-template-columns: 52px minmax(0, 1fr);
}

body.jonathan-workspace .workspace-activity-item time {
  color: #7dd3e8;
  font-size: 12px;
  font-weight: 800;
}

body.jonathan-workspace .workspace-alert-item.warn svg {
  color: #ffd43b;
}

body.jonathan-workspace .workspace-alert-item.danger svg {
  color: #ff8787;
}

body.jonathan-workspace .workspace-alert-item.clear svg,
body.jonathan-workspace .workspace-task-item.done svg {
  color: #8ce99a;
}

body.jonathan-workspace .workspace-empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  color: #8f9bad;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #0b1017;
  font-size: 13px;
  font-weight: 700;
}

body.jonathan-workspace .workspace-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #0a0f15;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.jonathan-workspace .workspace-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #66d9e8;
}

body.jonathan-workspace .progress-panel p {
  margin: 0;
  color: #8f9bad;
  font-size: 13px;
  font-weight: 800;
}

body.jonathan-workspace .workspace {
  padding: 18px 22px 28px;
  gap: 14px;
}

body.jonathan-workspace .today-workspace-panel {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 12px;
}

body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(260px, 0.72fr) minmax(360px, 1fr);
  min-height: 126px;
  padding: 15px 16px;
  border-color: rgba(255, 255, 255, 0.075);
  background: #0e1117;
  box-shadow: none;
}

body.jonathan-workspace .today-headline {
  gap: 8px;
}

body.jonathan-workspace .today-headline h2 {
  font-size: 22px;
}

body.jonathan-workspace .today-summary-line span {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9aa6b8;
}

body.jonathan-workspace .workspace-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.jonathan-workspace .workspace-kpi-card {
  min-height: 78px;
  padding: 11px 12px;
  background: #0a0d12;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.jonathan-workspace .workspace-kpi-card strong {
  font-size: 24px;
}

body.jonathan-workspace .top-alerts {
  min-height: 126px;
  box-shadow: none;
}

body.jonathan-workspace .top-alerts .workspace-alert-list {
  gap: 6px;
}

body.jonathan-workspace .backend-workspace-grid {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 310px);
  gap: 12px;
}

body.jonathan-workspace .backend-main-column,
body.jonathan-workspace .backend-rail-column {
  gap: 10px;
}

body.jonathan-workspace #quickActionsHeader {
  display: none;
}

body.jonathan-workspace .backend-workbench-switch {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: #0e1117;
}

body.jonathan-workspace .workbench-tab {
  min-height: 46px;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-areas: "icon title";
  column-gap: 8px;
  padding: 8px 10px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

body.jonathan-workspace .workbench-tab svg {
  width: 18px;
  height: 18px;
}

body.jonathan-workspace .workbench-tab strong {
  font-size: 13px;
  line-height: 1.15;
}

body.jonathan-workspace .workbench-tab span {
  display: none;
}

body.jonathan-workspace .workbench-tab:hover {
  transform: none;
  background: #151b24;
  box-shadow: none;
}

body.jonathan-workspace .workbench-tab.active {
  background: linear-gradient(180deg, #173240, #11212b);
  border-color: rgba(103, 212, 232, 0.46);
  box-shadow: inset 0 0 0 1px rgba(103, 212, 232, 0.14);
}

body.jonathan-workspace .workbench-tab.active strong,
body.jonathan-workspace .workbench-tab.active svg {
  color: #f7fbff;
}

body.jonathan-workspace #backendView .panel,
body.jonathan-workspace #backendView .backend-card,
body.jonathan-workspace #backendView .manual-ci-archive-card,
body.jonathan-workspace #backendView .query-report-card-panel,
body.jonathan-workspace #backendView .query-results-card {
  background: #0e1117;
  box-shadow: none;
}

body.jonathan-workspace #backendView .backend-card {
  padding: 14px;
}

body.jonathan-workspace #backendView .section-head.compact {
  min-height: 24px;
  padding-bottom: 7px;
}

body.jonathan-workspace #backendView .section-head.compact h3 {
  font-size: 14px;
}

body.jonathan-workspace #backendView .backend-card > .section-head.compact {
  justify-content: flex-end;
}

body.jonathan-workspace #backendView .backend-card > .section-head.compact h3 {
  display: none;
}

body.jonathan-workspace #backendView .dispatch-controls {
  grid-template-columns: minmax(240px, 1fr) 40px minmax(128px, 150px);
}

body.jonathan-workspace .workspace-info-panel,
body.jonathan-workspace .workspace-alerts-panel {
  gap: 10px;
  padding: 12px;
  background: #0e1117;
  box-shadow: none;
}

body.jonathan-workspace .workspace-task-list,
body.jonathan-workspace .workspace-activity-list,
body.jonathan-workspace .workspace-alert-list {
  gap: 6px;
}

body.jonathan-workspace .workspace-task-item,
body.jonathan-workspace .workspace-alert-item,
body.jonathan-workspace .workspace-activity-item {
  min-height: 46px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: #0a0d12;
}

body.jonathan-workspace .workspace-activity-item {
  grid-template-columns: 44px minmax(0, 1fr);
}

body.jonathan-workspace .workspace-task-item strong,
body.jonathan-workspace .workspace-alert-item strong,
body.jonathan-workspace .workspace-activity-item strong {
  font-size: 12px;
}

body.jonathan-workspace .workspace-task-item small,
body.jonathan-workspace .workspace-alert-item small,
body.jonathan-workspace .workspace-activity-item small {
  margin-top: 2px;
  font-size: 11px;
}

body.jonathan-workspace .workspace-empty {
  min-height: 54px;
}

body.jonathan-workspace .progress-panel {
  order: 2;
}

body.jonathan-workspace .today-tasks-panel {
  order: 1;
}

body.jonathan-workspace .recent-activity-panel {
  order: 3;
}

body.jonathan-workspace .today-tasks-panel {
  display: none !important;
}

body.jonathan-workspace .workspace-label,
body.jonathan-workspace .workspace-section-label,
body.jonathan-workspace .eyebrow {
  text-transform: none;
}

body.jonathan-workspace #backendView .cipl-dropzone,
body.jonathan-workspace #backendView .cipl-dropzone.hk-dropzone,
body.jonathan-workspace #backendView .upload-box,
body.jonathan-workspace #backendView .transfer-upload-box,
body.jonathan-workspace #backendView .cipl-pi-upload {
  border-color: rgba(103, 212, 232, 0.24);
  background:
    linear-gradient(180deg, rgba(103, 212, 232, 0.08), rgba(103, 212, 232, 0.025)),
    #0a0f15;
  color: #edf6fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.jonathan-workspace #backendView .cipl-dropzone:hover,
body.jonathan-workspace #backendView .cipl-dropzone.hk-dropzone:hover,
body.jonathan-workspace #backendView .upload-box:hover,
body.jonathan-workspace #backendView .transfer-upload-box:hover,
body.jonathan-workspace #backendView .cipl-pi-upload:hover {
  border-color: rgba(103, 212, 232, 0.46);
  background:
    linear-gradient(180deg, rgba(103, 212, 232, 0.12), rgba(103, 212, 232, 0.04)),
    #0d151e;
}

body.jonathan-workspace #backendView .cipl-dropzone strong,
body.jonathan-workspace #backendView .hk-dropzone strong,
body.jonathan-workspace #backendView .upload-box strong,
body.jonathan-workspace #backendView .transfer-upload-box strong,
body.jonathan-workspace #backendView .cipl-pi-upload label {
  color: #f7fbff;
}

body.jonathan-workspace #backendView .cipl-dropzone span:not(.upload-icon),
body.jonathan-workspace #backendView .upload-box span,
body.jonathan-workspace #backendView .transfer-upload-box span,
body.jonathan-workspace #backendView .cipl-pi-upload span {
  color: var(--jonathan-muted);
  font-size: 12px;
}

.task-pool-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.task-pool-summary > div,
.task-pool-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-xs);
}

.task-pool-summary > div {
  min-height: 78px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 13px 14px;
}

.task-pool-summary span,
.task-pool-updated,
.task-pool-section header p,
.task-pool-item-meta,
.task-pool-ci-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-pool-summary strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.task-pool-updated {
  margin: 2px 0 0;
  font-weight: 700;
}

.task-pool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-pool-section {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.task-pool-section header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.task-pool-section header h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.task-pool-section header p {
  margin: 0;
}

.task-pool-section header > strong {
  min-width: 34px;
  text-align: right;
  color: var(--accent-dark);
  font-size: 24px;
  line-height: 1;
}

.task-pool-items {
  display: grid;
  gap: 8px;
}

.task-pool-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.task-pool-item-head {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.task-pool-item-head strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.task-pool-item-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-pool-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-pool-item-meta span,
.task-pool-ci-line {
  border-radius: 6px;
  background: rgba(23, 107, 135, 0.08);
  padding: 3px 7px;
  font-weight: 700;
}

.task-pool-detail-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.task-pool-detail-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.82fr) minmax(160px, 1.8fr) 48px;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.task-pool-detail-row:first-child {
  border-top: 0;
}

.task-pool-detail-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-pool-detail-row strong {
  text-align: right;
  color: var(--ink);
}

.task-pool-empty,
.task-pool-loading,
.task-pool-error {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.task-pool-error strong {
  color: var(--red);
}

body.jonathan-workspace #tasksView {
  display: none;
}

body.jonathan-workspace #tasksView.active {
  display: grid;
  gap: 12px;
}

body.jonathan-workspace .task-pool-summary > div,
body.jonathan-workspace .task-pool-section,
body.jonathan-workspace .task-pool-item,
body.jonathan-workspace .task-pool-detail-table {
  border-color: var(--jonathan-line);
  background: var(--jonathan-surface);
  box-shadow: none;
}

body.jonathan-workspace .task-pool-item {
  background: #0a0d12;
}

body.jonathan-workspace .task-pool-section header {
  border-bottom-color: var(--jonathan-line);
}

body.jonathan-workspace .task-pool-summary span,
body.jonathan-workspace .task-pool-updated,
body.jonathan-workspace .task-pool-section header p,
body.jonathan-workspace .task-pool-item-head span,
body.jonathan-workspace .task-pool-item-meta,
body.jonathan-workspace .task-pool-ci-line,
body.jonathan-workspace .task-pool-detail-row,
body.jonathan-workspace .task-pool-empty,
body.jonathan-workspace .task-pool-loading,
body.jonathan-workspace .task-pool-error {
  color: var(--jonathan-muted);
}

body.jonathan-workspace .task-pool-summary strong,
body.jonathan-workspace .task-pool-section header h3,
body.jonathan-workspace .task-pool-item-head strong,
body.jonathan-workspace .task-pool-detail-row strong {
  color: #f7fbff;
}

body.jonathan-workspace .task-pool-section header > strong {
  color: var(--jonathan-accent);
}

body.jonathan-workspace .task-pool-item-meta span,
body.jonathan-workspace .task-pool-ci-line {
  background: rgba(103, 212, 232, 0.1);
}

body.jonathan-workspace .task-pool-detail-row {
  border-top-color: var(--jonathan-line);
}

@media (max-width: 1050px) {
  .app-shell,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .frontend-grid,
  .backend-grid,
  .workbench-switch,
  .allocation-mode-grid,
  .workflow-summary-grid,
  .hk-upload-grid,
  .hk-result-head,
  .hk-action-row,
  .date-grid,
  .manual-ar-row,
  .reservation-actions,
  .reservation-bulk-actions,
  .reservation-summary,
  .customer-routing-grid,
  .inventory-search-grid,
  .inventory-summary-grid,
  .inventory-po-grid,
  .inventory-cipl-grid,
  .inventory-warranty-grid,
  .inventory-drawer-form,
  .combo-drawer-form,
  .combo-add-form,
  .combo-product-fields,
  .combo-component-fields,
  .combo-price-grid,
  .combo-result-head,
  .manual-inbound-row,
  .office-stock-controls,
  .office-stock-row,
  .transfer-upload-grid,
  .dispatch-controls,
  .ci-action-grid,
  .cipl-dropzone,
  .lookup-line,
  .manual-ci-search-line,
  .manual-ci-bind-line,
  .kingdee-sn-grid,
  .kingdee-sn-summary,
  .order-search-grid,
  .db-compare-summary-grid,
  .nodes-workbench,
  .query-workbench,
  .query-report-grid,
  body.jonathan-workspace .today-workspace-panel,
  body.jonathan-workspace .today-workspace-main,
  body.jonathan-workspace .workspace-kpi-grid,
  body.jonathan-workspace .backend-workspace-grid,
  body.jonathan-workspace .backend-workbench-switch,
  .task-pool-summary,
  .task-pool-grid,
  .task-pool-item-head,
  .dispatch-plan-row {
    grid-template-columns: 1fr;
  }

  .cipl-dropzone {
    grid-template-areas:
      "title"
      "meta"
      "button";
  }

  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #backendView {
    grid-template-columns: 1fr;
  }

  #backendView .panel {
    aspect-ratio: auto;
  }

  #backendView .dispatch-controls,
  body.jonathan-workspace #backendView .dispatch-controls,
  #backendView .cancel-ci-inline,
  #backendView .lookup-line,
  #backendView .manual-ci-search-line,
  #backendView .manual-ci-bind-line,
  #backendView .order-search-grid,
  #backendView .hk-order-search-grid,
  #backendView .manual-date-grid,
  #backendView .ci-action-grid.compact-actions {
    grid-template-columns: 1fr;
  }

  .order-landing-head,
  .order-scope-grid,
  .order-scope-card,
  .order-pi-flat-head,
  .order-pi-main {
    grid-template-columns: 1fr;
  }

  #backendView #saveDatesBtn {
    justify-self: stretch;
  }
}

/* Final Jonathan workbench overrides. Kept at EOF so legacy dark rules cannot win. */
body.jonathan-workspace .top-alerts {
  display: none !important;
}

body.jonathan-workspace .today-workspace-panel {
  grid-template-columns: minmax(0, 1fr);
}

body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(260px, 0.56fr) minmax(460px, 1fr);
}

body.jonathan-workspace .workspace-kpi-grid {
  grid-template-columns: repeat(4, minmax(128px, 1fr));
}

body.jonathan-workspace .workspace-kpi-card {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: left;
}

body.jonathan-workspace .workspace-kpi-card:hover,
body.jonathan-workspace .workspace-kpi-card.active {
  border-color: rgba(103, 212, 232, 0.46);
  background: #111923;
}

body.jonathan-workspace .backend-main-column {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

body.jonathan-workspace .backend-workbench-switch {
  position: sticky;
  top: 14px;
  grid-column: 1;
  grid-row: 1 / span 4;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 6px;
  padding: 8px;
}

body.jonathan-workspace .workbench-tab,
body.jonathan-workspace .workbench-subtab {
  min-height: 46px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-areas: none;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 7px;
}

body.jonathan-workspace .workbench-tab svg,
body.jonathan-workspace .workbench-subtab svg {
  grid-area: auto;
  width: 18px;
  height: 18px;
}

body.jonathan-workspace .workbench-tab strong {
  grid-area: auto;
}

body.jonathan-workspace .workbench-subtab {
  margin-left: 22px;
  min-height: 36px;
  color: var(--jonathan-muted);
  font-size: 12px;
}

body.jonathan-workspace .workspace-analytics-panel {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.jonathan-workspace .workspace-analytics-panel[hidden] {
  display: none !important;
}

body.jonathan-workspace .workspace-chart-card {
  min-height: 120px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--jonathan-line);
  border-radius: 8px;
  background: var(--jonathan-surface);
}

body.jonathan-workspace .workspace-chart-card h3 {
  margin: 0 0 8px;
  color: #f7fbff;
  font-size: 15px;
}

body.jonathan-workspace .workspace-chart-card p {
  margin: 3px 0 0;
  color: var(--jonathan-muted);
  font-size: 12px;
  font-weight: 800;
}

body.jonathan-workspace .workspace-donut {
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: conic-gradient(var(--jonathan-accent) calc(var(--value) * 1%), rgba(148, 163, 184, 0.18) 0);
  position: relative;
}

body.jonathan-workspace .workspace-donut::after {
  content: "";
  width: 58px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--jonathan-surface);
  position: absolute;
}

body.jonathan-workspace .workspace-donut span {
  position: relative;
  z-index: 1;
  color: #f7fbff;
  font-size: 15px;
  font-weight: 900;
}

body.jonathan-workspace .backend-workbench,
body.jonathan-workspace .nodes-workbench,
body.jonathan-workspace .query-workbench,
body.jonathan-workspace .kingdee-sn-workbench {
  grid-column: 2;
  min-width: 0;
}

body.jonathan-workspace .query-report-grid,
body.jonathan-workspace .workspace-progress-track {
  display: none;
}

body.jonathan-workspace .progress-panel p {
  color: #f7fbff;
  font-size: 14px;
}

body.jonathan-workspace .workspace-activity-item {
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 46px;
}

.task-pool-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.task-pool-tabs button {
  min-height: 70px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.task-pool-tabs button.active,
.task-pool-tabs button:hover {
  border-color: rgba(23, 107, 135, 0.38);
  background: rgba(23, 107, 135, 0.07);
}

.task-pool-tabs span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-pool-tabs svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.task-pool-tabs strong {
  color: var(--accent-dark);
  font-size: 24px;
}

.task-pool-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

body.jonathan-workspace .task-pool-tabs button {
  border-color: var(--jonathan-line);
  background: var(--jonathan-surface);
  color: #f7fbff;
}

body.jonathan-workspace .task-pool-tabs button.active,
body.jonathan-workspace .task-pool-tabs button:hover {
  border-color: rgba(103, 212, 232, 0.46);
  background: #111923;
}

body.jonathan-workspace .task-pool-tabs svg,
body.jonathan-workspace .task-pool-tabs strong {
  color: var(--jonathan-accent);
}

body.jonathan-workspace.jonathan-light {
  background: #f3f6fb;
  color: #132033;
  --jonathan-surface: #ffffff;
  --jonathan-surface-2: #f8fbff;
  --jonathan-surface-3: #edf4fb;
  --jonathan-line: #d8e2ee;
  --jonathan-muted: #5f6f84;
  --jonathan-accent: #176b87;
  --jonathan-accent-strong: #0f5b73;
  --jonathan-success: #238636;
  --jonathan-warning: #9a6700;
  --jonathan-danger: #c92a2a;
}

body.jonathan-workspace.jonathan-light .app-shell,
body.jonathan-workspace.jonathan-light .workspace {
  background: #f3f6fb;
}

body.jonathan-workspace.jonathan-light .sidebar,
body.jonathan-workspace.jonathan-light .side-tool,
body.jonathan-workspace.jonathan-light .today-workspace-main,
body.jonathan-workspace.jonathan-light .workspace-info-panel,
body.jonathan-workspace.jonathan-light .workspace-chart-card,
body.jonathan-workspace.jonathan-light .backend-workbench-switch,
body.jonathan-workspace.jonathan-light #backendView .panel,
body.jonathan-workspace.jonathan-light #backendView .backend-card,
body.jonathan-workspace.jonathan-light #backendView .query-results-card,
body.jonathan-workspace.jonathan-light .task-pool-tabs button,
body.jonathan-workspace.jonathan-light .task-pool-section,
body.jonathan-workspace.jonathan-light .task-pool-item,
body.jonathan-workspace.jonathan-light .task-pool-detail-table {
  border-color: #d8e2ee;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(20, 39, 63, 0.05);
}

body.jonathan-workspace.jonathan-light .brand-mark {
  background: #176b87;
  color: #ffffff;
}

body.jonathan-workspace.jonathan-light .brand strong,
body.jonathan-workspace.jonathan-light #pageTitle,
body.jonathan-workspace.jonathan-light .today-headline h2,
body.jonathan-workspace.jonathan-light .workspace-kpi-card strong,
body.jonathan-workspace.jonathan-light .workspace-chart-card h3,
body.jonathan-workspace.jonathan-light #backendView .section-head.compact h3,
body.jonathan-workspace.jonathan-light .workspace-panel-head h3,
body.jonathan-workspace.jonathan-light .task-pool-section header h3,
body.jonathan-workspace.jonathan-light .task-pool-item-head strong,
body.jonathan-workspace.jonathan-light .task-pool-detail-row strong,
body.jonathan-workspace.jonathan-light .workspace-activity-item strong {
  color: #132033;
}

body.jonathan-workspace.jonathan-light .brand span,
body.jonathan-workspace.jonathan-light .side-tool span,
body.jonathan-workspace.jonathan-light .side-tool div,
body.jonathan-workspace.jonathan-light .today-summary-line span,
body.jonathan-workspace.jonathan-light .workspace-kpi-card span,
body.jonathan-workspace.jonathan-light .workspace-chart-card p,
body.jonathan-workspace.jonathan-light .workspace-panel-head span,
body.jonathan-workspace.jonathan-light #backendView label span,
body.jonathan-workspace.jonathan-light #backendView .form-message,
body.jonathan-workspace.jonathan-light #backendView .result-box,
body.jonathan-workspace.jonathan-light .task-pool-updated,
body.jonathan-workspace.jonathan-light .task-pool-section header p,
body.jonathan-workspace.jonathan-light .task-pool-item-head span,
body.jonathan-workspace.jonathan-light .task-pool-item-meta,
body.jonathan-workspace.jonathan-light .task-pool-detail-row,
body.jonathan-workspace.jonathan-light .workspace-empty {
  color: #5f6f84;
}

body.jonathan-workspace.jonathan-light .nav-item {
  color: #53657d;
}

body.jonathan-workspace.jonathan-light .nav-item:hover,
body.jonathan-workspace.jonathan-light .nav-item.active,
body.jonathan-workspace.jonathan-light .workbench-tab:hover,
body.jonathan-workspace.jonathan-light .workbench-subtab:hover,
body.jonathan-workspace.jonathan-light .workbench-tab.active,
body.jonathan-workspace.jonathan-light .task-pool-tabs button.active,
body.jonathan-workspace.jonathan-light .task-pool-tabs button:hover,
body.jonathan-workspace.jonathan-light .workspace-kpi-card:hover,
body.jonathan-workspace.jonathan-light .workspace-kpi-card.active {
  border-color: rgba(23, 107, 135, 0.35);
  background: #e9f5fa;
  color: #0f4c5c;
}

body.jonathan-workspace.jonathan-light .workbench-tab.active strong,
body.jonathan-workspace.jonathan-light .workbench-tab.active svg,
body.jonathan-workspace.jonathan-light .workbench-tab:hover strong,
body.jonathan-workspace.jonathan-light .workbench-tab:hover svg {
  color: #0f4c5c;
}

body.jonathan-workspace.jonathan-light .top-actions .language-toggle,
body.jonathan-workspace.jonathan-light .top-actions a,
body.jonathan-workspace.jonathan-light .user-badge,
body.jonathan-workspace.jonathan-light .theme-toggle-button,
body.jonathan-workspace.jonathan-light .workbench-tab,
body.jonathan-workspace.jonathan-light .workbench-subtab {
  border-color: #d8e2ee;
  background: #ffffff;
  color: #132033;
}

body.jonathan-workspace.jonathan-light #backendView input,
body.jonathan-workspace.jonathan-light #backendView select {
  color: #132033;
  background: #ffffff;
  border-color: #cbd7e5;
}

body.jonathan-workspace.jonathan-light .workspace-kpi-card,
body.jonathan-workspace.jonathan-light .workspace-activity-item,
body.jonathan-workspace.jonathan-light .workspace-empty {
  border-color: #d8e2ee;
  background: #f8fbff;
}

body.jonathan-workspace.jonathan-light .workspace-donut::after {
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .workspace-donut span,
body.jonathan-workspace.jonathan-light .progress-panel p {
  color: #132033;
}

@media (max-width: 1050px) {
  body.jonathan-workspace .backend-workspace-grid,
  body.jonathan-workspace .backend-main-column,
  body.jonathan-workspace .today-workspace-main,
  body.jonathan-workspace .workspace-kpi-grid,
  body.jonathan-workspace .workspace-analytics-panel,
  .task-pool-tabs {
    grid-template-columns: 1fr;
  }

  body.jonathan-workspace .backend-workbench-switch,
  body.jonathan-workspace .workspace-analytics-panel,
  body.jonathan-workspace .backend-workbench,
  body.jonathan-workspace .nodes-workbench,
  body.jonathan-workspace .query-workbench,
  body.jonathan-workspace .kingdee-sn-workbench {
    grid-column: 1;
  }

  body.jonathan-workspace .backend-workbench-switch {
    position: static;
    grid-row: auto;
  }
}

/* Final Jonathan layout override: parent nav owns controls; canvas owns work. */
body.jonathan-workspace .backend-workbench-switch,
body.jonathan-workspace .task-pool-tabs {
  display: none !important;
}

body.jonathan-workspace .today-workspace-main {
  grid-template-columns: minmax(300px, 0.34fr) minmax(520px, 1fr) !important;
}

body.jonathan-workspace .workspace-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(128px, 1fr)) !important;
  gap: 10px;
}

body.jonathan-workspace .backend-main-column {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.jonathan-workspace .query-report-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

body.jonathan-workspace .query-card[hidden] {
  display: none !important;
}

body.jonathan-workspace .side-drawer {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1117;
  color: #f7fbff;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.38);
}

body.jonathan-workspace .drawer-head,
body.jonathan-workspace .drawer-actions {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0b0f15;
}

body.jonathan-workspace .drawer-head h2,
body.jonathan-workspace .drawer-body,
body.jonathan-workspace .order-report-head,
body.jonathan-workspace .order-inline-title,
body.jonathan-workspace .drawer-table-row span,
body.jonathan-workspace .dispatch-node-field span {
  color: #f7fbff;
}

body.jonathan-workspace .drawer-ci-header,
body.jonathan-workspace .order-ci-status-card,
body.jonathan-workspace .order-summary-card,
body.jonathan-workspace .order-customer-block,
body.jonathan-workspace .order-pi-block,
body.jonathan-workspace .order-ci-block,
body.jonathan-workspace .order-shortage-block {
  border-color: rgba(255, 255, 255, 0.1);
  background: #111923;
}

body.jonathan-workspace .drawer-ci-header span,
body.jonathan-workspace .dispatch-node-field small,
body.jonathan-workspace .order-report-row.head span,
body.jonathan-workspace .drawer-table-head span,
body.jonathan-workspace .order-node-status span,
body.jonathan-workspace .order-summary-card span {
  color: #94a3b8;
}

body.jonathan-workspace .drawer-ci-header strong,
body.jonathan-workspace .lead-time-value,
body.jonathan-workspace .order-ci-status-head strong,
body.jonathan-workspace .order-node-status strong,
body.jonathan-workspace .order-summary-card strong {
  color: #f7fbff;
}

body.jonathan-workspace .dispatch-node-field {
  border-color: rgba(255, 255, 255, 0.1);
  background: #101720;
}

body.jonathan-workspace .dispatch-node-field.filled {
  border-color: rgba(67, 191, 121, 0.34);
  background: rgba(22, 101, 52, 0.16);
}

body.jonathan-workspace .dispatch-node-field.readonly {
  background: #10141b;
}

body.jonathan-workspace .dispatch-node-field input,
body.jonathan-workspace .dispatch-node-field select,
body.jonathan-workspace .lead-time-value {
  border-color: rgba(255, 255, 255, 0.1);
  background: #080d13;
  color: #f7fbff;
}

body.jonathan-workspace .dispatch-node-field input:focus,
body.jonathan-workspace .dispatch-node-field select:focus {
  outline: 3px solid rgba(103, 212, 232, 0.14);
  border-color: rgba(103, 212, 232, 0.52);
}

body.jonathan-workspace .drawer-table-head,
body.jonathan-workspace .order-report-row.head {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151c26;
}

body.jonathan-workspace .drawer-table-row,
body.jonathan-workspace .order-report-row {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0e1117;
}

body.jonathan-workspace.jonathan-light .side-drawer {
  border-left-color: #d8e2ee;
  background: #ffffff;
  color: #132033;
  box-shadow: -18px 0 44px rgba(20, 39, 63, 0.12);
}

body.jonathan-workspace.jonathan-light .drawer-head,
body.jonathan-workspace.jonathan-light .drawer-actions {
  border-color: #d8e2ee;
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .drawer-head h2,
body.jonathan-workspace.jonathan-light .drawer-body,
body.jonathan-workspace.jonathan-light .order-report-head,
body.jonathan-workspace.jonathan-light .order-inline-title,
body.jonathan-workspace.jonathan-light .drawer-table-row span,
body.jonathan-workspace.jonathan-light .dispatch-node-field span,
body.jonathan-workspace.jonathan-light .drawer-ci-header strong,
body.jonathan-workspace.jonathan-light .lead-time-value,
body.jonathan-workspace.jonathan-light .order-ci-status-head strong,
body.jonathan-workspace.jonathan-light .order-node-status strong,
body.jonathan-workspace.jonathan-light .order-summary-card strong {
  color: #132033;
}

body.jonathan-workspace.jonathan-light .drawer-ci-header,
body.jonathan-workspace.jonathan-light .order-ci-status-card,
body.jonathan-workspace.jonathan-light .order-summary-card,
body.jonathan-workspace.jonathan-light .order-customer-block,
body.jonathan-workspace.jonathan-light .order-pi-block,
body.jonathan-workspace.jonathan-light .order-ci-block,
body.jonathan-workspace.jonathan-light .order-shortage-block,
body.jonathan-workspace.jonathan-light .dispatch-node-field,
body.jonathan-workspace.jonathan-light .drawer-table-row,
body.jonathan-workspace.jonathan-light .order-report-row {
  border-color: #d8e2ee;
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field.filled {
  border-color: #b7dec8;
  background: #f2fbf5;
}

body.jonathan-workspace.jonathan-light .drawer-table-head,
body.jonathan-workspace.jonathan-light .order-report-row.head {
  border-color: #d8e2ee;
  background: #f5f8fc;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field input,
body.jonathan-workspace.jonathan-light .dispatch-node-field select,
body.jonathan-workspace.jonathan-light .lead-time-value {
  border-color: #cbd7e5;
  background: #ffffff;
  color: #132033;
}

body.jonathan-workspace .workspace-analytics-panel,
body.jonathan-workspace .backend-workbench,
body.jonathan-workspace .nodes-workbench,
body.jonathan-workspace .query-workbench,
body.jonathan-workspace .kingdee-sn-workbench {
  grid-column: 1 !important;
}

body.jonathan-workspace .workspace-analytics-panel {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

body.jonathan-workspace .sidebar-subnav {
  border-left-color: rgba(255, 255, 255, 0.08);
}

body.jonathan-workspace .sidebar-subnav button {
  color: #9ba8ba;
}

body.jonathan-workspace .sidebar-subnav button:hover,
body.jonathan-workspace .sidebar-subnav button.active {
  border-color: rgba(103, 212, 232, 0.42);
  background: #111923;
  color: #f7fbff;
}

body.jonathan-workspace.jonathan-light .sidebar-subnav {
  border-left-color: #d8e2ee;
}

body.jonathan-workspace.jonathan-light .sidebar-subnav button {
  color: #5f7085;
}

body.jonathan-workspace.jonathan-light .sidebar-subnav button:hover,
body.jonathan-workspace.jonathan-light .sidebar-subnav button.active {
  border-color: rgba(23, 107, 135, 0.26);
  background: rgba(23, 107, 135, 0.08);
  color: #132033;
}

body.jonathan-workspace.jonathan-light .task-pool-subnav strong {
  color: #176b87;
}

@media (max-width: 1050px) {
  body.jonathan-workspace .workspace-analytics-panel {
    grid-template-columns: 1fr;
  }
}
/* EOF enforcement for ops workspace contrast and state handling. */
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .backend-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .nodes-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .query-workbench,
body.jonathan-workspace.backend-home-mode #backendDubaiWorkspace .kingdee-sn-workbench {
  display: none !important;
}

body.jonathan-workspace.backend-operation-mode #workspaceAnalyticsPanel,
body.jonathan-workspace.backend-operation-mode .workspace-analytics-panel {
  display: none !important;
}

body.jonathan-workspace.backend-home-mode .workspace-analytics-panel {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(340px, 1fr)) !important;
  gap: 16px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-chart-card {
  min-height: 174px !important;
  gap: 24px !important;
  padding: 24px 28px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-donut {
  width: 132px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-donut::after {
  width: 86px !important;
}

body.jonathan-workspace.backend-home-mode .workspace-donut span {
  font-size: 21px !important;
}

body.jonathan-workspace.jonathan-light {
  background: #edf3f8 !important;
  color: #0e1d2f !important;
  --jonathan-line: #b9c8d7;
  --jonathan-muted: #33465d;
  --jonathan-accent: #176b87;
}

body.jonathan-workspace.jonathan-light .workspace,
body.jonathan-workspace.jonathan-light .app-shell {
  background: #edf3f8 !important;
}

body.jonathan-workspace.jonathan-light .sidebar,
body.jonathan-workspace.jonathan-light .today-workspace-main,
body.jonathan-workspace.jonathan-light .workspace-info-panel,
body.jonathan-workspace.jonathan-light .workspace-chart-card,
body.jonathan-workspace.jonathan-light #backendView .panel,
body.jonathan-workspace.jonathan-light #backendView .backend-card,
body.jonathan-workspace.jonathan-light #backendView .query-results-card {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .nav-item,
body.jonathan-workspace.jonathan-light .workbench-tab,
body.jonathan-workspace.jonathan-light .workbench-subtab,
body.jonathan-workspace.jonathan-light .sidebar-subnav button,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card,
body.jonathan-workspace.jonathan-light .top-actions .language-toggle,
body.jonathan-workspace.jonathan-light .top-actions a,
body.jonathan-workspace.jonathan-light .theme-toggle-button,
body.jonathan-workspace.jonathan-light .user-badge {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #17304a !important;
}

body.jonathan-workspace.jonathan-light .nav-item:hover,
body.jonathan-workspace.jonathan-light .nav-item.active,
body.jonathan-workspace.jonathan-light .workbench-tab:hover,
body.jonathan-workspace.jonathan-light .workbench-tab.active,
body.jonathan-workspace.jonathan-light .workbench-subtab:hover,
body.jonathan-workspace.jonathan-light .workbench-subtab.active,
body.jonathan-workspace.jonathan-light .sidebar-subnav button:hover,
body.jonathan-workspace.jonathan-light .sidebar-subnav button.active,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card:hover,
body.jonathan-workspace.jonathan-light .sidebar-query-shortcuts .sidebar-query-card.active {
  border-color: #6f9db2 !important;
  background: #e4f2f8 !important;
  color: #0c2d3c !important;
}

body.jonathan-workspace.jonathan-light .brand strong,
body.jonathan-workspace.jonathan-light #pageTitle,
body.jonathan-workspace.jonathan-light .today-headline h2,
body.jonathan-workspace.jonathan-light .workspace-kpi-card strong,
body.jonathan-workspace.jonathan-light .workspace-chart-card h3,
body.jonathan-workspace.jonathan-light .workspace-activity-item strong,
body.jonathan-workspace.jonathan-light #backendView label span,
body.jonathan-workspace.jonathan-light #backendView .section-head.compact h3 {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .brand span,
body.jonathan-workspace.jonathan-light .side-tool span,
body.jonathan-workspace.jonathan-light .today-summary-line span,
body.jonathan-workspace.jonathan-light .workspace-kpi-card span,
body.jonathan-workspace.jonathan-light .workspace-chart-card p,
body.jonathan-workspace.jonathan-light .workspace-panel-head span,
body.jonathan-workspace.jonathan-light .drawer-table-row span,
body.jonathan-workspace.jonathan-light .order-report-row span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .workspace-label,
body.jonathan-workspace.jonathan-light .workspace-section-label,
body.jonathan-workspace.jonathan-light .eyebrow,
body.jonathan-workspace.jonathan-light .workspace-activity-item time {
  color: #176b87 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light #backendView input,
body.jonathan-workspace.jonathan-light #backendView select,
body.jonathan-workspace.jonathan-light #backendView textarea,
body.jonathan-workspace.jonathan-light .dispatch-node-field input,
body.jonathan-workspace.jonathan-light .dispatch-node-field select,
body.jonathan-workspace.jonathan-light .lead-time-value {
  border-color: #9fb0c2 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill,
body.jonathan-workspace.jonathan-light .status-pill {
  border: 1px solid #7ba2b4 !important;
  background: #e6f3f8 !important;
  color: #0e536a !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill.green,
body.jonathan-workspace.jonathan-light .status-pill.green {
  border-color: #6ea883 !important;
  background: #dff3e7 !important;
  color: #135b2c !important;
}

body.jonathan-workspace.jonathan-light #backendView .status-pill.amber,
body.jonathan-workspace.jonathan-light .status-pill.amber {
  border-color: #bf9652 !important;
  background: #fff2cf !important;
  color: #714d00 !important;
}

body.jonathan-workspace #backendView .cipl-dropzone,
body.jonathan-workspace #backendView .cipl-dropzone.hk-dropzone,
body.jonathan-workspace #backendView .upload-box,
body.jonathan-workspace #backendView .transfer-upload-box,
body.jonathan-workspace #backendView .cipl-pi-upload,
body.jonathan-workspace #backendView .kingdee-sn-upload {
  border: 1.5px dashed rgba(103, 212, 232, 0.42) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(103, 212, 232, 0.12), rgba(103, 212, 232, 0.04)), #0b1118 !important;
  color: #edf6fb !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone,
body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone.hk-dropzone,
body.jonathan-workspace.jonathan-light #backendView .upload-box,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload,
body.jonathan-workspace.jonathan-light #backendView .kingdee-sn-upload {
  border-color: #7591aa !important;
  background: linear-gradient(180deg, #ffffff, #f4f9fc) !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone strong,
body.jonathan-workspace.jonathan-light #backendView .hk-dropzone strong,
body.jonathan-workspace.jonathan-light #backendView .upload-box strong,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box strong,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload label,
body.jonathan-workspace.jonathan-light #backendView .kingdee-sn-upload span {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light #backendView .cipl-dropzone span:not(.upload-icon),
body.jonathan-workspace.jonathan-light #backendView .upload-box span,
body.jonathan-workspace.jonathan-light #backendView .transfer-upload-box span,
body.jonathan-workspace.jonathan-light #backendView .cipl-pi-upload span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .drawer-body,
body.jonathan-workspace.jonathan-light .inline-drawer-body,
body.jonathan-workspace.jonathan-light .dispatch-node-field,
body.jonathan-workspace.jonathan-light .drawer-ci-header,
body.jonathan-workspace.jonathan-light .drawer-table-row,
body.jonathan-workspace.jonathan-light .order-report-row {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .dispatch-node-field.filled {
  border-color: #7ab28c !important;
  background: #edf8f1 !important;
}

@media (max-width: 1050px) {
  body.jonathan-workspace.backend-home-mode .workspace-analytics-panel {
    grid-template-columns: 1fr !important;
  }
}
/* EOF global upload surfaces: frontend and backend use one visual language. */
body.jonathan-workspace .upload-box,
body.jonathan-workspace .transfer-upload-box,
body.jonathan-workspace .cipl-dropzone,
body.jonathan-workspace .cipl-dropzone.hk-dropzone,
body.jonathan-workspace .cipl-pi-upload,
body.jonathan-workspace .kingdee-sn-upload {
  border: 1.5px dashed rgba(103, 212, 232, 0.42) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(103, 212, 232, 0.12), rgba(103, 212, 232, 0.04)), #0b1118 !important;
  color: #edf6fb !important;
}

body.jonathan-workspace .upload-box strong,
body.jonathan-workspace .transfer-upload-box strong,
body.jonathan-workspace .cipl-dropzone strong,
body.jonathan-workspace .cipl-pi-upload label,
body.jonathan-workspace .kingdee-sn-upload span {
  color: #f7fbff !important;
}

body.jonathan-workspace .upload-box span,
body.jonathan-workspace .transfer-upload-box span,
body.jonathan-workspace .cipl-dropzone span:not(.upload-icon),
body.jonathan-workspace .cipl-pi-upload span {
  color: #9fb0c1 !important;
}

body.jonathan-workspace.jonathan-light .upload-box,
body.jonathan-workspace.jonathan-light .transfer-upload-box,
body.jonathan-workspace.jonathan-light .cipl-dropzone,
body.jonathan-workspace.jonathan-light .cipl-dropzone.hk-dropzone,
body.jonathan-workspace.jonathan-light .cipl-pi-upload,
body.jonathan-workspace.jonathan-light .kingdee-sn-upload {
  border-color: #7591aa !important;
  background: linear-gradient(180deg, #ffffff, #f4f9fc) !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .upload-box:hover,
body.jonathan-workspace.jonathan-light .transfer-upload-box:hover,
body.jonathan-workspace.jonathan-light .cipl-dropzone:hover,
body.jonathan-workspace.jonathan-light .cipl-pi-upload:hover,
body.jonathan-workspace.jonathan-light .kingdee-sn-upload:hover {
  border-color: #176b87 !important;
  background: #edf8fc !important;
}

body.jonathan-workspace.jonathan-light .upload-box strong,
body.jonathan-workspace.jonathan-light .transfer-upload-box strong,
body.jonathan-workspace.jonathan-light .cipl-dropzone strong,
body.jonathan-workspace.jonathan-light .cipl-pi-upload label,
body.jonathan-workspace.jonathan-light .kingdee-sn-upload span {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .upload-box span,
body.jonathan-workspace.jonathan-light .transfer-upload-box span,
body.jonathan-workspace.jonathan-light .cipl-dropzone span:not(.upload-icon),
body.jonathan-workspace.jonathan-light .cipl-pi-upload span {
  color: #33465d !important;
}

/* Frontend workspace pass: move operation selectors to the sidebar and normalize contrast. */
body.jonathan-workspace .front-workbench-switch,
body.jonathan-workspace #frontendView .inventory-module-grid {
  display: none !important;
}

body.jonathan-workspace .frontend-subnav,
body.jonathan-workspace .front-inventory-subnav {
  display: grid;
  gap: 8px;
}

body.jonathan-workspace .frontend-subnav[hidden],
body.jonathan-workspace .front-inventory-subnav[hidden] {
  display: none !important;
}

body.jonathan-workspace .frontend-subnav {
  margin: -4px 0 14px 28px;
  padding: 4px 0 6px 12px;
  border-left: 1px solid rgba(126, 151, 176, 0.32);
}

body.jonathan-workspace .front-inventory-subnav {
  margin: -2px 0 4px 10px;
  padding: 2px 0 2px 10px;
  border-left: 1px solid rgba(126, 151, 176, 0.24);
}

body.jonathan-workspace .frontend-subnav button,
body.jonathan-workspace .front-inventory-subnav button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #b9c6d8;
  text-align: left;
  cursor: pointer;
}

body.jonathan-workspace .front-inventory-subnav button {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
}

body.jonathan-workspace .frontend-subnav button svg,
body.jonathan-workspace .front-inventory-subnav button svg {
  width: 18px;
  height: 18px;
  color: currentColor;
}

body.jonathan-workspace .frontend-subnav button span,
body.jonathan-workspace .front-inventory-subnav button span {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.jonathan-workspace .frontend-subnav button:hover,
body.jonathan-workspace .frontend-subnav button.active,
body.jonathan-workspace .front-inventory-subnav button:hover,
body.jonathan-workspace .front-inventory-subnav button.active {
  border-color: rgba(103, 212, 232, 0.38);
  background: rgba(103, 212, 232, 0.12);
  color: #e9fbff;
}

body.jonathan-workspace #frontendView {
  display: grid;
  gap: 16px;
}

body.jonathan-workspace #frontendView .front-workbench {
  min-width: 0;
}

body.jonathan-workspace #frontendView .front-workbench[hidden],
body.jonathan-workspace #frontendView .inventory-module-panel[hidden] {
  display: none !important;
}

body.jonathan-workspace:not(.jonathan-light) .app-shell,
body.jonathan-workspace:not(.jonathan-light) .workspace,
body.jonathan-workspace:not(.jonathan-light) #frontendView {
  background: #070b11 !important;
  color: #edf6fb !important;
}

body.jonathan-workspace:not(.jonathan-light) .sidebar,
body.jonathan-workspace:not(.jonathan-light) .side-tool,
body.jonathan-workspace:not(.jonathan-light) .nav-item,
body.jonathan-workspace:not(.jonathan-light) .top-actions .language-toggle,
body.jonathan-workspace:not(.jonathan-light) .top-actions a,
body.jonathan-workspace:not(.jonathan-light) .theme-toggle-button,
body.jonathan-workspace:not(.jonathan-light) .user-badge,
body.jonathan-workspace:not(.jonathan-light) #frontendView .panel,
body.jonathan-workspace:not(.jonathan-light) #frontendView .workbench-panel,
body.jonathan-workspace:not(.jonathan-light) #frontendView .task-section,
body.jonathan-workspace:not(.jonathan-light) #frontendView .inventory-panel,
body.jonathan-workspace:not(.jonathan-light) #frontendView .inventory-panel-tools,
body.jonathan-workspace:not(.jonathan-light) #frontendView .inventory-module-panel,
body.jonathan-workspace:not(.jonathan-light) #frontendView .manual-inbound-row,
body.jonathan-workspace:not(.jonathan-light) #frontendView .manual-inbound-actions,
body.jonathan-workspace:not(.jonathan-light) #frontendView .reservation-panel,
body.jonathan-workspace:not(.jonathan-light) #frontendView .transfer-cipl-panel,
body.jonathan-workspace:not(.jonathan-light) #frontendView .customer-routing-box,
body.jonathan-workspace:not(.jonathan-light) #frontendView .pi-cancel-box,
body.jonathan-workspace:not(.jonathan-light) #frontendView .pi-edit-box,
body.jonathan-workspace:not(.jonathan-light) #frontendView .pi-edit-item,
body.jonathan-workspace:not(.jonathan-light) #frontendView .pi-edit-stats div {
  border-color: #243142 !important;
  background: #0e1117 !important;
  color: #edf6fb !important;
  box-shadow: none !important;
}

body.jonathan-workspace:not(.jonathan-light) #frontendView h2,
body.jonathan-workspace:not(.jonathan-light) #frontendView h3,
body.jonathan-workspace:not(.jonathan-light) #frontendView h4,
body.jonathan-workspace:not(.jonathan-light) #frontendView strong,
body.jonathan-workspace:not(.jonathan-light) .side-tool strong,
body.jonathan-workspace:not(.jonathan-light) .brand strong,
body.jonathan-workspace:not(.jonathan-light) #pageTitle {
  color: #f8fbff !important;
  opacity: 1 !important;
}

body.jonathan-workspace:not(.jonathan-light) #frontendView p,
body.jonathan-workspace:not(.jonathan-light) #frontendView label span,
body.jonathan-workspace:not(.jonathan-light) #frontendView small,
body.jonathan-workspace:not(.jonathan-light) .side-tool span,
body.jonathan-workspace:not(.jonathan-light) .brand span,
body.jonathan-workspace:not(.jonathan-light) .eyebrow {
  color: #aab8cc !important;
  opacity: 1 !important;
}

body.jonathan-workspace:not(.jonathan-light) #frontendView input,
body.jonathan-workspace:not(.jonathan-light) #frontendView select,
body.jonathan-workspace:not(.jonathan-light) #frontendView textarea,
body.jonathan-workspace:not(.jonathan-light) .side-tool input,
body.jonathan-workspace:not(.jonathan-light) .side-tool select,
body.jonathan-workspace:not(.jonathan-light) .side-tool textarea {
  border-color: #314156 !important;
  background: #090f17 !important;
  color: #f8fafc !important;
}

body.jonathan-workspace:not(.jonathan-light) #frontendView input::placeholder,
body.jonathan-workspace:not(.jonathan-light) .side-tool input::placeholder {
  color: #738299 !important;
}

body.jonathan-workspace:not(.jonathan-light) #frontendView .upload-box,
body.jonathan-workspace:not(.jonathan-light) #frontendView .reservation-upload,
body.jonathan-workspace:not(.jonathan-light) #frontendView .cipl-dropzone,
body.jonathan-workspace:not(.jonathan-light) #frontendView .transfer-upload-box {
  border-color: rgba(103, 212, 232, 0.42) !important;
  background: linear-gradient(180deg, rgba(103, 212, 232, 0.12), rgba(103, 212, 232, 0.04)), #0b1118 !important;
  color: #edf6fb !important;
}

body.jonathan-workspace.jonathan-light .app-shell,
body.jonathan-workspace.jonathan-light .workspace,
body.jonathan-workspace.jonathan-light #frontendView {
  background: #edf3f8 !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .sidebar {
  border-right-color: #b8c8d9 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .brand strong,
body.jonathan-workspace.jonathan-light .side-tool strong,
body.jonathan-workspace.jonathan-light .nav-item .nav-label,
body.jonathan-workspace.jonathan-light .frontend-subnav button span,
body.jonathan-workspace.jonathan-light .front-inventory-subnav button span,
body.jonathan-workspace.jonathan-light #pageTitle,
body.jonathan-workspace.jonathan-light #frontendView h2,
body.jonathan-workspace.jonathan-light #frontendView h3,
body.jonathan-workspace.jonathan-light #frontendView h4,
body.jonathan-workspace.jonathan-light #frontendView strong {
  color: #0e1d2f !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light .brand span,
body.jonathan-workspace.jonathan-light .side-tool span,
body.jonathan-workspace.jonathan-light #frontendView p,
body.jonathan-workspace.jonathan-light #frontendView label span,
body.jonathan-workspace.jonathan-light #frontendView small,
body.jonathan-workspace.jonathan-light .eyebrow {
  color: #37506b !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light .nav-item,
body.jonathan-workspace.jonathan-light .frontend-subnav button,
body.jonathan-workspace.jonathan-light .front-inventory-subnav button,
body.jonathan-workspace.jonathan-light .side-tool,
body.jonathan-workspace.jonathan-light .top-actions .language-toggle,
body.jonathan-workspace.jonathan-light .top-actions a,
body.jonathan-workspace.jonathan-light .theme-toggle-button,
body.jonathan-workspace.jonathan-light .user-badge,
body.jonathan-workspace.jonathan-light #frontendView .panel,
body.jonathan-workspace.jonathan-light #frontendView .workbench-panel,
body.jonathan-workspace.jonathan-light #frontendView .task-section,
body.jonathan-workspace.jonathan-light #frontendView .inventory-panel,
body.jonathan-workspace.jonathan-light #frontendView .inventory-panel-tools,
body.jonathan-workspace.jonathan-light #frontendView .inventory-module-panel,
body.jonathan-workspace.jonathan-light #frontendView .manual-inbound-row,
body.jonathan-workspace.jonathan-light #frontendView .manual-inbound-actions,
body.jonathan-workspace.jonathan-light #frontendView .reservation-panel,
body.jonathan-workspace.jonathan-light #frontendView .transfer-cipl-panel,
body.jonathan-workspace.jonathan-light #frontendView .customer-routing-box,
body.jonathan-workspace.jonathan-light #frontendView .pi-cancel-box,
body.jonathan-workspace.jonathan-light #frontendView .pi-edit-box,
body.jonathan-workspace.jonathan-light #frontendView .pi-edit-item,
body.jonathan-workspace.jonathan-light #frontendView .pi-edit-stats div {
  border-color: #b8c8d9 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
  box-shadow: 0 10px 24px rgba(15, 31, 51, 0.06) !important;
}

body.jonathan-workspace.jonathan-light .nav-item:hover,
body.jonathan-workspace.jonathan-light .nav-item.active,
body.jonathan-workspace.jonathan-light .frontend-subnav button:hover,
body.jonathan-workspace.jonathan-light .frontend-subnav button.active,
body.jonathan-workspace.jonathan-light .front-inventory-subnav button:hover,
body.jonathan-workspace.jonathan-light .front-inventory-subnav button.active {
  border-color: #6f9db2 !important;
  background: #e3f1f7 !important;
  color: #0c2d3c !important;
}

body.jonathan-workspace.jonathan-light #frontendView input,
body.jonathan-workspace.jonathan-light #frontendView select,
body.jonathan-workspace.jonathan-light #frontendView textarea,
body.jonathan-workspace.jonathan-light .side-tool input,
body.jonathan-workspace.jonathan-light .side-tool select,
body.jonathan-workspace.jonathan-light .side-tool textarea {
  border-color: #95a9bd !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light #frontendView input::placeholder,
body.jonathan-workspace.jonathan-light .side-tool input::placeholder {
  color: #6a7d93 !important;
}

body.jonathan-workspace.jonathan-light .side-tool .secondary-button,
body.jonathan-workspace.jonathan-light #frontendView .secondary-button,
body.jonathan-workspace.jonathan-light #frontendView .primary-button {
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light button:disabled,
body.jonathan-workspace.jonathan-light .secondary-button:disabled,
body.jonathan-workspace.jonathan-light .primary-button:disabled {
  border-color: #a7b7c7 !important;
  background: #dce9f1 !important;
  color: #254357 !important;
  opacity: 0.74 !important;
}

/* Role and contrast safety floor. These rules intentionally stay at EOF. */
.view[hidden],
.view:not(.active),
body.jonathan-workspace #frontendView[hidden],
body.jonathan-workspace #backendView[hidden],
body.jonathan-workspace #tasksView[hidden],
body.jonathan-workspace #logsView[hidden] {
  display: none !important;
}

body.jonathan-workspace:not(.jonathan-light) .panel,
body.jonathan-workspace:not(.jonathan-light) .backend-card,
body.jonathan-workspace:not(.jonathan-light) .task-section,
body.jonathan-workspace:not(.jonathan-light) .workbench-panel,
body.jonathan-workspace:not(.jonathan-light) .result-box,
body.jonathan-workspace:not(.jonathan-light) .side-tool,
body.jonathan-workspace:not(.jonathan-light) .side-drawer,
body.jonathan-workspace:not(.jonathan-light) .drawer-body,
body.jonathan-workspace:not(.jonathan-light) .inline-drawer-body,
body.jonathan-workspace:not(.jonathan-light) .dispatch-node-field,
body.jonathan-workspace:not(.jonathan-light) .drawer-ci-header,
body.jonathan-workspace:not(.jonathan-light) .drawer-table-row,
body.jonathan-workspace:not(.jonathan-light) .order-report-row {
  border-color: #263448 !important;
  background: #0e1117 !important;
  color: #edf6fb !important;
}

body.jonathan-workspace:not(.jonathan-light) label span,
body.jonathan-workspace:not(.jonathan-light) small,
body.jonathan-workspace:not(.jonathan-light) p,
body.jonathan-workspace:not(.jonathan-light) .form-message,
body.jonathan-workspace:not(.jonathan-light) .result-box,
body.jonathan-workspace:not(.jonathan-light) .workspace-panel-head span,
body.jonathan-workspace:not(.jonathan-light) .workspace-activity-item span {
  color: #aebdd0 !important;
  opacity: 1 !important;
}

body.jonathan-workspace:not(.jonathan-light) input,
body.jonathan-workspace:not(.jonathan-light) select,
body.jonathan-workspace:not(.jonathan-light) textarea {
  border-color: #33465c !important;
  background: #080d14 !important;
  color: #f8fbff !important;
}

body.jonathan-workspace:not(.jonathan-light) button:disabled,
body.jonathan-workspace:not(.jonathan-light) .secondary-button:disabled,
body.jonathan-workspace:not(.jonathan-light) .primary-button:disabled {
  border-color: #2c3b4f !important;
  background: #151e29 !important;
  color: #91a2b8 !important;
  opacity: 0.82 !important;
}

body.jonathan-workspace.jonathan-light .panel,
body.jonathan-workspace.jonathan-light .backend-card,
body.jonathan-workspace.jonathan-light .task-section,
body.jonathan-workspace.jonathan-light .workbench-panel,
body.jonathan-workspace.jonathan-light .result-box,
body.jonathan-workspace.jonathan-light .side-tool,
body.jonathan-workspace.jonathan-light .side-drawer,
body.jonathan-workspace.jonathan-light .drawer-body,
body.jonathan-workspace.jonathan-light .inline-drawer-body,
body.jonathan-workspace.jonathan-light .dispatch-node-field,
body.jonathan-workspace.jonathan-light .drawer-ci-header,
body.jonathan-workspace.jonathan-light .drawer-table-row,
body.jonathan-workspace.jonathan-light .order-report-row {
  border-color: #b5c5d6 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light label span,
body.jonathan-workspace.jonathan-light small,
body.jonathan-workspace.jonathan-light p,
body.jonathan-workspace.jonathan-light .form-message,
body.jonathan-workspace.jonathan-light .result-box,
body.jonathan-workspace.jonathan-light .workspace-panel-head span,
body.jonathan-workspace.jonathan-light .workspace-activity-item span {
  color: #354b64 !important;
  opacity: 1 !important;
}

body.jonathan-workspace.jonathan-light input,
body.jonathan-workspace.jonathan-light select,
body.jonathan-workspace.jonathan-light textarea {
  border-color: #8da4ba !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
}

/* Final Daive backend workspace overrides. Keep this at EOF. */
.backend-scope-home {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.backend-scope-home[hidden] {
  display: none !important;
}

.backend-scope-card {
  min-height: 164px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 8px 14px;
  align-content: center;
  align-items: center;
  padding: 24px;
  text-align: left;
  border: 1px solid #263449;
  border-radius: 8px;
  background: #0f1724;
  color: #f7fbff;
  cursor: pointer;
}

.backend-scope-card svg {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  color: #67d4e8;
}

.backend-scope-card span {
  color: #f7fbff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

.backend-scope-card strong {
  color: #aab7c8;
  font-size: 14px;
  line-height: 1.35;
}

.backend-scope-card:hover,
.backend-scope-card.active {
  border-color: rgba(103, 212, 232, 0.52);
  background: #121d2b;
}

body.jonathan-workspace .hk-workbench-switch {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 12px;
}

body.jonathan-workspace .hk-workbench-switch .workbench-tab {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: "title" "meta" !important;
  gap: 5px !important;
  min-height: 72px !important;
  padding: 14px 16px !important;
  align-items: center;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

body.jonathan-workspace .hk-workbench-switch .workbench-tab strong,
body.jonathan-workspace .hk-workbench-switch .workbench-tab span {
  display: block !important;
  grid-area: auto !important;
  min-width: 0;
  overflow: hidden;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  text-overflow: clip;
}

body.jonathan-workspace .hk-workbench-switch .workbench-tab strong {
  grid-area: title !important;
  color: #f7fbff !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
}

body.jonathan-workspace .hk-workbench-switch .workbench-tab span {
  grid-area: meta !important;
  color: #aab7c8 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-card {
  border-color: #b9c8d7 !important;
  background: #ffffff !important;
  color: #0e1d2f !important;
  box-shadow: 0 12px 30px rgba(15, 31, 51, 0.07) !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-card svg,
body.jonathan-workspace.jonathan-light .backend-scope-card span {
  color: #0c536b !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-card strong {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-card:hover,
body.jonathan-workspace.jonathan-light .backend-scope-card.active {
  border-color: #6f9db2 !important;
  background: #e4f2f8 !important;
}

body.jonathan-workspace.jonathan-light .hk-workbench-switch .workbench-tab strong {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .hk-workbench-switch .workbench-tab span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav {
  border-left-color: #d8e2ee !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav button {
  border-color: #c5d2df !important;
  background: #f6f9fc !important;
  color: #17304a !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav button strong {
  color: #0e1d2f !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav button span {
  color: #33465d !important;
}

body.jonathan-workspace.jonathan-light .backend-scope-nav button:hover,
body.jonathan-workspace.jonathan-light .backend-scope-nav button.active {
  border-color: #6f9db2 !important;
  background: #e4f2f8 !important;
  color: #0c2d3c !important;
}

@media (max-width: 860px) {
  .backend-scope-home {
    grid-template-columns: 1fr;
  }
}
/* EOF task pool readable item pass. */
.task-pool-section {
  gap: 12px !important;
}

.task-pool-item {
  gap: 10px !important;
  padding: 12px !important;
}

.task-pool-item-head {
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 12px !important;
}

.task-pool-item-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.task-pool-item-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.task-pool-item-title strong,
.task-pool-item-head > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-pool-item-head > span {
  padding-top: 15px;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.task-pool-item-meta {
  gap: 7px !important;
}

.task-pool-item-meta span {
  max-width: 100%;
  white-space: nowrap;
}

.task-pool-detail-table {
  border-radius: 8px !important;
}

.task-pool-detail-row {
  grid-template-columns: minmax(132px, 0.85fr) minmax(260px, 2fr) minmax(64px, 80px) !important;
  min-height: 34px !important;
  padding: 7px 10px !important;
}

.task-pool-detail-head {
  min-height: 30px !important;
  background: #f4f8fb;
  color: var(--muted);
  font-weight: 800;
}

.task-pool-detail-head strong {
  color: var(--muted) !important;
}

body.jonathan-workspace:not(.jonathan-light) .task-pool-item {
  border-color: #253242 !important;
  background: #080d13 !important;
}

body.jonathan-workspace:not(.jonathan-light) .task-pool-detail-table {
  border-color: #253242 !important;
  background: #0d141d !important;
}

body.jonathan-workspace:not(.jonathan-light) .task-pool-detail-head {
  background: #111923 !important;
  color: #aab7c8 !important;
}

body.jonathan-workspace:not(.jonathan-light) .task-pool-item-title small {
  color: #82d9ec !important;
}

body.jonathan-workspace:not(.jonathan-light) .task-pool-item-title strong,
body.jonathan-workspace:not(.jonathan-light) .task-pool-item-head > strong {
  color: #f7fbff !important;
}

body.jonathan-workspace.jonathan-light .task-pool-detail-head {
  background: #f0f6fb !important;
}

body.jonathan-workspace.jonathan-light .task-pool-item-title small {
  color: #176b87 !important;
}

@media (max-width: 860px) {
  .task-pool-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .task-pool-item-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .task-pool-item-head > span {
    padding-top: 0;
  }

  .task-pool-detail-row {
    grid-template-columns: minmax(104px, 1fr) minmax(0, 1.35fr) 56px !important;
  }
}
/* EOF backend action placement guard: operation cards belong to the left tabs. */
body.jonathan-workspace #backendView .backend-workbench-switch,
body.jonathan-workspace #backendView .hk-workbench-switch {
  display: none !important;
}

/* EOF theme synchronization pass: keep light/dark surfaces coherent without changing workflow logic. */
body.jonathan-workspace:not(.jonathan-light) {
  --bg: #070b11;
  --panel: #0e1117;
  --ink: #edf6fb;
  --muted: #aebdd0;
  --line: #263448;
  --soft: #111923;
  --surface: #0e1117;
  --surface-strong: #111923;
  --surface-muted: #0a1018;
  --focus: rgba(103, 212, 232, 0.28);
  --accent: #2f7c94;
  --accent-dark: #9de8f5;
  --green-soft: rgba(50, 168, 82, 0.16);
  --amber-soft: rgba(183, 121, 31, 0.18);
  --red-soft: rgba(201, 42, 42, 0.16);
}

body.jonathan-workspace.jonathan-light {
  --bg: #edf3f8;
  --panel: #ffffff;
  --ink: #0e1d2f;
  --muted: #37506b;
  --line: #b8c8d9;
  --soft: #f3f8fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-muted: #f5f9fc;
  --focus: rgba(23, 107, 135, 0.22);
  --accent: #176b87;
  --accent-dark: #0f4c5c;
}

body.jonathan-workspace:not(.jonathan-light) .workspace,
body.jonathan-workspace:not(.jonathan-light) .workspace main,
body.jonathan-workspace:not(.jonathan-light) #frontendView,
body.jonathan-workspace:not(.jonathan-light) #backendView,
body.jonathan-workspace:not(.jonathan-light) #tasksView,
body.jonathan-workspace:not(.jonathan-light) #logsView {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

body.jonathan-workspace.jonathan-light .workspace,
body.jonathan-workspace.jonathan-light .workspace main,
body.jonathan-workspace.jonathan-light #frontendView,
body.jonathan-workspace.jonathan-light #backendView,
body.jonathan-workspace.jonathan-light #tasksView,
body.jonathan-workspace.jonathan-light #logsView {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

body.jonathan-workspace:not(.jonathan-light) .panel,
body.jonathan-workspace:not(.jonathan-light) .workbench-panel,
body.jonathan-workspace:not(.jonathan-light) .task-section,
body.jonathan-workspace:not(.jonathan-light) .customer-routing-box,
body.jonathan-workspace:not(.jonathan-light) .office-stock-box,
body.jonathan-workspace:not(.jonathan-light) .reservation-summary div,
body.jonathan-workspace:not(.jonathan-light) .reservation-table-wrap,
body.jonathan-workspace:not(.jonathan-light) .transfer-table-wrap,
body.jonathan-workspace:not(.jonathan-light) .manual-ci-table-wrap,
body.jonathan-workspace:not(.jonathan-light) .drawer-form,
body.jonathan-workspace:not(.jonathan-light) .inventory-module-button,
body.jonathan-workspace:not(.jonathan-light) .inventory-panel,
body.jonathan-workspace:not(.jonathan-light) .inventory-module-panel,
body.jonathan-workspace:not(.jonathan-light) .inventory-panel-tools,
body.jonathan-workspace:not(.jonathan-light) .result-box,
body.jonathan-workspace:not(.jonathan-light) .side-drawer,
body.jonathan-workspace:not(.jonathan-light) .drawer-body,
body.jonathan-workspace:not(.jonathan-light) .inline-drawer-body {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

body.jonathan-workspace:not(.jonathan-light) .combo-component-row,
body.jonathan-workspace:not(.jonathan-light) .drawer-note {
  border-color: var(--line) !important;
  background: var(--surface-muted) !important;
  color: var(--ink) !important;
}

body.jonathan-workspace:not(.jonathan-light) .combo-component-row-head strong {
  color: var(--ink) !important;
}

body.jonathan-workspace:not(.jonathan-light) .combo-save-summary span {
  border-color: rgba(140, 233, 154, 0.28);
  background: rgba(47, 158, 68, 0.12);
  color: #b8f3c1;
}

body.jonathan-workspace:not(.jonathan-light) .upload-box,
body.jonathan-workspace:not(.jonathan-light) .reservation-upload,
body.jonathan-workspace:not(.jonathan-light) .cipl-dropzone,
body.jonathan-workspace:not(.jonathan-light) .transfer-upload-box {
  border-color: rgba(103, 212, 232, 0.42) !important;
  background: linear-gradient(180deg, rgba(103, 212, 232, 0.1), rgba(103, 212, 232, 0.03)), var(--surface-muted) !important;
  color: var(--ink) !important;
}

body.jonathan-workspace:not(.jonathan-light) .reservation-table,
body.jonathan-workspace:not(.jonathan-light) .transfer-table,
body.jonathan-workspace:not(.jonathan-light) .manual-ci-table,
body.jonathan-workspace:not(.jonathan-light) .hk-table,
body.jonathan-workspace:not(.jonathan-light) .kingdee-sn-table,
body.jonathan-workspace:not(.jonathan-light) .kingdee-compare-table,
body.jonathan-workspace:not(.jonathan-light) .kingdee-pending-table {
  background: var(--panel) !important;
  color: var(--ink) !important;
}

body.jonathan-workspace:not(.jonathan-light) .reservation-table th,
body.jonathan-workspace:not(.jonathan-light) .transfer-table th,
body.jonathan-workspace:not(.jonathan-light) .manual-ci-table th,
body.jonathan-workspace:not(.jonathan-light) .hk-table th,
body.jonathan-workspace:not(.jonathan-light) .kingdee-sn-table th,
body.jonathan-workspace:not(.jonathan-light) .kingdee-compare-table th,
body.jonathan-workspace:not(.jonathan-light) .kingdee-pending-table th {
  border-color: var(--line) !important;
  background: #111923 !important;
  color: #aebdd0 !important;
}

body.jonathan-workspace:not(.jonathan-light) .reservation-table td,
body.jonathan-workspace:not(.jonathan-light) .transfer-table td,
body.jonathan-workspace:not(.jonathan-light) .manual-ci-table td,
body.jonathan-workspace:not(.jonathan-light) .hk-table td,
body.jonathan-workspace:not(.jonathan-light) .kingdee-sn-table td,
body.jonathan-workspace:not(.jonathan-light) .kingdee-compare-table td,
body.jonathan-workspace:not(.jonathan-light) .kingdee-pending-table td {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--ink) !important;
}

body.jonathan-workspace:not(.jonathan-light) .reservation-table tbody tr:hover,
body.jonathan-workspace:not(.jonathan-light) .manual-ci-table tbody tr:hover,
body.jonathan-workspace:not(.jonathan-light) .hk-table tbody tr:hover {
  background: #111923 !important;
}

body.jonathan-workspace:not(.jonathan-light) h1,
body.jonathan-workspace:not(.jonathan-light) h2,
body.jonathan-workspace:not(.jonathan-light) h3,
body.jonathan-workspace:not(.jonathan-light) h4,
body.jonathan-workspace:not(.jonathan-light) strong,
body.jonathan-workspace:not(.jonathan-light) .inline-title,
body.jonathan-workspace:not(.jonathan-light) .task-section-head h4 {
  color: #f8fbff !important;
}

body.jonathan-workspace:not(.jonathan-light) p,
body.jonathan-workspace:not(.jonathan-light) small,
body.jonathan-workspace:not(.jonathan-light) label span,
body.jonathan-workspace:not(.jonathan-light) .task-section-head span,
body.jonathan-workspace:not(.jonathan-light) .office-stock-head span,
body.jonathan-workspace:not(.jonathan-light) .customer-routing-help,
body.jonathan-workspace:not(.jonathan-light) .form-message {
  color: var(--muted) !important;
}

body.jonathan-workspace:not(.jonathan-light) input,
body.jonathan-workspace:not(.jonathan-light) select,
body.jonathan-workspace:not(.jonathan-light) textarea,
body.jonathan-workspace:not(.jonathan-light) .office-stock-row input,
body.jonathan-workspace:not(.jonathan-light) .office-stock-controls select {
  border-color: #33465c !important;
  background: #080d14 !important;
  color: #f8fbff !important;
}

body.jonathan-workspace:not(.jonathan-light) input::placeholder,
body.jonathan-workspace:not(.jonathan-light) textarea::placeholder {
  color: #8a9ab0 !important;
  opacity: 1 !important;
}

body.jonathan-workspace:not(.jonathan-light) .primary-button:not(:disabled),
body.jonathan-workspace:not(.jonathan-light) .login-form button:not(:disabled) {
  border: 1px solid rgba(103, 212, 232, 0.34) !important;
  background: #2f7c94 !important;
  color: #f8fbff !important;
  box-shadow: none !important;
}

body.jonathan-workspace:not(.jonathan-light) .secondary-button:not(:disabled),
body.jonathan-workspace:not(.jonathan-light) .compact-secondary:not(:disabled) {
  border-color: #33465c !important;
  background: #111923 !important;
  color: #dff7ff !important;
  box-shadow: none !important;
}

body.jonathan-workspace:not(.jonathan-light) button:disabled,
body.jonathan-workspace:not(.jonathan-light) .primary-button:disabled,
body.jonathan-workspace:not(.jonathan-light) .secondary-button:disabled,
body.jonathan-workspace:not(.jonathan-light) .compact-secondary:disabled {
  border-color: #2c3b4f !important;
  background: #151e29 !important;
  color: #9fb1c6 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

body.jonathan-workspace.jonathan-light button:disabled,
body.jonathan-workspace.jonathan-light .primary-button:disabled,
body.jonathan-workspace.jonathan-light .secondary-button:disabled,
body.jonathan-workspace.jonathan-light .compact-secondary:disabled {
  border-color: #b8c8d9 !important;
  background: #dce9f1 !important;
  color: #36546a !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

body.jonathan-workspace.jonathan-light .side-tool .secondary-button:disabled,
body.jonathan-workspace.jonathan-light .side-tool .primary-button:disabled {
  background: #d9e8ef !important;
  color: #315268 !important;
}

/* Front workbench layout polish: keep task cards aligned and reduce nested-card noise. */
#frontendView .allocation-workbench {
  overflow: visible;
}

#frontendView .allocation-mode-grid {
  grid-template-columns: minmax(340px, 1.04fr) minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}

#frontendView .allocation-mode-grid > .task-section {
  min-width: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

#frontendView .task-section-head {
  min-height: 34px;
  align-items: flex-start;
}

#frontendView .task-section-head h4 {
  line-height: 1.25;
  text-wrap: balance;
}

#frontendView .task-section-head span {
  flex: 0 0 auto;
  margin-top: 4px;
  white-space: nowrap;
}

#frontendView .allocation-mode-grid .upload-box {
  min-height: 140px;
}

#frontendView .customer-routing-section .customer-routing-box,
#frontendView .internal-stock-section .office-stock-box {
  flex: 1;
}

#frontendView .customer-routing-section .customer-routing-box {
  align-content: start;
}

#frontendView .internal-stock-section .office-stock-box {
  width: 100%;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#frontendView .office-stock-head {
  justify-content: flex-end;
  min-height: 44px;
  margin-bottom: 0;
}

#frontendView .office-stock-head .square-icon-button,
#frontendView .office-stock-row .square-icon-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
}

#frontendView .office-stock-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

#frontendView .office-stock-rows {
  gap: 10px;
  margin-bottom: 0;
}

#frontendView .office-stock-row {
  grid-template-columns: minmax(150px, 1fr) minmax(96px, 120px) 44px;
  gap: 10px;
}

#frontendView .office-stock-row input,
#frontendView .office-stock-controls select {
  min-height: 44px;
}

#frontendView .office-stock-box > .secondary-button {
  align-self: flex-start;
  margin-top: auto;
  min-height: 40px;
}

.side-tool.ops-quick-tool #sideInventoryBtn {
  width: 100%;
}

body.jonathan-workspace.jonathan-light .side-tool.ops-quick-tool .secondary-button:disabled {
  border-color: #a8c8d3 !important;
  background: #dceff4 !important;
  color: #0f5868 !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}

body.jonathan-workspace #frontendView .internal-stock-section .office-stock-box {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.jonathan-workspace:not(.jonathan-light) #frontendView .office-stock-head .square-icon-button,
body.jonathan-workspace:not(.jonathan-light) #frontendView .office-stock-row .square-icon-button {
  border-color: #33465c !important;
  background: #111923 !important;
  color: #dff7ff !important;
}

body.jonathan-workspace.jonathan-light #frontendView .office-stock-head .square-icon-button,
body.jonathan-workspace.jonathan-light #frontendView .office-stock-row .square-icon-button {
  border-color: #c5d8e5 !important;
  background: #e9f5f9 !important;
  color: #0f5670 !important;
}

.paid-orders-workbench {
  padding: 12px !important;
}

.paid-orders-root {
  display: grid;
  gap: 10px;
}

.paid-orders-head,
.paid-orders-controls,
.paid-orders-metrics,
.paid-orders-tabs {
  display: grid;
  gap: 10px;
}

.paid-orders-sync-result {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(35, 107, 122, 0.24);
  border-radius: 10px;
  background: rgba(234, 246, 248, 0.82);
  color: #274553;
}

.paid-orders-sync-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.paid-orders-sync-metric,
.paid-orders-sync-range,
.paid-orders-sync-source {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.paid-orders-sync-metric.success { color: #19775e; }
.paid-orders-sync-metric.danger { color: #a43b32; }

.paid-orders-sync-failures {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #9a3b34;
  font-size: 12px;
}

.paid-orders-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.paid-orders-head h3 {
  margin: 0;
  font-size: 20px;
  color: #f3f4f6;
}

.paid-orders-head p,
.paid-orders-sync,
.paid-orders-controls span {
  margin: 3px 0 0;
  color: #9ca3af;
  font-size: 13px;
}

.paid-orders-sync b,
.paid-orders-table .logistics-data {
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  color: #00f0ff;
  font-weight: 700;
}

.paid-orders-controls {
  grid-template-columns: repeat(2, minmax(150px, 180px)) minmax(240px, 1fr) auto auto;
  align-items: end;
}

.paid-orders-controls label {
  display: grid;
  gap: 4px;
}

.paid-orders-controls input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #2e3c60;
  border-radius: 4px;
  background: #1f2942;
  color: #f3f4f6;
  padding: 7px 9px;
  font: inherit;
}

.paid-orders-search {
  min-width: 240px;
}

.paid-orders-metrics {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.paid-orders-metric {
  border: 1px solid #2e3c60;
  border-radius: 4px;
  background: #151d30;
  padding: 10px;
}

.paid-orders-metric span {
  display: block;
  color: #9ca3af;
  font-size: 12px;
}

.paid-orders-metric strong {
  display: block;
  margin-top: 4px;
  color: #f3f4f6;
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  font-size: 24px;
}

.paid-orders-metric.accent strong {
  color: #00f0ff;
}

.paid-orders-metric.success {
  border-color: rgba(0, 255, 163, .45);
}

.paid-orders-metric.success strong {
  color: #00ffa3;
}

.paid-orders-metric.warning {
  border-color: rgba(255, 159, 0, .55);
}

.paid-orders-metric.warning strong {
  color: #ff9f00;
}

.paid-orders-metric.danger {
  border-color: rgba(255, 77, 77, .58);
}

.paid-orders-metric.danger strong {
  color: #ff4d4d;
}

.paid-orders-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
}

.paid-orders-tab {
  border: 1px solid #2e3c60;
  border-radius: 4px;
  background: #1f2942;
  color: #c9d4e6;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
}

.paid-orders-tab strong {
  margin-left: 6px;
  color: #00ffa3;
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
}

.paid-orders-tab.active {
  border-color: #00f0ff;
  background: rgba(0, 240, 255, .14);
  color: #dffcff;
}

.paid-orders-table-wrap {
  overflow: auto;
  border: 1px solid #2e3c60;
  border-radius: 4px;
  background: #0b0f19;
}

.paid-orders-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 10px;
  align-items: start;
}

.paid-orders-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.paid-orders-col-pi { width: 165px; }
.paid-orders-col-customer { width: 220px; }
.paid-orders-col-entity { width: 90px; }
.paid-orders-col-so-date { width: 100px; }
.paid-orders-col-receipt { width: 150px; }
.paid-orders-col-amount { width: 130px; }
.paid-orders-col-count { width: 82px; }
.paid-orders-col-status { width: 120px; }
.paid-orders-col-action { width: 118px; }

.paid-orders-table th:nth-child(3),
.paid-orders-table td:nth-child(3),
.paid-orders-table th:nth-child(n + 4),
.paid-orders-table td:nth-child(n + 4) {
  white-space: nowrap;
}

.paid-orders-table th,
.paid-orders-table td {
  border-bottom: 1px solid rgba(46, 60, 96, .75);
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
}

.paid-orders-table th {
  background: #151d30;
  color: #f3f4f6;
  font-size: 12px;
  letter-spacing: 0;
}

.paid-orders-table td {
  color: #d9e3f7;
  font-size: 13px;
}

.paid-orders-table th:last-child,
.paid-orders-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 108px;
  text-align: center;
  background: #101827;
  box-shadow: -8px 0 12px rgba(3, 8, 16, .34);
}

.paid-orders-table th:last-child {
  z-index: 3;
  background: #151d30;
}

.paid-orders-table tr.selected td:last-child {
  background: #122333;
}

.paid-orders-table tr.selected td {
  background: rgba(0, 240, 255, .06);
}

.paid-orders-pi-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #00f0ff;
  font: inherit;
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  font-weight: 800;
  cursor: pointer;
}

.paid-orders-pi-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.paid-orders-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.paid-orders-status.success {
  color: #00ffa3;
  background: rgba(0, 255, 163, .10);
}

.paid-orders-status.warning {
  color: #ff9f00;
  background: rgba(255, 159, 0, .10);
}

.paid-orders-status.danger {
  color: #ff4d4d;
  background: rgba(255, 77, 77, .10);
}

.paid-orders-confirm-button {
  min-width: 88px;
  min-height: 32px;
  border: 1px solid #33c6d8;
  border-radius: 5px;
  padding: 5px 10px;
  background: #137a8d;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.paid-orders-confirm-button:hover:not(:disabled) {
  border-color: #7ce9f3;
  background: #1793a8;
}

.paid-orders-confirm-button:disabled {
  cursor: wait;
  opacity: .62;
}

.kingdee-allocation-lookup {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #2e3c60;
  border-radius: 6px;
  background: rgba(8, 13, 22, .48);
}

.kingdee-allocation-lookup > label {
  color: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
}

.kingdee-allocation-lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.kingdee-allocation-lookup-row input {
  min-width: 0;
}

.kingdee-allocation-lookup p {
  margin: 0;
  color: #9fb0c9;
  font-size: 12px;
  line-height: 1.55;
}

.kingdee-allocation-preview {
  display: grid;
  gap: 10px;
}

.kingdee-allocation-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kingdee-allocation-lines {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #2e3c60;
  border-radius: 5px;
}

.kingdee-allocation-lines table {
  width: 100%;
  border-collapse: collapse;
}

.kingdee-allocation-lines th,
.kingdee-allocation-lines td {
  padding: 8px;
  border-bottom: 1px solid #2e3c60;
  text-align: left;
  font-size: 12px;
}

.kingdee-allocation-lines th {
  position: sticky;
  top: 0;
  background: #151d30;
  color: #f3f4f6;
}

.paid-orders-empty {
  color: #9ca3af !important;
  text-align: center !important;
  padding: 22px !important;
}

.paid-orders-side-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.paid-orders-side-card {
  border: 1px solid #2e3c60;
  border-radius: 4px;
  background: #151d30;
  padding: 12px;
}

.paid-orders-side-card h4 {
  margin: 0 0 10px;
  color: #f3f4f6;
  font-size: 17px;
}

.paid-orders-side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.paid-orders-side-card-head h4 {
  margin: 0;
}

.paid-orders-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.paid-orders-detail-item {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.paid-orders-detail-item span,
.paid-orders-side-list span,
.paid-orders-product-list em {
  color: #9ca3af;
  font-size: 12px;
  font-style: normal;
}

.paid-orders-detail-item strong {
  min-width: 0;
  color: #f3f4f6;
  overflow-wrap: anywhere;
}

.paid-orders-side-list,
.paid-orders-product-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.paid-orders-side-list li,
.paid-orders-product-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border: 1px solid rgba(46, 60, 96, .75);
  border-radius: 4px;
  padding: 8px 10px;
  background: rgba(11, 15, 25, .38);
}

.paid-orders-product-list li span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.paid-orders-product-list li b {
  color: #d9e3f7;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.paid-orders-shortage-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.paid-orders-shortage-list > li {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 159, 0, .38);
  border-left: 3px solid #ff9f00;
  border-radius: 4px;
  padding: 9px;
  background: rgba(11, 15, 25, .38);
}

.paid-orders-shortage-list > li.waiting {
  border-color: rgba(255, 77, 77, .34);
  border-left-color: #ff4d4d;
}

.paid-orders-shortage-list > li > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.paid-orders-shortage-list strong {
  color: #e8edf7;
  font-size: 13px;
}

.paid-orders-shortage-list dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.paid-orders-shortage-list dl div {
  min-width: 0;
}

.paid-orders-shortage-list dt {
  color: #9ca3af;
  font-size: 10px;
}

.paid-orders-shortage-list dd {
  margin: 2px 0 0;
  color: #f3f4f6;
  font-family: var(--font-code, "JetBrains Mono", Consolas, monospace);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.paid-orders-side-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.paid-orders-side-pill.success {
  color: #00ffa3;
  background: rgba(0, 255, 163, .10);
}

.paid-orders-side-pill.warning {
  color: #ff9f00;
  background: rgba(255, 159, 0, .10);
}

.paid-orders-side-pill.danger {
  color: #ff4d4d;
  background: rgba(255, 77, 77, .10);
}

.paid-orders-side-pill.muted,
.paid-orders-side-pill.neutral {
  color: #9ca3af;
  background: rgba(156, 163, 175, .10);
}

.paid-orders-side-empty {
  border: 1px dashed #2e3c60;
  border-radius: 4px;
  padding: 18px;
  color: #9ca3af;
  text-align: center;
}

body.jonathan-workspace.jonathan-light .paid-orders-head h3,
body.jonathan-workspace.jonathan-light .paid-orders-table th,
body.jonathan-workspace.jonathan-light .paid-orders-side-card h4 {
  color: #0f172a;
}

body.jonathan-workspace.jonathan-light .paid-orders-metric,
body.jonathan-workspace.jonathan-light .paid-orders-table th,
body.jonathan-workspace.jonathan-light .paid-orders-side-card {
  background: #f5f9fc;
}

body.jonathan-workspace.jonathan-light .paid-orders-table-wrap,
body.jonathan-workspace.jonathan-light .paid-orders-side-card,
body.jonathan-workspace.jonathan-light .paid-orders-side-list li,
body.jonathan-workspace.jonathan-light .paid-orders-product-list li {
  border-color: #d8e2ee;
}

body.jonathan-workspace.jonathan-light .paid-orders-table-wrap,
body.jonathan-workspace.jonathan-light .paid-orders-side-list li,
body.jonathan-workspace.jonathan-light .paid-orders-product-list li {
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .paid-orders-controls input,
body.jonathan-workspace.jonathan-light .paid-orders-tab {
  background: #ffffff;
  color: #0f172a;
}

body.jonathan-workspace.jonathan-light .paid-orders-table td {
  color: #172033;
}

body.jonathan-workspace.jonathan-light .paid-orders-detail-item strong,
body.jonathan-workspace.jonathan-light .paid-orders-product-list li b {
  color: #172033;
}

body.jonathan-workspace.jonathan-light .paid-orders-detail-item span,
body.jonathan-workspace.jonathan-light .paid-orders-side-list span,
body.jonathan-workspace.jonathan-light .paid-orders-product-list em {
  color: #53677f;
}

@media (max-width: 1480px) {
  #frontendView .allocation-mode-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }

  #frontendView .internal-stock-section {
    grid-column: 1 / -1;
  }

  .paid-orders-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  #frontendView .allocation-mode-grid {
    grid-template-columns: 1fr;
  }

  .paid-orders-head,
  .paid-orders-controls,
  .paid-orders-metrics {
    grid-template-columns: 1fr;
  }

  .paid-orders-tabs {
    grid-template-columns: 1fr;
  }

  .paid-orders-shortage-list dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #frontendView .internal-stock-section {
    grid-column: auto;
  }

  #frontendView .allocation-mode-grid > .task-section {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  #frontendView .office-stock-controls,
  #frontendView .office-stock-row {
    grid-template-columns: 1fr;
  }

  #frontendView .office-stock-head .square-icon-button,
  #frontendView .office-stock-row .square-icon-button,
  #frontendView .office-stock-box > .secondary-button {
    width: 100%;
  }

  .auto-allocation-summary,
  .auto-allocation-search,
  .auto-allocation-meta {
    grid-template-columns: 1fr;
  }

  .auto-allocation-item-head {
    display: grid;
  }
}

/* Chenjie paid-order lab theme. Visual-only overrides; event bindings stay untouched. */
body.chenjie-paid-theme {
  --ops-bg-main: #0b0f19;
  --ops-bg-card: #151d30;
  --ops-bg-input: #111827;
  --ops-border: #2e3c60;
  --ops-text: #f3f4f6;
  --ops-muted: #9ca3af;
  --ops-accent: #00d8e6;
  --ops-success: #23e39b;
  --ops-warning: #ff9f00;
  --ops-danger: #ff4d4d;
  --ops-font-code: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  background:
    linear-gradient(90deg, rgba(0, 216, 230, .035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 216, 230, .025) 1px, transparent 1px),
    var(--ops-bg-main) !important;
  background-size: 32px 32px !important;
  color: var(--ops-text) !important;
}

body.chenjie-paid-theme .app-shell,
body.chenjie-paid-theme .workspace,
body.chenjie-paid-theme #frontendView {
  background: transparent !important;
}

body.chenjie-paid-theme .sidebar {
  background: linear-gradient(180deg, #0e1422 0%, #080d16 100%) !important;
  border-right-color: var(--ops-border) !important;
  color: var(--ops-text) !important;
}

body.chenjie-paid-theme .topbar,
body.chenjie-paid-theme .brand,
body.chenjie-paid-theme .side-tool,
body.chenjie-paid-theme .frontend-paid-orders-card,
body.chenjie-paid-theme #frontendView .panel,
body.chenjie-paid-theme #frontendView .workbench-panel,
body.chenjie-paid-theme #frontendView .task-section,
body.chenjie-paid-theme #frontendView .inventory-panel,
body.chenjie-paid-theme #frontendView .inventory-panel-tools,
body.chenjie-paid-theme #frontendView .inventory-module-panel,
body.chenjie-paid-theme #frontendView .manual-inbound-row,
body.chenjie-paid-theme #frontendView .manual-inbound-actions,
body.chenjie-paid-theme #frontendView .customer-routing-box,
body.chenjie-paid-theme #frontendView .pi-cancel-box,
body.chenjie-paid-theme #frontendView .pi-edit-box {
  border: 1px solid var(--ops-border) !important;
  border-radius: 8px !important;
  background: rgba(21, 29, 48, .94) !important;
  color: var(--ops-text) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22) !important;
}

body.chenjie-paid-theme .topbar {
  margin-bottom: 10px !important;
}

body.chenjie-paid-theme .frontend-paid-orders-card {
  padding: 12px !important;
  margin-bottom: 10px !important;
}

body.chenjie-paid-theme .front-workbench-switch {
  margin-bottom: 10px !important;
  padding: 8px !important;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  background: rgba(21, 29, 48, .72);
}

body.chenjie-paid-theme .brand-mark {
  border-color: rgba(0, 216, 230, .72) !important;
  background: rgba(0, 216, 230, .08) !important;
  color: var(--ops-accent) !important;
  font-family: var(--ops-font-code) !important;
}

body.chenjie-paid-theme .brand strong,
body.chenjie-paid-theme #pageTitle,
body.chenjie-paid-theme #frontendView h2,
body.chenjie-paid-theme #frontendView h3,
body.chenjie-paid-theme #frontendView h4,
body.chenjie-paid-theme #frontendView strong,
body.chenjie-paid-theme .side-tool strong {
  color: var(--ops-text) !important;
}

body.chenjie-paid-theme .brand span,
body.chenjie-paid-theme #frontendView p,
body.chenjie-paid-theme #frontendView label span,
body.chenjie-paid-theme #frontendView small,
body.chenjie-paid-theme .side-tool span,
body.chenjie-paid-theme .eyebrow {
  color: var(--ops-muted) !important;
  opacity: 1 !important;
}

body.chenjie-paid-theme .nav-item,
body.chenjie-paid-theme .frontend-subnav button,
body.chenjie-paid-theme .front-inventory-subnav button,
body.chenjie-paid-theme .workbench-tab,
body.chenjie-paid-theme .top-actions .language-toggle,
body.chenjie-paid-theme .top-actions a,
body.chenjie-paid-theme .theme-toggle-button,
body.chenjie-paid-theme .user-badge,
body.chenjie-paid-theme .top-icon-button {
  border-color: var(--ops-border) !important;
  background: rgba(17, 24, 39, .86) !important;
  color: #dce7f4 !important;
  border-radius: 8px !important;
}

body.chenjie-paid-theme .nav-item:hover,
body.chenjie-paid-theme .nav-item.active,
body.chenjie-paid-theme .frontend-subnav button:hover,
body.chenjie-paid-theme .frontend-subnav button.active,
body.chenjie-paid-theme .front-inventory-subnav button:hover,
body.chenjie-paid-theme .front-inventory-subnav button.active,
body.chenjie-paid-theme .workbench-tab:hover,
body.chenjie-paid-theme .workbench-tab.active,
body.chenjie-paid-theme .top-actions .language-toggle button.active {
  border-color: rgba(0, 216, 230, .72) !important;
  background: rgba(0, 216, 230, .10) !important;
  color: #e8fbff !important;
}

body.chenjie-paid-theme #frontendView input,
body.chenjie-paid-theme #frontendView select,
body.chenjie-paid-theme #frontendView textarea,
body.chenjie-paid-theme .side-tool input,
body.chenjie-paid-theme .side-tool select {
  border-color: var(--ops-border) !important;
  background: var(--ops-bg-input) !important;
  color: var(--ops-text) !important;
  border-radius: 6px !important;
}

body.chenjie-paid-theme .paid-orders-root,
body.chenjie-paid-theme .paid-orders-table,
body.chenjie-paid-theme .paid-orders-table .logistics-data,
body.chenjie-paid-theme .paid-orders-metric strong,
body.chenjie-paid-theme .paid-orders-tab strong {
  font-family: var(--ops-font-code) !important;
  letter-spacing: 0 !important;
}

body.chenjie-paid-theme .paid-orders-head h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", sans-serif !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
}

body.chenjie-paid-theme .paid-orders-controls {
  grid-template-columns: 180px 180px minmax(280px, 1fr) auto auto !important;
}

body.chenjie-paid-theme .paid-orders-table-wrap {
  border-color: var(--ops-border) !important;
  background: #080c14 !important;
}

body.chenjie-paid-theme .paid-orders-table th {
  background: #151d30 !important;
  color: #eaf6ff !important;
}

body.chenjie-paid-theme .paid-orders-table td {
  color: #dce7f4 !important;
}

body.jonathan-workspace.jonathan-light .paid-orders-table th:last-child {
  background: #e7eef5 !important;
}

body.jonathan-workspace.jonathan-light .paid-orders-table td:last-child {
  background: #ffffff !important;
  box-shadow: -8px 0 12px rgba(34, 57, 82, .12);
}

body.jonathan-workspace.jonathan-light .paid-orders-table tr.selected td:last-child {
  background: #eef9fb !important;
}

body.chenjie-paid-theme .paid-orders-table .logistics-data {
  color: var(--ops-accent) !important;
}

body.chenjie-paid-theme .paid-orders-status.success {
  color: var(--ops-success) !important;
  background: rgba(35, 227, 155, .10) !important;
}

body.chenjie-paid-theme .paid-orders-status.warning {
  color: var(--ops-warning) !important;
  background: rgba(255, 159, 0, .10) !important;
}

body.chenjie-paid-theme .paid-orders-status.danger,
body.chenjie-paid-theme .paid-orders-side-pill.danger {
  color: var(--ops-danger, #ff4d4d) !important;
  background: rgba(255, 77, 77, .10) !important;
}

body.chenjie-paid-theme .paid-orders-confirm-button {
  border-color: #42d5e3 !important;
  background: #137a8d !important;
  color: #ffffff !important;
}

body.jonathan-workspace.jonathan-light .paid-orders-confirm-button {
  border-color: #176b87 !important;
  background: #176b87 !important;
  color: #ffffff !important;
}

body.jonathan-workspace.jonathan-light .kingdee-allocation-lookup,
body.jonathan-workspace.jonathan-light .kingdee-allocation-lines {
  border-color: #b8c8d9;
  background: #ffffff;
}

body.jonathan-workspace.jonathan-light .kingdee-allocation-lookup > label,
body.jonathan-workspace.jonathan-light .kingdee-allocation-lines th {
  color: #0e1d2f;
}

body.jonathan-workspace.jonathan-light .kingdee-allocation-lookup p {
  color: #37506b;
}

body.jonathan-workspace.jonathan-light .kingdee-allocation-lines th {
  background: #e7eef5;
}

body.chenjie-paid-theme.jonathan-light {
  --ops-bg-main: #edf3f8;
  --ops-bg-card: #ffffff;
  --ops-bg-input: #f8fbff;
  --ops-border: #b8c8d9;
  --ops-text: #0e1d2f;
  --ops-muted: #37506b;
  --ops-accent: #176b87;
  --ops-success: #238636;
  --ops-warning: #9a6700;
  background: #edf3f8 !important;
  color: var(--ops-text) !important;
}

body.chenjie-paid-theme.jonathan-light .sidebar,
body.chenjie-paid-theme.jonathan-light .topbar,
body.chenjie-paid-theme.jonathan-light .brand,
body.chenjie-paid-theme.jonathan-light .side-tool,
body.chenjie-paid-theme.jonathan-light .frontend-paid-orders-card,
body.chenjie-paid-theme.jonathan-light #frontendView .panel,
body.chenjie-paid-theme.jonathan-light #frontendView .workbench-panel,
body.chenjie-paid-theme.jonathan-light #frontendView .task-section,
body.chenjie-paid-theme.jonathan-light #frontendView .inventory-panel,
body.chenjie-paid-theme.jonathan-light #frontendView .inventory-panel-tools,
body.chenjie-paid-theme.jonathan-light #frontendView .inventory-module-panel,
body.chenjie-paid-theme.jonathan-light #frontendView .manual-inbound-row,
body.chenjie-paid-theme.jonathan-light #frontendView .manual-inbound-actions,
body.chenjie-paid-theme.jonathan-light #frontendView .customer-routing-box,
body.chenjie-paid-theme.jonathan-light #frontendView .pi-cancel-box,
body.chenjie-paid-theme.jonathan-light #frontendView .pi-edit-box {
  border-color: var(--ops-border) !important;
  background: #ffffff !important;
  color: var(--ops-text) !important;
  box-shadow: 0 10px 24px rgba(15, 31, 51, .06) !important;
}

body.chenjie-paid-theme.jonathan-light .nav-item,
body.chenjie-paid-theme.jonathan-light .frontend-subnav button,
body.chenjie-paid-theme.jonathan-light .front-inventory-subnav button,
body.chenjie-paid-theme.jonathan-light .workbench-tab,
body.chenjie-paid-theme.jonathan-light .top-actions .language-toggle,
body.chenjie-paid-theme.jonathan-light .top-actions a,
body.chenjie-paid-theme.jonathan-light .theme-toggle-button,
body.chenjie-paid-theme.jonathan-light .user-badge,
body.chenjie-paid-theme.jonathan-light .top-icon-button {
  border-color: #c7d5e4 !important;
  background: #ffffff !important;
  color: var(--ops-text) !important;
}

body.chenjie-paid-theme.jonathan-light .nav-item:hover,
body.chenjie-paid-theme.jonathan-light .nav-item.active,
body.chenjie-paid-theme.jonathan-light .frontend-subnav button:hover,
body.chenjie-paid-theme.jonathan-light .frontend-subnav button.active,
body.chenjie-paid-theme.jonathan-light .front-inventory-subnav button:hover,
body.chenjie-paid-theme.jonathan-light .front-inventory-subnav button.active,
body.chenjie-paid-theme.jonathan-light .workbench-tab:hover,
body.chenjie-paid-theme.jonathan-light .workbench-tab.active,
body.chenjie-paid-theme.jonathan-light .top-actions .language-toggle button.active {
  border-color: rgba(23, 107, 135, .32) !important;
  background: #e4f2f8 !important;
  color: #0f4c5c !important;
}

body.chenjie-paid-theme.jonathan-light #frontendView input,
body.chenjie-paid-theme.jonathan-light #frontendView select,
body.chenjie-paid-theme.jonathan-light #frontendView textarea,
body.chenjie-paid-theme.jonathan-light .side-tool input,
body.chenjie-paid-theme.jonathan-light .side-tool select {
  border-color: #9fb2c6 !important;
  background: #ffffff !important;
  color: var(--ops-text) !important;
}

body.chenjie-paid-theme.jonathan-light .paid-orders-table-wrap {
  border-color: #c7d5e4 !important;
  background: #ffffff !important;
}

body.chenjie-paid-theme.jonathan-light .paid-orders-table th {
  background: #f5f9fc !important;
  color: var(--ops-text) !important;
}

body.chenjie-paid-theme.jonathan-light .paid-orders-table td {
  color: #172033 !important;
}

.auto-allocation-inbox.reminder-mode {
  gap: 10px;
}

.auto-allocation-reminder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.auto-allocation-reminder-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.auto-allocation-reminder-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auto-allocation-inbox.reminder-mode .auto-allocation-summary-card {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.auto-allocation-inbox.reminder-mode .auto-allocation-summary-card strong {
  color: var(--accent);
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
}

.auto-allocation-reminder-list {
  display: grid;
  gap: 10px;
}

.auto-allocation-reminder {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.auto-allocation-reminder:hover {
  border-color: var(--accent);
  background: var(--surface-muted);
}

.auto-allocation-reminder-kind {
  grid-row: 1 / span 2;
  align-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(75, 186, 214, .42);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(75, 186, 214, .10);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.auto-allocation-reminder.refillable .auto-allocation-reminder-kind {
  border-color: rgba(245, 158, 11, .5);
  color: #f59e0b;
  background: rgba(245, 158, 11, .12);
}

.auto-allocation-reminder strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.auto-allocation-reminder-meta,
.auto-allocation-reminder-pis,
.auto-allocation-reminder-detail,
.auto-allocation-reminder-foot {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auto-allocation-reminder-pis,
.auto-allocation-reminder-detail {
  grid-column: 2 / -1;
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
}

.auto-allocation-reminder-action {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.auto-allocation-reminder-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

body.jonathan-workspace.jonathan-light .auto-allocation-reminder-head,
body.jonathan-workspace.jonathan-light .auto-allocation-reminder,
body.jonathan-workspace.jonathan-light .auto-allocation-inbox.reminder-mode .auto-allocation-summary-card {
  background: #ffffff;
  border-color: #d8e2ee;
}

body.jonathan-workspace.jonathan-light .auto-allocation-reminder:hover {
  background: #f5f9fc;
  border-color: #4bbad6;
}

body.jonathan-workspace.jonathan-light .auto-allocation-reminder strong,
body.jonathan-workspace.jonathan-light .auto-allocation-reminder-head h3 {
  color: #132033;
}

body.jonathan-workspace.jonathan-light .auto-allocation-reminder-meta,
body.jonathan-workspace.jonathan-light .auto-allocation-reminder-pis,
body.jonathan-workspace.jonathan-light .auto-allocation-reminder-detail,
body.jonathan-workspace.jonathan-light .auto-allocation-reminder-foot,
body.jonathan-workspace.jonathan-light .auto-allocation-reminder-head p {
  color: #53677f;
}

@media (max-width: 1050px) {
  body.chenjie-paid-theme .paid-orders-controls {
    grid-template-columns: 1fr !important;
  }

  .auto-allocation-reminder-head,
  .auto-allocation-reminder-foot {
    display: grid;
  }

  .auto-allocation-reminder {
    grid-template-columns: 1fr;
  }

  .auto-allocation-reminder-kind,
  .auto-allocation-reminder-pis,
  .auto-allocation-reminder-detail,
  .auto-allocation-reminder-action {
    grid-column: 1;
    grid-row: auto;
  }
}

body.chenjie-paid-theme #paidOrdersView {
  background: transparent !important;
  color: var(--ops-text) !important;
}

body.chenjie-paid-theme #paidOrdersView input,
body.chenjie-paid-theme #paidOrdersView select,
body.chenjie-paid-theme #paidOrdersView textarea {
  border-color: var(--ops-border) !important;
  background: var(--ops-bg-input) !important;
  color: var(--ops-text) !important;
  border-radius: 6px !important;
}

body.chenjie-paid-theme.jonathan-light #paidOrdersView input,
body.chenjie-paid-theme.jonathan-light #paidOrdersView select,
body.chenjie-paid-theme.jonathan-light #paidOrdersView textarea {
  border-color: #9fb2c6 !important;
  background: #ffffff !important;
  color: var(--ops-text) !important;
}

/* Paid-order controls: high-contrast action hierarchy in both workspace themes. */
body.jonathan-workspace #paidOrdersView .paid-orders-action,
body.jonathan-workspace #paidOrdersView .paid-orders-tab {
  min-height: 40px;
  border-radius: 7px !important;
  font-weight: 800;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}

body.jonathan-workspace #paidOrdersView .paid-orders-action-primary {
  border-color: #4da9bd !important;
  background: #2f7f96 !important;
  color: #ffffff !important;
}

body.jonathan-workspace #paidOrdersView .paid-orders-action-primary:hover {
  border-color: #72c9da !important;
  background: #3a91a8 !important;
}

body.jonathan-workspace #paidOrdersView .paid-orders-action-secondary,
body.jonathan-workspace #paidOrdersView .paid-orders-tab {
  border-color: #4a5f79 !important;
  background: #243249 !important;
  color: #f2f7fb !important;
}

body.jonathan-workspace #paidOrdersView .paid-orders-action-secondary:hover,
body.jonathan-workspace #paidOrdersView .paid-orders-tab:hover {
  border-color: #6f879f !important;
  background: #30415a !important;
  color: #ffffff !important;
}

body.jonathan-workspace #paidOrdersView .paid-orders-tab strong {
  color: #b8e7ef !important;
}

body.jonathan-workspace #paidOrdersView .paid-orders-tab.active {
  border-color: #63bfd1 !important;
  background: #236f85 !important;
  color: #ffffff !important;
}

body.jonathan-workspace #paidOrdersView .paid-orders-tab.active strong {
  color: #ffffff !important;
}

body.jonathan-workspace #paidOrdersView input[type="date"] {
  color-scheme: dark;
}

body.jonathan-workspace #paidOrdersView .paid-orders-action:focus-visible,
body.jonathan-workspace #paidOrdersView .paid-orders-tab:focus-visible {
  outline: 3px solid rgba(117, 211, 229, .38);
  outline-offset: 2px;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-action-primary {
  border-color: #176b87 !important;
  background: #176b87 !important;
  color: #ffffff !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-action-primary:hover {
  border-color: #0f4c5c !important;
  background: #0f5b73 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-action-secondary,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab {
  border-color: #9fb2c6 !important;
  background: #ffffff !important;
  color: #183247 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-action-secondary:hover,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab:hover {
  border-color: #5f7f98 !important;
  background: #edf5f8 !important;
  color: #0f4c5c !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab strong {
  color: #176b87 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab.active,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab.active:hover {
  border-color: #176b87 !important;
  background: #dceef3 !important;
  color: #0c4353 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab.active strong {
  color: #0c4353 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView input[type="date"] {
  color-scheme: light;
}

@media (max-width: 760px) {
  .kingdee-sn-preview-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .kingdee-sn-reupload {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.jonathan-workspace #paidOrdersView .paid-orders-action,
  body.jonathan-workspace #paidOrdersView .paid-orders-tab {
    transition: none;
  }
}

/* Warehouse WMS shadow console: the picking instruction is the audit spine. */
.wms-shadow-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #bfd2df;
  border-left: 4px solid #2f7892;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbfd 0%, #edf5f8 100%);
  box-shadow: 0 10px 24px rgba(34, 80, 101, 0.08);
}

.wms-shadow-head,
.wms-stock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.wms-shadow-head h3 {
  margin: 3px 0 4px;
  color: #17364a;
  font-size: 20px;
}

.wms-shadow-head p {
  margin: 0;
  color: #5b7180;
  font-size: 13px;
}

.wms-shadow-kicker {
  color: #2f7892;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.wms-mode-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #d9aa52;
  border-radius: 999px;
  background: #fff7df;
  color: #875f18;
  font-size: 12px;
  font-weight: 750;
}

.wms-context-grid,
.wms-preview-spine,
.wms-stock-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.wms-context-grid > div,
.wms-context-grid > label,
.wms-preview-spine > div,
.wms-stock-metrics > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d3e1e8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.wms-context-grid span,
.wms-preview-spine span,
.wms-stock-metrics span {
  display: block;
  margin-bottom: 4px;
  color: #708593;
  font-size: 11px;
}

.wms-context-grid strong,
.wms-preview-spine strong,
.wms-stock-metrics strong {
  display: block;
  overflow: hidden;
  color: #17364a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wms-context-grid input,
.wms-context-grid select,
.wms-shipto-grid input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #b9cdd8;
  border-radius: 7px;
  background: #fff;
  color: #17364a;
}

body.jonathan-workspace:not(.jonathan-light) .wms-shadow-panel {
  border-color: #355667;
  border-left-color: #5aa0b8;
  background: linear-gradient(135deg, #122c3a 0%, #183746 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

body.jonathan-workspace:not(.jonathan-light) .wms-shadow-head h3,
body.jonathan-workspace:not(.jonathan-light) .wms-context-grid strong,
body.jonathan-workspace:not(.jonathan-light) .wms-preview-spine strong,
body.jonathan-workspace:not(.jonathan-light) .wms-stock-metrics strong {
  color: #e8f3f7;
}

body.jonathan-workspace:not(.jonathan-light) .wms-shadow-head p,
body.jonathan-workspace:not(.jonathan-light) .wms-context-grid span,
body.jonathan-workspace:not(.jonathan-light) .wms-preview-spine span {
  color: #a8bfca;
}

body.jonathan-workspace:not(.jonathan-light) .wms-context-grid > div,
body.jonathan-workspace:not(.jonathan-light) .wms-context-grid > label,
body.jonathan-workspace:not(.jonathan-light) .wms-preview-spine > div,
body.jonathan-workspace:not(.jonathan-light) .wms-awaiting-card {
  border-color: #3b5b69;
  background: rgba(10, 31, 41, 0.76);
  color: #bad0d9;
}

.wms-shipto-details {
  margin-top: 10px;
  border-top: 1px dashed #b8ced9;
}

.wms-shipto-details summary {
  padding: 10px 2px 7px;
  color: #365f73;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

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

.wms-shipto-grid label {
  color: #607785;
  font-size: 11px;
}

.wms-shipto-grid label.wide {
  grid-column: 1 / -1;
}

.wms-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#wmsOrderSubmitBtn:disabled {
  border-color: #b8c6cd;
  background: #dfe7ea;
  color: #71818a;
  cursor: not-allowed;
  opacity: 1;
}

.wms-shadow-result {
  margin-top: 12px;
}

.wms-awaiting-card,
.wms-blocked-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #c9dce5;
  border-radius: 8px;
  background: #fff;
  color: #486575;
}

.wms-blocked-card {
  border-color: #e3b463;
  background: #fff8e7;
  color: #76531b;
}

.wms-blocked-card ul {
  margin: 5px 0 0 18px;
  padding: 0;
}

.wms-comparison-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid #c6d9e2;
  border-radius: 9px;
  background: #fff;
}

.wms-comparison-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  color: #254455;
  font-size: 12px;
}

.wms-comparison-table th,
.wms-comparison-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e1ebef;
  text-align: left;
  vertical-align: top;
}

.wms-comparison-table th {
  background: #e8f1f5;
  color: #456676;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wms-comparison-table td:first-child {
  border-left: 3px solid #d7a84e;
}

.wms-comparison-table tr.wms-state-matched td:first-child {
  border-left-color: #3b9871;
}

.wms-comparison-table td strong,
.wms-comparison-table td small {
  display: block;
}

.wms-comparison-table td small {
  margin-top: 3px;
  color: #738995;
}

.wms-line-state {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff2d3;
  color: #805b17;
  font-weight: 700;
  white-space: nowrap;
}

.wms-state-matched .wms-line-state {
  background: #e0f3e9;
  color: #236847;
}

.wms-sn-list {
  display: grid;
  gap: 3px;
  max-height: 150px;
  margin-top: 6px;
  overflow: auto;
}

.wms-sn-list code {
  color: #294c5d;
  font-size: 10px;
}

.drawer-inventory-wms-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.6fr);
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px dashed #b8cfd9;
  border-radius: 8px;
  background: #f3f8fa;
}

.wms-stock-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bcd4de;
  border-left: 4px solid #2f7892;
  border-radius: 9px;
  background: #f4f9fb;
}

.wms-stock-card.error {
  border-color: #e2b467;
  border-left-color: #c88b25;
  background: #fff8e8;
}

.wms-stock-head span,
.wms-stock-head em {
  color: #607a88;
  font-size: 11px;
  font-style: normal;
}

.wms-stock-head strong {
  display: block;
  color: #17364a;
}

@media (max-width: 900px) {
  .wms-context-grid,
  .wms-preview-spine,
  .wms-stock-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawer-inventory-wms-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .wms-shadow-head {
    flex-direction: column;
  }

  .wms-context-grid,
  .wms-preview-spine,
  .wms-stock-metrics,
  .wms-shipto-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wms-shipto-grid label.wide {
    grid-column: auto;
  }
}

/* Jonathan: Saudi Drone and Saudi Accessories are separate operational workspaces. */
.saudi-workspace-home {
  width: min(1040px, 100%);
  margin: 34px auto 0;
  padding: 28px;
  color: #e7eef7;
}

.saudi-workspace-home[hidden] {
  display: none !important;
}

.saudi-workspace-intro {
  max-width: 720px;
  margin-bottom: 24px;
}

.saudi-workspace-kicker {
  display: block;
  margin-bottom: 8px;
  color: #67d4e8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.saudi-workspace-intro h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.2;
}

.saudi-workspace-intro p {
  margin: 10px 0 0;
  color: #aab7c8;
  font-size: 0.96rem;
  line-height: 1.65;
}

.saudi-workspace-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.saudi-workspace-option {
  min-height: 168px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px solid #344153;
  border-radius: 12px;
  background: #151d28;
  color: #edf4fb;
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.saudi-workspace-option:hover {
  border-color: #67d4e8;
  background: #192431;
  transform: translateY(-2px);
}

.saudi-workspace-option:focus-visible,
.ops-workspace-switch:focus-visible {
  outline: 3px solid rgba(103, 212, 232, 0.4);
  outline-offset: 3px;
}

.saudi-workspace-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #213344;
  color: #67d4e8;
}

.saudi-workspace-icon svg {
  width: 24px;
  height: 24px;
}

.saudi-workspace-option.accessories .saudi-workspace-icon {
  background: #29382f;
  color: #89d7a2;
}

.saudi-workspace-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saudi-workspace-copy strong {
  font-size: 1.08rem;
}

.saudi-workspace-copy small {
  color: #c6d2df;
  font-size: 0.82rem;
  font-weight: 700;
}

.saudi-workspace-copy em {
  color: #91a0b2;
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.45;
}

.saudi-workspace-enter {
  color: #9ee8f5;
  font-size: 0.82rem;
  font-weight: 800;
}

.saudi-workspace-safety {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: #93a4b8;
  font-size: 0.8rem;
}

.saudi-workspace-safety svg {
  width: 17px;
  height: 17px;
  color: #67d4e8;
}

.ops-saudi-workspace-chip {
  min-width: 190px;
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid rgba(103, 212, 232, 0.3);
  border-radius: 8px;
  background: rgba(23, 107, 135, 0.12);
}

.ops-saudi-workspace-chip span,
.ops-saudi-workspace-chip small {
  color: inherit;
  font-size: 0.68rem;
  opacity: 0.72;
}

.ops-saudi-workspace-chip strong {
  font-size: 0.82rem;
}

.ops-saudi-workspace-chip.pending {
  border-color: rgba(183, 121, 31, 0.42);
  background: rgba(183, 121, 31, 0.1);
}

.ops-workspace-switch {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.ops-workspace-switch svg {
  width: 15px;
  height: 15px;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-home {
  color: #172333;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-kicker {
  color: #176b87;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-intro p {
  color: #66758a;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-option {
  border-color: #cbd7e3;
  background: #ffffff;
  color: #172333;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-option:hover {
  border-color: #176b87;
  background: #f6fafc;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-icon {
  background: #e7f3f7;
  color: #176b87;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-option.accessories .saudi-workspace-icon {
  background: #eaf5ed;
  color: #2f7d46;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-copy small {
  color: #435268;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-copy em,
body.jonathan-workspace.jonathan-light .saudi-workspace-safety {
  color: #68778b;
}

body.jonathan-workspace.jonathan-light .saudi-workspace-enter {
  color: #176b87;
}

body.jonathan-workspace.jonathan-light .ops-saudi-workspace-chip {
  color: #183446;
}

body.saudi-workspace-home-mode #backendWorkspaceRail,
body.saudi-workspace-home-mode #todayWorkspace,
body.saudi-workspace-home-mode #workspaceAnalyticsPanel {
  display: none !important;
}

@media (max-width: 860px) {
  .saudi-workspace-home {
    margin-top: 12px;
    padding: 18px;
  }

  .saudi-workspace-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .saudi-workspace-option {
    min-height: 140px;
  }
}

@media (max-width: 520px) {
  .saudi-workspace-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .saudi-workspace-enter {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .saudi-workspace-option {
    transition: none;
  }
}

/* Paid orders, light theme: calm ink colors with WCAG AA contrast. */
body.jonathan-workspace.jonathan-light #paidOrdersView {
  --paid-light-ink: #17233a;
  --paid-light-muted: #58697d;
  --paid-light-data: #234e63;
  --paid-light-accent: #245f73;
  --paid-light-success: #2f684b;
  --paid-light-warning: #805600;
  --paid-light-border: #c6d3df;
  --paid-light-surface: #ffffff;
  --paid-light-subtle: #f4f7fa;
  color: var(--paid-light-ink) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-head h3,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-table th,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-card h4,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-detail-item strong,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-product-list li b {
  color: var(--paid-light-ink) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-head p,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-sync,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-controls span,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-metric span,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-detail-item span,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-list span,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-product-list em {
  color: var(--paid-light-muted) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-sync b,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-table .logistics-data,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-detail-item .logistics-data,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-list .logistics-data,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-product-list .logistics-data {
  color: var(--paid-light-data) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-metric {
  border-color: var(--paid-light-border) !important;
  background: var(--paid-light-subtle) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-metric strong {
  color: #25364b !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-metric.accent strong {
  color: var(--paid-light-accent) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-metric.success {
  border-color: #a8cdb9 !important;
  background: #f1f7f4 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-metric.success strong {
  color: var(--paid-light-success) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-metric.warning {
  border-color: #ddc48d !important;
  background: #faf6eb !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-metric.warning strong {
  color: var(--paid-light-warning) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-pi-link {
  color: var(--paid-light-accent) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-pi-link:hover {
  color: #194b5d !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-status.success,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-pill.success {
  color: var(--paid-light-success) !important;
  background: #edf6f1 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-status.warning,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-pill.warning {
  color: var(--paid-light-warning) !important;
  background: #fbf5e7 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-status.danger,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-pill.danger {
  color: #b42318 !important;
  background: #fff0ee !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-shortage-list > li {
  background: #ffffff !important;
  border-color: #e7c994 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-shortage-list > li.waiting {
  border-color: #efb2ad !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-shortage-list strong,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-shortage-list dd {
  color: var(--paid-light-ink) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-shortage-list dt {
  color: var(--paid-light-muted) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-pill.muted,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-pill.neutral {
  color: #4f6073 !important;
  background: #eef2f6 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab strong {
  color: var(--paid-light-accent) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab.active,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab.active:hover {
  border-color: #6f9bad !important;
  background: #e5f0f4 !important;
  color: #173f50 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-tab.active strong {
  color: #234f61 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-table-wrap,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-side-card {
  border-color: var(--paid-light-border) !important;
  background: var(--paid-light-surface) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-table th {
  background: #edf2f7 !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-table td,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-table td:last-child {
  color: var(--paid-light-ink) !important;
  background: var(--paid-light-surface) !important;
}

body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-table tr.selected td,
body.jonathan-workspace.jonathan-light #paidOrdersView .paid-orders-table tr.selected td:last-child {
  background: #edf5f7 !important;
}

/* Result surfaces use explicit theme pairs so nested summaries never inherit
   white text on a light export/result card. */
body.jonathan-workspace:not(.jonathan-light) .workflow-result {
  border-color: #34465c !important;
  background: #0e1722 !important;
  color: #dce8f4 !important;
}

body.jonathan-workspace:not(.jonathan-light) .workflow-result.ok {
  border-color: #326b58 !important;
  background: #10251f !important;
}

body.jonathan-workspace:not(.jonathan-light) .workflow-result.warn {
  border-color: #7b6534 !important;
  background: #282116 !important;
  color: #f4dfad !important;
}

body.jonathan-workspace:not(.jonathan-light) .workflow-result.error {
  border-color: #7a3d43 !important;
  background: #2b171b !important;
  color: #ffc8ca !important;
}

body.jonathan-workspace:not(.jonathan-light) .workflow-summary-grid > div,
body.jonathan-workspace:not(.jonathan-light) .inventory-summary-card,
body.jonathan-workspace:not(.jonathan-light) .pick-result-summary > div {
  border-color: #33465c !important;
  background: #172231 !important;
  color: #edf5fb !important;
}

body.jonathan-workspace:not(.jonathan-light) .workflow-summary-grid span,
body.jonathan-workspace:not(.jonathan-light) .inventory-summary-card span,
body.jonathan-workspace:not(.jonathan-light) .pick-result-summary span {
  color: #aebed0 !important;
}

body.jonathan-workspace:not(.jonathan-light) .workflow-summary-grid strong,
body.jonathan-workspace:not(.jonathan-light) .inventory-summary-card strong,
body.jonathan-workspace:not(.jonathan-light) .pick-result-summary strong {
  color: #f7fbff !important;
}

body.jonathan-workspace.jonathan-light .workflow-result {
  border-color: #b8c8d9 !important;
  background: #ffffff !important;
  color: #20364d !important;
}

body.jonathan-workspace.jonathan-light .workflow-result.ok {
  border-color: #9fcab3 !important;
  background: #edf8f1 !important;
}

body.jonathan-workspace.jonathan-light .workflow-result.warn {
  border-color: #d8b86b !important;
  background: #fff8e5 !important;
  color: #674600 !important;
}

body.jonathan-workspace.jonathan-light .workflow-result.error {
  border-color: #dfaaa7 !important;
  background: #fff2f1 !important;
  color: #8d2520 !important;
}

body.jonathan-workspace.jonathan-light .workflow-summary-grid > div,
body.jonathan-workspace.jonathan-light .inventory-summary-card,
body.jonathan-workspace.jonathan-light .pick-result-summary > div {
  border-color: #c7d5e3 !important;
  background: #f2f7fb !important;
  color: #13283e !important;
}

body.jonathan-workspace.jonathan-light .workflow-summary-grid span,
body.jonathan-workspace.jonathan-light .inventory-summary-card span,
body.jonathan-workspace.jonathan-light .pick-result-summary span {
  color: #4d647b !important;
}

body.jonathan-workspace.jonathan-light .workflow-summary-grid strong,
body.jonathan-workspace.jonathan-light .inventory-summary-card strong,
body.jonathan-workspace.jonathan-light .pick-result-summary strong {
  color: #10263b !important;
}

/* Roza activation-code delivery workbench */
.activation-codes-main-view {
  --activation-navy: #10263b;
  --activation-navy-soft: #1b3852;
  --activation-teal: #18766f;
  --activation-teal-bright: #2b9b8e;
  --activation-ice: #edf5f6;
  --activation-line: #cbd8df;
  --activation-copy: #17324a;
  --activation-muted: #607487;
  padding-bottom: 26px;
}

.activation-codes-root {
  display: grid;
  gap: 14px;
  min-width: 0;
  color: var(--activation-copy);
}

.activation-codes-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.42fr);
  gap: 22px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid #25445f;
  border-radius: 12px;
  background:
    linear-gradient(115deg, rgba(43, 155, 142, 0.16), transparent 48%),
    var(--activation-navy);
  box-shadow: 0 16px 34px rgba(16, 38, 59, 0.14);
  color: #f6fbff;
}

.activation-codes-hero h2 {
  margin: 5px 0 7px;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  opacity: 1;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.activation-codes-hero p {
  max-width: 760px;
  margin: 0;
  color: #c4d3df !important;
  -webkit-text-fill-color: #c4d3df;
  opacity: 1;
  font-size: 0.92rem;
  line-height: 1.55;
}

.activation-eyebrow {
  color: #65d0c2;
  font-family: var(--ops-font-code, "JetBrains Mono", Consolas, monospace);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.activation-source-status {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
}

.activation-source-status.ready {
  border-color: rgba(101, 208, 194, 0.42);
  background: rgba(43, 155, 142, 0.12);
}

.activation-source-status.attention {
  border-color: rgba(238, 190, 92, 0.46);
  background: rgba(183, 121, 31, 0.12);
}

.activation-source-status svg {
  width: 21px;
  height: 21px;
  color: #65d0c2;
}

.activation-source-status.attention svg {
  color: #f0c76f;
}

.activation-source-status div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.activation-source-status strong,
.activation-source-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activation-source-status strong {
  color: #f8fbfd;
  font-size: 0.84rem;
}

.activation-source-status span {
  color: #b9cad7;
  font-size: 0.73rem;
}

.activation-source-status a {
  color: #8ce1d6;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.activation-source-status a:hover {
  text-decoration: underline;
}

.activation-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.activation-metric {
  position: relative;
  min-width: 0;
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 13px 15px;
  border: 1px solid var(--activation-line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--activation-copy);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 38, 59, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.activation-metric::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #9aacb9;
}

.activation-metric.accent::before,
.activation-metric.success::before {
  background: var(--activation-teal-bright);
}

.activation-metric.warning::before {
  background: #d5a33e;
}

.activation-metric span {
  color: var(--activation-muted);
  font-size: 0.77rem;
  font-weight: 700;
}

.activation-metric strong {
  color: var(--activation-navy);
  font-family: var(--ops-font-code, "JetBrains Mono", Consolas, monospace);
  font-size: 1.55rem;
  line-height: 1;
}

.activation-metric:hover,
.activation-metric.active {
  border-color: var(--activation-teal);
  box-shadow: 0 8px 20px rgba(24, 118, 111, 0.11);
  transform: translateY(-1px);
}

.activation-metric.active {
  background: var(--activation-ice);
}

.activation-controls {
  display: grid;
  grid-template-columns: minmax(135px, 0.52fr) minmax(135px, 0.52fr) minmax(240px, 1.2fr) minmax(165px, 0.7fr) auto auto;
  gap: 9px;
  align-items: end;
  padding: 13px;
  border: 1px solid var(--activation-line);
  border-radius: 10px;
  background: #ffffff;
}

.activation-controls label,
.activation-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.activation-controls label > span,
.activation-field > span {
  color: var(--activation-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.activation-controls input,
.activation-controls select,
.activation-field input,
.activation-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #bfcdd6;
  border-radius: 7px;
  background: #ffffff;
  color: var(--activation-copy);
  font: inherit;
}

.activation-controls input,
.activation-controls select,
.activation-field input {
  padding: 0 11px;
}

.activation-field textarea {
  padding: 10px 11px;
  resize: vertical;
  font-family: var(--ops-font-code, "JetBrains Mono", Consolas, monospace);
  line-height: 1.45;
}

.activation-controls button,
.activation-export-card button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.activation-controls button svg,
.activation-export-card button svg {
  width: 16px;
  height: 16px;
}

.activation-message {
  padding: 10px 13px;
  border: 1px solid #a9c8c3;
  border-radius: 8px;
  background: #eff9f6;
  color: #175f58;
  font-size: 0.82rem;
  font-weight: 700;
}

.activation-message.info {
  border-color: #aac4da;
  background: #eff6fb;
  color: #285b80;
}

.activation-message.error {
  border-color: #dda9aa;
  background: #fff2f2;
  color: #9b2c2c;
}

.activation-workspace-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.32fr);
  gap: 12px;
  align-items: start;
}

.activation-list-panel,
.activation-detail-panel {
  min-width: 0;
  border: 1px solid var(--activation-line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(16, 38, 59, 0.045);
}

.activation-list-panel {
  overflow: hidden;
}

.activation-list-panel > header {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--activation-line);
  background: #f5f8fa;
}

.activation-list-panel > header div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.activation-list-panel > header span,
.activation-list-panel > header em {
  color: var(--activation-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}

.activation-list-panel > header strong {
  min-width: 26px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #dcebec;
  color: var(--activation-teal);
  font-family: var(--ops-font-code, "JetBrains Mono", Consolas, monospace);
  text-align: center;
}

.activation-task-list {
  max-height: min(650px, calc(100vh - 395px));
  min-height: 420px;
  overflow-y: auto;
  scrollbar-color: #afbec9 transparent;
}

.activation-task-card {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 13px 14px 13px 16px;
  border: 0;
  border-bottom: 1px solid #e0e7ec;
  background: #ffffff;
  color: var(--activation-copy);
  text-align: left;
  cursor: pointer;
}

.activation-task-card::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.activation-task-card:hover {
  background: #f6fafb;
}

.activation-task-card.selected {
  background: var(--activation-ice);
}

.activation-task-card.selected::before {
  background: var(--activation-teal);
}

.activation-task-card-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.activation-task-customer,
.activation-task-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activation-task-customer {
  color: var(--activation-copy);
  font-size: 0.86rem;
  font-weight: 800;
}

.activation-task-detail {
  color: var(--activation-muted);
  font-size: 0.76rem;
}

.activation-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.activation-task-meta em {
  padding: 3px 6px;
  border: 1px solid #d6e0e6;
  border-radius: 4px;
  background: #f7f9fb;
  color: #64788a;
  font-family: var(--ops-font-code, "JetBrains Mono", Consolas, monospace);
  font-size: 0.65rem;
  font-style: normal;
}

.activation-code-data {
  font-family: var(--ops-font-code, "JetBrains Mono", Consolas, monospace);
  letter-spacing: -0.015em;
}

.activation-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 190px;
  padding: 4px 7px;
  border: 1px solid #c5d2da;
  border-radius: 999px;
  background: #f4f7f9;
  color: #53697c;
  font-size: 0.67rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.activation-status-pill.accent {
  border-color: #8fc8c0;
  background: #e6f5f2;
  color: #16675f;
}

.activation-status-pill.warning {
  border-color: #dfbf79;
  background: #fff7e6;
  color: #805817;
}

.activation-status-pill.danger {
  border-color: #dfa7a3;
  background: #fff0ef;
  color: #9a2f2a;
}

.activation-status-pill.success {
  border-color: #92c5ad;
  background: #eaf7ef;
  color: #216a45;
}

.activation-detail-panel {
  padding: 16px;
}

.activation-detail-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.activation-detail-head div {
  min-width: 0;
}

.activation-detail-head span:first-child {
  color: var(--activation-muted);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.activation-detail-head h3 {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--activation-navy);
  font-size: 1.3rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activation-delivery-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 17px 0;
  padding: 0;
  list-style: none;
}

.activation-delivery-rail::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: #d4dee5;
}

.activation-delivery-rail li {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #8293a1;
  text-align: center;
}

.activation-delivery-rail li > span {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #c7d2da;
  border-radius: 50%;
  background: #ffffff;
  font-family: var(--ops-font-code, "JetBrains Mono", Consolas, monospace);
  font-size: 0.65rem;
  font-weight: 900;
}

.activation-delivery-rail li > strong {
  max-width: 120px;
  font-size: 0.68rem;
  line-height: 1.25;
}

.activation-delivery-rail li.complete > span,
.activation-delivery-rail li.active > span {
  border-color: var(--activation-teal);
  background: var(--activation-teal);
  color: #ffffff;
}

.activation-delivery-rail li.active > span {
  box-shadow: 0 0 0 4px rgba(43, 155, 142, 0.13);
}

.activation-delivery-rail li.complete > strong,
.activation-delivery-rail li.active > strong {
  color: var(--activation-teal);
}

.activation-order-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 11px;
  border: 1px solid #d9e2e8;
  border-radius: 8px;
  background: #f7f9fb;
}

.activation-order-meta > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.activation-order-meta span,
.activation-detail-readonly > span,
.activation-export-card span,
.activation-missing-fields > span {
  color: var(--activation-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.activation-order-meta strong {
  overflow: hidden;
  color: var(--activation-copy);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activation-detail-readonly {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px 11px;
  border-left: 3px solid var(--activation-teal-bright);
  background: var(--activation-ice);
}

.activation-detail-readonly strong {
  color: var(--activation-navy);
  font-family: var(--ops-font-code, "JetBrains Mono", Consolas, monospace);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.activation-sync-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #dfbd6c;
  border-radius: 7px;
  background: #fff8e5;
  color: #775514;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.4;
}

.activation-sync-warning svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.activation-sync-warning.danger {
  border-color: #dfa7a3;
  background: #fff0ef;
  color: #912f2a;
}

.activation-delivery-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 13px;
}

.activation-field-wide {
  grid-column: 1 / -1;
}

.activation-export-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid #a9cbc5;
  border-radius: 8px;
  background: #eff8f6;
}

.activation-export-card > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.activation-export-card strong {
  overflow-wrap: anywhere;
  color: #175f58;
  font-size: 0.8rem;
}

.activation-export-card small {
  color: #587b76;
  font-size: 0.68rem;
  line-height: 1.35;
}

.activation-missing-fields {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid #e1c582;
  border-radius: 7px;
  background: #fff9ea;
}

.activation-missing-fields div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.activation-missing-fields em {
  padding: 3px 6px;
  border-radius: 4px;
  background: #f4e6bd;
  color: #795716;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
}

.activation-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activation-form-actions button {
  min-width: 170px;
}

.activation-form-actions span {
  color: var(--activation-muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.activation-empty-state,
.activation-detail-empty,
.activation-access-denied {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  min-height: 240px;
  padding: 28px;
  color: var(--activation-muted);
  text-align: center;
}

.activation-detail-empty {
  min-height: 420px;
}

.activation-detail-empty svg {
  width: 30px;
  height: 30px;
  color: var(--activation-teal);
}

.activation-empty-state strong,
.activation-detail-empty strong,
.activation-access-denied strong {
  color: var(--activation-copy);
  font-size: 0.9rem;
}

.activation-empty-state span,
.activation-detail-empty span {
  max-width: 360px;
  font-size: 0.76rem;
  line-height: 1.5;
}

.activation-codes-root :is(button, input, select, textarea, a):focus-visible {
  outline: 3px solid rgba(43, 155, 142, 0.25);
  outline-offset: 2px;
}

body.jonathan-workspace:not(.jonathan-light) .activation-codes-main-view {
  --activation-line: #34495d;
  --activation-copy: #e8f0f6;
  --activation-muted: #a7b7c6;
  --activation-ice: #172d35;
}

body.jonathan-workspace:not(.jonathan-light) :is(
  .activation-metric,
  .activation-controls,
  .activation-list-panel,
  .activation-detail-panel,
  .activation-task-card
) {
  border-color: #34495d;
  background: #152131;
  color: #e8f0f6;
}

body.jonathan-workspace:not(.jonathan-light) .activation-list-panel > header,
body.jonathan-workspace:not(.jonathan-light) .activation-order-meta,
body.jonathan-workspace:not(.jonathan-light) .activation-task-meta em {
  border-color: #34495d;
  background: #1b2a3c;
}

body.jonathan-workspace:not(.jonathan-light) .activation-task-card:hover,
body.jonathan-workspace:not(.jonathan-light) .activation-task-card.selected {
  background: #17323a;
}

body.jonathan-workspace:not(.jonathan-light) .activation-controls :is(input, select),
body.jonathan-workspace:not(.jonathan-light) .activation-field :is(input, textarea) {
  border-color: #455b70;
  background: #111c2a;
  color: #edf5fb;
}

body.jonathan-workspace:not(.jonathan-light) .activation-metric strong,
body.jonathan-workspace:not(.jonathan-light) .activation-detail-head h3,
body.jonathan-workspace:not(.jonathan-light) .activation-task-customer,
body.jonathan-workspace:not(.jonathan-light) .activation-order-meta strong,
body.jonathan-workspace:not(.jonathan-light) .activation-detail-readonly strong,
body.jonathan-workspace:not(.jonathan-light) .activation-empty-state strong,
body.jonathan-workspace:not(.jonathan-light) .activation-detail-empty strong {
  color: #f3f8fb;
}

body.jonathan-workspace:not(.jonathan-light) .activation-detail-readonly {
  background: #142d34;
}

body.jonathan-workspace:not(.jonathan-light) .activation-sync-warning {
  border-color: #80672b;
  background: #342c19;
  color: #f0d88b;
}

body.jonathan-workspace:not(.jonathan-light) .activation-sync-warning.danger {
  border-color: #7a3d43;
  background: #321d22;
  color: #ffc8ca;
}

body.jonathan-workspace:not(.jonathan-light) .activation-export-card {
  border-color: #2c6f67;
  background: #15302e;
}

body.jonathan-workspace:not(.jonathan-light) .activation-export-card strong {
  color: #8be0d4;
}

body.jonathan-workspace:not(.jonathan-light) .activation-delivery-rail li > span {
  border-color: #506275;
  background: #152131;
}

@media (max-width: 1180px) {
  .activation-controls {
    grid-template-columns: repeat(2, minmax(145px, 0.6fr)) minmax(240px, 1.4fr) minmax(170px, 0.8fr);
  }

  .activation-controls button {
    grid-column: span 2;
  }

  .activation-workspace-grid {
    grid-template-columns: minmax(285px, 0.72fr) minmax(470px, 1.28fr);
  }
}

@media (max-width: 980px) {
  .activation-codes-hero,
  .activation-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .activation-task-list {
    min-height: 0;
    max-height: 420px;
  }

  .activation-detail-panel {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .activation-codes-main-view {
    padding-bottom: 14px;
  }

  .activation-codes-root {
    gap: 10px;
  }

  .activation-codes-hero {
    gap: 15px;
    padding: 17px;
    border-radius: 9px;
  }

  .activation-source-status {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .activation-source-status a {
    grid-column: 2;
  }

  .activation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .activation-metric {
    min-height: 72px;
    padding: 11px 12px;
  }

  .activation-controls {
    grid-template-columns: minmax(0, 1fr);
    padding: 11px;
  }

  .activation-controls button {
    grid-column: auto;
    width: 100%;
  }

  .activation-list-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .activation-detail-panel {
    padding: 13px;
  }

  .activation-delivery-rail li > strong {
    font-size: 0.61rem;
  }

  .activation-order-meta,
  .activation-delivery-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .activation-field-wide {
    grid-column: auto;
  }

  .activation-export-card,
  .activation-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .activation-export-card button,
  .activation-form-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .activation-codes-root *,
  .activation-codes-root *::before,
  .activation-codes-root *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Calm operations visual foundation */
:root {
  --bg: #f2f6f8;
  --ink: #17324a;
  --muted: #526a7f;
  --line: #c8d6de;
  --soft: #edf3f5;
  --accent: #1d7085;
  --accent-dark: #155769;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-muted: #eaf1f4;
  --focus: rgba(29, 112, 133, 0.24);
  --shadow-xs: 0 1px 2px rgba(23, 50, 74, 0.04);
  --shadow-sm: 0 4px 14px rgba(23, 50, 74, 0.05);
  --shadow-md: 0 14px 36px rgba(23, 50, 74, 0.10);
  --ops-ui-font: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --ops-data-font: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --ops-ui-canvas: #f2f6f8;
  --ops-ui-surface: #ffffff;
  --ops-ui-soft: #eaf1f4;
  --ops-ui-ink: #17324a;
  --ops-ui-muted: #526a7f;
  --ops-ui-line: #c8d6de;
  --ops-ui-accent: #1d7085;
  --ops-ui-accent-strong: #155769;
  --ops-ui-success: #286b56;
  --ops-ui-warning: #895713;
  --ops-ui-danger: #a63d3d;
  --ops-ui-focus: rgba(29, 112, 133, 0.24);
  --ops-ui-shadow-low: 0 4px 14px rgba(23, 50, 74, 0.05);
  --ops-ui-shadow-raised: 0 14px 36px rgba(23, 50, 74, 0.10);
  --ops-ui-motion: 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

body,
button,
input,
select,
textarea {
  font-family: var(--ops-ui-font);
}

body {
  color: var(--ops-ui-ink);
  font-size: 1rem;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

:is(.mono-cell, .logistics-data, .after-sales-mono, .qty-cell) {
  font-family: var(--ops-data-font);
  font-variant-numeric: tabular-nums;
}

.workspace :is(button, a, input, select, textarea) {
  transition:
    color var(--ops-ui-motion),
    background-color var(--ops-ui-motion),
    border-color var(--ops-ui-motion),
    box-shadow var(--ops-ui-motion);
}

.workspace :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--ops-ui-focus);
  outline-offset: 2px;
}

/* After-sales spare-parts workspace */
.after-sales-main-view {
  --as-canvas: #f2f6f8;
  --as-surface: #ffffff;
  --as-soft: #eaf1f4;
  --as-soft-strong: #dce9ed;
  --as-ink: #17324a;
  --as-muted: #526a7f;
  --as-line: #c8d6de;
  --as-control-border: #6f8797;
  --as-accent: #1d7085;
  --as-accent-strong: #155769;
  --as-success: #286b56;
  --as-success-soft: #e5edeb;
  --as-warning: #895713;
  --as-warning-soft: #f1ebe3;
  --as-danger: #a63d3d;
  --as-danger-soft: #f4e8e8;
  --as-neutral-soft: #eef2f4;
  min-width: 0;
  display: grid;
  gap: 16px;
  padding-bottom: 24px;
  color: var(--as-ink);
}

.after-sales-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--as-line);
  border-radius: 12px;
  background: var(--as-surface);
  box-shadow: var(--ops-ui-shadow-low);
}

.after-sales-tabs {
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--as-line);
  border-radius: 10px;
  background: var(--as-soft);
}

.after-sales-tabs button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--as-muted);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.after-sales-tabs button:is(:hover, .active),
.after-sales-tabs button[aria-selected="true"] {
  background: var(--as-surface);
  color: var(--as-accent-strong);
  box-shadow: 0 1px 4px rgba(23, 50, 74, 0.08);
}

.after-sales-panel {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--as-line);
  border-radius: 12px;
  background: var(--as-surface);
  box-shadow: var(--ops-ui-shadow-low);
}

.after-sales-input-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(240px, 0.72fr) auto;
  gap: 12px;
  align-items: end;
}

.after-sales-file-control input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.after-sales-file-line {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--as-control-border);
  border-radius: 8px;
  background: var(--as-surface);
  cursor: pointer;
}

.after-sales-file-control:focus-within .after-sales-file-line {
  border-color: var(--as-accent);
  outline: 3px solid var(--as-accent);
  outline-offset: 1px;
}

.after-sales-table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--as-line);
  border-radius: 10px;
  background: var(--as-surface);
  scrollbar-gutter: stable;
}

.after-sales-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: var(--as-ink);
}

.after-sales-table th {
  padding: 10px 12px;
  background: var(--as-soft);
  color: var(--as-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.after-sales-table td {
  min-height: 44px;
  padding: 11px 12px;
  border-top: 1px solid var(--as-line);
  color: var(--as-ink);
  font-size: 0.875rem;
  vertical-align: middle;
}

.after-sales-head > div,
.after-sales-workspace,
.after-sales-order-workbench,
.after-sales-order-detail {
  min-width: 0;
}

.after-sales-kicker,
.after-sales-section-code {
  display: block;
  color: var(--as-accent);
  font-family: var(--ops-data-font);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.after-sales-head h2,
.after-sales-panel-head h3 {
  margin: 4px 0 0;
  color: var(--as-ink);
}

.after-sales-head h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.after-sales-head p,
.after-sales-panel-head > span,
.after-sales-muted {
  color: var(--as-muted);
}

.after-sales-head p {
  max-width: 70ch;
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.5;
}

.after-sales-panel-head,
.after-sales-confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.after-sales-input-grid label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--as-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.after-sales-input-grid select {
  width: 100%;
  min-height: 44px;
  padding: 9px 36px 9px 12px;
  border: 1px solid var(--as-control-border);
  border-radius: 8px;
  background: var(--as-surface);
  color: var(--as-ink);
}

.after-sales-input-grid > button {
  min-height: 44px;
  white-space: nowrap;
}

.after-sales-file-line strong {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--as-soft);
  color: var(--as-accent-strong);
  font-size: 0.8125rem;
}

.after-sales-file-line em {
  min-width: 0;
  overflow: hidden;
  color: var(--as-ink);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sales-file-control small {
  color: var(--as-muted);
  font-size: 0.75rem;
}

.after-sales-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--as-line);
  border-radius: 10px;
  background: var(--as-soft);
  color: var(--as-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
}

.after-sales-custody,
.after-sales-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.after-sales-custody-step,
.after-sales-facts > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--as-line);
  border-radius: 8px;
  background: var(--as-soft);
}

.after-sales-custody-step small,
.after-sales-facts span {
  color: var(--as-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.after-sales-custody-step strong,
.after-sales-facts strong {
  overflow-wrap: anywhere;
  color: var(--as-ink);
  font-size: 0.875rem;
}

.after-sales-custody-arrow {
  display: none;
}

.after-sales-reconcile {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--as-line);
  border-radius: 10px;
  background: var(--as-soft);
}

.after-sales-reconcile.complete {
  border-color: color-mix(in srgb, var(--as-success) 42%, var(--as-line));
  background: color-mix(in srgb, var(--as-success) 8%, var(--as-surface));
}

.after-sales-reconcile.exception {
  border-color: color-mix(in srgb, var(--as-danger) 42%, var(--as-line));
  background: color-mix(in srgb, var(--as-danger) 8%, var(--as-surface));
}

.after-sales-reconcile span {
  display: grid;
  gap: 4px;
  color: var(--as-muted);
  font-size: 0.75rem;
}

.after-sales-reconcile strong {
  color: var(--as-ink);
  font-size: 0.875rem;
}

.after-sales-notices {
  margin: 0;
  padding: 12px 14px 12px 32px;
  border: 1px solid var(--as-line);
  border-radius: 8px;
  color: var(--as-ink);
  font-size: 0.875rem;
  line-height: 1.5;
}

.after-sales-notices.warning {
  border-color: color-mix(in srgb, var(--as-warning) 42%, var(--as-line));
  background: color-mix(in srgb, var(--as-warning) 8%, var(--as-surface));
}

.after-sales-notices.exception {
  border-color: color-mix(in srgb, var(--as-danger) 42%, var(--as-line));
  background: color-mix(in srgb, var(--as-danger) 8%, var(--as-surface));
}

.after-sales-confirm-row {
  padding-top: 12px;
  border-top: 1px solid var(--as-line);
  color: var(--as-muted);
  font-size: 0.875rem;
}

.after-sales-task-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--as-line);
  border-radius: 10px;
  background: var(--as-surface);
}

.after-sales-task-card.has-exception {
  border-color: color-mix(in srgb, var(--as-danger) 42%, var(--as-line));
  background: color-mix(in srgb, var(--as-danger) 5%, var(--as-surface));
}

.after-sales-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.after-sales-card-head h3,
.after-sales-card-head span {
  margin: 0;
  color: var(--as-ink);
}

.after-sales-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--as-line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.after-sales-state.complete {
  border-color: color-mix(in srgb, var(--as-success) 42%, var(--as-line));
  background: color-mix(in srgb, var(--as-success) 10%, var(--as-surface));
  color: var(--as-success);
}

.after-sales-state.waiting {
  border-color: color-mix(in srgb, var(--as-warning) 42%, var(--as-line));
  background: color-mix(in srgb, var(--as-warning) 10%, var(--as-surface));
  color: var(--as-warning);
}

.after-sales-state.exception {
  border-color: color-mix(in srgb, var(--as-danger) 42%, var(--as-line));
  background: color-mix(in srgb, var(--as-danger) 10%, var(--as-surface));
  color: var(--as-danger);
}

.after-sales-task-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.28fr);
  gap: 12px;
  align-items: start;
}

.after-sales-task-actions,
.after-sales-action-stack,
.after-sales-document-gate {
  display: grid;
  gap: 10px;
}

.after-sales-task-actions {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--as-line);
  border-radius: 10px;
  background: var(--as-soft);
}

.after-sales-document-gate label {
  display: grid;
  gap: 6px;
  color: var(--as-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.after-sales-document-gate input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--as-control-border);
  border-radius: 8px;
  background: var(--as-surface);
  color: var(--as-ink);
}

.after-sales-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.after-sales-readback {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--as-line);
  border-radius: 8px;
  background: var(--as-surface);
}

.after-sales-readback span {
  color: var(--as-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.after-sales-readback strong {
  overflow-wrap: anywhere;
  color: var(--as-ink);
  font-size: 0.8125rem;
}

.after-sales-allocation-product-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.after-sales-allocation-product {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--as-line);
}

.after-sales-allocation-product:last-child {
  border-bottom: 0;
}

.after-sales-allocation-product > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.after-sales-allocation-product b {
  overflow-wrap: anywhere;
  color: var(--as-ink);
  font-size: 0.875rem;
}

.after-sales-allocation-product em {
  overflow-wrap: anywhere;
  color: var(--as-muted);
  font-size: 0.75rem;
  font-style: normal;
  line-height: 1.45;
}

.after-sales-allocation-product > strong {
  color: var(--as-accent-strong);
  font-size: 0.9375rem;
}

.after-sales-order-workbench :is(
  .paid-orders-head h3,
  .paid-orders-table td,
  .paid-orders-side-card h4,
  .paid-orders-detail-grid strong
) {
  color: var(--as-ink);
}

.after-sales-order-workbench :is(
  .paid-orders-head p,
  .paid-orders-sync,
  .paid-orders-controls label > span,
  .paid-orders-metric span,
  .paid-orders-table th,
  .paid-orders-side-empty,
  .paid-orders-detail-grid span
) {
  color: var(--as-muted);
}

.after-sales-order-workbench :is(
  .paid-orders-controls,
  .paid-orders-metric,
  .paid-orders-table-wrap,
  .paid-orders-side-card
) {
  border-color: var(--as-line);
  background: var(--as-surface);
}

.after-sales-order-workbench :is(input, select) {
  border-color: var(--as-line);
  background: var(--as-surface);
  color: var(--as-ink);
}

.after-sales-order-workbench .paid-orders-table th,
.after-sales-order-workbench .paid-orders-tabs {
  background: var(--as-soft);
}

.after-sales-order-workbench .paid-orders-table tr.selected td {
  background: color-mix(in srgb, var(--as-accent) 8%, var(--as-surface));
}

.after-sales-main-view :is(button, input, select, a):focus-visible {
  outline: 3px solid var(--ops-ui-focus);
  outline-offset: 2px;
}

.after-sales-table-wrap:focus-visible,
.after-sales-order-workbench .paid-orders-table-wrap:focus-visible {
  outline: 3px solid var(--ops-ui-focus);
  outline-offset: 2px;
}

body.jonathan-workspace:not(.jonathan-light) .after-sales-main-view {
  --as-canvas: #0f1720;
  --as-surface: #16212d;
  --as-soft: #1c2a37;
  --as-soft-strong: #243746;
  --as-ink: #edf5f7;
  --as-muted: #a6bac5;
  --as-line: #334756;
  --as-control-border: #607888;
  --as-accent: #70c3d2;
  --as-accent-strong: #a2dce5;
  --as-success: #77c5a8;
  --as-success-soft: #20372f;
  --as-warning: #e1b76f;
  --as-warning-soft: #3a3224;
  --as-danger: #ef9a9a;
  --as-danger-soft: #3d292b;
  --as-neutral-soft: #243746;
}

body.jonathan-workspace:not(.jonathan-light) .after-sales-main-view :is(
  .after-sales-head,
  .after-sales-panel,
  .after-sales-file-line,
  .after-sales-table-wrap,
  .after-sales-order-workbench .paid-orders-controls,
  .after-sales-order-workbench .paid-orders-metric,
  .after-sales-order-workbench .paid-orders-table-wrap,
  .after-sales-order-workbench .paid-orders-side-card
) {
  box-shadow: none;
}

@media (max-width: 980px) {
  .after-sales-input-grid,
  .after-sales-facts,
  .after-sales-custody,
  .after-sales-task-grid,
  .after-sales-order-workbench .paid-orders-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .after-sales-main-view {
    gap: 12px;
  }

  .after-sales-head,
  .after-sales-panel {
    padding: 16px;
  }

  .after-sales-head,
  .after-sales-panel-head,
  .after-sales-confirm-row {
    align-items: stretch;
    flex-direction: column;
  }

  .after-sales-input-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .after-sales-main-view :is(button, input, select) {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .after-sales-main-view *,
  .after-sales-main-view *::before,
  .after-sales-main-view *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Dispatch Workbench: PI -> EAN -> CI/AR operational chain. */
.dispatch-workbench-shell {
  --dispatch-ink: #173044;
  --dispatch-muted: #64768a;
  --dispatch-line: #d8e3ec;
  --dispatch-soft: #f3f8fb;
  --dispatch-surface: #ffffff;
  --dispatch-accent: #176b87;
  --dispatch-accent-soft: #e4f3f7;
  font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-variant-numeric: tabular-nums;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--dispatch-line);
  border-radius: 14px;
  background: var(--dispatch-surface);
  color: var(--dispatch-ink);
  box-shadow: 0 10px 30px rgba(36, 64, 84, 0.06);
}

.dispatch-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.dispatch-workbench-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--dispatch-accent);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.dispatch-workbench-head h2 {
  margin: 0;
  color: var(--dispatch-ink);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.dispatch-workbench-head p {
  margin: 7px 0 0;
  color: var(--dispatch-muted);
  font-size: 14px;
}

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

.dispatch-workbench-scope,
.dispatch-workbench-source {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--dispatch-line);
  border-radius: 999px;
  background: var(--dispatch-soft);
  color: var(--dispatch-muted);
  font-size: 12px;
  font-weight: 750;
}

.dispatch-workbench-source {
  border-color: #bee2d1;
  background: #ecf8f1;
  color: #246b4b;
}

.dispatch-queue-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--dispatch-line);
  border-radius: 10px;
  background: var(--dispatch-soft);
  overflow: hidden;
}

.dispatch-queue-tabs button {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 13px;
  border: 0;
  border-right: 1px solid var(--dispatch-line);
  background: transparent;
  color: var(--dispatch-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.dispatch-queue-tabs button:last-child { border-right: 0; }
.dispatch-queue-tabs button:hover { background: rgba(255, 255, 255, 0.55); }
.dispatch-queue-tabs button.active {
  background: var(--dispatch-surface);
  color: var(--dispatch-accent);
  box-shadow: inset 0 -2px 0 var(--dispatch-accent);
}
.dispatch-queue-tabs strong {
  min-width: 22px;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.dispatch-search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--dispatch-line);
  border-radius: 10px;
  background: var(--dispatch-soft);
}

.dispatch-search-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--dispatch-muted);
  font-size: 11px;
  font-weight: 700;
}

.dispatch-search-grid input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--dispatch-line);
  border-radius: 7px;
  background: var(--dispatch-surface);
  color: var(--dispatch-ink);
  font: inherit;
}

.dispatch-queue-tabs button:focus-visible,
.dispatch-search-grid input:focus-visible,
.dispatch-search-grid button:focus-visible,
.dispatch-doc-links button:focus-visible,
[data-dispatch-return-pi]:focus-visible {
  outline: 3px solid rgba(29, 112, 133, 0.24);
  outline-offset: 2px;
}

.dispatch-workbench-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(140px, 0.24fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--dispatch-line);
  border-radius: 12px;
  background: var(--dispatch-soft);
}

.dispatch-workbench-toolbar label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--dispatch-muted);
  font-size: 11px;
  font-weight: 800;
}

.dispatch-workbench-toolbar input,
.dispatch-workbench-toolbar select {
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #c8d6e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--dispatch-ink);
  font: inherit;
}

.dispatch-workbench-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 8px;
}

.dispatch-workbench-kpi {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid var(--dispatch-line);
  border-radius: 11px;
  background: #fbfdfe;
}

.dispatch-workbench-kpi span {
  color: var(--dispatch-muted);
  font-size: 11px;
  font-weight: 750;
}

.dispatch-workbench-kpi strong {
  color: var(--dispatch-ink);
  font-family: inherit;
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dispatch-workbench-kpi.issued { border-bottom-color: #4b9f7a; }
.dispatch-workbench-kpi.remaining { border-bottom-color: #d8a442; }
.dispatch-workbench-kpi.exception { border-bottom-color: #c95a5a; }

.dispatch-workbench-layout {
  min-height: 560px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 12px;
}

.dispatch-workbench-overview,
.dispatch-workbench-detail {
  min-width: 0;
  border: 1px solid var(--dispatch-line);
  border-radius: 14px;
  background: #fbfdfe;
  overflow: hidden;
}

.dispatch-workbench-overview {
  max-height: 720px;
  overflow-y: auto;
}

.dispatch-overview-label {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--dispatch-line);
  background: rgba(251, 253, 254, 0.96);
  color: var(--dispatch-muted);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.dispatch-pi-list {
  display: grid;
  gap: 8px;
  padding: 9px;
}

.dispatch-workbench-pi-card {
  width: 100%;
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--dispatch-line);
  border-radius: 11px;
  background: var(--dispatch-surface);
  color: var(--dispatch-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.dispatch-workbench-pi-card:hover,
.dispatch-workbench-pi-card.active {
  border-color: rgba(23, 107, 135, 0.52);
  box-shadow: 0 10px 24px rgba(23, 107, 135, 0.1);
  transform: translateY(-1px);
}

.dispatch-workbench-pi-card.active {
  background: linear-gradient(135deg, #ffffff 0%, #edf8fb 100%);
}

.dispatch-workbench-pi-card:focus-visible,
.dispatch-detail-tabs button:focus-visible,
.dispatch-doc-links button:focus-visible,
.dispatch-amount-list button:focus-visible {
  outline: 3px solid rgba(23, 107, 135, 0.24);
  outline-offset: 2px;
}

.dispatch-pi-card-head,
.dispatch-pi-card-foot,
.dispatch-pi-quantities {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dispatch-pi-card-head > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.dispatch-pi-card-head small {
  color: var(--dispatch-muted);
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
}

.dispatch-pi-card-head strong {
  overflow: hidden;
  color: var(--dispatch-ink);
  font-family: inherit;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-status,
.dispatch-amount {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.dispatch-status.pending,
.dispatch-status.partial,
.dispatch-amount.unresolved {
  background: #fff3d8;
  color: #8a5a00;
}

.dispatch-status.complete,
.dispatch-amount.verified {
  background: #e7f5ec;
  color: #24714d;
}

.dispatch-pi-customer {
  overflow: hidden;
  color: var(--dispatch-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-quantity-rail {
  height: 6px;
  display: block;
  border-radius: 99px;
  background: #e5edf3;
  overflow: hidden;
}

.dispatch-quantity-rail i {
  width: var(--dispatch-progress, 0%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #2a7d91, #4fa98d);
}

.dispatch-pi-quantities span {
  display: grid;
  gap: 1px;
  color: var(--dispatch-muted);
  font-size: 9px;
}

.dispatch-pi-quantities b {
  color: var(--dispatch-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.dispatch-pi-card-foot {
  color: var(--dispatch-muted);
  font-size: 10px;
}

.dispatch-workbench-state,
.dispatch-detail-empty {
  min-height: 180px;
  display: grid;
  place-content: center;
  gap: 7px;
  padding: 24px;
  color: var(--dispatch-muted);
  text-align: center;
}

.dispatch-workbench-state.error { color: #9d3333; }
.dispatch-workbench-state span { font-size: 12px; }

.dispatch-detail-empty {
  min-height: 100%;
}

.dispatch-detail-empty svg {
  width: 34px;
  height: 34px;
  margin: 0 auto 5px;
  color: var(--dispatch-accent);
}

.dispatch-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 13px;
  background: var(--dispatch-surface);
}

.dispatch-detail-head small,
.dispatch-detail-head > span {
  color: var(--dispatch-muted);
  font-size: 10px;
  font-weight: 800;
}

.dispatch-detail-head h3 {
  margin: 2px 0;
  color: var(--dispatch-ink);
  font-family: inherit;
  font-size: 21px;
}

.dispatch-detail-head p { margin: 0; color: var(--dispatch-muted); }
.dispatch-detail-context {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dispatch-muted);
  font-size: 10px;
  font-weight: 700;
}
.dispatch-detail-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(80px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 16px 12px;
  background: var(--dispatch-surface);
}
.dispatch-detail-facts div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  border-left: 1px solid var(--dispatch-line);
}
.dispatch-detail-facts div:first-child { border-left: 0; padding-left: 0; }
.dispatch-detail-facts dt { color: var(--dispatch-muted); font-size: 9px; }
.dispatch-detail-facts dd {
  margin: 0;
  color: var(--dispatch-ink);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.dispatch-detail-facts .dispatch-amount { padding: 0; background: transparent; }

.dispatch-detail-tabs {
  display: flex;
  gap: 3px;
  padding: 0 16px;
  border-bottom: 1px solid var(--dispatch-line);
  background: var(--dispatch-surface);
  overflow-x: auto;
}

.dispatch-detail-tabs button {
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--dispatch-muted);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.dispatch-detail-tabs button.active {
  border-bottom-color: var(--dispatch-accent);
  color: var(--dispatch-accent);
}

.dispatch-detail-body {
  min-height: 430px;
  padding: 14px;
  overflow: auto;
}

.dispatch-detail-table-wrap { overflow: auto; }

.dispatch-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.dispatch-detail-table th,
.dispatch-detail-table td {
  padding: 10px;
  border-bottom: 1px solid var(--dispatch-line);
  color: var(--dispatch-ink);
  text-align: left;
  vertical-align: top;
}

.dispatch-detail-table th {
  color: var(--dispatch-muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.dispatch-product-groups {
  display: grid;
  gap: 12px;
}

.dispatch-product-group {
  border: 1px solid var(--dispatch-line);
  border-radius: 10px;
  background: var(--dispatch-surface);
  overflow: hidden;
}

.dispatch-product-head {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.2fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--dispatch-line);
  background: var(--dispatch-soft);
}

.dispatch-product-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.dispatch-product-head strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.dispatch-product-head > div span {
  color: var(--dispatch-muted);
  font-size: 11px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.dispatch-product-head dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(52px, 1fr));
  gap: 6px;
  margin: 0;
}
.dispatch-product-head dl div { display: grid; gap: 2px; }
.dispatch-product-head dt {
  color: var(--dispatch-muted);
  font-size: 9px;
}
.dispatch-product-head dd {
  margin: 0;
  color: var(--dispatch-ink);
  font-size: 13px;
  font-weight: 700;
}
.dispatch-batch-table { min-width: 660px; }
.dispatch-pool-key {
  max-width: 240px;
  overflow: hidden;
  color: var(--dispatch-muted) !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-ar-view {
  min-height: 100%;
  padding: 16px;
  background: var(--dispatch-surface);
}
.dispatch-return-pi {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--dispatch-line);
  border-radius: 7px;
  background: var(--dispatch-soft);
  color: var(--dispatch-accent);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.dispatch-return-pi svg { width: 15px; height: 15px; }
.dispatch-ar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--dispatch-line);
}
.dispatch-ar-head small { color: var(--dispatch-muted); font-size: 10px; font-weight: 700; }
.dispatch-ar-head h3 { margin: 2px 0; font-size: 20px; overflow-wrap: anywhere; }
.dispatch-ar-head p { margin: 0; color: var(--dispatch-muted); font-size: 12px; }
.dispatch-ar-head > span {
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--dispatch-soft);
  color: var(--dispatch-muted);
  font-size: 11px;
  font-weight: 700;
}
.dispatch-ar-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 0;
  margin: 12px 0 18px;
  border: 1px solid var(--dispatch-line);
  border-radius: 9px;
  overflow: hidden;
}
.dispatch-ar-summary div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-right: 1px solid var(--dispatch-line);
  background: var(--dispatch-soft);
}
.dispatch-ar-summary div:last-child { border-right: 0; }
.dispatch-ar-summary span { color: var(--dispatch-muted); font-size: 10px; }
.dispatch-ar-summary strong {
  color: var(--dispatch-ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.dispatch-ar-lines h4,
.dispatch-ar-timeline h4 { margin: 18px 0 8px; font-size: 13px; }
.dispatch-ar-timeline { padding-top: 2px; }

.dispatch-doc-links { display: flex; flex-wrap: wrap; gap: 4px; }
.dispatch-doc-links button,
.dispatch-amount-list button {
  padding: 5px 7px;
  border: 1px solid #c8dce6;
  border-radius: 7px;
  background: #edf7fa;
  color: var(--dispatch-accent);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.dispatch-timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dispatch-timeline li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  min-height: 72px;
}

.dispatch-timeline li > span {
  position: relative;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border: 2px solid var(--dispatch-surface);
  border-radius: 50%;
  background: var(--dispatch-accent);
  box-shadow: 0 0 0 1px var(--dispatch-accent);
}

.dispatch-timeline li > span::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 3px;
  width: 1px;
  height: 56px;
  background: var(--dispatch-line);
}

.dispatch-timeline li:last-child > span::after { display: none; }
.dispatch-timeline div { display: grid; gap: 3px; }
.dispatch-timeline time {
  color: var(--dispatch-accent);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.dispatch-timeline small { color: var(--dispatch-muted); }

.dispatch-amount-evidence {
  padding: 18px;
  border: 1px solid #ead7a6;
  border-radius: 11px;
  background: #fff9e9;
  color: #765414;
}

.dispatch-amount-evidence p { margin: 6px 0 0; }
.dispatch-amount-list,
.dispatch-change-list { display: grid; gap: 7px; }
.dispatch-amount-list button,
.dispatch-change-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--dispatch-line);
  background: var(--dispatch-surface);
  color: var(--dispatch-ink);
  font-family: inherit;
  font-size: 12px;
}

.dispatch-change-list article span { display: grid; gap: 2px; }
.dispatch-change-list small,
.dispatch-change-list time { color: var(--dispatch-muted); }
.dispatch-ci-drawer-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dispatch-ci-drawer-meta span { padding: 7px 9px; border-radius: 7px; background: var(--soft); }
.dispatch-ci-timeline-title { margin: 18px 0 12px; }

.dispatch-workbench-audit-panel {
  border: 1px solid var(--dispatch-line);
  border-radius: 14px;
  background: #fbfdfe;
  overflow: hidden;
}

.dispatch-workbench-audit-panel > summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: var(--dispatch-ink);
  cursor: pointer;
  font-weight: 850;
}

.dispatch-workbench-audit-panel > summary small {
  color: var(--dispatch-muted);
  font-size: 11px;
  font-weight: 650;
}

.dispatch-workbench-audit-panel[open] > summary {
  border-bottom: 1px solid var(--dispatch-line);
  background: var(--dispatch-soft);
}

.dispatch-workbench-audit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--dispatch-line);
}

.dispatch-audit-history-toggle,
.dispatch-workbench-audit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dispatch-audit-history-toggle {
  color: var(--dispatch-muted);
  font-size: 12px;
  font-weight: 750;
}

.dispatch-workbench-export-status {
  min-height: 0;
  padding: 0 14px;
  color: var(--dispatch-muted);
  font-size: 11px;
}

.dispatch-workbench-export-status:not(:empty) {
  padding-top: 10px;
}

.dispatch-workbench-audit {
  min-height: 120px;
  max-height: 520px;
  padding: 0 14px 14px;
  overflow: auto;
}

.dispatch-audit-table-wrap {
  min-width: 900px;
  padding-top: 10px;
}

.dispatch-audit-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
}

.dispatch-audit-table th,
.dispatch-audit-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--dispatch-line);
  color: var(--dispatch-ink);
  text-align: left;
  vertical-align: top;
}

.dispatch-audit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfdfe;
  color: var(--dispatch-muted);
  font-size: 10px;
}

.dispatch-audit-table button {
  padding: 3px 6px;
  border: 1px solid #c8dce6;
  border-radius: 6px;
  background: #edf7fa;
  color: var(--dispatch-accent);
  cursor: pointer;
}

.dispatch-audit-table code {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--dispatch-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-audit-more {
  display: flex;
  justify-content: center;
  padding: 14px 0 2px;
}

.dispatch-audit-more button {
  min-height: 38px;
  padding: 8px 18px;
  border: 1px solid var(--dispatch-line);
  border-radius: 9px;
  background: var(--dispatch-panel);
  color: var(--dispatch-ink);
  font-weight: 700;
  cursor: pointer;
}

.dispatch-audit-more button:hover,
.dispatch-audit-more button:focus-visible {
  border-color: var(--dispatch-accent);
  box-shadow: 0 0 0 3px rgba(40, 118, 138, 0.14);
}

.dispatch-action-queue {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
}

.dispatch-action-queue summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  color: var(--ink);
  cursor: pointer;
}

.dispatch-action-queue summary small { color: var(--muted); }
.dispatch-action-queue[open] { padding-bottom: 12px; }
.dispatch-action-queue[open] > .section-head,
.dispatch-action-queue[open] > .task-list { margin: 0 12px 10px; }

body.jonathan-workspace:not(.jonathan-light) .dispatch-workbench-shell {
  --dispatch-ink: #e5edf5;
  --dispatch-muted: #91a1b4;
  --dispatch-line: #273545;
  --dispatch-soft: #121b25;
  --dispatch-surface: #0e1620;
  --dispatch-accent: #67d4e8;
  background: #0d151f;
  box-shadow: none;
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-workbench-toolbar input,
body.jonathan-workspace:not(.jonathan-light) .dispatch-workbench-toolbar select,
body.jonathan-workspace:not(.jonathan-light) .dispatch-search-grid input,
body.jonathan-workspace:not(.jonathan-light) .dispatch-workbench-overview,
body.jonathan-workspace:not(.jonathan-light) .dispatch-workbench-detail,
body.jonathan-workspace:not(.jonathan-light) .dispatch-workbench-audit-panel,
body.jonathan-workspace:not(.jonathan-light) .dispatch-product-group,
body.jonathan-workspace:not(.jonathan-light) .dispatch-ar-view,
body.jonathan-workspace:not(.jonathan-light) .dispatch-audit-table th {
  background: #0f1822;
  color: var(--dispatch-ink);
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-overview-label {
  background: rgba(15, 24, 34, 0.94);
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-workbench-source {
  border-color: #285444;
  background: #153329;
  color: #8ee2bd;
}

@media (max-width: 1100px) {
  .dispatch-search-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)) auto auto; }
  .dispatch-workbench-layout { grid-template-columns: minmax(0, 1fr); }
  .dispatch-workbench-overview { max-height: 420px; }
}

@media (max-width: 900px) {
  .dispatch-workbench-head { flex-direction: column; }
  .dispatch-workbench-head-actions { justify-content: flex-start; }
  .dispatch-workbench-toolbar { grid-template-columns: minmax(0, 1fr) minmax(130px, 0.35fr); }
  .dispatch-product-head { grid-template-columns: minmax(0, 1fr); }
  .dispatch-detail-facts { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
  .dispatch-ar-summary { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .dispatch-ar-summary div:nth-child(even) { border-right: 0; }
  .dispatch-workbench-audit-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 720px) {
  .dispatch-workbench-shell { padding: 12px; border-radius: 12px; }
  .dispatch-queue-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }
  .dispatch-queue-tabs button {
    min-width: 0;
    border-right: 1px solid var(--dispatch-line);
    border-bottom: 1px solid var(--dispatch-line);
  }
  .dispatch-queue-tabs button:nth-child(2n) { border-right: 0; }
  .dispatch-queue-tabs button:nth-last-child(-n + 2) { border-bottom: 0; }
  .dispatch-search-grid,
  .dispatch-workbench-toolbar,
  .dispatch-workbench-kpis { grid-template-columns: minmax(0, 1fr); }
  .dispatch-detail-head { flex-direction: column; }
  .dispatch-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-workbench-audit-actions { width: 100%; flex-direction: column; }
  .dispatch-workbench-audit-actions button { width: 100%; }
  .dispatch-ar-view { padding: 12px; }
  .dispatch-ar-head { flex-direction: column; }
  .dispatch-ar-summary { grid-template-columns: minmax(0, 1fr); }
  .dispatch-ar-summary div,
  .dispatch-ar-summary div:nth-child(even) { border-right: 0; border-bottom: 1px solid var(--dispatch-line); }
  .dispatch-ar-summary div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dispatch-workbench-shell *,
  .dispatch-workbench-shell *::before,
  .dispatch-workbench-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Panorama v2: same clean hierarchy as the logistics visualization. */
.dispatch-workbench-shell { --danger-dispatch: #b42318; }
.dispatch-search-grid {
  grid-template-columns: minmax(150px, .23fr) minmax(150px, .23fr) minmax(280px, 1fr) auto auto;
  padding: 12px;
  border-radius: 12px;
  background: #f6f9fb;
}
.dispatch-search-grid select,
.dispatch-search-grid input {
  width: 100%; min-width: 0; height: 42px; padding: 0 12px;
  border: 1px solid #cbd9e4; border-radius: 8px;
  background: #fff; color: var(--dispatch-ink); font: inherit;
}
.dispatch-filter-query { min-width: 0; }
.dispatch-workbench-layout { min-height: 620px; grid-template-columns: 310px minmax(0, 1fr); }
.dispatch-workbench-detail { overflow: auto; background: #fff; }
.dispatch-status.shortage { background: #feeceb; color: var(--danger-dispatch); }
.dispatch-shortage { font-variant-numeric: tabular-nums; }
.dispatch-shortage.positive { color: var(--danger-dispatch); font-weight: 800; }
.dispatch-shortage.zero { color: #8b9bab; font-weight: 650; }
.dispatch-visual-pi-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 24px 16px; background: #fff;
}
.dispatch-visual-pi-head small { color: #6b7f91; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.dispatch-visual-pi-head h3 { margin: 3px 0; font: 750 27px/1.12 "Segoe UI", "Microsoft YaHei UI", sans-serif; letter-spacing: -.025em; }
.dispatch-visual-pi-head p { margin: 0; color: #547086; font-size: 15px; }
.dispatch-visual-pi-context { display: grid; justify-items: end; gap: 8px; color: #648095; font-size: 11px; font-weight: 750; }
.dispatch-visual-outstocks { display: grid; justify-items: end; gap: 2px; }
.dispatch-visual-outstocks small { color: #718498; letter-spacing: 0; }
.dispatch-visual-outstocks strong { color: #176b56; font-size: 12px; overflow-wrap: anywhere; }
.dispatch-visual-pi-facts {
  display: grid; grid-template-columns: repeat(5, minmax(92px, 1fr));
  margin: 0; padding: 0 24px 18px; background: #fff;
}
.dispatch-visual-pi-facts > div { padding: 8px 16px; border-left: 1px solid #dce6ee; }
.dispatch-visual-pi-facts > div:first-child { padding-left: 0; border-left: 0; }
.dispatch-visual-pi-facts dt { color: #718498; font-size: 10px; }
.dispatch-visual-pi-facts dd { margin: 3px 0 0; color: #173044; font-size: 17px; font-weight: 750; }
.dispatch-visual-order-summary { padding: 0 18px 20px; }
.dispatch-visual-order-summary > h4 { margin: 0; padding: 14px 2px 12px; border-top: 1px solid #dbe5ed; font-size: 17px; }
.dispatch-visual-order-table { min-width: 1010px; border: 1px solid #d6e2eb; border-radius: 10px; overflow: hidden; }
.dispatch-visual-order-head,
.dispatch-visual-product-row {
  display: grid;
  grid-template-columns: 48px 145px minmax(240px, 1fr) 84px 88px minmax(104px, 112px) minmax(128px, 148px) 84px;
  align-items: center; min-height: 54px;
}
.dispatch-visual-order-head {
  background: #eef3f7; color: #314a5d; font-size: 11px; font-weight: 800;
}
.dispatch-visual-order-head > span {
  line-height: 1.2; text-align: center; white-space: normal; overflow-wrap: anywhere;
}
.dispatch-visual-order-head > *, .dispatch-visual-product-row > * { min-width: 0; padding: 0 10px; }
.dispatch-visual-product { border-top: 1px solid #dbe5ed; background: #fff; }
.dispatch-visual-product:first-of-type { border-top: 0; }
.dispatch-visual-product.expanded > .dispatch-visual-product-row { background: #eaf4ff; }
.dispatch-visual-product-row { color: #173044; font-size: 12px; }
.dispatch-visual-product-row > strong { color: #205f7c; }
.dispatch-visual-product-row > span:nth-child(3) { line-height: 1.35; }
.dispatch-visual-product-row > b { text-align: center; font-size: 13px; }
.dispatch-product-controls { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 5px !important; }
.dispatch-product-controls input { width: 16px; height: 16px; accent-color: #27738d; }
.dispatch-product-controls button {
  width: 22px; height: 22px; display: grid; place-items: center; padding: 0;
  border: 1px solid #bdcfdb; border-radius: 5px; background: #fff; color: #246b85;
  font: 700 16px/1 "Segoe UI", sans-serif; cursor: pointer;
}
.dispatch-visual-product-detail {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, .85fr);
  gap: 14px; padding: 14px 20px 18px; background: #f7fafc;
}
.dispatch-visual-product-detail section { border: 1px solid #d8e3eb; border-radius: 9px; background: #fff; overflow: hidden; }
.dispatch-visual-product-detail h4 { margin: 0; padding: 12px 14px; border-bottom: 1px solid #dce6ee; text-align: center; font-size: 13px; }
.dispatch-visual-subtable > div { display: grid; grid-template-columns: 1fr 1.35fr .7fr .9fr; align-items: center; min-height: 42px; border-top: 1px solid #e1e8ee; }
.dispatch-visual-subtable > div:first-child { border-top: 0; }
.dispatch-visual-subtable > div > * { padding: 0 12px; font-size: 11px; }
.dispatch-visual-subtable .head { background: #f3f6f8; color: #607486; font-weight: 750; }
.dispatch-visual-documents { min-height: 74px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 14px; }
.dispatch-visual-documents button {
  min-height: 36px; padding: 0 11px; border: 1px solid #c8dfe7; border-radius: 8px;
  background: #edf8fb; color: #176b87; font: 700 12px/1.2 "Segoe UI", "Microsoft YaHei UI", sans-serif; cursor: pointer;
}
.dispatch-workbench-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; border: 1px solid #d8e3ec; border-radius: 11px; background: #f8fbfd;
}
.dispatch-workbench-actions > div { display: flex; align-items: center; gap: 9px; }
.dispatch-workbench-actions span { color: #64798b; font-size: 12px; }
.dispatch-workbench-export-status { min-height: 18px; color: #607587; font-size: 12px; }
body.dispatch-drawer-open { overflow: hidden; }
.dispatch-ci-drawer-layer { position: fixed; inset: 0; z-index: 1200; display: grid; grid-template-columns: 1fr minmax(520px, 43vw); }
.dispatch-ci-drawer-layer[hidden] { display: none; }
.dispatch-ci-drawer-backdrop { border: 0; background: rgba(15, 25, 37, .38); backdrop-filter: blur(1px); cursor: default; }
.dispatch-ci-drawer { min-width: 0; height: 100vh; display: grid; grid-template-rows: auto 1fr; background: #f5f8fb; box-shadow: -18px 0 45px rgba(10, 30, 45, .18); overflow: hidden; }
.dispatch-ci-drawer > header { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; background: #111b2c; color: #fff; }
.dispatch-ci-drawer > header small { color: #81c8e2; font-size: 11px; font-weight: 800; }
.dispatch-ci-drawer > header h3 { margin: 5px 0 0; font: 750 24px/1.1 "Segoe UI", "Microsoft YaHei UI", sans-serif; }
.dispatch-ci-drawer > header button { width: 38px; height: 38px; border: 0; border-radius: 8px; background: #edf3f8; color: #19364b; font-size: 25px; cursor: pointer; }
.dispatch-ci-drawer-body { min-height: 0; display: grid; align-content: start; gap: 14px; padding: 20px; overflow-y: auto; }
.dispatch-ci-card { border: 1px solid #d7e2ea; border-radius: 10px; background: #fff; overflow: hidden; }
.dispatch-ci-card > h4 { margin: 0; padding: 14px 16px; border-bottom: 1px solid #dce6ed; font-size: 14px; }
.dispatch-ci-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 8px 16px; }
.dispatch-ci-facts > div { min-width: 0; display: grid; gap: 4px; padding: 10px 8px; }
.dispatch-ci-facts span { color: #718498; font-size: 10px; }
.dispatch-ci-facts strong { color: #173044; font-size: 12px; overflow-wrap: anywhere; }
.dispatch-ci-lines > div { display: grid; grid-template-columns: 145px minmax(220px, 1fr) 70px; align-items: center; min-height: 40px; border-top: 1px solid #e1e8ee; }
.dispatch-ci-lines > div > * { min-width: 0; padding: 0 12px; font-size: 11px; }
.dispatch-ci-lines .head { background: #f2f6f8; color: #687d8e; font-weight: 750; }
.dispatch-ci-node-chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 14px; }
.dispatch-ci-node-chain > div { min-height: 72px; display: grid; align-content: center; gap: 6px; padding: 10px 12px; border: 1px solid #e7d39a; border-radius: 8px; background: #fff8e4; }
.dispatch-ci-node-chain > div.complete { border-color: #bfe0c7; background: #eaf7ec; }
.dispatch-ci-node-chain strong { font-size: 11px; }
.dispatch-ci-node-chain span { color: #607587; font-size: 10px; }
.dispatch-ci-node-records > div { display: grid; grid-template-columns: 1.3fr .7fr .8fr; min-height: 40px; align-items: center; border-top: 1px solid #e1e8ee; }
.dispatch-ci-node-records > div > span { padding: 0 14px; font-size: 11px; }
.dispatch-ci-node-records .head { border-top: 0; background: #f3f6f8; color: #697d8e; font-weight: 750; }
.dispatch-open-nodes { margin: 14px 16px 16px; }

body.jonathan-workspace:not(.jonathan-light) .dispatch-search-grid select,
body.jonathan-workspace:not(.jonathan-light) .dispatch-visual-pi-head,
body.jonathan-workspace:not(.jonathan-light) .dispatch-visual-pi-facts,
body.jonathan-workspace:not(.jonathan-light) .dispatch-visual-product,
body.jonathan-workspace:not(.jonathan-light) .dispatch-visual-product-detail section,
body.jonathan-workspace:not(.jonathan-light) .dispatch-workbench-actions { background: #111b25; color: #e8f0f6; }

@media (max-width: 1000px) {
  .dispatch-search-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .dispatch-filter-query { grid-column: 1 / -1; }
  .dispatch-workbench-layout { grid-template-columns: minmax(0, 1fr); }
  .dispatch-workbench-overview { max-height: 360px; }
  .dispatch-ci-drawer-layer { grid-template-columns: minmax(0, 1fr); }
  .dispatch-ci-drawer-backdrop { display: none; }
}
@media (max-width: 700px) {
  .dispatch-search-grid, .dispatch-visual-product-detail, .dispatch-ci-facts, .dispatch-ci-node-chain { grid-template-columns: minmax(0, 1fr); }
  .dispatch-workbench-actions { align-items: stretch; flex-direction: column; }
  .dispatch-workbench-actions > div { flex-wrap: wrap; }
}

/* Dispatch history evidence ledger: immutable history stays outside active stock math. */
body.jonathan-workspace.backend-operation-mode
  #backendDubaiWorkspace:has(.query-workbench.active) {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.query-workbench > .dispatch-audit-grid {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  grid-column: 1 / -1;
}

.dispatch-audit-grid > .query-card {
  min-width: 0;
  max-width: 100%;
  grid-column: auto;
}

.dispatch-audit-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
  align-items: start;
}

.dispatch-audit-grid > .panel {
  min-width: 0;
  height: 100%;
}

.dispatch-history-card {
  --history-surface: var(--ops-ui-surface, #ffffff);
  --history-soft: var(--ops-ui-soft, #eaf1f4);
  --history-ink: var(--ops-ui-ink, #17324a);
  --history-muted: var(--ops-ui-muted, #526a7f);
  --history-line: var(--ops-ui-line, #c8d6de);
  --history-accent: var(--ops-ui-accent, #1d7085);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  gap: 12px;
  color: var(--ops-ui-ink);
}

.dispatch-history-head {
  gap: 12px;
}

.dispatch-history-head h3,
.dispatch-history-head p {
  margin: 0;
}

.dispatch-history-head p {
  max-width: 62ch;
  margin-top: 4px;
  color: var(--history-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.dispatch-history-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--history-accent);
  font-family: var(--ops-data-font, "Cascadia Mono", Consolas, monospace);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dispatch-history-readonly {
  border-color: var(--history-line);
  background: var(--history-soft);
  color: var(--history-ink);
}

.dispatch-history-filters {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.dispatch-history-filters label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dispatch-history-filters label > span {
  color: var(--history-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.dispatch-history-filters :is(input, select) {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--history-line);
  border-radius: 7px;
  background: var(--history-surface);
  color: var(--history-ink);
}

.dispatch-history-filters #dispatchHistorySearchBtn {
  width: 100%;
  min-height: 38px;
  white-space: nowrap;
}

.dispatch-history-card :is(button, input, select):focus-visible,
.dispatch-history-table-wrap:focus-visible {
  outline: 3px solid var(--ops-ui-focus);
  outline-offset: 2px;
}

.dispatch-history-result {
  min-width: 0;
  max-width: 100%;
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--history-line);
  background: var(--history-surface);
  color: var(--history-ink);
}

.dispatch-history-result.is-loading,
.dispatch-history-empty {
  min-height: 132px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--history-muted);
  text-align: center;
}

.dispatch-history-boundary {
  padding: 8px 12px;
  border-top: 1px solid var(--history-line);
  background: var(--history-soft);
  color: var(--history-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.dispatch-history-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 0;
}

.dispatch-history-result-head strong {
  color: var(--history-ink);
  font-size: 0.82rem;
}

.dispatch-history-result-head span {
  color: var(--history-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.dispatch-history-table-wrap {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  max-height: 430px;
  overflow: auto;
  border-top: 1px solid var(--history-line);
  background: var(--history-surface);
}

.dispatch-history-ledger {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  color: var(--history-ink);
  font-size: 0.75rem;
}

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

.dispatch-history-ledger th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--history-soft);
  color: var(--history-ink);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dispatch-history-ledger td {
  background: var(--history-surface);
}

.dispatch-history-ledger td > small {
  display: block;
  margin-top: 3px;
  color: var(--history-muted);
  font-size: 0.68rem;
}

.dispatch-history-code,
.dispatch-history-quantity,
.dispatch-history-evidence-chip code,
.cancel-ci-evidence code {
  font-family: var(--ops-data-font, "Cascadia Mono", Consolas, monospace);
  font-variant-numeric: tabular-nums;
}

.dispatch-history-quantity {
  font-weight: 800;
  white-space: nowrap;
}

.dispatch-history-quantity.needs-review {
  color: #74470f;
}

.dispatch-history-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.dispatch-history-status.active {
  background: #e5f1f3;
  color: #155769;
}

.dispatch-history-status.quantity-unresolved {
  background: #f1ebe3;
  color: #74470f;
}

.dispatch-history-status.cancelled {
  background: #f4e8e8;
  color: #8d3333;
}

.dispatch-history-status.superseded {
  background: #eef2f4;
  color: #405467;
}

.dispatch-history-spine {
  position: relative;
  display: grid;
  gap: 5px;
  padding-left: 12px;
  border-left: 2px solid var(--history-accent);
}

.dispatch-history-evidence-chip {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 5px;
  align-items: baseline;
  color: var(--history-muted);
}

.dispatch-history-evidence-chip::before {
  content: "";
  position: absolute;
  top: 0.42rem;
  left: -16px;
  width: 6px;
  height: 6px;
  border: 2px solid var(--history-surface);
  border-radius: 50%;
  background: var(--history-accent);
}

.dispatch-history-evidence-chip.cancelled::before {
  background: var(--ops-ui-danger, #a63d3d);
}

.dispatch-history-evidence-chip.cancelled.inactive::before {
  background: var(--history-muted);
}

.dispatch-history-evidence-chip b {
  color: var(--history-muted);
  font-size: 0.64rem;
}

.dispatch-history-evidence-chip code {
  color: var(--history-ink);
  font-size: 0.7rem;
}

.dispatch-history-cancel-evidence {
  min-width: 190px;
}

.dispatch-history-cancel-evidence > span {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 5px;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
  color: var(--history-ink);
}

.dispatch-history-cancel-evidence b {
  color: var(--history-muted);
  font-size: 0.64rem;
}

.cancel-ci-inline {
  grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1.25fr) 112px;
}

.cancel-ci-reason-field {
  min-width: 0;
}

.cancel-ci-evidence {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
  padding: 9px 10px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
}

.cancel-ci-evidence > span {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 8px;
  color: var(--ink);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.cancel-ci-evidence b {
  color: var(--muted);
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-history-card {
  --history-surface: var(--panel);
  --history-soft: var(--surface-muted);
  --history-ink: var(--ink);
  --history-muted: var(--muted);
  --history-line: var(--line);
  --history-accent: #67d4e8;
  color: var(--ink);
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-history-status.active {
  background: #173640;
  color: #9de8f5;
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-history-status.quantity-unresolved {
  background: #3a3020;
  color: #f2c879;
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-history-status.cancelled {
  background: #3d2529;
  color: #ffb2b2;
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-history-status.superseded {
  background: #1d2a38;
  color: #c2cfdd;
}

body.jonathan-workspace:not(.jonathan-light) .dispatch-history-quantity.needs-review {
  color: #f2c879;
}

@media (max-width: 1180px) {
  .dispatch-audit-grid {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  }

  .dispatch-history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dispatch-history-filters #dispatchHistorySearchBtn {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .dispatch-audit-grid,
  .dispatch-history-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  body.jonathan-workspace.backend-operation-mode
    #backendDubaiWorkspace:has(.query-workbench.active) > .backend-workspace-grid {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  body.jonathan-workspace.backend-operation-mode
    #backendDubaiWorkspace:has(.query-workbench.active)
    #todayWorkspace .today-workspace-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.jonathan-workspace.backend-operation-mode
    #backendDubaiWorkspace:has(.query-workbench.active)
    #todayWorkspace .workspace-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  .dispatch-audit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cancel-ci-inline {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .dispatch-history-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .dispatch-history-result-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dispatch-history-result-head span {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dispatch-history-card *,
  .dispatch-history-card *::before,
  .dispatch-history-card *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
