@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ═══════════════════════════════════════════════════════════
   极简禅意主题 (Minimal Zen Theme)
   方案C — 销售单/采购单/委外单 统一视觉体系
   
   核心理念：
   - 去除装饰，回归信息本质
   - 1px 细线替代卡片阴影
   - 留白创造呼吸感
   - 悬浮即展开，收放自如
   ═══════════════════════════════════════════════════════════ */

/* ===== ZEN CSS VARIABLES ===== */
:root {
  --zen-bg:              #FAFAFA;
  --zen-surface:         #FFFFFF;
  --zen-text:            #171717;
  --zen-text-muted:      #737373;
  --zen-text-dim:        #A3A3A3;
  --zen-accent:          #2563EB;
  --zen-accent-hover:    #1D4ED8;
  --zen-warning:         #EA580C;
  --zen-warning-bg:      #FFF7ED;
  --zen-success:         #16A34A;
  --zen-success-bg:      #F0FDF4;
  --zen-danger:          #DC2626;
  --zen-border:          #E5E5E5;
  --zen-border-light:    #F0F0F0;
  --zen-divider:         #F5F5F5;
  --zen-radius:          2px;
  --zen-transition:      0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════
   ZEN PAGE CONTAINER OVERRIDE
   ═══════════════════════════════════════════════════════════ */
.page-container.zen-theme,
.page-container.zen-page {
  background: var(--zen-bg) !important;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--zen-text);
}

/* ===== ZEN HEADER — 极简单行标题栏 ===== */
.zen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--zen-surface);
  border-bottom: 1px solid var(--zen-border);
  gap: 16px;
  flex-shrink: 0;
}

.zen-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.zen-header-title {
  font-family: 'Manrope', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--zen-text);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.zen-header-count {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--zen-text-dim);
  background: var(--zen-divider);
  padding: 2px 8px;
  border-radius: 10px;
}

.zen-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--zen-bg);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: text;
  transition: var(--zen-transition);
  min-width: 200px;
}

.zen-header-search:focus-within {
  background: var(--zen-surface);
  border-color: var(--zen-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.zen-header-search svg {
  width: 15px;
  height: 15px;
  color: var(--zen-text-dim);
  flex-shrink: 0;
}

.zen-header-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: var(--zen-text);
  width: 180px;
  flex: 1;
}

.zen-header-search input::placeholder {
  color: var(--zen-text-dim);
  font-weight: 300;
}

.zen-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ===== ZEN BUTTONS ===== */
.zen-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius);
  background: var(--zen-surface);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--zen-text-muted);
  cursor: pointer;
  transition: var(--zen-transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.zen-btn:hover {
  color: var(--zen-text);
  border-color: var(--zen-text-dim);
  background: var(--zen-bg);
}

.zen-btn-primary {
  background: var(--zen-accent);
  color: #FFFFFF;
  border-color: var(--zen-accent);
  font-weight: 500;
}

.zen-btn-primary:hover {
  background: var(--zen-accent-hover);
  border-color: var(--zen-accent-hover);
  color: #FFFFFF;
}

.zen-btn-more {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--zen-text-dim);
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -2px;
  transition: var(--zen-transition);
}

.zen-btn-more:hover {
  background: var(--zen-divider);
  color: var(--zen-text);
}

/* ===== ZEN INSIGHT BAR — 单行滚动洞察条 ===== */
.zen-insight-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 6px 24px;
  background: var(--zen-surface);
  border-bottom: 1px solid var(--zen-border-light);
  font-size: 12px;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 400;
  color: var(--zen-text-muted);
  overflow-x: auto;
  white-space: nowrap;
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.zen-insight-bar::-webkit-scrollbar {
  display: none;
}

.zen-insight-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.zen-insight-item::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--zen-border);
  flex-shrink: 0;
}

