 /* ===== 主题系统 ===== */
:root, [data-theme=blue] {
--primary-lightest: hsl(211,90%,96%);
--primary-lighter: hsl(211,90%,88%);
--primary-bg-color: hsl(211,90%,96%);
--primary-light: hsl(211,90%,68%);
--primary-color: hsl(211,95%,55%);
--primary-dark: hsl(211,80%,42%);
--primary-darker: hsl(211,75%,32%);
--primary-darkest: hsl(211,70%,22%);
--success-color: hsl(135,65%,42%);
--success-light: hsl(135,55%,92%);
--success-dark: hsl(135,60%,32%);
--danger-color: hsl(0,75%,55%);
--danger-light: hsl(0,65%,92%);
--danger-dark: hsl(0,65%,42%);
--warning-color: hsl(38,90%,50%);
--warning-light: hsl(38,80%,92%);
--warning-dark: hsl(38,75%,38%);
--info-color: hsl(185,70%,45%);
--info-light: hsl(185,55%,92%);
--info-dark: hsl(185,65%,32%);
--text-color: #1a1a2e;
--text-secondary: #4a4a5e;
--text-muted: #8e8ea0;
--text-disabled: #bfbfc8;
 --bg-color: #f6f8fb;
 --card-bg: #ffffff;
 --border-color: #e0e6ef;
 --sidebar-bg-start: hsl(211,85%,50%);
 --sidebar-bg-end: hsl(211,75%,42%);
 --sidebar-text: rgba(255,255,255,0.85);
 --sidebar-text-hover: #ffffff;
 --sidebar-text-active: #ffffff;
 --sidebar-text-muted: rgba(255,255,255,0.65);
 --sidebar-divider: rgba(255,255,255,0.12);
 --sidebar-border: rgba(255,255,255,0.08);
 --sidebar-footer: rgba(255,255,255,0.25);
 --sidebar-hover-bg: rgba(255,255,255,0.1);
 --sidebar-active-bg: rgba(255,255,255,0.2);
 }
 [data-theme=dark] {
 --primary-color: hsl(211,90%,62%);
 --primary-dark: hsl(211,90%,50%);
 --primary-light: hsl(211,90%,72%);
 --primary-bg-color: hsl(211,35%,22%);
 --success-color: hsl(135,60%,55%);
 --danger-color: hsl(0,85%,65%);
 --warning-color: hsl(40,95%,58%);
 --info-color: hsl(185,75%,58%);
 --text-color: #e8ebf0;
 --text-secondary: #aab2c0;
 --text-muted: #6e7788;
 --bg-color: #0d1117;
 --card-bg: #161b22;
 --border-color: #30363d;
 --sidebar-bg-start: hsl(210,20%,18%);
 --sidebar-bg-end: hsl(210,20%,12%);
 --sidebar-text: rgba(255,255,255,0.85);
 --sidebar-text-hover: #ffffff;
 --sidebar-text-active: #ffffff;
 --sidebar-text-muted: rgba(255,255,255,0.65);
 --sidebar-divider: rgba(255,255,255,0.12);
 --sidebar-border: rgba(255,255,255,0.08);
 --sidebar-footer: rgba(255,255,255,0.25);
 --sidebar-hover-bg: rgba(255,255,255,0.1);
 --sidebar-active-bg: rgba(255,255,255,0.2);
 }
 [data-theme=light] {
 --primary-color: hsl(211,90%,50%);
 --primary-dark: hsl(211,85%,40%);
 --primary-light: hsl(211,85%,62%);
 --primary-bg-color: hsl(211,50%,95%);
 --success-color: hsl(135,60%,45%);
 --danger-color: hsl(0,80%,55%);
 --warning-color: hsl(40,95%,50%);
 --info-color: hsl(185,70%,45%);
 --text-color: #333;
 --text-secondary: #666;
 --text-muted: #999;
 --bg-color: #fafbfc;
 --card-bg: #ffffff;
 --border-color: #e8ecf0;
 --sidebar-bg-start: hsl(200,15%,92%);
 --sidebar-bg-end: hsl(200,15%,88%);
 --sidebar-text: #444444;
 --sidebar-text-hover: #111111;
 --sidebar-text-active: #111111;
 --sidebar-text-muted: #666666;
 --sidebar-divider: rgba(0,0,0,0.08);
 --sidebar-border: rgba(0,0,0,0.05);
 --sidebar-footer: rgba(0,0,0,0.25);
 --sidebar-hover-bg: rgba(0,0,0,0.05);
 --sidebar-active-bg: rgba(0,0,0,0.1);
 }
 [data-theme=green] {
 --primary-color: hsl(145,70%,42%);
 --primary-dark: hsl(145,70%,32%);
 --primary-light: hsl(145,70%,52%);
 --primary-bg-color: hsl(145,60%,96%);
 --success-color: hsl(135,55%,50%);
 --danger-color: hsl(0,80%,55%);
 --warning-color: hsl(40,95%,50%);
 --info-color: hsl(185,70%,45%);
 --text-color: #222;
 --text-secondary: #555;
 --text-muted: #888;
 --bg-color: #f6fcf8;
 --card-bg: #ffffff;
 --border-color: #e0f0e8;
 --sidebar-bg-start: hsl(145,50%,45%);
 --sidebar-bg-end: hsl(145,45%,36%);
 --sidebar-text: rgba(255,255,255,0.85);
 --sidebar-text-hover: #ffffff;
 --sidebar-text-active: #ffffff;
 --sidebar-text-muted: rgba(255,255,255,0.65);
 --sidebar-divider: rgba(255,255,255,0.12);
 --sidebar-border: rgba(255,255,255,0.08);
 --sidebar-footer: rgba(255,255,255,0.25);
 --sidebar-hover-bg: rgba(255,255,255,0.1);
 --sidebar-active-bg: rgba(255,255,255,0.2);
 }
 [data-theme=purple] {
 --primary-color: hsl(265,75%,55%);
 --primary-dark: hsl(265,70%,42%);
 --primary-light: hsl(265,70%,65%);
 --primary-bg-color: hsl(265,50%,96%);
 --success-color: hsl(135,55%,50%);
 --danger-color: hsl(0,80%,55%);
 --warning-color: hsl(40,95%,50%);
 --info-color: hsl(185,70%,45%);
 --text-color: #222;
 --text-secondary: #555;
 --text-muted: #888;
 --bg-color: #faf8fc;
 --card-bg: #ffffff;
 --border-color: #eee6f5;
 --sidebar-bg-start: hsl(265,55%,50%);
 --sidebar-bg-end: hsl(265,48%,40%);
 --sidebar-text: rgba(255,255,255,0.85);
 --sidebar-text-hover: #ffffff;
 --sidebar-text-active: #ffffff;
 --sidebar-text-muted: rgba(255,255,255,0.65);
 --sidebar-divider: rgba(255,255,255,0.12);
 --sidebar-border: rgba(255,255,255,0.08);
 --sidebar-footer: rgba(255,255,255,0.25);
 --sidebar-hover-bg: rgba(255,255,255,0.1);
 --sidebar-active-bg: rgba(255,255,255,0.2);
 }
 [data-theme=orange] {
 --primary-color: hsl(30,90%,50%);
 --primary-dark: hsl(30,85%,38%);
 --primary-light: hsl(30,85%,60%);
 --primary-bg-color: hsl(30,70%,96%);
 --success-color: hsl(135,55%,50%);
 --danger-color: hsl(0,80%,55%);
 --warning-color: hsl(40,95%,50%);
 --info-color: hsl(185,70%,45%);
 --text-color: #222;
 --text-secondary: #555;
 --text-muted: #888;
 --bg-color: #fefaf6;
 --card-bg: #ffffff;
 --border-color: #f5e8d8;
 --sidebar-bg-start: hsl(30,70%,52%);
 --sidebar-bg-end: hsl(30,60%,42%);
 --sidebar-text: rgba(255,255,255,0.85);
 --sidebar-text-hover: #ffffff;
 --sidebar-text-active: #ffffff;
 --sidebar-text-muted: rgba(255,255,255,0.65);
 --sidebar-divider: rgba(255,255,255,0.12);
 --sidebar-border: rgba(255,255,255,0.08);
 --sidebar-footer: rgba(255,255,255,0.25);
 --sidebar-hover-bg: rgba(255,255,255,0.1);
  --sidebar-active-bg: rgba(255,255,255,0.2);
  }
  /* 系统主题使用媒体查询自动适配 */
  @media (prefers-color-scheme:dark) {
 [data-theme=system] {
 --primary-color: hsl(211,90%,62%);
 --primary-dark: hsl(211,90%,50%);
 --primary-light: hsl(211,90%,72%);
 --primary-bg-color: hsl(211,35%,22%);
 --success-color: hsl(135,60%,55%);
 --danger-color: hsl(0,85%,65%);
 --warning-color: hsl(40,95%,58%);
 --info-color: hsl(185,75%,58%);
 --text-color: #e8ebf0;
 --text-secondary: #aab2c0;
 --text-muted: #6e7788;
 --bg-color: #15192a;
 --card-bg: #1f2438;
 --border-color: #2d344d;
 --sidebar-bg-start: #1a2038;
 --sidebar-bg-end: #11162b;
 --sidebar-text: rgba(255,255,255,0.85);
 --sidebar-text-hover: #ffffff;
 --sidebar-text-active: #ffffff;
 --sidebar-text-muted: rgba(255,255,255,0.65);
 --sidebar-divider: rgba(255,255,255,0.12);
 --sidebar-border: rgba(255,255,255,0.08);
 --sidebar-footer: rgba(255,255,255,0.25);
 --sidebar-hover-bg: rgba(255,255,255,0.1);
 --sidebar-active-bg: rgba(255,255,255,0.2);
 }
 }

 * { margin: 0; padding: 0; box-sizing: border-box; }

 body {
 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
 background: var(--bg-color);
 color: var(--text-color);
 min-height: 100vh;
 }

 /* ========== Layout ========== */
 .main-layout {
 display: flex;
 height: 100vh;
 overflow: hidden;
 }

 .sidebar {
 width: 180px;
 height: 100vh;
 background: linear-gradient(180deg, var(--sidebar-bg-start) 0%, var(--sidebar-bg-end) 100%);
 color: #fff;
 flex-shrink: 0;
 display: flex;
 flex-direction: column;
 transition: width 0.25s, transform 0.3s;
 z-index: 100;
 overflow: hidden;
 position: sticky;
 top: 0;
 align-self: flex-start;
 }

 .sidebar.collapsed {
 width: 60px;
 }

 .sidebar.collapsed .sidebar-menu a span,
 .sidebar.collapsed .sidebar-footer {
 display: none;
 }

 

 .sidebar.collapsed .sidebar-menu a {
 justify-content: center;
 padding: 14px 0;
 }

 .sidebar.collapsed .sidebar-menu a svg {
 width: 22px;
 height: 22px;
 }

 .sidebar.collapsed .sidebar-menu a.router-link-active {
 border-right: none;
 }

 .sidebar-header {
 padding: 16px 10px;
 text-align: center;
 border-bottom: 1px solid var(--sidebar-divider);
 flex-shrink: 0;
 cursor: pointer;
 transition: background 0.2s;
 }
 .sidebar-header:hover {
 background: rgba(255,255,255,0.05);
 }

 .sidebar-user {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 8px;
 }

 .sidebar-avatar {
 width: 48px;
 height: 48px;
 border-radius: 50%;
 background: rgba(255,255,255,0.2);
 color: var(--sidebar-text-active);
 color: var(--sidebar-text-active);
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 20px;
 font-weight: 500;
 flex-shrink: 0;
 }

