﻿: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;
}

.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 {
    grid-template-columns: 1fr;
  }
}

.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(2, 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-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;
}

.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;
}

.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: minmax(240px, 1fr) minmax(240px, 1fr) 150px;
  gap: 12px;
  align-items: stretch;
}

.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,
  #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(2, 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-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(4, 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-tabs {
  grid-template-columns: repeat(3, max-content);
  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: 980px;
  border-collapse: collapse;
}

.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-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-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-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.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;
  }

  #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-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 (prefers-reduced-motion: reduce) {
  body.jonathan-workspace #paidOrdersView .paid-orders-action,
  body.jonathan-workspace #paidOrdersView .paid-orders-tab {
    transition: none;
  }
}