.zen-insight-item.warning::before {
  background: var(--zen-warning);
}
.zen-insight-item.danger::before {
  background: var(--zen-danger);
}
.zen-insight-item.success::before {
  background: var(--zen-success);
}

.zen-insight-item .num {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  color: var(--zen-text);
}

.zen-insight-item.warning .num {
  color: var(--zen-warning);
}
.zen-insight-item.danger .num {
  color: var(--zen-danger);
}

/* ═══════════════════════════════════════════════════════════
   ZEN WORKBENCH OVERRIDE
   ═══════════════════════════════════════════════════════════ */

/* ===== WB Container ===== */
.zen-page .wb-container {
  background: var(--zen-bg);
  border-radius: 0;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: none;
}

/* ===== WB Topbar → Minimal ===== */
.zen-page .wb-topbar {
  padding: 10px 18px;
  background: var(--zen-surface);
  border-bottom: 1px solid var(--zen-border-light);
  gap: 12px;
}

.zen-page .wb-topbar-title {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--zen-text-dim);
}

.zen-page .wb-topbar-actions {
  gap: 6px;
}

/* ===== WB Mode Switcher ===== */
.zen-page .wb-mode-switcher {
  background: var(--zen-bg);
  border: 1px solid var(--zen-border-light);
  border-radius: var(--zen-radius);
}

.zen-page .wb-mode-btn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  font-weight: 400;
  padding: 5px 12px;
  color: var(--zen-text-dim);
  border-color: var(--zen-border-light);
}

.zen-page .wb-mode-btn.active {
  background: var(--zen-surface);
  color: var(--zen-text);
  font-weight: 500;
}

.zen-page .wb-mode-btn:hover {
  color: var(--zen-text);
}

/* ===== WB Side Panel → Flat with 1px dividers ===== */
.zen-page .wb-side-panel {
  background: var(--zen-surface);
  border: none;
  border-right: 1px solid var(--zen-border-light);
  border-radius: 0;
  padding: 12px 0;
  width: 180px;
  box-shadow: none;
}

.zen-page .wb-side-label {
  padding: 4px 16px 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--zen-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zen-page .wb-side-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--zen-text-muted);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: var(--zen-transition);
  border-radius: 0;
}

.zen-page .wb-side-stat:hover {
  background: var(--zen-bg);
  color: var(--zen-text);
}

.zen-page .wb-side-stat.active {
  background: rgba(37, 99, 235, 0.04);
  color: var(--zen-accent);
  font-weight: 500;
  border-left-color: var(--zen-accent);
}

.zen-page .wb-side-stat .count {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  background: var(--zen-divider);
  padding: 1px 7px;
  border-radius: 8px;
  color: var(--zen-text-muted);
}

.zen-page .wb-side-stat.active .count {
  background: rgba(37, 99, 235, 0.08);
  color: var(--zen-accent);
}

.zen-page .wb-side-divider {
  height: 1px;
  background: var(--zen-border-light);
  margin: 8px 16px;
}

.zen-page .wb-side-quick-actions {
  padding: 12px 16px;
}

.zen-page .wb-side-action-btn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--zen-radius);
  border: 1px solid var(--zen-border);
  background: var(--zen-surface);
  color: var(--zen-text-muted);
  cursor: pointer;
  transition: var(--zen-transition);
}

.zen-page .wb-side-action-btn:hover {
  border-color: var(--zen-text-dim);
  color: var(--zen-text);
  background: var(--zen-bg);
}

/* ===== WB List Toolbar ===== */
.zen-page .wb-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--zen-surface);
  border-bottom: 1px solid var(--zen-border-light);
  gap: 16px;
}

.zen-page .wb-list-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--zen-bg);
  border: 1px solid transparent;
  border-radius: var(--zen-radius);
  min-width: 200px;
  transition: var(--zen-transition);
}

.zen-page .wb-list-search:focus-within {
  border-color: var(--zen-accent);
  background: var(--zen-surface);
}