.sidebar-user-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--sidebar-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

 .sidebar.collapsed .sidebar-user-name {
 display: none;
 }

 .sidebar.collapsed .sidebar-avatar {
 width: 36px;
 height: 36px;
 font-size: 16px;
 }
 .sidebar-menu {
 padding: 10px 0;
 flex: 1;
 overflow-y: auto;
 min-height: 0;
 }

 .sidebar-footer {
 flex-shrink: 0;
 }

 .sidebar-divider {
 margin: 6px 18px;
 border-top: 1px solid var(--sidebar-divider);
 }

 .sidebar-menu a {
 
  display: flex;
  align-items: center;
  padding: 14px 24px;
  color: var(--sidebar-text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  gap: 12px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 6px;
  margin: 0 8px;
  font-size: 16px;
  font-weight: 500;
}

.sidebar-menu a:hover {
  color: var(--sidebar-text-hover);
  background: var(--sidebar-hover-bg);
  transform: translateX(4px);
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sidebar-menu a.router-link-active {
  color: var(--sidebar-text-active);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-left: 3px solid var(--sidebar-text-active);
  border-right: none;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
 .sidebar-menu a.router-link-active::before {
 content: \'\';
 position: absolute;
 left: 0; top: 50%; transform: translateY(-50%);
 width: 3px; height: 60%; background: var(--sidebar-text-active);
 border-radius: 0 3px 3px 0;
 border-radius: 0 3px 3px 0;
 }

 .sidebar-menu a svg {
 width: 18px;
 height: 18px;
 min-width: 18px;
 min-height: 18px;
 flex-shrink: 0;
 }

 .user-info {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 8px;
 border-radius: 8px;
 cursor: pointer;
 transition: background 0.3s;
 }

 .user-info:hover {
 background: rgba(255, 255, 255, 0.1);
 }

 .user-avatar-small {
 width: 40px;
 height: 40px;
 border-radius: 50%;
 background: rgba(255, 255, 255, 0.2);
 color: #fff;
 display: flex;
 align-items: center;
 justify-content: center;
 font-weight: 500;
 font-size: 16px;
 flex-shrink: 0;
 }

 .user-details {
 flex: 1;
 min-width: 0;
 }

 .user-name-small {
 font-size: 15px;
 font-weight: 500;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 }

.user-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

/* 角色徽章（按账户类型显示不同颜色，强化"不同账户不同内容"的视觉隔离） */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.4;
  border: 1px solid transparent;
  backdrop-filter: blur(4px);
}
.role-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.role-admin   { color: #ffd666; background: rgba(255,214,102,0.16); border-color: rgba(255,214,102,0.4); }
.role-engineer{ color: #91d5ff; background: rgba(145,213,255,0.16); border-color: rgba(145,213,255,0.4); }
.role-dealer { color: #b7eb8f; background: rgba(183,235,143,0.16); border-color: rgba(183,235,143,0.4); }
.role-customer{ color: #ffccc7; background: rgba(255,204,199,0.16); border-color: rgba(255,204,199,0.4); }
/* 头部用户角色小标识 */
.header-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  white-space: nowrap;
}

 .main-content {
 flex: 1;
 display: flex;
 flex-direction: column;
 overflow: hidden;
 }

.header {
  height: 64px;
  background: linear-gradient(135deg, var(--sidebar-bg-start) 0%, var(--sidebar-bg-end) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

 .header .mobile-menu-btn {
 color: #fff;
 }
 .header .sidebar-toggle-btn {
 color: #fff;
 }
 .header .sidebar-toggle-btn:hover {
 background: rgba(255,255,255,0.2);
 color: #fff;
 }

 .header-left {
 display: flex;
 align-items: center;
 gap: 12px;
 flex: 1;
 }

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

 .header-title {
 font-size: 18px;
 font-weight: 500;
 }

 .header-actions {
 display: flex;
 gap: 12px;
 align-items: center;
 }

 .header-user-info {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 6px 12px;
 border-radius: 8px;
 cursor: pointer;
 transition: background 0.2s;
 }

 .header-user-info:hover {
 background: var(--border-color);
 }

 .sidebar-toggle-btn {
 display: flex;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 border: none;
 background: none;
 cursor: pointer;
 border-radius: 6px;
 font-size: 16px;
 color: var(--text-secondary);
 transition: background 0.2s, color 0.2s;
 }

 .sidebar-toggle-btn:hover {
 background: var(--border-color);
 color: var(--text-color);
 }

 .mobile-menu-btn {
 display: none;
 background: none;
 border: none;
 font-size: 24px;
 cursor: pointer;
 color: var(--text-color);
 }

 .content {
 flex: 1;
 padding: 8px 12px;
 overflow-y: auto;
 }

/* ========== Cards ========== */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
/* .product-card 统一样式已移至下方"商品卡片整体美化"区块 */

 .card-header {
 padding: 16px 24px;
 border-bottom: 1px solid var(--border-color);
 display: flex; align-items: center; justify-content: space-between;
 background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
 }
 .card-title { font-size: 16px; font-weight: 700; color: var(--text-color); letter-spacing: 0.3px; }

 .card-title {
 font-size: 16px;
 font-weight: 500;
 }

 .card-body {
 padding: 24px;
 }

 /* ========== Stat Cards ========== */
 .stats-row {
 display: grid;
 grid-template-columns: repeat(6, 1fr);
 gap: 14px;
 margin-bottom: 24px;
 }

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, var(--card-bg) 100%);
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ===== CSS 单色图标系统（替代 emoji） ===== */
.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    margin: 0 auto 6px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}
/* 各图标颜色与形状 */
.ico-pool    { background: #e6f7ff; color: #1890ff; }   /* 接单池 */
.ico-pool::before { content: '⇩'; }
.ico-progress{ background: #fff7e6; color: #fa8c16; }   /* 处理中 */
.ico-progress::before { content: '⟳'; font-variant-emoji: text; }
.ico-list    { background: #f6ffed; color: #52c41a; }   /* 列表 */
.ico-list::before { content: '≡'; }
.ico-total   { background: #e6f7ff; color: #096dd9; }   /* 总数 */
.ico-total::before { content: '☰'; }
.ico-device  { background: #f0f5ff; color: #597ef7; }   /* 设备 */
.ico-device::before { content: '⬡'; }
.ico-paid    { background: #f6ffed; color: #52c41a; }   /* 已回款 */
.ico-paid::before { content: '✔'; }
.ico-pending { background: #fff7e6; color: #faad14; }   /* 待回款 */
.ico-pending::before { content: '◷'; }
.ico-alert   { background: #fff2f0; color: #ff4d4f; }   /* 预警 */
.ico-alert::before { content: '!'; font-size: 18px; }
.ico-new     { background: #e6f7ff; color: #1890ff; }   /* 新建 */
.ico-new::before { content: '+'; font-size: 20px; }
/* 图标尺寸变体 */
.stat-icon-sm { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; }
.stat-icon-lg { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; }
/* 空状态占位图标 */
.empty-icon {
    display: inline-block;
    width: 48px; height: 48px;
    border: 2px dashed #d9d9d9;
    border-radius: 50%;
    position: relative;
    opacity: 0.4;
    margin-bottom: 8px;
}
.empty-icon::after {
    content: '!';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #d9d9d9;
    font-weight: 700;
}
/* toast / 提示图标用简单文本 */
.ico-check  { color: #52c41a; }
.ico-cross  { color: #ff4d4f; }
.ico-warn   { color: #faad14; }
.ico-info   { color: #1890ff; }
/* 通知铃铛图标（CSS绘制） */
.notif-bell {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid currentColor;
    border-radius: 6px 6px 0 0;
    position: relative;
}
.notif-bell::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: currentColor;
}
/* 库存包裹图标（CSS绘制） */
.ico-box {
    display: inline-block;
    width: 40px; height: 32px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    position: relative;
    opacity: 0.4;
}
.ico-box::after {
    content: '';
    position: absolute;
    top: -2px; left: 10px; right: 10px;
    height: 6px;
    border: 2px solid #d9d9d9;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}
/* 设备图标 */
.ico-desktop {
    display: inline-block;
    width: 36px; height: 28px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    position: relative;
    opacity: 0.4;
}
.ico-desktop::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 6px;
    border: 2px solid #d9d9d9;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

 .stat-value {
 font-size: 24px;
 font-weight: 600;
 color: var(--primary-color);
 }

 .stat-label {
 font-size: 13px;
 color: var(--text-secondary);
 margin-top: 4px;
 }

 /* ========== Charts ========== */
 .chart-container {
 display: grid;
 grid-template-columns: 1fr 1fr 1fr;
 gap: 16px;
 margin-bottom: 24px;
 }

 .chart-card {
 background: var(--card-bg);
 border-radius: 8px;
 padding: 20px;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
 }

 .chart-card h3 {
 font-size: 16px;
 font-weight: 500;
 margin-bottom: 16px;
 color: var(--text-color);
 }

 .chart-wrapper {
 position: relative;
 height: 250px;
 }

 /* ========== Tables ========== */
 .table-wrapper {
 overflow-x: auto;
 }

 table {
 width: 100%;
 border-collapse: collapse;
 }

 th, td {
 padding: 14px 16px;
 text-align: left;
 border-bottom: 1px solid var(--border-color);
 font-size: 15px;
 }

th {
  background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f5 100%);
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid var(--primary-color);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

 tr:hover td {
 background: #fafafa;
 }

 /* ========== Status Tags ========== */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.status-pending {
  background: linear-gradient(135deg, var(--warning-light) 0%, #ffe58f 100%);
  color: var(--warning-dark);
  border: 1px solid rgba(250,173,20,0.18);
}
.status-progress {
  background: linear-gradient(135deg, var(--primary-lighter) 0%, #91d5ff 100%);
  color: var(--primary-dark);
  border: 1px solid rgba(24,144,255,0.18);
}
.status-done {
  background: linear-gradient(135deg, var(--success-light) 0%, #b7eb8f 100%);
  color: var(--success-dark);
  border: 1px solid rgba(82,196,26,0.18);
}

.status-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

 /* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease; gap: 6px; text-decoration: none;
  white-space: nowrap; letter-spacing: 0.3px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* ===== 统一操作按钮系统（尺寸/圆角/阴影一致） ===== */
.btn-primary { 
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%); 
  color: #fff; 
  border: none;
  box-shadow: 0 2px 8px rgba(24,144,255,0.2);
}
.btn-primary:hover { 
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%); 
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(24,144,255,0.35);
}
.btn-success { background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%); color: #fff; border: none; box-shadow: 0 2px 8px rgba(40,199,111,0.2); }
.btn-success:hover { background: linear-gradient(135deg, #48d98b 0%, var(--success-color) 100%); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(40,199,111,0.35); }
.btn-info { background: linear-gradient(135deg, var(--info-color) 0%, var(--info-dark) 100%); color: #fff; border: none; box-shadow: 0 2px 8px rgba(28,194,223,0.2); }
.btn-info:hover { background: linear-gradient(135deg, #4dd4ec 0%, var(--info-color) 100%); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(28,194,223,0.35); }
.btn-warning { background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-dark) 100%); color: #fff; border: none; box-shadow: 0 2px 8px rgba(255,159,67,0.2); }
.btn-warning:hover { background: linear-gradient(135deg, #ffb86a 0%, var(--warning-color) 100%); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,159,67,0.35); }
.btn-danger { background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%); color: #fff; border: none; box-shadow: 0 2px 8px rgba(255,91,91,0.2); }
.btn-danger:hover { background: linear-gradient(135deg, #ff7b7b 0%, var(--danger-color) 100%); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,91,91,0.35); }

/* ===== 服务器管理：系统信息（现代卡片 + 环形图 + Windows 风格磁盘 + 网络SSL） ===== */
.sysinfo-grid {
display: grid;
grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.4fr) minmax(240px, 1.1fr) minmax(260px, 1.2fr);
gap: 14px;
align-items: stretch;
}
@media (max-width: 1200px){ .sysinfo-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px){ .sysinfo-grid { grid-template-columns: 1fr; } }
.sysinfo-card {
background: #fff;
border: 1px solid var(--border-color, #e8e8e8);
border-radius: 10px;
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
transition: box-shadow .18s;
}
.sysinfo-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.sysinfo-card-head { display: flex; align-items: center; gap: 10px; }
.sysinfo-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 38px;
height: 28px;
border-radius: 6px;
font-size: 10px;
font-weight: 700;
color: #fff;
letter-spacing: 1px;
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.sysinfo-card-title { font-size: 14px; font-weight: 600; color: var(--text-color); }

/* 内存环形图 */
.sysinfo-card-ring { align-items: center; justify-content: center; }
.sysinfo-ring {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
}
.sysinfo-ring svg { display: block; }
.sysinfo-ring-text {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
line-height: 1.15;
}
.sysinfo-ring-pct { font-size: 28px; font-weight: 700; font-family: "Menlo","Consolas",monospace; }
.sysinfo-ring-sub { font-size: 11px; color: var(--text-muted, #999); margin-top: 4px; }
.sysinfo-card-foot { font-size: 12px; color: var(--text-muted, #999); text-align: center; }

/* 磁盘 Windows 风格 */
.sysinfo-disk-stats {
display: flex;
align-items: center;
gap: 12px;
padding: 6px 0;
}
.sysinfo-disk-label { display: block; font-size: 11px; color: var(--text-muted, #999); margin-bottom: 4px; }
.sysinfo-disk-value { display: block; font-size: 24px; font-weight: 700; font-family: "Menlo","Consolas",monospace; }
.sysinfo-disk-value small { font-size: 12px; color: var(--text-muted, #999); font-weight: 500; margin-left: 2px; }
.sysinfo-disk-sep { width: 1px; align-self: stretch; background: #e8e8e8; }
.sysinfo-disk-pct { margin-left: auto; font-size: 22px; font-weight: 700; font-family: "Menlo","Consolas",monospace; }
.sysinfo-disk-bar {
position: relative;
height: 10px;
background: #f0f2f5;
border-radius: 5px;
overflow: hidden;
}
.sysinfo-disk-bar-fill {
height: 100%;
border-radius: 5px;
transition: width .4s ease;
}
.sysinfo-disk-foot {
display: flex;
justify-content: space-between;
font-size: 12px;
color: var(--text-muted, #999);
}
.sysinfo-disk-foot b { color: var(--text-color); }

/* 基础信息卡片 */
.sysinfo-meta-list {
display: flex;
flex-direction: column;
gap: 6px;
}
.sysinfo-meta-row {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
padding: 5px 10px;
background: #fafbfc;
border-radius: 5px;
}
.sysinfo-meta-row > span { color: var(--text-muted, #999); min-width: 70px; }
.sysinfo-meta-row > b { color: var(--text-color); font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sysinfo-meta-row-full { background: #f5f6fa; }

/* ===== 网络 & SSL 卡片（系统信息页） ===== */
.sysinfo-net-foot {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
margin-top: auto;
padding-top: 10px;
border-top: 1px dashed var(--border-color, #e8e8e8);
}
.ssl-renew-msg {
font-size: 11px;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ssl-renew-msg.ok { color: var(--success-color, #52c41a); }
.ssl-renew-msg:not(.ok) { color: var(--danger-color, #cf1322); }
/* 开关按钮 */
.ssl-switch {
display: inline-block;
position: relative;
width: 36px;
height: 20px;
background: #d9d9d9;
border-radius: 10px;
cursor: pointer;
margin-left: 10px;
vertical-align: middle;
transition: background .2s ease;
flex-shrink: 0;
}
.ssl-switch.on { background: var(--success-color, #52c41a); }
.ssl-switch-slider {
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
background: #fff;
border-radius: 50%;
transition: left .2s ease;
box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.ssl-switch.on .ssl-switch-slider { left: 18px; }

/* ===== 服务器管理：SSL / 网络信息卡片 ===== */
.ssl-net-card {
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px 16px;
background: #fafbfc;
border: 1px solid var(--border-color, #e8e8e8);
border-radius: 8px;
}
.ssl-net-row {
display: flex;
align-items: center;
gap: 12px;
}
.ssl-net-label {
font-size: 13px;
color: var(--text-muted, #999);
min-width: 70px;
}
.ssl-net-value {
font-size: 15px;
font-weight: 600;
color: var(--text-color);
font-family: "Menlo","Consolas",monospace;
}
.btn-danger:disabled, .btn-danger.disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
/* 危险操作：红色描边（非实心），降低视觉压迫，避免误点 */
.btn-danger-outline { background: #fff; color: var(--danger-color); border: 1px solid var(--danger-color); box-shadow: none; }
.btn-danger-outline:hover:not(:disabled) { background: rgba(255,91,91,0.08); transform: translateY(-1px); }
.btn-danger-outline:disabled, .btn-danger-outline.disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
/* 次操作：中性描边按钮（编辑/盘点等） */
.btn-outline { background: #fff; color: var(--text-color); border: 1px solid var(--border-color); box-shadow: none; }
.btn-outline:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-lightest); transform: translateY(-1px); }
.btn-outline:disabled, .btn-outline.disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

 .btn-default {
 background: #fff;
 color: var(--text-color);
 border: 1px solid var(--border-color);
 }
 .btn-default:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-lightest); }
 .btn-block { width: 100%; }
 .btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }

 .btn-group { display: flex; gap: 10px; margin-top: 20px; }

 /* ========== Forms ========== */
 .form-group {
 margin-bottom: 20px;
 }

 .form-group label {
 display: block;
 margin-bottom: 8px;
 color: var(--text-secondary);
 font-size: 15px;
 }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15), 0 4px 12px rgba(24, 144, 255, 0.1);
  transform: translateY(-1px);
}

 .form-group textarea {
 min-height: 100px;
 resize: vertical;
 }

 .form-row {
 display: flex;
 gap: 20px;
 margin-bottom: 0;
 }

 .form-row .form-group {
 flex: 1;
 }

 /* ========== Image Upload ========== */
 .upload-section {
 margin-bottom: 20px;
 }

 .upload-label {
 display: block;
 margin-bottom: 8px;
 color: var(--text-secondary);
 font-size: 15px;
 font-weight: 500;
 }

 .upload-area {
 border: 2px dashed var(--border-color);
 border-radius: 8px;
 padding: 16px;
 min-height: 100px;
 cursor: pointer;
 transition: border-color 0.3s, background 0.3s;
 }

 .upload-area:hover {
 border-color: var(--primary-color);
 background: rgba(24, 144, 255, 0.03);
 }

 .upload-placeholder {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 8px;
 color: var(--text-muted);
 font-size: 13px;
 min-height: 80px;
 }

 .upload-preview-list {
 display: flex;
 flex-wrap: wrap;
 gap: 10px;
 }

 .upload-preview-item {
 position: relative;
 width: 80px;
 height: 80px;
 border-radius: 6px;
 overflow: hidden;
 border: 1px solid var(--border-color);
 }

 .upload-preview-item img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 }

 .upload-remove-btn {
 position: absolute;
 top: 2px;
 right: 2px;
 width: 20px;
 height: 20px;
 border-radius: 50%;
 background: rgba(0, 0, 0, 0.6);
 color: #fff;
 border: none;
 font-size: 15px;
 line-height: 1;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0;
 }

 .upload-remove-btn:hover {
 background: var(--danger-color);
 }

 .upload-add-more {
 width: 80px;
 height: 80px;
 border: 2px dashed var(--border-color);
 border-radius: 6px;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 28px;
 color: var(--text-muted);
 cursor: pointer;
 transition: border-color 0.3s, color 0.3s;
 }

 .upload-add-more:hover {
 border-color: var(--primary-color);
 color: var(--primary-color);
 }

 /* ========== Autocomplete Dropdown ========== */
 .autocomplete-dropdown {
 position: absolute;
 top: 100%;
 left: 0;
 right: 0;
 max-height: 200px;
 overflow-y: auto;
 background: #fff;
 border: 1px solid var(--border-color);
 border-radius: 0 0 6px 6px;
 box-shadow: 0 4px 12px rgba(0,0,0,0.1);
 z-index: 1000;
 list-style: none;
 padding: 4px 0;
 margin: 0;
 }
 .autocomplete-dropdown li {
 padding: 8px 14px;
 cursor: pointer;
 font-size: 15px;
 color: var(--text-color);
 }
 .autocomplete-dropdown li:hover {
 background: var(--primary-color);
 color: #fff;
 }

 /* ========== Image Gallery (Detail) ========== */
 .image-gallery {
 display: flex;
 flex-wrap: wrap;
 gap: 12px;
 }

 .image-gallery-item {
 width: 150px;
 height: 150px;
 border-radius: 8px;
 overflow: hidden;
 border: 1px solid var(--border-color);
 cursor: pointer;
 transition: transform 0.2s, box-shadow 0.2s;
 }

 .image-gallery-item:hover {
 transform: scale(1.05);
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
 }

 .image-gallery-item img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 }

 /* ===== 图片完整加载后再淡入显示（避免从上到下渐显） ===== */
 img.fade-load {
 opacity: 0;
 background: #f2f3f5;
 transition: opacity .3s ease;
 }
 img.fade-load.loaded {
 opacity: 1;
 }
 /* 灯箱大图：加载完成前显示浅色占位 + 居中 loading 动效 */
 .modal-overlay img.fade-load {
 background: #eef1f5;
 }

 /* ========== Search Bar ========== */
 .search-bar {
   display: flex;
   gap: 10px;
   margin-bottom: 16px;
   flex-wrap: wrap;
   align-items: center;
 }

 .search-bar .form-group {
   margin-bottom: 0;
   display: flex;
   align-items: center;
   gap: 6px;
   flex: 0 0 auto;
 }

 .search-bar .form-group label {
   font-size: 12px;
   color: var(--text-muted);
   white-space: nowrap;
   margin: 0;
 }

 .search-bar input[type="text"],
 .search-bar input[type="search"],
 .search-bar select {
   height: 36px !important;
   padding: 0 10px !important;
   border: 1px solid var(--border-color) !important;
   border-radius: 4px !important;
   font-size: 13px !important;
   background: #fff;
   box-sizing: border-box;
   min-width: auto;
   max-width: none;
   outline: none;
 }

 .search-bar input[type="text"]:focus,
 .search-bar input[type="search"]:focus,
 .search-bar select:focus {
   border-color: var(--primary-color) !important;
   box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
 }

 .search-bar .btn {
   align-self: center;
   height: 36px;
   padding: 0 14px;
   font-size: 13px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
 }

 .search-bar .btn-sm {
   padding: 0 12px;
 }


 /* ========== Pagination ========== */
 .pagination {
 display: flex;
 justify-content: center;
 align-items: center;
 gap: 8px;
 margin-top: 20px;
 }

 .pagination .btn {
 padding: 8px 12px;
 font-size: 13px;
 }

 .pagination .btn.active {
 background: var(--primary-color);
 color: #fff;
 border-color: var(--primary-color);
 }

 .pagination .page-info {
 padding: 0 12px;
 font-size: 13px;
 color: var(--text-secondary);
 }

 /* ========== Modal ========== */
 .modal-overlay {
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 background: rgba(0, 0, 0, 0.5);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 1000;
 }
 /* 灯箱：图片加载完成前的 loading 指示 */
 .lb-loading {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 14px;
 color: #fff;
 font-size: 14px;
 letter-spacing: 1px;
 }
 .lb-loading .spinner {
 width: 40px;
 height: 40px;
 border: 4px solid rgba(255, 255, 255, 0.25);
 border-top-color: #fff;
 border-radius: 50%;
 animation: lb-spin 0.8s linear infinite;
 }
 @keyframes lb-spin {
 to { transform: rotate(360deg); }
 }

.modal {
background: var(--card-bg);
border-radius: 8px;
width: 100%;
max-width: 900px;
max-height: 95vh;
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;
}
.modal::-webkit-scrollbar { display: none; }

 .modal-header {
 padding: 16px 24px;
 border-bottom: 1px solid var(--border-color);
 display: flex;
 align-items: center;
 justify-content: space-between;
 }

 .modal-title {
 font-size: 16px;
 font-weight: 500;
 }

 .modal-close {
 font-size: 24px;
 cursor: pointer;
 color: var(--text-secondary);
 line-height: 1;
 background: none;
 border: none;
 }

 .modal-close:hover { color: var(--text-color); }

 .modal-body {
 padding: 24px;
 }

 .modal-footer {
padding: 16px 24px;
border-top: 1px solid var(--border-color);
display: flex;
justify-content: flex-end;
gap: 10px;
}

/* 扫码出入库 */
.scan-bar {
display: flex;
align-items: center;
gap: 8px;
margin: 10px 0 4px;
padding: 8px 10px;
background: #f6f8fb;
border: 1px dashed var(--primary-color, #2b6cb0);
border-radius: 10px;
}
.scan-bar .mi { font-size: 18px; color: var(--primary-color, #2b6cb0); }
.scan-bar input {
flex: 1;
height: 40px;
padding: 8px 12px;
border: 1px solid var(--border-color, #e2e8f0);
border-radius: 8px;
font-size: 14px;
outline: none;
}
.scan-bar input:focus { border-color: var(--primary-color, #2b6cb0); }
.scan-bar .scan-msg { font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-bar .scan-msg.ok { color: #2f9e44; }
.scan-bar .scan-msg.err { color: #e03131; }
.scan-batch { margin: 4px 0 8px; }
.scan-batch summary { cursor: pointer; font-size: 13px; color: var(--primary-color, #2b6cb0); user-select: none; }
.scan-batch textarea { width: 100%; margin: 6px 0; padding: 8px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 6px; font-size: 13px; resize: vertical; box-sizing: border-box; }

/* 出库商品搜索框 */
.out-search { position: relative; margin: 8px 0; }
.out-search input { width: 100%; height: 40px; padding: 8px 12px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 8px; font-size: 14px; outline: none; }
.out-search input:focus { border-color: var(--primary-color, #2b6cb0); }
.search-dropdown { position: absolute; z-index: 50; top: 42px; left: 0; right: 0; background: #fff; border: 1px solid var(--border-color, #e2e8f0); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; list-style: none; margin: 0; padding: 4px; }
.search-dropdown li { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.search-dropdown li:hover { background: #f1f5fb; }
.search-dropdown .sd-name { font-weight: 600; }
.search-dropdown .sd-model { color: #555; font-size: 12px; }
.search-dropdown .sd-no { color: var(--primary-color, #2b6cb0); font-size: 12px; margin-left: auto; }

/* 顶部全局快捷出入库条：入库 / 出库 两个独立入口 */
.quick-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.quick-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; position: relative; }
.quick-bar.qb-in { background: linear-gradient(90deg, #e9f9ee, #f2fcf5); border: 1px solid #2f9e44; }
.quick-bar.qb-out { background: linear-gradient(90deg, #fdeef0, #fef5f6); border: 1px solid #e03131; }
.quick-bar .qb-icon { font-size: 20px; }
.quick-bar.qb-in .qb-icon { color: #2f9e44; }
.quick-bar.qb-out .qb-icon { color: #e03131; }
.quick-bar .qb-title { font-weight: 700; font-size: 14px; padding: 2px 10px; border-radius: 6px; color: #fff; }
.quick-bar.qb-in .qb-title { background: #2f9e44; }
.quick-bar.qb-out .qb-title { background: #e03131; }
.quick-bar input { flex: 1; min-width: 240px; height: 40px; padding: 8px 12px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 8px; font-size: 14px; outline: none; }
.quick-bar.qb-in input:focus { border-color: #2f9e44; }
.quick-bar.qb-out input:focus { border-color: #e03131; }
.quick-bar .qb-msg { font-size: 13px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-bar .qb-msg.ok { color: #2f9e44; }
.quick-bar .qb-msg.err { color: #e03131; }
.qb-panel { flex-basis: 100%; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--border-color, #e2e8f0); margin-top: 4px; }
.qb-panel .qb-name { font-weight: 600; font-size: 14px; }
.qb-panel .qb-no { font-size: 12px; margin-left: 6px; }
.quick-bar.qb-in .qb-no { color: #2f9e44; }
.quick-bar.qb-out .qb-no { color: #e03131; }
.qb-panel label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.qb-stock span { font-weight: 700; color: #2b6cb0; }
.qb-stock span.warn { color: #e03131; }

/* 连续出入库确认浮层 */
.qb-confirm { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid #2b6cb0; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.qb-confirm.qb-in { border-color: #2f9e44; }
.qb-confirm.qb-out { border-color: #e03131; }
.qbc-head { display: flex; align-items: center; gap: 12px; }
.qbc-kind { font-weight: 700; font-size: 14px; }
.qb-confirm.qb-in .qbc-kind { color: #2f9e44; }
.qb-confirm.qb-out .qbc-kind { color: #e03131; }
.qbc-count { font-size: 12px; color: #868e96; }
.qbc-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.qbc-prod { font-weight: 700; font-size: 15px; }
.qbc-meta { font-size: 12px; color: #868e96; }
.qbc-row { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.qbc-row span.warn { color: #e03131; font-weight: 700; }
.qbc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qbc-tip { font-size: 12px; color: #868e96; }

/* 二维码打印标签 */
.qr-sheet { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.qr-label { border: 1px solid #ddd; border-radius: 6px; padding: 8px; background: #fff; display: flex; flex-direction: column; align-items: center; box-sizing: border-box; }
.qr-label-head { font-size: 12px; font-weight: 600; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-label-code { margin: 6px 0; }
.qr-label-foot { font-size: 12px; color: #333; text-align: center; }

/* 打印样式：仅打印二维码标签 */
@media print {
  body * { visibility: hidden !important; }
  .modal-overlay, .modal-overlay * { visibility: visible !important; }
  .modal-overlay { position: absolute; top: 0; left: 0; background: #fff; }
  .modal { box-shadow: none !important; max-width: 100% !important; width: 100%; }
  .modal-header, .modal-footer { display: none !important; }
  .qr-sheet { gap: 4px; }
  .qr-label { border: 1px dashed #999; page-break-inside: avoid; }
}


/* Detail grid labels */
/* 所有 .dg 统一限制宽度并居中，保证所有卡片视觉对齐 */
.card-body > .dg:not(.full),
.card-body > .dg.sparse,
.card-body > .dg.aligned {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 760px;
    margin: 0 auto;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.form-field label {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #999);
    margin-bottom: 6px;
}
.form-field input,
.form-field select {
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 6px;
    font-size: 14px;
    background: var(--card-bg, #fff);
    color: var(--text-color, #333);
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary-color, #1890ff);
    box-shadow: 0 0 0 3px var(--primary-bg-color, rgba(24,144,255,.12));
}
.form-actions {
    display: flex;
    align-items: end;
}
.form-actions .btn {
    height: 36px;
    padding: 0 18px;
    border-radius: 6px;
    font-size: 14px;
}
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-actions { justify-content: flex-end; }
}
.dg {
 display: grid;
 grid-template-columns: repeat(2, 1fr);
 gap: 12px;
 }
 .dg.full { grid-template-columns: 1fr; }
 .di {
 display: flex;
 flex-direction: column;
 gap: 6px;
 padding: 12px 14px;
 background: var(--card-bg, #fff);
 border: 1px solid var(--border-color, #e8e8e8);
 border-left: 4px solid var(--primary-color, #1890ff);
 border-radius: 8px;
 }
 .dl {
 font-size: 12px;
 font-weight: 600;
 color: var(--primary-color, #1890ff);
 text-transform: uppercase;
 letter-spacing: 0.5px;
 }
 .dv {
 font-size: 15px;
 color: var(--text-color, #333);
 font-weight: 500;
 line-height: 1.5;
 word-break: break-all;
 }
 .di .dv:empty::before {
 content: '-';
 color: #bbb;
 }
 .card-body .desc {
 margin-top: 4px;
 padding: 12px 14px;
 background: #f8f9fa;
 border: 1px solid var(--border-color, #e8e8e8);
 border-radius: 8px;
 font-size: 15px;
 line-height: 1.6;
 color: var(--text-color, #333);
 }

 /* ========== Detail Page ========== */
 .detail-header-bar {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding-bottom: 16px;
 margin-bottom: 20px;
 border-bottom: 2px solid var(--primary-color);
 }

 .detail-title-section {
 display: flex;
 align-items: center;
 gap: 16px;
 }

 .detail-no {
 font-size: 22px;
 font-weight: bold;
 color: var(--primary-color);
 }

 .detail-section {
 margin-bottom: 20px;
 background: #fafafa;
 border-radius: 8px;
 overflow: hidden;
 }

 .detail-section-title {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 12px 16px;
 background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
 color: white;
 font-weight: 500;
 font-size: 15px;
 }

 .section-icon { font-size: 18px; }

 .detail-section-content {
 padding: 16px;
 }

 .detail-row {
 display: grid;
 grid-template-columns: repeat(2, 1fr);
 gap: 16px;
 margin-bottom: 12px;
 }

 .detail-row:last-child { margin-bottom: 0; }

 .detail-item {
 display: flex;
 flex-direction: column;
 gap: 4px;
 }

 .detail-item.full { grid-column: span 2; }

 .detail-label {
 font-size: 12px;
 color: #999;
 }

 .detail-value {
 font-size: 15px;
 color: #333;
 }

 .sn-value {
 font-family: 'Consolas', monospace;
 background: #e6f7ff;
 padding: 4px 8px;
 border-radius: 4px;
 display: inline-block;
 }

 .error-code { color: #ff4d4f; font-weight: 500; }

 .solution-box {
 background: white;
 padding: 12px;
 border-radius: 6px;
 border-left: 3px solid var(--primary-color);
 line-height: 1.6;
 min-height: 60px;
 }

 /* Fee section */
 .fee-section {
 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 }

 .fee-section .detail-section-title {
 background: rgba(255, 255, 255, 0.1);
 }

 .fee-section .detail-section-content {
 background: white;
 margin: 8px;
 border-radius: 6px;
 padding: 12px;
 }

 .fee-grid {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 10px;
 margin-bottom: 0;
 }

 .fee-item {
 text-align: center;
 padding: 9px 8px;
 background: #fafafa;
 border-radius: 6px;
 transition: background .15s;
 }
 .fee-item:hover {
 background: #f5f7fa;
 }
 .fee-item .fee-label {
 font-size: 12px;
 }
 .fee-item .fee-value {
 font-size: 15px;
 font-weight: 600;
 margin-top: 2px;
 }

 /* ===== 发票上传行（费用明细内，费用总计与流水/凭证之间） ===== */
 .inv-upload-row {
 display: flex;
 align-items: center;
 flex-wrap: wrap;
 gap: 6px 12px;
 margin-top: 8px;
 padding: 7px 12px;
 background: #f8faff;
 border: 1px dashed var(--border-color, #d9e2f0);
 border-radius: 6px;
 }
 .inv-upload-label {
 font-size: 12px;
 color: var(--text-muted, #999);
 font-weight: 600;
 white-space: nowrap;
 flex-shrink: 0;
 }
 .inv-upload-controls {
 display: flex;
 align-items: center;
 gap: 8px;
 }
 .inv-upload-msg {
 font-size: 12px;
 flex-basis: 100%;
 }

 /* ===== 费用总计（简约块状，淡灰底 + 左侧蓝色强调条） ===== */
 .fee-total-block {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 9px 14px;
 margin-top: 8px;
 background: #fafbfc;
 border: 1px solid var(--border-color, #e8e8e8);
 border-left: 4px solid var(--primary-color, #1890ff);
 border-radius: 6px;
 }
 .fee-total-block .ftb-label {
 font-size: 12px;
 color: var(--text-muted, #999);
 font-weight: 500;
 letter-spacing: .5px;
 }
 .fee-total-block .ftb-value {
 font-size: 17px;
 font-weight: 700;
 color: var(--primary-color, #1890ff);
 font-family: "Menlo","Consolas",monospace;
 }

 /* ===== 费用明细底部元信息（发票号/回款/流水号/凭证）紧凑行内布局 ===== */
 .fee-meta {
 display: flex;
 flex-wrap: wrap;
 align-items: stretch;
 gap: 6px;
 margin-top: 8px;
 padding: 8px 12px;
 background: #fafbfc;
 border: 1px solid var(--border-color, #e8e8e8);
 border-radius: 6px;
 }
 .fm-row {
 display: flex;
 align-items: center;
 gap: 6px;
 flex: 1 1 auto;
 min-width: 0;
 padding: 0 6px;
 min-height: 26px;
 border-right: 1px solid #ececec;
 }
 .fm-row:last-child { border-right: none; }
 .fm-label {
 font-size: 12px;
 color: var(--text-muted, #999);
 white-space: nowrap;
 flex-shrink: 0;
 }
 .fm-value {
 font-size: 13px;
 font-weight: 500;
 color: var(--text-color, #333);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 }
 .fm-voucher {
 flex: 0 0 auto;
 }
 .fm-thumb {
 width: 60px;
 height: 60px;
 object-fit: cover;
 border-radius: 4px;
 cursor: pointer;
 background: #f5f6fa;
 border: 1px solid #e8e8e8;
 transition: transform .15s, box-shadow .15s;
 flex-shrink: 0;
 }
 .fm-thumb:hover {
 transform: scale(1.06);
 box-shadow: 0 2px 8px rgba(0,0,0,0.15);
 }

 .fee-label {
 display: block;
 font-size: 12px;
 color: #999;
 margin-bottom: 4px;
 }

 .fee-value {
 display: block;
 font-size: 16px;
 font-weight: 500;
 color: #333;
 }

 .fee-total-row {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 12px 16px;
 background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
 border-radius: 6px;
 }

 .fee-total-label {
 font-size: 15px;
 font-weight: 500;
 color: white;
 }

 .fee-total-value {
 font-size: 24px;
 font-weight: bold;
 color: white;
 }

 /* ========== 新工单弹窗 ========== */
.order-popup { position:fixed; bottom:80px; right:20px; width:340px; max-width:90vw; background:linear-gradient(135deg,#1a3c6e,#2c5282); color:#fff; border-radius:12px; box-shadow:0 8px 40px rgba(0,0,0,.3); cursor:pointer; z-index:4000; animation:slideIn .4s ease; display:flex; gap:12px; padding:16px; }
.order-popup.hide { animation:slideOut .4s ease forwards; }
.popup-close { position:absolute; top:6px; right:10px; font-size:20px; line-height:1; opacity:.6; cursor:pointer; }
.popup-close:hover { opacity:1; }
.popup-icon { font-size:32px; flex-shrink:0; }
.popup-title { font-size:13px; opacity:.8; }
.popup-wo { font-size:17px; font-weight:700; margin:4px 0; letter-spacing:1px; }
.popup-customer { font-size:13px; opacity:.85; }
.popup-hint { font-size:11px; opacity:.6; margin-top:6px; }
@keyframes slideIn { from { transform:translateX(120%); opacity:0; } to { transform:translateX(0); opacity:1; } }
@keyframes slideOut { from { transform:translateX(0); opacity:1; } to { transform:translateX(120%); opacity:0; } }

/* ========== Toast ========== */
 .toast {
 position: fixed;
 top: 20px;
 left: 50%;
 transform: translateX(-50%);
 padding: 12px 24px;
 border-radius: 6px;
 color: #fff;
 font-size: 15px;
 z-index: 2000;
 animation: toastFadeIn 0.3s;
 white-space: nowrap;
 }

 .toast-success { background: var(--success-color); }
 .toast-error { background: var(--danger-color); }
 .toast-warning { background: var(--warning-color); }

 @keyframes toastFadeIn {
 from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
 to { opacity: 1; transform: translateX(-50%) translateY(0); }
 }

 /* ========== Settings ========== */
 .theme-selector {
 display: flex;
 gap: 12px;
 margin-top: 12px;
 }

 .theme-option {
 width: 36px;
 height: 36px;
 border-radius: 50%;
 cursor: pointer;
 border: 3px solid transparent;
 transition: all 0.3s;
 }

 .theme-option:hover { transform: scale(1.15); }
 .theme-option.active { border-color: var(--text-color); box-shadow: 0 0 0 3px var(--primary-color); }

 .theme-dot-blue { background: #1890ff; }
 .theme-dot-light { background: #f0f2f5; border: 1px solid #ccc; }
 .theme-dot-dark { background: #0d1117; border: 1px solid #30363d; }
 .theme-dot-green { background: #52c41a; }
 .theme-dot-purple { background: #722ed1; }
 .theme-dot-orange { background: #fa8c16; }


 .settings-section {
 margin-bottom: 24px;
 }

 .settings-section h3 {
 font-size: 15px;
 color: var(--text-secondary);
 margin-bottom: 12px;
 padding-bottom: 8px;
 border-bottom: 1px solid var(--border-color);
 }

 .action-btns {
 display: flex;
 gap: 8px;
 }

 .action-btns .btn {
 padding: 6px 12px;
 font-size: 12px;
 }

 /* ========== Loading ========== */
 .loading {
 text-align: center;
 padding: 40px;
 color: var(--text-muted);
 }

 .loading-spinner {
 display: inline-block;
 width: 32px;
 height: 32px;
 border: 3px solid var(--border-color);
 border-top-color: var(--primary-color);
 border-radius: 50%;
 animation: spin 0.8s linear infinite;
 margin-bottom: 8px;
 }

 @keyframes spin {
 to { transform: rotate(360deg); }
 }

 /* ========== Tech Docs ========== */
 .tech-nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
 .tech-card { background: var(--card-bg); border-radius: 12px; padding: 28px; cursor: pointer; transition: all 0.3s; border: 2px solid var(--border-color); text-align: center; }
 .tech-card:hover { border-color: var(--primary-color); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
 .tech-icon { font-size: 48px; margin-bottom: 12px; }
 .tech-card h3 { font-size: 18px; margin-bottom: 8px; }
 .tech-card p { color: var(--text-secondary); font-size: 13px; margin-bottom: 12px; }
 .tech-count { color: var(--primary-color); font-size: 13px; }
 .tab-nav { display: flex; gap: 4px; }
 .tab-nav button { padding: 10px 20px; border: 1px solid var(--border-color); background: var(--card-bg); cursor: pointer; border-radius: 6px 6px 0 0; font-size: 15px; }
 .tab-nav button.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
 .stats-bar { padding: 10px 16px; background: #f0f5ff; border-radius: 8px; margin-bottom: 16px; font-size: 15px; }
.editor-container { background: var(--card-bg); border-radius: 8px; padding: 24px; }
.editor-container .form-input, .editor-container .form-textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 15px; }
.editor-container .form-textarea { resize: vertical; font-family: inherit; }
.editor-container .form-row { display: flex; gap: 16px; }
.editor-container .form-row .form-group { flex: 1; }
.editor-container .form-group { margin-bottom: 16px; }
.editor-container label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text-secondary); font-size: 13px; }
.editor-toolbar { display: flex; gap: 8px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px; }

/* ========== 统一富文本编辑器主题 ========== */
.unified-editor { background: var(--card-bg); border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid var(--border-color); overflow: hidden; display: flex; flex-direction: column; }
.unified-editor-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: linear-gradient(180deg, #fafbfc 0%, #f0f3f7 100%); border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.unified-editor-toolbar .tool-group { display: flex; gap: 4px; padding: 0 8px; border-right: 1px solid var(--border-color); }
.unified-editor-toolbar .tool-group:last-child { border-right: none; padding-right: 0; }
.unified-editor-toolbar .tool-group:first-child { padding-left: 0; }
.unified-editor-toolbar .tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 14px; border: 1px solid var(--border-color); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-secondary); transition: all 0.2s; }
.unified-editor-toolbar .tool-btn:hover { background: var(--primary-bg-color); border-color: var(--primary-color); color: var(--primary-color); transform: translateY(-1px); }
.unified-editor-toolbar .tool-btn.primary { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.unified-editor-toolbar .tool-btn.primary:hover { background: var(--primary-light); }
.unified-editor-toolbar .tool-btn svg { width: 16px; height: 16px; }
.unified-editor-content { flex: 1; padding: 24px; background: var(--card-bg); min-height: 400px; }

/* 块编辑器统一风格 */
.rich-block { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); transition: all 0.2s ease; position: relative; }
.rich-block:hover { border-color: var(--primary-color); box-shadow: 0 4px 16px rgba(24,144,255,0.1); }
.rich-block.focused { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(24,144,255,0.1), 0 4px 16px rgba(24,144,255,0.1); }
.rich-block-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: linear-gradient(180deg, #fafbfc 0%, #f4f6f9 100%); border-bottom: 1px solid var(--border-color); border-radius: 10px 10px 0 0; }
.rich-block-body { padding: 12px 16px; }
.rich-block-actions { display: flex; gap: 4px; margin-left: auto; }
.rich-block-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--border-color); background: #fff; border-radius: 6px; cursor: pointer; font-size: 15px; color: var(--text-secondary); transition: all 0.2s; }
.rich-block-btn:hover { background: var(--primary-bg-color); color: var(--primary-color); border-color: var(--primary-color); }
.rich-block-btn.danger:hover { background: #fff2f0; color: var(--danger-color); border-color: var(--danger-color); }
.rich-block-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* 文本块格式工具栏 */
.block-format-bar { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid var(--border-color); margin-bottom: 8px; flex-wrap: wrap; }
.block-format-bar .format-btn { padding: 4px 10px; border: 1px solid transparent; background: transparent; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); transition: all 0.2s; }
.block-format-bar .format-btn:hover { background: var(--primary-bg-color); color: var(--primary-color); }
.block-format-bar .format-btn.active { background: var(--primary-color); color: #fff; }

/* 输入框样式 */
.rich-block input, .rich-block textarea { width: 100%; border: none; outline: none; background: transparent; font-family: inherit; color: var(--text-color); }
.rich-block textarea { resize: vertical; line-height: 1.8; }

/* 空块状态 */
.rich-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); border: 2px dashed var(--border-color); border-radius: 12px; background: #fafbfc; }

/* Quill 编辑器统一覆盖 */
.ql-toolbar { background: linear-gradient(180deg, #fafbfc 0%, #f0f3f7 100%) !important; border-color: var(--border-color) !important; border-radius: 8px 8px 0 0 !important; padding: 10px 12px !important; }
.ql-container { border-color: var(--border-color) !important; border-radius: 0 0 8px 8px !important; background: var(--card-bg) !important; }
.ql-editor { min-height: 300px; font-size: 15px; line-height: 1.8; color: var(--text-color); }
.ql-editor p { margin-bottom: 8px; }
.ql-snow .ql-picker-label { color: var(--text-secondary); }
.ql-snow .ql-stroke { stroke: var(--text-secondary); }
.ql-snow .ql-fill { fill: var(--text-secondary); }
.ql-snow .ql-picker-options { background: var(--card-bg); border-color: var(--border-color); }
.ql-snow .ql-tooltip { background: var(--card-bg); border-color: var(--border-color); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

/* tech editor 尺寸 */
#tech-editor-wrapper { border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
#tech-editor-wrapper .ql-editor { min-height: 420px; }

/* repair editor 尺寸 */
#repair-editor-wrapper { border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
#repair-editor-wrapper .ql-editor { min-height: 300px; }



 /* 手机模型预览 */
 .phone-frame { position: relative; width: 375px; height: 760px; background: #1a1a1a; border-radius: 44px; padding: 12px; box-shadow: 0 25px 70px rgba(0,0,0,0.45); display: flex; flex-direction: column; overflow: hidden; }
 .phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 150px; height: 28px; background: #1a1a1a; border-radius: 0 0 18px 18px; z-index: 10; }
 .phone-statusbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 22px 4px; color: #fff; font-size: 12px; font-weight: 600; background: #1a1a1a; z-index: 5; }
 .phone-navbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f5f5f5; border-bottom: 1px solid #e0e0e0; }
 .phone-navbtn { background: none; border: none; font-size: 16px; color: #333; cursor: pointer; padding: 4px 8px; }
 .phone-navtitle { font-size: 15px; color: #333; font-weight: 500; }
 .phone-screen { flex: 1; background: #fff; overflow-y: auto; border-radius: 0 0 32px 32px; }
 .phone-homebar { width: 120px; height: 5px; background: rgba(255,255,255,0.6); border-radius: 3px; margin: 8px auto 4px; }
 .phone-body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; padding-top: 12px; }
 .preview-cover img { width: calc(100% - 32px); margin: 0 16px 16px; border-radius: 6px; display: block; }
 .preview-title { font-size: 22px; font-weight: 700; line-height: 1.4; padding: 0 16px; margin: 0 0 8px 0; color: #222; }
 .preview-meta { padding: 0 16px; color: #999; font-size: 12px; margin-bottom: 16px; }
 .preview-content { padding: 0 16px 24px; font-size: 16px; line-height: 1.8; color: #333; word-break: break-word; }
 .preview-content h2,.preview-content h3 { font-size: 18px; }
 .preview-content img { max-width: 100%; height: auto; border-radius: 4px; }
 .preview-content p { margin: 8px 0; }
 .preview-content blockquote { border-left: 3px solid #1890ff; padding-left: 12px; color: #666; margin: 12px 0; }
 /* 统计卡片 */
 .stat-card { background: linear-gradient(135deg, var(--primary-bg-color,#e6f7ff), #fff); border-radius: 12px; padding: 24px 20px; text-align: center; border: 1px solid var(--border-color); }
 .stat-num { font-size: 32px; font-weight: 700; color: var(--primary-color); }
 .stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
/* 页面容器样式 - 留空用于未来扩展 */
.page-container { }
 .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
 .page-header h2 { font-size: 22px; }
 .header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
 .search-input { padding: 8px 14px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 13px; min-width: 200px; }
 .filter-select { padding: 8px 14px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 13px; }
 .btn-back { padding: 8px 16px; border: 1px solid var(--border-color); background: var(--card-bg); border-radius: 6px; cursor: pointer; font-size: 13px; }
 .data-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: 8px; overflow: hidden; }
 .data-table th { background: linear-gradient(180deg, #f8fafc 0%, #eff2f7 100%); padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.3px; border-bottom: 2px solid var(--primary-lighter); white-space: nowrap; position: sticky; top: 0; z-index: 5; }
 .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-color); font-size: 13px; color: var(--text-secondary); }
 .data-table tbody tr { transition: background 0.15s ease; }
 .data-table tbody tr:hover td { background: var(--primary-lightest); }
 .title-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .action-cell { white-space: nowrap; display: flex; gap: 6px; }
 .tag { display: inline-block; padding: 2px 8px; background: #f0f0f0; border-radius: 4px; font-size: 11px; }
 .status-draft { background: #fff7e6; color: #fa8c16; }
.modal-large { max-width: 900px; }
/* 案例详情样式 - 留空用于未来扩展 */
.case-detail { }
 .content-block { background: #f8f9fa; padding: 14px; border-radius: 6px; margin: 8px 0 16px; white-space: pre-wrap; line-height: 1.6; }
 .pdf-viewer { margin-top: 16px; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
 .loading-text { text-align: center; padding: 40px; color: var(--text-secondary); }
 .page-container { padding-bottom: 20px; }

 /* ========== Inline Toast ========== */
 .toast-inline { padding: 8px 12px; border-radius: 6px; font-size: 13px; display: flex; align-items: center; }
 .toast-inline.success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
 .toast-inline.error { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }

.login-page {
    position: fixed; inset: 0;
    background-color: #1a3a6c;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(10,20,40,0.3);
    pointer-events: none;
    animation: bgPulse 15s ease-in-out infinite alternate;
}
@keyframes bgPulse {
    0% { background: rgba(10,20,40,0.25); }
    100% { background: rgba(10,20,40,0.45); }
}
 .login-wrapper {
 position: relative; z-index: 1;
 width: 100%; max-width: 420px;
 display: flex; flex-direction: column; align-items: center;
 padding: 20px;
 }
.login-box {
    width: 100%;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 18px;
    padding: 36px 32px 28px;
    box-shadow:
        0 25px 60px rgba(0,0,0,0.2),
        0 0 1px rgba(255,255,255,0.6) inset,
        0 0 80px rgba(64,158,255,0.05) inset;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
 .login-title {
 text-align: center;
 font-size: 24px; font-weight: 500;
 color: #333;
 margin: 0 0 28px 0;
 letter-spacing: 1px;
 }
 .login-form { width: 100%; }
 .login-input-group {
 position: relative;
 margin-bottom: 18px;
 }
 .login-input-group input {
 width: 100%;
 height: 48px;
 padding: 0 42px 0 42px;
 border: 1px solid #e0e0e0;
 border-radius: 8px;
 font-size: 15px;
 color: #333;
 background: #fafafa;
 transition: all 0.2s;
 }
 .login-input-group input:focus {
 outline: none;
 border-color: #409eff;
 background: #fff;
 box-shadow: 0 0 0 3px rgba(64,158,255,0.1);
 }
 .login-icon {
 position: absolute;
 left: 14px; top: 50%;
 transform: translateY(-50%);
 font-size: 16px;
 color: #999;
 user-select: none;
 }
 .login-eye {
 position: absolute;
 right: 12px; top: 50%;
 transform: translateY(-50%);
 font-size: 16px;
 color: #999;
 cursor: pointer;
 padding: 4px;
 user-select: none;
 }
 .login-eye:hover { color: #666; }
 .login-error {
 min-height: 20px;
 font-size: 12px;
 color: #f56c6c;
 margin-bottom: 8px;
 }
 .login-btn {
 width: 100%;
 height: 46px;
 border: none;
 border-radius: 8px;
 background: #1890ff;
 color: #fff;
 font-size: 16px;
 font-weight: 500;
 cursor: pointer;
 transition: all 0.2s;
 letter-spacing: 2px;
 }
.login-btn:hover { background: #40a9ff; }
.login-btn:disabled { background: #a0cfff; cursor: not-allowed; }
.login-register-row { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: #fff; }
.login-register-row a { color: #fff; text-decoration: none; opacity: 0.85; transition: opacity 0.2s; padding: 2px 6px; border-radius: 4px; }
.login-register-row a:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.login-register-row .dot { opacity: 0.5; }
.form-error { color: var(--danger-color); font-size: 12px; padding: 6px 10px; background: var(--danger-light); border-radius: 4px; margin-top: 4px; }
.login-footer {
 position: fixed; bottom: 20px;
 font-size: 12px;
 color: rgba(255,255,255,0.45);
 text-align: center;
 }

 .chart-card h3 {
 font-size: 18px;
 font-weight: 600;
 color: var(--text-color);
 margin-bottom: 12px;
 }

 .page-header h2 {
 font-size: 22px;
 font-weight: 600;
 }

 .card-title, .card-header > span:first-child {
 font-size: 16px;
 font-weight: 600;
 }

 /* 新建工单 - A4页宽 */
.order-form-page { max-width: 1200px; margin: 0 auto; }
/* 工单详情页占满整个内容区，不做 A4 居中 */
.order-form-page.od-a4 { max-width: 100%; width: 100%; margin: 0; padding: 16px 20px; }

/* ========== Order Form Underline Inputs ========== */
 .order-form input:not([type="file"]),
 .order-form textarea,
 .order-form select {
 border: none;
 border-bottom: 1px solid var(--border-color);
 background: transparent;
 border-radius: 0;
 padding: 8px 0;
 box-shadow: none;
 }
 .order-form input:not([type="file"]):focus,
 .order-form textarea:focus,
 .order-form select:focus {
 outline: none;
 border-bottom-color: var(--primary-color);
 box-shadow: none;
 }
 .order-form textarea {
 min-height: 80px;
 resize: vertical;
 }
 /* 工单表单：被锁定字段标识 */
.field-locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 400;
    color: #8c8c8c;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    white-space: nowrap;
}
.field-locked-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #d9d9d9;
    border-radius: 50%;
    margin-right: 2px;
}
/* 禁用输入框样式 */
input:disabled, textarea:disabled, select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #f9f9f9 !important;
    color: #666 !important;
    border-color: #e8e8e8 !important;
}

.order-form .autocomplete-dropdown {
 top: 36px;
 }

 /* ========== Server Page ========== */
 .info-item {
 display: flex; flex-direction: column;
 padding: 10px 12px; background: var(--bg-color);
 border-radius: 6px;
 }
.info-item .lbl { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.info-item .val { font-size: 15px; font-weight: 500; color: var(--text-color); }

/* ========== 工单表单底部按钮 ========== */
.form-bottom-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    margin: 24px 0 40px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
    border-radius: 8px;
}
.btn-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 110px;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}
.btn-form svg { flex-shrink: 0; }
.btn-form:active { transform: translateY(1px); }
.btn-form:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-form-cancel {
    background: #fff;
    color: var(--text-color, #333);
    border-color: var(--border-color, #d1d5db);
}
.btn-form-cancel:hover {
    background: #f9fafb;
    border-color: var(--primary-color, #1890ff);
    color: var(--primary-color, #1890ff);
}
.btn-form-save {
    background: linear-gradient(135deg, var(--primary-color, #1890ff) 0%, var(--primary-dark, #096dd9) 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(24,144,255,0.25);
}
.btn-form-save:hover:not(:disabled) {
    box-shadow: 0 4px 14px rgba(24,144,255,0.4);
    transform: translateY(-1px);
}
.btn-form-save .spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.company-opt:hover { border-color: var(--primary-color) !important; background: var(--primary-lightest); }
.company-opt.active { border-color: var(--primary-color) !important; background: var(--primary-lightest); }
@media (max-width: 480px) {
    .form-bottom-bar { flex-direction: column-reverse; gap: 8px; }
    .btn-form { width: 100%; }
}


 /* ========== Responsive ========== */
 @media (max-width: 768px) {
 .sidebar {
 position: fixed;
 left: 0;
 top: 0;
 bottom: 0;
 transform: translateX(-100%);
 }

 .sidebar.open {
 transform: translateX(0);
 }

 .mobile-menu-btn { display: block; }

 .stats-row { grid-template-columns: repeat(2, 1fr); }
 .chart-container { grid-template-columns: 1fr; }
 .form-row { flex-direction: column; gap: 0; }
 .detail-row { grid-template-columns: 1fr; }
 .detail-item.full { grid-column: span 1; }
 .fee-grid { grid-template-columns: repeat(2, 1fr); }
 }

/* ========== Print ========== */
@media print {
.sidebar, .header, .btn, .search-bar, .action-btns, .modal-overlay, .pagination, .toast {
display: none !important;
}
.main-content { width: 100%; }
.content { padding: 0; }
.card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
}

/* ========== 路由过渡动画 ========== */
.route-fade-enter-active, .route-fade-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.route-fade-enter-from {
  opacity: 0;
  transform: translateY(8px);
}
.route-fade-leave-to {
  opacity: 0;
  transform: translateY(-8px);
}

/* ========== 错误边界 ========== */
.error-boundary {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center; min-height: 300px;
}
.error-boundary-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--danger-color); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: bold; margin-bottom: 16px;
}
.error-boundary h3 { margin-bottom: 8px; color: var(--text-color); }
.error-boundary p { color: var(--text-muted); margin-bottom: 20px; max-width: 400px; }

/* ========== 上传进度条 ========== */
.upload-progress {
  margin-top: 8px; height: 4px; background: var(--border-color); border-radius: 2px; overflow: hidden;
}
.upload-progress-bar {
  height: 100%; background: var(--primary-color); border-radius: 2px;
  transition: width 0.3s ease;
}
.upload-progress-text {
  font-size: 11px; color: var(--text-muted); margin-top: 4px; text-align: right;
}

/* ========== 响应式侧边栏增强 ========== */
@media (max-width: 1024px) {
  .sidebar { width: 60px; }
  .sidebar .sidebar-menu a span { display: none; }
  .sidebar .sidebar-user-name { display: none; }
  .sidebar.open { width: 180px; }
  .sidebar.open .sidebar-menu a span { display: inline; }
  .sidebar.open .sidebar-user-name { display: block; }
}

 /* ========== 技术资料树形样式 (v97) ========== */
 .tech-tree{user-select:none;}
 .tech-tree .tree-item-wrap{position:relative;}
 .tech-tree .tree-node-row{
 display:flex;align-items:center;padding:10px 8px 10px 4px;
 border-radius:6px;margin-bottom:2px;
 cursor:pointer;font-size:16px;line-height:1.5;gap:2px;
 transition:background 0.15s;
 }
 .tech-tree .tree-node-row:hover{background:var(--primary-light);}
 .tech-tree .tree-node-row.active{
 background:var(--primary-color);
 color:#fff;font-weight:600;
 }
 .tech-tree .tree-node-row.active .tree-count{
 background:rgba(255,255,255,0.25);color:#fff;
 }
 .tech-tree .tree-node-row.active .tree-toggle{
 color:#fff;
 }
.tech-tree-toolbar{
 display:flex;flex-wrap:wrap;gap:6px;width:100%;
 }
.tech-tree-toolbar .btn{margin:0;}
.tech-tree .tree-node-row{cursor:pointer;}
/* ===== 树状折叠/展开三角符号（与技术资料树一致） ===== */
.tech-tree .tree-toggle,
.tree-toggle {
flex-shrink: 0;
display: inline-flex;
width: 18px;
height: 18px;
align-items: center;
justify-content: center;
color: var(--text-muted);
line-height: 1;
margin-right: 2px;
transition: transform 0.2s;
transform: rotate(90deg); /* 默认展开：三角形朝下 */
cursor: pointer;
}
.tech-tree .tree-toggle:hover,
.tree-toggle:hover {
color: var(--primary-color);
}
.tech-tree .tree-toggle.collapsed,
.tree-toggle.collapsed {
transform: rotate(0deg); /* 收起：三角形朝右 */
}
.tech-tree .tree-toggle.leaf,
.tree-toggle.leaf {
transform: rotate(0deg);
opacity: 0.25;
cursor: default;
}
.tech-tree .tree-toggle.leaf svg,
.tree-toggle.leaf svg {
width: 6px;
height: 6px;
}

 .tech-tree .tree-label{
 flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 font-size:16px;min-width:0;
 }
 .tech-tree .tree-count{
 flex-shrink:0;font-size:12px;color:var(--text-muted);
 background:rgba(128,128,128,0.1);border-radius:10px;
 padding:0 7px;height:20px;line-height:20px;margin-right:6px;
 }
 .tech-tree .tree-actions{display:flex;gap:2px;flex-shrink:0;opacity:0;transition:opacity 0.15s;}
 .tech-tree .tree-node-row:hover .tree-actions,.tech-tree .tree-node-row.active .tree-actions{opacity:1;}
 .tech-tree .btn-xs-link{
 background:none;border:none;padding:2px 5px;
 font-size:13px;cursor:pointer;border-radius:4px;
 color:var(--text-muted);transition:all 0.15s;
 }
 .tech-tree .btn-xs-link:hover{background:rgba(255,255,255,0.5);color:var(--primary-color);}
 .tech-tree .btn-xs-link.del:hover{color:var(--danger-color);background:rgba(220,53,69,0.08);}

 /* 备件仓库树状操作按钮已移至顶部工具栏（新建仓库/新增区域/编辑/删除） */

/* ===== 仓库目录顶部工具栏（单行布局） ===== */
.wh-toolbar {
display: flex;
gap: 4px;
flex-wrap: nowrap;
align-items: stretch;
width: 100%;
}
.wh-toolbar .btn {
flex: 1 1 0;
min-width: 0;
padding: 4px 6px;
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

  .tech-tree .tree-children{
  position:relative;padding-left:18px;margin-left:11px;
  border-left:1.5px dotted var(--primary-color);
  }
 .tech-tree .tree-node-row.child{padding-left:4px;font-size:15px;}
 .tech-tree .tree-node-row.child .tree-label{font-size:15px;}
  .tech-tree .tree-node-row.child3{padding-left:4px;font-size:14px;}
  .tech-tree .tree-node-row.child3 .tree-label{font-size:14px;}



/* ===== 全局UI现代化升级：标题更大气、内容更精致、按钮更现代 ===== */
/* 页面内容基准：更紧凑精致 */
.page-container { font-size: 13px; color: var(--text-secondary); }

/* 标题：更大、更粗、更有层次 */
.page-header { margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--border-color); }
.page-header h2 { font-size: 28px; font-weight: 700; color: var(--text-color); letter-spacing: 0.3px; }
.page-header h3 { font-size: 20px; font-weight: 700; color: var(--text-color); }

/* 内容区域字体更小更精致 */
.card-body { font-size: 13px; }
.content-block { font-size: 13px; line-height: 1.7; }
.search-input, .filter-select, .btn-back { font-size: 12px; padding: 9px 14px; }

/* ===== 工单详情页 宽屏显示 ===== */
/* 容器占满整个内容区，取消旧 A4 居中限制，最大宽度 1600px 以保证大屏阅读舒适度 */
.od-a4 {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 24px 32px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    box-sizing: border-box;
    overflow: visible;
    flex-shrink: 0;
}
/* 内部容器，确保所有卡片在同DOM父级内 */
.od-a4-inner {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
/* 卡片铺满容器宽度，取消旧 A4 纸张居中限制 */
.od-a4 > .card,
.od-a4 .card,
.order-form-page > .card,
.order-form-page .card {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 18px;
    box-sizing: border-box !important;
}
.od-a4 .card-body { min-width: 0; overflow: hidden; }
.od-a4 > .card:last-child { margin-bottom: 0; }
/* 卡片内部网格铺满：每块宽度由内容自适应（最小 200px，内容多则自动变宽），
   剩余空间由行尾的"占位空格"吸收，避免最后一项独占一行时与同行宽度不一致 */
.od-a4 .card-body > .dg:not(.full),
.od-a4 .card-body > .dg.sparse,
.od-a4 .card-body > .dg.aligned {
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(200px, auto));
}
.od-a4 .card-body > .fee-grid { max-width: 100%; margin: 0 auto; }
/* 卡片标题：左侧强调条 + 清晰层级（取消居中） */
.od-a4 .card-header {
    justify-content: flex-start;
    position: relative;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    padding-bottom: 12px;
}
.od-a4 .card-header::before {
    content: "";
    width: 4px;
    height: 16px;
    background: var(--primary-color, #1890ff);
    border-radius: 2px;
    margin-right: 8px;
}
.od-a4 .card-header .btn,
.od-a4 .card-header .status-tag {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}
.od-a4 .card-header .od-title {
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #333);
}
.od-a4 .card-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.od-a4 .card-body table th,
.od-a4 .card-body table td { padding: 10px 14px; border: 1px solid #e8e8e8; vertical-align: middle; }
.od-a4 .card-body table thead th { background: #f5f7fa; color: #555; font-weight: 600; text-align: left; }
.od-a4 .card-body table tbody tr:nth-child(even) { background: #fafbfc; }
.od-a4 .card-body table tbody tr:hover { background: #f0f6ff; }

/* 富文本内容（处理过程/维修过程/完成情况）中的图片与视频排版 */
.od-a4 .desc img,
.od-a4 .card-body .ql-editor img,
.od-card .desc img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 6px 0;
    box-shadow: 0 1px 4px rgba(0,0, 0,.08);
}
.od-a4 .desc video,
.od-card .desc video {
    max-width: 100%;
    border-radius: 8px;
    margin: 6px 0;
    background: #000;
    display: block;
}
/* 图片环绕（正文内联 float 由编辑器写入 inline style，这里仅兜底） */
.od-a4 .desc img[style*="float"] { margin: 4px 12px; }
.od-a4 .desc img[style*="auto"] { display: block; margin: 8px auto; }
@media (max-width: 840px) {
    .od-a4 { width: 100%; max-width: 100%; margin: 0; border-radius: 0; box-shadow: none; padding: 16px; }
}

/* ===== 顶部操作栏（返回+工单号 / 操作按钮单行布局，按钮自然右对齐换行） ===== */
.od-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; flex-wrap: wrap; }
.od-top-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 0 1 auto; min-width: 0; }
.od-wo { font-size: 18px; font-weight: 700; color: var(--text-color, #2c3e50); letter-spacing: .5px; }
.od-payer { font-size: 12px; color: var(--text-muted); background: #f5f5f5; border-radius: 4px; padding: 3px 8px; }
.od-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; flex: 1 1 auto; min-width: 0; }
.od-divider { width: 1px; height: 20px; background: var(--border-color); margin: 0 4px; flex-shrink: 0; }

/* ===== 生成报告按钮下的进度条 ===== */
.gen-wrap { display: inline-flex; flex-direction: column; align-items: stretch; gap: 3px; }
.gen-progress {
position: relative;
height: 6px;
min-width: 120px;
background: #f0f2f5;
border-radius: 3px;
overflow: hidden;
}
.gen-progress-bar {
height: 100%;
background: linear-gradient(90deg, var(--primary-color, #1890ff), var(--primary-dark, #096dd9));
border-radius: 3px;
transition: width .2s ease;
}
.gen-progress-text {
position: absolute;
right: 4px;
top: -1px;
font-size: 9px;
line-height: 6px;
color: var(--text-muted, #999);
}

/* ===== 报告与附件列表项（按钮左对齐，紧跟标题后） ===== */
.od-att { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.od-att:last-child { border-bottom: none; }
.od-att-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; }
.od-att-title { font-weight: 500; }
.od-att-sub { font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.od-att-sub.ok { color: var(--success-color, #52c41a); background: rgba(82,196,26,.1); }
.od-att-sub.pending { color: var(--text-muted); background: #f5f5f5; }
.od-att-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.od-att-empty { color: var(--text-muted); font-size: 12px; margin-left: auto; }


/* 统计卡片标题 */
.chart-card h3 { font-size: 20px; font-weight: 700; color: var(--text-color); }

/* Tab 导航 */
.tab-nav { display: flex; gap: 6px; padding: 4px; background: var(--bg-color); border-radius: 10px; border: 1px solid var(--border-color); }
.tab-nav button { padding: 9px 18px; border: none; background: transparent; cursor: pointer; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-secondary); transition: all 0.25s ease; }
.tab-nav button:hover { background: rgba(24,144,255,0.08); color: var(--primary-color); }
.tab-nav button.active { background: var(--primary-color); color: #fff; box-shadow: 0 4px 12px rgba(24,144,255,0.25); }

/* + 新建/+ 新增 按钮中的加号 */
.btn-plus { font-size: 1.5em; font-weight: 700; margin-right: 5px; line-height: 1; }

/* ===== 文字语义层级工具类 ===== */
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-strong { font-weight: 700; color: var(--text-color); }
.text-label { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.text-number { font-weight: 700; font-variant-numeric: tabular-nums; }
.data-table .title-cell { font-size: 13px; font-weight: 600; color: var(--text-color); }

/* 搜索输入框更现代 */
.search-input, .filter-select, .btn-back { border-radius: 10px; transition: all 0.2s ease; }
.search-input:focus, .filter-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(24,144,255,0.1); outline: none; }

/* 统计卡片 */
.stat-card { border-radius: 14px; padding: 22px 18px; background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, var(--card-bg) 100%); border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 4px 16px rgba(0,0,0,0.06); transition: all 0.3s ease; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.stat-num { font-size: 34px; font-weight: 700; color: var(--primary-color); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

/* 头部标题更大气 */
.header-center { font-size: 24px; font-weight: 700; letter-spacing: 0.5px; text-shadow: 0 2px 6px rgba(0,0,0,0.2); }

/* 侧边栏当前项更醒目 */
.sidebar-menu a.router-link-active { background: var(--sidebar-active-bg); color: var(--sidebar-text-active); font-weight: 600; box-shadow: inset 3px 0 0 rgba(255,255,255,0.8); }
/* 图表 tooltip 即时显示/隐藏 */
canvas+.chartjs-tooltip,#chartjs-tooltip,.chartjs-tooltip{transition:none!important;}
/* 接单进度时间线 */
.accept-steps{display:flex;align-items:center;gap:6px;margin-top:14px;flex-wrap:wrap;}
.accept-step{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-muted);padding:6px 12px;border-radius:20px;background:var(--bg-color);border:1px solid var(--border-color);}
.accept-step .dot{width:20px;height:20px;border-radius:50%;background:var(--text-muted);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:12px;}
.accept-step.on{color:var(--success-color);border-color:var(--success-color);background:rgba(40,199,111,.08);}
.accept-step.on .dot{background:var(--success-color);}
/* 通知铃铛 */
.header-right{margin-left:auto;display:flex;align-items:center;gap:12px;}
.header-notif{position:relative;}
.header-notif-btn{position:relative;background:rgba(255,255,255,.15);border:none;color:#fff;width:38px;height:38px;border-radius:50%;font-size:18px;cursor:pointer;transition:background .2s;display:flex;align-items:center;justify-content:center;}
.header-notif-btn:hover{background:rgba(255,255,255,.28);}
.notif-badge{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 4px;background:var(--danger-color);color:#fff;border-radius:9px;font-size:11px;line-height:18px;text-align:center;box-shadow:0 0 0 2px rgba(255,255,255,.2);}
.notif-backdrop{position:fixed;inset:0;z-index:40;}
.notif-panel{position:absolute;top:46px;right:0;width:340px;max-width:86vw;background:var(--card-bg);border:1px solid var(--border-color);border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.18);z-index:50;overflow:hidden;}
.notif-panel-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border-color);font-weight:600;color:var(--text-color);}
.notif-readall{background:none;border:none;color:var(--primary-color);font-size:13px;cursor:pointer;}
.notif-list{max-height:60vh;overflow-y:auto;}
.notif-item{padding:12px 16px;border-bottom:1px solid var(--border-color);cursor:pointer;transition:background .15s;}
.notif-item:hover{background:var(--bg-color);}
.notif-item.unread{background:var(--primary-bg-color);}
.notif-item.unread .notif-title::before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--primary-color);margin-right:6px;vertical-align:middle;}
.notif-title{font-size:14px;font-weight:600;color:var(--text-color);margin-bottom:4px;}
.notif-content{font-size:13px;color:var(--text-secondary);line-height:1.5;}
.notif-time{font-size:11px;color:var(--text-muted);margin-top:6px;}
.notif-empty{padding:30px;text-align:center;color:var(--text-muted);font-size:13px;}
.notif-sound-btn{background:transparent;border:1px solid var(--border-color);color:var(--text-muted);width:26px;height:26px;border-radius:6px;font-size:14px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:all .2s;}
.notif-sound-btn:hover{border-color:var(--primary-color);color:var(--primary-color);}
.notif-sound-btn.on{color:var(--primary-color);border-color:var(--primary-lighter);background:var(--primary-lightest);}
.notif-sound-btn.on::after{content:'·';color:var(--success-color);margin-left:-2px;font-weight:900;}
.notif-panel-foot{padding:10px 16px;border-top:1px solid var(--border-color);text-align:center;background:var(--bg-color);}
.notif-panel-foot a{color:var(--primary-color);font-size:13px;cursor:pointer;text-decoration:none;font-weight:500;}
.notif-panel-foot a:hover{text-decoration:underline;}
/* ERP 数据管理 子选项卡(出库单/商品厂家/供应商) 选中/未选中 */
.dm-subtab{background:var(--bg-color,#fff);color:var(--text-muted);}
.dm-subtab:hover{background:rgba(26,115,232,0.08);color:var(--nav-active);border-color:var(--nav-active);}
.dm-subtab.active{background:var(--nav-active,#1a73e8);color:#fff;border-color:var(--nav-active,#1a73e8);font-weight:600;box-shadow:0 2px 6px rgba(26,115,232,0.3);}
/* ERP 出库单 列表：配件摘要 + 选中行高亮 */
.ob-summary{font-size:11px;color:var(--text-muted);margin-top:2px;line-height:1.4;}
.table tbody tr.selected{background:rgba(26,115,232,0.08);}
.table tbody tr{cursor:pointer;}
.table tbody tr td:first-child{text-align:center;}

/* ========== 单色 SVG 图标系统（替代彩色 emoji） ========== */
.mi{display:inline-block;width:1em;height:1em;flex:none;vertical-align:-0.15em;
  background-color:currentColor;-webkit-mask-position:center;mask-position:center;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-size:contain;mask-size:contain;}
.mi-box{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2 3 7v10l9 5 9-5V7l-9-5zm0 2.3L18.5 8 12 11.7 5.5 8 12 4.3zM5 9.7l6 3.4v6.6l-6-3.3V9.7zm14 0v6.4l-6 3.3v-6.6l6-3.4z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2 3 7v10l9 5 9-5V7l-9-5zm0 2.3L18.5 8 12 11.7 5.5 8 12 4.3zM5 9.7l6 3.4v6.6l-6-3.3V9.7zm14 0v6.4l-6 3.3v-6.6l6-3.4z'/></svg>");}
.mi-edit{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M3 17.25V21h3.75L17.8 9.94l-3.75-3.75L3 17.25zM20.7 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M3 17.25V21h3.75L17.8 9.94l-3.75-3.75L3 17.25zM20.7 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/></svg>");}
.mi-gear{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19.14 12.94a7.49 7.49 0 0 0 .05-.94 7.49 7.49 0 0 0-.05-.94l2.03-1.58a.5.5 0 0 0 .12-.64l-1.92-3.32a.5.5 0 0 0-.61-.22l-2.39.96a7.3 7.3 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.59.24-1.13.56-1.62.94l-2.39-.96a.5.5 0 0 0-.61.22L2.74 8.84a.5.5 0 0 0 .12.64l2.03 1.58c-.03.31-.05.62-.05.94s.02.63.05.94l-2.03 1.58a.5.5 0 0 0-.12.64l1.92 3.32c.14.24.43.34.69.22l2.39-.96c.49.38 1.03.7 1.62.94l.36 2.54c.05.24.25.42.5.42h3.84c.25 0 .45-.18.5-.42l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.26.12.55.02.69-.22l1.92-3.32a.5.5 0 0 0-.12-.64l-2.03-1.58zM12 15.5A3.5 3.5 0 1 1 12 8.5a3.5 3.5 0 0 1 0 7z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19.14 12.94a7.49 7.49 0 0 0 .05-.94 7.49 7.49 0 0 0-.05-.94l2.03-1.58a.5.5 0 0 0 .12-.64l-1.92-3.32a.5.5 0 0 0-.61-.22l-2.39.96a7.3 7.3 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.59.24-1.13.56-1.62.94l-2.39-.96a.5.5 0 0 0-.61.22L2.74 8.84a.5.5 0 0 0 .12.64l2.03 1.58c-.03.31-.05.62-.05.94s.02.63.05.94l-2.03 1.58a.5.5 0 0 0-.12.64l1.92 3.32c.14.24.43.34.69.22l2.39-.96c.49.38 1.03.7 1.62.94l.36 2.54c.05.24.25.42.5.42h3.84c.25 0 .45-.18.5-.42l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.26.12.55.02.69-.22l1.92-3.32a.5.5 0 0 0-.12-.64l-2.03-1.58zM12 15.5A3.5 3.5 0 1 1 12 8.5a3.5 3.5 0 0 1 0 7z'/></svg>");}
.mi-clipboard{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 2h-4.18A3 3 0 0 0 11 0h2a3 3 0 0 0 0 0v2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm-7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 16H7V4h2v2h6V4h2v14z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 2h-4.18A3 3 0 0 0 11 0h2a3 3 0 0 0 0 0v2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm-7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 16H7V4h2v2h6V4h2v14z'/></svg>");}
.mi-warning{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/></svg>");}
.mi-trash{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M6 7h12v13a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V7zm3-3h6l1 2h4v2H2V6h4l1-2zM9 9v9h2V9H9zm4 0v9h2V9h-2z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M6 7h12v13a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V7zm3-3h6l1 2h4v2H2V6h4l1-2zM9 9v9h2V9H9zm4 0v9h2V9h-2z'/></svg>");}
.mi-copy{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M16 1H4a2 2 0 0 0-2 2v12h2V3h12V1zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16H8V7h11v14z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M16 1H4a2 2 0 0 0-2 2v12h2V3h12V1zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16H8V7h11v14z'/></svg>");}
.mi-check{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");}
.mi-close{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M18.3 5.7 12 12l6.3 6.3-1.4 1.4L10.6 13.4 4.3 19.7 2.9 18.3 9.2 12 2.9 5.7l1.4-1.4L10.6 10.6l6.3-6.3z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M18.3 5.7 12 12l6.3 6.3-1.4 1.4L10.6 13.4 4.3 19.7 2.9 18.3 9.2 12 2.9 5.7l1.4-1.4L10.6 10.6l6.3-6.3z'/></svg>");}
.mi-doc{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M6 2h9l5 5v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm8 1.5V8h4.5L14 3.5z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M6 2h9l5 5v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm8 1.5V8h4.5L14 3.5z'/></svg>");}
.mi-search{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M15.5 14h-.8l-.3-.3a6.5 6.5 0 1 0-.7.7l.3.3v.8l5 5 1.5-1.5-5-5zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M15.5 14h-.8l-.3-.3a6.5 6.5 0 1 0-.7.7l.3.3v.8l5 5 1.5-1.5-5-5zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9z'/></svg>");}
.mi-err{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/></svg>");}

/* ========== UI 现代化优化覆写层 ==========
   统一更轻盈、更紧凑、更现代的设计语言：
   - Header 由深色渐变改为白底细边框，视觉更干净
   - 侧边栏菜单更紧凑，激活态更细腻
   - 卡片/统计卡去掉浮夸上浮与大投影，改用精细描边高亮
   - 圆角、阴影、配色统一为柔和体系
================================================ */
:root {
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
  --shadow-card-hover: 0 2px 6px rgba(16,24,40,0.08), 0 6px 18px rgba(16,24,40,0.08);
  --shadow-pop: 0 8px 24px rgba(16,24,40,0.14);
}

/* ===== Header 现代化：白底细边框，标题融入左侧，右侧徽章描边式 ===== */
.header {
  height: 56px;
  background: var(--card-bg);
  background-image: none;
  color: var(--text-color);
  padding: 0 20px;
  box-shadow: 0 1px 0 var(--border-color), 0 1px 3px rgba(16,24,40,0.04);
  border-bottom: 1px solid var(--border-color);
}
.header-center {
  position: static;
  transform: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0;
  text-shadow: none;
  margin-left: 4px;
}
.header .mobile-menu-btn { color: var(--text-secondary); }
.header .sidebar-toggle-btn { color: var(--text-secondary); }
.header .sidebar-toggle-btn:hover { background: var(--primary-lightest); color: var(--primary-color); }
.header .header-role-badge {
  color: var(--primary-color);
  background: var(--primary-lightest);
  border: 1px solid var(--primary-lighter);
}
.header-user-info:hover { background: var(--primary-lightest); }
.header-right { display: flex; align-items: center; gap: 10px; }

/* 通知按钮适配白底 */
.header-notif-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  position: relative;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.header-notif-btn:hover { background: var(--primary-lightest); color: var(--primary-color); }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--danger-color); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== 侧边栏：菜单更紧凑，激活态更精致 ===== */
.sidebar { box-shadow: 1px 0 0 rgba(16,24,40,0.05); }
.sidebar-menu { padding: 8px 0; }
.sidebar-menu a { padding: 10px 14px; margin: 1px 8px; gap: 10px; }
.sidebar-menu a:hover { transform: translateX(2px); background: var(--sidebar-hover-bg); }
.sidebar-menu a.router-link-active {
  background: rgba(255,255,255,0.18);
  box-shadow: inset 2px 0 0 var(--sidebar-text-active);
  transform: none;
}
.sidebar-menu a.router-link-active::before { display: none; }
.sidebar.collapsed .sidebar-menu a { padding: 12px 0; }

/* ===== 卡片：去掉浮夸上浮，改精细描边高亮 ===== */
.card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: none; }
.card-header {
  padding: 14px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}
.card-title { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* ===== 统计卡：去掉顶部粗色条，改精致圆角+温和投影 ===== */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
}
.stat-card::before { display: none; }
.stat-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.stat-value { font-size: 26px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.3px; }

/* ===== 图表卡：统一圆角与描边 ===== */
.chart-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  padding: 18px;
}
.chart-card h3 { font-size: 15px; font-weight: 600; }

/* ===== 表格：更紧凑、表头更干净 ===== */
.data-table th {
  background: var(--card-bg);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px; font-weight: 600;
}
.data-table td { padding: 10px 14px; font-size: 13px; }
.data-table tbody tr:hover td { background: var(--primary-bg-color); }

/* ===== 按钮：柔和圆角、去多余投影 ===== */
.btn { border-radius: var(--radius-sm); letter-spacing: 0; }
.btn:hover { transform: translateY(0); }
.btn-primary { box-shadow: 0 1px 2px rgba(16,24,40,0.06); }
.btn-primary:hover { transform: none; box-shadow: 0 2px 6px rgba(16,24,40,0.1); }
.btn-success, .btn-info, .btn-warning, .btn-danger { box-shadow: 0 1px 2px rgba(16,24,40,0.06); }
.btn-success:hover, .btn-info:hover, .btn-warning:hover, .btn-danger:hover { transform: none; }

/* ===== 表单控件：统一圆角 ===== */
.form-group input, .form-group select, .form-group textarea {
  border-radius: var(--radius-sm);
  box-shadow: none;
}

/* ===== 登录页：增强毛玻璃与柔和光晕 ===== */
.login-box {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 20px;
  padding: 40px 36px 32px;
}
.login-title { font-size: 22px; font-weight: 600; color: var(--text-color); }
/* 修复：注册入口/页脚在白色毛玻璃卡片上原为白色文字，几乎不可见 */
.login-register-row { color: var(--text-secondary); }
.login-register-row a { color: var(--primary-color); opacity: 1; }
.login-register-row a:hover { background: var(--primary-lightest); }
.login-register-row .dot { color: var(--text-muted); }
.login-footer { color: rgba(255,255,255,0.6); text-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.login-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-md);
  height: 48px;
  font-weight: 600;
  letter-spacing: 4px;
  box-shadow: 0 4px 12px rgba(24,144,255,0.25);
  transition: all 0.2s;
}
.login-btn:hover { background: linear-gradient(135deg, var(--primary-light), var(--primary-color)); transform: translateY(-1px); }
.login-btn:disabled { opacity: 0.6; }
.login-input-group input {
  border-radius: var(--radius-md);
  height: 48px;
  background: #fff;
}
.login-icon { color: var(--text-muted); }

/* ========== 图标规范化 + 对齐 + 字体优化覆写层 ==========
   ① 通知铃铛改用规范 CSS 图标（.notif-bell），不再用 emoji 🔔
   ② 声音开关用纯 CSS 音符图标，跨平台统一呈现（不渲染为 emoji）
   ③ 表格/标签/统计卡/操作列统一垂直与水平对齐
   ④ 修正过小字号（标签 11px→12px），保证中文可读性
===================================================== */

/* 通知铃铛在 header 圆形按钮内的适配（白底主题） */
.header-notif-btn .notif-bell {
  width: 17px; height: 17px;
  border-width: 2px;
  border-color: var(--text-secondary);
  color: var(--text-secondary);
  margin-top: 1px;
}
.header-notif-btn .notif-bell::after {
  background: var(--text-secondary);
  bottom: -3px;
}

/* 声音开关：纯 CSS 音符图标（用两个圆点+尾巴组合），muted 状态加斜杠遮罩 */
.notif-sound-icon {
  position: relative;
  display: inline-block;
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.notif-sound-icon::before {
  content: '';
  position: absolute;
  top: 3px; left: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 4px 3px 0 0 currentColor;
}
.notif-sound-icon::after {
  content: '';
  position: absolute;
  top: 1px; left: 6px;
  width: 4px; height: 9px;
  background: currentColor;
  border-radius: 2px;
  transform: skewX(-18deg);
}
.notif-sound-icon.muted::before {
  box-shadow: 4px 3px 0 0 currentColor;
  opacity: 0.35;
}
.notif-sound-icon.muted::after {
  background: linear-gradient(135deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%);
  opacity: 0.8;
}
.notif-sound-btn { font-variant-emoji: text; display:inline-flex; align-items:center; justify-content:center; }
/* 状态由内部图标 muted 类表达，去掉按钮级多余圆点 */
.notif-sound-btn.on::after { content: none; }

/* ===== 表格：统一垂直居中，避免含按钮/图标单元格顶对齐 ===== */
.data-table th, .data-table td,
.table-wrapper th, .table-wrapper td {
  text-align: left;
  vertical-align: middle;
}
.data-table td { font-size: 13.5px; }
.data-table th { font-size: 12.5px; }
/* 数字列/金额列右对齐更专业 */
.data-table .num-cell, .data-table td.num, td.amount, td.price, td.quantity {
  text-align: right;
}

/* ===== 状态标签：居中 + 字号提升 ===== */
.tag { text-align: center; line-height: 1.5; font-size: 12px; }
.status-tag { display: inline-flex; align-items: center; justify-content: center; }

/* ===== 统计卡：显式居中，保证不同覆盖定义下稳定 ===== */
.stat-card { text-align: center; }

/* ===== 操作按钮列：统一为一套 flex 样式 ===== */
.action-btns, .action-cell { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ===== 搜索栏：按钮与输入框垂直居中对齐，去除底对齐不齐 ===== */
.search-bar { align-items: center; }
.search-bar .btn { align-self: center; }
.search-bar .form-group { margin-bottom: 0; }

/* ===== 表单：label 与控件统一字号、label 靠左 ===== */
.form-group label { font-size: 13.5px; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea { font-size: 14px; }

/* ===== 按钮统一字号与行高，保证图标+文字垂直居中 ===== */
.btn { font-size: 13.5px; line-height: 1; }
.btn-sm { font-size: 12.5px; line-height: 1; }

/* ===== 卡片标题/节标题统一字号 ===== */
.card-header .card-title { font-size: 15px; }
.section-icon { display:inline-flex; align-items:center; justify-content:center; }

/* ===== 防 emoji 误渲染：符号类图标（✓ ✎ ＋ ↑↓ ← 等）强制文本呈现，避免个别平台渲染成彩色 emoji ===== */
.btn, .btn-sm, .tag, .status-tag, .tree-op, .action-btns a, .action-cell button,
.btn-back, .data-table td, .card-header, .modal-header, .notif-sound-btn {
  font-variant-emoji: text;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
/* 操作符号统一内联对齐，保证与文字垂直居中 */
.tree-op { display:inline-flex; align-items:center; justify-content:center; line-height:1; }

/* ========== 数据看板紧凑化覆写层 ==========
   目标：减少看板纵向高度、消除空列、收紧卡片/图表间距，让首屏更紧凑
===================================================== */

/* 看板页头（视图切换所在行）：压缩底部间距 */
.dashboard .page-header, .page-header { margin-bottom: 14px; }
.page-header h2 { font-size: 19px; }

/* 统计卡行：减少行间距 */
.stats-row { gap: 12px; margin-bottom: 14px; }

/* 看板统计卡（用 stat-value 的卡片）：更紧凑 */
.stat-card { padding: 12px 10px; border-radius: 12px; }
.stat-card .stat-value { font-size: 23px; line-height: 1.15; }
.stat-card .stat-label { font-size: 11.5px; margin-top: 2px; letter-spacing: 0.2px; }

/* 图表区：整体压缩高度与间距 */
.chart-container { gap: 12px; margin-bottom: 14px; }
.chart-card { padding: 14px 16px; }
.chart-card h3 { font-size: 14px; margin-bottom: 10px; }
.chart-wrapper { height: 200px; }
/* 看板内联 grid 的图表行（图表行2/3） */
.chart-card .chart-wrapper { height: 200px; }

/* 图表行2/3 的通用 grid 间距（template 内联 margin-bottom:24px -> 用更高优先级覆盖） */
div[style*="grid-template-columns:1fr 1fr"] { gap: 12px; margin-bottom: 14px !important; }

/* 库存预警明细表：收紧 */
.card-header .card-title { font-size: 14px; }
.data-table td, .data-table th { padding: 8px 12px; }

/* 客户看板（CustomerDashboardTab）：统计卡紧凑 + 新建报修按钮收紧 */
.stat-card .stat-num { font-size: 26px; }
.stat-card .stat-icon { transform: scale(0.9); }

/* ========== 数据看板·科技渐变风格覆写层 ==========
   统计卡与图表卡片统一为玻璃渐变质感，紧凑网格布局，信息密度更高
===================================================== */
.dash-page {
    --dash-ico-total: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z'/></svg>");
    --dash-ico-progress: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M13 3a9 9 0 1 0 8.94 10H19.9A7 7 0 1 1 13 5v4l5-4.5L13 0v3z'/></svg>");
    --dash-ico-done: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");
    --dash-ico-paid: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2v-1.83c-.88-.2-1.71-.63-2.36-1.3l1.42-1.42c.7.67 1.83 1 2.94 1 .93 0 1.59-.45 1.59-1.3 0-.86-.5-1.2-1.59-1.7-1.3-.6-2.59-1.29-2.59-3.2 0-1.69 1.32-2.84 3-3.06V5h2v1.82c.78.15 1.48.5 2.06 1.1l-1.42 1.42c-.55-.56-1.39-.85-2.24-.85-.94 0-1.4.44-1.4.91 0 .82.63 1.16 1.88 1.75 1.43.65 2.62 1.44 2.62 3.28 0 1.66-1.2 2.9-3 3.16z'/></svg>");
    --dash-ico-unpaid: var(--dash-ico-paid);
    --dash-ico-stock: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9h2zM6 20H4V5h14v14H6zm8-13v5l-2-2-2 2V7H8v7h8V7h-2z'/></svg>");
    --dash-ico-in: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M9 3V5H5v14h4v2H3V3h6zm3 8V7l-5 5 5 5v-4h8v-2H12z'/></svg>");
    --dash-ico-out: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M3 3h18v2H3V3zm9 5v8l-4-4 4 4 4-4-4 4V8h-2z'/></svg>");
    --dash-ico-pending: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/></svg>");
}
/* KPI 网格：紧凑自适应 */
.dash-page .dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
/* KPI 卡片：玻璃渐变质感 */
.dash-page .dash-kpi {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 14px;
    border-radius: 14px;
    border: 1px solid rgba(120,140,200,0.18);
    background: linear-gradient(145deg, rgba(255,255,255,0.92) 0%, rgba(240,246,255,0.85) 100%);
    box-shadow: 0 2px 8px rgba(60,90,160,0.08), inset 0 1px 0 rgba(255,255,255,0.7);
    transition: transform .18s ease, box-shadow .18s ease;
    overflow: hidden;
}
.dash-page .dash-kpi::before {
    content: '';
    position: absolute;
    top: -40%; left: -20%;
    width: 70%; height: 160%;
    background: radial-gradient(circle at 30% 30%, rgba(120,170,255,0.18), transparent 60%);
    pointer-events: none;
}
.dash-page .dash-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(60,90,160,0.16); }
/* 深色主题适配：玻璃渐变卡片 */
body[data-theme="dark"] .dash-page .dash-kpi,
.theme-dark .dash-page .dash-kpi {
    background: linear-gradient(145deg, rgba(30,36,52,0.92) 0%, rgba(22,28,44,0.88) 100%);
    border-color: rgba(120,140,200,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
/* KPI 图标：渐变色圆底 + mask 图形 */
.dash-page .dash-kpi-icon {
    width: 40px; height: 40px;
    border-radius: 11px;
    flex-shrink: 0;
    display: inline-block;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    -webkit-mask-size: 22px; mask-size: 22px;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* KPI 数值与标签 */
.dash-page .dash-kpi-value {
    font-size: 22px; font-weight: 700; line-height: 1.1;
    color: var(--text-color);
}
.dash-page .dash-kpi-label {
    font-size: 12px; color: var(--text-muted); margin-top: 2px;
}
/* 图表卡片：玻璃渐变质感 + 改小高度 */
.dash-page .chart-card {
    border-radius: 14px;
    border: 1px solid rgba(120,140,200,0.16);
    background: linear-gradient(145deg, rgba(255,255,255,0.94) 0%, rgba(243,247,255,0.88) 100%);
    box-shadow: 0 2px 8px rgba(60,90,160,0.07);
    padding: 14px 16px;
}
body[data-theme="dark"] .dash-page .chart-card,
.theme-dark .dash-page .chart-card {
    background: linear-gradient(145deg, rgba(30,36,52,0.94) 0%, rgba(22,28,44,0.9) 100%);
    border-color: rgba(120,140,200,0.22);
}
.dash-page .chart-card h3 { font-size: 13.5px; margin-bottom: 8px; }
.dash-page .chart-card .chart-wrapper,
.dash-page .chart-card canvas { height: 168px !important; }
/* 看板内饼图容器固定高度，保证紧凑 */
.dash-page [ref="pieChart"], .dash-page [ref="payChart"], .dash-page [ref="deviceChart"] { height: 168px !important; }
/* 排行表：紧凑 */
.dash-page .chart-card .data-table th, .dash-page .chart-card .data-table td { padding: 7px 10px; font-size: 12.5px; }
.dash-page .chart-card .table-wrapper { margin-top: 6px; }
/* 图表行容器间距收紧 */
.dash-page div[style*="grid-template-columns:1fr 1fr"] { gap: 12px; margin-bottom: 14px !important; }
.dash-page .chart-container { gap: 12px; margin-bottom: 14px; }
/* 折叠的库存预警明细：同样玻璃质感 */
.dash-page .card { box-shadow: 0 2px 8px rgba(60,90,160,0.07); }

/* ========== 统一加载界面覆写层 ==========
   刷新/等待数据时，将各页面零散的 loading 骨架统一为专业加载界面
   （渐变 Logo + 旋转加载环 + 系统名 + 提示），替代空白+小转圈
===================================================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px !important;
    color: var(--text-muted);
}
/* 渐变加载环 */
.loading-spinner {
    width: 44px !important;
    height: 44px !important;
    border-width: 3px !important;
    border-style: solid;
    border-color: var(--border-color) !important;
    border-top-color: var(--primary-color) !important;
    border-right-color: var(--primary-color) !important;
    border-radius: 50% !important;
    animation: cxt-rotate 0.9s linear infinite;
}
@keyframes cxt-rotate { to { transform: rotate(360deg); } }
/* 统一的加载提示文字（若页面已有文字则叠加/紧随） */
.loading::after {
    content: '正在加载，请稍候…';
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.loading .loading-spinner + *:not(.loading-spinner) { margin-top: 2px; }

/* ===== 初始全屏加载页（刷新瞬间、Vue 未挂载时兜底）===== */
#app-loading {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: var(--bg-color, #f6f8fb);
}
#app-loading .al-logo {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2196f3, #1565c0);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px; font-weight: 700;
    box-shadow: 0 8px 24px rgba(33,150,243,0.35);
}
#app-loading .al-title { font-size: 17px; font-weight: 600; color: var(--text-color, #333); }
#app-loading .al-sub { font-size: 13px; color: var(--text-muted, #999); }
#app-loading .al-ring {
    width: 34px; height: 34px;
    border: 3px solid rgba(120,140,200,0.2);
    border-top-color: var(--primary-color, #2196f3);
    border-radius: 50%;
    animation: cxt-rotate 0.9s linear infinite;
}

/* ========== 侧边栏高级化覆写层 ==========
   将侧边栏从"单轴渐变"升级为"深色玻璃质感 + 光晕层次 + 精致菜单态"
===================================================== */
.sidebar {
    /* 玻璃质感背景：基础渐变 + 顶部/径向光晕制造层次 */
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,0.09) 0%, transparent 55%),
        radial-gradient(80% 50% at 100% 100%, rgba(255,255,255,0.05) 0%, transparent 55%),
        linear-gradient(180deg, var(--sidebar-bg-start) 0%, var(--sidebar-bg-end) 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
}
/* 高级化侧边栏系统 Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    flex-shrink: 0;
}
.sidebar-logo .logo-badge {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.65));
    color: var(--sidebar-bg-start);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.sidebar-logo .logo-name {
    color: var(--sidebar-text);
    font-size: 15px; font-weight: 700; letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .sidebar-logo .logo-name { display: none; }

/* 头部（用户区）：更精致的圆角面板感 */
.sidebar-header {
    margin: 10px 12px 4px;
    padding: 14px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    border-bottom: none;
}
.sidebar-header:hover { background: rgba(255,255,255,0.1); }
.sidebar-avatar {
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
/* 菜单项：更细腻的 hover 与激活态 */
.sidebar-menu a {
    margin: 2px 12px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    position: relative;
    transition: all 0.2s ease;
}
.sidebar-menu a svg {
    transition: transform 0.2s ease;
}
.sidebar-menu a:hover {
    background: var(--sidebar-hover-bg);
    transform: translateX(2px);
}
.sidebar-menu a:hover svg { transform: scale(1.12); }
/* 激活态：渐变高亮块 + 左侧指示条 + 图标微光 */
.sidebar-menu a.router-link-active {
    background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 2px 10px rgba(0,0,0,0.12);
    font-weight: 600;
    color: var(--sidebar-text-active);
}
.sidebar-menu a.router-link-active::before {
    content: '';
    position: absolute;
    left: -12px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 55%;
    background: linear-gradient(180deg, #fff, rgba(255,255,255,0.4));
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.sidebar-menu a.router-link-active svg { filter: drop-shadow(0 0 4px rgba(255,255,255,0.5)); }
/* 折叠态激活：圆形高亮 */
.sidebar.collapsed .sidebar-menu a.router-link-active {
    border-radius: 12px;
}
/* 分隔线：更柔和 */
.sidebar-divider {
    margin: 8px 18px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
/* 隐藏侧边栏滚动条，保持整洁 */
.sidebar-menu::-webkit-scrollbar { width: 0; height: 0; }
.sidebar-menu { scrollbar-width: none; }
/* 底部折叠/退出按钮：与菜单一致圆角 */
.sidebar-menu > a { border-radius: 10px; }

/* ========== 表格表头对比度修复覆写层 ==========
   修复深色主题下表头背景硬编码为浅色导致与文字对比度不足的问题；
   统一表头为"主题背景 + 高对比文字"，深浅主题均清晰
===================================================== */
/* 全局：表头背景改用主题变量，文字用主文字色（浅色主题=浅底深字） */
.data-table th,
.table th,
th {
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #1a1a2e);
  border-bottom: 1px solid var(--border-color, #e0e6ef);
}
/* 深色主题：表头用更亮的深色底 + 高对比浅色文字，与正文区区分 */
[data-theme=dark] .data-table th,
[data-theme=dark] .table th,
[data-theme=dark] th {
  background: #262c46;
  color: #eef1f7;
  border-bottom: 1px solid #3a415f;
}
/* 深色主题下系统默认的 system 深色（prefers-color-scheme:dark）也一并修复 */
@media (prefers-color-scheme: dark) {
  [data-theme=system] .data-table th,
  [data-theme=system] .table th,
  [data-theme=system] th {
    background: #262c46;
    color: #eef1f7;
    border-bottom: 1px solid #3a415f;
  }
}
/* 深色主题表头文字加粗、加字距，强化可读性 */
[data-theme=dark] .data-table th,
[data-theme=dark] .table th {
  font-weight: 600;
  letter-spacing: 0.3px;
}
/* 深色主题表格正文文字对比微调（secondary 在深色下偏暗） */
[data-theme=dark] .data-table td { color: #c3cad9; }
@media (prefers-color-scheme: dark) {
  [data-theme=system] .data-table td { color: #c3cad9; }
}

/* ========== 全局自适应：小屏自动缩放字体 + 防换行横向滚动 (v2692) ========== */
/* 基准字号随视口自动缩放：屏越窄字越小，避免内容被压到下一行。clamp 保证不超 16px、不小于 12.5px */
html { font-size: clamp(12.5px, 0.45vw + 11px, 16px); }

/* 通用：按钮/标签/徽章/表单控件 不换行，防止被挤断 */
.btn, .btn-sm, .btn-primary, .btn-outline, .btn-danger, .btn-success, .btn-danger-outline,
.tag, .badge, .status-badge, .nav-pills a, .erp-tabs .tab-btn, .filter-bar select, .filter-bar input,
.search-bar input, .form-group input, .form-group select, .page-tabs button {
  white-space: nowrap;
}

/* 让所有滚动容器在小屏可横向滚动，而非压缩内容换行 */
.content, .card, .modal-body, .detail-panel {
  -webkit-overflow-scrolling: touch;
}

/* ---- 表格：强制按内容撑开 + 单元格不换行 => 超出横向滚动而非换行 ---- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrapper table {
  width: 100%;
  min-width: max-content;
  table-layout: auto;
}
.table-wrapper th,
.table-wrapper td,
.data-table th,
.data-table td {
  white-space: nowrap !important;
  vertical-align: middle;
}
.table-wrapper thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.table-wrapper thead th {
  background: var(--card-bg, #fff);
  box-shadow: inset 0 -1px 0 var(--border-color, #e8e8e8);
}
/* 表格区域固定高度滚动，底部操作栏始终可见 */
.table-wrapper-scroll {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

/* 状态标签/操作按钮 强制单行 */
.status-tag,
.status-pending,
.status-progress,
.status-done,
.action-btns,
.action-btns .btn {
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

/* 保证工单号这类长文本不在 td 内折行 */
.table-wrapper td > strong,
.table-wrapper td > span {
  white-space: nowrap !important;
}

/* ---- 卡片网格 / KPI：列数随屏自适应，避免挤压换行 ---- */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
@media (max-width: 576px) {
  .stats-row { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}

/* 商品/备件卡片网格（ErpPage 内联改类后生效）：小屏减小最小列宽，避免横向溢出 */
.erp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ===== 商品卡片（备件仓库）整体美化 ===== */
.product-card {
border: 1px solid var(--border-color);
cursor: pointer;
transition: transform .18s, box-shadow .18s, border-color .18s;
margin: 0;
}
.product-card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
border-color: var(--primary-color);
}
.pc-body {
display: flex;
gap: 12px;
align-items: stretch;
padding: 14px;
}
.pc-thumb {
width: 78px;
height: 78px;
border-radius: 8px;
overflow: hidden;
flex-shrink: 0;
background: linear-gradient(135deg, #f6f8fa 0%, #eef1f5 100%);
display: flex;
align-items: center;
justify-content: center;
border: 1px solid var(--border-color);
position: relative;
}
.pc-img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
opacity: 0;
transition: opacity .25s;
}
.pc-img.loaded { opacity: 1; }
.pc-thumb-empty {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #f0f5ff 0%, #e6f4ff 100%);
}
.pc-thumb-initial {
font-size: 28px;
font-weight: 700;
color: #1890ff;
letter-spacing: -1px;
opacity: .85;
}
.pc-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 4px;
}
.pc-name {
font-weight: 600;
font-size: 15px;
color: var(--text-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 1.3;
}
.pc-tags {
display: flex;
flex-wrap: wrap;
gap: 4px;
font-size: 11px;
}
.pc-tag {
padding: 1px 7px;
background: #f5f5f5;
color: var(--text-secondary);
border-radius: 10px;
font-size: 11px;
white-space: nowrap;
}
.pc-tag-no { background: #f0f5ff; color: #1890ff; }
.pc-tag-brand { background: #fff7e6; color: #fa8c16; }
.pc-spec {
font-size: 11px;
color: var(--text-muted);
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pc-spec-sep { color: var(--border-color); }
.pc-stock {
margin-top: 4px;
padding: 6px 8px;
background: linear-gradient(135deg, #f6ffed 0%, #e6f7ff 100%);
border-radius: 6px;
border: 1px solid #d9f7be;
}
.pc-stock-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 3px;
}
.pc-stock-label {
font-size: 11px;
color: #666;
}
.pc-stock-total {
font-weight: 700;
font-size: 16px;
font-family: "Menlo", "Consolas", monospace;
letter-spacing: .5px;
}
.pc-stock-list {
display: flex;
flex-wrap: wrap;
gap: 3px;
}
.pc-stock-item {
font-size: 10px;
padding: 1px 6px;
background: #fff;
border: 1px solid #d9f7be;
border-radius: 10px;
white-space: nowrap;
color: #389e0d;
.pc-stock-more {
font-size: 10px;
color: #999;
align-self: center;
}
.pc-no-stock {
margin-top: 4px;
font-size: 11px;
color: #faad14;
}
.pc-flags {
display: flex;
gap: 6px;
margin-top: 2px;
}
.pc-flag {
font-size: 10px;
padding: 1px 7px;
border-radius: 10px;
white-space: nowrap;
}
.pc-flag-img {
background: #e6f7ff;
border-color: #91d5ff;
color: #1890ff;
}
.pc-flag-pdf {
background: #fff7e6;
border-color: #ffd591;
color: #fa8c16;
}
}
@media (max-width: 1100px) {
  .erp-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 768px) {
  .erp-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 480px) {
  .erp-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ---- 字号逐级缩小（px 固定值组件）---- */
@media (max-width: 1200px) {
  .page-header h2 { font-size: 20px; }
  .data-table th { font-size: 12px; }
  .data-table td { font-size: 13px; }
  .header { padding: 0 20px; }
  .header-center { font-size: 17px; }
  .header-title { font-size: 16px; }
}
@media (max-width: 992px) {
  .page-header h2 { font-size: 18px; }
  .card-header h3, .card-title { font-size: 15px; }
  .data-table th { font-size: 11.5px; }
  .data-table td { font-size: 12.5px; }
  th, td { font-size: 13px; }
  .btn, .btn-sm { font-size: 12.5px; }
}
@media (max-width: 768px) {
  .content { padding: 14px; }
  .page-header h2 { font-size: 17px; }
  .page-header h3 { font-size: 16px; }
  .data-table th { font-size: 11px; }
  .data-table td { font-size: 12px; padding: 9px 10px; }
  th, td { font-size: 12.5px; padding: 10px 12px; }
  .btn, .btn-sm { font-size: 12px; padding: 6px 12px; }
  .header { padding: 0 14px; }
  .header-center { font-size: 15px; }
  .header-title { font-size: 14px; }
  .card { border-radius: 10px; }
}
@media (max-width: 576px) {
  .content { padding: 10px; }
  .page-header { margin-bottom: 12px; }
  .page-header h2 { font-size: 16px; }
  .data-table th { font-size: 10.5px; padding: 8px 8px; }
  .data-table td { font-size: 11.5px; padding: 8px 8px; }
  th, td { font-size: 12px; padding: 8px 10px; }
  .btn, .btn-sm { font-size: 11.5px; padding: 5px 10px; }
  .header-center { font-size: 13px; }
  .stats-row { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}
@media (max-width: 420px) {
  .content { padding: 8px; }
  .page-header h2 { font-size: 15px; }
  .data-table td { font-size: 11px; }
  th, td { font-size: 11.5px; padding: 7px 8px; }
  .btn, .btn-sm { font-size: 11px; padding: 5px 9px; }
}

/* 极窄屏：全局兜底缩小，保证不溢出 */
@media (max-width: 360px) {
  html { font-size: 12px; }
  .page-header h2 { font-size: 14px; }
}
/* ===== 设备详情页 ===== */
.tag-orange { background: linear-gradient(135deg, #fff1e6 0%, #ffd8a8 100%); color: #d9480f; border: 1px solid rgba(250,140,20,0.18); }
.tag-green { background: linear-gradient(135deg, #ebfbee 0%, #b2f2bb 100%); color: #2b8a3e; border: 1px solid rgba(82,196,26,0.18); }
.tag-gray { background: #f1f3f5; color: #868e96; border: 1px solid #e9ecef; }
.device-detail-page { max-width: 1400px; margin: 0 auto; padding: 12px; }
.dd-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.dd-toolbar .dd-title { display:flex; flex-direction:column; }
.dd-title .dd-name { font-size:20px; font-weight:700; }
.dd-title .dd-sn { font-size:12px; color:var(--text-muted); font-family:monospace; }
.dd-sub { font-size:12px; color:var(--text-muted); margin-left:auto; }
.dd-empty { text-align:center; padding:40px; color:var(--text-muted); }
.dd-card { background:#fff; border:1px solid var(--border-color); border-radius:10px; padding:14px; margin-bottom:12px; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.dd-card-h { font-size:15px; font-weight:700; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid var(--border-color); display:flex; align-items:center; gap:8px; }
.dd-fee-tip { font-size:12px; color:var(--text-muted); font-weight:400; }
.dd-top-row { display:flex; gap:16px; align-items:flex-start; }
.dd-info-grid { flex:1; min-width:0; display:grid; grid-template-columns:repeat(3,1fr); gap:8px 18px; }
.dd-info-item { display:flex; flex-direction:column; font-size:13px; }
.dd-info-item .lbl { color:var(--text-muted); font-size:11.5px; margin-bottom:1px; }
.dd-info-item .val { font-weight:600; }
.dd-info-item .val.mono, .dd-sn, .mono { font-family:monospace; }
.dd-qr-block { flex-shrink:0; width:160px; padding:12px; background:var(--bg-color); border-radius:10px; text-align:center; }
.dd-qr-block img { width:120px; height:120px; border:1px solid var(--border-color); border-radius:8px; }
.dd-qr-title { font-size:12px; color:var(--text-muted); margin-bottom:6px; }
.dd-muted { color:var(--text-muted); font-size:13px; }
.dd-img-section { display:flex; gap:16px; flex-wrap:wrap; }
.dd-img-col { flex:1; min-width:220px; }
.dd-img-label { font-size:13px; font-weight:600; margin-bottom:6px; }
.dd-img-grid { display:flex; gap:8px; flex-wrap:wrap; }
.dd-img-thumb { position:relative; width:90px; height:90px; border:1px solid var(--border-color); border-radius:8px; overflow:hidden; }
.dd-img-thumb img { width:100%; height:100%; object-fit:cover; cursor:pointer; display:block; }
.dd-img-replace { cursor:pointer; }
.dd-img-replace:hover img { opacity:.75; }
.dd-img-replace-hint { position:absolute; left:0; right:0; bottom:0; background:rgba(0,0,0,.55); color:#fff; font-size:11px; text-align:center; line-height:20px; opacity:0; transition:opacity .15s; pointer-events:none; }
.dd-img-replace:hover .dd-img-replace-hint { opacity:1; }
.dd-img-add { width:90px; height:90px; border:1px dashed #ced4da; border-radius:8px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:#adb5bd; font-size:26px; }
.dd-img-add:hover { border-color:var(--primary-color); color:var(--primary-color); }
.dd-nameplate-col { flex:0 0 260px; max-width:260px; }
.dd-nameplate-box { position:relative; width:100%; height:150px; border:1px dashed #ced4da; border-radius:8px; display:flex; align-items:center; justify-content:center; background:var(--bg-color); overflow:hidden; }
.dd-nameplate-img-label { position:relative; width:100%; height:100%; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.dd-nameplate-img-label:hover .dd-nameplate-img { opacity:.75; }
.dd-nameplate-img { width:100%; height:100%; object-fit:contain; cursor:pointer; background:#fff; display:block; }
.dd-nameplate-hint { position:absolute; left:0; right:0; bottom:0; background:rgba(0,0,0,.55); color:#fff; font-size:11px; text-align:center; line-height:22px; opacity:0; transition:opacity .15s; pointer-events:none; }
.dd-nameplate-img-label:hover .dd-nameplate-hint { opacity:1; }
.dd-nameplate-empty { cursor:pointer; color:#adb5bd; font-size:13px; }
.dd-nameplate-empty:hover { color:var(--primary-color); }
.dd-chart-card { background:var(--bg-color); border-radius:10px; padding:12px; margin:4px 0 12px; }
.dd-chart-title { font-size:13px; font-weight:600; margin-bottom:8px; }
.chart-wrapper { position:relative; }
.dd-mini-table, .dd-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.dd-mini-table th, .dd-table th { text-align:left; color:var(--text-muted); font-weight:600; padding:6px 8px; border-bottom:2px solid var(--border-color); }
.dd-mini-table td, .dd-table td { padding:6px 8px; border-bottom:1px solid var(--border-color); vertical-align:top; }
.dd-table td.mono { font-family:monospace; }
.dd-table .dd-desc { max-width:280px; color:var(--text-muted); }
.dd-desc.dd-processing { white-space:pre-line; font-size:12px; line-height:1.5; max-width:420px; min-width:220px; }
.dd-att-list { display:flex; flex-wrap:wrap; gap:8px; }
.dd-att-item { display:flex; align-items:center; }
.dd-thumb { width:48px; height:48px; object-fit:cover; border-radius:6px; border:1px solid var(--border-color); cursor:pointer; }
.dd-mini-table .mono { font-family:monospace; }
.btn-xs { padding:4px 8px; font-size:12px; border-radius:6px; }
.empty { padding:40px 0; text-align:center; color:var(--text-muted); }
.payment-tag { display:inline-block; padding:3px 12px; border-radius:12px; font-size:12px; font-weight:600; line-height:1.6; white-space:nowrap; }
.payment-tag.paid { background:#e6f7ec; color:#1a7f37; border:1px solid #b7e4c7; }
.payment-tag.unpaid { background:#fff4e5; color:#b76e00; border:1px solid #ffd591; }
.payment-tag.empty { background:#f1f3f5; color:#868e96; border:1px solid #dee2e6; }
    .device-code { display:inline-block; max-width:160px; overflow-x:auto; white-space:nowrap; cursor:pointer; font-family:monospace; font-size:13px; color:#007bff; vertical-align:middle; -webkit-user-select:all; user-select:all; }
    .device-code::-webkit-scrollbar { height:4px; }
    .device-code::-webkit-scrollbar-thumb { background:#c1c1c1; border-radius:2px; }
.dd-fee-summary { display:grid; grid-template-columns:repeat(auto-fit, minmax(130px,1fr)); gap:10px; margin-bottom:14px; }
.dd-fee-summary.dd-fee-admin { grid-template-columns:repeat(auto-fit, minmax(120px,1fr)); }
.dd-fee-item { background:var(--bg-color); border-radius:8px; padding:10px 8px; text-align:center; display:flex; flex-direction:column; gap:3px; }
.dd-fee-item .lbl { font-size:11.5px; color:var(--text-muted); }
.dd-fee-item .val { font-size:15px; font-weight:700; }
.dd-fee-total { background:linear-gradient(135deg,#e7f5ff,#bde0fe); }
.dd-fee-total .val { color:var(--primary-dark); }
@media (max-width:900px){ .dd-top-row{flex-direction:column;} .dd-qr-block{width:100%;} .dd-info-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:760px){ .dd-info-grid{grid-template-columns:repeat(2,1fr);} .dd-nameplate-col{flex:1; max-width:none;} .dd-fee-summary{grid-template-columns:repeat(2,1fr);} .dd-img-section{flex-direction:column;} }
@media (max-width:480px){ .dd-info-grid{grid-template-columns:1fr;} .dd-fee-summary{grid-template-columns:1fr;} }