/* 管理后台基准字号：桌面根字号 16px（原 14px +2）；各 px 字号已同步 +2 */
* { box-sizing: border-box; }
html { font-size: 16px; }
@media (min-width: 1024px) {
  html { font-size: 16px; }
}
body { margin: 0; padding-bottom: 64px; font-size: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--light-bg-base, #f6f8fc); color: #333; }
.screen { min-height: 100vh; }
.hidden { display: none !important; }

/* ========== 自定义 confirm/alert 弹窗（替代原生，不显示网址） ========== */
.custom-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-modal-mask.hidden { display: none !important; }
.custom-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9001;
  min-width: 320px;
  max-width: 90vw;
}
.custom-modal.hidden { display: none !important; }
.custom-modal-inner {
  background: #fff;
  border-radius: 12px;
  padding: 24px 24px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
body.theme-dark .custom-modal-inner {
  background: #1f2937;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.custom-modal-message {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 20px;
  max-height: 60vh;
  overflow-y: auto;
}
body.theme-dark .custom-modal-message { color: #e5e7eb; }
.custom-modal-prompt-wrap {
  margin-bottom: 20px;
}
.custom-modal-prompt-wrap.hidden { display: none !important; }
.custom-modal-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #333;
  box-sizing: border-box;
}
.custom-modal-input:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
body.theme-dark .custom-modal-input {
  background: #374151;
  border-color: #4b5563;
  color: #fff;
}
.custom-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.custom-modal-btn {
  padding: 8px 20px;
  font-size: 15px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  min-height: 40px;
}
.custom-modal-btn.cancel {
  background: #f3f4f6;
  color: #4b5563;
}
.custom-modal-btn.cancel:hover {
  background: #e5e7eb;
}
body.theme-dark .custom-modal-btn.cancel {
  background: #374151;
  color: #d1d5db;
}
body.theme-dark .custom-modal-btn.cancel:hover {
  background: #4b5563;
}
.custom-modal-btn.confirm {
  background: #1890ff;
  color: #fff;
}
.custom-modal-btn.confirm:hover {
  background: #40a9ff;
}
body.theme-dark .custom-modal-btn.confirm {
  background: #3b82f6;
}
body.theme-dark .custom-modal-btn.confirm:hover {
  background: #60a5fa;
}

@media (max-width: 480px) {
  .custom-modal {
    left: max(1rem, env(safe-area-inset-left));
    right: max(1rem, env(safe-area-inset-right));
    width: auto;
    min-width: 0;
    max-width: none;
    transform: translateY(-50%);
  }
  .custom-modal-inner {
    padding: 1.25rem 1.25rem 1rem;
  }
  .custom-modal-message {
    max-height: 50vh;
    font-size: 16px;
  }
  .custom-modal-input {
    font-size: 16px;
    min-height: 48px;
  }
  .custom-modal-actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .custom-modal-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

/* ========== Login Page & Main Screen Backgrounds (frontend-design) ========== */
:root {
  /* 深色模式（登录页 / 主屏深色） */
  --login-bg-dark: #0f1419;
  --login-bg-mid: #1a2332;
  --login-accent: #e8a33d;
  --login-accent-dim: rgba(232, 163, 61, 0.25);
  --login-card-bg: rgba(255, 255, 255, 0.97);
  --login-card-border: rgba(255, 255, 255, 0.2);
  --login-text: #1a1a1a;
  --login-text-muted: #5c6b7a;
  --login-input-bg: #f5f6f8;
  --login-input-border: #e2e6ea;
  --login-font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* 浅色模式（主屏）— refined, professional */
  --light-bg-base: #f6f8fc;
  --light-bg-mid: #eef2f9;
  --light-bg-warm: #faf8f5;
  --light-accent-warm: rgba(232, 163, 61, 0.18);
  --light-accent-cool: rgba(24, 144, 255, 0.12);
  --light-grid: rgba(24, 144, 255, 0.04);
  --light-glow-amber: rgba(232, 163, 61, 0.2);
  --light-glow-blue: rgba(59, 130, 246, 0.15);
}

#login-screen.login-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  font-family: var(--login-font);
}

.login-page-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-page-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, var(--login-bg-dark) 0%, #0d1520 35%, var(--login-bg-mid) 70%, #15202e 100%);
}
.login-page-bg-mesh {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 20% 80%, var(--login-accent-dim) 0%, transparent 50%),
              radial-gradient(ellipse 60% 40% at 85% 20%, rgba(80, 120, 160, 0.12) 0%, transparent 45%);
}
.login-page-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-page-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}
.login-page-bg-glow--1 {
  width: 320px;
  height: 320px;
  background: var(--login-accent);
  top: -80px;
  right: -80px;
  animation: login-glow-float 12s ease-in-out infinite;
}
.login-page-bg-glow--2 {
  width: 240px;
  height: 240px;
  background: #3d5a80;
  bottom: 10%;
  left: -60px;
  animation: login-glow-float 10s ease-in-out infinite 1.5s;
}
@keyframes login-glow-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 15px) scale(1.05); }
}

.login-page-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
  animation: login-card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  background: var(--login-card-bg);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--login-card-border);
  backdrop-filter: blur(12px);
}

.login-card-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-card-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 0.75rem;
  color: var(--login-accent);
}
.login-card-brand-icon svg {
  width: 40px;
  height: 40px;
}
.login-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--login-text);
}
.login-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--login-text-muted);
}
.login-welcome {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--login-text-muted);
  text-align: center;
}

.login-form .login-field {
  margin-bottom: 1.25rem;
  animation: login-field-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.login-form .login-field:nth-child(1) { animation-delay: 0.1s; }
.login-form .login-field:nth-child(2) { animation-delay: 0.18s; }
@keyframes login-field-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.login-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--login-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.login-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--login-font);
  color: var(--login-text);
  background: var(--login-input-bg);
  border: 1px solid var(--login-input-border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-input::placeholder {
  color: #9ca3af;
}
.login-input:focus {
  outline: none;
  border-color: var(--login-accent);
  box-shadow: 0 0 0 3px var(--login-accent-dim);
}
.login-password-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
}
.login-password-wrap .login-input {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.login-password-eye {
  flex-shrink: 0;
  width: 52px;
  padding: 0;
  border: 1px solid var(--login-input-border);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: var(--login-input-bg);
  color: var(--login-text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.login-password-eye:hover {
  background: #eaecef;
  color: var(--login-text);
}
.login-password-eye.visible {
  background: rgba(232, 163, 61, 0.12);
  border-color: var(--login-accent);
  color: var(--login-accent);
}
.login-password-eye .eye-icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; }
.login-password-eye .eye-icon-close { display: none; }
.login-password-eye.visible .eye-icon-open { display: none; }
.login-password-eye.visible .eye-icon-close { display: inline-block !important; }

.login-err {
  margin: 0.5rem 0 0;
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: #c53030;
}

.login-submit {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.95rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--login-font);
  color: #1a1a1a;
  background: linear-gradient(135deg, var(--login-accent) 0%, #d8922e 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: login-field-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.25s backwards;
}
.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(232, 163, 61, 0.4);
}
.login-submit:active {
  transform: translateY(0);
}

.login-footer {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Legacy / global (keep for modals and main app) */
.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.25rem; font-size: 0.875rem; color: #555; }
.field input,
.field select { width: 100%; padding: 0.65rem 0.9rem; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; min-height: 40px; cursor: pointer; }
.field input:focus,
.field select:focus { outline: none; border-color: #1890ff; }
.field select { appearance: auto; background: #fff; }
.password-input-wrap { display: flex; align-items: center; gap: 0; width: 100%; }
.password-input-wrap .input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-password-eye { flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 1px solid #ddd; border-left: 0; border-radius: 0 6px 6px 0; background: #fafafa; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.btn-password-eye:hover { background: #f0f0f0; }
.btn-password-eye.visible { background: #e6f7ff; border-color: #91d5ff; }
.btn-password-eye .eye-icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; }
.btn-password-eye .eye-icon-close { display: none; }
.btn-password-eye.visible .eye-icon-open { display: none; }
.btn-password-eye.visible .eye-icon-close { display: inline-block !important; }
.err { color: #c00; font-size: 0.875rem; margin-bottom: 0.5rem; min-height: 1.25rem; }
.text-warn { color: #d48806; font-size: 0.875rem; }
.login-box .btn { width: 100%; padding: 0.75rem 1rem; margin-top: 0.5rem; font-size: 1rem; min-height: 44px; }

/* Main layout */
#main-screen { display: flex; flex-direction: column; min-height: 100vh; position: relative; }
/* 主屏背景：浅色 / 深色双主题，grid + mesh + glow */
.main-screen-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.main-screen-bg-gradient {
  position: absolute;
  inset: 0;
  /* 浅色默认：柔和蓝灰渐变，带暖调 */
  background: linear-gradient(158deg, var(--light-bg-base) 0%, var(--light-bg-warm) 25%, var(--light-bg-mid) 60%, #e8ecf4 100%);
}
.main-screen-bg-mesh {
  position: absolute;
  inset: 0;
  /* 浅色：右上暖橙光晕、左下冷蓝光晕 */
  background: radial-gradient(ellipse 70% 45% at 88% 15%, var(--light-accent-warm) 0%, transparent 55%),
              radial-gradient(ellipse 60% 50% at 12% 85%, var(--light-accent-cool) 0%, transparent 50%);
}
.main-screen-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--light-grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--light-grid) 1px, transparent 1px);
  background-size: 40px 40px;
}
.main-screen-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
}
.main-screen-bg-glow--1 {
  width: 280px;
  height: 280px;
  background: var(--light-glow-amber);
  top: -60px;
  right: -60px;
  animation: main-glow-float 14s ease-in-out infinite;
}
.main-screen-bg-glow--2 {
  width: 200px;
  height: 200px;
  background: var(--light-glow-blue);
  bottom: 12%;
  left: -40px;
  animation: main-glow-float 11s ease-in-out infinite 2s;
}
@keyframes main-glow-float {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(12px, -10px) scale(1.04); opacity: 0.9; }
}
/* 深色模式覆盖 */
body.theme-dark .main-screen-bg-gradient {
  background: linear-gradient(165deg, var(--login-bg-dark) 0%, #0d1520 35%, var(--login-bg-mid) 70%, #15202e 100%);
}
body.theme-dark .main-screen-bg-mesh {
  background: radial-gradient(ellipse 80% 50% at 20% 80%, var(--login-accent-dim) 0%, transparent 50%),
              radial-gradient(ellipse 60% 40% at 85% 20%, rgba(80, 120, 160, 0.12) 0%, transparent 45%);
}
body.theme-dark .main-screen-bg-grid {
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
body.theme-dark .main-screen-bg-glow--1 {
  width: 320px;
  height: 320px;
  background: var(--login-accent);
  top: -80px;
  right: -80px;
  filter: blur(80px);
  opacity: 0.4;
  animation: login-glow-float 12s ease-in-out infinite;
}
body.theme-dark .main-screen-bg-glow--2 {
  width: 240px;
  height: 240px;
  background: #3d5a80;
  bottom: 10%;
  left: -60px;
  filter: blur(80px);
  opacity: 0.4;
  animation: login-glow-float 10s ease-in-out infinite 1.5s;
}
#main-screen > .sidebar,
#main-screen > .main-area,
#main-screen > .main-area > .main,
#main-screen > .nav-drawer-backdrop {
  position: relative;
  z-index: 1;
}

/* ========== 左侧导航栏 + 顶部操作栏（frontend-design） ========== */
#main-screen {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100vh;
}
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 左侧导航 */
.sidebar {
  width: 252px;
  min-width: 252px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(24, 144, 255, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #001529 0%, #001a33 50%, #001529 100%);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 2px 0 24px rgba(0,0,0,0.18);
}
/* 13/14 寸常见笔记本：适当收窄左侧导航，提升主内容可用宽度 */
@media (min-width: 1025px) and (max-width: 1440px) {
  .sidebar {
    width: 216px;
    min-width: 216px;
  }
  .sidebar-brand {
    padding: 0.9rem 0.9rem;
  }
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.sidebar-brand-mark {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 50%, #0050b3 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(24, 144, 255, 0.35);
}
.sidebar-brand-mark-svg {
  width: 22px;
  height: 22px;
  display: block;
}
.sidebar-brand-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.sidebar-brand .nav-drawer-close {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-left: 0.5rem;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-brand .nav-drawer-close:hover,
.sidebar-brand .nav-drawer-close:active { background: rgba(255,255,255,0.2); }

/* 侧栏：门店切换（品牌标题下方） */
.sidebar-org-switch {
  flex-shrink: 0;
  position: relative;
  margin: 0 0.55rem 0.4rem;
}
.sidebar-org-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.52rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  color: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.sidebar-org-trigger:hover,
.sidebar-org-trigger:focus {
  outline: none;
  border-color: rgba(105, 192, 255, 0.48);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
}
.sidebar-org-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #69c0ff;
  background: rgba(105, 192, 255, 0.12);
}
.sidebar-org-icon svg {
  width: 15px;
  height: 15px;
}
.sidebar-org-main {
  flex: 1;
  min-width: 0;
}
.sidebar-org-eyebrow {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
}
.sidebar-org-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
}
.sidebar-org-row {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  max-width: 100%;
  line-height: 1.35;
}
.sidebar-org-row-label {
  flex: 0 0 auto;
  font-size: 0.56rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.04em;
}
.sidebar-org-row-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}
.sidebar-org-expiry {
  display: block;
  margin-top: 0.1rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.58);
}
.sidebar-org-expiry-ok {
  color: rgba(255, 255, 255, 0.62);
}
.sidebar-org-expiry-expiring {
  color: #fde68a;
}
.sidebar-org-expiry-expired {
  color: #fecaca;
}
.sidebar-org-expiry-unknown {
  color: #e2e8f0;
}
.sidebar-org-action {
  flex: 0 0 auto;
  padding: 0.14rem 0.38rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
}
.sidebar-org-menu {
  margin-top: 0.35rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 17, 31, 0.92);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  max-height: 60vh;
}
.sidebar-store-panel {
  padding: 0.45rem 0.55rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar-store-panel:last-child {
  border-bottom: none;
}
.sidebar-store-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.sidebar-store-mark {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}
.sidebar-store-mark-icon {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #69c0ff, #1890ff);
  box-shadow: 0 0 0 1px rgba(24, 144, 255, 0.25);
  flex-shrink: 0;
}
.sidebar-store-mark-text {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.68);
}
.sidebar-store-current-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.32rem;
}
.sidebar-store-current-label {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
}
.sidebar-store-badge {
  display: inline-block;
  max-width: 100%;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: rgba(24, 144, 255, 0.28);
  border: 1px solid rgba(105, 192, 255, 0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-store-controls {
  display: flex;
  align-items: stretch;
  gap: 0.42rem;
  min-width: 0;
}
.sidebar-store-select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 1.8rem 0 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 34px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.78) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 13px,
    calc(100% - 9px) 13px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.sidebar-store-select:hover {
  border-color: rgba(105, 192, 255, 0.42);
  background-color: rgba(105, 192, 255, 0.12);
}
.sidebar-store-select:focus {
  outline: none;
  border-color: rgba(105, 192, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.sidebar-store-select:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}
.sidebar-store-select option {
  color: #111827;
  background: #fff;
}
.sidebar-store-apply-btn {
  flex: 0 0 auto;
  min-width: 76px;
  height: 34px;
  padding: 0 0.72rem;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.sidebar-store-apply-btn:hover,
.sidebar-store-apply-btn:focus {
  border-color: rgba(105, 192, 255, 0.48);
  background: rgba(105, 192, 255, 0.14);
  color: #fff;
}
.sidebar-store-apply-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sidebar-store-expiry-warning {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}
.sidebar-store-expiry-warning.expired {
  color: #fff;
  background: #e03131;
}
.sidebar-store-expiry-warning.expiring {
  color: #fff;
  background: #f0ad4e;
}
.sidebar-scope-list {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  overflow-y: auto;
  max-height: 180px;
  padding-right: 2px;
}
.sidebar-scope-list::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scope-list::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-scope-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}
.sidebar-scope-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.32rem 0.42rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
  cursor: pointer;
}
.sidebar-scope-item:hover,
.sidebar-scope-item:focus {
  outline: none;
  border-color: rgba(105, 192, 255, 0.28);
  background: rgba(105, 192, 255, 0.12);
}
.sidebar-scope-item.active {
  border-color: rgba(105, 192, 255, 0.42);
  background: rgba(24, 144, 255, 0.18);
  cursor: default;
}
.sidebar-scope-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  flex: 0 0 auto;
}
.sidebar-scope-item.active .sidebar-scope-dot {
  background: #69c0ff;
  box-shadow: 0 0 0 3px rgba(105, 192, 255, 0.16);
}
.sidebar-scope-text {
  display: block;
  min-width: 0;
}
.sidebar-scope-text strong,
.sidebar-scope-text em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-scope-text strong {
  font-size: 0.7rem;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.94);
}
.sidebar-scope-text em {
  margin-top: 0.06rem;
  font-style: normal;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.48);
}
.sidebar-store-manage-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
}
.sidebar-store-manage-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.store-quota-panel {
  flex: 1;
  min-width: 220px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}
.store-quota-panel-ok {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.store-quota-panel-blocked {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

#page-tenants .tenant-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  align-items: center;
}
#page-tenants #tenants-table {
  min-width: 1080px;
}
#page-tenants #tenants-table td.table-op-cell,
#page-tenants #tenants-table th:last-child {
  white-space: nowrap;
  min-width: 360px;
}
#page-tenants #tenants-table .tenant-actions .btn-sm,
#page-tenants #tenants-table td.table-op-cell .btn-sm {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.22rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.25;
}
#page-tenants #tenants-table td:nth-child(6) {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-tenants #tenants-table .tenant-actions .btn-outline,
#page-tenants #tenants-table td.table-op-cell .btn-outline {
  margin-left: 0;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
#page-tenants #tenants-table .tenant-actions .btn-outline:hover,
#page-tenants #tenants-table .tenant-actions .btn-outline:focus,
#page-tenants #tenants-table td.table-op-cell .btn-outline:hover,
#page-tenants #tenants-table td.table-op-cell .btn-outline:focus {
  color: #0f172a;
  border-color: #94a3b8;
  background: #f8fafc;
}
#page-tenants #tenants-table .tenant-actions .tenant-settings,
#page-tenants #tenants-table td.table-op-cell .tenant-settings {
  color: #075985;
  border-color: #7dd3fc;
  background: #f0f9ff;
}
#page-tenants #tenants-table .tenant-actions .tenant-toggle,
#page-tenants #tenants-table td.table-op-cell .tenant-toggle {
  color: #7f1d1d;
  border-color: #fecaca;
  background: #fff7f7;
}
#page-tenants .tenant-expiry {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.18rem 0.54rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
  border: 1px solid transparent;
}
#page-tenants .tenant-expiry-ok {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
#page-tenants .tenant-expiry-expiring {
  color: #854d0e;
  border-color: #fde68a;
  background: #fffbeb;
}
#page-tenants .tenant-expiry-expired {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}
#page-tenants .tenant-expiry-unknown {
  color: #475569;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.tenant-promo-preview {
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.tenant-promo-preview.hidden { display: none; }
.tenant-promo-preview.is-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.tenant-promo-preview.is-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

/* 租户配置弹窗 */
.modal-content.modal-tenant-settings {
  width: min(92vw, 560px);
  max-width: 560px;
  max-height: calc(100dvh - 40px);
}
.tenant-settings-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  flex-shrink: 0;
}
.tenant-settings-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tenant-settings-tab:hover {
  color: #0f172a;
}
.tenant-settings-tab.active {
  color: #0f766e;
  border-bottom-color: #0f766e;
  background: #fff;
}
.tenant-settings-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 16px 18px;
}
.tenant-settings-body .field {
  margin-bottom: 0.85rem;
}
.tenant-settings-body .field label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}
.tenant-settings-body .field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #94a3b8;
}
#modal-tenant-settings .modal-body .field input[type="radio"],
#modal-tenant-settings .modal-body .field input[type="checkbox"],
#modal-tenant-settings .tenant-inline-check input,
#modal-tenant-settings .tenant-promo-chip input {
  min-height: unset;
  padding: 0;
  width: auto;
  height: auto;
  font-size: inherit;
  margin: 0;
}
#modal-tenant-settings .modal-body .field input.input,
#modal-tenant-settings .tenant-promo-field .input {
  min-height: 38px;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
}
.tenant-settings-panel.hidden {
  display: none;
}
.tenant-settings-intro {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.tenant-quota-summary {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid #bae6fd;
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
}
.tenant-quota-summary-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.tenant-quota-summary-label {
  font-size: 0.8125rem;
  color: #64748b;
}
.tenant-quota-summary-value {
  font-size: 1.35rem;
  color: #0c4a6e;
}
.tenant-quota-summary-sub {
  margin-top: 4px;
  font-size: 0.8125rem;
  color: #475569;
}
.tenant-quota-plan-hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
}
.tenant-quota-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 12px;
}
.tenant-quota-max-field,
.tenant-quota-remark-field {
  grid-column: 1 / -1;
}
.tenant-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #334155;
  cursor: pointer;
  min-height: 38px;
  padding: 0 2px;
}
.tenant-inline-check input {
  flex-shrink: 0;
  accent-color: #0f766e;
}
.tenant-promo-mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tenant-promo-chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}
.tenant-promo-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tenant-promo-chip span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.tenant-promo-chip input:checked + span {
  border-color: #0f766e;
  background: #ecfdf5;
  color: #0f766e;
}
.tenant-promo-field {
  margin-bottom: 10px;
}
.tenant-promo-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}
.tenant-promo-field.hidden {
  display: none;
}
.tenant-promo-actions {
  margin-bottom: 10px;
}
.tenant-settings-advanced {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}
.tenant-settings-advanced .btn-link {
  padding: 0;
  font-size: 0.8125rem;
}
.tenant-settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: #fff;
}

.tenant-promo-mode-option {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  cursor: pointer;
}
.tenant-promo-mode-option + .input {
  margin-top: 4px;
  margin-bottom: 10px;
  max-width: 320px;
}
.tenant-modal-section {
  margin-bottom: 1.2rem;
}
.tenant-modal-section h3,
.tenant-modal-form h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.tenant-admins-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.tenant-admins-table {
  margin: 0;
}
.tenant-admins-table th,
.tenant-admins-table td {
  padding: 0.65rem 0.8rem;
}
.tenant-checkbox-field {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.45rem;
}
.tenant-checkbox-field label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  margin: 0;
}
.tenant-plan-desc {
  margin: -0.35rem 0 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}
.tenant-plan-desc-title {
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e3a8a;
}
.tenant-plan-desc-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.42rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.tenant-plan-desc-grid span {
  color: #64748b;
}
.tenant-plan-desc-grid strong {
  min-width: 0;
  color: #0f172a;
  font-weight: 650;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.6rem 0.55rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

.sidebar-nav-section {
  margin: 0.85rem 0 0.35rem;
  padding: 0 0.65rem 0 0.85rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  user-select: none;
}
.sidebar-nav-section:first-child {
  margin-top: 0.15rem;
}

.sidebar-nav .nav-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s, transform 0.2s;
}
.sidebar-nav .nav-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.sidebar-nav .nav-link-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.sidebar-nav .nav-link,
.sidebar-nav .nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-start;
  width: 100%;
  padding: 0.58rem 0.75rem;
  margin: 0;
  height: auto;
  min-height: 40px;
  line-height: 1.35;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.88);
  font-size: 0.92rem;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-dropdown-trigger:hover {
  background: rgba(255,255,255,0.09);
  color: #fff;
}
.sidebar-nav .nav-link:hover .nav-icon,
.sidebar-nav .nav-dropdown-trigger:hover .nav-icon {
  color: rgba(255,255,255,0.92);
}
.sidebar-nav .nav-link:focus-visible,
.sidebar-nav .nav-dropdown-trigger:focus-visible {
  outline: 2px solid rgba(64, 169, 255, 0.85);
  outline-offset: 1px;
}
.sidebar-nav .nav-link.active {
  background: linear-gradient(90deg, rgba(24,144,255,0.38) 0%, rgba(24,144,255,0.08) 100%);
  color: #fff;
  box-shadow: inset 3px 0 0 #40a9ff;
}
.sidebar-nav .nav-link.active .nav-icon {
  color: #91d5ff;
}
.nav-accordion .nav-dropdown-trigger.active,
.sidebar-nav .nav-dropdown.open .nav-dropdown-trigger {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.nav-accordion .nav-dropdown-trigger.active .nav-icon,
.sidebar-nav .nav-dropdown.open .nav-dropdown-trigger .nav-icon {
  color: rgba(255,255,255,0.95);
}
.nav-accordion { margin: 0; }
.nav-accordion .nav-dropdown-menu {
  position: static;
  display: none;
  box-shadow: none;
  border: none;
  padding: 0.2rem 0 0.45rem 0.35rem;
  margin: 2px 0 4px 0.35rem;
  border-left: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.12);
  border-radius: 0 8px 8px 0;
}
.nav-accordion.open .nav-dropdown-menu,
.nav-accordion .nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-accordion .nav-dropdown-item {
  display: block;
  position: relative;
  padding: 0.45rem 0.65rem 0.45rem 1.15rem;
  margin: 1px 0;
  border-radius: 8px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.78);
  background: transparent;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-accordion .nav-dropdown-item::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  transition: background 0.15s, box-shadow 0.15s;
}
.nav-accordion .nav-dropdown-item:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.nav-accordion .nav-dropdown-item:hover::before {
  background: rgba(255,255,255,0.5);
}
.nav-accordion .nav-dropdown-item.active {
  background: rgba(24,144,255,0.22);
  color: #fff;
  font-weight: 500;
}
.nav-accordion .nav-dropdown-item.active::before {
  background: #69c0ff;
  box-shadow: 0 0 8px rgba(105, 192, 255, 0.45);
}
.nav-accordion .nav-chevron {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 1.05rem;
  font-weight: 300;
  opacity: 0.65;
  transition: transform 0.22s ease, opacity 0.2s;
}
.nav-accordion .nav-dropdown.open .nav-chevron {
  transform: rotate(90deg);
  opacity: 0.95;
}

/* 浅色模式：主内容区变浅，侧栏仍使用上方默认深色样式（不单独变浅） */

body.theme-dark .sidebar-nav-section {
  color: rgba(255,255,255,0.32);
}
body.theme-dark .sidebar-brand-mark {
  background: linear-gradient(135deg, #177ddc 0%, #0958d9 45%, #003a8c 100%);
  box-shadow: 0 2px 14px rgba(24, 144, 255, 0.22);
}

/* 顶部操作栏：用户、通知、音效、主题、退出（始终在顶部） */
.top-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  position: relative;
  z-index: 2;
  padding: 0.6rem 1.25rem;
  padding-right: max(1.25rem, env(safe-area-inset-right));
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-top: max(0.6rem, env(safe-area-inset-top));
  background: linear-gradient(180deg, #001529 0%, #001a33 50%, #001529 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.top-bar-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  overflow: hidden;
}
.top-bar-route-title {
  display: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.98);
  line-height: 1.35;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-bar-brand {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  justify-content: flex-end;
  flex-shrink: 0;
}
/* 用户与角色：放在中间列标题下，避免与品牌/路由标题横向抢宽重叠 */
.top-bar .header-user-center,
.top-bar .top-bar-user-line {
  margin-left: 0;
  margin-right: 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255,255,255,0.72);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
  line-height: 1.35;
}
.top-bar .header-user-center {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}
.top-bar .notification-bell-wrap { position: relative; }
.top-bar .notification-dropdown { right: 0; left: auto; }
.top-bar .btn-theme,
.top-bar .btn-outline {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}
body.theme-dark .top-bar {
  background: linear-gradient(180deg, #0a1018 0%, #0d1520 50%, #0a1018 100%);
  border-bottom-color: #253244;
}
body.theme-dark .sidebar {
  border-right-color: #253244;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(24, 144, 255, 0.1) 0%, transparent 55%),
    linear-gradient(180deg, #0a1018 0%, #0d1520 50%, #0a1018 100%);
}

/* 汉堡按钮（仅移动端显示） */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0 0.5rem 0 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin: 0 auto;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* P0：桌面端隐藏订单/钥匙移动列表；窄屏规则在 max-width:1024 内覆盖 */
.orders-mobile-list,
.pickup-orders-mobile-list {
  display: none;
}

/* 抽屉遮罩（仅移动端） */
.nav-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.nav-drawer-backdrop.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* 抽屉面板（仅移动端） */
.nav-drawer {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(280px, 85vw);
  max-width: 320px;
  z-index: 1000;
  background: linear-gradient(180deg, #001529 0%, #001a33 50%, #001529 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nav-drawer.open {
  transform: translateX(0);
}
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.nav-drawer-title {
  font-weight: 600;
  font-size: 1rem;
  color: rgba(255,255,255,0.95);
}
.nav-drawer-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-drawer-close:hover,
.nav-drawer-close:active { background: rgba(255,255,255,0.15); }
.nav-drawer-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0;
}
.nav-drawer-link {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}
.nav-drawer-link:hover,
.nav-drawer-link:active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.nav-drawer-link.active {
  background: rgba(24,144,255,0.25);
  color: #fff;
  border-left-color: #1890ff;
}
.nav-drawer-link--indent {
  padding-left: 2rem;
  font-size: 0.9rem;
}
.nav-drawer-group {
  padding: 0.6rem 1.25rem 0.35rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
body.theme-dark .nav-drawer {
  background: linear-gradient(180deg, #0a1018 0%, #0d1520 50%, #0a1018 100%);
  border-right-color: #253244;
}
body.theme-dark .nav-drawer-backdrop.show { background: rgba(0,0,0,0.65); }

@media (min-width: 1025px) {
  .nav-hamburger { display: none !important; }
  .nav-drawer-backdrop { display: none !important; }
}

/* 消息提醒与音效 */
.header-notification-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  /* 紧挨右侧主题切换按钮，不额外向左缩进 */
  margin-left: 0;
}
.notification-bell-wrap {
  position: relative;
}
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 280px;
  max-width: 360px;
  max-height: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  border: 1px solid #e8e8e8;
  z-index: 1100;
  display: flex;
  flex-direction: column;
}
.notification-dropdown.hidden { display: none !important; }
.notification-dropdown-title {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.notification-message-list {
  padding: 4px 0;
  overflow-y: visible;
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
}
.notification-message-item {
  padding: 6px 10px;
  font-size: 12px;
  color: #333;
  line-height: 1.3;
  border-bottom: 1px solid #f5f5f5;
}
.notification-message-item .btn-link {
  display: block;
  width: 100%;
  margin: 0;
  padding: 5px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font: inherit;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.notification-message-item .btn-link:hover {
  background: #eaf4ff;
  color: #1677ff;
}
.notification-message-item .btn-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.28);
  background: #eef6ff;
}
.notification-message-item:last-child { border-bottom: none; }
.notification-message-item.notification-empty { color: #999; text-align: center; }
.notification-message-item time {
  display: block;
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}
.notification-dropdown-footer {
  padding: 10px 14px;
  border-top: 1px solid #f0f0f0;
  display: grid;
  gap: 8px;
}
.notification-goto-orders {
  display: block;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  color: #1890ff;
  text-decoration: none;
  border-radius: 6px;
  background: #e6f7ff;
}
.notification-goto-orders:hover { background: #bae7ff; color: #1890ff; }
body.theme-dark .notification-dropdown {
  background: #151c27;
  border-color: #2a3546;
}
body.theme-dark .notification-dropdown-title { color: #e8e8e8; border-bottom-color: #2a3546; }
body.theme-dark .notification-message-item { color: #e0e0e0; border-bottom-color: #2a3546; }
body.theme-dark .notification-message-item .btn-link {
  color: #dbe5f5;
}
body.theme-dark .notification-message-item .btn-link:hover {
  background: rgba(59, 130, 246, 0.16);
  color: #8ec5ff;
}
body.theme-dark .notification-message-item .btn-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.2);
}
body.theme-dark .notification-message-item time { color: #888; }
body.theme-dark .notification-dropdown-footer { border-top-color: #2a3546; }
body.theme-dark .notification-goto-orders { background: rgba(24,144,255,0.2); color: #69c0ff; }
body.theme-dark .notification-goto-orders:hover { background: rgba(24,144,255,0.35); }
.btn-notification-bell .notification-bell-icon,
.btn-notification-sound .notification-sound-icon { display: inline-flex; align-items: center; justify-content: center; }
.btn-notification-bell .icon-line,
.btn-notification-sound .icon-line { width: 20px; height: 20px; display: block; }
.btn-notification-bell,
.btn-notification-sound {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-notification-bell:hover,
.btn-notification-sound:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}
.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: #ff4d4f;
  color: #fff;
}
.notification-badge.hidden { display: none !important; }
.notification-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  left: auto;
  z-index: 5000;
  width: min(420px, calc(100vw - 2rem));
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: #1890ff;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: notification-toast-in 0.25s ease;
}
.notification-toast-title { font-weight: 600; margin-bottom: 4px; }
.notification-toast-text { opacity: 0.96; line-height: 1.45; word-break: break-word; }
.notification-toast .notification-toast-action { margin-top: 8px; }
.notification-toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 16px;
}
.notification-toast-close:hover { background: rgba(255,255,255,0.28); }
.notification-toast.hidden { display: none !important; }
@keyframes notification-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
body.theme-dark .btn-notification-bell,
body.theme-dark .btn-notification-sound {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
}
body.theme-dark .btn-notification-bell:hover,
body.theme-dark .btn-notification-sound:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.btn-notification-test {
  height: 40px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
}
.btn-notification-test:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
body.theme-dark .btn-notification-test {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
}
body.theme-dark .btn-notification-test:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.header-user-center {
  margin-left: auto;
  margin-right: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.88);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(520px, 58vw);
}
.header-user-meta {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-store-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-start;
  max-height: 200px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}
body.theme-dark .admin-user-store-checkboxes {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.admin-user-store-cb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
}
.nav { display: flex; gap: 0; align-items: stretch; flex-wrap: wrap; }
.nav-link {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 0 1.25rem;
  margin: 0 2px;
  height: 40px;
  line-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
.nav-link.active { color: #fff; background: rgba(24,144,255,0.5); border-color: #1890ff; }
/* 下拉菜单 */
.nav-dropdown { position: relative; margin: 0 2px; }
.nav-dropdown-trigger {
  height: 40px;
  padding: 0 1.25rem;
  line-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.nav-dropdown-trigger:hover { color: #fff; background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
.nav-dropdown.open .nav-dropdown-trigger,
.nav-dropdown-trigger.active { color: #fff; background: rgba(24,144,255,0.5); border-color: #1890ff; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  margin-top: 4px;
  padding: 6px 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 100;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
  display: block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.nav-dropdown-item:hover { background: #f0f9ff; color: #1890ff; }
.nav-dropdown-item.active { background: #e6f7ff; color: #1890ff; font-weight: 500; }
.main { flex: 1; padding: 1.5rem; padding-bottom: calc(1.5rem + 56px); overflow: auto; background: transparent; }

/* Buttons */
.btn { padding: 0.55rem 1rem; border-radius: 6px; border: 1px solid transparent; cursor: pointer; font-size: 0.95rem; min-height: 40px; line-height: 1.4; }
.btn-primary { background: #1890ff; color: #fff; border-color: #1890ff; }
.btn-primary:hover { background: #40a9ff; }
/* 工单「变更项目」按钮更突出 */
.order-change-items-btn {
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  box-shadow: 0 1px 4px rgba(24, 144, 255, 0.35);
}
.order-change-items-btn:hover { box-shadow: 0 2px 8px rgba(24, 144, 255, 0.45); }
/* 红色描边按钮（删除项目等危险操作） */
.btn-danger { background: #ff4d4f; color: #fff; border: 1px solid #ff4d4f; }
.btn-danger:hover { background: #ff7875; border-color: #ff7875; color: #fff; }
.btn-outline-danger { background: #fff; color: #ff4d4f; border: 1px solid #ff4d4f; }
.btn-outline-danger:hover { background: #ff4d4f; color: #fff; }
/* 内联编辑面板 — 订单项目材料编辑 */
.item-edit-panel { padding: 0 !important; background: transparent; }
.item-edit-panel-inner { padding: 12px 14px; background: #fafbfc; border-radius: 8px; border: 1px solid #e8e8e8; }
/* 材料表：表头与数据行共用同一 grid 列定义，保证列对齐 */
.item-edit-materials-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin-bottom: 4px;
}
.item-edit-materials-header,
.item-edit-materials-body > .item-edit-material-row {
  display: grid;
  grid-template-columns: 104px 96px 124px 100px 44px 96px 96px 96px 52px 60px 72px 72px 36px;
  gap: 6px;
  align-items: center;
  min-width: 1118px;
}
.item-edit-materials-header {
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: #999;
  line-height: 1.25;
}
.item-edit-materials-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-edit-col-sub { text-align: right; }
.item-edit-materials-body { display: flex; flex-direction: column; gap: 6px; }
.item-edit-material-row .input,
.item-edit-material-row select.input {
  padding: 4px 6px;
  font-size: 0.85rem;
  border-radius: 4px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.item-edit-material-row select.input { appearance: auto; padding-right: 2px; cursor: pointer; }
/* 零配件行仍用单列「规格」只读（非保养） */
.item-edit-material-row .item-edit-mat-spec { width: 100%; }
.item-edit-mat-sub {
  text-align: right;
  font-size: 0.85rem;
  color: #555;
  min-width: 0;
}
.item-edit-materials-body > .item-edit-material-row .material-del-btn { justify-self: center; padding: 2px 6px; }
.item-edit-materials-body > .item-edit-material-row .item-edit-inv-match { justify-self: center; padding: 2px 6px; white-space: nowrap; font-size: 0.75rem; }
/* 零配件行列数不同，保持 flex 排布 */
.item-edit-parts-body .item-edit-material-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.item-edit-parts-body .item-edit-material-row .input,
.item-edit-parts-body .item-edit-material-row select.input {
  width: auto;
  flex: 0 0 auto;
}
.item-edit-parts-body .item-edit-mat-name { width: 160px; max-width: 40vw; }
.item-edit-parts-body .item-edit-mat-brand { width: 100px; }
.item-edit-parts-body .item-edit-mat-spec { width: 100px; }
.item-edit-parts-body .item-edit-mat-qty { width: 60px; }
.item-edit-parts-body .item-edit-mat-price { width: 72px; }
.item-edit-parts-body .item-edit-mat-sub { width: 72px; text-align: right; }
.material-del-btn { color: #ff4d4f; background: transparent; border: 1px solid transparent; padding: 2px 8px; font-size: 1.1rem; line-height: 1; border-radius: 4px; min-height: auto; cursor: pointer; }
.material-del-btn:hover { background: #fff1f0; border-color: #ffa39e; }
.item-edit-workers-section { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #eee; font-size: 0.85rem; }
.item-edit-workers-section .item-edit-section-label { color: #666; font-weight: 500; min-width: 4.5em; }
.item-edit-worker-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.item-edit-worker-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; background: #e6f7ff; color: #0c5394; border: 1px solid #91d5ff; }
.item-edit-worker-tag .worker-del { cursor: pointer; background: none; border: none; color: #c00; font-size: 1rem; line-height: 1; padding: 0 2px; }
.item-edit-worker-tag .worker-del:hover { color: #f00; }
.item-edit-worker-select { min-width: 100px; }
.item-edit-parts-header { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; font-size: 0.8rem; color: #999; flex-wrap: wrap; }
.item-edit-parts-header .item-edit-col-part-no { min-width: 5.5em; }
.item-edit-parts-header .item-edit-col-inv { min-width: 2.5em; }
.item-edit-parts-body .item-edit-part-no-inline { min-width: 88px; max-width: 160px; }
.item-edit-parts-body .item-edit-inv-match { flex-shrink: 0; padding: 2px 6px; font-size: 0.75rem; }
.item-edit-parts-body { display: flex; flex-direction: column; gap: 6px; }
.item-edit-ratios-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.85rem;
}
.points-edit-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}
.points-edit-block {
  border: 1px solid #e4e9ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafbfc;
  min-width: 0;
}
.points-edit-block--primary {
  border-color: #b8d4f0;
  background: linear-gradient(180deg, #f7fbff 0%, #f3f8fd 100%);
}
.points-edit-block--secondary {
  border-color: #e8e8e8;
  background: #f9f9f9;
}
.points-edit-block__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
}
.points-edit-block__title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1a3a5c;
}
.points-edit-block--secondary .points-edit-block__title {
  font-size: 0.88rem;
  color: #555;
  font-weight: 500;
}
.points-edit-block__hint {
  font-size: 0.75rem;
  color: #8a96a3;
  font-weight: 400;
}
.points-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.points-edit-row__label {
  flex: 0 0 3.2em;
  font-size: 0.78rem;
  font-weight: 600;
  color: #5c6b7a;
  letter-spacing: 0.02em;
}
.points-edit-fields {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.points-edit-fields--indent {
  padding-left: 0;
}
.points-edit-field {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  cursor: text;
}
.points-edit-field__name {
  font-size: 0.75rem;
  color: #8a96a3;
  min-width: 2em;
  text-align: right;
}
.points-edit-field__unit {
  font-size: 0.78rem;
  color: #8a96a3;
  min-width: 1.1em;
}
.points-edit-or {
  font-size: 0.72rem;
  color: #b0b8c0;
  padding: 0 2px;
  user-select: none;
}
.item-edit-ratios-section .points-edit-input,
.item-edit-ratios-section .points-edit-input.input {
  width: 3.25rem !important;
  min-width: 0 !important;
  max-width: 3.5rem;
  height: 28px;
  padding: 2px 4px !important;
  font-size: 0.85rem;
  text-align: center;
  box-sizing: border-box;
}
.item-edit-part-points-list {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #d0dae6;
}
.item-edit-part-points-header {
  font-size: 0.75rem;
  color: #8a96a3;
  margin-bottom: 6px;
  font-weight: 500;
}
.item-edit-part-points-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.item-edit-part-points-row:last-child {
  margin-bottom: 0;
}
.item-edit-part-points-name {
  flex: 0 0 5.5rem;
  max-width: 5.5rem;
  font-size: 0.8rem;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-edit-ratios-section .item-edit-section-label { color: #666; font-weight: 500; min-width: 4.5em; }
.item-edit-ratio-label { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; color: #555; }
.item-edit-ratio-label .input { width: 60px; padding: 2px 6px; font-size: 0.85rem; text-align: center; }
.item-edit-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.item-action-cell { white-space: nowrap; }
.item-edit-row.hidden { display: none !important; }
.btn-outline { background: transparent; color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.5); margin-left: 0; }
.btn-outline:hover { color: #fff; }
.btn-theme {
  /* 顶部右侧三个按钮（消息提醒 / 音效 / 主题）紧挨在一起，不再用 auto margin 撑开大空隙 */
  margin-left: 0;
  margin-right: 0.4rem;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-theme:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.btn-theme:active { opacity: 0.9; }
.theme-toggle-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.theme-toggle-icon .icon-line { width: 20px; height: 20px; }

.btn-outline-secondary { background: #fff; color: #666; border: 1px solid #d9d9d9; }
.btn-outline-secondary:hover { color: #1890ff; border-color: #1890ff; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.9rem; min-height: 36px; }
.field label.small { font-size: 0.75rem; color: #888; }
.field-hint { display: block; margin-top: 0.25rem; font-size: 0.8rem; color: #888; }
.product-edit.btn-sm { background: #1890ff; color: #fff; border-color: #1890ff; font-weight: 500; padding: 0.35rem 0.75rem; }
.product-edit.btn-sm:hover { background: #40a9ff; border-color: #40a9ff; }
.product-status.btn-sm.btn-off { background: #ff7a45; color: #fff; border-color: #ff7a45; font-weight: 500; padding: 0.35rem 0.75rem; }
.product-status.btn-sm.btn-off:hover { background: #ff9c6e; border-color: #ff9c6e; }
.product-status.btn-sm.btn-on { background: #52c41a; color: #fff; border-color: #52c41a; font-weight: 500; padding: 0.35rem 0.75rem; }
.product-status.btn-sm.btn-on:hover { background: #73d13d; border-color: #73d13d; }
.product-actions .btn-sm { margin-right: 8px; }
.product-actions .btn-sm:last-child { margin-right: 0; }
.car-model-actions .btn-sm { margin-right: 10px; }
.car-model-actions .btn-sm:last-child { margin-right: 0; }
#vin-demo-table td:last-child .btn-sm { margin-right: 10px; }
#vin-demo-table td:last-child .btn-sm:last-child { margin-right: 0; }
.users-delete { margin-left: 8px; }

/* Table */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.table th, .table td { padding: 0.85rem 1.15rem; text-align: left; border-bottom: 1px solid #f0f0f0; }
.table th { background: #fafafa; font-weight: 600; font-size: 0.95rem; }
.table tbody tr:hover { background: #fafafa; }
.pickup-order-no-link { color: #1890ff; cursor: pointer; text-decoration: underline; }
.pickup-order-no-link:hover { color: #40a9ff; }
body.theme-dark .pickup-order-no-link { color: #9ecbff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
body.theme-dark .pickup-order-no-link:hover { color: #c3e0ff; }
#pickup-order-detail-body .detail-label { font-weight: 600; color: #666; width: 140px; }
body.theme-dark #pickup-order-detail-body .detail-label { color: #9ca3af; }
.pickup-order-detail-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
body.theme-dark .pickup-order-detail-actions { border-top-color: #374151; }
.card-table .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.toolbar { margin-bottom: 1rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.upload-progress { margin-bottom: 1rem; padding: 1rem 1.25rem; background: #f0f9ff; border: 1px solid #91d5ff; border-radius: 8px; }
.banner-upload-area { border: 2px dashed #d9d9d9; border-radius: 8px; padding: 2rem; text-align: center; cursor: pointer; background: #fafafa; transition: border-color .2s, background .2s; }
.banner-upload-area:hover { border-color: #1890ff; background: #f0f9ff; }
.banner-upload-area.drag-over { border-color: #1890ff; background: #e6f7ff; }
.banner-upload-placeholder { color: #999; font-size: 0.95rem; }
.agreement-upload-area { border: 2px dashed #d9d9d9; border-radius: 8px; padding: 2rem; text-align: center; cursor: pointer; background: #fafafa; transition: border-color .2s, background .2s; min-height: 80px; display: flex; align-items: center; justify-content: center; }
.agreement-upload-area:hover { border-color: #1890ff; background: #f0f9ff; }
.agreement-upload-area.drag-over { border-color: #1890ff; background: #e6f7ff; }
.agreement-upload-placeholder { color: #999; font-size: 0.95rem; }
.banner-slot-dropzone-inner { position: relative; }
.banner-slot-dropzone-inner.drag-over { outline: 2px dashed #1890ff; outline-offset: -2px; background: #e6f7ff; }
.banner-slot-drop-hint { font-size: 0.7em; color: #999; display: block; margin-top: 4px; }

.client-assets-section-title { font-size: 1.1rem; font-weight: 600; color: #333; margin-bottom: 0.25rem; }
.client-asset-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; margin-top: 0.5rem; }
.client-asset-bundle-slots { display: contents; }
.mpb-thumb-cell { white-space: nowrap; }
.client-asset-slot .banner-slot-preview-wrap { aspect-ratio: 200/120; max-height: 160px; }
.banner-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 768px) { .banner-slots { grid-template-columns: 1fr; } }
.banner-slot-card { border: 1px solid #e8e8e8; border-radius: 8px; padding: 1rem; background: #fff; }
.banner-slot-title { font-weight: 600; margin-bottom: 0.75rem; color: #333; }
.banner-slot-preview-wrap { position: relative; width: 100%; aspect-ratio: 750/320; min-height: 120px; max-height: 200px; background: #f0f0f0; border-radius: 6px; overflow: hidden; margin-bottom: 0.75rem; }
.banner-slot-preview { width: 100%; height: 100%; object-fit: cover; display: none; vertical-align: top; }
.banner-slot-preview.has-img { display: block; }
.banner-slot-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #999; font-size: 0.9rem; background: #f5f5f5; }
.banner-slot-placeholder.hidden { display: none; }
.banner-slot-meta { font-size: 0.8rem; color: #666; margin-bottom: 0.5rem; min-height: 1.2em; }
.banner-slot-edit { width: 100%; }
.create-order-user-list { max-height: 200px; overflow-y: auto; border: 1px solid #e8e8e8; border-radius: 6px; }
.create-order-user-list .user-row { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.create-order-user-list .user-row:hover { background: #f5f5f5; }
.create-order-user-list .user-row.selected { background: #e6f7ff; border-left: 3px solid #1890ff; }
.create-order-user-list .user-row:last-child { border-bottom: none; }
.create-order-user-selected { padding: 10px 12px; background: #e6f7ff; border: 1px solid #91d5ff; border-radius: 6px; margin-top: 8px; }
.create-order-user-selected.hidden { display: none; }
.create-order-user-list:empty { display: none; }
.create-order-user-list:not(:empty) + .create-order-user-selected { margin-top: 8px; }
.upload-progress-text { font-size: 0.95rem; color: #0050b3; margin-bottom: 0.5rem; }
.upload-progress-bar-wrap { height: 8px; background: #e6f7ff; border-radius: 4px; overflow: hidden; }
.upload-progress-bar { height: 100%; background: linear-gradient(90deg, #1890ff, #40a9ff); border-radius: 4px; transition: width 0.2s ease; width: 0%; }
.orders-type-tabs,
.orders-status-tabs { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 0.8rem; }
.orders-status-tabs { margin-bottom: 1.6rem; }
.status-tab { padding: 1.2rem 2.4rem; border: 1px solid #d9d9d9; background: #fff; border-radius: 14px; cursor: pointer; font-size: 2rem; font-weight: 700; color: #333; min-height: 80px; }
.status-tab:hover { color: #1890ff; border-color: #1890ff; }
.status-tab.active { background: #1890ff; color: #fff; border-color: #1890ff; }

/* 订单管理顶部筛选是高密度筛选器，不能继承基础数据页的大号状态按钮 */
#page-orders .orders-filters-header .orders-type-tabs,
#page-orders .orders-filters-header .orders-status-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  row-gap: 8px;
  margin-bottom: 0;
}
#page-orders .orders-filters-header .orders-filter-row {
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
#page-orders .orders-filters-header .orders-filter-label {
  width: 2.4em;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0;
}
#page-orders .orders-filters-header .status-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: none;
}
#page-orders .orders-filters-header .status-tab[data-status="pending_review"],
#page-orders .orders-filters-header .status-tab[data-status="pending_settlement"],
#page-orders .orders-filters-header .status-tab[data-status="confirmed"] {
  padding-left: 0.95rem;
  padding-right: 0.95rem;
}
.product-category-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1rem; }
.product-category-tabs .category-tab { padding: 1.2rem 2.4rem; border: 1px solid #d9d9d9; background: #fff; border-radius: 14px; cursor: pointer; font-size: 2rem; font-weight: 700; color: #333; min-height: 80px; }
.product-category-tabs .category-tab:hover { color: #1890ff; border-color: #1890ff; }
.product-category-tabs .category-tab.active { background: #1890ff; color: #fff; border-color: #1890ff; }
.toolbar .btn-outline-secondary.active { background: #ff7a45; color: #fff; border-color: #ff7a45; }
.table .order-no-link { color: #1890ff; text-decoration: none; }
.table .order-no-link:hover { text-decoration: underline; }
.table .part-name-link { color: #1890ff; text-decoration: none; cursor: pointer; }
.table .part-name-link:hover { text-decoration: underline; }
body.theme-dark .table .order-no-link { color: #9ecbff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
body.theme-dark .table .order-no-link:hover { color: #c3e0ff; text-decoration: underline; }
body.theme-dark .table .part-name-link { color: #9ecbff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
body.theme-dark .table .part-name-link:hover { color: #c3e0ff; }
/* 订单详情等非 .table 区域同样使用 order-no-link */
body.theme-dark .detail-item .order-no-link,
body.theme-dark .detail-item .order-no-link:visited,
body.theme-dark .detail-grid .order-no-link,
body.theme-dark .detail-grid .order-no-link:visited,
body.theme-dark .text-muted .order-no-link,
body.theme-dark .text-muted .order-no-link:visited {
  color: #9ecbff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.theme-dark .detail-item .order-no-link:hover,
body.theme-dark .detail-grid .order-no-link:hover,
body.theme-dark .text-muted .order-no-link:hover {
  color: #c3e0ff;
}
.user-no-link { color: #1677ff; text-decoration: none; font-weight: 600; }
.user-no-link:hover { color: #4096ff; text-decoration: underline; }
body.theme-dark .user-no-link { color: #8ec5ff; }
body.theme-dark .user-no-link:hover { color: #b3dcff; text-decoration: underline; }

/* 车辆营运性质：营运浅红、非营运浅绿（浅色 / 深色主题） */
.vehicle-op-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.875em;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}
.vehicle-op-tag--commercial {
  color: #b91c1c;
  background: rgba(254, 202, 202, 0.85);
}
.vehicle-op-tag--non-commercial {
  color: #166534;
  background: rgba(187, 247, 208, 0.85);
}
body.theme-dark .vehicle-op-tag--commercial {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.22);
}
body.theme-dark .vehicle-op-tag--non-commercial {
  color: #bbf7d0;
  background: rgba(74, 222, 128, 0.2);
}
.input, .table select { padding: 0.55rem 0.9rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem; min-height: 40px; }
.input { min-width: 200px; }
.table select { min-height: 40px; cursor: pointer; }

/* Page layout：占满主内容区宽度，卡片随屏幕自适应 */
.page { width: 100%; min-width: 0; }
.page-header { margin-bottom: 1.25rem; }

/* 洗车预约配置 */
.wash-config-page .wash-config-page-header { margin-bottom: 1rem; }
.wash-config-page .wash-config-lead { max-width: 52rem; line-height: 1.55; }
.wash-config-card {
  padding: 1.25rem 1.35rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.wash-config-price-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(24, 144, 255, 0.08) 0%, rgba(24, 144, 255, 0.02) 100%);
  border: 1px solid rgba(24, 144, 255, 0.15);
  font-size: 0.9rem;
}
.wash-config-price-hint-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1890ff;
  opacity: 0.9;
}
.wash-config-price-hint-text { color: #666; }
.wash-config-link-products {
  margin-left: auto;
  font-weight: 500;
  color: #1890ff;
  text-decoration: none;
}
.wash-config-link-products:hover { text-decoration: underline; }
.wash-config-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #1a1a1a;
}
.wash-config-desc { margin-bottom: 1rem; max-width: 48rem; line-height: 1.5; }
.wash-config-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
  margin-bottom: 1.15rem;
}
.wash-config-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.wash-config-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
}
.wash-config-time-input {
  min-width: 0 !important;
  width: 6.5rem;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
}
.wash-config-date-input {
  min-width: 0 !important;
  width: 11rem;
  font-family: ui-monospace, monospace;
}
.wash-config-slots-loading {
  text-align: center;
  padding: 1rem !important;
}
.wash-config-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: 0;
}
@media (min-width: 720px) {
  .wash-config-toolbar-actions { margin-left: auto; }
}
.wash-config-table-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  background: #fafafa;
}
.wash-config-slots-table {
  margin: 0 !important;
  background: #fff;
}
.wash-config-slots-table thead th {
  background: #f0f5ff;
  color: #1d39c4;
  font-weight: 600;
  font-size: 0.88rem;
  border-bottom: 1px solid #d6e4ff !important;
}
.wash-config-slots-table td {
  vertical-align: middle;
  border-color: #eee !important;
}
.wash-config-slots-table tbody tr:nth-child(even) { background: #fafbff; }
.wash-config-col-booked,
.wash-config-col-remaining {
  width: 6.5rem;
  text-align: center;
}
.wash-config-col-max { width: 11rem; text-align: center; }
.wash-config-slots-table .wash-slot-booked-cell,
.wash-config-slots-table .wash-slot-remaining-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: #333;
}
.wash-config-slots-table .wash-slot-remaining-cell--full {
  color: #cf1322;
  font-weight: 600;
}
.wash-config-slots-table .wash-slot-remaining-input,
.wash-config-slots-table .wash-slot-max-input {
  margin: 0 auto;
  display: block;
  text-align: center;
}
body.theme-dark .wash-config-card {
  border-color: #2a3546;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}
body.theme-dark .wash-config-section-title { color: #e8eef7; }
body.theme-dark .wash-config-price-hint {
  background: linear-gradient(90deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.04) 100%);
  border-color: rgba(64, 169, 255, 0.25);
}
body.theme-dark .wash-config-price-hint-text { color: #a8b4c8; }
body.theme-dark .wash-config-field label { color: #9aa8bc; }
body.theme-dark .wash-config-slots-table .wash-slot-booked-cell,
body.theme-dark .wash-config-slots-table .wash-slot-remaining-cell { color: #c5d0e0; }
body.theme-dark .wash-config-slots-table .wash-slot-remaining-cell--full { color: #ff7875; }
body.theme-dark .wash-config-table-wrap {
  border-color: #2a3546;
  background: #0f141d;
}
body.theme-dark .wash-config-slots-table {
  background: #151c27;
}
body.theme-dark .wash-config-slots-table thead th {
  background: #1a2638;
  color: #8dc8ff;
  border-bottom-color: #2a4058 !important;
}
body.theme-dark .wash-config-slots-table td { border-color: #2a3546 !important; color: #dce6f5; }
body.theme-dark .wash-config-slots-table tbody tr:nth-child(even) { background: #121922; }

/* 三列布局（保养项目材料等页面，桌面端） */
.page-three-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}
.page-col {
  min-width: 0;
}
.page-col-left { }
.page-col-mid { }
.page-col-right { }

/* 小保养配置页：中间列（材料与品牌卡片）加宽，避免数量/参考价等被遮挡 */
#page-maintain-small-package .page-three-columns {
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 2fr) minmax(0, 0.75fr);
}
#page-maintain-small-package .page-col-mid {
  min-width: 0;
  overflow: hidden;
}
#page-maintain-small-package .page-col-mid .card-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#page-maintain-small-package #maintain-sp-table {
  min-width: 800px;
}
#page-maintain-small-package #maintain-sp-table th:nth-child(1),
#page-maintain-small-package #maintain-sp-table td:nth-child(1) { min-width: 2.5em; width: 2.5em; }
#page-maintain-small-package #maintain-sp-table th:nth-child(2),
#page-maintain-small-package #maintain-sp-table td:nth-child(2) { min-width: 7em; }
#page-maintain-small-package #maintain-sp-table th:nth-child(3),
#page-maintain-small-package #maintain-sp-table td:nth-child(3) { min-width: 7em; }
#page-maintain-small-package #maintain-sp-table th:nth-child(4),
#page-maintain-small-package #maintain-sp-table td:nth-child(4) { min-width: 7em; }
#page-maintain-small-package #maintain-sp-table th:nth-child(5),
#page-maintain-small-package #maintain-sp-table td:nth-child(5) { min-width: 6em; white-space: nowrap; }
#page-maintain-small-package #maintain-sp-table th:nth-child(6),
#page-maintain-small-package #maintain-sp-table td:nth-child(6) { min-width: 4em; }
#page-maintain-small-package #maintain-sp-table th:nth-child(7),
#page-maintain-small-package #maintain-sp-table td:nth-child(7) { white-space: nowrap; min-width: 5.5em; }
#page-maintain-small-package #maintain-sp-table td input[type="number"],
#page-maintain-small-package #maintain-sp-table td .input {
  min-width: 4.5em;
  box-sizing: border-box;
}

/* 保养项目材料页：三列铺满视口，减少下方空白 */
#page-maintain-materials .page-three-columns {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.2fr) minmax(0, 1fr);
  min-height: calc(100vh - 200px);
  align-items: start;
}
#page-maintain-materials .page-col-right .card-toolbar .toolbar {
  flex-wrap: wrap;
  gap: 0.5rem;
}
#page-maintain-materials .page-col-right .card-toolbar .toolbar > .btn {
  margin-left: 0 !important;
}
#page-maintain-materials #maintain-brands-table td:last-child {
  white-space: normal;
}
#page-maintain-materials #maintain-brands-table td:last-child .table-op-btns {
  flex-wrap: wrap;
  row-gap: 0.4rem;
}
#page-maintain-materials .page-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}
#page-maintain-materials .page-col .card {
  margin-bottom: 1rem;
}
#page-maintain-materials .page-col .card:last-child {
  margin-bottom: 0;
}

/* 保养包配置：左右两列布局 */
#page-maintain-package-config .page-two-columns {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr;
  gap: 16px;
  align-items: flex-start;
}

#page-maintain-package-config .page-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Card */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}
.card h3 { margin: 0 0 1rem; font-size: 1.05rem; font-weight: 600; color: #333; }
/* 用户详情：最近订单 + 订单类型筛选 */
.user-recent-orders-card .user-recent-orders-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}
.user-recent-orders-card .user-recent-orders-head h3 { margin-bottom: 0; }
.user-orders-type-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #555;
}
.user-orders-type-filter-label { white-space: nowrap; }
.user-orders-type-filter select.form-select-sm,
.user-orders-type-filter select {
  min-width: 7.5rem;
  padding: 0.35rem 1.75rem 0.35rem 0.5rem;
  font-size: 0.875rem;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: #333;
}
body.theme-dark .user-orders-type-filter { color: #9ca3af; }
body.theme-dark .user-orders-type-filter select {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}
/* 用户详情「最近订单」：固定表格布局，避免状态列长文本把表格向右撑出导致内卡片看起来偏移 */
.user-recent-orders-card .table {
  table-layout: fixed;
  width: 100%;
}
.user-recent-orders-card .table th,
.user-recent-orders-card .table td {
  word-break: break-word;
  overflow-wrap: anywhere;
}
.user-recent-orders-card .table th:nth-child(1),
.user-recent-orders-card .table td:nth-child(1) {
  width: 30%;
}
.user-recent-orders-card .table th:nth-child(2),
.user-recent-orders-card .table td:nth-child(2) {
  width: 16%;
}
.user-recent-orders-card .table th:nth-child(3),
.user-recent-orders-card .table td:nth-child(3) {
  width: 32%;
}
.user-recent-orders-card .table th:nth-child(4),
.user-recent-orders-card .table td:nth-child(4) {
  width: 22%;
}
.card .field input,
.card .field select { min-height: 42px; }

/* ── 全局筛选/工具条：弱化辅区，避免与下方列表抢视觉 ── */
.card.card-toolbar {
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.65rem;
  background: #f8f9fb;
  border: 1px solid #e8eaef;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  border-radius: 10px;
}
.card.card-toolbar .toolbar {
  margin-bottom: 0;
  gap: 0.4rem 0.5rem;
  align-items: center;
}
.card.card-toolbar .input,
.card.card-toolbar select.input,
.card.card-toolbar select {
  min-height: 32px;
  padding: 0.32rem 0.6rem;
  font-size: 0.8125rem;
  border-radius: 6px;
  min-width: 0;
}
.card.card-toolbar .btn {
  min-height: 32px;
  padding: 0.32rem 0.7rem;
  font-size: 0.8125rem;
  border-radius: 6px;
}
.card.card-toolbar .btn-primary {
  font-weight: 600;
}
.card-toolbar .toolbar { margin-bottom: 0; }
.card-toolbar .product-category-tabs {
  margin-top: 0.6rem;
  margin-bottom: 0;
  padding-top: 0.55rem;
  border-top: 1px solid #eceff3;
  gap: 6px;
}
.card-toolbar .orders-status-tabs { margin-bottom: 0; }
.card.card-toolbar .product-category-tabs .category-tab,
.card.card-toolbar .orders-type-tabs .status-tab,
.card.card-toolbar .orders-status-tabs .status-tab {
  padding: 0.25rem 0.55rem;
  min-height: 30px;
  font-size: 0.8125rem;
  border-radius: 6px;
}
body.theme-dark .card.card-toolbar {
  background: #151c27;
  border-color: #2a3546;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
body.theme-dark .card.card-toolbar .input,
body.theme-dark .card.card-toolbar select {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}
body.theme-dark .card-toolbar .product-category-tabs {
  border-top-color: #2a3546;
}
/* 库存管理：顶部切换按钮按参考图（纯文字 + 橙色下划线） */
#page-material-stock .inventory-union-tabs,
#page-parts .inventory-union-tabs,
#page-warehouse-locations .inventory-union-tabs,
#page-inventory-count .inventory-union-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-bottom: 1rem;
  padding: 0;
  border-bottom: 1px solid #ececec;
}
#page-material-stock .inventory-union-tab,
#page-parts .inventory-union-tab,
#page-warehouse-locations .inventory-union-tab,
#page-inventory-count .inventory-union-tab {
  position: relative;
  padding: 0.55rem 0.05rem;
  margin-bottom: -1px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #333;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: none;
  transition: color 0.16s ease;
}
#page-material-stock .inventory-union-tab:hover,
#page-parts .inventory-union-tab:hover,
#page-warehouse-locations .inventory-union-tab:hover,
#page-inventory-count .inventory-union-tab:hover {
  border: none;
  background: transparent;
  color: #ff8a00;
}
#page-material-stock .inventory-union-tab.active,
#page-parts .inventory-union-tab.active,
#page-warehouse-locations .inventory-union-tab.active,
#page-inventory-count .inventory-union-tab.active {
  border: none;
  background: transparent;
  color: #ff8a00;
  font-weight: 600;
}
#page-material-stock .inventory-union-tab.active::after,
#page-parts .inventory-union-tab.active::after,
#page-warehouse-locations .inventory-union-tab.active::after,
#page-inventory-count .inventory-union-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 2px;
  background: #ff8a00;
}

body.theme-dark #page-material-stock .inventory-union-tabs,
body.theme-dark #page-parts .inventory-union-tabs,
body.theme-dark #page-warehouse-locations .inventory-union-tabs,
body.theme-dark #page-inventory-count .inventory-union-tabs {
  border-bottom-color: #2a3546;
}
body.theme-dark #page-material-stock .inventory-union-tab,
body.theme-dark #page-parts .inventory-union-tab,
body.theme-dark #page-warehouse-locations .inventory-union-tab,
body.theme-dark #page-inventory-count .inventory-union-tab {
  color: #cbd5e1;
}
body.theme-dark #page-material-stock .inventory-union-tab:hover,
body.theme-dark #page-parts .inventory-union-tab:hover,
body.theme-dark #page-warehouse-locations .inventory-union-tab:hover,
body.theme-dark #page-inventory-count .inventory-union-tab:hover {
  color: #ffb366;
}
body.theme-dark #page-material-stock .inventory-union-tab.active,
body.theme-dark #page-parts .inventory-union-tab.active,
body.theme-dark #page-warehouse-locations .inventory-union-tab.active,
body.theme-dark #page-inventory-count .inventory-union-tab.active {
  color: #ffb366;
}
body.theme-dark #page-material-stock .inventory-union-tab.active::after,
body.theme-dark #page-parts .inventory-union-tab.active::after,
body.theme-dark #page-warehouse-locations .inventory-union-tab.active::after,
body.theme-dark #page-inventory-count .inventory-union-tab.active::after {
  background: #ff9f43;
}
/* 采购管理：一级 Tab = 橙字 + 底划线；二级 = 白底描边按钮组 + 竖分割线（参照采购管理参考稿） */
#page-purchase-orders .procurement-top-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0;
  border-bottom: 1px solid #e8e8e8;
  background: transparent;
}
#page-purchase-orders .procurement-top-tabs .inventory-union-tab {
  padding: 0.55rem 0.15rem;
  margin-bottom: -1px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #333;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: none;
  position: relative;
}
#page-purchase-orders .procurement-top-tabs .inventory-union-tab:hover {
  border: none;
  color: #ff7f27;
  background: transparent;
}
#page-purchase-orders .procurement-top-tabs .inventory-union-tab.active {
  border: none;
  background: transparent;
  color: #ff7f27;
  font-weight: 600;
  box-shadow: none;
}
#page-purchase-orders .procurement-top-tabs .inventory-union-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #ff7f27;
  border-radius: 1px;
}

#page-purchase-orders .procurement-sub-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 1rem;
  padding: 0;
  border: 1px solid #e8e8e8;
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
}
#page-purchase-orders .procurement-sub-tabs .inventory-union-tab {
  padding: 0.5rem 1.35rem;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #fff;
  color: #222;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: none;
  border-right: 1px solid #e8e8e8;
}
#page-purchase-orders .procurement-sub-tabs .inventory-union-tab:last-child {
  border-right: none;
}
#page-purchase-orders .procurement-sub-tabs .inventory-union-tab:hover {
  border: none;
  border-right: 1px solid #e8e8e8;
  color: #ff7f27;
  background: #fff;
}
#page-purchase-orders .procurement-sub-tabs .inventory-union-tab:last-child:hover {
  border-right: none;
}
#page-purchase-orders .procurement-sub-tabs .inventory-union-tab.active {
  border: none;
  border-right: 1px solid #e8e8e8;
  background: #fff;
  color: #ff7f27;
  font-weight: 600;
  box-shadow: none;
}
#page-purchase-orders .procurement-sub-tabs .inventory-union-tab:last-child.active {
  border-right: none;
}

/* 会计科目页：三段分区切换（参考采购子标签） */
#page-finance-accounts #fa-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 0.9rem;
  padding: 0;
  border: 1px solid #e8e8e8;
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
}
#page-finance-accounts #fa-tabs .inventory-union-tab {
  padding: 0.5rem 1.25rem;
  margin: 0;
  border: none;
  border-right: 1px solid #e8e8e8;
  border-radius: 0;
  background: #fff;
  color: #222;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: none;
}
#page-finance-accounts #fa-tabs .inventory-union-tab:last-child { border-right: none; }
#page-finance-accounts #fa-tabs .inventory-union-tab:hover {
  border: none;
  border-right: 1px solid #e8e8e8;
  color: #ff7f27;
  background: #fff;
}
#page-finance-accounts #fa-tabs .inventory-union-tab:last-child:hover { border-right: none; }
#page-finance-accounts #fa-tabs .inventory-union-tab.active {
  border: none;
  border-right: 1px solid #e8e8e8;
  background: #fff;
  color: #ff7f27;
  font-weight: 600;
}
#page-finance-accounts #fa-tabs .inventory-union-tab:last-child.active { border-right: none; }

body.theme-dark #page-purchase-orders .procurement-top-tabs {
  border-bottom-color: #2a3546;
}
body.theme-dark #page-purchase-orders .procurement-top-tabs .inventory-union-tab {
  color: #cbd5e1;
  background: transparent;
}
body.theme-dark #page-purchase-orders .procurement-top-tabs .inventory-union-tab:hover {
  color: #ffb366;
}
body.theme-dark #page-purchase-orders .procurement-top-tabs .inventory-union-tab.active {
  color: #ffb366;
}
body.theme-dark #page-purchase-orders .procurement-top-tabs .inventory-union-tab.active::after {
  background: #ff9f43;
}
body.theme-dark #page-purchase-orders .procurement-sub-tabs {
  background: #121a26;
  border-color: #2a3546;
}
body.theme-dark #page-purchase-orders .procurement-sub-tabs .inventory-union-tab {
  background: #121a26;
  color: #e2e8f0;
  border-right-color: #2a3546;
}
body.theme-dark #page-purchase-orders .procurement-sub-tabs .inventory-union-tab:hover {
  background: #121a26;
  border-right-color: #2a3546;
  color: #ffb366;
}
body.theme-dark #page-purchase-orders .procurement-sub-tabs .inventory-union-tab.active {
  background: #151f2e;
  color: #ffb366;
  border-right-color: #2a3546;
}
body.theme-dark #page-finance-accounts #fa-tabs {
  background: #121a26;
  border-color: #2a3546;
}
body.theme-dark #page-finance-accounts #fa-tabs .inventory-union-tab {
  background: #121a26;
  color: #e2e8f0;
  border-right-color: #2a3546;
}
body.theme-dark #page-finance-accounts #fa-tabs .inventory-union-tab:hover {
  background: #121a26;
  border-right-color: #2a3546;
  color: #ffb366;
}
body.theme-dark #page-finance-accounts #fa-tabs .inventory-union-tab.active {
  background: #151f2e;
  color: #ffb366;
  border-right-color: #2a3546;
}
.po-col-settings-details {
  position: relative;
}
.po-col-settings-details summary::-webkit-details-marker {
  display: none;
}
.po-col-settings-body {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 20;
  margin-top: 4px;
  padding: 0.65rem 0.75rem;
  max-width: min(420px, 92vw);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}
.po-col-settings-label {
  font-size: 0.85rem;
  color: #334155;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
body.theme-dark .po-col-settings-body {
  background: #151c27;
  border-color: #2a3546;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
body.theme-dark .po-col-settings-label {
  color: #cbd5e1;
}

.inventory-union-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.inventory-union-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.48rem 0.95rem;
  border: 1px solid #d8e1eb;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .16s ease;
}
.inventory-union-tab:hover {
  border-color: #1890ff;
  color: #1677ff;
}
.inventory-union-tab.active {
  background: #e6f4ff;
  border-color: #91caff;
  color: #0958d9;
}

/* 订单管理工具栏：分区与层次（尺寸随全局 card-toolbar 收紧） */
.orders-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  row-gap: 0.55rem;
}
.orders-search-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem 0.25rem 0.4rem;
  background: #fff;
  border: 1px solid #e4e9ef;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.orders-search-group:focus-within {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.12);
}
.orders-search-input {
  width: 128px;
  min-width: 88px;
  margin: 0;
  border: none;
  background: transparent;
  padding: 0.35rem 0.5rem;
  font-size: 0.8125rem;
}
.orders-search-input::placeholder { color: #8c9aa8; }
.orders-search-input:focus { outline: none; }
.orders-search-btn { flex-shrink: 0; margin: 0; }
.orders-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.orders-actions-divider {
  width: 1px;
  height: 18px;
  background: #e0e4e8;
  margin: 0 0.2rem;
}
/* 订单筛选：已移至 page-header 内，不再作为卡片内分隔区 */
.orders-filters-header {
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
}
.orders-filters-header .orders-filter-row {
  margin-bottom: 0.6rem;
}
.orders-filter-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}
.orders-filter-row:last-child { margin-bottom: 0; }
.orders-filter-label {
  flex-shrink: 0;
  width: 2.6em;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}
.orders-list-summary {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.orders-summary-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 500;
}

/* 存取钥匙订单：工具条内搜索行 + 状态与订单列表对齐 */
.pickup-orders-toolbar .pickup-toolbar-row-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.pickup-orders-toolbar .pickup-status-tabs-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}
.pickup-orders-toolbar .pickup-status-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
}
.pickup-orders-toolbar .pickup-status-tabs-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pickup-orders-toolbar .pickup-status-tabs-scroll .status-tab {
  padding: 0.25rem 0.55rem;
  min-height: 30px;
  font-size: 0.8125rem;
  border-radius: 6px;
}
.card-table {
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
/* 宽表：按内容撑开 + 横向滚动，避免多列被压成竖排 */
.card-table > .table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.page .card.card-table .table > thead > tr > th,
.page .card.card-table .table > tbody > tr > td {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  vertical-align: middle;
}
/* 订单列表：宽表格在卡片内横向滚动，避免小屏/笔记本表头被裁切 */
#page-orders .orders-list-card.card-table {
  overflow-x: visible;
  overflow-y: visible;
}
#page-orders .orders-list-card .orders-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  position: relative;
}
.table-scroll-hint { display: none; }
.card-table .table { box-shadow: none; border-radius: 0; border: none; }
.card-table .table th,
.card-table .table td { padding: 0.9rem 1.25rem; }
/* 操作列：按钮单行显示，避免换行错乱 */
.card-table .table td.table-op-cell,
.card-table .table th:last-child,
.card-table .table td:last-child { white-space: nowrap; min-width: 1px; }
.card-table .table .table-op-btns { display: inline-flex; flex-wrap: nowrap; gap: 0.35rem; align-items: center; }
.card-table .table .table-op-btns .btn,
.card-table .table .table-op-btns .btn-sm { flex-shrink: 0; white-space: nowrap; }
#orders-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
}
#orders-table th,
#orders-table td {
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* colgroup 列宽 —— 主定义 */
#orders-table .col-order-no  { width: 160px; }
#orders-table .col-customer  { width: 120px; }
#orders-table .col-vehicle   { width: 130px; }
#orders-table .col-car-model { width: 170px; }
#orders-table .col-type      { width: 65px; }
#orders-table .col-amount    { width: 100px; }
#orders-table .col-created   { width: 130px; }
#orders-table .col-pickup    { width: 125px; }
#orders-table .col-finished  { width: 125px; }
#orders-table .col-inspector { width: 80px; }
#orders-table .col-remark    { width: 90px; }
#orders-table .col-status    { width: 90px; }
#orders-table .col-actions   { width: 110px; }
/* nth-child 回退定义 */
#orders-table th:nth-child(1),
#orders-table td:nth-child(1) { width: 160px; }  /* 订单号 */
#orders-table th:nth-child(2),
#orders-table td:nth-child(2) { width: 120px; }  /* 客户信息 */
#orders-table th:nth-child(3),
#orders-table td:nth-child(3) { width: 130px; }  /* 车辆信息 */
#orders-table th:nth-child(4),
#orders-table td:nth-child(4) { width: 170px; }  /* 车型 */
#orders-table th:nth-child(5),
#orders-table td:nth-child(5) { width: 65px; }   /* 类型 */
#orders-table th:nth-child(6),
#orders-table td:nth-child(6) { width: 100px; }  /* 金额 */
#orders-table th:nth-child(7),
#orders-table td:nth-child(7) { width: 130px; }  /* 下单时间 */
#orders-table th:nth-child(8),
#orders-table td:nth-child(8) { width: 125px; }  /* 接车时间 */
#orders-table th:nth-child(9),
#orders-table td:nth-child(9) { width: 125px; }  /* 完工时间 */
#orders-table th:nth-child(10),
#orders-table td:nth-child(10) { width: 80px; }  /* 质检人 */
#orders-table th:nth-child(11),
#orders-table td:nth-child(11) { width: 90px; }  /* 状态 */
#orders-table th:nth-child(12),
#orders-table td:nth-child(12) { width: 110px; } /* 操作 */
#orders-table .table-op-cell,
#orders-table th:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.45);
}
#orders-table thead th:last-child {
  z-index: 3;
  background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
}
#orders-table td.table-op-cell {
  overflow: visible;
  text-overflow: clip;
}
#orders-table .table-op-btns {
  width: 100%;
  justify-content: center;
}
#orders-table .table-op-btns .btn,
#orders-table .table-op-btns .btn-sm {
  min-width: 76px;
  text-align: center;
}
.orders-customer-main,
.orders-vehicle-main,
.orders-amount-main,
.orders-time-main,
.orders-type-main {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}
.orders-customer-sub,
.orders-vehicle-sub,
.orders-amount-sub,
.orders-time-sub,
.orders-type-sub {
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}
/* 订单列表「车型」列：车系在上（大字）、车型在下（小字） */
.orders-order-car-series {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}
.orders-order-car-model {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.35;
}
.badge.badge-pending {
  background: #fff7e6;
  color: #ad6800;
  border: 1px solid #ffd591;
}
.badge.badge-processing {
  background: #e6f7ff;
  color: #0958d9;
  border: 1px solid #91caff;
}
.badge.badge-done {
  background: #f6ffed;
  color: #237804;
  border: 1px solid #b7eb8f;
}
.badge.badge-cancel {
  background: #fff1f0;
  color: #a8071a;
  border: 1px solid #ffa39e;
}

/* 笔记本等中等宽度：压缩单元格并提示横向滚动，避免表头被裁切 */
@media (min-width: 1025px) and (max-width: 1680px) {
  #page-orders .table-scroll-hint--desktop {
    display: block !important;
    padding: 0.4rem 1.25rem 0;
    margin: 0;
    font-size: 0.78rem;
    color: #64748b;
  }
  body.theme-dark #page-orders .table-scroll-hint--desktop {
    color: #8b9cb3;
  }
  #orders-table {
    min-width: 1280px;
  }
  #page-orders #orders-table th,
  #page-orders #orders-table td {
    padding: 0.65rem 0.7rem;
    font-size: 0.82rem;
  }
}

/* 大屏（>1680px）：内容列按比例扩展，避免右侧操作列孤立空旷 */
@media (min-width: 1681px) {
  #orders-table {
    min-width: 1400px;
  }
  #orders-table .col-customer,
  #orders-table th:nth-child(2),
  #orders-table td:nth-child(2) { width: 150px; }
  #orders-table .col-vehicle,
  #orders-table th:nth-child(3),
  #orders-table td:nth-child(3) { width: 160px; }
  #orders-table .col-car-model,
  #orders-table th:nth-child(4),
  #orders-table td:nth-child(4) { width: 210px; }
  #orders-table .col-inspector,
  #orders-table th:nth-child(10),
  #orders-table td:nth-child(10) { width: 100px; }
  #orders-table .col-created,
  #orders-table th:nth-child(7),
  #orders-table td:nth-child(7) { width: 150px; }
  #orders-table .col-pickup,
  #orders-table th:nth-child(8),
  #orders-table td:nth-child(8) { width: 145px; }
  #orders-table .col-finished,
  #orders-table th:nth-child(9),
  #orders-table td:nth-child(9) { width: 145px; }
}

/* 全局：管理端数据列表主视觉（.page 内 .card.card-table，与工具条区分） */
.page .card.card-table {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.05);
}
.page .card.card-toolbar + .card.card-table,
.page .card.card-toolbar + .card.pickup-list-card {
  margin-top: 0.2rem;
}
.page .card.card-table .orders-table-wrap,
.page .card.card-table .pickup-table-wrap {
  border-radius: 0 0 12px 12px;
}
.page .card.card-table .table thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #1e293b;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-bottom: 2px solid #cbd5e1;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}
.page .card.card-table .table thead th:first-child {
  border-top-left-radius: 12px;
}
.page .card.card-table .table thead th:last-child {
  border-top-right-radius: 12px;
  background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
}
.page .card.card-table .table tbody tr {
  transition: background-color 0.12s ease;
  border-bottom: 1px solid #f1f5f9;
}
.page .card.card-table .table tbody tr:hover {
  background: rgba(224, 242, 254, 0.65);
}
.page .card.card-table .table tbody td {
  font-size: 0.875rem;
}

/* 订单列表：列内主副文案（仅订单表 DOM 类名） */
#page-orders .orders-customer-main,
#page-orders .orders-vehicle-main,
#page-orders .orders-amount-main,
#page-orders .orders-time-main,
#page-orders .orders-type-main {
  font-size: 0.9375rem;
  font-weight: 600;
}
#page-orders .orders-customer-sub,
#page-orders .orders-vehicle-sub,
#page-orders .orders-amount-sub,
#page-orders .orders-time-sub,
#page-orders .orders-type-sub {
  font-size: 0.8rem;
}
#page-orders .orders-order-car-series {
  font-size: 1.05rem;
  font-weight: 600;
}

/* 库存管理各列表列较多：横向滚动 */
#page-material-stock .card-table,
#page-parts .card-table,
#page-warehouse-locations .card-table,
#page-inventory-count .card-table,
#page-inventory-hub .card.card-table {
  overflow-x: auto !important;
}

#material-stock-table,
#parts-table {
  width: 100%;
  min-width: clamp(1360px, 82vw, 1520px);
  table-layout: auto;
}

#material-stock-table th,
#material-stock-table td,
#parts-table th,
#parts-table td {
  vertical-align: middle;
  padding: clamp(0.46rem, 0.42vw, 0.56rem) clamp(0.46rem, 0.45vw, 0.62rem);
  white-space: nowrap;
}

#material-stock-table th:nth-child(1), #material-stock-table td:nth-child(1),
#parts-table th:nth-child(1), #parts-table td:nth-child(1) { width: 58px; }
#material-stock-table th:nth-child(2), #material-stock-table td:nth-child(2),
#parts-table th:nth-child(2), #parts-table td:nth-child(2) { width: clamp(176px, 12vw, 220px); max-width: 220px; }
#material-stock-table th:nth-child(3), #material-stock-table td:nth-child(3),
#parts-table th:nth-child(3), #parts-table td:nth-child(3) { width: 112px; }
#material-stock-table th:nth-child(4), #material-stock-table td:nth-child(4),
#parts-table th:nth-child(4), #parts-table td:nth-child(4) { width: 116px; max-width: 116px; overflow: hidden; text-overflow: ellipsis; }
#material-stock-table th:nth-child(5), #material-stock-table td:nth-child(5),
#parts-table th:nth-child(5), #parts-table td:nth-child(5) { width: 76px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; }
#material-stock-table th:nth-child(6), #material-stock-table td:nth-child(6),
#parts-table th:nth-child(6), #parts-table td:nth-child(6) { width: clamp(112px, 7vw, 150px); max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
#material-stock-table th:nth-child(7), #material-stock-table td:nth-child(7),
#parts-table th:nth-child(7), #parts-table td:nth-child(7) { width: clamp(124px, 7.5vw, 160px); max-width: 160px; }
#material-stock-table th:nth-child(8), #material-stock-table td:nth-child(8),
#parts-table th:nth-child(8), #parts-table td:nth-child(8) { width: 68px; }
#material-stock-table th:nth-child(9), #material-stock-table td:nth-child(9),
#parts-table th:nth-child(9), #parts-table td:nth-child(9) { width: 92px; max-width: 92px; }
#material-stock-table th:nth-child(10), #material-stock-table td:nth-child(10),
#parts-table th:nth-child(10), #parts-table td:nth-child(10) { width: 96px; }
#material-stock-table th:nth-child(11), #material-stock-table td:nth-child(11),
#parts-table th:nth-child(11), #parts-table td:nth-child(11) { width: clamp(168px, 11vw, 220px); }
#material-stock-table th:nth-child(12), #material-stock-table td:nth-child(12),
#parts-table th:nth-child(12), #parts-table td:nth-child(12) { width: 68px; text-align: right; }
#material-stock-table th:nth-child(13), #material-stock-table td:nth-child(13),
#parts-table th:nth-child(13), #parts-table td:nth-child(13) { width: 72px; text-align: right; }
#material-stock-table th:nth-child(14), #material-stock-table td:nth-child(14),
#parts-table th:nth-child(14), #parts-table td:nth-child(14) { width: 62px; }
#material-stock-table th:nth-child(15), #material-stock-table td:nth-child(15),
#parts-table th:nth-child(15), #parts-table td:nth-child(15) { width: 72px; text-align: right; }
#material-stock-table th:nth-child(16), #material-stock-table td:nth-child(16),
#parts-table th:nth-child(16), #parts-table td:nth-child(16) { width: 72px; text-align: right; }
#material-stock-table th:nth-child(17), #material-stock-table td:nth-child(17),
#parts-table th:nth-child(17), #parts-table td:nth-child(17) { width: 62px; }
#material-stock-table th:nth-child(18), #material-stock-table td:nth-child(18) { width: clamp(76px, 5vw, 100px); }
#parts-table th:nth-child(18), #parts-table td:nth-child(18) { width: clamp(220px, 13vw, 260px); min-width: 220px; }

#parts-table .parts-biz-select,
#material-stock-table .ms-biz-select,
#parts-table .parts-belong-select,
#material-stock-table .ms-belong-select {
  height: 32px;
  min-width: 0 !important;
  max-width: 100%;
}

#parts-table .parts-biz-select,
#material-stock-table .ms-biz-select { width: 92px; }
#parts-table .parts-belong-select,
#material-stock-table .ms-belong-select { width: 184px; }
.parts-id-cell {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.parts-name {
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  display: block;
}

.material-activity-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1677ff;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.material-activity-link:hover {
  color: #0958d9;
  text-decoration: underline;
}

.parts-name .material-activity-link {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(22, 119, 255, 0.35);
  text-underline-offset: 3px;
}

.parts-code-row,
.parts-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.parts-code-row span,
.parts-meta-row span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.parts-spec-main {
  max-width: 220px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.parts-select-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.parts-select-row + .parts-select-row {
  margin-top: 0.5rem;
}

.parts-select-row > span {
  color: #64748b;
  font-size: 0.82rem;
}

#parts-table .parts-select-row .input,
#parts-table .parts-select-row select.input {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  height: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parts-belong-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  width: 100%;
}

.parts-belong-label {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 0.55rem;
  height: 30px;
  line-height: 30px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid #dbe7f4;
  border-radius: 6px;
  background: #f5f9fd;
  color: #38536f;
  font-size: 0.82rem;
}

.parts-belong-label.is-empty {
  border-style: dashed;
  border-color: #d9dee7;
  background: #fafbfc;
  color: #98a2b3;
}

.parts-belong-edit {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 0.6rem;
  border: 1px solid #cfe0f3;
  border-radius: 6px;
  background: #fff;
  color: #1677d2;
  font: inherit;
  font-size: 0.82rem;
  line-height: 28px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.parts-belong-edit:hover {
  border-color: #1677d2;
  background: #eaf4ff;
  color: #0958d9;
}

body.theme-dark .parts-belong-label {
  border-color: #34465d;
  background: #202b3b;
  color: #c7d7ea;
}

body.theme-dark .parts-belong-label.is-empty {
  border-color: #43536a;
  background: #1a2432;
  color: #8798ad;
}

body.theme-dark .parts-belong-edit {
  border-color: #3b5c7b;
  background: #1c2b3b;
  color: #78b9f2;
}

.parts-stock-cell {
  text-align: center;
}

.parts-number {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.parts-muted {
  color: #64748b;
  font-size: 0.78rem;
}

.parts-price-cell {
  font-variant-numeric: tabular-nums;
}

.parts-price-cell > div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.12rem 0;
}

.parts-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.parts-status-on {
  color: #15803d;
  background: #dcfce7;
}

.parts-status-off {
  color: #991b1b;
  background: #fee2e2;
}

body.theme-dark .parts-name { color: #f8fafc; }
body.theme-dark .parts-code-row,
body.theme-dark .parts-meta-row,
body.theme-dark .parts-muted,
body.theme-dark .parts-select-row > span { color: #94a3b8; }
body.theme-dark .parts-status-on { color: #86efac; background: rgba(22, 101, 52, 0.35); }
body.theme-dark .parts-status-off { color: #fecaca; background: rgba(127, 29, 29, 0.35); }
body.theme-dark .material-activity-link { color: #7cc4ff; }
body.theme-dark .parts-name .material-activity-link { color: #f8fafc; }

.material-activity-modal {
  max-width: min(1180px, calc(100vw - 48px));
}

.material-activity-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.material-activity-stat {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 0.75rem;
  background: rgba(248, 250, 252, 0.82);
}

.material-activity-stat span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}

.material-activity-stat strong {
  color: #0f172a;
  font-size: 1rem;
  word-break: break-word;
}

.material-activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.material-activity-section {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  overflow: hidden;
}

.material-activity-section h3 {
  margin: 0;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.04);
}

.material-activity-section > div {
  overflow-x: auto;
}

.material-activity-section .table {
  margin: 0;
  min-width: 720px;
}

.material-activity-empty {
  margin: 0;
  padding: 1rem;
  color: #64748b;
}

body.theme-dark .material-activity-stat,
body.theme-dark .material-activity-section {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.58);
}

body.theme-dark .material-activity-stat strong { color: #f8fafc; }
body.theme-dark .material-activity-section h3 { background: rgba(148, 163, 184, 0.08); }

#parts-table td.table-op-cell,
#parts-table td:last-child {
  white-space: nowrap;
}

#parts-table td.table-op-cell .table-op-btns,
#parts-table td:last-child .table-op-btns {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  align-items: center;
  width: auto;
  max-width: none;
}

#parts-table td.table-op-cell .table-op-btns .btn,
#parts-table td.table-op-cell .table-op-btns .btn-sm,
#parts-table td:last-child .table-op-btns .btn,
#parts-table td:last-child .table-op-btns .btn-sm {
  width: auto;
  min-width: 42px;
  padding-left: 0.34rem;
  padding-right: 0.34rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 用户列表 openid：桌面仅显示缩写，窄屏展示完整（见 users-page 媒体查询） */
.users-openid-full { display: none; }

/* 数据概览：分组布局 */
.stats-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.stats-group {
  flex: 1;
  min-width: 280px;
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}
.stats-group-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e8e8e8;
}
.stats-dimension-tabs {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
}
.page-header .stats-dimension-tabs {
  margin-bottom: 1rem;
}
.stats-dimension-tab {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.stats-dimension-tab:hover {
  border-color: #1890ff;
  color: #1890ff;
}
.stats-dimension-tab.active {
  border-color: #1890ff;
  background: #e6f7ff;
  color: #1890ff;
  font-weight: 500;
}
.stats-group-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.stats-group-cards--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
}
@media (max-width: 420px) {
  .stats-group-cards--grid { grid-template-columns: 1fr; }
}
.stats-group-finance {
  padding: 1.5rem 1.75rem;
}
.stats-group-finance .stat-card {
  min-width: 0;
  padding: 0.75rem 0;
}
/* 财务区布局：实收独占一行居中，其余三列第二行 */
.stats-group-cards--finance {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stats-group-finance .stat-card--featured-row {
  width: 100%;
  text-align: center;
  padding-left: 1rem;
  padding-right: 1rem;
}
.stats-group-finance-row2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.25rem;
}
@media (max-width: 520px) {
  .stats-group-finance-row2 { grid-template-columns: 1fr; }
}
.stats-group-finance .stat-card--compact {
  padding: 0.5rem 0;
}
.stats-group-finance .stat-card--compact .stat-label {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}
.stats-group-finance .stat-card--compact .stat-value {
  font-size: 1.25rem;
}
/* 实收卡片：财务区主指标，视觉突出 */
.stats-group-finance .stat-card--featured {
  position: relative;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(82, 196, 26, 0.12) 0%, rgba(82, 196, 26, 0.04) 100%);
  border: 1px solid rgba(82, 196, 26, 0.35);
  border-left-width: 4px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(82, 196, 26, 0.12);
}
.stats-group-finance .stat-card--featured .stat-card-featured-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #389e0d;
  letter-spacing: 0.02em;
}
.stats-group-finance .stat-card--featured .stat-card-featured-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #389e0d;
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
}
/* 财务数据各项数值颜色区分 */
.stats-group-finance .stat-value--revenue-before { color: #1890ff; }
.stats-group-finance .stat-value--revenue-after { color: #52c41a; }
.stats-group-finance .stat-value--discount-amount { color: #fa8c16; }
.stats-group-finance .stat-value--discount-percent { color: #722ed1; }
.dashboard-stat-group--points {
  padding: 1.5rem 1.75rem;
}
.dashboard-stat-group--points .stat-card { min-width: 0; padding: 0.75rem 0; }
.dashboard-stat-group--points .stat-value--points { color: #07C160; font-weight: 600; }
body.theme-dark .dashboard-stat-group--points .stat-value--points { color: #95de64; }
.stat-card {
  min-width: 120px;
  padding: 0.5rem 0;
}
.stat-label {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.35rem;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}
.stat-value-amount {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ========== 数据概览页（frontend-design） ========== */
.dashboard-page {
  --dash-bg: linear-gradient(180deg, #f6f8fc 0%, #eef1f8 100%);
  --dash-card-bg: #fff;
  --dash-card-border: rgba(0,0,0,0.06);
  --dash-accent-ops: #1890ff;
  --dash-accent-finance: #52c41a;
  --dash-title-color: #0d1421;
  --dash-desc-color: #5a6c85;
  --dash-label-color: #64748b;
  --dash-dimension-bg: #fff;
  --dash-dimension-border: #e2e8f0;
  --dash-dimension-active-bg: #eff6ff;
  --dash-dimension-active-border: #1890ff;
  --dash-dimension-active-color: #1890ff;
  --dash-chart-title-color: #334155;
  --dash-shadow: 0 2px 12px rgba(0,0,0,0.06);
  --dash-shadow-hover: 0 8px 24px rgba(0,0,0,0.08);
  background: var(--dash-bg);
  min-height: 60vh;
}
.dashboard-wrap {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  width: 100%;
  box-sizing: border-box;
}
.dashboard-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.dashboard-hero-text { flex: 1; min-width: 200px; }
.dashboard-title {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dash-title-color);
  line-height: 1.25;
}
.dashboard-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dash-desc-color);
  line-height: 1.5;
}
.dashboard-dimension {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.dashboard-dimension-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dash-label-color);
  letter-spacing: 0.02em;
}
.dashboard-dimension-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dashboard-dimension-custom .dashboard-date-label {
  font-size: 0.8rem;
  color: var(--dash-label-color);
  margin: 0;
}
.dashboard-date-input {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid var(--dash-dimension-border, #e0e6ed);
  border-radius: 6px;
  background: var(--dash-dimension-bg, #fff);
  color: var(--dash-label-color, #333);
  cursor: pointer;
  min-width: 10rem;
}
.dashboard-date-input[readonly] {
  cursor: pointer;
}
.dashboard-date-sep {
  font-size: 0.8rem;
  color: var(--dash-label-color);
}
.dashboard-page .stats-dimension-tabs {
  display: inline-flex;
  padding: 0.25rem;
  background: var(--dash-dimension-bg);
  border: 1px solid var(--dash-dimension-border);
  border-radius: 10px;
  gap: 0.25rem;
  margin: 0;
}
.dashboard-page .stats-dimension-tab {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--dash-label-color);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.dashboard-page .stats-dimension-tab:hover {
  background: rgba(24,144,255,0.08);
  color: var(--dash-dimension-active-color);
}
.dashboard-page .stats-dimension-tab.active {
  background: var(--dash-dimension-active-bg);
  color: var(--dash-dimension-active-color);
  border: none;
}
.dashboard-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.dashboard-workbench {
  background: var(--dash-card-bg);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow: var(--dash-shadow);
  border: 1px solid var(--dash-card-border);
  margin-bottom: 1.5rem;
}
.dashboard-workbench-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem 1rem;
  margin-bottom: 0.75rem;
}
.dashboard-workbench-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--dash-title-color);
}
.dashboard-workbench-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--dash-label-color);
}
.dashboard-workbench-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.dashboard-workbench-card {
  border-radius: 10px;
  border: 1px solid rgba(24, 144, 255, 0.15);
  background: rgba(24, 144, 255, 0.04);
  padding: 0.72rem 0.8rem;
}
.dashboard-workbench-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dash-title-color);
  margin-bottom: 0.4rem;
}
.dashboard-workbench-card-metric {
  font-size: 0.82rem;
  color: var(--dash-text-color);
  margin-bottom: 0.25rem;
}
.dashboard-workbench-card-metric span {
  font-weight: 700;
  color: #1677ff;
}
.wb-ack-btn {
  font-size: 0.7rem;
  padding: 1px 6px;
  margin-left: 4px;
  line-height: 1.4;
  vertical-align: middle;
}
.dashboard-workbench-card-actions {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.dashboard-stat-group {
  flex: 1;
  min-width: 280px;
  background: var(--dash-card-bg);
  border-radius: 14px;
  padding: 1.35rem 1.6rem;
  box-shadow: var(--dash-shadow);
  border: 1px solid var(--dash-card-border);
  animation: dashboardReveal 0.45s ease-out backwards;
}
.dashboard-stat-group--ops {
  border-left: 4px solid var(--dash-accent-ops);
  animation-delay: 0.05s;
  padding: 1.5rem 1.75rem;
  min-height: 140px;
}
.dashboard-stat-group--ops .stats-group-cards--ops {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  width: 100%;
}
.dashboard-stat-group--ops .stat-card--ops {
  min-width: 0;
  padding: 1.25rem 1.35rem;
  background: rgba(24, 144, 255, 0.07);
  border-radius: 12px;
  border: 1px solid rgba(24, 144, 255, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100px;
  position: relative;
}
.dashboard-stat-group--ops .stat-card-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(24, 144, 255, 0.2);
  opacity: 0.9;
}
.dashboard-stat-group--ops .stat-card-icon--users::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 14px;
  border: 2px solid var(--dash-accent-ops);
  border-top: none;
  border-radius: 0 0 5px 5px;
}
.dashboard-stat-group--ops .stat-card-icon--orders::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 12px;
  border: 2px solid var(--dash-accent-ops);
  border-radius: 3px;
}
.dashboard-stat-group--ops .stat-card--ops .stat-label {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--dash-label-color);
}
.dashboard-stat-group--ops .stat-card--ops .stat-value {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--dash-title-color);
}
.dashboard-stat-group--finance {
  border-left: 4px solid var(--dash-accent-finance);
  padding: 1.5rem 1.75rem;
  animation-delay: 0.12s;
}
.dashboard-stat-group .stats-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dash-label-color);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--dash-card-border);
}
.dashboard-stat-group .stat-card {
  transition: transform 0.2s;
}
.dashboard-stat-group .stat-card:hover {
  transform: translateY(-1px);
}
.dashboard-stat-group .stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}
.dashboard-chart-card {
  background: var(--dash-card-bg);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--dash-shadow);
  border: 1px solid var(--dash-card-border);
  transition: box-shadow 0.25s, border-color 0.2s;
  animation: dashboardReveal 0.5s ease-out backwards;
  min-width: 0;
  overflow: visible;
}
.dashboard-chart-card:nth-child(1) { animation-delay: 0.08s; }
.dashboard-chart-card:nth-child(2) { animation-delay: 0.15s; }
.dashboard-chart-card:nth-child(3) { animation-delay: 0.22s; }
.dashboard-chart-card:nth-child(4) { animation-delay: 0.28s; }
.dashboard-chart-card:hover {
  box-shadow: var(--dash-shadow-hover);
  border-color: rgba(24,144,255,0.15);
}
.dashboard-chart-title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dash-chart-title-color);
  letter-spacing: 0.01em;
}
.dashboard-chart {
  min-height: 260px;
  width: 100%;
  overflow: visible;
}
.dashboard-chart-fullscreen-hint {
  display: none;
}
@keyframes dashboardReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-rankings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.dashboard-ranking-card {
  background: var(--dash-card-bg);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--dash-shadow);
  border: 1px solid var(--dash-card-border);
  transition: box-shadow 0.25s, border-color 0.2s;
  animation: dashboardReveal 0.5s ease-out backwards;
  animation-delay: 0.35s;
  min-width: 0;
  overflow: hidden;
}
.dashboard-ranking-card--wide {
  grid-column: 1 / -1;
}

.fission-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.25rem;
  align-items: stretch;
}
.fission-analysis-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  align-content: center;
}
.fission-analysis-chart {
  margin: 0;
  min-height: 0;
  padding: 1rem 1.1rem;
}
.fission-analysis-chart .dashboard-chart-title {
  margin-bottom: 0;
}
@media (max-width: 980px) {
  .fission-analysis-layout { grid-template-columns: 1fr; }
  .fission-analysis-chart { min-height: 260px; }
}
@media (max-width: 640px) {
  .fission-analysis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dashboard-ranking-card:hover {
  box-shadow: var(--dash-shadow-hover);
  border-color: rgba(24,144,255,0.15);
}
.dashboard-ranking-title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dash-chart-title-color);
  letter-spacing: 0.01em;
}
.dashboard-ranking-subtitle {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--dash-label-color);
  margin-left: 0.5rem;
}
.dashboard-ranking-list {
  min-height: 60px;
}
.dashboard-ranking-empty {
  text-align: center;
  color: var(--dash-label-color);
  padding: 2rem 0;
  font-size: 0.88rem;
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.ranking-table thead th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid var(--dash-card-border);
  color: var(--dash-label-color);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}
.ranking-table tbody td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--dash-card-border);
  color: var(--dash-title-color);
  vertical-align: middle;
}
.ranking-table tbody tr:last-child td {
  border-bottom: none;
}
.ranking-table tbody tr:hover {
  background: var(--dash-dimension-active-bg);
}
.ranking-th-rank,
.ranking-td-rank { width: 56px; text-align: center; }
.ranking-th-count,
.ranking-td-count { width: 80px; text-align: right; }
.ranking-th-phone,
.ranking-td-phone { width: 120px; }
.ranking-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  background: #f0f4f8;
  color: #64748b;
}
.ranking-medal-gold {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #fff;
  box-shadow: 0 2px 6px rgba(255,183,0,0.35);
}
.ranking-medal-silver {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: #fff;
  box-shadow: 0 2px 6px rgba(168,168,168,0.35);
}
.ranking-medal-bronze {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: #fff;
  box-shadow: 0 2px 6px rgba(184,115,51,0.35);
}
.ranking-td-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 操作记录：摘要与明细 */
.oplog-summary-cell {
  max-width: 360px;
  line-height: 1.5;
}
.oplog-summary-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}
.oplog-summary-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  background: #e8f0fa;
  color: #2c5282;
  border-radius: 4px;
  white-space: nowrap;
}
.oplog-extra-toggle-wrap {
  margin-top: 0.4rem;
}
.oplog-extra-toggle {
  font-size: 0.8rem;
  color: #1890ff;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.oplog-extra-toggle:hover { text-decoration: underline; }
.oplog-extra-wrap {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #f8fbff;
}
.oplog-extra-wrap.oplog-extra-collapsed {
  display: none;
}
.oplog-extra-title {
  font-size: 0.78rem;
  color: #5a6f8f;
  margin-bottom: 0.4rem;
}
.oplog-extra-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.oplog-extra-table th,
.oplog-extra-table td {
  border-bottom: 1px solid #e7edf7;
  padding: 0.3rem 0.4rem;
  font-size: 0.8rem;
  vertical-align: top;
  word-break: break-all;
}
.oplog-extra-table th {
  color: #5b6f8d;
  font-weight: 600;
}
.oplog-extra-table tbody tr:last-child td { border-bottom: none; }
#oplog-table .oplog-time { white-space: nowrap; font-size: 0.875rem; }
#oplog-table .oplog-ip { font-family: ui-monospace, monospace; font-size: 0.85rem; max-width: 120px; word-break: break-all; }
#oplog-table .oplog-summary { min-width: 200px; max-width: 420px; }
#feedback-table .feedback-content { min-width: 160px; max-width: 360px; word-break: break-word; white-space: pre-wrap; }
.oplog-toolbar .toolbar { gap: 0.75rem; }
.card-table .pager { margin: 1rem 1.5rem; padding-top: 1rem; border-top: 1px solid #f0f0f0; }
.text-muted { color: #666; font-size: 0.875rem; margin-bottom: 1rem; line-height: 1.5; }
.page-title { margin: 0 0 0.5rem; font-size: 1.35rem; font-weight: 600; color: #1a1a1a; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 140px; }

/* 系统设置：每行一卡片，说明文字突出 */
.settings-card { }
.settings-desc {
  display: block;
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.65;
  color: #1a1a1a;
  background: #f0f7ff;
  border-left: 4px solid #1890ff;
  border-radius: 0 8px 8px 0;
}
.settings-card .field label { font-weight: 500; color: #333; }
.settings-submit-card .btn { min-height: 44px; padding: 0.65rem 1.5rem; font-size: 1rem; }

/* Pager */
.pager { margin-top: 1rem; display: flex; gap: 0.5rem; align-items: center; }
.pager button { padding: 0.5rem 0.9rem; border: 1px solid #ddd; background: #fff; cursor: pointer; border-radius: 6px; font-size: 0.95rem; min-height: 38px; }
.pager button:disabled { opacity: 0.6; cursor: not-allowed; }
.pager span { font-size: 0.875rem; color: #666; }

/* Breadcrumb */
.breadcrumb { margin-bottom: 1rem; font-size: 0.875rem; }
.breadcrumb a { color: #1890ff; text-decoration: none; }

/* Status badges */
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; }
.badge-muted { background: #f3f4f6; color: #6b7280; }
.badge-fdh-ok { background: #ecfdf3; color: #15803d; }
.badge-fdh-block { background: #fef2f2; color: #b91c1c; }
.badge-fdh-critical { background: #fff1f2; color: #be123c; }
.badge-fdh-warning { background: #fffbeb; color: #b45309; }
.badge-on_sale { background: #f6ffed; color: #52c41a; }
.badge-off_sale { background: #fff2f0; color: #ff4d4f; }
.badge-pending_first { background: #e6f7ff; color: #1890ff; }
.badge-pending_second { background: #fff7e6; color: #fa8c16; }
.badge-pending_confirm { background: #e6f7ff; color: #1890ff; }
.badge-pending_user_store { background: #f5f5f5; color: #666; }
.badge-pending_staff_pickup { background: #e6f7ff; color: #1890ff; }
.badge-picked_by_staff { background: #fff7e6; color: #fa8c16; }
.badge-waiting_customer { background: #fff1f0; color: #cf1322; }
.badge-finished { background: #f6ffed; color: #52c41a; }
.badge-failed { background: #fff2f0; color: #ff4d4f; }
.badge-confirmed, .badge-completed { background: #f6ffed; color: #52c41a; }
.badge-cancelled { background: #f5f5f5; color: #999; }
.badge-success { background: #f6ffed; color: #52c41a; border-radius: 999px; }

.finance-health-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.finance-health-main { min-width: 0; }
.finance-health-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #f3f4f6;
  color: #6b7280;
}
.finance-health-state.ok { background: #ecfdf3; color: #15803d; }
.finance-health-state.danger { background: #fef2f2; color: #b91c1c; }
.finance-health-title {
  margin-top: 0.55rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
}
.finance-health-meta {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.92rem;
}
.finance-health-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.finance-health-kpi {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}
.finance-health-kpi span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
}
.finance-health-kpi strong {
  display: block;
  margin-top: 0.35rem;
  color: #111827;
  font-size: 1.45rem;
}
.finance-health-kpi.ok strong { color: #15803d; }
.finance-health-kpi.danger strong { color: #b91c1c; }
.finance-health-kpi.warning strong { color: #b45309; }
.finance-health-issue-title {
  font-weight: 700;
  color: #1f2937;
}
.finance-health-sample {
  line-height: 1.55;
  color: #475569;
  word-break: break-word;
}
.finance-voucher-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.4rem 0 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.78);
}
.finance-voucher-links .btn small {
  display: block;
  margin-top: 2px;
  color: inherit;
  opacity: 0.72;
  font-size: 0.72rem;
  line-height: 1.2;
}
body.theme-dark .finance-health-hero,
body.theme-dark .finance-health-kpi {
  background: rgba(17, 24, 39, 0.86);
  border-color: rgba(148, 163, 184, 0.26);
}
body.theme-dark .finance-health-title,
body.theme-dark .finance-health-kpi strong,
body.theme-dark .finance-health-issue-title {
  color: #e5e7eb;
}
body.theme-dark .finance-health-meta,
body.theme-dark .finance-health-kpi span,
body.theme-dark .finance-health-sample {
  color: #9ca3af;
}
body.theme-dark .finance-voucher-links {
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(148, 163, 184, 0.24);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(0,0,0,0.45);
  overflow: hidden;
  z-index: 1000;
}
.modal-backdrop { position: absolute; inset: 0; }
.modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 860px);
  max-width: 520px;
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  overflow: hidden;
}
body.theme-dark .modal-card { background: #1e293b; }
/* 零配件弹窗打开时由 JS 打上，禁止背后主页面滚动 */
html.modal-scroll-lock,
html.modal-scroll-lock body {
  overflow: hidden;
}
html:has(body .modal:not(.hidden)),
html:has(body .custom-modal:not(.hidden)),
html:has(body #finance-statement-drawer),
body:has(.modal:not(.hidden)),
body:has(.custom-modal:not(.hidden)),
body:has(#finance-statement-drawer) {
  overflow: hidden;
}
/* 从订单项目弹窗内打开的零件库选择器需盖在上层 */
#modal-pick-part.modal { z-index: 1100; }
.modal-content {
  position: relative;
  z-index: 1;
  width: min(92vw, 480px);
  max-width: 480px;
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.modal-content.modal-content-wide {
  width: min(92vw, 720px);
  max-width: 720px;
  max-height: calc(100dvh - 64px);
}
.pickup-brand-suggest-item:hover { background: #f5f7fa; }
body.theme-dark #pickup-vehicle-brand-suggest,
body.theme-dark #order-pickup-vehicle-brand-suggest {
  background: #111827 !important;
  border-color: #374151 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
body.theme-dark .pickup-brand-suggest-item {
  color: #e5e7eb !important;
  border-bottom-color: #2a3342 !important;
  background: transparent !important;
}
body.theme-dark .pickup-brand-suggest-item:hover {
  background: #1f2937 !important;
}
.modal-content.create-order-modal {
  width: min(96vw, 980px);
  max-width: 980px;
  overflow-x: hidden;
}
.modal-content.create-order-modal .modal-body {
  overflow-x: hidden;
}
.modal-content.create-order-modal .input {
  min-width: 0;
}
.create-order-phone-section {
  margin-bottom: 1rem;
}

.create-order-user-info-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #f0f7ff;
  border: 1px solid #91d5ff;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.create-order-user-info-chip.new-customer {
  background: #f6ffed;
  border-color: #b7eb8f;
}

.create-order-user-info-chip.multi {
  background: #fff7e6;
  border-color: #ffd591;
}

.user-info-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.user-info-name {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
}

.user-info-phone {
  font-size: 13px;
  color: #64748b;
}

.user-info-no {
  font-size: 12px;
  color: #9ca3af;
  font-family: monospace;
}

.user-info-store {
  font-size: 12px;
  color: #64748b;
}

.user-info-vehicle-count {
  font-size: 12px;
  color: #2563eb;
}

.user-info-tag {
  font-size: 12px;
  padding: 2px 8px;
  background: #52c41a;
  color: #fff;
  border-radius: 4px;
  white-space: nowrap;
}

.create-order-vehicle-section {
  border-top: 1px solid #f0f0f0;
  padding-top: 0.5rem;
}

.create-order-tabs {
  display: flex;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 1rem;
  gap: 0;
}
.create-order-tab {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  color: #888;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.create-order-tab:hover {
  color: #333;
}
.create-order-tab.active {
  color: #1890ff;
  border-bottom-color: #1890ff;
}
.create-order-tab-panel {
  margin-bottom: 1.25rem;
}
/* 为用户生成订单：订单类型 — 标签芯片（仅文案参与 flex 排版，checkbox 绝对定位覆盖，避免文字沉底、误显为全选） */
.create-order-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.create-order-type-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 16px;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #434343;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.create-order-type-chip:hover {
  border-color: #91d5ff;
  color: #096dd9;
  background: #f5fbff;
}
.create-order-type-chip-text {
  position: relative;
  z-index: 0;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}
.create-order-type-chip-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
}
.create-order-type-chip:has(.create-order-type-chip-input:checked) {
  background: linear-gradient(145deg, #1890ff 0%, #096dd9 100%);
  border-color: #1890ff;
  color: #fff;
  box-shadow: 0 1px 4px rgba(24, 144, 255, 0.28);
}
.create-order-type-chip:has(.create-order-type-chip-input:checked):hover {
  border-color: #40a9ff;
  color: #fff;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.38);
}
.create-order-type-chip:has(.create-order-type-chip-input:focus-visible) {
  outline: 2px solid #40a9ff;
  outline-offset: 2px;
}
body.theme-dark .create-order-type-chip {
  border-color: #434343;
  background: #1f1f1f;
  color: #d9d9d9;
}
body.theme-dark .create-order-type-chip:hover {
  border-color: #177ddc;
  color: #69c0ff;
  background: #262626;
}
body.theme-dark .create-order-type-chip:has(.create-order-type-chip-input:checked) {
  background: linear-gradient(145deg, #177ddc 0%, #0958d9 100%);
  border-color: #177ddc;
  color: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
body.theme-dark .create-order-type-chip:has(.create-order-type-chip-input:checked):hover {
  border-color: #40a9ff;
  color: #fff;
}
.create-order-shared-section {
  border-top: 1px solid #eee;
  padding-top: 1rem;
}
.create-order-vehicle-info-section {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
}
.create-order-vehicle-info-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #333;
}
.create-order-cascader-wrap {
  position: relative;
}
.create-order-cascader-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
}
.create-order-cascader-dropdown.hidden { display: none; }
.create-order-cascader-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #f0f0f0;
}
.create-order-cascader-item:last-child { border-bottom: none; }
.create-order-cascader-item:hover { background: #e6f7ff; }
.create-order-cascader-item.selected { background: #bae7ff; font-weight: 600; }
.create-order-cascader-empty {
  padding: 12px;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}
body.theme-dark .create-order-vehicle-info-section {
  border-color: #444;
  background: #1e1e1e;
}
body.theme-dark .create-order-vehicle-info-title { color: #ddd; }
body.theme-dark .create-order-cascader-dropdown {
  background: #2a2a2a;
  border-color: #555;
}
body.theme-dark .create-order-cascader-item { border-bottom-color: #333; }
body.theme-dark .create-order-cascader-item:hover { background: #1a3a4a; }
body.theme-dark .create-order-cascader-item.selected { background: #1a4a6a; }
body.theme-dark .create-order-tabs {
  border-bottom-color: #444;
}
body.theme-dark .create-order-tab {
  color: #999;
}
body.theme-dark .create-order-tab:hover {
  color: #ddd;
}
body.theme-dark .create-order-tab.active {
  color: #40a9ff;
  border-bottom-color: #40a9ff;
}
body.theme-dark .create-order-shared-section {
  border-top-color: #444;
}
#create-order-items-table {
  width: 100%;
  table-layout: fixed;
  overflow: visible;
}
#create-order-items-table .create-order-product-cell { overflow: visible; }
#create-order-items-table th:nth-child(1),
#create-order-items-table td:nth-child(1) { width: 48%; }
#create-order-items-table th:nth-child(2),
#create-order-items-table td:nth-child(2) { width: 20%; }
#create-order-items-table th:nth-child(3),
#create-order-items-table td:nth-child(3) { width: 18%; }
#create-order-items-table th:nth-child(4),
#create-order-items-table td:nth-child(4) { width: 14%; }
.create-order-product-select,
.create-order-price,
.create-order-qty {
  width: 100%;
  min-width: 0;
}

/* 产品选择 combobox（替代长 select） */
.create-order-product-cell { position: relative; }
.create-order-product-combobox { position: relative; }
.create-order-product-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.create-order-product-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 100;
}
.create-order-product-dropdown.create-order-dropdown-up {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 2px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.12);
}
.create-order-product-dropdown ul {
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
}
.create-order-product-dropdown-more,
.create-order-dropdown-empty,
.create-order-dropdown-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.create-order-dropdown-item:hover {
  background: #f0f7ff;
  color: #1890ff;
}
.create-order-dropdown-price {
  float: right;
  color: #666;
  font-size: 0.85rem;
}
.create-order-dropdown-item:hover .create-order-dropdown-price { color: #1890ff; }
.create-order-dropdown-more,
.create-order-dropdown-empty {
  color: #999;
  cursor: default;
}
body.theme-dark .create-order-product-dropdown {
  background: #1e2a3a;
  border-color: #354050;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
body.theme-dark .create-order-dropdown-item:hover { background: #253244; color: #58a6ff; }
body.theme-dark .create-order-dropdown-price { color: #8b9cad; }
body.theme-dark .create-order-dropdown-more,
body.theme-dark .create-order-dropdown-empty { color: #6b7b8e; }

.product-picker-modal { max-width: 560px; }
.product-picker-list { max-height: 420px; overflow-y: auto; border: 1px solid #e8e8e8; border-radius: 6px; }
.product-picker-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.product-picker-item:last-child { border-bottom: none; }
.product-picker-item:hover { background: #f0f7ff; color: #1890ff; }
.product-picker-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-picker-item-price { margin-left: 12px; color: #666; font-size: 0.9rem; white-space: nowrap; }
.product-picker-item:hover .product-picker-item-price { color: #1890ff; }
.product-picker-empty { padding: 24px; text-align: center; color: #999; }
.product-picker-hint { padding: 8px 14px; text-align: center; color: #999; font-size: 0.85rem; }
body.theme-dark .product-picker-list { border-color: #354050; }
body.theme-dark .product-picker-item { border-bottom-color: #253244; }
body.theme-dark .product-picker-item:hover { background: #253244; color: #58a6ff; }
body.theme-dark .product-picker-item-price { color: #8b9cad; }
body.theme-dark .product-picker-item:hover .product-picker-item-price { color: #58a6ff; }
body.theme-dark .product-picker-empty,
body.theme-dark .product-picker-hint { color: #6b7b8e; }

.create-order-materials-wrap { margin-top: 6px; }
.create-order-config-materials-btn { font-size: 0.78rem; padding: 2px 8px; }
.create-order-materials-summary { margin-top: 4px; }
.create-order-material-chip { font-size: 0.78rem; color: #555; background: #f5f5f5; border-radius: 4px; padding: 1px 6px; margin: 2px 2px 2px 0; display: inline-block; }
body.theme-dark .create-order-material-chip { color: #b0bec5; background: #253244; }
body.theme-dark .create-order-config-materials-btn { border-color: #4a5568; color: #a0aec0; }

.material-picker-modal { max-width: 560px; }
.material-picker-list { max-height: 420px; overflow-y: auto; border: 1px solid #e8e8e8; border-radius: 6px; }
.material-picker-row { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; }
.material-picker-row:last-child { border-bottom: none; }
.material-picker-row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.material-picker-name { font-weight: 500; }
.material-picker-price { color: #1890ff; font-weight: 600; }
.material-picker-row-bottom { display: flex; align-items: center; gap: 8px; }
.material-picker-brand-select { flex: 1; min-width: 0; font-size: 0.85rem; padding: 4px 8px; height: 32px; }
.material-picker-qty-wrap { display: flex; align-items: center; gap: 4px; }
.material-picker-qty-input { width: 64px; text-align: center; font-size: 0.85rem; padding: 4px 6px; height: 32px; }
.material-picker-unit { font-size: 0.8rem; color: #888; white-space: nowrap; }
.material-picker-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee; }
.material-picker-footer-btns { display: flex; gap: 8px; }
.material-picker-empty { padding: 24px; text-align: center; color: #999; }

body.theme-dark .material-picker-list { border-color: #354050; }
body.theme-dark .material-picker-row { border-bottom-color: #253244; }
body.theme-dark .material-picker-name { color: #dce4ec; }
body.theme-dark .material-picker-price { color: #58a6ff; }
body.theme-dark .material-picker-unit { color: #6b7b8e; }
body.theme-dark .material-picker-footer { border-top-color: #354050; }
body.theme-dark .material-picker-empty { color: #6b7b8e; }

.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-shrink: 0; padding: 1rem 1.5rem; border-bottom: 1px solid #f0f0f0; }
.modal-header h2 { margin: 0; font-size: 1.125rem; }
.modal-close { background: none; border: none; font-size: 1.75rem; cursor: pointer; color: #666; line-height: 1; padding: 0.25rem 0.5rem; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.modal-close:hover { color: #333; background: #f5f5f5; }
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}
.modal-body .table-wrap,
.modal-body .card-table {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.modal-body .field { margin-bottom: 1.25rem; }
.modal-body .field-group {
  display: flex;
  gap: 12px;
}
.modal-body .field-group .field {
  flex: 1;
  margin-bottom: 0;
}
.modal-body .field input,
.modal-body .field select { min-height: 44px; padding: 0.65rem 0.9rem; font-size: 1rem; }
.modal-body .password-input-wrap .btn-password-eye { height: 44px; min-height: 44px; }
.modal-body .btn { margin-top: 0.75rem; }

/* 车型维护-扩展参数区 */
.car-model-extended-section { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #eee; }
.car-model-extended-title { margin: 0 0 1rem; font-size: 1rem; color: #333; }
.car-model-extended-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem 1.5rem;
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.car-model-extended-fields .field { margin-bottom: 0; }
.car-model-extended-fields .field label { font-size: 0.85rem; color: #666; }
.car-model-extended-fields .field input,
.car-model-extended-fields .field select { min-height: 38px; font-size: 0.9rem; }

/* 车型详情弹窗（展开详情） */
.car-model-detail-group { margin-bottom: 1.25rem; }
.car-model-detail-group-title { margin: 0 0 0.5rem; font-size: 0.95rem; font-weight: 600; color: #333; padding-bottom: 0.35rem; border-bottom: 1px solid #e8e8e8; }
.car-model-detail-dl { display: grid; grid-template-columns: 140px 1fr; gap: 0.35rem 1rem; margin: 0; font-size: 0.9rem; }
.car-model-detail-dl dt { margin: 0; color: #666; font-weight: normal; }
.car-model-detail-dl dd { margin: 0; color: #222; }

/* 车型详情弹窗：加宽弹窗与卡片，信息完整展示 */
#modal-car-model-detail .modal-content {
  width: min(99vw, 1680px);
  max-width: min(99vw, 1680px);
  height: 90vh;
  max-height: 90vh;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#modal-car-model-detail .modal-header { flex-shrink: 0; }
#modal-car-model-detail .modal-body {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  column-gap: 1rem;
  row-gap: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  flex: 1;
  padding: 1rem;
  align-content: start;
}
#modal-car-model-detail .car-model-detail-group {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #e8eaef;
  background: #f5f6f8;
  overflow: hidden;
}
#modal-car-model-detail .car-model-detail-group-title {
  flex-shrink: 0;
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  padding-bottom: 0.3rem;
}
#modal-car-model-detail .car-model-detail-dl {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  font-size: 0.85rem;
  gap: 0.25rem 1rem;
}
#modal-car-model-detail .car-model-detail-dl dd {
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}
@media (max-width: 1200px) {
  #modal-car-model-detail .modal-body {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}
@media (max-width: 768px) {
  #modal-car-model-detail .modal-body {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

/* 深色主题下车型详情弹窗文字可读 */
body.theme-dark .car-model-detail-group-title { color: #e2eaf8; border-bottom-color: #2a3546; }
body.theme-dark .car-model-detail-dl dt { color: #a8bddb; }
body.theme-dark .car-model-detail-dl dd { color: #dce6f5; }
body.theme-dark #modal-car-model-detail .modal-header h2 { color: #e8eef7; }
body.theme-dark #modal-car-model-detail .modal-header { border-bottom-color: #2a3546; }
body.theme-dark #modal-car-model-detail .car-model-detail-group {
  background: #1a2234;
  border-color: #2a3546;
}

/* 变更订单项目弹窗 */
.modal-order-items-content { max-width: 1080px; }
.order-items-editor { }
.order-items-current {
  margin-bottom: 1rem;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding-bottom: 0.5rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 0.25rem;
  margin-top: -0.25rem;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}
.order-items-current-title { display: block; margin-bottom: 0.5rem; }
.order-items-summary {
  font-size: 0.9rem;
  color: #1890ff;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: #e6f7ff;
  border-radius: 6px;
  border: 1px solid #91d5ff;
  line-height: 1.4;
}
.order-items-summary.order-items-summary-empty { color: #888; background: #f5f5f5; border-color: #e8e8e8; }
.order-items-toast {
  font-size: 0.9rem;
  color: #0d5c1f;
  background: #e6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.5rem;
  transition: opacity 0.2s;
}
.order-items-toast.hidden { display: none !important; }
.order-items-selected-list {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.order-items-current-hint { font-size: 0.85rem; margin: 0.5rem 0 0; }
.order-items-tree {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: #fafbfc;
}
.order-items-tree-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.order-items-tree-toolbar .input {
  width: 200px;
  padding: 6px 10px;
  font-size: 0.9rem;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
}
.order-items-tree-toolbar .input:focus {
  outline: none;
  border-color: #1890ff;
}
.create-order-items-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.5rem;
}
.create-order-items-toolbar .input {
  width: 200px;
  padding: 6px 10px;
  font-size: 0.9rem;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
}
.create-order-items-toolbar .input:focus {
  outline: none;
  border-color: #1890ff;
}
.order-items-tree-title { flex: 1; font-size: 0.9rem; }
.order-items-recent-products {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed #e0e0e0;
}
.order-items-recent-products.hidden { display: none !important; }
.order-items-recent-title {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 6px;
}
.order-items-recent-products .product-add-btn {
  margin-right: 6px;
  margin-bottom: 6px;
}
.order-items-tree-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  font-size: 0.75rem;
  color: #666;
  line-height: 1;
}
.order-items-tree-toggle:hover { color: #1890ff; }
.order-items-tree-label {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.order-items-tree-label:active { opacity: 0.85; }
.order-items-tree-children.collapsed { display: none; }
.order-items-product-tree { margin-top: 0.25rem; }
.order-items-modal-actions { margin-top: 1rem; display: flex; gap: 0.5rem; justify-content: flex-end; }

.order-item-block {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}
.order-item-block:last-child { margin-bottom: 0; }
.order-item-block .order-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.order-item-name { flex: 1; font-weight: 500; min-width: 0; }
.order-item-block .input-small {
  width: 72px;
  padding: 6px 8px;
  font-size: 0.9rem;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
}
.order-item-block .input-small:focus { outline: none; border-color: #1890ff; }

.order-item-parts-section,
.order-item-workers-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
  font-size: 0.875rem;
}
.order-item-workers-section { border-top: none; padding-top: 4px; margin-top: 4px; }
.order-item-section-label {
  color: #666;
  min-width: 4.5em;
  font-weight: 500;
}
.order-item-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.order-item-empty-tip { color: #999; font-size: 0.85rem; }
.item-part-tag,
.item-worker-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.item-part-name { flex-shrink: 0; }
.order-item-block .input-tiny {
  width: 52px;
  padding: 4px 6px;
  font-size: 0.8rem;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
}
.order-item-block .input-tiny:focus { outline: none; border-color: #1890ff; }
.item-part-tag { background: #f0f0f0; color: #333; border: 1px solid #e0e0e0; }
.item-worker-tag { background: #e6f7ff; color: #0c5394; border: 1px solid #91d5ff; }
.item-part-del,
.item-worker-del {
  margin: 0;
  padding: 0 2px;
  cursor: pointer;
  background: none;
  border: none;
  color: #c00;
  font-size: 1rem;
  line-height: 1;
}
.item-part-del:hover,
.item-worker-del:hover { color: #f00; text-decoration: none; }
.order-item-block .item-add-part { white-space: nowrap; }
.order-item-block .item-worker-select { min-width: 120px; }
.order-item-ratio-wrap {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  font-size: 0.8rem;
  color: #666;
  margin-left: 4px;
}
.order-item-ratio-wrap .input-tiny {
  width: 2.75rem !important;
  min-width: 0 !important;
  max-width: 3rem;
  padding: 3px 4px;
  text-align: center;
}
.order-item-ratio-wrap .order-item-ratio-sep {
  font-size: 0.72rem;
  color: #bbb;
  padding: 0 1px;
}
.order-item-ratio-wrap .order-item-ratio-group {
  display: inline-flex;
  align-items: center;
  gap: 2px 4px;
}
.order-item-block .input-tiny {
  min-width: 0 !important;
}

/* 零配件详情弹窗 - 两列显示，无滚动条 */
#modal-part-detail .modal-content {
  width: min(92vw, 720px);
  max-width: 720px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#modal-part-detail .modal-body {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
#modal-part-detail .part-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 28px;
  overflow: visible;
}
.part-detail-item { display: flex; flex-direction: column; gap: 2px; }
.part-detail-k { font-size: 0.8rem; color: #666; }
.part-detail-v { font-size: 0.9rem; word-break: break-all; }

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.45);
}
#fa-modal {
  inset: auto;
  left: 50%;
  top: 50%;
  width: min(92vw, 520px);
  max-height: calc(100dvh - 48px);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  overflow: hidden;
  z-index: 1000;
}
#fa-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
}
#pay-modal .modal-card {
  max-width: 480px;
}

/* 零配件归属弹窗：一级目录默认折叠（details 无 open） */
.parts-belong-accordion .parts-belong-group { border: 1px solid #e8e8e8; border-radius: 6px; margin-bottom: 0.5rem; overflow: hidden; }
.parts-belong-accordion .parts-belong-summary { cursor: pointer; padding: 0.65rem 0.9rem; background: #f5f6f8; font-weight: 600; list-style: none; }
.parts-belong-accordion .parts-belong-summary::-webkit-details-marker { display: none; }
.parts-belong-accordion .parts-belong-options { padding: 0.35rem 0.5rem 0.75rem; max-height: 260px; overflow-y: auto; border-top: 1px solid #eee; }
.parts-belong-accordion .parts-belong-opt-btn { display: block; width: 100%; text-align: left; padding: 0.45rem 0.65rem; margin: 0.2rem 0; border: 1px solid transparent; background: #fff; border-radius: 4px; cursor: pointer; font-size: 0.9rem; line-height: 1.35; color: #333; }
.parts-belong-accordion .parts-belong-opt-btn:hover { background: #f0f7ff; border-color: #cce5ff; }
.parts-belong-accordion .parts-belong-opt-btn.is-current { background: #e7f3ff; border-color: #99caff; }
body.theme-dark .parts-belong-accordion .parts-belong-group { border-color: #2a3546; }
body.theme-dark .parts-belong-accordion .parts-belong-summary { background: #1e2633; color: #e8eef7; }
body.theme-dark .parts-belong-accordion .parts-belong-options { border-top-color: #2a3546; }
/* 表格列管理 */
.column-manage-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 14px;
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.column-manage-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}
.column-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
@media (max-width: 1100px) {
  .column-manage-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .column-manage-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
body.theme-dark .column-manage-item { color: #d7dfed; }
body.theme-dark .parts-belong-accordion .parts-belong-opt-btn { background: transparent; color: #e8eef7; }
body.theme-dark .parts-belong-accordion .parts-belong-opt-btn:hover { background: #243044; border-color: #3d4f6a; }
body.theme-dark .parts-belong-accordion .parts-belong-opt-btn.is-current { background: #1a3d5c; border-color: #2a6fad; }

/* 新增/编辑零配件弹窗 - 两列网格；正文在弹窗内滚动，避免滚轮穿透背后页面 */
#modal-part .modal-content {
  width: min(92vw, 720px);
  max-width: 720px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#modal-part .modal-header {
  flex-shrink: 0;
}
#modal-part .modal-body {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}
#modal-part #part-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
}
#modal-part #part-form .field { margin-bottom: 0; }
#modal-part #part-form .field-hint { font-size: 0.75rem; color: #999; margin-top: 0.15rem; display: block; }
#modal-part #part-form > .btn { grid-column: 1 / -1; margin-top: 0.5rem; }

/* 订单列表页 - 待接单/待结算印章 */
.orders-page-wrap { position: relative; }
.order-list-stamp {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  pointer-events: none;
  transform: rotate(-12deg);
  opacity: 0.88;
  border: 4px solid #52c41a;
  color: #52c41a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.order-list-stamp.hidden { display: none !important; }

/* 业绩管理页（原技师数据统计） */
.worker-stats-table { margin: 0; }
.worker-stats-detail-row td { padding: 0.75rem 1rem; background: #f8fafc; border-bottom: 1px solid #e8e8e8; vertical-align: top; }
.worker-stats-detail-inner { padding: 0.5rem 0; }
.worker-stats-order-block { margin-bottom: 1rem; }
.worker-stats-order-block:last-child { margin-bottom: 0; }
.worker-stats-order-block > strong { display: inline-block; margin-bottom: 0.35rem; }
.worker-stats-items-table { width: 100%; max-width: 560px; margin: 0.25rem 0 0.5rem; font-size: 0.9rem; }
.worker-stats-items-table th { padding: 0.35rem 0.5rem; }
.worker-stats-items-table td { padding: 0.35rem 0.5rem; }
.worker-stats-order-amount { font-size: 0.85rem; color: #1890ff; margin-top: 0.25rem; }

.worker-stats-main-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.worker-stats-main-tab {
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.worker-stats-main-tab.active {
  border-color: #fa8c16;
  color: #d46b08;
  background: #fff7e6;
  font-weight: 600;
}
.worker-stats-panel { margin-top: 0.25rem; }
.worker-stats-callout {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin: 0.65rem 0;
  font-size: 0.875rem;
  line-height: 1.5;
}
.worker-stats-callout-list { margin: 0.35rem 0 0 1.1rem; padding: 0; }
body.theme-dark .worker-stats-callout {
  background: rgba(250, 173, 20, 0.12);
  border-color: rgba(250, 173, 20, 0.35);
  color: #e6edf3;
}
.worker-stats-sub-tabs,
.worker-stats-role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}
.worker-stats-sub-tab,
.worker-stats-role-tab {
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
}
.worker-stats-sub-tab.active,
.worker-stats-role-tab.active {
  border-color: #fa8c16;
  color: #d46b08;
  background: #fff7e6;
}
body.theme-dark .worker-stats-sub-tab,
body.theme-dark .worker-stats-role-tab {
  background: #151c27;
  border-color: #2a3546;
  color: #e6edf3;
}
body.theme-dark .worker-stats-sub-tab.active,
body.theme-dark .worker-stats-role-tab.active {
  border-color: #fa8c16;
  color: #ffc069;
  background: rgba(250, 140, 22, 0.12);
}
.worker-stats-toolbar { margin-top: 0.35rem; }
.worker-stats-toolbar-inner { flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.worker-stats-store-select { width: 140px; max-width: 100%; }
.worker-stats-lines-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table.worker-stats-lines-table { margin: 0; min-width: 920px; font-size: 0.875rem; }
.table.worker-stats-lines-table th { white-space: nowrap; }
.worker-stats-rules-name-link {
  color: #1890ff;
  cursor: pointer;
  text-decoration: none;
}
.worker-stats-rules-name-link:hover { text-decoration: underline; }
body.theme-dark .worker-stats-rules-name-link { color: #69c0ff; }
.commission-rule-modal-body { max-height: 70vh; overflow: auto; }
.commission-rule-section {
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}
.commission-rule-section-title {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  color: #374151;
}
.commission-rule-ot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.commission-rule-ot-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fafafa;
}
.commission-rule-formula { margin-top: -0.25rem; }
.commission-rule-tier-rows {
  display: grid;
  gap: 0.5rem;
}
.commission-rule-store-rows {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.commission-rule-tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 0.5rem;
  align-items: center;
}
.commission-rule-store-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
}
.commission-sim-result {
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  min-height: 3rem;
}
.commission-rule-tier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.commission-rule-tier-tip { margin-top: 0.5rem; font-size: 0.8rem; }
.commission-rule-submit-row { display: flex; justify-content: flex-end; }
body.theme-dark .commission-rule-section { border-color: #2f3b4b; }
body.theme-dark .commission-rule-section-title { color: #d9e2ec; }
body.theme-dark .commission-rule-ot-row label { border-color: #2f3b4b; background: #0f141d; color: #d9e2ec; }
@media (max-width: 768px) {
  .commission-rule-tier-row {
    grid-template-columns: 1fr;
  }
  .commission-rule-store-row {
    grid-template-columns: 1fr;
  }
}

/* 订单详情页 - 已结算印章水印 */
.order-detail-wrap { position: relative; }
.order-no-row {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
}
.order-no-label {
  font-weight: 500;
  color: #9ca3af;
}
.order-no-value {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
}
.order-no-copy-btn {
  padding: 2px 10px;
  font-size: 12px;
}
.order-stamp {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  pointer-events: none;
  transform: rotate(-12deg);
  opacity: 0.88;
  text-align: center;
  line-height: 1.35;
  padding: 0.35em;
  box-sizing: border-box;
}
.order-stamp-settled {
  border: 4px solid #52c41a;
  color: #52c41a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.order-stamp-inner {
  display: block;
  text-align: center;
  width: 100%;
  line-height: 1.35;
}

/* 订单详情 - 打印用标题（仅打印时显示） */
.order-print-header { display: none; }
.order-print-price-footer { display: none; }

/* 订单详情-明细表零配件价格展示 */
.order-detail-items-table .order-detail-parts-cell { line-height: 1.5; }
.order-detail-lines-card { overflow-x: auto; }
.order-detail-lines-card h3 { margin-bottom: 0.75rem; }
.order-detail-lines-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.order-project-lines-table { min-width: 960px; }
.order-material-lines-table { min-width: 1240px; }
.order-detail-lines-table th,
.order-detail-lines-table td {
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
  vertical-align: middle;
  line-height: 1.35;
}
.order-detail-lines-table th { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
.order-detail-lines-table td { word-break: normal; overflow-wrap: normal; }
.order-project-lines-table th:nth-child(1), .order-project-lines-table td:nth-child(1) { width: 140px; white-space: nowrap; }
.order-project-lines-table th:nth-child(2), .order-project-lines-table td:nth-child(2) { width: 72px; white-space: nowrap; }
.order-project-lines-table th:nth-child(3), .order-project-lines-table td:nth-child(3) { width: 52px; white-space: nowrap; }
.order-project-lines-table th:nth-child(4), .order-project-lines-table td:nth-child(4) { width: 62px; text-align: right; white-space: nowrap; }
.order-project-lines-table th:nth-child(5), .order-project-lines-table td:nth-child(5) { width: 70px; white-space: nowrap; }
.order-project-lines-table th:nth-child(6), .order-project-lines-table td:nth-child(6) { width: 56px; white-space: nowrap; }
.order-project-lines-table th:nth-child(7), .order-project-lines-table td:nth-child(7) { width: 72px; white-space: nowrap; }
.order-project-lines-table th:nth-child(8), .order-project-lines-table td:nth-child(8) { width: 100px; white-space: nowrap; }
.order-project-lines-table th:nth-child(9), .order-project-lines-table td:nth-child(9) { width: 80px; }
.order-project-lines-table th:nth-child(10), .order-project-lines-table td:nth-child(10) { width: auto; min-width: 280px; }
.order-material-lines-table th:nth-child(1), .order-material-lines-table td:nth-child(1) { width: 220px; min-width: 200px; white-space: normal; word-break: break-word; }
.order-material-lines-table th:nth-child(2), .order-material-lines-table td:nth-child(2) { width: 84px; min-width: 80px; white-space: nowrap; }
.order-material-lines-table th:nth-child(3), .order-material-lines-table td:nth-child(3) { width: 96px; min-width: 90px; white-space: normal; }
.order-material-lines-table th:nth-child(4), .order-material-lines-table td:nth-child(4) { width: 76px; min-width: 72px; text-align: right; white-space: nowrap; }
.order-material-lines-table th:nth-child(5), .order-material-lines-table td:nth-child(5) { width: 92px; min-width: 88px; white-space: nowrap; }
.order-material-lines-table th:nth-child(6), .order-material-lines-table td:nth-child(6) { width: 76px; min-width: 72px; white-space: nowrap; }
.order-material-lines-table th:nth-child(7), .order-material-lines-table td:nth-child(7) { width: 92px; min-width: 88px; white-space: nowrap; }
.order-material-lines-table th:nth-child(8), .order-material-lines-table td:nth-child(8) { width: 120px; min-width: 116px; white-space: normal; }
.order-material-lines-table th:nth-child(9), .order-material-lines-table td:nth-child(9) { width: 76px; min-width: 72px; white-space: nowrap; }
.order-material-lines-table th:nth-child(10), .order-material-lines-table td:nth-child(10) { width: 140px; min-width: 120px; white-space: normal; word-break: break-word; }
.order-material-lines-table th:nth-child(11), .order-material-lines-table td:nth-child(11) { width: 180px; min-width: 140px; white-space: normal; word-break: break-word; }
.order-material-lines-table th:nth-child(12), .order-material-lines-table td:nth-child(12) { width: auto; min-width: 108px; }
.order-material-lines-table .order-material-stock-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  line-height: 1.35;
}
.order-detail-lines-table .item-action-cell {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  overflow: visible;
  vertical-align: top;
}
.order-detail-lines-table .item-action-cell .order-line-action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  max-width: 100%;
}
.order-detail-lines-table .item-action-cell .order-line-action-btns .btn,
.order-detail-lines-table .item-action-cell .order-line-action-btns .btn-sm {
  flex-shrink: 0;
  white-space: nowrap;
  margin: 0;
}
.order-material-stock { font-weight: 600; }
.order-material-location-btn { padding: 0 2px; font-size: 12px; color: #2f80ed; background: transparent; border: 0; }
.order-detail-actions-card { margin-top: 0.75rem; }

.order-action-panel {
  padding: 1.1rem 1.25rem;
}
.order-action-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.order-action-panel-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.order-action-panel-head p {
  margin: 0;
  color: #6b7280;
  font-size: 0.88rem;
  line-height: 1.55;
}
.order-action-panel-badge {
  flex: 0 0 auto;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #eef6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: 0.78rem;
  font-weight: 700;
}
.order-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}
.order-action-row--toolbar {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}
.order-action-toolbar-start,
.order-action-toolbar-end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.order-action-toolbar-end {
  margin-left: auto;
  justify-content: flex-end;
}
.order-action-row--toolbar .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.order-action-hint {
  color: #6b7280;
  font-size: 0.84rem;
  line-height: 1.45;
}
.order-manager-assist-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
  padding: 0.95rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(248, 250, 252, 0.96));
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}
.order-manager-assist-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}
.order-manager-assist-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #1d4ed8;
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
}
.order-manager-assist-copy {
  min-width: 0;
}
.order-manager-assist-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.order-manager-assist-title-row strong {
  font-size: 1rem;
  color: #111827;
}
.order-manager-assist-title-row span {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.74rem;
  font-weight: 700;
}
.order-manager-assist-copy p {
  margin: 0;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.5;
}
.order-manager-assist-copy ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}
.order-manager-assist-copy li {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(147, 197, 253, 0.7);
  color: #1f2937;
  font-size: 0.78rem;
  line-height: 1.2;
}
.order-manager-assist-btn {
  flex: 0 0 auto;
  min-width: 132px;
  height: 38px;
  border-radius: 8px;
  font-weight: 700;
}
.order-settlement-tools {
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid #e5e7eb;
}

.custom-modal.custom-modal--order-uncomplete {
  width: min(720px, calc(100vw - 32px));
  max-width: 720px;
}
.custom-modal--order-uncomplete .custom-modal-inner { padding: 22px 24px 18px; }
.custom-modal--order-uncomplete .custom-modal-message { margin-bottom: 18px; max-height: 66vh; }
.order-uncomplete-dialog { color: #1f2937; white-space: normal; }
.order-uncomplete-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 14px;
}
.order-uncomplete-head strong { font-size: 1.15rem; }
.order-uncomplete-head span {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
}
.order-uncomplete-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.order-uncomplete-type {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}
.order-uncomplete-type:has(input:checked) {
  border-color: #1890ff;
  background: #eef6ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.12);
}
.order-uncomplete-type input { margin-top: 4px; }
.order-uncomplete-type b { display: block; margin-bottom: 4px; font-size: 0.95rem; }
.order-uncomplete-type em { display: block; color: #64748b; font-style: normal; font-size: 0.78rem; line-height: 1.35; }
.order-uncomplete-items-wrap {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.order-uncomplete-field-title { margin-bottom: 8px; font-weight: 700; font-size: 0.88rem; }
.order-uncomplete-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.order-uncomplete-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}
.order-uncomplete-item input { margin-top: 4px; }
.order-uncomplete-item-name { display: block; font-weight: 700; font-size: 0.86rem; line-height: 1.35; }
.order-uncomplete-item-meta { display: block; margin-top: 2px; color: #64748b; font-size: 0.75rem; line-height: 1.3; }
.order-uncomplete-empty { color: #94a3b8; font-size: 0.86rem; }
.order-uncomplete-reason { display: block; margin-top: 4px; }
.order-uncomplete-reason span { display: block; margin-bottom: 6px; font-weight: 700; font-size: 0.88rem; }
.order-uncomplete-reason textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  font: inherit;
  line-height: 1.45;
  outline: none;
}
.order-uncomplete-reason textarea:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.12);
}
.order-uncomplete-error { min-height: 18px; margin-top: 8px; color: #dc2626; font-size: 0.82rem; }
.order-detail-lines-table input.order-line-input.input { width: 42px; min-width: 0; max-width: 42px; height: 30px; padding: 3px 5px; border-radius: 6px; text-align: right; }
.order-detail-lines-table input.order-line-discount-input.input { width: 50px; max-width: 50px; }
.order-detail-lines-table input.order-project-work-fee-input.input,
.order-detail-lines-table input.order-material-fee-input.input,
.order-detail-lines-table input.order-line-final-input.input { width: 58px; max-width: 58px; }
.order-detail-lines-table .item-action-cell .btn { margin: 2px 3px 2px 0; }
body.theme-dark .order-detail-lines-table .order-line-input { background: rgba(15, 23, 42, 0.68); color: #e5edf7; border-color: rgba(148, 163, 184, 0.35); }
.order-parts-subtotal {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1890ff;
}

/* 接车记录卡片 */
.order-pickup-card h3 {
  margin-bottom: 0.75rem;
}
.order-pickup-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.75rem;
}
.order-pickup-photo-item {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f5f5f5;
}
.order-pickup-photo-item {
  position: relative;
}
.order-pickup-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.order-pickup-photo-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: 2px solid #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  z-index: 2;
}
.order-pickup-photo-delete:hover {
  background: #dc2626;
}
.order-pickup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.order-pickup-complete-wrap {
  margin-top: 8px;
}
.order-pickup-complete-wrap .btn {
  min-width: 120px;
}
.order-pickup-upload-status {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #6b7280;
}
.order-pickup-upload-text {
  display: block;
}
.order-pickup-upload-progress {
  margin-top: 4px;
  width: 220px;
  max-width: 100%;
  height: 4px;
  border-radius: 9999px;
  background: #e5e7eb;
  overflow: hidden;
}
.order-pickup-upload-progress-inner {
  width: 0;
  height: 100%;
  background: #2563eb;
  transition: width 0.2s ease-out;
}
.order-pickup-hint {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.5rem;
}
.order-detail-back-btn {
  margin-right: 8px;
  vertical-align: middle;
}
.order-pickup-no-photos {
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}
.order-pickup-meta-readonly {
  background: #f8f9fa;
  color: #333;
}
body.theme-dark .order-pickup-meta-readonly {
  background: #1f2937;
  color: #e5e7eb;
}
body.theme-dark .order-pickup-upload-status {
  color: #9ca3af;
}
body.theme-dark .order-pickup-upload-progress {
  background: #1f2933;
}
body.theme-dark .order-pickup-upload-progress-inner {
  background: #3b82f6;
}
body.theme-dark .order-pickup-photo-item {
  border-color: #2a3546;
  background: #111827;
}
body.theme-dark .order-pickup-photo-delete {
  border-color: #1f2937;
  background: #b91c1c;
}
body.theme-dark .order-pickup-photo-delete:hover {
  background: #991b1b;
}

.order-media-card h3,
.order-quality-card h3 {
  margin-bottom: 0.75rem;
}
.order-media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0.5rem 0 0.75rem;
}
.order-media-photo-item {
  position: relative;
  width: 108px;
  min-height: 108px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f7fb;
}
.order-media-photo-item img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  display: block;
}
.order-media-photo-remark {
  display: block;
  padding: 4px 6px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.3;
  background: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-quality-photo-summary {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #2563eb;
  font-weight: 600;
}
.quality-record-block {
  padding: 10px 12px;
  margin: 0 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}
.quality-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
}
.quality-record-head strong {
  color: #16a34a;
}
.quality-record-head span,
.quality-record-meta,
.quality-record-note {
  color: #6b7280;
  font-size: 0.85rem;
}
.quality-item-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.quality-item-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 0.86rem;
  color: #374151;
}
.quality-item-row strong {
  color: #16a34a;
}
.quality-item-row em {
  color: #6b7280;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.theme-dark .order-media-photo-item {
  border-color: #2a3546;
  background: #111827;
}
body.theme-dark .order-media-photo-remark {
  color: #cbd5e1;
  background: rgba(15,23,42,0.92);
}
body.theme-dark .order-quality-photo-summary {
  color: #7dd3fc;
}
body.theme-dark .quality-record-block {
  border-color: rgba(148,163,184,0.2);
  background: rgba(15,23,42,0.48);
}
body.theme-dark .quality-record-head span,
body.theme-dark .quality-record-meta,
body.theme-dark .quality-record-note,
body.theme-dark .quality-item-row,
body.theme-dark .quality-item-row em {
  color: #cbd5e1;
}
@media (max-width: 640px) {
  .order-media-photo-item {
    width: calc(33.333% - 7px);
    min-width: 88px;
  }
  .order-media-photo-item img {
    height: 92px;
  }
  .quality-item-row {
    grid-template-columns: 1fr auto;
  }
  .quality-item-row em {
    grid-column: 1 / -1;
    white-space: normal;
  }
}


/* 零件库选择弹窗（添加零配件） */
.modal-pick-part-content { max-width: 820px; }
.part-picker-search-wrap { margin-bottom: 0.75rem; display: flex; gap: 8px; }
.part-picker-category { width: 220px; min-width: 180px; }
.part-picker-search { width: 100%; padding: 0.5rem 0.75rem; }
.part-picker-toast {
  font-size: 0.9rem;
  color: #0d5c1f;
  background: #e6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.5rem;
}
.part-picker-toast.hidden { display: none !important; }
.material-picker-toolbar { margin-bottom: 0.75rem; display: flex; gap: 8px; }
.material-picker-category { width: 240px; min-width: 180px; }
.part-picker-list {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafbfc;
}
.part-picker-head {
  display: grid;
  grid-template-columns: 1fr 90px 80px 100px 72px;
  gap: 12px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  border-bottom: 1px solid #e8e8e8;
  background: #f5f5f5;
}
.part-picker-row {
  display: grid;
  grid-template-columns: 1fr 90px 80px 100px 72px;
  gap: 12px;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.part-picker-row:last-child { border-bottom: none; }
.part-picker-row:hover { background: #f5f7fa; }
.part-picker-name { min-width: 0; font-size: 0.9rem; word-break: break-word; }
.part-picker-brand { font-size: 0.85rem; color: #555; white-space: nowrap; }
.part-picker-stock { font-size: 0.85rem; color: #666; white-space: nowrap; }
.part-picker-meta { font-size: 0.85rem; color: #666; white-space: nowrap; }
.part-picker-add { flex-shrink: 0; }
.part-picker-actions { margin-top: 1rem; }

/* Detail sections */
.detail-section { margin-bottom: 1.5rem; }
.detail-section h4 { margin: 0 0 0.5rem; font-size: 0.875rem; color: #666; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.5rem; }
.detail-item { font-size: 0.875rem; }
.settlement-flow {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: #fafafa;
}
.settlement-flow-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333;
}
/* 次数卡列表：勿用内联浅色底，否则深色主题下会出现「纯白块」割裂 */
.settlement-benefit-cards-wrap {
  max-height: 168px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.55);
}
.settlement-benefit-detail {
  display: block;
  font-size: 0.82rem;
  color: #555;
  white-space: pre-wrap;
  max-width: 100%;
}
.settlement-used-card-detail {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
}
.points-tip-card {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.points-calc-card {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #e6f7ff;
  border: 1px solid #91d5ff;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #0050b3;
}
.points-calc-card.is-offset {
  background: #fff7e6;
  border-color: #ffbb96;
  color: #8d4d00;
}
.points-offset-note {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 8px;
}
.offset-final-card {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #ff4d4f;
  background: linear-gradient(135deg, #fff2f0 0%, #ffccc7 100%);
}
.offset-final-title {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 6px;
}
.offset-final-formula {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.5;
}
.offset-final-value {
  font-size: 2rem;
  font-weight: 700;
  color: #cf1322;
  letter-spacing: 2px;
}
.offset-final-hint {
  font-size: 0.85rem;
  color: #999;
  margin-top: 6px;
}
.order-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 8px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
}
.user-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.profile-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fc 100%);
  border: 1px solid #e7edf6;
}
.profile-k {
  font-size: 12px;
  color: #7a8699;
  margin-bottom: 6px;
}
.profile-v {
  font-size: 14px;
  line-height: 1.45;
  color: #1f2d3d;
  font-weight: 600;
  word-break: break-all;
}
.profile-v.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  font-weight: 500;
}
.profile-v.with-copy {
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-v.with-copy .profile-copy-text {
  flex: 1;
  min-width: 0;
  word-break: break-all;
}
.profile-copy-btn {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #f5f7fb;
  font-size: 11px;
  color: #3f5170;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.profile-copy-btn:hover {
  background: #e6f0ff;
  border-color: #adc6ff;
  color: #1d39c4;
}
.referrer-card {
  border-left: 4px solid #73a8ff;
}
.referrer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.referrer-title h3 {
  margin: 0;
}
.referrer-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: #eaf2ff;
  color: #3a6ecb;
}
.referrer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.referrer-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7faff 0%, #f2f6ff 100%);
  border: 1px solid #dbe7ff;
}

/* ICP备案信息 */
.icp-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1f33;
  border-top: 1px solid #264a73;
  z-index: 50;
}
.icp-footer a {
  color: #dbe9ff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.icp-footer a:hover { color: #8dc8ff; }

/* 深色模式 */
body.theme-dark {
  background: #0f141d;
  color: #d6dde8;
}
body.theme-dark .header-user-center { color: rgba(255,255,255,0.82); }
body.theme-dark .nav-dropdown-menu {
  background: #151c27;
  border: 1px solid #2a3546;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
body.theme-dark .nav-dropdown-item {
  color: #d6dde8;
}
body.theme-dark .nav-dropdown-item:hover {
  background: #1a2638;
  color: #1890ff;
}
body.theme-dark .nav-dropdown-item.active {
  background: #1f2f45;
  color: #1890ff;
}
body.theme-dark .btn-theme {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
}
body.theme-dark .main {
  background: transparent;
}
body.theme-dark .card,
body.theme-dark .table,
body.theme-dark .modal-content,
body.theme-dark .status-tab,
body.theme-dark .product-category-tabs .category-tab,
body.theme-dark .btn-outline-secondary {
  background: #151c27;
  border-color: #2a3546;
  color: #dce6f5;
}
body.theme-dark .modal-footer {
  background: #151c27;
  border-top-color: #2a3546;
}
body.theme-dark #fa-modal {
  background: #151c27;
  color: #dce6f5;
}
body.theme-dark .status-tab.active,
body.theme-dark .product-category-tabs .category-tab.active {
  background: #1890ff !important;
  color: #fff !important;
  border-color: #1890ff !important;
}
body.theme-dark .status-tab.active:hover,
body.theme-dark .status-tab.active:focus,
body.theme-dark .product-category-tabs .category-tab.active:hover,
body.theme-dark .product-category-tabs .category-tab.active:focus {
  background: #40a9ff !important;
  color: #fff !important;
  border-color: #40a9ff !important;
}
body.theme-dark .order-change-items-btn {
  background: #1890ff !important;
  color: #fff !important;
  border-color: #1890ff !important;
  box-shadow: 0 1px 6px rgba(24, 144, 255, 0.5);
}
body.theme-dark .order-change-items-btn:hover {
  background: #40a9ff !important;
  border-color: #40a9ff !important;
  box-shadow: 0 2px 10px rgba(24, 144, 255, 0.6);
}
/* 深色主题：内联编辑面板 */
body.theme-dark .btn-danger { background: #d9363e; border-color: #d9363e; color: #fff; }
body.theme-dark .btn-danger:hover { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
body.theme-dark .btn-outline-danger { background: transparent; color: #ff7875; border-color: #ff7875; }
body.theme-dark .btn-outline-danger:hover { background: #ff4d4f; color: #fff; }
body.theme-dark .item-edit-panel-inner { background: #1b2432; border-color: #2a3546; }
body.theme-dark .item-edit-materials-header { border-bottom-color: #2a3546; color: #6b7c9a; }
body.theme-dark .item-edit-material-row .input { background: #0d1117; border-color: #2a3546; color: #e5e7eb; }
body.theme-dark .item-edit-material-row select.input { background: #0d1117; border-color: #2a3546; color: #e5e7eb; }
body.theme-dark .item-edit-mat-sub { color: #a8bddb; }
body.theme-dark .material-del-btn { color: #ff7875; }
body.theme-dark .material-del-btn:hover { background: rgba(255,77,79,0.15); border-color: #ff7875; }
body.theme-dark .table th {
  background: #1b2432;
  color: #dce6f5;
  border-bottom-color: #2a3546;
}
body.theme-dark .table td {
  border-bottom-color: #222d3d;
}
body.theme-dark .worker-stats-detail-row td {
  background: #151c27;
  border-bottom-color: #2a3546;
}
body.theme-dark .worker-stats-order-amount { color: #69c0ff; }
body.theme-dark .order-parts-subtotal {
  color: #7ec8f0;
}
body.theme-dark .order-stamp-settled {
  border-color: #73d13d;
  color: #73d13d;
  background: rgba(22, 28, 39, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
body.theme-dark .order-list-stamp {
  border-color: #73d13d;
  color: #73d13d;
  background: rgba(22, 28, 39, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
body.theme-dark .orders-search-group {
  background: #151c27;
  border-color: #2a3546;
}
body.theme-dark .orders-search-group:focus-within {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
body.theme-dark .orders-search-input { color: #dce6f5; }
body.theme-dark .orders-search-input::placeholder { color: #6b7c9a; }
body.theme-dark .inventory-union-tab {
  background: #121a26;
  border-color: #2a3546;
  color: #c2d0e4;
}
body.theme-dark .inventory-union-tab:hover {
  border-color: #3d8bfd;
  color: #8ec5ff;
}
body.theme-dark .inventory-union-tab.active {
  background: rgba(24, 144, 255, 0.18);
  border-color: #3d8bfd;
  color: #9fd0ff;
}
body.theme-dark .orders-list-summary { border-top-color: #2a3546; }
body.theme-dark .orders-summary-chip {
  background: #1a2332;
  color: #c7d3e3;
}
body.theme-dark .orders-filter-label { color: #8899b0; }
body.theme-dark .orders-actions-divider { background: #2a3546; }
body.theme-dark .orders-filters { border-top-color: #2a3546; }
body.theme-dark #orders-table .table-op-cell,
body.theme-dark #orders-table th:last-child {
  background: #0f1722;
  box-shadow: -8px 0 12px -12px rgba(148, 163, 184, 0.4);
}
body.theme-dark #orders-table thead th:last-child {
  background: linear-gradient(180deg, #1e2838 0%, #151c27 100%);
}
body.theme-dark .orders-customer-main,
body.theme-dark .orders-vehicle-main,
body.theme-dark .orders-amount-main,
body.theme-dark .orders-time-main,
body.theme-dark .orders-type-main {
  color: #e2e8f0;
}
body.theme-dark .orders-customer-sub,
body.theme-dark .orders-vehicle-sub,
body.theme-dark .orders-amount-sub,
body.theme-dark .orders-time-sub,
body.theme-dark .orders-type-sub {
  color: #93a4bc;
}
body.theme-dark .orders-order-car-series {
  color: #e2e8f0;
}
body.theme-dark .orders-order-car-model {
  color: #93a4bc;
}
body.theme-dark .page .card.card-table {
  background: #151c27;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.45),
    0 2px 12px rgba(0, 0, 0, 0.35);
}
body.theme-dark .page .card.card-table .table thead th {
  background: linear-gradient(180deg, #1a2332 0%, #151c27 100%);
  color: #e2e8f0;
  border-bottom-color: #334155;
}
body.theme-dark .page .card.card-table .table thead th:last-child {
  background: linear-gradient(180deg, #1e2838 0%, #151c27 100%);
}
body.theme-dark .page .card.card-table .table tbody tr {
  border-bottom-color: #2a3546;
}
body.theme-dark .page .card.card-table .table tbody tr:hover {
  background: rgba(59, 130, 246, 0.14);
}
body.theme-dark .table tbody tr {
  background: #151c27;
  transition: background-color .16s ease;
}
body.theme-dark .table tbody tr:nth-child(even) {
  background: #131a24;
}
body.theme-dark .table tbody tr:hover {
  background: #1b2636;
}
body.theme-dark .oplog-summary-tag {
  background: #1e2d42;
  color: #8ab4f8;
}
body.theme-dark .oplog-extra-toggle {
  color: #5a9cf5;
}
body.theme-dark .oplog-extra-wrap {
  background: #1a2433;
  border-color: #2f415a;
}
body.theme-dark .oplog-extra-title,
body.theme-dark .oplog-extra-table th {
  color: #a8bddb;
}
body.theme-dark .oplog-extra-table td {
  border-bottom-color: #2d3f58;
  color: #d7e3f5;
}
body.theme-dark .oplog-extra-table th {
  border-bottom-color: #375070;
}
body.theme-dark .badge {
  border: 1px solid transparent;
  font-weight: 500;
}
body.theme-dark .badge-on_sale {
  background: #203126;
  color: #b9e0c6;
  border-color: #335542;
}
body.theme-dark .badge-off_sale {
  background: #35242a;
  color: #e5bcc6;
  border-color: #6a3f4b;
}
body.theme-dark .badge-pending_first {
  background: #1f2b3a;
  color: #bed4ef;
  border-color: #3a556f;
}
body.theme-dark .badge-pending_second {
  background: #342c1f;
  color: #e6d1aa;
  border-color: #6b5834;
}
body.theme-dark .badge-pending_user_store {
  background: #2a2f38;
  color: #bdc6d3;
  border-color: #455061;
}
body.theme-dark .badge-pending_staff_pickup {
  background: #1f2b3a;
  color: #bed4ef;
  border-color: #3a556f;
}
body.theme-dark .badge-picked_by_staff {
  background: #342c1f;
  color: #e6d1aa;
  border-color: #6b5834;
}
body.theme-dark .badge-waiting_customer {
  background: #3a2025;
  color: #ffb3b3;
  border-color: #6c3b43;
}
body.theme-dark .badge-finished {
  background: #1f3028;
  color: #c0dfcb;
  border-color: #395846;
}
body.theme-dark .badge-failed {
  background: #3a2020;
  color: #ffb4ad;
  border-color: #6b3d3d;
}
body.theme-dark .badge-confirmed,
body.theme-dark .badge-completed {
  background: #1f3028;
  color: #c0dfcb;
  border-color: #395846;
}
body.theme-dark .badge-cancelled {
  background: #2a2f38;
  color: #bdc6d3;
  border-color: #455061;
}
body.theme-dark .badge-success {
  background: #1f3028;
  color: #c0dfcb;
  border-color: #395846;
}
body.theme-dark .profile-item {
  background: linear-gradient(180deg, #1a2433 0%, #151f2d 100%);
  border-color: #2c3c54;
}
body.theme-dark .profile-copy-btn {
  background: #1b2535;
  border-color: #2b3a4f;
  color: #c3d4f5;
}
body.theme-dark .profile-copy-btn:hover {
  background: #223247;
  border-color: #3c5a92;
  color: #e6f0ff;
}
body.theme-dark .referrer-card {
  border-left-color: #4d6d9d;
}
body.theme-dark .referrer-icon {
  background: #233247;
  color: #9dc1ff;
}
body.theme-dark .referrer-item {
  background: linear-gradient(180deg, #1a2638 0%, #162131 100%);
  border-color: #2a3f5e;
}
body.theme-dark .profile-k {
  color: #92a4bd;
}
body.theme-dark .profile-v {
  color: #dce7f7;
}
body.theme-dark .text-muted {
  color: #b8c9e0;
}
body.theme-dark .page-title {
  color: #e8eef7;
}
body.theme-dark .card h3 {
  color: #e2eaf8;
}
body.theme-dark .stats-group {
  background: #151c27;
  border-color: #2a3546;
}
body.theme-dark .stats-group-title {
  color: #a8bddb;
  border-bottom-color: #2a3546;
}
body.theme-dark .stats-dimension-tab {
  background: #1b2432;
  border-color: #3a4a5e;
  color: #a8bddb;
}
body.theme-dark .stats-dimension-tab:hover {
  border-color: #1890ff;
  color: #7eb8fa;
}
body.theme-dark .stats-dimension-tab.active {
  border-color: #1890ff;
  background: #1a2d42;
  color: #7eb8fa;
}
body.theme-dark .stat-label {
  color: #8899b0;
}
body.theme-dark .stat-value {
  color: #dce6f5;
}
body.theme-dark .stats-group-finance .stat-value--revenue-before { color: #69c0ff; }
body.theme-dark .stats-group-finance .stat-value--revenue-after { color: #95de64; }
body.theme-dark .stats-group-finance .stat-value--discount-amount { color: #ffc069; }
body.theme-dark .stats-group-finance .stat-value--discount-percent { color: #b37feb; }
body.theme-dark .stats-group-finance .stat-card--featured {
  background: linear-gradient(135deg, rgba(150, 222, 100, 0.18) 0%, rgba(150, 222, 100, 0.06) 100%);
  border-color: rgba(150, 222, 100, 0.4);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(150, 222, 100, 0.1);
}
body.theme-dark .stats-group-finance .stat-card--featured .stat-card-featured-label,
body.theme-dark .stats-group-finance .stat-card--featured .stat-card-featured-value { color: #95de64; }
/* 数据概览页深色 */
body.theme-dark .dashboard-page { background: transparent; }
body.theme-dark .dashboard-wrap { }
body.theme-dark .dashboard-hero { border-bottom-color: #2a3546; }
body.theme-dark .dashboard-title { color: #e8eef7; }
body.theme-dark .dashboard-desc { color: #8899b0; }
body.theme-dark .dashboard-dimension-label { color: #8899b0; }
body.theme-dark .dashboard-date-input { background: #1b2432; border-color: #2a3546; color: #e8eef7; }
body.theme-dark .dashboard-date-sep { color: #8899b0; }
body.theme-dark .flatpickr-calendar { background: #1b2432; border-color: #2a3546; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
body.theme-dark .flatpickr-calendar .flatpickr-months { background: #1b2432; }
body.theme-dark .flatpickr-calendar .flatpickr-current-month, body.theme-dark .flatpickr-calendar .numInputWrapper span.arrowUp:after,
body.theme-dark .flatpickr-calendar .numInputWrapper span.arrowDown:after { color: #e8eef7; }
body.theme-dark .flatpickr-calendar .flatpickr-weekdays { background: #1b2432; }
body.theme-dark .flatpickr-calendar span.flatpickr-weekday { color: #8899b0; }
body.theme-dark .flatpickr-calendar .flatpickr-days { background: #1b2432; }
body.theme-dark .flatpickr-calendar .flatpickr-day { color: #e8eef7; }
body.theme-dark .flatpickr-calendar .flatpickr-day:hover { background: #2a3546; border-color: #2a3546; }
body.theme-dark .flatpickr-calendar .flatpickr-day.selected { background: #1890ff; border-color: #1890ff; }
body.theme-dark .flatpickr-calendar .flatpickr-day.flatpickr-disabled { color: #4a5568; }
body.theme-dark .dashboard-page .stats-dimension-tabs { background: #1b2432; border-color: #2a3546; }
body.theme-dark .dashboard-page .stats-dimension-tab { background: transparent; color: #8899b0; }
body.theme-dark .dashboard-page .stats-dimension-tab:hover { background: rgba(24,144,255,0.15); color: #7eb8fa; }
body.theme-dark .dashboard-page .stats-dimension-tab.active { background: #1a2d42; color: #7eb8fa; }
body.theme-dark .dashboard-stat-group { background: #151c27; border-color: #2a3546; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
body.theme-dark .dashboard-stat-group .stats-group-title { color: #a8bddb; border-bottom-color: #2a3546; }
body.theme-dark .dashboard-stat-group--ops .stat-card--ops {
  background: rgba(24, 144, 255, 0.12);
  border-color: rgba(24, 144, 255, 0.22);
}
body.theme-dark .dashboard-stat-group--ops .stat-card--ops .stat-value { color: #e8eef7; }
body.theme-dark .dashboard-stat-group--ops .stat-card--ops .stat-label { color: #8899b0; }
body.theme-dark .dashboard-stat-group--ops .stat-card-icon { background: rgba(24, 144, 255, 0.25); }
body.theme-dark .dashboard-stat-group--ops .stat-card-icon--users::after,
body.theme-dark .dashboard-stat-group--ops .stat-card-icon--orders::after { border-color: #5a9ef5; }
body.theme-dark .dashboard-chart-card { background: #151c27; border-color: #2a3546; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
body.theme-dark .dashboard-chart-card:hover { border-color: rgba(24,144,255,0.25); }
body.theme-dark .dashboard-chart-title { color: #e2eaf8; }
body.theme-dark .dashboard-workbench {
  background: #151c27;
  border-color: #2a3546;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
body.theme-dark .dashboard-workbench-card {
  background: rgba(24, 144, 255, 0.12);
  border-color: rgba(24, 144, 255, 0.2);
}
body.theme-dark .dashboard-workbench-card-title { color: #e2eaf8; }
body.theme-dark .dashboard-workbench-card-metric { color: #b8c7dc; }
body.theme-dark .dashboard-workbench-card-metric span { color: #7eb8fa; }
body.theme-dark .dashboard-ranking-card { background: #151c27; border-color: #2a3546; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
body.theme-dark .dashboard-ranking-card:hover { border-color: rgba(24,144,255,0.25); }
body.theme-dark .ranking-table thead th { color: #8899b0; border-bottom-color: #2a3546; }
body.theme-dark .ranking-table tbody td { color: #e2eaf8; border-bottom-color: #2a3546; }
body.theme-dark .ranking-table tbody tr:hover { background: rgba(24,144,255,0.1); }
body.theme-dark .ranking-badge { background: #1e2a3a; color: #8899b0; }
body.theme-dark .ranking-medal-gold { background: linear-gradient(135deg, #ffd700, #ffb800); color: #1a1a1a; }
body.theme-dark .ranking-medal-silver { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); color: #1a1a1a; }
body.theme-dark .ranking-medal-bronze { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }
body.theme-dark .field label,
body.theme-dark .settings-card .field label,
body.theme-dark .field label.small,
body.theme-dark .detail-section h4,
body.theme-dark .pager span,
body.theme-dark .breadcrumb {
  color: #c5d6eb;
}
body.theme-dark .settings-desc {
  color: #dce8f7;
  background: #1a2638;
  border-left-color: #5a8fd4;
}
body.theme-dark .settlement-flow {
  background: #161f2d;
  border-color: #2d3f58;
}
body.theme-dark .settlement-flow-title {
  color: #e2eaf8;
}
body.theme-dark .settlement-benefit-cards-wrap {
  background: rgba(0, 0, 0, 0.2);
  border-color: #2a3546;
}
body.theme-dark .settlement-benefit-detail,
body.theme-dark .settlement-used-card-detail {
  color: #9ca3af;
}
body.theme-dark .points-tip-card {
  background: #1f2f2a;
  border-color: #2f6a52;
  color: #caead9;
}
body.theme-dark .points-calc-card {
  background: #1b2e3f;
  border-color: #2f5d84;
  color: #b9dcff;
}
body.theme-dark .points-calc-card.is-offset {
  background: #33291d;
  border-color: #7a5a2f;
  color: #ffd9a3;
}

body.theme-dark .order-action-panel-head p,
body.theme-dark .order-action-hint {
  color: #9fb1c7;
}
body.theme-dark .order-action-panel-badge {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.42);
}
body.theme-dark .order-manager-assist-card {
  background: linear-gradient(135deg, rgba(20, 38, 66, 0.92), rgba(18, 28, 43, 0.92));
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
body.theme-dark .order-manager-assist-title-row strong {
  color: #e6edf7;
}
body.theme-dark .order-manager-assist-title-row span {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}
body.theme-dark .order-manager-assist-copy p {
  color: #b8c6d8;
}
body.theme-dark .order-manager-assist-copy li {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(96, 165, 250, 0.28);
  color: #dbe7f5;
}
body.theme-dark .order-settlement-tools {
  background: rgba(15, 23, 42, 0.46);
  border-color: rgba(148, 163, 184, 0.24);
}
body.theme-dark .custom-modal--order-uncomplete .order-uncomplete-dialog { color: #e5edf7; }
body.theme-dark .order-uncomplete-head span { background: rgba(37, 99, 235, 0.18); color: #93c5fd; }
body.theme-dark .order-uncomplete-type,
body.theme-dark .order-uncomplete-items-wrap,
body.theme-dark .order-uncomplete-item {
  background: rgba(15, 23, 42, 0.52);
  border-color: rgba(148, 163, 184, 0.22);
}
body.theme-dark .order-uncomplete-type:has(input:checked) {
  background: rgba(24, 144, 255, 0.18);
  border-color: #4096ff;
}
body.theme-dark .order-uncomplete-type em,
body.theme-dark .order-uncomplete-item-meta { color: #9fb0c5; }
body.theme-dark .order-uncomplete-reason textarea {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e5edf7;
}
@media (max-width: 760px) {
  .order-action-panel-head,
  .order-manager-assist-card {
    align-items: stretch;
    flex-direction: column;
  }
  .order-manager-assist-btn {
    width: 100%;
  }
}
body.theme-dark .points-offset-note {
  background: #2b2617;
  border-color: #6c5b2b;
  color: #e6d7b3;
}
body.theme-dark .offset-final-card {
  border-color: #a94d54;
  background: linear-gradient(135deg, #2f2123 0%, #4a2b2f 100%);
}
body.theme-dark .offset-final-title,
body.theme-dark .offset-final-formula,
body.theme-dark .offset-final-hint {
  color: #b8c7dc;
}
body.theme-dark .offset-final-value {
  color: #ff9ca9;
}
body.theme-dark .input,
body.theme-dark .field input,
body.theme-dark .field select,
body.theme-dark .table select {
  background: #101722;
  color: #dce6f5;
  border-color: #334359;
}
body.theme-dark .input::placeholder,
body.theme-dark .field input::placeholder {
  color: #8195b0;
}
body.theme-dark .btn-password-eye {
  background: #1b2a3d;
  border-color: #334359;
  color: #dce6f5;
}
body.theme-dark .btn-password-eye:hover {
  background: #253447;
}
body.theme-dark .btn-password-eye.visible {
  background: #1a3a5c;
  border-color: #1890ff;
}
body.theme-dark .create-order-user-selected {
  background: #1b2a3d;
  border-color: #32537a;
  color: #dce7f7;
}
body.theme-dark .create-order-user-list .user-row:hover {
  background: #1c2737;
}
body.theme-dark .order-item-row {
  background: #1a2433;
  border-color: #2f3f56;
}
/* 变更订单项目弹窗 - 深色 */
body.theme-dark .order-items-current {
  background: #151c27;
  border-bottom-color: #2a3546;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
body.theme-dark .order-items-summary {
  color: #7ec8f0;
  background: #1a2f3d;
  border-color: #2a5068;
}
body.theme-dark .order-items-summary.order-items-summary-empty { color: #6b7c9a; background: #1b2432; border-color: #2a3546; }
body.theme-dark .order-items-toast {
  color: #a8e6b0;
  background: #1a3020;
  border-color: #2d5a3a;
}
body.theme-dark .order-items-selected-list {
  background: #151c27;
  border-color: #2a3546;
}
body.theme-dark .order-items-tree {
  background: #151c27;
  border-color: #2a3546;
}
body.theme-dark .order-item-block {
  background: #1a2433;
  border-color: #2f3f56;
}
body.theme-dark .order-item-block .input-small {
  background: #151c27;
  border-color: #2a3546;
  color: #dce6f5;
}
body.theme-dark .order-item-block .input-small::placeholder { color: #6b7c9a; }
body.theme-dark .order-item-parts-section,
body.theme-dark .order-item-workers-section { border-top-color: #2a3546; }
body.theme-dark .order-item-section-label { color: #a8bddb; }
body.theme-dark .order-item-empty-tip { color: #6b7c9a; }
body.theme-dark .item-part-tag {
  background: #1e2d42;
  color: #b8d4f0;
  border-color: #2f4a6a;
}
body.theme-dark .order-item-block .input-tiny {
  background: #151c27;
  border-color: #2a3546;
  color: #dce6f5;
}
body.theme-dark .part-picker-toast {
  color: #a8e6b0;
  background: #1a3020;
  border-color: #2d5a3a;
}
body.theme-dark .item-worker-tag {
  background: #1a2f3d;
  color: #7ec8f0;
  border-color: #2a5068;
}
body.theme-dark .item-edit-workers-section { border-top-color: #2a3546; }
body.theme-dark .item-edit-workers-section .item-edit-section-label { color: #a0aec0; }
body.theme-dark .item-edit-worker-tag { background: #1a2f3d; color: #7ec8f0; border-color: #2a5068; }
body.theme-dark .item-edit-worker-tag .worker-del { color: #e06c6c; }
body.theme-dark .item-edit-worker-tag .worker-del:hover { color: #ff4d4f; }
body.theme-dark .item-edit-worker-select { background: #151c27; border-color: #2a3546; color: #dce6f5; }
body.theme-dark .points-edit-block { background: #151c27; border-color: #2a3546; }
body.theme-dark .points-edit-block--primary { background: linear-gradient(180deg, #1a2838 0%, #151f2e 100%); border-color: #2a4a6a; }
body.theme-dark .points-edit-block--secondary { background: #141a24; border-color: #2a3546; }
body.theme-dark .points-edit-block__title { color: #9ec5f0; }
body.theme-dark .points-edit-block--secondary .points-edit-block__title { color: #b0bec5; }
body.theme-dark .points-edit-block__hint,
body.theme-dark .points-edit-field__name,
body.theme-dark .points-edit-field__unit,
body.theme-dark .item-edit-part-points-header { color: #7a8a9a; }
body.theme-dark .points-edit-row__label,
body.theme-dark .item-edit-part-points-name { color: #c5d0dc; }
body.theme-dark .points-edit-or { color: #4a5568; }
body.theme-dark .item-edit-part-points-list { border-top-color: #2a3546; }
body.theme-dark .item-edit-ratios-section .points-edit-input,
body.theme-dark .item-edit-ratios-section .points-edit-input.input { background: #0f141c; border-color: #2a3546; color: #dce6f5; }
body.theme-dark .item-edit-ratios-section .item-edit-section-label { color: #a0aec0; }
body.theme-dark .item-edit-ratio-label { color: #b0bec5; }
body.theme-dark .item-edit-ratio-label .input { background: #151c27; border-color: #2a3546; color: #dce6f5; }
body.theme-dark .order-item-block .item-add-part {
  color: #40a9ff;
  border-color: #1890ff;
}
body.theme-dark .order-item-block .item-add-part:hover {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}
body.theme-dark .order-item-block .item-worker-select {
  background: #151c27;
  border-color: #2a3546;
  color: #dce6f5;
}
body.theme-dark .part-picker-list {
  background: #151c27;
  border-color: #2a3546;
}
body.theme-dark .part-picker-row {
  border-bottom-color: #2a3546;
}
body.theme-dark .part-picker-row:hover { background: #1a2433; }
body.theme-dark .part-picker-meta { color: #a8bddb; }
body.theme-dark .part-picker-search {
  background: #151c27;
  border-color: #2a3546;
  color: #dce6f5;
}
body.theme-dark .part-picker-search::placeholder { color: #6b7c9a; }
body.theme-dark .modal-close {
  color: #a9bbd3;
}
body.theme-dark .modal-close:hover {
  color: #e5efff;
  background: #1f2a3a;
}
body.theme-dark .banner-upload-area,
body.theme-dark .agreement-upload-area {
  background: #151c27;
  border-color: #2a3546;
}
body.theme-dark .banner-upload-area:hover,
body.theme-dark .agreement-upload-area:hover {
  border-color: #1890ff;
  background: #1a2638;
}
body.theme-dark .banner-upload-area.drag-over,
body.theme-dark .agreement-upload-area.drag-over {
  border-color: #1890ff;
  background: #1f2f45;
}
body.theme-dark .banner-slot-dropzone-inner.drag-over {
  background: #1f2f45;
  outline-color: #1890ff;
}
body.theme-dark .icp-footer {
  background: #060b12;
  border-top-color: #1f2b3a;
}
body.theme-dark .icp-footer a {
  color: #a7c7f7;
}

/* 1024px 及以下：侧栏抽屉覆盖在内容之上，关闭时主内容占满全屏无左侧留白 */
@media (max-width: 1024px) {
  /* 管理端「竖版数据卡片」统一视觉变量（列表型表格转卡片时共用） */
  html {
    --admin-mcard-gap: 0.75rem;
    --admin-mcard-radius: 12px;
    --admin-mcard-pad-block: 0.75rem;
    --admin-mcard-pad-inline: 0.875rem;
    --admin-mcard-border: 1px solid #e5e7eb;
    --admin-mcard-bg: #ffffff;
    --admin-mcard-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --admin-mfield-row-py: 0.5rem;
    --admin-mlabel-w: 5.75em;
    --admin-mfield-label-gap: 0.65rem;
    --admin-mcell-pl: calc(var(--admin-mlabel-w) + var(--admin-mfield-label-gap));
    --admin-mfield-sep: 1px dashed #e8ecf0;
    --admin-mlabel-color: #64748b;
    --admin-mfield-fs: 0.9rem;
    --admin-mlabel-fs: 0.8125rem;
    --admin-mlabel-fw: 600;
    --admin-mbtn-gap: 0.5rem;
    --admin-mbtn-min-h: 44px;
  }
  body.theme-dark {
    --admin-mcard-border: 1px solid #374151;
    --admin-mcard-bg: #1f2937;
    --admin-mcard-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    --admin-mfield-sep: 1px dashed #3d4a5f;
    --admin-mlabel-color: #9ca3af;
  }
  html, body { width: 100%; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  #main-screen {
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  /* 侧栏关闭时：完全移出视口，不占布局空间；打开时：覆盖在网页上层 */
  #main-screen > .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 85vw);
    min-width: 0;
    flex: 0 0 0 !important;
    z-index: 1001;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
    pointer-events: none;
    padding-top: env(safe-area-inset-top);
  }
  #main-screen > .sidebar.drawer-open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }
  /* 移动端主内容区置于侧栏下层，确保抽屉打开时侧栏在上层 */
  #main-screen > .main-area {
    position: relative;
    z-index: 0;
  }
  /* 主内容区占满全屏宽度，无左侧留白 */
  .main-area {
    width: 100% !important;
    min-width: 0;
    flex: 1 1 100% !important;
    flex-basis: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden;
  }
  .nav-hamburger { display: flex; }
  .sidebar-brand .nav-drawer-close { display: flex; align-items: center; justify-content: center; }
  .nav-drawer-backdrop { display: none; }
  .nav-drawer-backdrop.show { display: block; }
  .top-bar { padding: 0.5rem 0.75rem; }
  .main {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .page > .page-header,
  .page > .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }
  .card,
  .card-toolbar,
  .page-header {
    max-width: 100%;
    box-sizing: border-box;
  }
  .page-header .text-muted,
  .page-header p,
  .settings-desc {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 100%;
  }
  .toolbar .input,
  .toolbar select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .toolbar .btn {
    min-height: 44px;
    flex-shrink: 0;
  }
  /* 订单页工具栏：移动端纵向排列、不横向溢出 */
  .orders-page-toolbar { padding: 0.75rem 0.85rem; max-width: 100%; }
  .orders-toolbar-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
  }
  .orders-search-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .orders-search-input {
    flex: 1;
    min-width: 0;
    width: 0;
  }
  .orders-actions-group {
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
  }
  .orders-actions-divider { display: none; }
  .orders-filters-header { margin-top: 0.75rem; }
  .orders-filters-header .orders-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  .orders-filter-label { width: auto; }
  /* 业务中心 + 基础数据：页面容器满宽、工具栏纵排、表格可滑且不撑爆视口 */
  #page-categories,
  #page-products,
  #page-car-models,
  #page-maintain-materials,
  #page-maintain-small-package,
  #page-maintain-package-config,
  #page-wash-config,
  #page-parts,
  #page-workers,
  #page-settlement-companies,
  #page-vin-demo {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  #page-categories .card,
  #page-products .card,
  #page-car-models .card,
  #page-maintain-materials .card,
  #page-maintain-small-package .card,
  #page-maintain-package-config .card,
  #page-wash-config .card,
  #page-parts .card,
  #page-workers .card,
  #page-settlement-companies .card,
  #page-vin-demo .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }
  #page-categories .card-toolbar .toolbar,
  #page-products .card-toolbar .toolbar,
  #page-car-models .card-toolbar .toolbar,
  #page-maintain-materials .card-toolbar .toolbar,
  #page-maintain-small-package .card-toolbar .toolbar,
  #page-maintain-package-config .card-toolbar .toolbar,
  #page-wash-config .card-toolbar .toolbar,
  #page-parts .card-toolbar .toolbar,
  #page-workers .card-toolbar .toolbar,
  #page-settlement-companies .card-toolbar .toolbar,
  #page-vin-demo .card-toolbar .toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
  }
  #page-categories .card-toolbar .toolbar .input,
  #page-products .card-toolbar .toolbar .input,
  #page-car-models .card-toolbar .toolbar .input,
  #page-maintain-materials .card-toolbar .toolbar .input,
  #page-maintain-small-package .card-toolbar .toolbar .input,
  #page-maintain-package-config .card-toolbar .toolbar .input,
  #page-wash-config .card-toolbar .toolbar .input,
  #page-parts .card-toolbar .toolbar .input,
  #page-workers .card-toolbar .toolbar .input,
  #page-settlement-companies .card-toolbar .toolbar .input,
  #page-vin-demo .card-toolbar .toolbar .input,
  #page-categories .card-toolbar .toolbar select,
  #page-products .card-toolbar .toolbar select,
  #page-car-models .card-toolbar .toolbar select,
  #page-maintain-materials .card-toolbar .toolbar select,
  #page-maintain-small-package .card-toolbar .toolbar select,
  #page-maintain-package-config .card-toolbar .toolbar select,
  #page-wash-config .card-toolbar .toolbar select,
  #page-parts .card-toolbar .toolbar select,
  #page-workers .card-toolbar .toolbar select,
  #page-settlement-companies .card-toolbar .toolbar select,
  #page-categories .card-toolbar .toolbar .btn,
  #page-products .card-toolbar .toolbar .btn,
  #page-car-models .card-toolbar .toolbar .btn,
  #page-maintain-materials .card-toolbar .toolbar .btn,
  #page-maintain-small-package .card-toolbar .toolbar .btn,
  #page-maintain-package-config .card-toolbar .toolbar .btn,
  #page-wash-config .card-toolbar .toolbar .btn,
  #page-parts .card-toolbar .toolbar .btn,
  #page-workers .card-toolbar .toolbar .btn,
  #page-settlement-companies .card-toolbar .toolbar .btn,
  #page-vin-demo .card-toolbar .toolbar .btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 44px;
  }
  #page-categories .card-table,
  #page-products .card-table,
  #page-car-models .card-table,
  #page-maintain-materials .card-table,
  #page-maintain-small-package .card-table,
  #page-maintain-package-config .card-table,
  #page-wash-config .card-table,
  #page-parts .card-table,
  #page-workers .card-table,
  #page-settlement-companies .card-table,
  #page-vin-demo .card-table {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  #page-categories .card-table .table,
  #page-products .card-table .table,
  #page-car-models .card-table .table,
  #page-maintain-materials .card-table .table,
  #page-maintain-small-package .card-table .table,
  #page-maintain-package-config .card-table .table,
  #page-wash-config .card-table .table,
  #page-parts .card-table .table,
  #page-workers .card-table .table,
  #page-settlement-companies .card-table .table,
  #page-vin-demo .card-table .table {
    min-width: 560px;
  }
  /* 复杂配置页：多列转单列，消除横向挤压 */
  #page-maintain-materials .page-three-columns,
  #page-maintain-small-package .page-three-columns,
  #page-maintain-package-config .page-two-columns {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
  }
  #page-maintain-materials .page-col,
  #page-maintain-small-package .page-col,
  #page-maintain-package-config .page-col {
    width: 100%;
    min-width: 0;
  }
  #page-maintain-small-package #maintain-sp-table {
    min-width: 640px;
  }
  .table-scroll-hint {
    display: block;
    margin: 0;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    color: #8c9aa8;
    background: #f5f7fa;
  }
  body.theme-dark .table-scroll-hint {
    color: #6b7c9a;
    background: #1a2332;
  }
  /* 表格区：可横向滑动，右侧渐变提示有更多列 */
  .card-table {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: inset -10px 0 12px -10px rgba(0,0,0,0.08);
  }
  body.theme-dark .card-table {
    box-shadow: inset -10px 0 12px -10px rgba(0,0,0,0.25);
  }
  .card-table .table {
    min-width: 640px;
  }
  .card-table .table th,
  .card-table .table td {
    padding: 0.75rem 0.6rem;
    font-size: 0.9rem;
  }
  /* 操作列最小宽度，避免按钮被压扁或裁切 */
  .card-table .table th:last-child,
  .card-table .table td:last-child {
    min-width: 7.5em;
    white-space: nowrap;
  }
  .card-table .table td:last-child .btn,
  .card-table .table td:last-child .btn-sm,
  .card-table .table td:last-child a.btn {
    white-space: nowrap;
    display: inline-block;
    min-width: 0;
  }

  .toolbar-title {
    font-size: 14px;
    color: #4b5563;
  }
  .card-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .card-table .pager {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
  }
  .pager button {
    min-height: 44px;
  }
  .icp-footer {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .icp-footer a {
    font-size: 0.8rem;
    text-align: center;
    padding: 0 0.5rem;
  }
  /* 移动端：消息提醒弹窗固定定位、置于网页最上层、背景完全不透明 */
  .notification-dropdown {
    position: fixed !important;
    z-index: 9999 !important;
    top: calc(56px + env(safe-area-inset-top, 0px));
    right: max(0.75rem, env(safe-area-inset-right));
    left: auto;
    margin-top: 0;
    max-width: min(360px, calc(100vw - 1.5rem));
    background: #fff !important;
    opacity: 1 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    border: 1px solid #e8e8e8;
    isolation: isolate;
  }
  body.theme-dark .notification-dropdown {
    background: #151c27 !important;
    border-color: #2a3546;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  }

  /* —— P0：≤1024 顶栏当前页标题 + 触摸热区 —— */
  .top-bar {
    position: sticky;
    top: 0;
    z-index: 25;
  }
  .top-bar-route-title {
    display: block;
  }
  .top-bar-brand {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.8;
    letter-spacing: 0.06em;
  }
  .top-bar .btn-theme,
  .top-bar .btn-outline {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 0.65rem;
  }
  .top-bar .btn-icon.btn-notification-bell,
  .top-bar .btn-notification-sound {
    min-width: 44px;
    min-height: 44px;
  }

  /* —— P0：订单列表 —— 卡片列表 —— */
  .orders-toolbar-top {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
  }
  .orders-toolbar-top .orders-search-group {
    flex: 1 1 100%;
    min-width: 0;
  }
  .orders-actions-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
  }
  .orders-actions-group > .btn {
    width: 100%;
    margin: 0;
  }
  .orders-actions-group > .btn:first-child {
    grid-column: 1 / -1;
  }
  .orders-table-wrap {
    display: none;
  }
  .table-scroll-hint--desktop {
    display: none !important;
  }
  .orders-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem 1rem 1rem;
  }
  .orders-mobile-card {
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    background: #fff;
    overflow: hidden;
  }
  body.theme-dark .orders-mobile-card {
    background: #151c27;
    border-color: #2a3546;
  }
  .orders-mobile-card-main {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  .orders-mobile-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
  }
  .orders-mobile-card-no {
    font-weight: 600;
    color: #1890ff;
    font-size: 0.95rem;
  }
  body.theme-dark .orders-mobile-card-no {
    color: #69c0ff;
  }
  .orders-mobile-card-meta {
    font-size: 0.9rem;
    color: #333;
  }
  body.theme-dark .orders-mobile-card-meta {
    color: #dce6f5;
  }
  .orders-mobile-card-sub,
  .orders-mobile-card-time {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
  }
  body.theme-dark .orders-mobile-card-sub,
  body.theme-dark .orders-mobile-card-time {
    color: #8b9cb3;
  }
  .orders-mobile-card-foot {
    padding: 0.5rem 1rem 0.75rem;
    border-top: 1px solid #f0f0f0;
    text-align: right;
  }
  body.theme-dark .orders-mobile-card-foot {
    border-top-color: #2a3546;
  }
  .orders-list-card .pager,
  .pickup-list-card .pager {
    padding: 0 1rem 1rem;
  }

  /* —— P0：存取钥匙 —— 状态横滑 + 卡片列表 —— */
  .pickup-toolbar-row-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
  }
  .pickup-toolbar-row-search .pickup-search-input {
    flex: 1 1 140px;
    min-width: 0;
    max-width: none !important;
  }
  .pickup-status-tabs-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    width: 100%;
    min-width: 0;
  }
  .pickup-status-label {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #64748b;
  }
  body.theme-dark .pickup-status-label {
    color: #8b9cb3;
  }
  .pickup-status-tabs-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .pickup-status-tabs-scroll .status-tab {
    flex-shrink: 0;
    min-height: 44px;
  }
  .pickup-table-wrap {
    display: none;
  }
  .pickup-orders-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem 1rem 1rem;
  }
  .pickup-mobile-card .pickup-mobile-card-main {
    cursor: pointer;
  }
  .pickup-mobile-cabinet {
    font-size: 0.78rem;
    margin-top: 0.35rem;
  }
  .pickup-mobile-card-actions {
    padding: 0 1rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
  }
  body.theme-dark .pickup-mobile-card-actions {
    border-top-color: #2a3546;
  }
  .pickup-mobile-card-actions .btn {
    min-height: 44px;
  }

  /* —— P0：订单详情 —— 明细表卡片化 + 信息区纵向 —— */
  .order-detail-page .order-detail-body-scroll {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .order-detail-wrap .detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  .order-detail-wrap .detail-item {
    width: 100% !important;
    display: block;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f0f0f0;
  }
  .order-detail-wrap .detail-item.order-no-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  body.theme-dark .order-detail-wrap .detail-item {
    border-bottom-color: #2a3546;
  }
  .order-detail-items-table thead {
    display: none;
  }
  .order-detail-items-table tbody tr {
    display: block;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
    background: #fafafa;
  }
  body.theme-dark .order-detail-items-table tbody tr {
    border-color: #2a3546;
    background: #121922;
  }
  .order-detail-items-table tbody td {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0 !important;
    border: none !important;
    text-align: right !important;
    font-size: 0.88rem;
  }
  .order-detail-items-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
    text-align: left;
  }
  body.theme-dark .order-detail-items-table tbody td::before {
    color: #8b9cb3;
  }
  .order-pickup-complete-wrap {
    position: sticky;
    bottom: 0;
    z-index: 6;
    padding: 0.75rem 0 max(0.75rem, env(safe-area-inset-bottom));
    margin-top: 0.5rem;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 28%);
  }
  body.theme-dark .order-pickup-complete-wrap {
    background: linear-gradient(180deg, rgba(15,20,29,0) 0%, #0f141d 35%);
  }
  .order-pickup-complete-wrap .btn {
    width: 100%;
    min-height: 48px;
  }

  /* 业绩管理：满宽、周期 Tab 触控、主表与明细内表卡片化 */
  .worker-stats-page .page-header {
    max-width: 100%;
  }
  .worker-stats-page .stats-dimension-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
  }
  .worker-stats-page .stats-dimension-tab {
    flex: 1 1 calc(50% - 0.3rem);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.5rem 0.65rem;
    box-sizing: border-box;
  }
  .worker-stats-page .card.card-table {
    overflow-x: hidden !important;
    max-width: 100%;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    box-shadow: none;
  }
  body.theme-dark .worker-stats-page .card.card-table {
    background: transparent;
  }
  .worker-stats-page #worker-stats-lines-list {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 0.75rem 1rem;
  }
  .worker-stats-page #worker-stats-rules-list {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 0.75rem 1rem;
  }
  .worker-stats-page .worker-stats-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
  .worker-stats-page .worker-stats-table thead {
    display: none;
  }
  .worker-stats-page .worker-stats-table tbody {
    display: block;
    width: 100%;
  }
  .worker-stats-page .worker-stats-table tbody tr.worker-stats-row {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 0.65rem;
    padding: 0.5rem 0.85rem;
  }
  body.theme-dark .worker-stats-page .worker-stats-table tbody tr.worker-stats-row {
    background: #151c27;
    border-color: #2a3546;
  }
  .worker-stats-page .worker-stats-table tbody tr.worker-stats-row td {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    padding: 0.45rem 0 !important;
    border: none !important;
    text-align: left !important;
    font-size: 0.9rem;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .worker-stats-page .worker-stats-table tbody tr.worker-stats-row td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    text-align: left;
    font-size: 0.78rem;
  }
  body.theme-dark .worker-stats-page .worker-stats-table tbody tr.worker-stats-row td::before {
    color: #8b9cb3;
  }
  .worker-stats-page .worker-stats-table tbody tr.worker-stats-detail-row {
    display: block;
    width: 100%;
    margin-bottom: 0.75rem;
  }
  .worker-stats-page .worker-stats-table tbody tr.worker-stats-detail-row td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem 0.85rem !important;
    background: #f8fafc;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-sizing: border-box;
  }
  body.theme-dark .worker-stats-page .worker-stats-table tbody tr.worker-stats-detail-row td {
    background: #1a2230;
    border-color: #2a3546;
  }
  .worker-stats-page .worker-stats-detail-inner {
    max-width: 100%;
    overflow-x: hidden;
  }
  .worker-stats-page .worker-stats-order-block {
    max-width: 100%;
    overflow-x: hidden;
    word-break: break-word;
  }
  .worker-stats-page .worker-stats-items-table {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.35rem 0 0.5rem;
    font-size: 0.85rem;
  }
  .worker-stats-page .worker-stats-items-table thead {
    display: none;
  }
  .worker-stats-page .worker-stats-items-table tbody {
    display: block;
    width: 100%;
  }
  .worker-stats-page .worker-stats-items-table tbody tr {
    display: block;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.35rem 0;
  }
  .worker-stats-page .worker-stats-items-table tbody tr:last-child {
    border-bottom: none;
  }
  body.theme-dark .worker-stats-page .worker-stats-items-table tbody tr {
    border-bottom-color: #2a3546;
  }
  .worker-stats-page .worker-stats-items-table tbody td {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
    padding: 0.3rem 0 !important;
    border: none !important;
    text-align: left !important;
    font-size: 0.82rem;
    min-width: 0;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .worker-stats-page .worker-stats-items-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    text-align: left;
    font-size: 0.75rem;
  }
  body.theme-dark .worker-stats-page .worker-stats-items-table tbody td::before {
    color: #8b9cb3;
  }
  .worker-stats-page .worker-stats-toggle {
    min-height: 44px;
    min-width: 4.5rem;
    padding: 0.45rem 0.75rem;
    touch-action: manipulation;
  }

  /* 用户管理：窄屏卡片列表 + 工具栏竖排，避免横向滑动 */
  .users-page .page-header {
    max-width: 100%;
  }
  .users-page .card-toolbar .toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
  }
  .users-page .card-toolbar .toolbar .input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    min-height: 44px;
    font-size: 16px;
  }
  .users-page .card-toolbar .toolbar .btn {
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
  }
  #page-users > .card.card-table {
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    box-sizing: border-box;
    box-shadow: none;
  }
  body.theme-dark #page-users > .card.card-table {
    background: transparent;
  }
  .users-page #users-list-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 0 max(0.75rem, env(safe-area-inset-right)) 1rem max(0.75rem, env(safe-area-inset-left));
  }
  .users-page .users-openid-brief {
    display: none;
  }
  .users-page .users-openid-full {
    display: block;
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #334155;
    text-align: left;
    max-width: 100%;
  }
  body.theme-dark .users-page .users-openid-full {
    color: #cbd5e1;
  }
  .users-page #users-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }
  .users-page #users-table thead {
    display: none;
  }
  .users-page #users-table tbody {
    display: block;
    width: 100%;
  }
  .users-page #users-table tbody tr.users-table-row {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 0.65rem;
    padding: 0.5rem 0.85rem;
  }
  body.theme-dark .users-page #users-table tbody tr.users-table-row {
    background: #151c27;
    border-color: #2a3546;
  }
  /* 标签与值上下排列，避免 flex 左右分栏 + min-width:auto 把卡片撑出视口导致右侧被裁切、视觉上左偏 */
  .users-page #users-table tbody tr.users-table-row td:not(.users-table-actions-cell) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    padding: 0.45rem 0 !important;
    border: none !important;
    text-align: left !important;
    font-size: 0.9rem;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .users-page #users-table tbody tr.users-table-row td:not(.users-table-actions-cell)::before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    font-size: 0.78rem;
    text-align: left;
    max-width: 100%;
  }
  body.theme-dark .users-page #users-table tbody tr.users-table-row td:not(.users-table-actions-cell)::before {
    color: #8b9cb3;
  }
  .users-page #users-table tbody tr.users-table-row td.users-table-actions-cell {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    text-align: left !important;
    gap: 0.5rem;
    padding: 0.45rem 0 !important;
    border: none !important;
    min-width: 0 !important;
    max-width: 100%;
    white-space: normal !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .users-page #users-table tbody tr.users-table-row td.users-table-actions-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    font-size: 0.78rem;
    max-width: 100%;
  }
  body.theme-dark .users-page #users-table tbody tr.users-table-row td.users-table-actions-cell::before {
    color: #8b9cb3;
  }
  .users-page #users-table tbody tr.users-table-row td.users-table-actions-cell > a,
  .users-page #users-table tbody tr.users-table-row td.users-table-actions-cell > .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
    min-height: 44px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .users-page #users-list-wrap .pager {
    padding: 0 0 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .users-page #users-list-wrap .pager button {
    min-height: 44px;
    min-width: 44px;
  }
  /* 用户详情页：最近订单筛选与表格在移动端避免偏移/裁切 */
  .user-recent-orders-card .user-recent-orders-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .user-orders-type-filter {
    width: 100%;
    justify-content: space-between;
    gap: 0.6rem;
  }
  .user-orders-type-filter select.form-select-sm,
  .user-orders-type-filter select {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .user-recent-orders-card {
    overflow: hidden;
  }
  .user-recent-orders-card .table {
    min-width: 0;
  }
  .user-recent-orders-card .table th,
  .user-recent-orders-card .table td {
    padding: 0.65rem 0.5rem;
    font-size: 0.84rem;
  }
  /* 类目/产品/车型库等列表的竖版卡片由 max-width:768px 内统一规则处理；此处曾有一套 grid+!important 内边距，
     会覆盖 768px 段的 label 绝对定位与 padding-left，导致窄屏标签与内容重叠，故删除重复块。 */
  /* 保养项目配置 / 保养包材料 / 保养包配置：复杂表格移动端卡片化 */
  #page-maintain-materials .card-table,
  #page-maintain-small-package .card-table,
  #page-maintain-package-config .card-table {
    overflow-x: clip !important;
  }
  #maintain-products-table,
  #maintain-materials-table,
  #maintain-brands-table,
  #maintain-sp-products-table,
  #maintain-sp-table,
  #maintain-package-products-table,
  #maintain-package-bundles-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }
  #maintain-products-table thead,
  #maintain-materials-table thead,
  #maintain-brands-table thead,
  #maintain-sp-products-table thead,
  #maintain-sp-table thead,
  #maintain-package-products-table thead,
  #maintain-package-bundles-table thead {
    display: none;
  }
  #maintain-products-table tbody,
  #maintain-materials-table tbody,
  #maintain-brands-table tbody,
  #maintain-sp-products-table tbody,
  #maintain-sp-table tbody,
  #maintain-package-products-table tbody,
  #maintain-package-bundles-table tbody {
    display: block;
    width: 100%;
  }
  #maintain-products-table tbody tr,
  #maintain-materials-table tbody tr,
  #maintain-brands-table tbody tr,
  #maintain-sp-products-table tbody tr,
  #maintain-sp-table tbody tr,
  #maintain-package-products-table tbody tr,
  #maintain-package-bundles-table tbody tr {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--admin-mcard-gap);
    padding: var(--admin-mcard-pad-block) var(--admin-mcard-pad-inline);
    border: var(--admin-mcard-border);
    border-radius: var(--admin-mcard-radius);
    background: var(--admin-mcard-bg);
    box-shadow: var(--admin-mcard-shadow);
    box-sizing: border-box;
  }
  #maintain-products-table tbody tr td,
  #maintain-materials-table tbody tr td,
  #maintain-brands-table tbody tr td,
  #maintain-sp-products-table tbody tr td,
  #maintain-sp-table tbody tr td,
  #maintain-package-products-table tbody tr td,
  #maintain-package-bundles-table tbody tr td {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    padding: 0.45rem 0 !important;
    border: none !important;
    text-align: left !important;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  #maintain-products-table tbody tr td::before,
  #maintain-materials-table tbody tr td::before,
  #maintain-brands-table tbody tr td::before,
  #maintain-sp-products-table tbody tr td::before,
  #maintain-sp-table tbody tr td::before,
  #maintain-package-products-table tbody tr td::before,
  #maintain-package-bundles-table tbody tr td::before {
    font-weight: var(--admin-mlabel-fw);
    color: var(--admin-mlabel-color);
    font-size: var(--admin-mlabel-fs);
    line-height: 1.25;
  }
  #maintain-products-table tbody tr td:last-child,
  #maintain-materials-table tbody tr td:last-child,
  #maintain-brands-table tbody tr td:last-child,
  #maintain-sp-table tbody tr td:last-child,
  #maintain-package-bundles-table tbody tr td:last-child {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: var(--admin-mbtn-gap);
    white-space: normal !important;
    min-width: 0 !important;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  #maintain-products-table tbody tr td:last-child > .btn,
  #maintain-materials-table tbody tr td:last-child > .btn,
  #maintain-brands-table tbody tr td:last-child > .btn,
  #maintain-sp-table tbody tr td:last-child > .btn,
  #maintain-package-bundles-table tbody tr td:last-child > .btn,
  #maintain-products-table tbody tr td:last-child > a.btn,
  #maintain-materials-table tbody tr td:last-child > a.btn,
  #maintain-brands-table tbody tr td:last-child > a.btn,
  #maintain-sp-table tbody tr td:last-child > a.btn,
  #maintain-package-bundles-table tbody tr td:last-child > a.btn {
    min-height: var(--admin-mbtn-min-h);
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  #maintain-products-table td .input,
  #maintain-materials-table td .input,
  #maintain-brands-table td .input,
  #maintain-sp-products-table td .input,
  #maintain-sp-table td .input,
  #maintain-package-products-table td .input,
  #maintain-package-bundles-table td .input,
  #maintain-products-table td input,
  #maintain-materials-table td input,
  #maintain-brands-table td input,
  #maintain-sp-products-table td input,
  #maintain-sp-table td input,
  #maintain-package-products-table td input,
  #maintain-package-bundles-table td input,
  #maintain-products-table td select,
  #maintain-materials-table td select,
  #maintain-brands-table td select,
  #maintain-sp-products-table td select,
  #maintain-sp-table td select,
  #maintain-package-products-table td select,
  #maintain-package-bundles-table td select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  #maintain-products-table td:nth-child(1)::before { content: "ID"; }
  #maintain-products-table td:nth-child(2)::before { content: "项目名称"; }
  #maintain-products-table td:nth-child(3)::before { content: "工时费"; }
  #maintain-materials-table td:nth-child(1)::before { content: "ID"; }
  #maintain-materials-table td:nth-child(2)::before { content: "材料名称"; }
  #maintain-materials-table td:nth-child(3)::before { content: "单位"; }
  #maintain-materials-table td:nth-child(4)::before { content: "每次用量"; }
  #maintain-materials-table td:nth-child(5)::before { content: "参考金额"; }
  #maintain-materials-table td:nth-child(6)::before { content: "备注"; }
  #maintain-materials-table td:nth-child(7)::before { content: "排序"; }
  #maintain-materials-table td:nth-child(8)::before { content: "操作"; }
  #maintain-brands-table td:nth-child(1)::before { content: "ID"; }
  #maintain-brands-table td:nth-child(2)::before { content: "品牌名称"; }
  #maintain-brands-table td:nth-child(3)::before { content: "规格"; }
  #maintain-brands-table td:nth-child(4)::before { content: "参考单价"; }
  #maintain-brands-table td:nth-child(5)::before { content: "推荐"; }
  #maintain-brands-table td:nth-child(6)::before { content: "排序"; }
  #maintain-brands-table td:nth-child(7)::before { content: "操作"; }
  #maintain-sp-products-table td:nth-child(1)::before { content: "ID"; }
  #maintain-sp-products-table td:nth-child(2)::before { content: "项目名称"; }
  #maintain-sp-products-table td:nth-child(3)::before { content: "工时费/价格"; }
  #maintain-sp-products-table td:nth-child(4)::before { content: "材料配置状态"; }
  #maintain-sp-table td:nth-child(1)::before { content: "#"; }
  #maintain-sp-table td:nth-child(2)::before { content: "材料"; }
  #maintain-sp-table td:nth-child(3)::before { content: "品牌"; }
  #maintain-sp-table td:nth-child(4)::before { content: "数量"; }
  #maintain-sp-table td:nth-child(5)::before { content: "参考价"; }
  #maintain-sp-table td:nth-child(6)::before { content: "排序"; }
  #maintain-sp-table td:nth-child(7)::before { content: "操作"; }
  #maintain-package-products-table td:nth-child(1)::before { content: "ID"; }
  #maintain-package-products-table td:nth-child(2)::before { content: "项目名称"; }
  #maintain-package-products-table td:nth-child(3)::before { content: "工时费"; }
  #maintain-package-products-table td:nth-child(4)::before { content: "小保养包"; }
  #maintain-package-products-table td:nth-child(5)::before { content: "小保养排序"; }
  #maintain-package-products-table td:nth-child(6)::before { content: "大保养包"; }
  #maintain-package-products-table td:nth-child(7)::before { content: "大保养排序"; }
  #maintain-package-bundles-table td:nth-child(1)::before { content: "方案编码"; }
  #maintain-package-bundles-table td:nth-child(2)::before { content: "方案名称"; }
  #maintain-package-bundles-table td:nth-child(3)::before { content: "机油品牌/规格"; }
  #maintain-package-bundles-table td:nth-child(4)::before { content: "操作"; }
}

@media (max-width: 768px) {
  body { overflow-x: hidden; }
  #main-screen,
  .main {
    overflow-x: hidden;
    max-width: 100%;
  }
  .main {
    padding: 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .card { padding: 1rem; }
  .card.card-toolbar { padding: 0.75rem 0.85rem; }
  /* 用户管理：列表卡片区不再套一层 1rem 内边距，避免与 #users-list-wrap 叠加后视觉左偏、右侧被裁切 */
  #page-users > .card.card-table {
    padding: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .users-page > .card.card-toolbar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .page-header { margin-bottom: 1rem; }
  .page-header .page-title { font-size: 1.2rem; line-height: 1.35; }
  .page-header .text-muted { font-size: 0.85rem; }
  .toolbar { flex-wrap: wrap; gap: 0.5rem; }
  .toolbar .input { min-width: 0; width: 100%; max-width: 100%; }
  .toolbar .btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.6rem 1rem;
  }
  /* 顶部导航：压缩左右留白与文案，使右侧按钮在同一行显示 */
  .top-bar {
    padding: 0.4rem 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
  .top-bar-brand {
    font-size: 0.9rem;
    max-width: 9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .top-bar .header-user-center {
    max-width: 100%;
  }
  .top-bar .btn-notification-bell,
  .top-bar .btn-notification-sound,
  .top-bar .btn-theme,
  .top-bar .btn-outline {
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
  }
  .orders-page-toolbar { padding: 0.7rem 0.8rem; }
  .orders-search-group { padding: 0.35rem 0.5rem; }
  .orders-page-toolbar .status-tab,
  .status-tab {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-height: 38px;
  }
  .card-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .card-table .table {
    min-width: 600px;
  }
  .card-table .table th,
  .card-table .table td {
    padding: 0.7rem 0.6rem;
    font-size: 0.9rem;
  }
  .card-table .table th:last-child,
  .card-table .table td:last-child {
    min-width: 7.5em;
    white-space: nowrap;
  }
  .card-table .table td:last-child .btn,
  .card-table .table td:last-child .btn-sm,
  .card-table .table td:last-child a.btn {
    white-space: nowrap;
    display: inline-block;
  }
  /* 用户详情-车辆信息：移动端改为竖排卡片，避免横向滚动 */
  #page-user-detail #user-detail-body .card > .card-table {
    overflow-x: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-shadow: none;
  }
  #page-user-detail #user-detail-body .card > .card-table .table {
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
  }
  #page-user-detail #user-detail-body .card > .card-table .table thead {
    display: none;
  }
  #page-user-detail #user-detail-body .card > .card-table .table tbody {
    display: block;
  }
  #page-user-detail #user-detail-body .card > .card-table .table tr {
    display: block;
    margin-bottom: var(--admin-mcard-gap);
    padding: var(--admin-mcard-pad-block) var(--admin-mcard-pad-inline);
    border: var(--admin-mcard-border);
    border-radius: var(--admin-mcard-radius);
    background: var(--admin-mcard-bg);
    box-shadow: var(--admin-mcard-shadow);
    box-sizing: border-box;
  }
  #page-user-detail #user-detail-body .card > .card-table .table td {
    display: block;
    width: 100%;
    min-height: 2rem;
    padding: var(--admin-mfield-row-py) 0 var(--admin-mfield-row-py) var(--admin-mcell-pl);
    border-bottom: var(--admin-mfield-sep);
    white-space: normal;
    position: relative;
    box-sizing: border-box;
    font-size: var(--admin-mfield-fs);
  }
  #page-user-detail #user-detail-body .card > .card-table .table td:last-child {
    border-bottom: none;
    min-width: 0;
  }
  #page-user-detail #user-detail-body .card > .card-table .table td::before {
    position: absolute;
    left: 0;
    top: var(--admin-mfield-row-py);
    width: var(--admin-mlabel-w);
    color: var(--admin-mlabel-color);
    font-weight: var(--admin-mlabel-fw);
    font-size: var(--admin-mlabel-fs);
    white-space: nowrap;
    content: "";
    line-height: 1.35;
  }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(1)::before { content: "ID"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(2)::before { content: "车牌号"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(3)::before { content: "品牌"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(4)::before { content: "车系"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(5)::before { content: "车型"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(6)::before { content: "指导价(万元)"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(7)::before { content: "能源类型"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(8)::before { content: "VIN"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(9)::before { content: "里程"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(10)::before { content: "营运性质"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(11)::before { content: "默认"; }
  #page-user-detail #user-detail-body .card > .card-table .table td:nth-child(12)::before { content: "操作"; }
  /* 管理列表页（系统账户/用户反馈/操作日志）：移动端改为竖版卡片 */
  #page-admin-users .card-table,
  #page-user-feedback .card-table,
  #page-operation-log .card-table {
    overflow-x: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-shadow: none;
  }
  #admin-users-table,
  #feedback-table,
  #oplog-table {
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
  }
  #admin-users-table thead,
  #feedback-table thead,
  #oplog-table thead {
    display: none;
  }
  #admin-users-table tbody,
  #feedback-table tbody,
  #oplog-table tbody {
    display: block;
  }
  #admin-users-table tbody tr,
  #feedback-table tbody tr,
  #oplog-table tbody tr {
    display: block;
    margin-bottom: var(--admin-mcard-gap);
    padding: var(--admin-mcard-pad-block) var(--admin-mcard-pad-inline);
    border: var(--admin-mcard-border);
    border-radius: var(--admin-mcard-radius);
    background: var(--admin-mcard-bg);
    box-shadow: var(--admin-mcard-shadow);
    box-sizing: border-box;
  }
  #admin-users-table tbody tr td,
  #feedback-table tbody tr td,
  #oplog-table tbody tr td {
    display: block;
    width: 100%;
    min-height: 2rem;
    padding: var(--admin-mfield-row-py) 0 var(--admin-mfield-row-py) var(--admin-mcell-pl);
    border-bottom: var(--admin-mfield-sep);
    white-space: normal;
    position: relative;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: var(--admin-mfield-fs);
  }
  #admin-users-table tbody tr td:last-child,
  #feedback-table tbody tr td:last-child,
  #oplog-table tbody tr td:last-child {
    border-bottom: none;
    min-width: 0;
  }
  #admin-users-table tbody tr td::before,
  #feedback-table tbody tr td::before,
  #oplog-table tbody tr td::before {
    position: absolute;
    left: 0;
    top: var(--admin-mfield-row-py);
    width: var(--admin-mlabel-w);
    color: var(--admin-mlabel-color);
    font-weight: var(--admin-mlabel-fw);
    font-size: var(--admin-mlabel-fs);
    white-space: nowrap;
    content: "";
    line-height: 1.35;
  }
  #admin-users-table td:nth-child(1)::before { content: "ID"; }
  #admin-users-table td:nth-child(2)::before { content: "登录名"; }
  #admin-users-table td:nth-child(3)::before { content: "姓名"; }
  #admin-users-table td:nth-child(4)::before { content: "角色"; }
  #admin-users-table td:nth-child(5)::before { content: "状态"; }
  #admin-users-table td:nth-child(6)::before { content: "创建时间"; }
  #admin-users-table td:nth-child(7)::before { content: "操作"; }
  #feedback-table td:nth-child(1)::before { content: "ID"; }
  #feedback-table td:nth-child(2)::before { content: "用户"; }
  #feedback-table td:nth-child(3)::before { content: "手机号"; }
  #feedback-table td:nth-child(4)::before { content: "反馈内容"; }
  #feedback-table td:nth-child(5)::before { content: "提交时间"; }
  #oplog-table td:nth-child(1)::before { content: "时间"; }
  #oplog-table td:nth-child(2)::before { content: "操作人"; }
  #oplog-table td:nth-child(3)::before { content: "操作类型"; }
  #oplog-table td:nth-child(4)::before { content: "关联"; }
  #oplog-table td:nth-child(5)::before { content: "摘要"; }
  #oplog-table td:nth-child(6)::before { content: "IP"; }
  /* 其余管理列表页：移动端统一竖版卡片（不使用横向滚动） */
  #page-users .card-table,
  #page-categories .card-table,
  #page-category-l2 .card-table,
  #page-category-l3 .card-table,
  #page-products .card-table,
  #page-car-models .card-table,
  #page-vin-demo .card-table,
  #page-parts .card-table,
  #page-workers .card-table,
  #page-settlement-companies .card-table,
  #page-card-templates .card-table {
    overflow-x: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-shadow: none;
  }
  #users-table,
  #categories-table,
  #category-l2-table,
  #category-l3-table,
  #products-table,
  #car-models-table,
  #vin-demo-table,
  #parts-table,
  #parts-stock-log-table,
  #workers-table,
  #settlement-companies-table,
  #card-templates-table {
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
  }
  #users-table thead,
  #categories-table thead,
  #category-l2-table thead,
  #category-l3-table thead,
  #products-table thead,
  #car-models-table thead,
  #vin-demo-table thead,
  #parts-table thead,
  #parts-stock-log-table thead,
  #workers-table thead,
  #settlement-companies-table thead,
  #card-templates-table thead {
    display: none;
  }
  #users-table tbody,
  #categories-table tbody,
  #category-l2-table tbody,
  #category-l3-table tbody,
  #products-table tbody,
  #car-models-table tbody,
  #vin-demo-table tbody,
  #parts-table tbody,
  #parts-stock-log-table tbody,
  #workers-table tbody,
  #settlement-companies-table tbody,
  #card-templates-table tbody {
    display: block;
  }
  #users-table tbody tr,
  #categories-table tbody tr,
  #category-l2-table tbody tr,
  #category-l3-table tbody tr,
  #products-table tbody tr,
  #car-models-table tbody tr,
  #vin-demo-table tbody tr,
  #parts-table tbody tr,
  #parts-stock-log-table tbody tr,
  #workers-table tbody tr,
  #settlement-companies-table tbody tr,
  #card-templates-table tbody tr {
    display: block;
    margin-bottom: var(--admin-mcard-gap);
    padding: var(--admin-mcard-pad-block) var(--admin-mcard-pad-inline);
    border: var(--admin-mcard-border);
    border-radius: var(--admin-mcard-radius);
    background: var(--admin-mcard-bg);
    box-shadow: var(--admin-mcard-shadow);
    box-sizing: border-box;
  }
  #users-table tbody tr td,
  #categories-table tbody tr td,
  #category-l2-table tbody tr td,
  #category-l3-table tbody tr td,
  #products-table tbody tr td,
  #car-models-table tbody tr td,
  #vin-demo-table tbody tr td,
  #parts-table tbody tr td,
  #parts-stock-log-table tbody tr td,
  #workers-table tbody tr td,
  #settlement-companies-table tbody tr td,
  #card-templates-table tbody tr td {
    display: block;
    width: 100%;
    min-height: 2rem;
    padding: var(--admin-mfield-row-py) 0 var(--admin-mfield-row-py) var(--admin-mcell-pl);
    border-bottom: var(--admin-mfield-sep);
    white-space: normal;
    position: relative;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: var(--admin-mfield-fs);
  }
  #users-table tbody tr td:last-child,
  #categories-table tbody tr td:last-child,
  #category-l2-table tbody tr td:last-child,
  #category-l3-table tbody tr td:last-child,
  #products-table tbody tr td:last-child,
  #car-models-table tbody tr td:last-child,
  #vin-demo-table tbody tr td:last-child,
  #parts-table tbody tr td:last-child,
  #parts-stock-log-table tbody tr td:last-child,
  #workers-table tbody tr td:last-child,
  #settlement-companies-table tbody tr td:last-child,
  #card-templates-table tbody tr td:last-child {
    border-bottom: none;
    min-width: 0;
  }
  #users-table tbody tr td::before,
  #categories-table tbody tr td::before,
  #category-l2-table tbody tr td::before,
  #category-l3-table tbody tr td::before,
  #products-table tbody tr td::before,
  #car-models-table tbody tr td::before,
  #vin-demo-table tbody tr td::before,
  #parts-table tbody tr td::before,
  #parts-stock-log-table tbody tr td::before,
  #workers-table tbody tr td::before,
  #settlement-companies-table tbody tr td::before,
  #card-templates-table tbody tr td::before {
    position: absolute;
    left: 0;
    top: var(--admin-mfield-row-py);
    width: var(--admin-mlabel-w);
    color: var(--admin-mlabel-color);
    font-weight: var(--admin-mlabel-fw);
    font-size: var(--admin-mlabel-fs);
    white-space: nowrap;
    content: "";
    line-height: 1.35;
  }
  #users-table td:nth-child(1)::before { content: "用户编号"; }
  #users-table td:nth-child(2)::before { content: "openid"; }
  #users-table td:nth-child(3)::before { content: "昵称"; }
  #users-table td:nth-child(4)::before { content: "手机"; }
  #users-table td:nth-child(5)::before { content: "会员等级"; }
  #users-table td:nth-child(6)::before { content: "推荐人编号"; }
  #users-table td:nth-child(7)::before { content: "积分"; }
  #users-table td:nth-child(8)::before { content: "注册时间"; }
  #users-table td:nth-child(9)::before { content: "操作"; }
  #categories-table td:nth-child(1)::before { content: "ID"; }
  #categories-table td:nth-child(2)::before { content: "类目名称"; }
  #categories-table td:nth-child(3)::before { content: "类型"; }
  #categories-table td:nth-child(4)::before { content: "排序"; }
  #categories-table td:nth-child(5)::before { content: "操作"; }
  #category-l2-table td:nth-child(1)::before { content: "ID"; }
  #category-l2-table td:nth-child(2)::before { content: "所属一级"; }
  #category-l2-table td:nth-child(3)::before { content: "类目名称"; }
  #category-l2-table td:nth-child(4)::before { content: "类型"; }
  #category-l2-table td:nth-child(5)::before { content: "排序"; }
  #category-l2-table td:nth-child(6)::before { content: "操作"; }
  #category-l3-table td:nth-child(1)::before { content: "ID"; }
  #category-l3-table td:nth-child(2)::before { content: "所属二级类目"; }
  #category-l3-table td:nth-child(3)::before { content: "产品名称"; }
  #category-l3-table td:nth-child(4)::before { content: "规格型号"; }
  #category-l3-table td:nth-child(5)::before { content: "项目编码"; }
  #category-l3-table td:nth-child(6)::before { content: "成本类型"; }
  #category-l3-table td:nth-child(7)::before { content: "工时(h)"; }
  #category-l3-table td:nth-child(8)::before { content: "工时单价"; }
  #category-l3-table td:nth-child(9)::before { content: "工时费"; }
  #category-l3-table td:nth-child(10)::before { content: "销项税率(%)"; }
  #category-l3-table td:nth-child(11)::before { content: "状态"; }
  #category-l3-table td:nth-child(12)::before { content: "操作"; }
  #products-table td:nth-child(1)::before { content: "ID"; }
  #products-table td:nth-child(2)::before { content: "所属类目"; }
  #products-table td:nth-child(3)::before { content: "产品名称"; }
  #products-table td:nth-child(4)::before { content: "规格型号"; }
  #products-table td:nth-child(5)::before { content: "项目编码"; }
  #products-table td:nth-child(6)::before { content: "成本类型"; }
  #products-table td:nth-child(7)::before { content: "工时(h)"; }
  #products-table td:nth-child(8)::before { content: "工时单价"; }
  #products-table td:nth-child(9)::before { content: "工时费"; }
  #products-table td:nth-child(10)::before { content: "销项税率(%)"; }
  #products-table td:nth-child(11)::before { content: "状态"; }
  #products-table td:nth-child(12)::before { content: "创建人"; }
  #products-table td:nth-child(13)::before { content: "创建时间"; }
  #products-table td:nth-child(14)::before { content: "操作"; }
  #car-models-table td:nth-child(1)::before { content: "ID"; }
  #car-models-table td:nth-child(2)::before { content: "品牌"; }
  #car-models-table td:nth-child(3)::before { content: "车系"; }
  #car-models-table td:nth-child(4)::before { content: "车型"; }
  #car-models-table td:nth-child(5)::before { content: "厂商"; }
  #car-models-table td:nth-child(6)::before { content: "厂商指导价(万元)"; }
  #car-models-table td:nth-child(7)::before { content: "能源类型"; }
  #car-models-table td:nth-child(8)::before { content: "操作"; }
  #vin-demo-table td:nth-child(1)::before { content: "ID"; }
  #vin-demo-table td:nth-child(2)::before { content: "车牌号"; }
  #vin-demo-table td:nth-child(3)::before { content: "品牌"; }
  #vin-demo-table td:nth-child(4)::before { content: "车系"; }
  #vin-demo-table td:nth-child(5)::before { content: "车型"; }
  #vin-demo-table td:nth-child(6)::before { content: "能源类型"; }
  #vin-demo-table td:nth-child(7)::before { content: "机油粘度"; }
  #vin-demo-table td:nth-child(8)::before { content: "机油用量"; }
  #vin-demo-table td:nth-child(9)::before { content: "参考指导价(万元)"; }
  #vin-demo-table td:nth-child(10)::before { content: "车型库ID"; }
  #vin-demo-table td:nth-child(11)::before { content: "VIN"; }
  #vin-demo-table td:nth-child(12)::before { content: "操作"; }
  #parts-table td:nth-child(1)::before { content: "ID"; }
  #parts-table td:nth-child(2)::before { content: "零配件信息"; }
  #parts-table td:nth-child(3)::before { content: "规格与分类"; }
  #parts-table td:nth-child(4)::before { content: "归属配置"; }
  #parts-table td:nth-child(5)::before { content: "库存"; }
  #parts-table td:nth-child(6)::before { content: "价格"; }
  #parts-table td:nth-child(7)::before { content: "状态"; }
  #parts-table td:nth-child(8)::before { content: "操作"; }
  #parts-stock-log-table td:nth-child(1)::before { content: "时间"; }
  #parts-stock-log-table td:nth-child(2)::before { content: "零配件"; }
  #parts-stock-log-table td:nth-child(3)::before { content: "变动数量"; }
  #parts-stock-log-table td:nth-child(4)::before { content: "变动后库存"; }
  #parts-stock-log-table td:nth-child(5)::before { content: "来源"; }
  #parts-stock-log-table td:nth-child(6)::before { content: "备注"; }
  #workers-table td:nth-child(1)::before { content: "ID"; }
  #workers-table td:nth-child(2)::before { content: "姓名"; }
  #workers-table td:nth-child(3)::before { content: "手机"; }
  #workers-table td:nth-child(4)::before { content: "状态"; }
  #workers-table td:nth-child(5)::before { content: "操作"; }
  #settlement-companies-table td:nth-child(1)::before { content: "ID"; }
  #settlement-companies-table td:nth-child(2)::before { content: "公司名称"; }
  #settlement-companies-table td:nth-child(3)::before { content: "排序"; }
  #settlement-companies-table td:nth-child(4)::before { content: "操作"; }
  #card-templates-table td:nth-child(1)::before { content: "ID"; }
  #card-templates-table td:nth-child(2)::before { content: "卡券名称"; }
  #card-templates-table td:nth-child(3)::before { content: "权益明细"; }
  #card-templates-table td:nth-child(4)::before { content: "类型"; }
  #card-templates-table td:nth-child(5)::before { content: "默认余额"; }
  #card-templates-table td:nth-child(6)::before { content: "状态"; }
  #card-templates-table td:nth-child(7)::before { content: "操作"; }
  /* 操作列：标签置顶 + 按钮全宽纵向排列，全站移动列表观感一致 */
  #page-user-detail #user-detail-body .card > .card-table .table tbody tr td:last-child,
  #admin-users-table tbody tr td:last-child,
  #users-table tbody tr td:last-child,
  #categories-table tbody tr td:last-child,
  #category-l2-table tbody tr td:last-child,
  #category-l3-table tbody tr td:last-child,
  #products-table tbody tr td:last-child,
  #car-models-table tbody tr td:last-child,
  #vin-demo-table tbody tr td:last-child,
  #parts-table tbody tr td:last-child,
  #workers-table tbody tr td:last-child,
  #settlement-companies-table tbody tr td:last-child,
  #card-templates-table tbody tr td:last-child {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--admin-mbtn-gap);
    padding-left: 0;
    padding-top: calc(var(--admin-mfield-row-py) + 0.125rem);
    padding-bottom: var(--admin-mfield-row-py);
    /* 覆盖 ≤1024px 段 .card-table td:last-child 的 nowrap/min-width，否则 flex 子项无法收缩，按钮挤向一侧并溢出卡片 */
    white-space: normal;
    min-width: 0;
    overflow-x: hidden;
  }
  #page-user-detail #user-detail-body .card > .card-table .table tbody tr td:last-child::before,
  #admin-users-table tbody tr td:last-child::before,
  #users-table tbody tr td:last-child::before,
  #categories-table tbody tr td:last-child::before,
  #category-l2-table tbody tr td:last-child::before,
  #category-l3-table tbody tr td:last-child::before,
  #products-table tbody tr td:last-child::before,
  #car-models-table tbody tr td:last-child::before,
  #vin-demo-table tbody tr td:last-child::before,
  #parts-table tbody tr td:last-child::before,
  #workers-table tbody tr td:last-child::before,
  #settlement-companies-table tbody tr td:last-child::before,
  #card-templates-table tbody tr td:last-child::before {
    position: static;
    width: 100%;
    margin-bottom: 0.125rem;
    white-space: normal;
  }
  /* 车型库操作列多个 button 之间的空白会变成匿名 flex 项，把按钮挤偏；压掉空白字号后由子元素单独设字号 */
  #car-models-table tbody tr td:last-child {
    font-size: 0;
    line-height: 0;
  }
  #car-models-table tbody tr td:last-child::before {
    font-size: var(--admin-mlabel-fs);
    line-height: 1.35;
  }
  #car-models-table tbody tr td:last-child .btn,
  #car-models-table tbody tr td:last-child .btn-sm {
    font-size: 0.875rem;
    line-height: 1.4;
  }
  #page-user-detail #user-detail-body .card > .card-table .table tbody tr td:last-child .btn,
  #page-user-detail #user-detail-body .card > .card-table .table tbody tr td:last-child .btn-sm,
  #page-user-detail #user-detail-body .card > .card-table .table tbody tr td:last-child a.btn,
  #admin-users-table tbody tr td:last-child .btn,
  #admin-users-table tbody tr td:last-child .btn-sm,
  #admin-users-table tbody tr td:last-child a.btn,
  #users-table tbody tr td:last-child .btn,
  #users-table tbody tr td:last-child .btn-sm,
  #users-table tbody tr td:last-child a.btn,
  #categories-table tbody tr td:last-child .btn,
  #categories-table tbody tr td:last-child .btn-sm,
  #categories-table tbody tr td:last-child a.btn,
  #category-l2-table tbody tr td:last-child .btn,
  #category-l2-table tbody tr td:last-child .btn-sm,
  #category-l2-table tbody tr td:last-child a.btn,
  #category-l3-table tbody tr td:last-child .btn,
  #category-l3-table tbody tr td:last-child .btn-sm,
  #category-l3-table tbody tr td:last-child a.btn,
  #products-table tbody tr td:last-child .btn,
  #products-table tbody tr td:last-child .btn-sm,
  #products-table tbody tr td:last-child a.btn,
  #car-models-table tbody tr td:last-child .btn,
  #car-models-table tbody tr td:last-child .btn-sm,
  #car-models-table tbody tr td:last-child a.btn,
  #vin-demo-table tbody tr td:last-child .btn,
  #vin-demo-table tbody tr td:last-child .btn-sm,
  #vin-demo-table tbody tr td:last-child a.btn,
  #parts-table tbody tr td:last-child .btn,
  #parts-table tbody tr td:last-child .btn-sm,
  #parts-table tbody tr td:last-child a.btn,
  #workers-table tbody tr td:last-child .btn,
  #workers-table tbody tr td:last-child .btn-sm,
  #workers-table tbody tr td:last-child a.btn,
  #settlement-companies-table tbody tr td:last-child .btn,
  #settlement-companies-table tbody tr td:last-child .btn-sm,
  #settlement-companies-table tbody tr td:last-child a.btn,
  #card-templates-table tbody tr td:last-child .btn,
  #card-templates-table tbody tr td:last-child .btn-sm,
  #card-templates-table tbody tr td:last-child a.btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
    min-height: var(--admin-mbtn-min-h);
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  /* 操作列内常用包裹容器 */
  #page-user-detail #user-detail-body .card > .card-table .table tbody tr td:last-child .table-op-btns,
  #users-table tbody tr td:last-child .table-op-btns,
  #products-table tbody tr td:last-child .table-op-btns,
  #parts-table tbody tr td:last-child .table-op-btns,
  #card-templates-table tbody tr td:last-child .table-op-btns {
    display: flex;
    flex-direction: column;
    gap: var(--admin-mbtn-gap);
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    align-items: stretch;
  }
  #page-user-detail #user-detail-body .card > .card-table .table tbody tr td:last-child .table-op-btns .btn,
  #page-user-detail #user-detail-body .card > .card-table .table tbody tr td:last-child .table-op-btns .btn-sm,
  #users-table tbody tr td:last-child .table-op-btns .btn,
  #users-table tbody tr td:last-child .table-op-btns .btn-sm,
  #products-table tbody tr td:last-child .table-op-btns .btn,
  #products-table tbody tr td:last-child .table-op-btns .btn-sm,
  #parts-table tbody tr td:last-child .table-op-btns .btn,
  #parts-table tbody tr td:last-child .table-op-btns .btn-sm,
  #card-templates-table tbody tr td:last-child .table-op-btns .btn,
  #card-templates-table tbody tr td:last-child .table-op-btns .btn-sm {
    width: 100%;
    min-height: var(--admin-mbtn-min-h);
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    min-width: 0;
  }

  /* 卡券模板 — 可用项目：一级分类折叠，展开后勾选产品 */
  .card-template-products-wrap {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0;
    background: var(--card-bg, #fff);
  }
  .card-template-cat-group {
    border-bottom: 1px solid var(--border);
  }
  .card-template-cat-group:last-child {
    border-bottom: none;
  }
  .card-template-cat-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
  }
  .card-template-cat-head:hover {
    background: rgba(0, 0, 0, 0.04);
  }
  .card-template-cat-arrow {
    display: inline-block;
    width: 1.1rem;
    flex-shrink: 0;
    color: var(--muted, #888);
    font-size: 0.7rem;
  }
  .card-template-cat-count {
    font-weight: 400;
    margin-left: auto;
    font-size: 0.8rem;
  }
  .card-template-cat-body {
    padding: 0.35rem 0.75rem 0.65rem 2rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.02);
  }
  .card-template-cat-body.hidden {
    display: none !important;
  }
  .card-template-prod-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.35rem 0;
    cursor: pointer;
  }

  .card-table .pager {
    margin: 1rem;
    padding-top: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .pager button {
    min-height: 44px;
    min-width: 44px;
    padding: 0.6rem 1rem;
  }
  .pager span { font-size: 0.85rem; }
  .btn {
    min-height: 44px;
    padding: 0.6rem 1rem;
  }
  .btn-sm {
    min-height: 40px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
  }
  .modal {
    padding: max(0.5rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    box-sizing: border-box;
  }
  .modal-content {
    width: 96%;
    max-width: none;
    max-height: 85vh;
    max-height: min(92dvh, calc(100vh - 2rem - 56px));
    margin: 1rem auto;
    border-radius: 12px;
  }
  .modal-header { padding: 1rem; }
  .modal-body {
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-body .field input,
  .modal-body .field select {
    font-size: 16px;
    min-height: 48px;
  }
  .modal-close {
    min-width: 44px;
    min-height: 44px;
  }
  /* 为用户生成订单：底部抽屉 + 正文区域滚动 */
  #modal-create-order-for-user.modal {
    align-items: flex-end;
    justify-content: center;
    padding: max(0.35rem, env(safe-area-inset-top)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  #modal-create-order-for-user .modal-content.create-order-modal {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 12px 12px 0 0;
    max-height: min(94dvh, calc(100vh - env(safe-area-inset-top) - 0.5rem - 56px)) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #modal-create-order-for-user .create-order-modal .modal-header {
    flex-shrink: 0;
  }
  #modal-create-order-for-user .create-order-modal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  #modal-create-order-for-user .create-order-modal .modal-body > p.text-muted {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  #modal-create-order-for-user .create-order-modal input.input,
  #modal-create-order-for-user .create-order-modal select.input {
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
  }
  #modal-create-order-for-user .create-order-tab-panel .field > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  #modal-create-order-for-user .create-order-tab-panel .field > div .input {
    flex: 1 1 100%;
    min-width: 0;
  }
  #modal-create-order-for-user .create-order-tab-panel .field > div .btn {
    flex: 1 1 auto;
    min-width: 120px;
    min-height: 44px;
  }
  #modal-create-order-for-user #create-order-items-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #modal-create-order-for-user #create-order-items-table thead th,
  #modal-create-order-for-user #create-order-items-table tbody td {
    white-space: nowrap;
  }
  #modal-create-order-for-user #create-order-items-table .create-order-product-input,
  #modal-create-order-for-user #create-order-items-table .create-order-price,
  #modal-create-order-for-user #create-order-items-table .create-order-qty {
    min-width: 5.5rem;
  }
  #modal-create-order-for-user #create-order-submit {
    width: 100%;
    min-height: 48px;
  }
  #modal-create-order-for-user #create-order-add-item {
    min-height: 44px;
    margin-top: 0.5rem;
  }
  /* 变更订单项目：底部抽屉 + 内部分区滚动，小屏可用面积更大 */
  #modal-order-items.modal {
    align-items: flex-end;
    justify-content: center;
    padding: max(0.35rem, env(safe-area-inset-top)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .modal-order-items-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 12px 12px 0 0;
    max-height: min(94dvh, calc(100vh - env(safe-area-inset-top) - 0.5rem)) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .modal-order-items-content .modal-header {
    flex-shrink: 0;
  }
  .modal-order-items-content .modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .modal-order-items-content .order-items-editor {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 0.5rem;
  }
  .modal-order-items-content .order-items-current {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    flex-shrink: 0;
    position: relative;
    top: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  .modal-order-items-content .order-items-selected-list {
    max-height: min(28vh, 200px);
  }
  .modal-order-items-content .order-items-tree {
    flex: 1;
    min-height: 160px;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-order-items-content .order-items-tree-toolbar {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .modal-order-items-content .order-items-tree-toolbar .input {
    flex: 1;
    min-width: 0;
    width: auto;
    font-size: 16px;
    min-height: 44px;
  }
  .modal-order-items-content .order-items-tree-toggle {
    min-width: 40px;
    min-height: 40px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
  .modal-order-items-content .order-items-modal-actions {
    flex-shrink: 0;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: stretch;
  }
  .modal-order-items-content .order-items-modal-actions .btn {
    flex: 1;
    min-width: 0;
    min-height: 48px;
  }
  .modal-order-items-content .order-item-block .order-item-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  body.theme-dark .modal-order-items-content .order-items-modal-actions {
    border-top-color: #2a3546;
  }
  /* 零件库选择：底部抽屉 + 列表区占满剩余高度 */
  #modal-pick-part.modal {
    align-items: flex-end;
    justify-content: center;
    padding: max(0.35rem, env(safe-area-inset-top)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .modal-pick-part-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 12px 12px 0 0;
    max-height: min(94dvh, calc(100vh - env(safe-area-inset-top) - 0.5rem)) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .modal-pick-part-content .modal-header {
    flex-shrink: 0;
  }
  .modal-pick-part-content .modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .modal-pick-part-content .part-picker-search-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .modal-pick-part-content .part-picker-category { width: 100%; min-width: 0; }
  .modal-pick-part-content .part-picker-search {
    font-size: 16px;
    min-height: 44px;
    box-sizing: border-box;
  }
  .modal-pick-part-content .part-picker-toast {
    flex-shrink: 0;
  }
  .modal-pick-part-content .part-picker-list {
    flex: 1;
    min-height: 140px;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-pick-part-content .part-picker-actions {
    flex-shrink: 0;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
  }
  .modal-pick-part-content .part-picker-actions .btn {
    width: 100%;
    min-height: 48px;
  }
  #modal-pick-part .part-picker-head {
    display: none;
  }
  #modal-pick-part .part-picker-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
  }
  #modal-pick-part .part-picker-name {
    font-weight: 600;
    font-size: 0.95rem;
  }
  #modal-pick-part .part-picker-brand::before {
    content: '品牌：';
    color: #888;
    font-size: 0.8rem;
  }
  #modal-pick-part .part-picker-stock::before {
    content: '库存：';
    color: #888;
    font-size: 0.8rem;
    margin-right: 0.25rem;
  }
  #modal-pick-part .part-picker-meta::before {
    content: '单价：';
    color: #888;
    font-size: 0.8rem;
    margin-right: 0.25rem;
  }
  #modal-pick-part .part-picker-add {
    align-self: stretch;
    margin-top: 0.25rem;
    min-height: 44px;
    touch-action: manipulation;
  }
  body.theme-dark .modal-pick-part-content .part-picker-actions {
    border-top-color: #2a3546;
  }
  body.theme-dark #modal-pick-part .part-picker-brand::before,
  body.theme-dark #modal-pick-part .part-picker-stock::before,
  body.theme-dark #modal-pick-part .part-picker-meta::before {
    color: #8b9cad;
  }
  .settlement-flow {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  .settlement-flow-title { margin-bottom: 0.6rem; font-size: 1rem; }
  .points-tip-card,
  .points-calc-card,
  .points-offset-note { padding: 0.85rem 1rem; }
  .points-offset-note label { align-items: flex-start !important; }
  #final-amount,
  #settlement-original-amount {
    font-size: 16px;
    min-height: 48px;
    width: 100%;
    max-width: 100%;
  }
  #second-confirm-form .btn { width: 100%; min-height: 48px; }
  .settlement-flow #second-confirm-form {
    position: sticky;
    bottom: 0;
    padding-top: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    margin: 0 -1rem -1rem -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    background: inherit;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  }
  body.theme-dark .settlement-flow #second-confirm-form { background: #161f2d; box-shadow: 0 -2px 12px rgba(0,0,0,0.3); }
  .order-items-toast,
  .part-picker-toast {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 320px;
    z-index: 1002;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  .dashboard-chart-fullscreen-hint {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.5rem;
    text-align: center;
  }
  .dashboard-chart-card { cursor: pointer; }
  .modal-chart-fullscreen .modal-content {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  .modal-chart-fullscreen .modal-body { flex: 1; min-height: 0; padding: 0.5rem; }
  #chart-fullscreen-container { min-height: 60vh; }
  .dashboard-wrap { padding: 0 0.35rem 1.1rem; max-width: 100%; box-sizing: border-box; }
  .dashboard-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
  }
  .dashboard-hero-text { min-width: 0; }
  .dashboard-title {
    margin: 0 0 0.2rem;
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  .dashboard-desc {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--dash-desc-color);
  }
  .dashboard-dimension {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.45rem;
    width: 100%;
  }
  .dashboard-dimension-label {
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0;
  }
  .dashboard-page .stats-dimension-tabs {
    width: 100%;
    display: flex;
    padding: 0.2rem;
    gap: 0.2rem;
    box-sizing: border-box;
  }
  .dashboard-page .stats-dimension-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.32rem 0.35rem;
    font-size: 0.76rem;
    font-weight: 500;
    border-radius: 6px;
    min-height: 36px;
    box-sizing: border-box;
  }
  .dashboard-dimension-custom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.3rem 0.35rem;
    width: 100%;
    align-items: center;
    box-sizing: border-box;
  }
  .dashboard-dimension-custom .dashboard-date-label {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.7rem;
  }
  .dashboard-dimension-custom .dashboard-date-label span {
    font-size: inherit;
  }
  .dashboard-dimension-custom #stats-start-date {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
  }
  .dashboard-dimension-custom .dashboard-date-sep {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.72rem;
    padding: 0 0.1rem;
    white-space: nowrap;
  }
  .dashboard-dimension-custom #stats-end-date {
    grid-column: 3;
    grid-row: 2;
    min-width: 0;
    width: 100%;
  }
  .dashboard-dimension-custom #stats-query-range-btn {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    min-height: 40px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    margin: 0;
    box-sizing: border-box;
  }
  .dashboard-date-input {
    padding: 0.28rem 0.4rem;
    font-size: 0.78rem;
    min-width: 0;
    border-radius: 6px;
    box-sizing: border-box;
  }
  .dashboard-stats { flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
  .dashboard-stat-group { min-width: 0; width: 100%; box-sizing: border-box; }
  .dashboard-stat-group--finance .stats-group-cards--grid { grid-template-columns: 1fr; }
  .dashboard-stat-group .stat-label,
  .dashboard-stat-group .stat-value { word-break: break-all; }
  .dashboard-workbench { padding: 0.8rem; margin-bottom: 1rem; }
  .dashboard-workbench-cards { grid-template-columns: 1fr; }
  .dashboard-chart-card { min-width: 0; padding: 1rem; box-sizing: border-box; }
  .dashboard-chart-title { font-size: 0.9rem; }
  .orders-filters .toolbar,
  .orders-filter-row { flex-wrap: wrap; }
  .status-tab,
  .orders-page-toolbar .status-tab {
    min-height: 40px;
    padding: 0.5rem 0.85rem;
  }

  /* 全站：凡在 .card-table 内的移动端列表，末列操作区统一收进卡片、文案居中。
     用 !important 覆盖 1024 段 .card-table td:last-child nowrap 及各页 #id 选择器，避免窄屏撑出视口。 */
  .card-table .table > tbody > tr > td:last-child {
    white-space: normal !important;
    min-width: 0 !important;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .card-table .table > tbody > tr > td:last-child .table-op-btns {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
  }
  .card-table .table > tbody > tr > td:last-child .table-op-btns > .btn,
  .card-table .table > tbody > tr > td:last-child .table-op-btns > .btn-sm,
  .card-table .table > tbody > tr > td:last-child .table-op-btns > a.btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  /* 操作区与「新增」主按钮一致：整行铺满卡片内容区，文案 flex 居中（勿再缩进对齐数值列，易与裁切叠看成偏右） */
  .card-table .table > tbody > tr > td:last-child > .btn,
  .card-table .table > tbody > tr > td:last-child > .btn-sm,
  .card-table .table > tbody > tr > td:last-child > a.btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .top-bar {
    padding: 0.5rem 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    gap: 0.5rem;
  }
  .top-bar-brand { font-size: 0.9rem; }
  .top-bar .header-user-center { font-size: 0.78rem; max-width: 100%; }
  .top-bar .btn-theme,
  .top-bar .btn-outline { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
  .main { padding: 0.75rem; padding-left: max(0.75rem, env(safe-area-inset-left)); padding-right: max(0.75rem, env(safe-area-inset-right)); padding-bottom: calc(0.75rem + 56px); }
  .card { padding: 0.85rem; }
  .card.card-toolbar { padding: 0.65rem 0.75rem; }
  .btn-theme { margin-right: 0.25rem; width: 44px; height: 44px; }
  .btn-outline { padding: 0.5rem 0.75rem; font-size: 0.85rem; min-height: 44px; }
  .page-header .page-title { font-size: 1.1rem; }
  /* 与 ≤768px 竖版卡片冲突：禁止再撑 min-width，否则表宽超出视口被裁切；宽表（出入库明细等）保留横滚 */
  .card-table .table:not(#inv-stock-log-table):not(#inv-item-stock-log-table):not(#orders-table) {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
  }
  .card-table .table th,
  .card-table .table td { padding: 0.6rem 0.5rem; font-size: 0.85rem; }
  .card-table .table th:last-child,
  .card-table .table td:last-child {
    min-width: 0 !important;
    white-space: normal !important;
  }
  .orders-page-toolbar .status-tab,
  .status-tab {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    min-height: 40px;
  }
  .pickup-status-tabs-scroll .status-tab {
    min-height: 44px;
  }
  .modal-content { width: 94%; }
  .dashboard-wrap { padding: 0 0.25rem 0.95rem; }
  .dashboard-hero { margin-bottom: 0.65rem; padding-bottom: 0.55rem; gap: 0.5rem; }
  .dashboard-title { font-size: 1.02rem; margin-bottom: 0.12rem; }
  .dashboard-desc { font-size: 0.7rem; line-height: 1.35; }
  .dashboard-dimension { gap: 0.38rem; }
  .dashboard-dimension-label { font-size: 0.66rem; }
  .dashboard-page .stats-dimension-tabs { padding: 0.15rem; gap: 0.15rem; }
  .dashboard-page .stats-dimension-tab {
    padding: 0.28rem 0.25rem;
    font-size: 0.72rem;
    min-height: 34px;
  }
  .dashboard-dimension-custom { gap: 0.25rem 0.28rem; }
  .dashboard-dimension-custom .dashboard-date-label { font-size: 0.66rem; }
  .dashboard-date-input { font-size: 0.75rem; padding: 0.26rem 0.35rem; }
  .dashboard-dimension-custom .dashboard-date-sep { font-size: 0.68rem; }
  .dashboard-dimension-custom #stats-query-range-btn {
    min-height: 40px;
    font-size: 0.78rem;
  }
}

/* 触摸设备：弱化悬停、统一用点击态，避免触控后悬停残留 */
@media (hover: none) and (pointer: coarse) {
  .btn:hover { opacity: 1; }
  .btn-primary:active { opacity: 0.9; }
  .btn-outline:active,
  .btn-outline-secondary:active { background: rgba(255,255,255,0.08); }
  .nav-link:hover { background: rgba(255,255,255,0.08); }
  .nav-link:active { background: rgba(255,255,255,0.15); }
  .status-tab:hover { border-color: #d9d9d9; }
  .status-tab:active { border-color: #1890ff; background: #e6f7ff; }
}

/* ========== 已结算订单打印样式 ========== */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  .sidebar,
  .top-bar,
  .nav-hamburger,
  .nav-drawer-backdrop,
  #theme-toggle-btn,
  #logout-btn,
  .breadcrumb,
  .no-print,
  .pager,
  .btn { display: none !important; }
  .main { padding: 0; }
  #page-order-detail { display: block !important; }
  #page-order-detail.page { display: block !important; }
  #page-order-detail.hidden { display: block !important; }
  .page:not(#page-order-detail) { display: none !important; }

  /* 打印标题区 */
  .order-print-header {
    display: block !important;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #333;
  }
  .order-print-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
  }
  .order-print-meta {
    font-size: 0.9rem;
    color: #333;
  }

  /* 打印时隐藏预估 */
  .detail-item-no-print { display: none !important; }

  /* 打印：优惠价格、最终实收显示在订单右下角 */
  .order-print-price-footer {
    display: block !important;
    margin-top: 1rem;
    text-align: right;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
  }

  /* 订单详情内容区 */
  .order-detail-printable { max-width: 100%; }
  .order-detail-wrap { position: relative; }
  .order-stamp {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 80px;
    height: 80px;
    font-size: 1.1rem;
    border: 3px solid #000;
    color: #000;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 打印时隐藏内联编辑元素 */
  .item-action-cell,
  .item-edit-row,
  .order-add-item-btn { display: none !important; }

  .order-detail-printable .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #333;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
  }
  .order-detail-printable .card h3 {
    font-size: 1rem;
    margin: 0 0 0.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #333;
  }
  .order-detail-printable .detail-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.4rem;
  }
  .order-detail-printable .detail-item {
    font-size: 0.85rem;
    color: #000;
  }
  .order-detail-printable .detail-item a { color: #000; text-decoration: none; }

  /* 明细表 */
  .order-detail-items-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
  }
  .order-detail-items-table th,
  .order-detail-items-table td {
    border: 1px solid #333;
    padding: 0.4rem 0.5rem;
    color: #000;
  }
  .order-detail-items-table th { font-weight: 700; background: #f5f5f5; }
  .order-detail-items-table .order-detail-parts-cell { line-height: 1.4; }
  .order-parts-subtotal { color: #000; font-weight: 600; }
}

/* ========== 车牌展示：油车蓝、电车绿、未知灰 ========== */
.plate-chip {
  display: inline-block;
  padding: 0.12em 0.5em;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95em;
  letter-spacing: 0.02em;
  line-height: 1.35;
  vertical-align: middle;
  border: 1px solid transparent;
  white-space: nowrap;
}
.plate-chip--fuel {
  color: #0d47a1;
  background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
  border-color: #64b5f6;
}
.plate-chip--electric {
  color: #1b5e20;
  background: linear-gradient(180deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #66bb6a;
}
.plate-chip--unknown {
  color: #37474f;
  background: #eceff1;
  border-color: #b0bec5;
}
body.theme-dark .plate-chip--fuel {
  color: #90caf9;
  background: rgba(13, 71, 161, 0.4);
  border-color: #42a5f5;
}
body.theme-dark .plate-chip--electric {
  color: #a5d6a7;
  background: rgba(27, 94, 32, 0.4);
  border-color: #66bb6a;
}
body.theme-dark .plate-chip--unknown {
  color: #cfd8dc;
  background: #37474f;
  border-color: #546e7a;
}

/* toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 22px; transition: .2s; }
.toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle-switch input:checked + .toggle-slider { background: #52c41a; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
body.theme-dark .toggle-slider { background: #555; }
body.theme-dark .toggle-switch input:checked + .toggle-slider { background: #52c41a; }

/* 积分明细弹窗 */
.points-log-summary { display:flex; align-items:center; gap:0.5rem; margin-bottom:1rem; padding:0.75rem 1rem; background:linear-gradient(135deg,#c41e3a,#e8533f); border-radius:8px; color:#fff; }
.points-log-summary-label { font-size:0.9rem; opacity:0.9; }
.points-log-summary-value { font-size:1.6rem; font-weight:700; }
.points-log-table { font-size:0.85rem; }
.points-log-table th { position:sticky; top:0; background:#f6f8fc; z-index:1; }
.points-log-table .amount-pos { color:#07C160; font-weight:600; }
.points-log-table .amount-neg { color:#f44; font-weight:600; }

/* 修复：移动端用户列表卡片标签重叠（覆盖通用表格卡片化规则） */
@media (max-width: 768px) {
  .users-page #users-table tbody tr.users-table-row td:not(.users-table-actions-cell) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    padding: 0.45rem 0 !important;
    position: static !important;
  }
  .users-page #users-table tbody tr.users-table-row td::before {
    content: attr(data-label) !important;
    position: static !important;
    display: block;
    width: auto !important;
    max-width: 100%;
    white-space: normal !important;
    margin: 0;
    line-height: 1.35;
  }
  .users-page #users-table tbody tr.users-table-row td.users-table-actions-cell {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.5rem;
    padding: 0.45rem 0 !important;
    position: static !important;
  }
}

/* 供应商列表表格（参照管理端列表样式） */
.suppliers-list-wrap { overflow-x: auto; }
.suppliers-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.suppliers-list-table thead th {
  background: #f0f0f0;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #d9d9d9;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}
.suppliers-list-table tbody td {
  border-bottom: 1px solid #e8e8e8;
  padding: 10px 12px;
  vertical-align: middle;
  text-align: left;
}
.suppliers-list-table tbody tr:nth-child(even) {
  background: #fafafa;
}
.suppliers-list-table tbody tr:hover {
  background: #f5faff;
}
.suppliers-list-th-check { width: 40px; text-align: center !important; }
.suppliers-list-table tbody td:first-child {
  text-align: center;
  width: 40px;
}
.suppliers-list-th-actions { width: 8.5rem; white-space: nowrap; }
.suppliers-list-table .supplier-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.suppliers-list-table .suppliers-cell-ellipsis {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.supplier-name-link,
button.supplier-action-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: #1890ff;
  text-align: left;
}
button.supplier-name-link:hover,
button.supplier-action-link:hover {
  text-decoration: underline;
  color: #40a9ff;
}
button.supplier-action-link--muted {
  color: #8c8c8c;
  margin-left: 0.5rem;
  font-size: 0.875rem;
}
button.supplier-action-link--danger {
  color: #ff4d4f;
}
button.supplier-action-link--danger:hover {
  color: #ff7875;
}
.supplier-auto {
  font-weight: 500;
  white-space: nowrap;
}
.supplier-auto--on { color: #52c41a; }
.supplier-auto--off { color: #fa8c16; }
body.theme-dark .suppliers-list-table thead th {
  background: #2d2d2d;
  color: #e8e8e8;
  border-bottom-color: #444;
}
body.theme-dark .suppliers-list-table tbody td {
  border-bottom-color: #333;
}
body.theme-dark .suppliers-list-table tbody tr:nth-child(even) {
  background: #262626;
}
body.theme-dark .suppliers-list-table tbody tr:hover {
  background: #1f2f45;
}
body.theme-dark button.supplier-name-link,
body.theme-dark button.supplier-action-link {
  color: #69b1ff;
}
body.theme-dark .supplier-auto--on { color: #73d13d; }
body.theme-dark .supplier-auto--off { color: #ffa940; }

/* 供应商列表 — 状态药丸（可点击 × / 整颗切换启停） */
button.supplier-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  padding: 2px 6px 2px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
  font-family: inherit;
  vertical-align: middle;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
button.supplier-status-pill .supplier-status-pill-text {
  padding: 1px 0;
}
button.supplier-status-pill .supplier-status-pill-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  margin-left: 1px;
  border-radius: 50%;
  font-size: 0.875rem;
  line-height: 1;
  opacity: 0.88;
  flex-shrink: 0;
}
button.supplier-status-pill--on {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}
button.supplier-status-pill--on:hover {
  background: #d9f7be;
  border-color: #95de64;
}
button.supplier-status-pill--on .supplier-status-pill-close:hover {
  background: rgba(82, 196, 26, 0.22);
  color: #237804;
}
button.supplier-status-pill--off {
  background: #fafafa;
  color: #8c8c8c;
  border: 1px solid #d9d9d9;
}
button.supplier-status-pill--off:hover {
  background: #f0f0f0;
  border-color: #bfbfbf;
  color: #595959;
}
button.supplier-status-pill--off .supplier-status-pill-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #434343;
}
span.supplier-status-pill--readonly {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  cursor: default;
}
span.supplier-status-pill--readonly.supplier-status-pill--on {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}
span.supplier-status-pill--readonly.supplier-status-pill--off {
  background: #fafafa;
  color: #8c8c8c;
  border: 1px solid #d9d9d9;
}
body.theme-dark button.supplier-status-pill--on {
  background: #162312;
  color: #95de64;
  border-color: #274916;
}
body.theme-dark button.supplier-status-pill--on:hover {
  background: #1f3318;
}
body.theme-dark button.supplier-status-pill--off {
  background: #2a2a2a;
  color: #bfbfbf;
  border-color: #434343;
}
body.theme-dark span.supplier-status-pill--readonly.supplier-status-pill--on {
  background: #162312;
  color: #95de64;
  border-color: #274916;
}
body.theme-dark span.supplier-status-pill--readonly.supplier-status-pill--off {
  background: #2a2a2a;
  color: #a6a6a6;
  border-color: #434343;
}

.po-inbound-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  cursor: default;
  vertical-align: middle;
  box-sizing: border-box;
  border: 1px solid transparent;
}
.po-inbound-status-pill--on {
  background: #f6ffed;
  color: #389e0d;
  border-color: #b7eb8f;
}
.po-inbound-status-pill--off {
  background: #fafafa;
  color: #8c8c8c;
  border-color: #d9d9d9;
}
.po-inbound-status-pill--cancel {
  background: #fff2f0;
  color: #cf1322;
  border-color: #ffccc7;
}
.po-inbound-status-pill--readonly {
  background: #f5f5f5;
  color: #8c8c8c;
  border-color: #d9d9d9;
}
button.po-inbound-status-pill {
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
}
button.po-inbound-status-pill:hover {
  background: #f0f0f0;
  border-color: #bfbfbf;
  color: #595959;
}

body.theme-dark .po-inbound-status-pill--on {
  background: #162312;
  color: #95de64;
  border-color: #274916;
}
body.theme-dark .po-inbound-status-pill--off {
  background: #2a2a2a;
  color: #bfbfbf;
  border-color: #434343;
}
body.theme-dark .po-inbound-status-pill--cancel {
  background: #2b1218;
  color: #ff4d4f;
  border-color: #5d272c;
}
body.theme-dark .po-inbound-status-pill--readonly {
  background: #2b2b2b;
  color: #a6a6a6;
  border-color: #434343;
}
body.theme-dark button.po-inbound-status-pill:hover {
  background: #363636;
  border-color: #595959;
  color: #f0f0f0;
}

/* 供应商管理 Tab */
.suppliers-tab-bar .suppliers-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -2px;
  padding: 8px 14px;
  color: #666;
}
.suppliers-tab-bar .suppliers-tab-btn:hover {
  color: #333;
}
.suppliers-tab-bar .suppliers-tab-btn.active {
  color: #ff7a45;
  border-bottom-color: #ff7a45;
  font-weight: 600;
}
body.theme-dark .suppliers-tab-bar .suppliers-tab-btn { color: #aaa; }
body.theme-dark .suppliers-tab-bar .suppliers-tab-btn.active {
  color: #ff9a6b;
  border-bottom-color: #ff9a6b;
}

/* ========== 采购单详情 / 新建（参照业务单据布局） ========== */
.purchase-order-detail-page {
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 96px;
}
.po-breadcrumb {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 8px;
}
.po-breadcrumb a {
  color: #fa8c16;
  text-decoration: none;
}
.po-breadcrumb a:hover {
  text-decoration: underline;
}
.po-bc-sep {
  margin: 0 6px;
  color: #bbb;
}
.po-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.po-detail-head-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.po-detail-page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #262626;
}
.po-detail-status-badge {
  vertical-align: middle;
}
.po-detail-creator {
  font-size: 0.9rem;
  color: #666;
  white-space: nowrap;
}
.po-section {
  padding: 16px 18px;
  margin-bottom: 14px;
}
.po-section-title {
  margin: 0 0 14px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #262626;
  padding-left: 10px;
  border-left: 3px solid #fa8c16;
}
.po-supplier-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.po-supplier-search {
  flex: 1;
  min-width: 200px;
  max-width: 420px;
}
.po-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
}
.po-form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.po-span-2 {
  grid-column: span 2;
}
@media (max-width: 1100px) {
  .po-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .po-span-2 {
    grid-column: span 2;
  }
}
@media (max-width: 600px) {
  .po-form-grid,
  .po-form-grid-2 {
    grid-template-columns: 1fr;
  }
  .po-span-2 {
    grid-column: span 1;
  }
}
.po-supplier-readonly {
  background: #fafafa;
  color: #595959;
}
body.theme-dark .po-supplier-readonly {
  background: #2a2a2a;
  color: #bfbfbf;
}
.po-line-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.po-line-toolbar-spacer {
  flex: 1;
  min-width: 8px;
}
.po-beta-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1.4;
  color: #fff;
  background: #f5222d;
  border-radius: 2px;
  vertical-align: middle;
}
.btn-po-warn {
  background: #fa8c16;
  border-color: #fa8c16;
  color: #fff;
}
.btn-po-warn:hover:not(:disabled) {
  background: #ffa940;
  border-color: #ffa940;
  color: #fff;
}
.btn-po-warn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.po-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
}
/* 列多：表格按内容撑开，窄屏横向滚动，避免把列挤成碎块 */
.po-table-wrap .po-lines-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  margin: 0;
  overflow: visible;
  font-size: 0.88rem;
  box-shadow: none;
}
.po-table-wrap .po-lines-table th,
.po-table-wrap .po-lines-table td {
  vertical-align: middle;
  padding: 8px 10px;
  white-space: nowrap;
}
.po-table-wrap .po-lines-table th.po-col-name,
.po-table-wrap .po-lines-table td.po-col-name,
.po-table-wrap .po-lines-table td.po-col-spec {
  white-space: normal;
}
.po-lines-table .po-line-name {
  width: 200px;
  min-width: 160px;
  max-width: 260px;
  box-sizing: border-box;
}
.po-lines-table .po-line-spec {
  width: 130px;
  min-width: 110px;
  max-width: 180px;
  box-sizing: border-box;
}

/* 采购单明细：材料名称联想（零配件 + 库存） */
.po-line-name-suggest-panel {
  position: fixed;
  z-index: 100000;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  padding: 4px 0;
  box-sizing: border-box;
}
.po-line-name-suggest-panel.hidden {
  display: none !important;
}
.po-line-name-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.35;
}
.po-line-name-suggest-item:hover,
.po-line-name-suggest-item:focus {
  background: #fff7e6;
  outline: none;
}
.po-line-name-suggest-title {
  display: block;
  font-weight: 600;
  color: #262626;
}
.po-line-name-suggest-sub {
  display: block;
  margin-top: 2px;
  color: #8c8c8c;
  font-size: 0.8rem;
}
.po-line-name-suggest-empty {
  padding: 10px 12px;
  color: #8c8c8c;
  font-size: 0.85rem;
}
body.theme-dark .po-line-name-suggest-panel {
  background: #1f1f1f;
  border-color: #434343;
}
body.theme-dark .po-line-name-suggest-title {
  color: #f0f0f0;
}
body.theme-dark .po-line-name-suggest-sub {
  color: #a6a6a6;
}
body.theme-dark .po-line-name-suggest-item:hover,
body.theme-dark .po-line-name-suggest-item:focus {
  background: #2a2a2a;
}
.po-col-idx {
  text-align: center;
}
/*
 * 采购明细四列：按实际字符定宽（6位ID / 数量4位小数 / 2字单位 / 单价5位+小数）
 * 只改 col + th/td 列宽，输入框铺满列内；勿再单独改 padding 冒充列宽
 */
.po-table-wrap .po-lines-table {
  --po-w-part-id: 4.5rem;
  --po-w-qty: 4.25rem;
  --po-w-unit: 2.75rem;
  --po-w-price: 5rem;
}
.po-table-wrap .po-lines-table col.po-cw-part-id { width: var(--po-w-part-id); }
.po-table-wrap .po-lines-table col.po-cw-qty { width: var(--po-w-qty); }
.po-table-wrap .po-lines-table col.po-cw-unit { width: var(--po-w-unit); }
.po-table-wrap .po-lines-table col.po-cw-price { width: var(--po-w-price); }
.po-table-wrap .po-lines-table th.po-col-part-id,
.po-table-wrap .po-lines-table td.po-col-part-id {
  width: var(--po-w-part-id);
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}
.po-table-wrap .po-lines-table th.po-col-qty,
.po-table-wrap .po-lines-table td.po-col-qty {
  width: var(--po-w-qty);
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}
.po-table-wrap .po-lines-table th.po-col-unit,
.po-table-wrap .po-lines-table td.po-col-unit {
  width: var(--po-w-unit);
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}
.po-table-wrap .po-lines-table th.po-col-price,
.po-table-wrap .po-lines-table td.po-col-price {
  width: var(--po-w-price);
  padding-left: 6px;
  padding-right: 6px;
  text-align: right;
}
.po-lines-table .po-line-part,
.po-lines-table .po-line-qty,
.po-lines-table .po-line-unit,
.po-lines-table .po-line-price {
  width: 100%;
  box-sizing: border-box;
}
.po-lines-table .po-line-part,
.po-lines-table .po-line-qty,
.po-lines-table .po-line-unit {
  text-align: center;
}
.po-lines-table .po-line-price {
  text-align: right;
}
.po-lines-table .po-line-amount {
  text-align: right;
  min-width: 4rem;
}
.po-col-actions {
  width: 72px;
}
.po-cell-muted {
  color: #bfbfbf;
  text-align: center;
  font-size: 0.85rem;
}
.po-lines-total-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 12px 14px;
  margin-top: 0;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  font-size: 0.95rem;
}
.po-total-label {
  font-weight: 600;
  margin-right: 8px;
}
.po-total-qty strong,
.po-total-amt strong {
  font-weight: 600;
  color: #262626;
}
.po-textarea {
  min-height: 72px;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}
.po-field-hint {
  margin: 8px 0 0 0;
  font-size: 0.85rem;
}
.po-upload-zone {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  padding: 28px 16px;
  text-align: center;
  color: #8c8c8c;
  font-size: 0.9rem;
  background: #fafafa;
  cursor: pointer;
}
.po-upload-zone[data-readonly="1"] {
  cursor: default;
  opacity: 0.85;
}
.po-upload-zone--drag {
  border-color: #fa8c16;
  background: #fff7e6;
}
.po-images-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.po-image-thumb {
  position: relative;
  width: 96px;
  height: 96px;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.po-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.po-image-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 20px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
}
.po-image-remove:hover {
  background: rgba(0, 0, 0, 0.65);
}
body.theme-dark .po-upload-zone {
  background: #1f1f1f;
  border-color: #434343;
  color: #8c8c8c;
}
.po-detail-footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  margin: 16px -8px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #fff 24%);
  border-top: 1px solid #f0f0f0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}
body.theme-dark .po-detail-footer {
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.95) 0%, #1e1e1e 24%);
  border-top-color: #333;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35);
}
.po-detail-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.purchase-order-detail-page .po-detail-footer .btn-primary {
  background: #fa8c16;
  border-color: #fa8c16;
}
.purchase-order-detail-page .po-detail-footer .btn-primary:hover:not(:disabled) {
  background: #ffa940;
  border-color: #ffa940;
}
body.theme-dark .purchase-order-detail-page .po-detail-footer .btn-primary {
  background: #d87a14;
  border-color: #d87a14;
}

/* 采购单：安全库存下限预警弹窗 */
#modal-po-safety-stock .modal-content.modal-po-safety-stock-content {
  width: 96%;
  max-width: 1000px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
#modal-po-safety-stock .modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
}
.po-safety-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  margin-bottom: 14px;
}
.po-safety-field {
  min-width: 140px;
}
.po-safety-field-grow {
  flex: 1;
  min-width: 180px;
}
.po-safety-toolbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.po-safety-table-wrap {
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  overflow: auto;
  max-height: 42vh;
}
.po-safety-table {
  margin: 0;
  font-size: 0.9rem;
}
.po-safety-table thead th {
  background: #fafafa;
  font-weight: 600;
  white-space: nowrap;
}
.po-safety-col-check {
  width: 44px;
  text-align: center;
}
.po-safety-empty {
  text-align: center;
  color: #8c8c8c;
  padding: 28px 12px !important;
}
.po-safety-pager {
  margin-top: 12px;
}
.po-safety-pager-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.po-safety-pager-info {
  margin-right: auto;
  color: #666;
  font-size: 0.9rem;
}
.po-safety-pager-num {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  color: #fa8c16;
}
.po-safety-pager-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #666;
}
.po-safety-goto-input {
  width: 52px;
  padding: 4px 6px;
  min-height: 32px;
}
#po-safety-page-size {
  max-width: 120px;
}
.po-safety-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #f0f0f0;
}
body.theme-dark .po-safety-table thead th {
  background: #2a2a2a;
}
body.theme-dark .po-safety-table-wrap {
  border-color: #434343;
}

/* 采购单：绑定车辆弹窗（与安全库存弹窗同量级宽度；表格按列内容宽度，车型单行不换行；列后不再被拉伸出大块空白） */
#modal-po-vehicle-picker .modal-content.modal-po-vehicle-picker-content {
  width: 96%;
  max-width: 1000px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
#modal-po-vehicle-picker .modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
}
#modal-po-vehicle-picker .po-veh-table-wrap {
  overflow-x: auto;
}
#modal-po-vehicle-picker .po-veh-table {
  width: max-content;
  max-width: 100%;
  margin: 0;
  table-layout: auto;
}
#modal-po-vehicle-picker .po-veh-table th:nth-child(4),
#modal-po-vehicle-picker .po-veh-table td:nth-child(4) {
  white-space: nowrap;
}

/* 采购单：仓库选择弹窗 */
#modal-po-warehouse-picker .modal-content.modal-po-warehouse-picker-content {
  width: 92%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
#modal-po-warehouse-picker .modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
}
.po-wh-table-wrap {
  max-height: none;
}
.po-wh-summary {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}
.po-wh-modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #f0f0f0;
}
.po-wh-footer-spacer {
  flex: 1;
}
body.theme-dark .po-wh-summary {
  color: #aaa;
}
body.theme-dark .po-wh-modal-footer {
  border-top-color: #434343;
}

/* 采购单：批量添加材料弹窗 */
#modal-po-batch-materials .modal-content.modal-po-batch-materials-content {
  width: 96%;
  max-width: 1180px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
#modal-po-batch-materials .modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
}
.po-bm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  margin-bottom: 12px;
}
.po-bm-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  flex: 1;
  min-width: 0;
}
@media (max-width: 1100px) {
  .po-bm-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .po-bm-form-grid {
    grid-template-columns: 1fr;
  }
}
.po-bm-field-dates .po-bm-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.po-bm-field-dates .po-bm-date-range .input {
  flex: 1;
  min-width: 120px;
}
.po-bm-date-sep {
  color: #8c8c8c;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.po-bm-field-stock .po-bm-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: normal;
  cursor: pointer;
  min-height: 32px;
}
.po-bm-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-left: auto;
  flex-shrink: 0;
}
.po-bm-table-wrap {
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  overflow: auto;
  max-height: min(46vh, 420px);
}
.po-bm-table {
  margin: 0;
  font-size: 0.88rem;
  min-width: 1100px;
}
.po-bm-table thead th {
  background: #fafafa;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}
.po-bm-sort-th {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.po-bm-sort-th:hover {
  color: #fa8c16;
}
.po-bm-sort-th.is-active {
  color: #fa8c16;
}
.po-bm-col-check {
  width: 42px;
  text-align: center;
}
.po-bm-empty {
  text-align: center;
  color: #8c8c8c;
  padding: 24px 12px !important;
}
.po-bm-pager {
  margin-top: 10px;
}
.po-bm-pager-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.po-bm-pager-info {
  margin-right: auto;
  color: #666;
  font-size: 0.9rem;
}
.po-bm-page-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
}
.po-bm-pager-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #666;
}
.po-bm-goto-input {
  width: 52px;
  padding: 4px 6px;
  min-height: 30px;
}
#po-bm-page-size {
  max-width: 110px;
}
.po-bm-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
}
body.theme-dark .po-bm-table thead th {
  background: #2a2a2a;
}
body.theme-dark .po-bm-table-wrap {
  border-color: #434343;
}

/* 库存管理：主导航入口页签 */
#page-inventory-hub .inv-hub-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-bottom: none;
  margin-bottom: 1.25rem;
}
#page-inventory-hub .inv-hub-tab {
  padding: 0.55rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0;
  white-space: nowrap;
  transition: all .18s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
#page-inventory-hub .inv-hub-tab:hover {
  color: #ea580c;
  border-color: #fed7aa;
  background: #fff7ed;
}
#page-inventory-hub .inv-hub-tab.active {
  color: #fff;
  background: #ea580c;
  border-color: #ea580c;
  box-shadow: 0 2px 6px rgba(234,88,12,.25);
}
body.theme-dark #page-inventory-hub .inv-hub-tabbar {
  /* no overrides needed */
}
body.theme-dark #page-inventory-hub .inv-hub-tab {
  color: #94a3b8;
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}
body.theme-dark #page-inventory-hub .inv-hub-tab:hover {
  color: #fb923c;
  background: rgba(251,146,60,.1);
  border-color: rgba(251,146,60,.3);
}
body.theme-dark #page-inventory-hub .inv-hub-tab.active {
  color: #fff;
  background: #ea580c;
  border-color: #ea580c;
  box-shadow: 0 2px 8px rgba(234,88,12,.35);
}

/* 销售明细：字段很多，需横向+纵向滚动 */
.inv-report-card {
  padding: 1rem 1.1rem;
}
.inv-report-breadcrumb {
  color: #64748b;
  font-size: 0.86rem;
  margin-bottom: 0.65rem;
}
.inv-report-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  margin-bottom: 0.8rem;
}
.inv-report-datebar,
.inv-report-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.inv-report-datebar {
  margin-bottom: 0.85rem;
}
.inv-report-filterbar {
  margin-bottom: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid #edf2f7;
}
.inv-report-datebar .input,
.inv-report-filterbar .input {
  min-width: 150px;
}
.inv-report-filterbar .inv-report-field {
  flex: 1 1 260px;
}
.inv-report-filterbar .inv-report-field .input {
  width: min(420px, 100%);
}
.inv-report-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.inv-report-field label {
  color: #64748b;
  font-size: 0.88rem;
  white-space: nowrap;
}
/* 盘点单创建区：表单行 + 选项芯片勾选 */
.inv-count-create-card {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
}
.inv-count-create-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  width: 100%;
}
.inv-count-create-field {
  margin: 0;
  flex: 0 0 auto;
}
.inv-count-create-field .input,
.inv-count-create-field select.input {
  min-width: 140px;
}
.inv-count-create-field-remark {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 320px;
}
.inv-count-create-field-remark .input {
  width: 100%;
  min-width: 0;
}
.inv-count-create-options {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  flex: 1 1 280px;
}
.inv-count-create-submit {
  flex: 0 0 auto;
  align-self: flex-end;
  min-height: 36px;
}
.inv-count-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 40px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.inv-count-check:hover {
  border-color: #91caff;
  background: #f0f9ff;
}
.inv-count-check:has(input:focus-visible) {
  outline: 2px solid rgba(24, 144, 255, 0.35);
  outline-offset: 1px;
}
.inv-count-check:has(input:checked) {
  border-color: #69b1ff;
  background: #e6f4ff;
  box-shadow: 0 0 0 1px rgba(24, 144, 255, 0.12);
}
.inv-count-check input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.inv-count-check-box {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.inv-count-check:has(input:checked) .inv-count-check-box {
  border-color: #1890ff;
  background: #1890ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1.5 5.2 4.4 8.1 10.5 1.9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 9px;
}
.inv-count-check-text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.inv-count-check-wide {
  flex: 1 1 220px;
  max-width: 300px;
}
body.theme-dark .inv-count-check {
  background: #1a2332;
  border-color: #374151;
  color: #e2e8f0;
}
body.theme-dark .inv-count-check:hover {
  border-color: #177ddc;
  background: #1e293b;
}
body.theme-dark .inv-count-check:has(input:checked) {
  border-color: #177ddc;
  background: #111d2c;
  box-shadow: 0 0 0 1px rgba(23, 125, 220, 0.25);
}
body.theme-dark .inv-count-check-box {
  border-color: #4b5563;
  background: #0f141d;
}
body.theme-dark .inv-count-check:has(input:checked) .inv-count-check-box {
  border-color: #177ddc;
  background: #177ddc;
}
@media (max-width: 768px) {
  .inv-count-create-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .inv-count-create-options {
    flex-direction: column;
  }
  .inv-count-check-wide {
    max-width: none;
  }
  .inv-count-create-submit {
    width: 100%;
  }
}
/* 盘点使用说明（列表 / 详情 / 库存中心） */
.inv-count-guide {
  margin-bottom: 1rem;
  padding: 0;
  border: 1px solid #c5daf0;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8fd 100%);
  overflow: hidden;
}
.inv-count-guide--compact {
  margin-bottom: 0.75rem;
}
.inv-count-guide__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a3a5c;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.inv-count-guide__summary::-webkit-details-marker {
  display: none;
}
.inv-count-guide__summary::before {
  content: '▸';
  font-size: 0.75rem;
  color: #5b8fc7;
  transition: transform 0.15s ease;
}
.inv-count-guide[open] .inv-count-guide__summary::before {
  transform: rotate(90deg);
}
.inv-count-guide__body {
  padding: 0 14px 12px;
  border-top: 1px solid #dce8f4;
  font-size: 0.84rem;
  color: #445;
  line-height: 1.55;
}
.inv-count-guide--compact .inv-count-guide__body {
  padding-bottom: 10px;
}
.inv-count-guide__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 10px;
}
.inv-count-guide__heading {
  margin: 10px 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}
.inv-count-guide__steps {
  margin: 0;
  padding-left: 1.25rem;
}
.inv-count-guide__steps li {
  margin-bottom: 4px;
}
.inv-count-guide__notes {
  margin: 0;
  padding-left: 1.1rem;
}
.inv-count-guide__notes li {
  margin-bottom: 4px;
}
.inv-count-guide__notes code {
  font-size: 0.8em;
  padding: 0 4px;
  background: #e8f0f8;
  border-radius: 3px;
}
.inv-count-guide__status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.inv-count-guide__status-table th,
.inv-count-guide__status-table td {
  border: 1px solid #dce4ec;
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
}
.inv-count-guide__status-table th {
  background: #eef4fa;
  color: #475569;
  font-weight: 600;
}
.inv-count-guide__status-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.55);
}
.inv-count-status-tip {
  margin: 0 0 0.75rem;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #91caff;
  background: #e6f4ff;
  color: #0958d9;
  font-size: 0.88rem;
  line-height: 1.45;
}
.inv-count-status-tip.hidden {
  display: none;
}
.ic-lines-hint {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.ic-lines-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  line-height: 1.5;
}
.inv-count-ops-cell,
#ic-list-table td:last-child,
#inv-count-list-table td:last-child {
  white-space: nowrap;
}
.inv-count-ops-cell .btn,
#ic-list-table td:last-child .btn,
#inv-count-list-table td:last-child .btn {
  margin-left: 6px;
  vertical-align: middle;
}
.inv-count-ops-cell .btn:first-child,
#ic-list-table td:last-child .btn:first-child,
#inv-count-list-table td:last-child .btn:first-child {
  margin-left: 0;
}
.inv-count-ops-cell .btn-danger.ic-count-del,
#ic-list-table .btn-danger.ic-count-del,
#inv-count-list-table .btn-danger.ic-count-del {
  background: #ff4d4f;
  border-color: #ff4d4f;
  color: #fff;
  text-decoration: none;
  box-shadow: none;
}
.inv-count-ops-cell .btn-danger.ic-count-del:hover,
#ic-list-table .btn-danger.ic-count-del:hover,
#inv-count-list-table .btn-danger.ic-count-del:hover {
  background: #ff7875;
  border-color: #ff7875;
  color: #fff;
}
#ic-lines-table .ic-line-remark {
  min-width: 140px;
  max-width: 220px;
}
#ic-lines-table .ic-line-remark:disabled {
  background: #f5f5f5;
  color: #bfbfbf;
  cursor: not-allowed;
}
#ic-lines-table .ic-line-remark.ic-line-remark-active:not(:disabled) {
  border-color: #ff7875;
  background: #fff;
}
body.theme-dark #ic-lines-table .ic-line-remark:disabled {
  background: #1a2332;
  color: #5c6b80;
}
body.theme-dark #ic-lines-table .ic-line-remark.ic-line-remark-active:not(:disabled) {
  border-color: #ff7875;
  background: #151f2e;
}
@media (max-width: 900px) {
  .inv-count-guide__grid {
    grid-template-columns: 1fr;
  }
}
body.theme-dark .inv-count-guide {
  border-color: #2a4a6a;
  background: linear-gradient(180deg, #1a2838 0%, #151f2e 100%);
}
body.theme-dark .inv-count-guide__summary {
  color: #9ec5f0;
}
body.theme-dark .inv-count-guide__body {
  border-top-color: #2a3546;
  color: #b0bec5;
}
body.theme-dark .inv-count-guide__heading {
  color: #c5d0dc;
}
body.theme-dark .inv-count-guide__notes code {
  background: #1e293b;
  color: #dce6f5;
}
body.theme-dark .inv-count-guide__status-table th,
body.theme-dark .inv-count-guide__status-table td {
  border-color: #2a3546;
}
body.theme-dark .inv-count-guide__status-table th {
  background: #1e293b;
  color: #a0aec0;
}
body.theme-dark .inv-count-guide__status-table tbody tr:nth-child(even) {
  background: rgba(15, 20, 28, 0.5);
}
body.theme-dark .inv-count-status-tip {
  border-color: #177ddc;
  background: #111d2c;
  color: #69b1ff;
}
.ic-lines-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.inv-count-match-book-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid #d6e4f0;
  border-radius: 8px;
  background: #f7fbff;
  font-size: 0.88rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.inv-count-match-book-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}
body.theme-dark .inv-count-match-book-label {
  background: #1a2838;
  border-color: #2a4a6a;
  color: #c5d0dc;
}
.inv-count-post-action-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.inv-count-post-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #91caff;
  border-radius: 50%;
  background: #fff;
  color: #1677ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}
.inv-count-post-help-btn:hover {
  background: #e6f4ff;
  border-color: #1677ff;
}
.inv-count-post-help-btn:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.35);
  outline-offset: 1px;
}
body.theme-dark .inv-count-post-help-btn {
  background: #151c27;
  border-color: #177ddc;
  color: #69b1ff;
}
body.theme-dark .inv-count-post-help-btn:hover {
  background: #111d2c;
}
.inv-report-date-sep {
  color: #94a3b8;
  font-size: 0.86rem;
}
/* 库存中心 - 领料出库工单队列 */
.inv-pick-filter-primary .inv-pick-field-keyword {
  flex: 1 1 220px;
  min-width: 160px;
}
.inv-pick-filter-primary .inv-pick-field-keyword .input {
  width: 100%;
  max-width: 480px;
}
.inv-pick-list-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  align-items: flex-end;
  border-bottom: 1px solid #ececec;
  flex: 1 1 auto;
}
.inv-pick-list-tab {
  position: relative;
  margin-bottom: -1px;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #333;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}
.inv-pick-list-tab:hover {
  color: #ff8a00;
}
.inv-pick-list-tab.active {
  color: #ff8a00;
  font-weight: 600;
}
.inv-pick-list-tab.active::after {
  content: '';
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: -1px;
  height: 3px;
  border-radius: 2px;
  background: #ff8a00;
}
.inv-pick-tab-badge {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.85em;
}
.inv-pick-actions a {
  margin-right: 0.65rem;
  white-space: nowrap;
}
.inv-pick-order-no-link,
.inv-pick-order-no-link:visited {
  color: #1677ff;
  text-decoration: underline;
}
.inv-pick-order-no-link:hover {
  color: #4096ff;
}
body.theme-dark .inv-pick-order-no-link,
body.theme-dark .inv-pick-order-no-link:visited {
  color: #b9dcff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.theme-dark .inv-pick-order-no-link:hover {
  color: #d7eaff;
}

/* 管理端：通用行内链接（列设置「全选/全不选」、未来其它无 token 的 <a>） */
.admin-inline-link,
.admin-inline-link:visited {
  color: #1677ff;
  text-decoration: underline;
}
.admin-inline-link:hover {
  color: #4096ff;
}
body.theme-dark .admin-inline-link,
body.theme-dark .admin-inline-link:visited {
  color: #b9dcff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.theme-dark .admin-inline-link:hover {
  color: #d7eaff;
}

/* 领料出库：退料（及操作列内其它链接兜底） */
body.theme-dark .inv-pick-actions a.inv-pick-return-link,
body.theme-dark .inv-pick-actions a.inv-pick-return-link:visited {
  color: #b9dcff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.theme-dark .inv-pick-actions a.inv-pick-return-link:hover {
  color: #d7eaff;
}

/* 盘点单：操作文字链 */
body.theme-dark a.inv-count-op,
body.theme-dark a.inv-count-op:visited,
body.theme-dark a.inv-count-op-edit,
body.theme-dark a.inv-count-op-edit:visited {
  color: #b9dcff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.theme-dark a.inv-count-op:hover,
body.theme-dark a.inv-count-op-edit:hover {
  color: #d7eaff;
}

/* 手工出入库：展开单据 */
body.theme-dark a.inv-manual-doc-toggle,
body.theme-dark a.inv-manual-doc-toggle:visited {
  color: #b9dcff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.theme-dark a.inv-manual-doc-toggle:hover {
  color: #d7eaff;
}

/* 面包屑内链接（深色下默认蓝紫 visited 不可读） */
body.theme-dark .breadcrumb a,
body.theme-dark .breadcrumb a:visited {
  color: #9ecbff;
  font-weight: 600;
  text-decoration: none;
}
body.theme-dark .breadcrumb a:hover {
  color: #c3e0ff;
  text-decoration: underline;
}

/* 会员持卡等 mm-link 深色 */
body.theme-dark .mm-link,
body.theme-dark .mm-link:visited {
  color: #9ecbff;
  font-weight: 600;
  text-decoration: none;
}
body.theme-dark .mm-link:hover {
  color: #c3e0ff;
  text-decoration: underline;
}

/* 兜底：数据表格内完全没有 class 的 <a>（避免再出现领料单号类问题） */
body.theme-dark .table tbody a:not([class]),
body.theme-dark .table tbody a:not([class]):visited {
  color: #b9dcff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.theme-dark .table tbody a:not([class]):hover {
  color: #d7eaff;
}

body.theme-dark .inv-pick-list-tabs {
  border-bottom-color: #2a3546;
}
body.theme-dark .inv-pick-list-tab {
  color: #cbd5e1;
}
body.theme-dark .inv-pick-list-tab:hover,
body.theme-dark .inv-pick-list-tab.active {
  color: #ffb366;
}
body.theme-dark .inv-pick-list-tab.active::after {
  background: #ff9f43;
}
body.theme-dark .inv-pick-tab-badge {
  color: #64748b;
}
.inv-report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0.2rem 0 0.55rem;
}
.inv-report-toolbar-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.inv-report-table-wrap {
  width: 100%;
  overflow: auto;
  max-height: 58vh;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.inv-report-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  margin: 0;
}
.inv-report-table th,
.inv-report-table td {
  white-space: nowrap;
}
/* 出入库明细等超宽列表 */
#inv-stock-log-table,
#inv-item-stock-log-table {
  width: max-content;
  min-width: 2400px;
  table-layout: auto;
}
#inv-stock-log-table th,
#inv-stock-log-table td,
#inv-item-stock-log-table th,
#inv-item-stock-log-table td,
#po-lines-list-table th,
#po-lines-list-table td {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}
#po-lines-list-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
/* 订单列表仍用固定列宽布局 */
.card-table > #orders-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
}
/* 手工出入库：新建单面板 */
.inv-manual-create-card {
  border: 1px solid #91d5ff;
  background: #f0f9ff;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.08);
  position: relative;
  z-index: 2;
}
.inv-manual-create-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inv-manual-create-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}
.inv-manual-create-card .field {
  margin: 0;
  flex: 0 0 auto;
}
.inv-manual-create-card .field label {
  margin-bottom: 4px;
  white-space: nowrap;
}
.inv-manual-create-card .field .input,
.inv-manual-create-card .field select.input {
  width: 100%;
  min-width: 0;
}
.inv-manual-field-dir { width: 96px; }
.inv-manual-field-biz { width: 132px; }
.inv-manual-field-item { width: min(280px, 100%); flex: 1 1 220px; max-width: 360px; }
/* 手工出入库：物料联想浮层（挂 body + fixed，避免被下方表格遮挡） */
.inv-manual-item-suggest-panel {
  position: fixed;
  z-index: 100000;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  padding: 4px 0;
  box-sizing: border-box;
}
.inv-manual-item-suggest-panel.hidden { display: none !important; }
.inv-manual-item-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.inv-manual-item-suggest-item:hover,
.inv-manual-item-suggest-item:focus {
  background: #f0f9ff;
}
.inv-manual-item-suggest-title {
  display: block;
  font-size: 13px;
  color: #1f2937;
  line-height: 1.35;
}
.inv-manual-item-suggest-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.3;
}
.inv-manual-item-suggest-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: #9ca3af;
}
body.theme-dark .inv-manual-item-suggest-panel {
  background: #1f2937;
  border-color: #374151;
}
body.theme-dark .inv-manual-item-suggest-title { color: #f3f4f6; }
body.theme-dark .inv-manual-item-suggest-sub { color: #9ca3af; }
body.theme-dark .inv-manual-item-suggest-item:hover,
body.theme-dark .inv-manual-item-suggest-item:focus { background: rgba(24, 144, 255, 0.12); }
.inv-manual-field-wh { width: 108px; }
.inv-manual-field-qty { width: 88px; }
.inv-manual-field-remark { width: min(200px, 100%); flex: 1 1 160px; max-width: 240px; }
.inv-manual-create-actions {
  flex: 0 0 auto;
  padding-bottom: 2px;
}
.inv-manual-store-label {
  display: inline-block;
  min-width: 120px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.35;
  color: #1f2937;
  background: #f5f5f5;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.inv-manual-item-preview {
  width: 100%;
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.4;
  min-height: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.65);
  word-break: break-all;
}
.inv-manual-item-preview:empty {
  display: none;
  padding: 0;
}
.inv-manual-item-preview.is-found {
  color: #237804;
}
.inv-manual-item-preview.is-error {
  color: #cf1322;
}
.inv-manual-create-card--flash {
  animation: inv-manual-create-flash 1.2s ease-out;
}
@keyframes inv-manual-create-flash {
  0% { box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(24, 144, 255, 0); }
  100% { box-shadow: 0 2px 8px rgba(24, 144, 255, 0.08); }
}
body.theme-dark .inv-manual-create-card {
  border-color: #177ddc;
  background: rgba(24, 144, 255, 0.08);
}

/* 材料进销存汇总：合计行 */
#inv-hub-panel-material-psi-summary .inv-report-table tfoot {
  position: sticky;
  bottom: 0;
  z-index: 2;
}
#inv-hub-panel-material-psi-summary .inv-report-table tfoot tr.inv-psi-total-row td {
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e3a5f;
  background: linear-gradient(180deg, #f0f7ff 0%, #e8f3ff 100%);
  border-top: 2px solid #1677ff;
  box-shadow: 0 -2px 8px rgba(22, 119, 255, 0.08);
}
#inv-hub-panel-material-psi-summary .inv-report-table tfoot tr.inv-psi-total-row td.inv-psi-total-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0958d9;
  letter-spacing: 0.02em;
}
#inv-hub-panel-material-psi-summary .inv-report-table tfoot tr.inv-psi-total-row td.inv-psi-total-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #102a43;
  font-variant-numeric: tabular-nums;
}
body.theme-dark #inv-hub-panel-material-psi-summary .inv-report-table tfoot tr.inv-psi-total-row td {
  color: #e2e8f0;
  background: linear-gradient(180deg, #1a2744 0%, #152238 100%);
  border-top-color: #3b82f6;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.35);
}
body.theme-dark #inv-hub-panel-material-psi-summary .inv-report-table tfoot tr.inv-psi-total-row td.inv-psi-total-label {
  color: #93c5fd;
}
body.theme-dark #inv-hub-panel-material-psi-summary .inv-report-table tfoot tr.inv-psi-total-row td.inv-psi-total-val {
  color: #f1f5f9;
}
.inv-report-pager {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inv-sales-col-settings {
  position: relative;
}
.inv-sales-col-settings-body {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  width: min(560px, 88vw);
  max-height: 280px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 10px;
  padding: 10px 12px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.inv-sales-col-opt {
  font-size: 12px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.inv-sales-filter-panel {
  margin: 0 0 0.8rem;
  padding: 10px 12px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}
body.theme-dark .inv-sales-filter-panel {
  border-color: #334155;
  background: #0b1220;
}
body.theme-dark .inv-report-filterbar {
  border-top-color: #243244;
}
body.theme-dark .inv-report-breadcrumb,
body.theme-dark .inv-report-field label {
  color: #a8b4c8;
}
body.theme-dark .inv-report-date-sep {
  color: #7f8ea3;
}
body.theme-dark .inv-report-table-wrap {
  border-color: #334155;
}
body.theme-dark .inv-sales-col-settings-body {
  border-color: #334155;
  background: #111827;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
body.theme-dark .inv-sales-col-opt {
  color: #cbd5e1;
}

/* ========== 会员营销 / 会员持卡（参照卡管理列表） ========== */
.mm-page {
  max-width: 100%;
}
.mm-breadcrumb {
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
  color: #64748b;
}
.mm-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}
body.theme-dark .mm-tabs {
  border-bottom-color: #334155;
}
.mm-tab {
  padding: 0.55rem 1.1rem;
  font-size: 0.9375rem;
  color: #64748b;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: default;
}
.mm-tab--active {
  color: #1890ff;
  font-weight: 600;
  border-bottom-color: #1890ff;
}
a.mm-tab-link.mm-tab {
  cursor: pointer;
  text-decoration: none;
  color: #64748b;
}
a.mm-tab-link.mm-tab:hover {
  color: #1890ff;
}
.mm-page-header .page-title {
  margin-bottom: 0.35rem;
}
.mm-toolbar .mm-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.mm-keyword-input {
  flex: 1 1 240px;
  min-width: min(100%, 280px);
  max-width: 520px;
}
.mm-filter-select {
  width: auto;
  min-width: 10rem;
}
.btn-mm-issue {
  background: linear-gradient(180deg, #ff9f43 0%, #ff7a00 100%);
  border: 1px solid #e86800;
  color: #fff !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.25);
}
.btn-mm-issue:hover {
  filter: brightness(1.05);
  color: #fff !important;
}
body.theme-dark .btn-mm-issue {
  border-color: #c2410c;
  box-shadow: none;
}
.mm-table-card .mm-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mm-link {
  color: #1890ff;
  text-decoration: none;
}
.mm-link:hover {
  text-decoration: underline;
}
.mm-actions {
  white-space: nowrap;
}
.mm-status-tag {
  font-size: 0.875rem;
  font-weight: 500;
}
.mm-status-tag.mm-status-ok {
  color: #16a34a;
}
.mm-status-tag.mm-status-expired {
  color: #ca8a04;
}
.mm-status-tag.mm-status-inactive {
  color: #6b7280;
}
body.theme-dark .mm-status-tag.mm-status-inactive {
  color: #9ca3af;
}
.mm-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.5rem 0 0;
}
.mm-pager-info,
.mm-pager-page {
  font-size: 0.875rem;
  color: #64748b;
}
body.theme-dark .mm-breadcrumb,
body.theme-dark .mm-pager-info,
body.theme-dark .mm-pager-page {
  color: #94a3b8;
}

/* ─── 车间看板 ─── */
.workshop-board {
  display: grid;
  grid-template-columns: minmax(310px, 0.92fr) minmax(440px, 1.32fr) minmax(320px, 0.96fr);
  gap: 16px;
  min-height: 60vh;
  align-items: stretch;
}
.workshop-col {
  min-width: 0;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.theme-dark .workshop-col {
  background: #0f172a;
  border-color: #1e293b;
}
.workshop-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
body.theme-dark .workshop-col-header {
  border-color: #1e293b;
  background: #1e293b;
}
.workshop-col-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}
body.theme-dark .workshop-col-header h3 {
  color: #e2e8f0;
}
.workshop-col-count {
  font-size: 12px;
  background: #c41e3a;
  color: #fff;
  border-radius: 12px;
  padding: 1px 8px;
  font-weight: 600;
}
.workshop-col-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.workshop-col-list .text-muted {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: #94a3b8;
}

/* 工单卡片 */
.workshop-order-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
body.theme-dark .workshop-order-card {
  background: #1e293b;
  border-color: #334155;
}
.workshop-order-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.workshop-order-card .woc-plate {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 4px;
}
body.theme-dark .workshop-order-card .woc-plate {
  color: #e2e8f0;
}
.workshop-order-card .woc-info {
  font-size: 12px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.workshop-order-card .woc-summary {
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workshop-order-card .woc-assign-row {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.workshop-order-card .woc-assign-row select {
  flex: 1;
  font-size: 12px;
  padding: 4px 6px;
}
.workshop-order-card .woc-assign-row button {
  font-size: 11px;
  padding: 4px 10px;
}

/* 技师工位列 */
.workshop-workers-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.workshop-workers-list .text-muted {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: #94a3b8;
}
.workshop-worker-lane {
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  min-height: 100px;
  background: #fafbfc;
  transition: border-color 0.15s, background 0.15s;
}
body.theme-dark .workshop-worker-lane {
  border-color: #334155;
  background: #0f172a;
}
.workshop-worker-lane.drag-over {
  border-color: #c41e3a;
  background: #fef2f2;
}
body.theme-dark .workshop-worker-lane.drag-over {
  background: #2d1f24;
}
.workshop-worker-lane .wwl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.workshop-worker-lane .wwl-name {
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
}
body.theme-dark .workshop-worker-lane .wwl-name {
  color: #e2e8f0;
}
.workshop-worker-lane .wwl-load {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
}
.workshop-worker-lane .wwl-load.warn {
  background: #fef3c7;
  color: #b45309;
}
.workshop-worker-lane .wwl-task-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
body.theme-dark .workshop-worker-lane .wwl-task-card {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
.wwl-task-card .wwl-task-plate {
  font-weight: 600;
}
.wwl-task-card .wwl-task-actions {
  display: flex;
  gap: 4px;
}
.wwl-task-card .wwl-task-actions button {
  font-size: 10px;
  padding: 2px 6px;
}

/* 车间看板 - 施工状态色条 */
.wwl-task-card.wwl-status-assigned { border-left: 3px solid #fcd34d; }
.wwl-task-card.wwl-status-in_progress { border-left: 3px solid #86efac; }
.wwl-task-card.wwl-status-paused { border-left: 3px solid #cbd5e1; }
.wwl-task-card.wwl-status-pending_quality { border-left: 3px solid #c4b5fd; }
.wwl-task-status { font-size:11px; margin-left:8px; padding:1px 8px; border-radius:10px; }
.wwl-st-assigned { background:#fffbeb; color:#d97706; }
.wwl-st-in_progress { background:#f0fdf4; color:#16a34a; }
.wwl-st-paused { background:#f1f5f9; color:#64748b; }
.wwl-st-pending_quality { background:#f5f3ff; color:#7c3aed; }

.workshop-order-card.woc-status-assigned { border-left: 3px solid #fcd34d; }
.workshop-order-card.woc-status-in_progress { border-left: 3px solid #86efac; }
.workshop-order-card.woc-status-paused { border-left: 3px solid #cbd5e1; }
.workshop-order-card.woc-status-pending_quality { border-left: 3px solid #c4b5fd; }
.workshop-order-card.woc-status-completed { border-left: 3px solid #3b82f6; }
.woc-st-completed { background:#eff6ff; color:#2563eb; }
body.theme-dark .workshop-order-card.woc-status-completed { border-left-color: #60a5fa; }
body.theme-dark .woc-st-completed { background:#1e3a5f; color:#60a5fa; }
.woc-st-label { font-size:11px; padding:1px 8px; border-radius:10px; }
.woc-st-assigned { background:#fffbeb; color:#d97706; }
.woc-st-in_progress { background:#f0fdf4; color:#16a34a; }
.woc-st-paused { background:#f1f5f9; color:#64748b; }
.woc-st-pending_quality { background:#f5f3ff; color:#7c3aed; }

body.theme-dark .wwl-task-status.wwl-st-assigned { background:#3d2e0a; color:#fbbf24; }
body.theme-dark .wwl-task-status.wwl-st-in_progress { background:#0a2e1a; color:#4ade80; }
body.theme-dark .wwl-task-status.wwl-st-paused { background:#1e293b; color:#94a3b8; }
body.theme-dark .wwl-task-status.wwl-st-pending_quality { background:#2d1f4e; color:#a78bfa; }
body.theme-dark .woc-st-assigned { background:#3d2e0a; color:#fbbf24; }
body.theme-dark .woc-st-in_progress { background:#0a2e1a; color:#4ade80; }
body.theme-dark .woc-st-paused { background:#1e293b; color:#94a3b8; }
body.theme-dark .woc-st-pending_quality { background:#2d1f4e; color:#a78bfa; }

/* 质检项样式 */
.qc-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
body.theme-dark .qc-item-row {
  border-color: #1e293b;
}
.qc-item-row .qc-item-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}
.qc-item-row .qc-item-standard {
  font-size: 12px;
  color: #94a3b8;
  margin-left: 6px;
}
.qc-item-row select {
  width: 100px;
}
.qc-item-row input.qc-item-note {
  width: 150px;
  font-size: 12px;
}
.qc-pass { color: #16a34a; }
.qc-fail { color: #dc2626; }
body.theme-dark .qc-pass { color: #4ade80; }
body.theme-dark .qc-fail { color: #f87171; }

/* 响应式：平板端看板 */
@media (max-width: 1280px) {
  .workshop-board {
    grid-template-columns: minmax(290px, 0.92fr) minmax(400px, 1.28fr) minmax(300px, 0.96fr);
    gap: 14px;
  }
}
@media (max-width: 1120px) {
  .workshop-board {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .workshop-col--workers {
    grid-column: 1 / -1;
    order: 1;
  }
  .workshop-col--pending {
    order: 2;
  }
  .workshop-col--active {
    order: 3;
  }
}
@media (max-width: 640px) {
  .workshop-board {
    grid-template-columns: 1fr;
  }
  .workshop-col--workers,
  .workshop-col--pending,
  .workshop-col--active {
    grid-column: auto;
  }
}

/* ─── BI 看板增强 ─── */
.dashboard-chart-card--full {
  grid-column: 1 / -1;
}
.stats-group-cards--4 {
  grid-template-columns: repeat(4, 1fr);
}
.stat-card--warning {
  border-left: 3px solid #ef4444;
}
.dashboard-customer-stats,
.dashboard-inventory-stats {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 16px;
}
body.theme-dark .dashboard-customer-stats,
body.theme-dark .dashboard-inventory-stats {
  background: #0f172a;
  border-color: #1e293b;
}
@media (max-width: 768px) {
  .stats-group-cards--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .stats-group-cards--4 {
    grid-template-columns: 1fr;
  }
}


.order-operation-timeline-card {
  margin-top: 16px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.order-operation-timeline-card h3 {
  color: #0f172a;
}

.order-operation-timeline-header {
  cursor: pointer;
  user-select: none;
}

.order-operation-timeline-header:hover {
  color: #2563eb;
}

.order-operation-timeline-header small {
  font-weight: 400;
  color: #9ca3af;
  font-size: 13px;
}

.timeline-toggle-arrow {
  font-size: 11px;
  display: inline-block;
  transition: transform 0.2s;
  margin-right: 2px;
  color: #9ca3af;
}

.order-operation-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

.order-operation-timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  column-gap: 10px;
  align-items: start;
}

.order-operation-timeline-dot {
  width: 9px;
  height: 9px;
  margin-top: 12px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.order-operation-timeline-body {
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fafc;
}

.order-operation-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0f172a;
}

.order-operation-timeline-head strong {
  color: #0f172a;
  font-weight: 800;
}

.order-operation-timeline-head span,
.order-operation-timeline-operator,
.order-operation-timeline-summary {
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.order-operation-timeline-summary {
  margin-top: 4px;
  color: #334155;
}

.order-operation-timeline-operator {
  margin-top: 2px;
}

#modal-role-permissions .modal-content-wide {
  width: min(94vw, 1040px);
  max-width: 1040px;
}

.role-perm-matrix {
  max-height: 62vh !important;
  overflow: auto;
  margin-top: 0.75rem;
  padding: 0.75rem !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #f8fafc;
}

.role-perm-help {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.9rem;
  line-height: 1.6;
}

.role-perm-group {
  margin-top: 1rem;
}

.role-perm-group:first-child {
  margin-top: 0;
}

.role-perm-group-title {
  position: sticky;
  top: -0.75rem;
  z-index: 2;
  padding: 0.65rem 0.25rem 0.55rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.role-perm-module {
  margin-top: 0.6rem;
}

.role-perm-module-title {
  margin: 0 0 0.45rem;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 800;
}

.role-perm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.65rem;
}

.role-perm-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: flex-start;
  min-height: 132px;
  padding: 0.8rem;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.role-perm-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.role-perm-card.is-checked {
  border-color: #2563eb;
  background: #f8fbff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.role-perm-card input {
  margin-top: 0.25rem;
}

.role-perm-card-main,
.role-perm-card-head,
.role-perm-card-desc,
.role-perm-card-impact,
.role-perm-card-foot,
.role-perm-dev-code {
  display: block;
}

.role-perm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.role-perm-card-title {
  color: #0f172a;
  font-weight: 800;
}

.role-perm-risk {
  flex: 0 0 auto;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.role-perm-risk-low { background: #ecfdf5; color: #047857; }
.role-perm-risk-medium { background: #fff7ed; color: #c2410c; }
.role-perm-risk-high { background: #fef2f2; color: #b91c1c; }
.role-perm-risk-critical { background: #7f1d1d; color: #fff; }

.role-perm-card-desc {
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.5;
}

.role-perm-card-impact {
  margin-top: 0.35rem;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.45;
}

.role-perm-card-foot {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.45rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.role-perm-dev-code {
  margin-top: 0.35rem;
  color: #94a3b8;
  font-size: 0.74rem;
}

body.theme-dark .role-perm-matrix,
body.theme-dark .role-perm-group-title {
  background: #0f172a;
}

body.theme-dark .role-perm-help {
  border-color: #1d4ed8;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
}

body.theme-dark .role-perm-group-title,
body.theme-dark .role-perm-card-title {
  color: #e5e7eb;
}

body.theme-dark .role-perm-module-title,
body.theme-dark .role-perm-card-desc,
body.theme-dark .role-perm-card-impact {
  color: #cbd5e1;
}

body.theme-dark .role-perm-card {
  border-color: #334155;
  background: #111827;
  color: #e5e7eb;
}

body.theme-dark .role-perm-card.is-checked {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.13);
}


.order-pickup-photo-remark {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: block;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}


/* 订单详情项目/材料明细：桌面端用 colgroup 固定业务列宽，避免宽屏列间距被拉大 */
@media (min-width: 769px) {
  .order-detail-lines-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .order-detail-lines-table {
    max-width: none !important;
    table-layout: fixed !important;
    border-collapse: collapse;
  }
  .order-project-lines-table.order-lines-with-actions { width: 1520px !important; min-width: 1520px !important; }
  .order-project-lines-table.order-lines-readonly { width: 844px !important; min-width: 844px !important; }
  .order-material-lines-table.order-lines-with-actions { width: 1340px !important; min-width: 1340px !important; }
  .order-material-lines-table.order-lines-readonly { width: 1230px !important; min-width: 1230px !important; }
  .order-detail-lines-table th,
  .order-detail-lines-table td {
    padding: 0.38rem 0.48rem !important;
    line-height: 1.32;
    vertical-align: middle;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    writing-mode: horizontal-tb !important;
  }
  .order-detail-lines-table th { white-space: nowrap !important; }
  .order-detail-lines-table col.order-col-project-name { width: 190px; }
  .order-detail-lines-table col.order-col-material-name { width: 200px; }
  .order-detail-lines-table col.order-col-business { width: 76px; }
  .order-detail-lines-table col.order-col-hours { width: 68px; }
  .order-detail-lines-table col.order-col-qty { width: 82px; }
  .order-detail-lines-table col.order-col-unit-price { width: 72px; }
  .order-detail-lines-table col.order-col-work-fee { width: 84px; }
  .order-detail-lines-table col.order-col-material-fee { width: 88px; }
  .order-detail-lines-table col.order-col-discount { width: 72px; }
  .order-detail-lines-table col.order-col-final { width: 88px; }
  .order-detail-lines-table col.order-col-workers { width: 128px; }
  .order-detail-lines-table col.order-col-remark { width: 160px; }
  .order-material-lines-table col.order-col-material-name { width: 220px; }
  .order-material-lines-table col.order-col-business { width: 84px; }
  .order-material-lines-table col.order-col-qty { width: 96px; }
  .order-material-lines-table col.order-col-stock { width: 120px; }
  .order-material-lines-table col.order-col-receive { width: 76px; }
  .order-material-lines-table col.order-col-workers { width: 140px; }
  .order-material-lines-table col.order-col-remark { width: 180px; }
  .order-project-lines-table col.order-col-actions { width: 520px; }
  .order-material-lines-table col.order-col-actions { width: 110px; }
  .order-detail-lines-table:not(.order-material-lines-table) td:nth-child(1),
  .order-detail-lines-table:not(.order-material-lines-table) th:nth-child(1) { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
  .order-detail-lines-table:not(.order-material-lines-table) td:nth-child(2),
  .order-detail-lines-table:not(.order-material-lines-table) th:nth-child(2),
  .order-detail-lines-table:not(.order-material-lines-table) td:nth-child(8),
  .order-detail-lines-table:not(.order-material-lines-table) th:nth-child(8) { white-space: nowrap !important; }
  .order-detail-lines-table input.order-line-input.input {
    box-sizing: border-box;
    width: 58px !important;
    min-width: 0 !important;
    max-width: 58px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 3px 6px !important;
    border-radius: 6px;
    font-size: 0.86rem;
    text-align: right;
  }
  .order-detail-lines-table input.order-line-discount-input.input { width: 64px !important; max-width: 64px !important; }
  .order-detail-lines-table input.order-project-work-fee-input.input,
  .order-detail-lines-table input.order-material-fee-input.input,
  .order-detail-lines-table input.order-line-final-input.input { width: 74px !important; max-width: 74px !important; }
}


/* 订单详情项目明细操作列：允许多行换行，避免按钮被裁切 */
@media (min-width: 769px) {
  .order-project-lines-table.order-lines-with-actions {
    width: 1520px !important;
    min-width: 1520px !important;
  }
  .order-project-lines-table col.order-col-workers { width: 150px; }
  .order-project-lines-table col.order-col-remark { width: 72px; }
  .order-project-lines-table col.order-col-actions { width: 520px; }
  .order-project-lines-table th:nth-child(10),
  .order-project-lines-table td:nth-child(10) {
    width: 520px !important;
    min-width: 520px !important;
    max-width: none !important;
    overflow: visible !important;
  }
  .order-detail-lines-table .item-action-cell {
    white-space: normal !important;
    min-width: 520px !important;
    overflow: visible !important;
  }
}

/* 订单详情材料明细：列多且含库存/备注，单独加宽避免重叠 */
@media (min-width: 769px) {
  .order-material-lines-table.order-lines-with-actions {
    width: 1340px !important;
    min-width: 1340px !important;
  }
  .order-material-lines-table.order-lines-readonly {
    width: 1230px !important;
    min-width: 1230px !important;
  }
  .order-material-lines-table col.order-col-material-name { width: 220px; }
  .order-material-lines-table col.order-col-business { width: 84px; }
  .order-material-lines-table col.order-col-qty { width: 96px; }
  .order-material-lines-table col.order-col-unit-price { width: 76px; }
  .order-material-lines-table col.order-col-material-fee { width: 92px; }
  .order-material-lines-table col.order-col-discount { width: 76px; }
  .order-material-lines-table col.order-col-final { width: 92px; }
  .order-material-lines-table col.order-col-stock { width: 120px; }
  .order-material-lines-table col.order-col-receive { width: 76px; }
  .order-material-lines-table col.order-col-workers { width: 140px; }
  .order-material-lines-table col.order-col-remark { width: 180px; }
  .order-material-lines-table col.order-col-actions { width: 110px; }
  .order-material-lines-table th:nth-child(1),
  .order-material-lines-table td:nth-child(1) {
    width: 220px !important;
    min-width: 220px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
  .order-material-lines-table th:nth-child(3),
  .order-material-lines-table td:nth-child(3) {
    width: 96px !important;
    min-width: 96px !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  .order-material-lines-table th:nth-child(8),
  .order-material-lines-table td:nth-child(8) {
    width: 120px !important;
    min-width: 120px !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  .order-material-lines-table th:nth-child(10),
  .order-material-lines-table td:nth-child(10) {
    width: 140px !important;
    min-width: 140px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
  }
  .order-material-lines-table th:nth-child(11),
  .order-material-lines-table td:nth-child(11) {
    width: 180px !important;
    min-width: 180px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
  }
  .order-material-lines-table th:nth-child(12),
  .order-material-lines-table td:nth-child(12) {
    width: 110px !important;
    min-width: 110px !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  .order-material-lines-table th,
  .order-material-lines-table td {
    word-break: break-word !important;
  }
  .order-material-lines-table th:nth-child(2),
  .order-material-lines-table td:nth-child(2),
  .order-material-lines-table th:nth-child(4),
  .order-material-lines-table td:nth-child(4),
  .order-material-lines-table th:nth-child(5),
  .order-material-lines-table td:nth-child(5),
  .order-material-lines-table th:nth-child(6),
  .order-material-lines-table td:nth-child(6),
  .order-material-lines-table th:nth-child(7),
  .order-material-lines-table td:nth-child(7),
  .order-material-lines-table th:nth-child(9),
  .order-material-lines-table td:nth-child(9) {
    word-break: keep-all !important;
  }
}

/* 应收账款页：子标签切换（参考会计科目 #fa-tabs） */
#page-finance-receivables #fr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid #e8e8e8;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
#page-finance-receivables #fr-tabs .inventory-union-tab {
  padding: 0.65rem 1.25rem;
  margin: 0;
  border: none;
  border-right: 1px solid #e8e8e8;
  border-radius: 0;
  background: #fff;
  color: #222;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
}
#page-finance-receivables #fr-tabs .inventory-union-tab:last-child { border-right: none; }
#page-finance-receivables #fr-tabs .inventory-union-tab:hover {
  border: none;
  border-right: 1px solid #e8e8e8;
  color: #ff7f27;
  background: #fff;
}
#page-finance-receivables #fr-tabs .inventory-union-tab:last-child:hover { border-right: none; }
#page-finance-receivables #fr-tabs .inventory-union-tab.active {
  border: none;
  border-right: 1px solid #e8e8e8;
  border-bottom: 2px solid #ff7f27;
  margin-bottom: -1px;
  background: #fff;
  color: #ff7f27;
  font-weight: 600;
}
#page-finance-receivables #fr-tabs .inventory-union-tab:last-child.active { border-right: none; }
body.theme-dark #page-finance-receivables #fr-tabs {
  background: #121a26;
  border-bottom-color: #2a3546;
}
body.theme-dark #page-finance-receivables #fr-tabs .inventory-union-tab {
  background: #121a26;
  color: #e2e8f0;
  border-right-color: #2a3546;
}
body.theme-dark #page-finance-receivables #fr-tabs .inventory-union-tab:hover {
  background: #121a26;
  border-right-color: #2a3546;
  color: #ffb366;
}
body.theme-dark #page-finance-receivables #fr-tabs .inventory-union-tab.active {
  background: #151f2e;
  color: #ffb366;
  border-right-color: #2a3546;
  border-bottom-color: #ff9f43;
}

/* 应收账款页：记账协议详情 */
#page-finance-receivables .fr-detail-crumb {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 12px;
}
#page-finance-receivables .fr-detail-crumb span {
  color: #cbd5e1;
  margin: 0 6px;
}
#page-finance-receivables .fr-agreement-detail-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 2px;
  margin: 0 auto 18px;
  max-width: 1120px;
  padding: 16px 18px 22px;
}
#page-finance-receivables .fr-agreement-detail-title {
  border-bottom: 1px solid #e5e7eb;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 12px;
  text-align: center;
}
#page-finance-receivables .fr-detail-section {
  border-bottom: 1px dashed #d1d5db;
  padding: 12px 0 16px;
}
#page-finance-receivables .fr-detail-section-title {
  color: #1f2937;
  font-weight: 700;
  margin-bottom: 12px;
}
#page-finance-receivables .fr-help-dot {
  background: #4b5563;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  height: 16px;
  margin-left: 4px;
  width: 16px;
}
#page-finance-receivables .fr-radio-row {
  align-items: center;
  color: #6b7280;
  display: flex;
  gap: 10px;
  min-height: 30px;
}
#page-finance-receivables .fr-radio {
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  display: inline-block;
  height: 14px;
  position: relative;
  width: 14px;
}
#page-finance-receivables .fr-radio.checked::after {
  background: #9ca3af;
  border-radius: 50%;
  content: '';
  height: 6px;
  left: 3px;
  position: absolute;
  top: 3px;
  width: 6px;
}
#page-finance-receivables .fr-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px 42px;
  padding: 0 28px;
}
#page-finance-receivables .fr-detail-grid-3 {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}
#page-finance-receivables .fr-detail-grid span {
  color: #6b7280;
  display: inline-block;
  margin-right: 14px;
}
#page-finance-receivables .fr-detail-grid strong {
  color: #374151;
  font-weight: 500;
}
#page-finance-receivables .fr-detail-store-table {
  border-collapse: collapse;
  margin-left: 0;
  width: min(760px, 100%);
}
#page-finance-receivables .fr-detail-store-table th,
#page-finance-receivables .fr-detail-store-table td {
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
  text-align: left;
}
#page-finance-receivables .fr-detail-store-table th {
  background: #f8fafc;
  font-weight: 700;
}
#page-finance-receivables .fr-detail-remark,
#page-finance-receivables .fr-detail-attachment {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  color: #4b5563;
  min-height: 64px;
  padding: 12px 14px;
}
#page-finance-receivables .fr-detail-attachment {
  border: none;
  min-height: 24px;
  padding-left: 0;
}
#page-finance-receivables .fr-agreement-detail-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 14px;
}
body.theme-dark #page-finance-receivables .fr-agreement-detail-card {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.22);
}
body.theme-dark #page-finance-receivables .fr-agreement-detail-title,
body.theme-dark #page-finance-receivables .fr-detail-section {
  border-color: rgba(148, 163, 184, 0.22);
}
body.theme-dark #page-finance-receivables .fr-detail-section-title,
body.theme-dark #page-finance-receivables .fr-detail-grid strong {
  color: #e5e7eb;
}
body.theme-dark #page-finance-receivables .fr-detail-store-table th {
  background: rgba(30, 41, 59, 0.86);
}
body.theme-dark #page-finance-receivables .fr-detail-store-table th,
body.theme-dark #page-finance-receivables .fr-detail-store-table td,
body.theme-dark #page-finance-receivables .fr-detail-remark {
  border-color: rgba(148, 163, 184, 0.22);
}


/* 应收报表：汇总/日报表二级切换 */
#page-finance-receivables .fr-report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
#page-finance-receivables .fr-report-tabs {
  margin: 0;
  border-bottom: 0;
}
#page-finance-receivables .fr-report-panel .table {
  min-width: 1180px;
}


/* 应收账款明细字段较多，保持横向滚动和紧凑列宽 */
#page-finance-receivables #fr-details-table { min-width: 1780px; }
#page-finance-receivables #fr-details-table th,
#page-finance-receivables #fr-details-table td { white-space: nowrap; padding: 0.56rem 0.62rem; }

/* 应付账款（对齐应收账款 fr-tabs） */
#page-finance-payables #fap-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid #e8e8e8;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
#page-finance-payables #fap-tabs .inventory-union-tab {
  padding: 0.65rem 1.25rem;
  margin: 0;
  border: none;
  border-right: 1px solid #e8e8e8;
  border-radius: 0;
  background: #fff;
  color: #222;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
}
#page-finance-payables #fap-tabs .inventory-union-tab:last-child { border-right: none; }
#page-finance-payables #fap-tabs .inventory-union-tab:hover {
  border: none;
  border-right: 1px solid #e8e8e8;
  color: #ff7f27;
  background: #fff;
}
#page-finance-payables #fap-tabs .inventory-union-tab.active {
  border: none;
  border-right: 1px solid #e8e8e8;
  border-bottom: 2px solid #ff7f27;
  margin-bottom: -1px;
  background: #fff;
  color: #ff7f27;
  font-weight: 600;
}
#page-finance-payables #fap-details-table { min-width: 1680px; }
#page-finance-payables #fap-details-table th,
#page-finance-payables #fap-details-table td { white-space: nowrap; padding: 0.56rem 0.62rem; }
#page-finance-payables .fap-total-row td { font-weight: 700; background: #fafafa; }
#page-finance-payables .fap-report-tabs { margin: 0; border-bottom: 0; }
body.theme-dark #page-finance-payables #fap-tabs {
  background: #121a26;
  border-bottom-color: #2a3546;
}
body.theme-dark #page-finance-payables #fap-tabs .inventory-union-tab {
  background: #121a26;
  color: #e2e8f0;
  border-right-color: #2a3546;
}
body.theme-dark #page-finance-payables #fap-tabs .inventory-union-tab.active {
  background: #151f2e;
  color: #ffb366;
  border-bottom-color: #ff9f43;
}

/* 财务报表 Hub（独立于库存管理） */
#page-finance-hub .finance-hub-tabbar {
  margin-bottom: 12px;
}
#page-finance-hub .finance-hub-panel.hidden {
  display: none !important;
}

/* 收支记账 · 汇总卡片与统计说明 */
.sf-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}
.sf-stat-card {
  position: relative;
  text-align: center;
  padding: 28px 10px 12px;
  border-radius: 10px;
}
.sf-stat-card-plain {
  background: #fafafa;
}
.sf-help-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  background: #fff;
  color: #8c8c8c;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.sf-help-btn:hover,
.sf-help-btn:focus {
  color: #1890ff;
  border-color: #91caff;
  background: #e6f4ff;
  outline: none;
}
.sf-stat-label {
  font-size: 13px;
  color: #666;
}
.sf-stat-label-muted {
  font-size: 12px;
  color: #999;
}
.sf-stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}
.sf-stat-value-sm {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}
.sf-stat-sub {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}
.sf-metric-help-body {
  font-size: 14px;
  line-height: 1.65;
  color: #434343;
}
.sf-metric-help-body p {
  margin: 0 0 10px;
}
.sf-metric-help-body p:last-child {
  margin-bottom: 0;
}
.sf-metric-help-body ul {
  margin: 0 0 10px;
  padding-left: 1.25em;
}
.sf-metric-help-body li {
  margin-bottom: 6px;
}
.sf-metric-help-body .sf-help-note {
  margin-top: 12px;
  padding: 8px 10px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 13px;
  color: #595959;
}
body.theme-dark .sf-stat-card-plain {
  background: #1a2332;
}
body.theme-dark .sf-help-btn {
  background: #243044;
  border-color: #3d4f66;
  color: #94a3b8;
}
body.theme-dark .sf-help-btn:hover,
body.theme-dark .sf-help-btn:focus {
  color: #69b1ff;
  border-color: #4096ff;
  background: #152238;
}
body.theme-dark .sf-metric-help-body {
  color: #cbd5e1;
}
body.theme-dark .sf-metric-help-body .sf-help-note {
  background: #243044;
  color: #94a3b8;
}

/* 月成本利润表 — 数据完整度 */
#mcp-completeness-table {
  width: 100%;
  margin-bottom: 0;
}
#mcp-completeness-table th,
#mcp-completeness-table td {
  vertical-align: middle;
  padding: 10px 14px;
}
#mcp-completeness-table th.mcp-comp-status-col,
#mcp-completeness-table td.mcp-comp-status-cell {
  width: 56px;
  min-width: 56px;
  text-align: center;
}
#mcp-completeness-table th.mcp-comp-op-col,
#mcp-completeness-table td.mcp-comp-op-cell {
  width: 108px;
  min-width: 108px;
  white-space: nowrap;
  text-align: center;
}
#mcp-completeness-table .mcp-comp-op-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#mcp-completeness-table .mcp-comp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 0.28rem 0.75rem;
  min-height: 30px;
  font-size: 0.8125rem;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
}
#mcp-completeness-table a.mcp-comp-btn {
  color: #1890ff;
  border-color: #91d5ff;
  background: #e6f7ff;
}
#mcp-completeness-table a.mcp-comp-btn:hover {
  color: #096dd9;
  border-color: #69c0ff;
  background: #bae7ff;
}
#mcp-completeness-table .mcp-comp-empty {
  color: #bfbfbf;
  font-size: 0.9rem;
}
body.theme-dark #mcp-completeness-table a.mcp-comp-btn {
  color: #69c0ff;
  border-color: #177ddc;
  background: rgba(24, 144, 255, 0.12);
}
body.theme-dark #mcp-completeness-table a.mcp-comp-btn:hover {
  color: #91d5ff;
  border-color: #1890ff;
  background: rgba(24, 144, 255, 0.22);
}
body.theme-dark #mcp-completeness-table .mcp-comp-empty {
  color: #64748b;
}

/* 月成本利润表 — 重置流程弹窗 */
.mcp-reset-modal-card {
  max-width: min(560px, 94vw);
}
.mcp-reset-modal-body {
  font-size: 0.9rem;
  line-height: 1.65;
}
.mcp-reset-lead {
  margin: 0 0 14px;
  color: #434343;
}
.mcp-reset-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 16px;
  background: #f6f8fa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}
.mcp-reset-scope-label {
  font-size: 0.8125rem;
  color: #8c8c8c;
}
.mcp-reset-scope-value {
  font-weight: 600;
  color: #262626;
}
.mcp-reset-section {
  margin-bottom: 14px;
}
.mcp-reset-section-title {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #262626;
}
.mcp-reset-section-title--clear {
  color: #cf1322;
}
.mcp-reset-section-desc {
  margin: 0 0 8px;
  font-size: 0.8125rem;
}
.mcp-reset-table {
  margin-bottom: 0;
}
.mcp-reset-table th,
.mcp-reset-table td {
  padding: 8px 10px;
  vertical-align: top;
}
.mcp-reset-table td:first-child {
  width: 38%;
  font-weight: 500;
  white-space: nowrap;
}
.mcp-reset-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.mcp-reset-option input {
  margin-top: 3px;
  flex-shrink: 0;
}
.mcp-reset-section--safe {
  padding: 12px 14px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 8px;
}
.mcp-reset-section--safe .mcp-reset-section-title {
  color: #389e0d;
}
.mcp-reset-safe-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #595959;
}
.mcp-reset-safe-list li + li {
  margin-top: 4px;
}
.mcp-reset-footnote {
  margin: 14px 0 0;
  font-size: 0.8125rem;
}
body.theme-dark .mcp-reset-lead {
  color: #cbd5e1;
}
body.theme-dark .mcp-reset-scope {
  background: #1e293b;
  border-color: #334155;
}
body.theme-dark .mcp-reset-scope-value {
  color: #f1f5f9;
}
body.theme-dark .mcp-reset-section-title {
  color: #e2e8f0;
}
body.theme-dark .mcp-reset-section-title--clear {
  color: #ff7875;
}
body.theme-dark .mcp-reset-table td:first-child {
  color: #e2e8f0;
}
body.theme-dark .mcp-reset-option {
  background: rgba(250, 173, 20, 0.12);
  border-color: rgba(250, 173, 20, 0.35);
}
body.theme-dark .mcp-reset-section--safe {
  background: rgba(82, 196, 26, 0.1);
  border-color: rgba(82, 196, 26, 0.3);
}
body.theme-dark .mcp-reset-section--safe .mcp-reset-section-title {
  color: #95de64;
}
body.theme-dark .mcp-reset-safe-list {
  color: #94a3b8;
}

/* 费用报销页 */
#page-expenses .exp-toolbar-card {
  padding: 16px 20px;
}
#page-expenses .exp-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
#page-expenses .exp-toolbar-filters {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef1f5;
}
#page-expenses .exp-add-primary-btn {
  margin-left: auto;
  padding: 0.55rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(24, 144, 255, 0.38);
  border-color: #1890ff;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
#page-expenses .exp-add-primary-btn::before {
  content: '+';
  display: inline-block;
  margin-right: 6px;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1;
  vertical-align: -1px;
}
#page-expenses .exp-add-primary-btn:hover {
  box-shadow: 0 4px 14px rgba(24, 144, 255, 0.45);
  transform: translateY(-1px);
}
#page-expenses .exp-add-primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
}
#page-expenses .exp-add-primary-btn.is-open {
  background: #096dd9;
  border-color: #096dd9;
  box-shadow: 0 2px 8px rgba(9, 109, 217, 0.45);
}
#page-expenses .exp-add-primary-btn.is-open::before {
  content: '−';
}
#page-expenses .exp-toolbar-filters .input,
#page-expenses .exp-toolbar-actions .input[type="month"] {
  width: 150px;
  min-width: 130px;
}
#page-expenses #exp-filter-status {
  width: 130px;
}
#page-expenses .exp-toolbar-sep {
  color: #8c8c8c;
  font-size: 0.9rem;
}
#page-expenses .exp-toolbar-divider {
  width: 1px;
  height: 24px;
  background: #e5e7eb;
  margin: 0 4px;
}
#page-expenses .exp-create-card {
  padding: 20px 24px 24px;
  margin-bottom: 16px;
}
#page-expenses .exp-create-title {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 600;
}
#page-expenses .exp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 20px;
}
#page-expenses .exp-form-grid .field {
  margin-bottom: 0;
}
#page-expenses .exp-form-grid .exp-form-remark {
  grid-column: 1 / -1;
}
#page-expenses .exp-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eef1f5;
}
#page-expenses .exp-table-card {
  margin-bottom: 12px;
}
#page-expenses .exp-table-card .table th,
#page-expenses .exp-table-card .table td {
  padding: 12px 16px;
  vertical-align: middle;
}
#page-expenses .exp-pager-card {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
body.theme-dark #page-expenses .exp-toolbar-filters,
body.theme-dark #page-expenses .exp-form-actions {
  border-color: #2a3546;
}
body.theme-dark #page-expenses .exp-toolbar-divider {
  background: #3d4d63;
}
body.theme-dark #page-expenses .exp-add-primary-btn {
  box-shadow: 0 2px 12px rgba(24, 144, 255, 0.28);
}
body.theme-dark #page-expenses .exp-add-primary-btn:hover {
  box-shadow: 0 4px 16px rgba(24, 144, 255, 0.38);
}

.banner-activity-upload-area { padding: 1.25rem; }
.banner-activity-tip { margin-top: 0.5rem; font-size: 0.82rem; }
body.theme-dark .banner-activity-tip { color: rgba(226,232,240,0.68); }

/* Dashboard V3：统一宽度、栅格、间距和卡片基线 */
.dashboard-page .dashboard-wrap {
  max-width: 1480px;
  padding: 20px 24px 36px;
}
.dashboard-page .dashboard-hero {
  align-items: center;
  margin: 0 0 20px;
  padding: 18px 20px;
  background: var(--dash-card-bg);
  border: 1px solid var(--dash-card-border);
  border-radius: 16px;
  box-shadow: var(--dash-shadow);
}
.dashboard-page .dashboard-title { font-size: 1.45rem; }
.dashboard-page .dashboard-dimension { flex-wrap: wrap; justify-content: flex-end; }
.dashboard-page .dashboard-date-input { min-width: 132px; width: 132px; }
.dashboard-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 2px 10px;
}
.dashboard-section-heading h3 {
  margin: 0;
  color: var(--dash-title-color);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.dashboard-section-heading p {
  margin: 3px 0 0;
  color: var(--dash-label-color);
  font-size: 0.78rem;
}
.dashboard-page > .dashboard-wrap > .dashboard-stats:first-of-type,
.dashboard-page .dashboard-wrap > .dashboard-stats[aria-label="核心指标"] {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  align-items: stretch;
}
.dashboard-page .dashboard-stat-group {
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  box-sizing: border-box;
}
.dashboard-page .dashboard-stat-group--ops { grid-column: span 3; min-height: 0; }
.dashboard-page .dashboard-stat-group--finance { grid-column: span 5; }
.dashboard-page .dashboard-stat-group--points { grid-column: span 4; }
.dashboard-page .dashboard-stat-group .stats-group-title {
  height: 30px;
  margin: 0 0 12px;
  padding: 0 0 9px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
.dashboard-page .dashboard-stat-group .stat-card:hover { transform: none; }
.dashboard-page .dashboard-stat-group--ops .stats-group-cards--ops {
  gap: 10px;
  height: calc(100% - 42px);
}
.dashboard-page .dashboard-stat-group--ops .stat-card--ops {
  min-height: 112px;
  padding: 16px;
}
.dashboard-page .dashboard-stat-group--ops .stat-card--ops .stat-value { font-size: 1.8rem; }
.dashboard-page .stats-group-finance { padding: 18px; }
.dashboard-page .stats-group-cards--finance { gap: 10px; }
.dashboard-page .stats-group-finance-row2 { gap: 10px; }
.dashboard-page .stats-group-finance .stat-card--featured { padding: 12px 14px; }
.dashboard-page .stats-group-finance .stat-card--featured .stat-card-featured-value { font-size: 1.55rem; }
.dashboard-page .dashboard-stat-group--points .stats-group-cards--grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  height: calc(100% - 42px);
}
.dashboard-page .dashboard-stat-group--points .stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  min-height: 112px;
  background: rgba(7, 193, 96, 0.055);
  border: 1px solid rgba(7, 193, 96, 0.12);
  border-radius: 10px;
}
.dashboard-page .dashboard-stat-group--points .stat-value { font-size: 1.3rem; }
.dashboard-page .dashboard-charts {
  gap: 14px;
  margin: 0;
}
.dashboard-page .dashboard-charts--distribution,
.dashboard-page .dashboard-charts--trends {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-page .dashboard-chart-card {
  padding: 16px 18px;
  border-radius: 14px;
  overflow: hidden;
}
.dashboard-page .dashboard-chart-title {
  height: 24px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.dashboard-page .dashboard-chart { min-height: 250px; }
.dashboard-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.dashboard-insights-grid > .dashboard-stats {
  display: block;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.dashboard-insights-grid > .dashboard-customer-stats { order: 1; }
.dashboard-insights-grid > .dashboard-inventory-stats { order: 2; }
.dashboard-insights-grid > .dashboard-fission-stats {
  order: 3;
  grid-column: 1 / -1;
}
.dashboard-insights-grid > .dashboard-stats > .dashboard-stat-group { height: 100%; }
.dashboard-insights-grid .stats-group-cards--4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.dashboard-insights-grid .stats-group-cards--4 > .stat-card,
.dashboard-insights-grid .fission-analysis-metrics > .stat-card {
  min-width: 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #edf1f6;
  border-radius: 10px;
}
.dashboard-page .fission-analysis-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
}
.dashboard-page .fission-analysis-metrics { gap: 10px; }
.dashboard-page .fission-analysis-chart {
  padding: 12px 14px;
  background: #f8fafc;
  border-color: #edf1f6;
  box-shadow: none;
}
.dashboard-page .fission-analysis-chart .dashboard-chart { min-height: 230px; }
.dashboard-page .dashboard-rankings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}
.dashboard-page .dashboard-ranking-card {
  padding: 16px 18px;
  border-radius: 14px;
}
.dashboard-page .dashboard-ranking-card--wide { grid-column: 1 / -1; }
.dashboard-page .dashboard-workbench { margin: 24px 0 0; padding: 16px 18px; border-radius: 14px; }
.dashboard-page .dashboard-workbench-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

body.theme-dark .dashboard-insights-grid .stats-group-cards--4 > .stat-card,
body.theme-dark .dashboard-insights-grid .fission-analysis-metrics > .stat-card,
body.theme-dark .dashboard-page .fission-analysis-chart {
  background: #111a27;
  border-color: #2a3546;
}

@media (max-width: 1180px) {
  .dashboard-page .dashboard-stat-group--ops { grid-column: span 5; }
  .dashboard-page .dashboard-stat-group--finance { grid-column: span 7; }
  .dashboard-page .dashboard-stat-group--points { grid-column: 1 / -1; }
  .dashboard-page .dashboard-stat-group--points .stats-group-cards--grid { height: auto; }
  .dashboard-page .dashboard-workbench-cards { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .dashboard-page .dashboard-wrap { padding: 12px 14px 28px; }
  .dashboard-page .dashboard-hero { align-items: stretch; padding: 16px; }
  .dashboard-page .dashboard-dimension { justify-content: flex-start; }
  .dashboard-page .dashboard-wrap > .dashboard-stats[aria-label="核心指标"] { grid-template-columns: 1fr; }
  .dashboard-page .dashboard-stat-group--ops,
  .dashboard-page .dashboard-stat-group--finance,
  .dashboard-page .dashboard-stat-group--points { grid-column: 1; }
  .dashboard-page .dashboard-charts--distribution,
  .dashboard-page .dashboard-charts--trends,
  .dashboard-insights-grid,
  .dashboard-page .dashboard-rankings { grid-template-columns: 1fr; }
  .dashboard-insights-grid > .dashboard-fission-stats,
  .dashboard-page .dashboard-ranking-card--wide { grid-column: 1; }
  .dashboard-page .fission-analysis-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .dashboard-page .dashboard-wrap { padding: 8px 8px 22px; }
  .dashboard-page .dashboard-hero { border-radius: 12px; }
  .dashboard-section-heading { margin-top: 18px; }
  .dashboard-page .dashboard-stat-group { padding: 14px; }
  .dashboard-page .dashboard-stat-group--ops .stats-group-cards--ops,
  .dashboard-page .dashboard-stat-group--points .stats-group-cards--grid,
  .dashboard-insights-grid .stats-group-cards--4,
  .dashboard-page .fission-analysis-metrics { grid-template-columns: 1fr; }
  .dashboard-page .dashboard-chart-card,
  .dashboard-page .dashboard-ranking-card { padding: 14px; }
}