.zen-page .wb-list-search i {
  color: var(--zen-text-dim);
  font-size: 12px;
}

.zen-page .wb-list-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--zen-text);
  width: 160px;
}

.zen-page .wb-list-search input::placeholder {
  color: var(--zen-text-dim);
  font-weight: 300;
}

/* ===== WB Status Chips → Minimal underline pills ===== */
.zen-page .wb-list-chips {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.zen-page .wb-list-chip {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--zen-text-dim);
  padding: 3px 10px;
  border-radius: var(--zen-radius);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--zen-transition);
}

.zen-page .wb-list-chip:hover {
  color: var(--zen-text);
  background: var(--zen-divider);
}

.zen-page .wb-list-chip.active {
  color: var(--zen-accent);
  font-weight: 500;
  border-bottom-color: var(--zen-accent);
  background: transparent;
}

/* ===== WB List Table → Zen flat style ===== */
.zen-page .wb-list-body {
  background: var(--zen-surface);
}

.zen-page .wb-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: 'Noto Sans SC', sans-serif;
  table-layout: fixed;
}

.zen-page .wb-list-table thead th {
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--zen-text-dim);
  background: var(--zen-divider);
  border-bottom: 1px solid var(--zen-border-light);
  white-space: nowrap;
}

.zen-page .wb-list-table thead th:first-child {
  width: 36px;
  text-align: center;
}

.zen-page .wb-list-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.zen-page .wb-list-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--zen-border-light);
  color: var(--zen-text);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zen-page .wb-list-table tbody tr {
  transition: background 0.12s ease;
  cursor: pointer;
}

.zen-page .wb-list-table tbody tr:hover {
  background: #FAFAFB;
}

.zen-page .wb-list-table tbody tr.row-voided {
  opacity: 0.4;
}

.zen-page .wb-list-table tbody tr.row-voided:hover {
  opacity: 0.65;
}

/* ===== WB Status Badge in Table → Minimal dot ===== */
.zen-page .wb-list-table .status-tag,
.zen-page .wb-list-table .badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  border: none;
  background: var(--zen-divider);
  color: var(--zen-text-muted);
}

/* ===== WB List Actions → Minimal, only primary visible ===== */
.zen-page .wb-list-actions-cell {
  width: 90px;
}

.zen-page .wb-list-actions {
  display: flex;
  gap: 4px;
}

.zen-page .wb-list-action-btn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--zen-border-light);
  border-radius: var(--zen-radius);
  background: var(--zen-surface);
  color: var(--zen-text-muted);
  cursor: pointer;
  transition: var(--zen-transition);
  white-space: nowrap;
}

.zen-page .wb-list-action-btn:hover {
  border-color: var(--zen-accent);
  color: var(--zen-accent);
}

.zen-page .wb-list-action-btn.wb-actions-more {
  border: none;
  background: transparent;
  color: var(--zen-text-dim);
  font-size: 12px;
  padding: 3px 6px;
}

.zen-page .wb-list-action-btn.wb-actions-more:hover {
  color: var(--zen-text);
  background: var(--zen-divider);
}

.zen-page .wb-list-action-btn.wb-action-hidden {
  display: none;
}

/* ===== WB Kanban → Zen flat columns ===== */
.zen-page .wb-kanban {
  display: flex;
  gap: 0;
  background: var(--zen-bg);
  padding: 4px;
  height: 100%;
  overflow-x: auto;
}

.zen-page .wb-kanban-col {
  min-width: 260px;
  max-width: 300px;
  background: var(--zen-surface);
  border: 1px solid var(--zen-border-light);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  margin-right: -1px;
  box-shadow: none;
}

.zen-page .wb-kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--zen-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--zen-surface);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--zen-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.zen-page .wb-kanban-col-count {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  background: var(--zen-divider);
  padding: 1px 7px;
  border-radius: 8px;
}

.zen-page .wb-kanban-col-body {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  min-height: 200px;
}

.zen-page .wb-kanban-card {
  background: var(--zen-surface);
  border: 1px solid var(--zen-border-light);
  border-radius: var(--zen-radius);
  padding: 12px;
  margin-bottom: 8px;
  cursor: grab;
  transition: var(--zen-transition);
  box-shadow: none;
}

.zen-page .wb-kanban-card:hover {
  border-color: var(--zen-accent);
}

.zen-page .wb-kc-code {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--zen-text);
  margin-bottom: 4px;
}

.zen-page .wb-kc-customer {
  font-size: 13px;
  color: var(--zen-text-muted);
  margin-bottom: 4px;
}

.zen-page .wb-kc-items {
  font-size: 11px;
  color: var(--zen-text-dim);
  margin-bottom: 6px;
  line-height: 1.4;
}

.zen-page .wb-kc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zen-page .wb-kc-amount {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--zen-text);
}

.zen-page .wb-kc-date {
  font-size: 11px;
  color: var(--zen-text-dim);
}

/* ===== WB Action Button New ===== */
.zen-page #po-btn-new,
.zen-page #so-btn-new,
.zen-page #os-btn-new {
  font-family: 'Noto Sans SC', sans-serif !important;
  font-size: 12px !important;
  padding: 4px 13px !important;
  background: var(--zen-accent) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--zen-accent) !important;
  border-radius: var(--zen-radius) !important;
  font-weight: 500 !important;
}

/* ===== Scrollbars for Zen ===== */
.zen-page ::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.zen-page ::-webkit-scrollbar-track {
  background: transparent;
}

.zen-page ::-webkit-scrollbar-thumb {
  background: var(--zen-border);
  border-radius: 3px;
}

.zen-page ::-webkit-scrollbar-thumb:hover {
  background: var(--zen-text-dim);
}

/* ===== Zen Summary Bar (in-grouped-table style) ===== */
.zen-summary-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 18px;
  background: var(--zen-surface);
  border-bottom: 1px solid var(--zen-border-light);
  font-size: 12px;
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--zen-text-muted);
}

.zen-summary-bar .summary-item {
  display: flex;
  align-items: center;
  gap: 0.35em;
}

.zen-summary-bar .summary-item strong {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  color: var(--zen-text);
}

/* ═══════════════════════════════════════════════════════════
   ZEN TABLE (for detail/tab content)
   ═══════════════════════════════════════════════════════════ */
.zen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.zen-table thead th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--zen-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--zen-border);
  background: var(--zen-divider);
}

.zen-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--zen-border-light);
  color: var(--zen-text);
}

.zen-table tbody tr:hover {
  background: #FAFAFB;
}

/* ===== Zen Modal Simple ===== */
.zen-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zenFadeIn 0.15s ease;
}

@keyframes zenFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.zen-modal {
  background: var(--zen-surface);
  border: 1px solid var(--zen-border);
  border-radius: 4px;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.zen-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--zen-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zen-modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--zen-text);
}

.zen-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--zen-text-dim);
  cursor: pointer;
  font-size: 18px;
  border-radius: var(--zen-radius);
}

.zen-modal-close:hover {
  background: var(--zen-divider);
  color: var(--zen-text);
}

.zen-modal-body {
  padding: 20px;
}

.zen-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--zen-border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   ZEN FORM ELEMENTS
   ═══════════════════════════════════════════════════════════ */
.zen-form-group {
  margin-bottom: 14px;
}

.zen-form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--zen-text-muted);
  margin-bottom: 4px;
}

.zen-form-input,
.zen-form-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius);
  font-size: 13px;
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--zen-text);
  background: var(--zen-surface);
  transition: var(--zen-transition);
  box-sizing: border-box;
}

.zen-form-input:focus,
.zen-form-select:focus {
  outline: none;
  border-color: var(--zen-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.06);
}

/* ===== Zen Detail Drawer (hover slide from right) ===== */
.zen-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.zen-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.zen-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  max-width: 90vw;
  height: 100vh;
  background: var(--zen-surface);
  border-left: 1px solid var(--zen-border);
  box-shadow: -4px 0 24px rgba(0,0,0,0.06);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.zen-drawer.active {
  transform: translateX(0);
}

.zen-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--zen-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zen-drawer-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--zen-text);
}

.zen-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ===== Zen Tab Navigation ===== */
.zen-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--zen-border-light);
  background: var(--zen-surface);
  padding: 0 20px;
}

.zen-tab-item {
  padding: 10px 16px;
  font-size: 13px;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 400;
  color: var(--zen-text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--zen-transition);
  white-space: nowrap;
}

.zen-tab-item:hover {
  color: var(--zen-text);
}

.zen-tab-item.active {
  color: var(--zen-accent);
  font-weight: 500;
  border-bottom-color: var(--zen-accent);
}

/* ===== Zen Tag / Status indicator ===== */
.zen-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.zen-status-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--zen-text-dim);
  flex-shrink: 0;
}

.zen-status-dot.active::before { background: var(--zen-success); }
.zen-status-dot.warning::before { background: var(--zen-warning); }
.zen-status-dot.danger::before { background: var(--zen-danger); }
.zen-status-dot.processing::before { background: var(--zen-accent); }

/* ===== Smooth transitions for Zen theme ===== */
.zen-page * {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* ===== Override emoji display for Zen ===== */
.zen-page .wh-tab-item,
.zen-page .zen-tab-item {
  font-size: 13px;
}

/* ===== ZEN wh-tab overrides (purchase/outsource tab nav) ===== */
.zen-page .wh-tab-nav,
.zen-page .po-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--zen-border-light);
  background: var(--zen-surface);
  padding: 0 20px;
}

.zen-page .wh-tab-item,
.zen-page .zen-tab-item {
  padding: 10px 16px;
  font-size: 13px;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 400;
  color: var(--zen-text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  border-radius: 0;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  box-shadow: none;
}

.zen-page .wh-tab-item:hover,
.zen-page .zen-tab-item:hover {
  color: var(--zen-text);
  background: transparent;
}

.zen-page .wh-tab-item.wh-active,
.zen-page .wh-tab-item.active,
.zen-page .zen-tab-item.active {
  color: var(--zen-accent);
  font-weight: 500;
  border-bottom-color: var(--zen-accent);
  background: transparent;
  box-shadow: none;
}

.zen-page .wh-tab-pane {
  height: 100%;
}

/* ===== ZEN form overrides for ERP inline forms ===== */
.zen-page .so-form-row,
.zen-page .po-form-row,
.zen-page .os-form-row {
  background: transparent;
  border: none;
  padding: 8px 16px;
  margin-bottom: 0;
}

.zen-page .so-form-row label,
.zen-page .po-form-row label {
  font-size: 12px;
  font-weight: 500;
  color: var(--zen-text-muted);
  margin-bottom: 3px;
}

.zen-page .so-form-row input,
.zen-page .so-form-row select,
.zen-page .so-form-row textarea,
.zen-page .po-form-row input,
.zen-page .po-form-row select,
.zen-page .po-form-row textarea {
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius);
  font-size: 13px;
  font-family: 'Noto Sans SC', sans-serif;
  padding: 6px 8px;
  color: var(--zen-text);
  background: var(--zen-surface);
  box-shadow: none;
}

.zen-page .so-form-row input:focus,
.zen-page .so-form-row select:focus,
.zen-page .po-form-row input:focus,
.zen-page .po-form-row select:focus {
  outline: none;
  border-color: var(--zen-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.06);
}

/* ===== ZEN page header overrides ===== */
.zen-page .page-header {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* ===== ZEN modal overrides ===== */
.zen-page .modal-overlay {
  background: rgba(0,0,0,0.3) !important;
}

.zen-page .modal-content {
  background: var(--zen-surface) !important;
  border: 1px solid var(--zen-border) !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
}

.zen-page .modal-header {
  border-bottom: 1px solid var(--zen-border-light) !important;
  padding: 14px 20px !important;
}

.zen-page .modal-header h3 {
  font-family: 'Manrope', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--zen-text) !important;
}

.zen-page .modal-footer {
  border-top: 1px solid var(--zen-border-light) !important;
  padding: 12px 20px !important;
}

/* ===== ZEN button overrides ===== */
.zen-page .btn {
  font-family: 'Noto Sans SC', sans-serif !important;
  font-size: 12.5px !important;
  border-radius: var(--zen-radius) !important;
  font-weight: 400 !important;
}

.zen-page .btn.btn-primary,
.zen-page .btn-primary {
  background: var(--zen-accent) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--zen-accent) !important;
  font-weight: 500 !important;
}

.zen-page .btn.btn-outline,
.zen-page .btn-outline {
  border: 1px solid var(--zen-border) !important;
  background: var(--zen-surface) !important;
  color: var(--zen-text-muted) !important;
}

.zen-page .btn.btn-outline:hover {
  border-color: var(--zen-text-dim) !important;
  color: var(--zen-text) !important;
}

/* ===== ZEN pagination ===== */
.zen-page .wb-pagination {
  padding: 8px 18px;
  background: var(--zen-surface);
  border-top: 1px solid var(--zen-border-light);
}

.zen-page .wb-pagination button {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid var(--zen-border-light);
  border-radius: var(--zen-radius);
  background: var(--zen-surface);
  color: var(--zen-text-muted);
  cursor: pointer;
}

.zen-page .wb-pagination button:hover {
  border-color: var(--zen-text-dim);
  color: var(--zen-text);
}

.zen-page .wb-pagination button.active {
  background: var(--zen-accent);
  color: #FFF;
  border-color: var(--zen-accent);
}

/* ===== ZEN empty state ===== */
.zen-page .wb-empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--zen-text-dim);
  font-size: 13px;
  background: var(--zen-surface);
}

/* ===== ZEN expand card scroll & legibility ===== */
.zen-page .so-expand-row td > div,
.zen-page .po-expand-row td > div,
.zen-page .os-expand-row td > div {
  max-height: 56vh;
  overflow-y: auto;
}

/* ── 展开行 TD 强制白底深色（覆盖 .wb-list-table td） ── */
.wb-list-table .so-expand-row td,
.wb-list-table .po-expand-row td,
.wb-list-table .os-expand-row td,
tr.so-expand-row td,
tr.po-expand-row td,
tr.os-expand-row td {
  padding: 0 16px 12px 16px !important;
  background: #ffffff !important;
  border-bottom: 2px solid #e2e8f0 !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  color: #0f172a !important;
}

/* Ensure expand cards are always readable regardless of parent row styling */
.zen-page .so-expand-card,
.zen-page .po-expand-card,
.zen-page .os-expand-card,
.so-expand-card,
.po-expand-card,
.os-expand-card {
  background: #ffffff !important;
  color: #0f172a !important;
}

.zen-page .so-expand-card table,
.zen-page .po-expand-card table,
.zen-page .os-expand-card table,
.so-expand-card table,
.po-expand-card table,
.os-expand-card table {
  color: #0f172a;
}

.zen-page .so-expand-card table td,
.zen-page .po-expand-card table td,
.zen-page .os-expand-card table td,
.zen-page .so-expand-card table th,
.zen-page .po-expand-card table th,
.zen-page .os-expand-card table th,
.so-expand-card table td,
.po-expand-card table td,
.os-expand-card table td,
.so-expand-card table th,
.po-expand-card table th,
.os-expand-card table th {
  color: #0f172a !important;
  background: transparent !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Clean emoji removal handled by JS */
