/* =====================================================
   隐患随手拍管理后台 - 现代简约风格
   Design System: Clean · Modern · Elegant
   ===================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #app { height: 100%; width: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f7fa;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ CSS 变量 - 设计令牌 ============ */
:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-rgb: 37, 99, 235;
  --primary-50: rgba(37, 99, 235, 0.08);
  --primary-100: rgba(37, 99, 235, 0.14);
  --primary-200: rgba(37, 99, 235, 0.22);

  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --text-quaternary: #9ca3af;

  --bg-body: #f5f7fa;
  --bg-card: #ffffff;
  --bg-hover: #f3f4f6;
  --bg-active: #eff6ff;

  --border-light: #f0f1f3;
  --border-base: #e5e7eb;
  --border-dark: #d1d5db;

  /* Element Plus 令牌桥接（保证自定义色也能同步到 EP 组件） */
  --el-color-primary: var(--primary);
  --el-color-primary-light-3: var(--primary-light-3, #739df1);
  --el-color-primary-light-5: var(--primary-light-5, #a0bff5);
  --el-color-primary-light-7: var(--primary-light-7, #c5d8fb);
  --el-color-primary-light-8: var(--primary-light-8, #d4e2fc);
  --el-color-primary-light-9: var(--primary-light-9, #e3ecfd);
  --el-color-primary-dark-2: var(--primary-dark, #1d4ed8);

  --sidebar-bg: #ffffff;
  --sidebar-border: var(--border-light);
  --sidebar-text: var(--text-tertiary);
  --sidebar-text-active: var(--primary);
  --sidebar-bg-active: var(--primary-50);
  --sidebar-text-hover: var(--text-primary);
  --sidebar-bg-hover: var(--bg-hover);
  --sidebar-logo-color: var(--text-primary);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 68px;
  --header-height: 60px;
}

/* ============ Element Plus 主题覆盖 ============ */
.el-button {
  font-weight: 600;
  border-radius: var(--radius-base);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.el-button:hover {
  color: var(--el-button-text-color) !important;
  --el-button-hover-text-color: var(--el-button-text-color);
}
.el-button:focus-visible {
  color: var(--el-button-text-color) !important;
}
.el-button.is-link:hover,
.el-button.is-link:focus-visible {
  color: var(--el-button-text-color) !important;
  background: var(--primary-50);
}
.el-button.is-link.el-button--primary:hover,
.el-button.is-link.el-button--primary:focus-visible {
  color: var(--el-button-text-color) !important;
  background: var(--primary-100);
}
.el-button.is-link.el-button--danger:hover,
.el-button.is-link.el-button--danger:focus-visible {
  color: var(--el-button-text-color) !important;
  background: rgba(220, 38, 38, 0.1);
}
.el-button.is-link.el-button--warning:hover,
.el-button.is-link.el-button--warning:focus-visible {
  color: var(--el-button-text-color) !important;
  background: rgba(217, 119, 6, 0.1);
}
.el-button.is-link.el-button--success:hover,
.el-button.is-link.el-button--success:focus-visible {
  color: var(--el-button-text-color) !important;
  background: rgba(5, 150, 105, 0.1);
}
.el-button.is-link.el-button--info:hover,
.el-button.is-link.el-button--info:focus-visible {
  color: var(--el-button-text-color) !important;
  background: rgba(107, 114, 128, 0.1);
}
.el-button--primary {
  background: linear-gradient(135deg, var(--primary-dark, #1d4ed8) 0%, var(--primary) 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}
.el-button--primary:hover {
  background: linear-gradient(135deg, var(--primary, #1e40af) 0%, var(--primary-light, #3b82f6) 100%) !important;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.4);
  transform: translateY(-1px);
  color: #ffffff !important;
}
.el-button--primary:active {
  color: #ffffff !important;
}
.el-button--success {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  border: none !important;
  color: #ffffff !important;
}
.el-button--success:hover {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
  color: #ffffff !important;
}
.el-button--danger {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%) !important;
  border: none !important;
  color: #ffffff !important;
}
.el-button--danger:hover {
  background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
}
.el-button--warning {
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
  border: none !important;
  color: #ffffff !important;
}
.el-button--warning:hover {
  background: linear-gradient(135deg, #92400e 0%, #b45309 100%) !important;
  color: #ffffff !important;
}
.el-button--default {
  background: var(--bg-card, #ffffff) !important;
  border: 1px solid var(--border-dark, #d1d5db) !important;
  color: var(--text-secondary, #374151) !important;
  font-weight: 600;
}
.el-button--default:hover {
  border-color: var(--primary) !important;
  color: var(--text-secondary) !important;
  background: var(--primary-50) !important;
}

.el-input__wrapper {
  border-radius: var(--radius-base) !important;
  box-shadow: 0 0 0 1px var(--border-base) inset !important;
  transition: all 0.2s ease;
}
.el-input__wrapper:hover {
  box-shadow: 0 0 0 1px var(--border-dark) inset !important;
}
.el-input.is-focus .el-input__wrapper {
  box-shadow: 0 0 0 1px var(--primary) inset, 0 0 0 3px var(--primary-50) !important;
}

.el-dialog {
  border-radius: var(--radius-xl) !important;
  overflow: hidden;
}
.el-dialog__header {
  padding: 20px 24px 16px !important;
  border-bottom: 1px solid var(--border-light);
  margin-right: 0 !important;
}
.el-dialog__title {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}
.el-dialog__body {
  padding: 20px 24px !important;
}
.el-dialog__footer {
  padding: 16px 24px 20px !important;
  border-top: 1px solid var(--border-light);
}

.el-table {
  --el-table-border-color: var(--border-light);
  --el-table-header-bg-color: var(--bg-hover, #f8f9fb);
  --el-table-row-hover-bg-color: var(--primary-50);
  --el-table-bg-color: var(--bg-card, #ffffff);
  --el-table-tr-bg-color: var(--bg-card, #ffffff);
  --el-table-text-color: var(--text-primary);
  --el-table-header-text-color: var(--text-secondary);
  border-radius: var(--radius-base);
  overflow: hidden;
}
.el-table th.el-table__cell {
  background: var(--el-table-header-bg-color) !important;
  color: var(--text-secondary, #374151) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}
.el-table td.el-table__cell {
  color: var(--text-primary, #1f2937) !important;
  font-weight: 500;
}
.el-table .el-button {
  font-weight: 600;
  font-size: 13px;
  padding: 7px 12px;
  min-height: 30px;
  line-height: 1;
  border-radius: 7px;
  white-space: nowrap;
}
.el-table .el-button.is-link {
  padding: 5px 10px;
  min-height: 26px;
  font-size: 13px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
}
.el-table .el-button.is-link:hover,
.el-table .el-button.is-link:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  color: var(--el-button-text-color) !important;
}
.el-table .el-button.is-link.el-button--primary:hover,
.el-table .el-button.is-link.el-button--primary:focus-visible {
  background: rgba(37, 99, 235, 0.1);
  color: var(--el-button-text-color) !important;
}
.el-table .el-button.is-link.el-button--danger:hover,
.el-table .el-button.is-link.el-button--danger:focus-visible {
  background: rgba(220, 38, 38, 0.1);
  color: var(--el-button-text-color) !important;
}
.el-table .el-button.is-link.el-button--warning:hover,
.el-table .el-button.is-link.el-button--warning:focus-visible {
  background: rgba(217, 119, 6, 0.1);
  color: var(--el-button-text-color) !important;
}
.el-table .el-button.is-link.el-button--success:hover,
.el-table .el-button.is-link.el-button--success:focus-visible {
  background: rgba(5, 150, 105, 0.1);
  color: var(--el-button-text-color) !important;
}
.el-table .el-button.is-link.el-button--info:hover,
.el-table .el-button.is-link.el-button--info:focus-visible {
  background: rgba(107, 114, 128, 0.1);
  color: var(--el-button-text-color) !important;
}
.el-table td .cell {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}
.el-table td .cell > * {
  flex-shrink: 0;
}
.el-table td .cell .el-tag,
.el-table td .cell .el-switch,
.el-table td .cell .el-dropdown {
  flex-shrink: 0;
}
.el-table td .cell .el-button + .el-button {
  margin-left: 6px;
}
.el-table .el-button--small {
  font-size: 13px;
  padding: 6px 11px;
  min-height: 28px;
}

.el-pagination {
  --el-pagination-font-size: 13px;
  font-weight: 600;
}
.el-pagination .el-pager li {
  min-width: 32px;
  height: 32px;
  line-height: 30px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #374151;
}
.el-pagination .el-pager li.is-active {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
}
.el-pagination .el-pager li:hover:not(.is-active) {
  color: var(--primary);
}
.el-pagination button {
  min-width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: #374151;
}
.el-pagination button:hover {
  color: var(--primary);
}
.el-pagination .el-pagination__total {
  color: #4b5563;
  font-weight: 500;
}
.el-pagination .el-pagination__jump {
  color: #374151;
}
.el-pagination .el-pagination__sizes .el-select .el-select__placeholder {
  color: #374151;
}

.el-tag {
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  border: none !important;
  font-size: 12px !important;
}
.el-tag--success {
  background: #d1fae5 !important;
  color: #065f46 !important;
}
.el-tag--warning {
  background: #fef3c7 !important;
  color: #92400e !important;
}
.el-tag--danger {
  background: #fee2e2 !important;
  color: #991b1b !important;
}
.el-tag--info {
  background: #f3f4f6 !important;
  color: #374151 !important;
}
.el-tag--primary {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.el-message-box {
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg) !important;
}

.el-dropdown-menu {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-md) !important;
}

.el-switch.is-checked .el-switch__core {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.el-tabs__item {
  font-weight: 500;
}
.el-tabs__item.is-active {
  color: var(--primary);
  font-weight: 600;
}
.el-tabs__active-bar {
  background-color: var(--primary);
}

.el-form-item__label {
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
}

/* ============ 登录页 ============ */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 30%, var(--primary-dark, #1e40af) 60%, var(--primary) 100%);
  position: relative;
  overflow: hidden;
  padding: 40px 24px;
}
.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(var(--primary-rgb), 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(var(--primary-rgb), 0.18) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(var(--primary-rgb), 0.25) 0%, transparent 45%);
  pointer-events: none;
}
.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.login-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  min-height: 540px;
  background: var(--bg-card, #fff);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.15);
  display: grid;
  grid-template-columns: 42% 58%;
  overflow: hidden;
}

.login-brand {
  position: relative;
  background: linear-gradient(160deg, var(--primary-dark, #1e3a8a) 0%, var(--primary-dark, #1e40af) 40%, var(--primary) 100%);
  color: #fff;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 65%);
}
.login-brand::after {
  content: '';
  position: absolute;
  left: -60px;
  top: 30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.25), transparent 70%);
}
.brand-mark {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  margin-bottom: 28px;
}
.brand-icon {
  font-size: 34px;
  line-height: 1;
}
.brand-title {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  line-height: 1.25;
}
.brand-title-cn {
  display: block;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
}
.brand-title-sub {
  display: block;
  font-size: 20px;
  font-weight: 300;
  margin-top: 6px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 3px;
}
.brand-desc {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}
.brand-divider {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary, #60a5fa), var(--primary-light, #93c5fd));
  margin: 24px 0 20px;
}
.brand-features {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}
.brand-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}
.feat-dot {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light, #93c5fd);
  font-size: 10px;
}
.brand-footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.brand-icp {
  position: relative;
  z-index: 1;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  transition: color 0.15s ease;
}
.brand-icp:hover {
  color: #fff;
  text-decoration: underline;
}

.login-panel {
  padding: 48px 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.panel-head {
  margin-bottom: 28px;
}
.panel-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}
.panel-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

.login-form .el-form-item {
  margin-bottom: 20px;
}
.login-form .el-form-item__label {
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
}
.login-form .el-input__inner {
  height: 42px !important;
}

.login-btn {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border-radius: var(--radius-base) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%) !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
  transition: all 0.25s ease !important;
}
.login-btn:hover:not(.is-disabled):not(.is-loading) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
}

.login-tip {
  margin-top: 24px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.tip-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}
.tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}
.tip-row code {
  background: #fff;
  border: 1px solid var(--border-base);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: Menlo, Consolas, monospace;
  font-size: 11px;
}

@media (max-width: 820px) {
  .login-wrap {
    grid-template-columns: 1fr;
    max-width: 440px;
    min-height: auto;
    border-radius: 18px;
  }
  .login-brand {
    padding: 32px 32px 24px;
  }
  .brand-features {
    display: none;
  }
  .login-panel {
    padding: 32px 32px 36px;
  }
}

/* ============ 后台布局 ============ */
.layout-wrapper {
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ============ 侧边栏 ============ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  border-right: 1px solid var(--sidebar-border);
  position: relative;
  z-index: 10;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.logo-box {
  padding: 18px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
.sidebar.collapsed .logo-box {
  padding: 18px 0;
  justify-content: center;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
  overflow: hidden;
}
.logo-icon .logo-fallback {
  font-size: 18px;
  line-height: 1;
}
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-text {
  color: var(--sidebar-logo-color);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
}

.sidebar-menu {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 4px;
}

.sidebar-menu .el-menu {
  border-right: none !important;
  background: transparent !important;
}

.sidebar-menu .el-menu-item,
.sidebar-menu .el-sub-menu__title {
  color: var(--sidebar-text) !important;
  border-radius: var(--radius-base) !important;
  margin: 2px 0 !important;
  height: 42px !important;
  line-height: 42px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-weight: 500;
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
}
.sidebar.collapsed .sidebar-menu .el-menu-item,
.sidebar.collapsed .sidebar-menu .el-sub-menu__title {
  padding: 0 !important;
  justify-content: center !important;
}

.sidebar-menu .el-menu-item .el-icon,
.sidebar-menu .el-sub-menu__title .el-icon {
  width: 18px !important;
  height: 18px !important;
  font-size: 18px !important;
  color: var(--sidebar-text) !important;
  opacity: 0.75;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-menu .el-menu-item:hover,
.sidebar-menu .el-sub-menu__title:hover {
  background: var(--sidebar-bg-hover) !important;
  color: var(--sidebar-text-hover) !important;
}
.sidebar-menu .el-menu-item:hover .el-icon,
.sidebar-menu .el-sub-menu__title:hover .el-icon {
  color: var(--primary) !important;
  opacity: 1;
}

.sidebar-menu .el-menu-item.is-active {
  background: var(--sidebar-bg-active) !important;
  color: var(--sidebar-text-active) !important;
  font-weight: 600 !important;
  position: relative !important;
}
.sidebar-menu .el-menu-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 0 3px 3px 0;
}
.sidebar-menu .el-menu-item.is-active .el-icon {
  color: var(--sidebar-text-active) !important;
  opacity: 1;
}

.sidebar-menu .el-sub-menu .el-menu {
  background: transparent !important;
  padding: 4px 0 !important;
}
.sidebar-menu .el-sub-menu .el-menu-item {
  height: 38px !important;
  line-height: 38px !important;
  font-size: 13px !important;
  padding-left: 40px !important;
  color: var(--sidebar-text) !important;
  opacity: 0.85;
  margin: 1px 0 !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 400;
  position: relative;
}
.sidebar-menu .el-sub-menu .el-menu-item::before {
  content: '';
  position: absolute;
  left: 22px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transition: all 0.2s ease;
}
.sidebar-menu .el-sub-menu .el-menu-item:hover {
  background: var(--sidebar-bg-hover) !important;
  color: var(--sidebar-text-hover) !important;
  opacity: 1;
}
.sidebar-menu .el-sub-menu .el-menu-item:hover::before {
  background: var(--primary);
  transform: scale(1.2);
}
.sidebar-menu .el-sub-menu .el-menu-item.is-active {
  background: var(--sidebar-bg-active) !important;
  color: var(--sidebar-text-active) !important;
  font-weight: 500 !important;
  opacity: 1;
}
.sidebar-menu .el-sub-menu .el-menu-item.is-active::before {
  background: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-50);
}

.sidebar.collapsed .sidebar-menu .el-sub-menu .el-menu-item::before {
  display: none;
}

/* =========================================
   折叠态 - 二级菜单弹出面板（hover 飞出）
   ========================================= */
/* 整体卡片外观 */
body > .el-popper.el-menu--popup,
body > div[class*="sub-menu__"],
.el-menu--popup,
.el-sub-menu__popper {
  border: 1px solid var(--border-light) !important;
  border-radius: 14px !important;
  padding: 10px !important;
  background: #ffffff !important;
  box-shadow:
    0 6px 24px -8px rgba(15, 23, 42, 0.12),
    0 16px 40px -16px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.02) !important;
  min-width: 200px !important;
  backdrop-filter: saturate(180%) blur(8px);
}
/* 去除默认三角箭头，改用柔和浮层感 */
body > .el-popper.el-menu--popup .el-popper__arrow,
body > div[class*="sub-menu__"] .el-popper__arrow {
  display: none !important;
}
/* 顶部父菜单标题块 */
.el-menu--popup .el-sub-menu__pop-title {
  margin: -10px -10px 6px !important;
  padding: 14px 16px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #111827 !important;
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.10), rgba(var(--primary-rgb), 0.02)),
    linear-gradient(180deg, #ffffff, #f8fafc);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 13px 13px 0 0 !important;
  letter-spacing: 0.2px;
}
.el-menu--popup .el-sub-menu__pop-title .el-icon {
  color: var(--primary) !important;
  margin-right: 8px !important;
}
/* 菜单项列表 */
.el-menu--popup .el-menu-item {
  height: 40px !important;
  line-height: 40px !important;
  font-size: 13.5px !important;
  color: #334155 !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  margin: 2px 0 !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  transition: background .18s ease, color .18s ease, transform .18s ease !important;
  position: relative;
}
.el-menu--popup .el-menu-item .el-icon {
  color: #64748b !important;
  opacity: .85;
  width: 16px !important;
  height: 16px !important;
  font-size: 16px !important;
  transition: color .18s ease, transform .18s ease;
}
/* hover */
.el-menu--popup .el-menu-item:hover {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-rgb), 0.04)) !important;
  color: var(--primary) !important;
  transform: translateX(2px);
}
.el-menu--popup .el-menu-item:hover .el-icon {
  color: var(--primary) !important;
  opacity: 1;
  transform: scale(1.08);
}
/* active */
.el-menu--popup .el-menu-item.is-active {
  color: #ffffff !important;
  background: linear-gradient(90deg, var(--primary), var(--primary-light)) !important;
  font-weight: 600 !important;
  box-shadow:
    0 4px 12px -4px rgba(var(--primary-rgb), 0.55),
    inset 0 0 0 1px rgba(255,255,255,0.18);
}
.el-menu--popup .el-menu-item.is-active .el-icon {
  color: #ffffff !important;
  opacity: 1;
}
.el-menu--popup .el-menu-item.is-active::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
}

/* =========================================
   侧边栏配色 - 深色（sidebar-dark 开关）
   ========================================= */
html.sidebar-dark {
  --sidebar-bg: #111827;
  --sidebar-border: rgba(255,255,255,0.06);
  --sidebar-text: #cbd5e1;
  --sidebar-text-hover: #ffffff;
  --sidebar-bg-hover: rgba(255,255,255,0.06);
  --sidebar-bg-active: var(--primary-50);
  --sidebar-text-active: var(--primary);
  --sidebar-logo-color: #ffffff;
}
html.sidebar-dark:not(.dark) .sidebar-menu .el-menu-item.is-active,
html.sidebar-dark:not(.dark) .sidebar-menu .el-sub-menu .el-menu-item.is-active {
  color: #ffffff !important;
  background: linear-gradient(90deg, var(--primary), var(--primary-light)) !important;
}
html.sidebar-dark:not(.dark) .sidebar-menu .el-menu-item.is-active .el-icon {
  color: #ffffff !important;
}
html.sidebar-dark:not(.dark) .sidebar-menu .el-sub-menu .el-menu-item.is-active::before {
  background: #ffffff !important;
}
html.sidebar-dark:not(.dark) .logo-text { color: #ffffff; }

/* dark 整体模式下，sidebar-dark 仍然保留侧栏深色（只是与整体一致） */
html.dark.sidebar-dark {
  --sidebar-bg: #0b1220;
  --sidebar-border: #1a2333;
}

/* =========================================
   折叠二级弹出菜单 - 深色主题适配
   ========================================= */
/* sidebar-dark 启用（浅页面+深色侧栏）：弹出面板采用"深色浮层"与侧栏一致 */
html.sidebar-dark:not(.dark) body > .el-popper.el-menu--popup,
html.sidebar-dark:not(.dark) .el-menu--popup,
html.sidebar-dark:not(.dark) .el-sub-menu__popper {
  background: linear-gradient(180deg, #151d2e, #111827) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow:
    0 10px 30px -10px rgba(0,0,0,0.55),
    0 20px 50px -20px rgba(0,0,0,0.65) !important;
}
html.sidebar-dark:not(.dark) .el-menu--popup .el-sub-menu__pop-title {
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.04)),
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
  color: #e5ecf8 !important;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
html.sidebar-dark:not(.dark) .el-menu--popup .el-menu-item {
  color: #cbd5e1 !important;
}
html.sidebar-dark:not(.dark) .el-menu--popup .el-menu-item .el-icon {
  color: #94a3b8 !important;
}
html.sidebar-dark:not(.dark) .el-menu--popup .el-menu-item:hover {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.28), rgba(var(--primary-rgb), 0.06)) !important;
  color: #ffffff !important;
}
html.sidebar-dark:not(.dark) .el-menu--popup .el-menu-item:hover .el-icon {
  color: var(--primary-light) !important;
}

/* 整体 html.dark 模式下：弹窗统一更深 */
html.dark body > .el-popper.el-menu--popup,
html.dark .el-menu--popup,
html.dark .el-sub-menu__popper {
  background: linear-gradient(180deg, #1a2436, #141b2c) !important;
  border: 1px solid #2a3550 !important;
  box-shadow:
    0 12px 30px -8px rgba(0,0,0,0.65),
    0 24px 60px -16px rgba(0,0,0,0.75) !important;
}
html.dark .el-menu--popup .el-sub-menu__pop-title {
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.04)),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  color: #e6eaf3 !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
html.dark .el-menu--popup .el-menu-item {
  color: #cfd6e4 !important;
}
html.dark .el-menu--popup .el-menu-item .el-icon {
  color: #8a99b3 !important;
}
html.dark .el-menu--popup .el-menu-item:hover {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.04)) !important;
  color: #ffffff !important;
}
html.dark .el-menu--popup .el-menu-item:hover .el-icon {
  color: var(--primary-light) !important;
}

.sidebar-menu .el-sub-menu__title .el-sub-menu__icon-arrow {
  font-size: 12px !important;
  color: var(--text-quaternary) !important;
  margin-left: auto !important;
}

.menu-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}
.menu-title-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-badge .el-badge__content {
  position: relative !important;
  transform: none !important;
  top: auto !important;
  right: auto !important;
  min-width: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #ef4444, #f87171) !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3) !important;
}

/* ============ 主内容区 ============ */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-body);
  overflow: hidden;
}

.header-bar {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
  /* 建立层叠上下文：保证顶栏（含消息通知面板）始终绘制在内容区之上，
     避免被页面内 z-index 较高的元素（如 el-slider 滑块、定位元素）遮挡。
     取值 100 远低于 Element Plus 弹层默认 2000+，不影响对话框/抽屉/下拉 */
  position: relative;
  z-index: 100;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.collapse-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-base);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all 0.2s ease;
}
.collapse-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
}
.breadcrumb {
  flex: 1;
}
.breadcrumb .el-breadcrumb__inner {
  color: var(--text-tertiary);
}
.breadcrumb .el-breadcrumb__item:last-child .el-breadcrumb__inner {
  color: var(--text-primary);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 8px;
  flex-shrink: 0;
}
.header-right .el-tooltip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-base);
  cursor: pointer;
  transition: all 0.2s ease;
}
.header-right .el-tooltip:hover {
  background: var(--bg-hover);
}
/* =========================================
   顶栏 3 个图标（全屏/主题/消息）- 间距 + 点击热区
   ========================================= */
.header-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  color: var(--text-tertiary);
}
.header-action-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
  transform: translateY(-1px);
}
.header-action-btn:hover .header-icon { color: var(--primary); }
.header-action-btn + .header-action-btn,
.header-right .el-tooltip + .el-tooltip {
  margin-left: 2px;
}
/* 与 user-chip 的分离 */
.header-right > .el-dropdown {
  margin-left: 8px;
}
/* 小徽标（消息数） */
.header-bell-badge :deep(.el-badge__content),
.header-bell-badge .el-badge__content {
  background: linear-gradient(135deg, #ef4444, #f97316) !important;
  border: 2px solid #ffffff !important;
  color: #fff !important;
  font-weight: 700 !important;
  min-width: 18px !important;
  height: 18px !important;
  line-height: 14px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  box-shadow:
    0 4px 10px -2px rgba(239, 68, 68, 0.55),
    0 0 0 1px rgba(0,0,0,0.04) !important;
  transform: translate(30%, -30%) scale(1) !important;
}
html.dark .header-bell-badge .el-badge__content,
html.dark .header-bell-badge :deep(.el-badge__content) {
  border-color: #1a2333 !important;
}

/* =========================================
   顶栏消息下拉 - 新版（内联定位，绕开 el-dropdown teleport）
   ========================================= */
.notify-root {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 1;
}
.notify-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: -6px;
  width: 380px;
  max-width: calc(92vw - 20px);
  z-index: 9999;
  animation: notify-pop-in .18s cubic-bezier(.4,.12,.3,1) both;
  transform-origin: top right;
  will-change: transform, opacity;
}
@keyframes notify-pop-in {
  0%   { opacity: 0; transform: translateY(-6px) scale(.98); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* <transition name="notify-pop"> */
.notify-pop-enter-active,
.notify-pop-leave-active {
  transition: opacity .16s ease, transform .18s cubic-bezier(.4,.12,.3,1);
}
.notify-pop-enter-from,
.notify-pop-leave-to {
  opacity: 0;
  transform: translateY(-6px) scale(.98);
}
/* 小箭头（比 EP 默认三角更精致，位于面板右上角对齐铃铛） */
.notify-panel::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  transform: rotate(45deg);
  z-index: 2;
  box-shadow: -1px -1px 0 0 #ffffff;
}
html.dark .notify-panel::before {
  background: #1a2436;
  border-color: #2a3550;
  box-shadow: -1px -1px 0 0 #1a2436;
}

/* =========================================
   顶栏消息下拉卡片 (notify-dropdown)
   ========================================= */
/* 弹层外层 (body > popper root via teleport) — 向后兼容保留 */
.notify-dropdown-popper,
.notify-dropdown-popper.el-popper,
body > .el-popper.notify-dropdown-popper {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-top: 6px !important;
}
.notify-dropdown-popper .el-popper__arrow {
  display: none !important;
}
/* 内容卡片 */
.notify-dropdown {
  width: 380px !important;
  max-width: 92vw;
  border-radius: 16px !important;
  border: 1px solid var(--border-light) !important;
  background: #ffffff !important;
  box-shadow:
    0 8px 30px -10px rgba(15, 23, 42, 0.15),
    0 20px 60px -20px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(15,23,42,0.03) !important;
  overflow: hidden;
  pointer-events: auto !important;
  user-select: none;
  position: relative;
  z-index: 1;
}
.notify-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-rgb), 0.02)),
    linear-gradient(180deg, #ffffff, #fbfcfe);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.notify-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
}
.notify-title-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14);
  animation: notify-pulse 1.8s infinite ease-in-out;
}
@keyframes notify-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14); }
  50%      { box-shadow: 0 0 0 7px rgba(var(--primary-rgb), 0.04); }
}
.notify-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 12px;
  background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(239,68,68,0.12));
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: 999px;
  color: #c2410c;
  font-size: 12.5px;
  font-weight: 600;
}
.notify-count-num { font-size: 15px; color: #ea580c; }
.notify-count-unit { color: #9a3412; }
.notify-count-icon { color: #f97316; }

/* 空状态 */
.notify-empty {
  padding: 38px 24px 34px;
  text-align: center;
}
.notify-empty-icon {
  width: 68px; height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(16,185,129,0.02));
  color: #10b981;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,0.2);
}
.notify-empty-text {
  font-size: 15px; font-weight: 600; color: #0f172a; margin-bottom: 4px;
}
.notify-empty-sub {
  font-size: 12.5px; color: #64748b;
}

/* 消息列表 */
.notify-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 10px;
}
.notify-list::-webkit-scrollbar { width: 6px; }
.notify-list::-webkit-scrollbar-thumb {
  background: #d7dce6; border-radius: 3px;
}

.notify-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background .18s ease, transform .18s ease;
  position: relative;
}
.notify-item:hover {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.10), rgba(var(--primary-rgb), 0.02));
  transform: translateX(2px);
}
.notify-item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ef4444);
  flex-shrink: 0;
  margin-top: 10px;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.14);
}
.notify-item-body {
  flex: 1;
  min-width: 0;
}
.notify-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 6px;
}
.notify-item-title > span:first-child {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notify-item-type {
  border-radius: 999px !important;
  padding: 0 8px !important;
  height: 22px !important;
  line-height: 20px !important;
  font-size: 11.5px !important;
  flex-shrink: 0;
}
.notify-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}
.notify-item-meta > .el-icon {
  opacity: 0.75;
  color: #94a3b8 !important;
}
.notify-item-sep { color: #cbd5e1; }
.notify-item-team { color: #475569; font-weight: 500; }
.notify-item-time {
  margin-left: auto;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

/* 底部 CTA */
.notify-footer {
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(15,23,42,0.06);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.notify-footer-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow:
    0 6px 14px -4px rgba(var(--primary-rgb), 0.55),
    inset 0 0 0 1px rgba(255,255,255,0.2);
}
.notify-footer-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 10px 20px -4px rgba(var(--primary-rgb), 0.65),
    inset 0 0 0 1px rgba(255,255,255,0.25);
}

/* 顶栏：消息下拉卡片 - 深色模式（html.dark） */
html.dark .notify-dropdown {
  background: linear-gradient(180deg, #1a2436, #141b2c) !important;
  border: 1px solid #2a3550 !important;
  box-shadow:
    0 12px 30px -8px rgba(0,0,0,0.6),
    0 24px 60px -16px rgba(0,0,0,0.72) !important;
}
html.dark .notify-header {
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.02)),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
html.dark .notify-title { color: #e6eaf3; }
html.dark .notify-count {
  background: linear-gradient(135deg, rgba(249,115,22,0.22), rgba(239,68,68,0.18));
  border-color: rgba(249,115,22,0.3);
  color: #fdba74;
}
html.dark .notify-count-num { color: #fb923c; }
html.dark .notify-count-unit { color: #fed7aa; }
html.dark .notify-count-icon { color: #fb923c; }
html.dark .notify-empty-text { color: #e6eaf3; }
html.dark .notify-empty-sub { color: #8a99b3; }
html.dark .notify-list::-webkit-scrollbar-thumb { background: #3a4660; }
html.dark .notify-item:hover {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.02));
}
html.dark .notify-item-title { color: #e6eaf3; }
html.dark .notify-item-meta { color: #8a99b3; }
html.dark .notify-item-meta > .el-icon { color: #6b7a96 !important; }
html.dark .notify-item-sep { color: #3a4660; }
html.dark .notify-item-team { color: #b8c3d6; }
html.dark .notify-item-time { color: #6b7a96; }
html.dark .notify-footer {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.03));
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* sidebar-dark (浅页+深侧栏) 顶栏背景仍为浅色，下拉保持白卡即可；无需额外覆盖 */
.notify-dropdown .el-skeleton {
  padding: 12px 18px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--bg-hover);
  cursor: pointer;
  transition: all 0.2s ease;
}
.user-chip:hover {
  background: var(--primary-50);
}
.user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.user-chip .avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}
.user-chip .name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.content-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}
.content-area::-webkit-scrollbar {
  width: 6px;
}
.content-area::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

/* ============ 页面通用 ============ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}
.page-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: -40px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06), transparent 70%);
}
.stat-label {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 8px;
  font-weight: 500;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}
.stat-trend {
  font-size: 12px;
  color: #047857;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.stat-trend.down {
  color: #b91c1c;
}
.stat-icon-wrap {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.stat-icon-wrap.blue {
  background: var(--primary-50);
  color: var(--primary);
}
.stat-icon-wrap.green {
  background: var(--success-light);
  color: var(--success);
}
.stat-icon-wrap.orange {
  background: var(--warning-light);
  color: var(--warning);
}
.stat-icon-wrap.violet {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}
.stat-icon-wrap.gold {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.panel {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.chart-box {
  width: 100%;
  height: 340px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

/* 数据概览 - 积分排行榜 */
.lb-list {
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f8fa;
}
.lb-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5e6eb;
  color: #4e5969;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lb-rank.top1 { background: #ffd66e; color: #874d00; }
.lb-rank.top2 { background: #e2e8f0; color: #475569; }
.lb-rank.top3 { background: #f7c59f; color: #7c2d12; }
.lb-info { flex: 1; min-width: 0; }
.lb-name {
  font-size: 14px;
  color: var(--text-primary, #1d2129);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-wp {
  font-size: 12px;
  color: var(--text-secondary, #86909c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-points {
  font-size: 16px;
  font-weight: 700;
  color: #faad14;
  flex-shrink: 0;
}
.lb-empty {
  padding: 60px 0;
  text-align: center;
  color: var(--text-secondary, #86909c);
  font-size: 13px;
}
.lb-tip {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary, #86909c);
  margin-left: 6px;
}
/* 排行榜周期切换按钮 - 统一后台主题色 */
.lb-row .el-radio-button {
  --el-radio-button-checked-bg-color: var(--primary);
  --el-radio-button-checked-border-color: var(--primary);
  --el-radio-button-checked-text-color: #fff;
  --el-radio-button-hover-text-color: var(--primary);
}
.lb-row .el-radio-button__original-radio:checked + .el-radio-button__inner {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: -1px 0 0 0 var(--primary);
}
.lb-row .el-radio-button__inner:hover {
  color: var(--primary);
}

.tbl-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.tbl-tag.pending { background: #fef3c7; color: #92400e; }
.tbl-tag.approved { background: #d1fae5; color: #065f46; }
.tbl-tag.rejected { background: #fee2e2; color: #991b1b; }
.tbl-tag.shipped { background: #dbeafe; color: #1e40af; }
.tbl-tag.completed { background: #d1fae5; color: #065f46; }
.tbl-tag.cancelled { background: #f3f4f6; color: #374151; }
.tbl-tag.worker { background: #dbeafe; color: #1e40af; }
.tbl-tag.reviewer { background: #fef3c7; color: #92400e; }
.tbl-tag.admin { background: #fee2e2; color: #991b1b; }

.img-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-hover);
}

/* 隐患详情弹窗 - 现场照片网格 */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.img-grid .img-thumb-lg {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;        /* 缩略图等比裁剪填满格子 */
  object-position: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-hover);
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  align-items: center;
}
.filter-bar .el-select,
.filter-bar .el-input {
  flex-shrink: 0;
  min-width: 160px;
}
.filter-bar .el-select .el-select__wrapper,
.filter-bar .el-input .el-input__wrapper {
  width: 100%;
}
.filter-btn-wrap {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.page-header .el-button {
  font-size: 14px;
  padding: 9px 18px;
  min-height: 36px;
  border-radius: 8px;
}

.filter-bar .el-button {
  font-size: 14px;
  padding: 8px 16px;
  min-height: 36px;
  border-radius: 8px;
}

.el-dialog__footer .el-button {
  font-size: 14px;
  padding: 9px 20px;
  min-height: 36px;
  border-radius: 8px;
}

.el-form-item .el-button {
  font-size: 13px;
  padding: 7px 14px;
  min-height: 32px;
  border-radius: 7px;
}

.el-message-box .el-button {
  font-size: 13px;
  padding: 8px 18px;
  min-height: 34px;
  border-radius: 8px;
}

.pagination-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.detail-section {
  margin-bottom: 20px;
}
.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
}
.detail-label {
  min-width: 80px;
  color: var(--text-tertiary);
  font-size: 13px;
}
.detail-value {
  flex: 1;
  color: var(--text-primary);
  font-size: 13px;
}

.review-box {
  padding: 14px;
  border-radius: var(--radius-base);
  background: var(--primary-50);
  border-left: 3px solid var(--primary);
}
.review-box.pending { background: var(--warning-light); border-left-color: var(--warning); }
.review-box.rejected { background: var(--danger-light); border-left-color: var(--danger); }
.review-box.approved { background: var(--success-light); border-left-color: var(--success); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar .el-select, .filter-bar .el-input { width: 100%; }
  .filter-btn-wrap { margin-left: 0; width: 100%; }
  .content-area { padding: 16px; }
  .pagination-wrap { flex-wrap: wrap; justify-content: center; }
}

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ============ 统计卡片组 ============ */
.wp-stats, .cat-stats, .pc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.wp-stat-card, .cat-stat-card, .pc-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}
.wp-stat-card:hover, .cat-stat-card:hover, .pc-stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.wp-stat-icon, .cat-stat-icon, .pc-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.wp-stat-blue, .cat-stat-blue, .pc-stat-blue { background: var(--primary-50); color: var(--primary); }
.wp-stat-green, .cat-stat-green, .pc-stat-green { background: var(--success-light); color: var(--success); }
.wp-stat-orange, .cat-stat-orange, .pc-stat-orange { background: var(--warning-light); color: var(--warning); }
.wp-stat-body, .cat-stat-body, .pc-stat-body { flex: 1; min-width: 0; }
.wp-stat-num, .cat-stat-num, .pc-stat-num { font-size: 26px; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.wp-stat-label, .cat-stat-label, .pc-stat-label { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }

.wp-grid, .cat-grid, .pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  min-height: 200px;
}

.wp-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.wp-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
  transform: translateY(-2px);
}
.wp-card-stopped { background: #fafbfc; opacity: 0.85; }

.wp-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wp-code-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm); background: var(--primary-50); color: var(--primary); font-size: 12px; font-weight: 600; }
.wp-status-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.wp-active { background: var(--success-light); color: var(--success); }
.wp-stopped { background: #f3f4f6; color: var(--text-tertiary); }
.wp-status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.wp-dot-active { background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
  50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.05); }
  100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
}

.wp-card-name { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 14px; }
.wp-card-meta { flex: 1; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.wp-meta-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.wp-meta-icon { font-size: 14px; width: 18px; text-align: center; }
.wp-worker-count { font-weight: 600; color: var(--text-primary); }
.wp-card-footer { display: flex; align-items: center; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.wp-card-footer .el-button { font-size: 13px; padding: 7px 14px; min-height: 30px; border-radius: 6px; font-weight: 600; }
.wp-card-footer .el-button + .el-button { margin-left: 8px; }

.cat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.cat-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-200); transform: translateY(-2px); }

.cat-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.cat-icon-wrap { width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--primary-50); display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; }
.cat-icon-wrap img { width: 100%; height: 100%; object-fit: contain; }
.cat-points-badge { padding: 4px 12px; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-sm); }
.cat-card-name { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.cat-card-desc { font-size: 13px; color: var(--text-tertiary); line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-light); }
.cat-card-footer .el-button { font-size: 13px; padding: 7px 14px; min-height: 30px; border-radius: 6px; font-weight: 600; }
.cat-card-footer .el-button + .el-button { margin-left: 8px; }

.pc-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.pc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.pc-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-200); transform: translateY(-2px); }

.pc-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.pc-icon-wrap { width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--primary-50); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.pc-count-badge { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pc-count-active { background: var(--primary-50); color: var(--primary); }
.pc-count-empty { background: #f1f5f9; color: #64748b; }
.news-cat-color-dot { width: 14px; height: 14px; border-radius: 4px; box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
.news-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
.news-cat-pill:hover { transform: translateY(-1px); }

/* =========================================
   资讯列表-分类 tag（仅此处使用"分类自身颜色"，不参与全局主题色）
   JS 层通过 :style 注入 background/color/border；此处只定盒模型 + 深色模式微调
   ========================================= */
.news-cat-tag {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform .18s ease, filter .18s ease;
}
.news-cat-tag:hover {
  filter: saturate(1.2) brightness(1.02);
  transform: translateY(-1px);
}
/* 深色模式：只调整饱和度/边框高光，保持"分类原始颜色"的色值 */
html.dark .news-cat-tag {
  backdrop-filter: saturate(1.15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
  filter: saturate(1.05);
}

/* 主题颜色选择器 */
.color-picker-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #f8f9fb;
  border-radius: 8px;
  border: 1px solid #e4e7ed;
}
.color-picker-label {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
}
.color-picker-preview-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  min-width: 80px;
  justify-content: center;
}
.color-picker-row { margin-top: 4px; }
.color-picker-col { margin-bottom: 10px; }
.color-picker-item {
  cursor: pointer;
  padding: 14px 10px;
  text-align: center;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: all 0.2s;
  user-select: none;
}
.color-picker-item:hover {
  transform: translateY(-1px);
}
.color-picker-item-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.pc-card-name { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.pc-card-desc { font-size: 13px; color: var(--text-tertiary); line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-light); }
.pc-card-footer .el-button { font-size: 13px; padding: 7px 14px; min-height: 30px; border-radius: 6px; font-weight: 600; }
.pc-card-footer .el-button + .el-button { margin-left: 8px; }

@media (max-width: 768px) {
  .wp-stats, .cat-stats, .pc-stats { grid-template-columns: repeat(2, 1fr); }
  .wp-grid, .cat-grid, .pc-grid { grid-template-columns: 1fr; }
}

/* ============ 图标上传组件 ============ */
.icon-uploader-placeholder {
  width: 88px;
  height: 88px;
  border: 2px dashed #dcdfe6;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafbfc;
  pointer-events: auto;
}
.icon-uploader-placeholder:hover {
  border-color: #2563eb;
  background: #eef2ff;
}
.icon-uploader-preview {
  width: 88px;
  height: 88px;
  border: 1px solid #e4e7ed;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: #fafbfc;
  pointer-events: auto;
}

/* Ensure el-upload fills the click area */
.icon-uploader-root {
  display: inline-block !important;
  cursor: pointer;
  position: relative;
}
.icon-uploader-root .el-upload {
  display: block !important;
  width: 88px;
  height: 88px;
}
.icon-uploader-root input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ============ 商品管理页 ============ */
.products-panel { overflow: hidden; border: 1px solid var(--border-light); border-radius: var(--radius-lg); }
.pr-item { display: flex; align-items: center; gap: 14px; }
.pr-thumb-wrap { flex-shrink: 0; width: 56px; height: 56px; border-radius: var(--radius-md); padding: 3px; background: linear-gradient(135deg, #f0f5ff, #fff); border: 1px solid var(--border-light); }
.pr-thumb { width: 100%; height: 100%; border-radius: var(--radius-sm); object-fit: cover; display: block; }
.pr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pr-name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-desc { font-size: 12px; color: var(--text-tertiary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.points-cost-badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: linear-gradient(135deg, #fef3c7, #fef9c3); color: #b45309; border: 1px solid #fde68a; font-weight: 600; font-size: 13px; }

/* ============ 用户下拉菜单 ============ */
.user-dropdown-menu {
  min-width: 160px !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 6px 0 !important;
  background: #fff;
}
.user-dropdown-menu .el-dropdown-menu__item {
  padding: 8px 16px !important;
  height: 40px !important;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  margin: 2px 6px;
}
.user-dropdown-menu .el-dropdown-menu__item:hover {
  background: var(--bg-hover) !important;
  color: var(--primary);
}
.user-dropdown-menu .el-dropdown-menu__item .el-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}
.user-dropdown-menu .el-dropdown-menu__item:hover .el-icon {
  color: var(--primary);
}

/* ============ 系统设置 ============ */
.settings-tabs .el-tabs__header {
  margin: 0;
  padding: 0 20px;
  background: #fff;
}
.settings-tabs .el-tabs__item {
  height: 48px;
  font-size: 14px;
  font-weight: 500;
}
.settings-form-wrap {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px 8px;
  margin-bottom: 14px;
}

.settings-form-wrap .el-form-item {
  margin-bottom: 22px;
}

.settings-form-wrap .el-form-item__content .el-input {
  width: 100%;
}

/* ============ OSS 使用建议卡片 ============ */
.oss-tips-card {
  margin-top: 18px;
  padding: 14px 18px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 10px;
}
.oss-tips-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #874d00;
  margin-bottom: 10px;
}
.oss-tips-title .el-icon {
  color: #faad14;
  font-size: 16px;
}
.oss-tips-list {
  margin: 0;
  padding-left: 20px;
  color: #613400;
  font-size: 13px;
  line-height: 1.9;
}
.oss-tips-list li {
  margin-bottom: 4px;
}
.oss-tips-list b {
  color: #5c2c00;
  font-weight: 600;
}

/* ============ Logo 图片 ============ */
.brand-logo-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 18px;
  display: block;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}

/* ============ 弹窗预览 ============ */
.pr-image-field { display: flex; align-items: flex-start; gap: 14px; width: 100%; }
.pr-image-field > .el-input { flex: 1; }
.pr-preview { flex-shrink: 0; width: 96px; height: 96px; border-radius: var(--radius-md); overflow: hidden; border: 1px dashed var(--border-base); background: var(--bg-hover); }
.pr-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============ 上传组件 ============ */
.product-upload-placeholder {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-lg);
  background: var(--bg-hover);
  border: 1.5px dashed var(--border-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all 0.2s ease;
  cursor: pointer;
}
.product-upload-placeholder:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
}
.product-upload-placeholder .plus-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border-base);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 8px;
}
.product-upload-preview {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-base);
  box-shadow: var(--shadow-sm);
}
.product-upload-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 13px;
  font-weight: 500;
}
.product-upload-preview:hover .product-upload-mask {
  opacity: 1;
}

/* ============ 设置页上传 ============ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .settings-grid { grid-template-columns: 1fr; }
}
.settings-card {
  background: var(--bg-hover);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
}
/* 登录页文案配置：纵向输入组 */
.settings-text-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-text-group .el-input-group__prepend {
  min-width: 64px;
  justify-content: center;
  font-weight: 600;
}
.settings-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.settings-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.settings-card .card-tag {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-50);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.settings-upload-placeholder {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1.5px dashed var(--border-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.settings-upload-placeholder:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.settings-upload-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-base);
  background: #fff;
}
.settings-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.settings-upload-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 12px;
}
.settings-upload-preview:hover .settings-upload-mask {
  opacity: 1;
}

/* ============ 标签页容器 ============ */
.products-dialog .el-input-number {
  width: 100% !important;
}
.created-time {
  color: var(--text-quaternary);
  font-size: 13px;
}

/* ============ 顶栏图标 ============ */
.header-icon {
  cursor: pointer;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}
.header-icon:hover {
  color: var(--primary);
}

/* ============ 主题配置抽屉 ============ */
.theme-panel {
  padding: 4px 2px;
}
.theme-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.theme-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.theme-mode-card {
  border: 1.5px solid var(--border-base);
  border-radius: 10px;
  padding: 20px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.2s ease;
  user-select: none;
}
.theme-mode-card:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.theme-mode-card.active {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
}
.theme-tip {
  margin-top: 20px;
  padding: 10px 12px;
  background: var(--bg-hover);
  border-radius: var(--radius-base);
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* =========================================
   主题抽屉底部 · 环境感知天气卡
   ========================================= */
.weather-card {
  position: relative;
  margin-top: 22px;
  padding: 18px 18px 14px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #eef2f6 0%, #dde7ea 45%, #cfe3dd 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 6px 18px rgba(15, 40, 60, 0.08);
  cursor: default;
}
.weather-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  border-radius: 7px 7px 7px 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.weather-turbine {
  position: absolute;
  right: 26px;
  top: 30px;
  width: 62px;
  height: 84px;
  color: rgba(255, 255, 255, 0.92);
  fill: currentColor;
  opacity: 0.9;
  pointer-events: none;
}
.weather-turbine .turbine-rotor {
  transform-origin: 45px 38px;
  animation: turbine-spin 7s linear infinite;
}
@keyframes turbine-spin {
  to { transform: rotate(360deg); }
}
.weather-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.weather-temp {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  color: #1f2d3d;
  font-family: 'Segoe UI', 'PingFang SC', sans-serif;
}
.weather-temp-unit {
  font-size: 22px;
  font-weight: 600;
  vertical-align: 14px;
  margin-left: 1px;
}
.weather-sub {
  padding-top: 3px;
}
.weather-wind {
  font-size: 12px;
  color: #5a6b7d;
  line-height: 1.4;
}
.weather-loc {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.weather-loc-name {
  font-size: 13px;
  font-weight: 600;
  color: #33475b;
}
.weather-loc-fix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #64748b;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.2s ease;
}
.weather-loc-fix:hover {
  color: #2563eb;
  background: #fff;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
}
.weather-loc-fix.spinning .el-icon {
  animation: turbine-spin 1s linear infinite;
}
.weather-aqi {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.weather-forecast {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  display: flex;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 10px 0;
  backdrop-filter: blur(4px);
}
.weather-fc-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #47586b;
}
.weather-fc-item + .weather-fc-item {
  border-left: 1px solid rgba(148, 163, 184, 0.35);
}
.weather-fc-item .el-icon {
  color: #334155;
}
.weather-status {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #47586b;
}
.weather-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex-shrink: 0;
}
.weather-empty {
  position: relative;
  z-index: 1;
  padding: 26px 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}
.weather-loading-icon {
  color: #64748b;
}

/* 天气卡 · 深色模式 */
html.dark .weather-card {
  background: linear-gradient(135deg, #1e2839 0%, #1a2433 50%, #17273a 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
html.dark .weather-ribbon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.45);
}
html.dark .weather-turbine {
  color: rgba(125, 175, 235, 0.4);
}
html.dark .weather-temp {
  color: #e5eaf3;
}
html.dark .weather-wind,
html.dark .weather-status,
html.dark .weather-empty {
  color: #8b98ab;
}
html.dark .weather-loc-name,
html.dark .weather-fc-item .el-icon {
  color: #c9d4e3;
}
html.dark .weather-loc-fix {
  color: #8b98ab;
  background: rgba(255, 255, 255, 0.08);
}
html.dark .weather-loc-fix:hover {
  color: #93c5fd;
  background: rgba(255, 255, 255, 0.15);
}
html.dark .weather-fc-item {
  color: #8b98ab;
}
html.dark .weather-forecast {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}
html.dark .weather-fc-item + .weather-fc-item {
  border-left-color: rgba(255, 255, 255, 0.1);
}
html.dark .weather-loading-icon {
  color: #8b98ab;
}

/* 主题颜色九宫格 */
.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-color-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--border-base);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.2s ease;
  user-select: none;
}
.theme-color-item:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}
.theme-color-item.active {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-50);
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.18);
}
.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55) inset;
}

/* =====================================================
   深色模式（html.dark）
   Element Plus 组件由官方 dark-vars.css 提供，
   此处覆盖设计令牌与自定义组件颜色
   ===================================================== */
html.dark {
  --primary-50: rgba(var(--primary-rgb), 0.16);
  --primary-100: rgba(var(--primary-rgb), 0.24);
  --primary-200: rgba(var(--primary-rgb), 0.32);
  --success-light: rgba(16, 185, 129, 0.18);
  --warning-light: rgba(245, 158, 11, 0.18);
  --danger-light: rgba(239, 68, 68, 0.2);

  --text-primary: #e6eaf3;
  --text-secondary: #b8c3d6;
  --text-tertiary: #8a99b3;
  --text-quaternary: #64748b;

  --bg-body: #0f172a;
  --bg-card: #1a2333;
  --bg-hover: #243044;
  --bg-active: #1e3a5f;

  --border-light: #232f45;
  --border-base: #2b3a55;
  --border-dark: #3a4b6b;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.55);
}
html.dark body {
  background: #0f172a;
  color: #e6eaf3;
}
/* 布局骨架 */
html.dark .sidebar {
  background: #141d2f;
  border-right-color: #232f45;
}
html.dark .header-bar {
  background: #141d2f;
  border-bottom-color: #232f45;
}
html.dark .main-wrapper {
  background: #0f172a;
}
/* 卡片/面板类白底覆盖 */
html.dark .stat-card,
html.dark .panel,
html.dark .filter-bar,
html.dark .pagination-wrap,
html.dark .wp-stat-card,
html.dark .cat-stat-card,
html.dark .pc-stat-card,
html.dark .wp-card,
html.dark .cat-card,
html.dark .pc-card,
html.dark .settings-form-wrap,
html.dark .settings-tabs .el-tabs__header {
  background: #1a2333;
}
html.dark .login-wrap {
  background: #1a2333;
}
html.dark .el-button--default {
  background: #243044 !important;
}
html.dark .tip-row code {
  background: #243044;
  color: #b8c3d6;
}
html.dark .user-dropdown-menu {
  background: #1a2333 !important;
}
html.dark .user-chip .avatar-img {
  border-color: #2b3a55;
}
html.dark .settings-upload-placeholder,
html.dark .settings-upload-preview {
  background: #141d2f;
}
html.dark .sidebar-menu::-webkit-scrollbar-thumb,
html.dark .content-area::-webkit-scrollbar-thumb {
  background: #3a4b6b;
}
html.dark .stat-card::before {
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.14), transparent 70%);
}

/* ============ 主题抽屉 - 自定义颜色 & 侧边栏配色 ============ */
.custom-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1.5px dashed var(--border-dark);
  border-radius: var(--radius-base);
  background: var(--bg-hover);
}
.custom-color-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.custom-color-label .color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.45) inset;
}
.custom-color-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
  border: 2px solid var(--bg-card);
  overflow: hidden;
}
.custom-color-picker::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent 55%);
  pointer-events: none;
}
.custom-color-picker input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}
.custom-color-clear {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--text-tertiary);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-size: 13px;
}
.custom-color-clear:hover {
  color: var(--danger);
}
.sidebar-color-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.side-color-item {
  padding: 10px 0;
  text-align: center;
  border: 1.5px solid var(--border-base);
  border-radius: var(--radius-base);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.side-color-item:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}
.side-color-item.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.35);
  font-weight: 600;
}

/* =========================================
   html.dark 全局硬编码颜色修复
   （基于 EP 的 dark-vars 仅覆盖了组件，不覆盖页面级自定义容器/卡片/登录等）
   ========================================= */
html.dark .login-wrap {
  background: #1a2333;
}
html.dark .el-button--default {
  background: #243044 !important;
  border-color: #3a4b6b !important;
  color: #cfd3dc !important;
}
html.dark .el-button--default:hover {
  color: #cfd3dc !important;
}
html.dark .tip-row code {
  color: #b8c3d6;
}
html.dark .tip-row code,
html.dark .install-step-title,
html.dark .install-step-note {
  color: #cfd3dc;
}
html.dark .warning-note {
  color: #faad14;
}
html.dark .login-panel,
html.dark .panel-head,
html.dark .form-sub-title {
  color: #cfd3dc;
}
html.dark .brand-features li { color: rgba(255,255,255,0.85); }
html.dark .brand-desc { color: rgba(255,255,255,0.65); }

/* 主内容页面：白底区域全部覆盖为深色卡片 */
html.dark body,
html.dark .main-wrapper,
html.dark .header-bar,
html.dark .sidebar {
  color: #e6eaf3;
}
html.dark .logo-text { color: #e6eaf3; }
html.dark .stat-card,
html.dark .panel,
html.dark .filter-bar,
html.dark .pagination-wrap,
html.dark .wp-stat-card,
html.dark .cat-stat-card,
html.dark .pc-stat-card,
html.dark .wp-card,
html.dark .cat-card,
html.dark .pc-card,
html.dark .settings-form-wrap,
html.dark .settings-tabs .el-tabs__header,
html.dark .el-dialog,
html.dark .el-drawer,
html.dark .el-popper,
html.dark .el-dropdown-menu,
html.dark .el-select-dropdown,
html.dark .el-date-editor.el-input,
html.dark .el-message-box,
html.dark .el-notification {
  background: #1a2333;
  color: #e6eaf3;
}
html.dark .el-dialog__title,
html.dark .el-drawer__header {
  color: #e6eaf3;
}
html.dark .page-title,
html.dark .panel-title,
html.dark .stat-title {
  color: #e6eaf3;
}
html.dark .page-sub,
html.dark .stat-label,
html.dark .sub-label {
  color: #8a99b3;
}

/* 顶栏下拉/消息等 */
html.dark .user-chip {
  background: #243044;
}
html.dark .user-chip:hover {
  background: rgba(var(--primary-rgb), 0.16);
}
html.dark .collapse-btn:hover,
html.dark .header-right .el-tooltip:hover {
  background: #243044;
  color: var(--primary);
}
html.dark .breadcrumb .el-breadcrumb__inner { color: #8a99b3; }
html.dark .breadcrumb .el-breadcrumb__item:last-child .el-breadcrumb__inner { color: #e6eaf3; }
html.dark .header-icon { color: #b8c3d6; }
html.dark .header-icon:hover { color: var(--primary); }

/* 统计卡片大数字 / 数字颜色 */
html.dark .stat-value {
  color: #ffffff;
}
html.dark .stat-unit { color: #8a99b3; }
html.dark .stat-trend.up { color: #67c23a; }
html.dark .stat-trend.down { color: #f56c6c; }

/* 各类型 tag/标签 修正 */
html.dark .tbl-tag.pending    { background: #4a3c16; color: #f6c46a; }
html.dark .tbl-tag.approved   { background: #16463a; color: #5ce3a0; }
html.dark .tbl-tag.rejected   { background: #4a1e25; color: #ff8b95; }
html.dark .tbl-tag.shipped    { background: #1e3151; color: #6fb5ff; }
html.dark .tbl-tag.completed  { background: #16463a; color: #5ce3a0; }
html.dark .tbl-tag.cancelled  { background: #2a3142; color: #b8c3d6; }
html.dark .tbl-tag.worker     { background: #1e3151; color: #6fb5ff; }

/* =========================================================
   性能模式（低端显卡 PC 降级）html.lowend-gfx
   V3 默认开启：全站 transition/animation 一刀切 0s；
   Element Plus enter/leave 过渡全部禁用；backdrop-filter 彻底关；
   这样主线程「动画」阶段从 1.5s+ 压到 <80ms
   ========================================================= */

/* ---- 大锤：除了白名单（loading 转圈），transition/animation 全部 0ms ---- */
html.lowend-gfx,
html.lowend-gfx *,
html.lowend-gfx *::before,
html.lowend-gfx *::after {
  animation-duration: 0ms !important;
  animation-iteration-count: 1 !important;
  animation-delay: 0ms !important;
  transition-duration: 0ms !important;
  transition-delay: 0ms !important;
  scroll-behavior: auto !important;
}
html.lowend-gfx .el-loading-spinner .path,
html.lowend-gfx .el-icon-loading {
  animation-duration: 1s !important;
  animation-iteration-count: infinite !important;
}

/* ---- Element Plus 内部 transition：enter/leave 瞬间到终态，不做 0.3s 淡入/位移 ---- */
html.lowend-gfx .el-drawer-fade-enter-active,
html.lowend-gfx .el-drawer-fade-leave-active,
html.lowend-gfx .dialog-fade-enter-active,
html.lowend-gfx .dialog-fade-leave-active,
html.lowend-gfx .el-message-fade-enter-active,
html.lowend-gfx .el-message-fade-leave-active,
html.lowend-gfx .el-notification-fade-enter-active,
html.lowend-gfx .el-notification-fade-leave-active,
html.lowend-gfx .el-message-box-fade-enter-active,
html.lowend-gfx .el-message-box-fade-leave-active,
html.lowend-gfx .fade-enter-active,
html.lowend-gfx .fade-leave-active,
html.lowend-gfx .fade-transform-enter-active,
html.lowend-gfx .fade-transform-leave-active,
html.lowend-gfx .el-fade-in-linear-enter-active,
html.lowend-gfx .el-fade-in-linear-leave-active,
html.lowend-gfx .el-collapse-transition,
html.lowend-gfx .v-enter-active,
html.lowend-gfx .v-leave-active {
  transition: none !important;
  animation: none !important;
}
html.lowend-gfx .v-modal { transition: none !important; opacity: 0.5 !important; }
html.lowend-gfx .fade-transform-enter-from,
html.lowend-gfx .fade-transform-leave-to,
html.lowend-gfx .fade-transform-enter-to,
html.lowend-gfx .fade-transform-leave-from { opacity: 1 !important; transform: none !important; }

/* ---- hover transform/box-shadow 大面积 invalidation → 低性能模式 no-op ---- */
html.lowend-gfx *:hover,
html.lowend-gfx *:focus-visible,
html.lowend-gfx *:active { transform: none !important; transition: none !important; }
html.lowend-gfx .el-button:hover,
html.lowend-gfx .el-tag:hover { box-shadow: none !important; transform: none !important; }

/* ---- 核心：关闭所有 blur（GPU 开销最大项） ---- */
html.lowend-gfx *,
html.lowend-gfx *::before,
html.lowend-gfx *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}

/* ---- 登录页品牌 logo 方块：把 blur 换成实心半透明底 ---- */
html.lowend-gfx .brand-mark {
  background: rgba(255, 255, 255, 0.55) !important;
}
html.dark.lowend-gfx .brand-mark {
  background: rgba(30, 41, 59, 0.9) !important;
}

/* ---- 折叠二级菜单弹出面板：移除 blur + 多层阴影 → 单层阴影 + 纯白/纯深色底 ---- */
html.lowend-gfx .el-menu--popup,
html.lowend-gfx body > .el-popper.el-menu--popup {
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.18) !important;
  backdrop-filter: none !important;
}
/* sidebar-dark 浮层（深色面板） */
html.lowend-gfx.sidebar-dark:not(.dark) body > .el-popper.el-menu--popup,
html.lowend-gfx.sidebar-dark:not(.dark) .el-menu--popup {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45) !important;
}
/* 弹出面板内 active 项：由三层阴影降为一层 ---- */
html.lowend-gfx .el-menu--popup .el-menu-item.is-active {
  box-shadow: 0 2px 8px -2px rgba(var(--primary-rgb), 0.45) !important;
}

/* ---- 折叠态深色侧栏的弹出面板阴影降级 ---- */
html.lowend-gfx.sidebar-dark:not(.dark) .el-menu--popup .el-menu-item.is-active {
  box-shadow: none !important;
}

/* ---- 天气卡背景：移除渐变 + 多重阴影 ---- */
html.lowend-gfx .weather-card {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}
html.dark.lowend-gfx .weather-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}
/* 三栏预报：去掉 blur，用更高不透明度的实心底保持可读性 */
html.lowend-gfx .weather-forecast {
  background: rgba(255, 255, 255, 0.80) !important;
}
html.dark.lowend-gfx .weather-forecast {
  background: rgba(30, 41, 59, 0.85) !important;
}

/* ---- 通用卡片/对话框/抽屉/消息面板：多层阴影 → 单层 ---- */
html.lowend-gfx .el-card,
html.lowend-gfx .el-dialog,
html.lowend-gfx .el-drawer,
html.lowend-gfx .el-message-box,
html.lowend-gfx .notify-root .notify-popover,
html.lowend-gfx body > .el-popper:not(.el-menu--popup) {
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12) !important;
}

/* ---- 全局深色模式下通用浮层阴影降级 ---- */
html.dark.lowend-gfx .el-card,
html.dark.lowend-gfx .el-dialog,
html.dark.lowend-gfx .el-drawer,
html.dark.lowend-gfx .el-message-box,
html.dark.lowend-gfx .notify-root .notify-popover,
html.dark.lowend-gfx body > .el-popper:not(.el-menu--popup) {
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.35) !important;
}

/* ---- 停用持续动画（风机旋转等）---- */
html.lowend-gfx .weather-fan-blade {
  animation: none !important;
}
html.lowend-gfx .weather-loc-fix.spin {
  animation: none !important;
}

/* ---- 统计卡片阴影降级 ---- */
html.lowend-gfx .stat-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* ---- 按钮禁用的多层 box-shadow 降级（主题色切换按钮等）---- */
html.lowend-gfx .theme-drawer .palette-dot.active,
html.lowend-gfx .theme-drawer .preset-btn.active,
html.lowend-gfx .theme-drawer .sidebar-mode-btn.active {
  box-shadow: 0 0 0 2px var(--primary) !important;
}

/* =============== 性能模式：动画 / transition 降级 ===============
   将所有 transition 缩短/改为 opacity-only，
   关闭折叠侧栏、抽屉、对话框、路由切换的重型过渡，
   移除 hover 的 transform（避免大面积 invalidation）。
   ==================================================================== */

/* 1. 全局 transition 时长截断 → 最多 120ms，且不允许 transition:all */
html.lowend-gfx *,
html.lowend-gfx *::before,
html.lowend-gfx *::after {
  transition-duration: 0.12s !important;
  transition-delay: 0s !important;
  animation-duration: 0.12s !important;
  animation-iteration-count: 1 !important;
  animation-delay: 0s !important;
}

/* 2. 关闭所有持续性的无限动画（徽标呼吸、风机旋转等在此前已关，这里兜底） */
html.lowend-gfx * {
  -webkit-animation-iteration-count: 0 !important;
  animation-iteration-count: 0 !important;
  animation: none 0s step-end !important;
}
/* 但允许一次性过渡（提示框、菜单弹出等）执行 1 次 */
html.lowend-gfx .el-message,
html.lowend-gfx .el-notification,
html.lowend-gfx .el-message-box,
html.lowend-gfx .el-tooltip__popper {
  animation: none 0s step-end !important;
  -webkit-animation-iteration-count: 0 !important;
  animation-iteration-count: 0 !important;
}

/* 3. 移除所有 hover 的 transform 位移（hover 时大面积 invalidation 是长帧元凶） */
html.lowend-gfx *:hover,
html.lowend-gfx *:focus-visible {
  transform: none !important;
}

/* 4. 侧栏折叠动画 → 直接跳变（整个侧栏 260px 跨 0.3s = 主因之一） */
html.lowend-gfx .sidebar,
html.lowend-gfx .main-wrap,
html.lowend-gfx .layout-wrapper,
html.lowend-gfx .sidebar-menu .el-menu,
html.lowend-gfx .sidebar-menu .submenu-nested-title,
html.lowend-gfx .sidebar-menu .el-menu-item,
html.lowend-gfx .sidebar-menu .el-sub-menu__title {
  transition: none !important;
  animation: none !important;
}

/* 5. Element Plus 抽屉/对话框/弹出层：改为仅 opacity 过渡，去掉 translate/scale */
html.lowend-gfx .el-drawer,
html.lowend-gfx .el-drawer__wrapper,
html.lowend-gfx .el-dialog,
html.lowend-gfx .el-dialog__wrapper,
html.lowend-gfx .el-message-box,
html.lowend-gfx .el-message-box__wrapper,
html.lowend-gfx .el-drawer.ltr,
html.lowend-gfx .el-drawer.rtl,
html.lowend-gfx .el-drawer.ttb,
html.lowend-gfx .el-drawer.btt {
  transition: opacity 0.1s linear !important;
  transform: none !important;
}
/* 关闭 Element Plus 的默认 fade/scale/overlay 关键帧（若存在） */
html.lowend-gfx .el-drawer-fade-enter-from,
html.lowend-gfx .el-drawer-fade-leave-to,
html.lowend-gfx .dialog-fade-enter-from,
html.lowend-gfx .dialog-fade-leave-to,
html.lowend-gfx .v-modal-enter-from,
html.lowend-gfx .v-modal-leave-to {
  transform: none !important;
  opacity: 0;
}

/* 6. 通知弹出面板（铃铛）去掉 translateY/scale，只留极短 fade */
html.lowend-gfx .notify-root .notify-popover {
  animation: none !important;
}
html.lowend-gfx .notify-pop-enter-from,
html.lowend-gfx .notify-pop-leave-to {
  transform: none !important;
}

/* 7. 折叠侧栏二级菜单弹出：去掉 enter/leave 动画（本来就是 180ms，但叠加移动成本高） */
html.lowend-gfx .el-menu--popup {
  animation: none !important;
  transition: opacity 0.08s linear !important;
}

/* 8. 卡片/统计卡/产品卡 hover 的 translateY(-2px) 阴影变化：上面第 3 条已关 transform，这里防止 box-shadow transition 触发重绘 */
html.lowend-gfx .stat-card,
html.lowend-gfx .cat-card,
html.lowend-gfx .pc-card,
html.lowend-gfx .tbl-card,
html.lowend-gfx .news-card,
html.lowend-gfx .video-preview-card,
html.lowend-gfx .product-card,
html.lowend-gfx .product-cat-card {
  transition: background-color 0.08s linear, border-color 0.08s linear !important;
}

/* 9. 表格行 hover / 按钮 hover 的长 transition 截断 */
html.lowend-gfx .el-table .el-table__row,
html.lowend-gfx .el-table .cell,
html.lowend-gfx .el-button,
html.lowend-gfx .el-tag,
html.lowend-gfx .el-input__wrapper,
html.lowend-gfx .el-select__wrapper,
html.lowend-gfx .el-popper,
html.lowend-gfx body > .el-popper {
  transition: background-color 0.08s linear,
              color 0.08s linear,
              border-color 0.08s linear !important;
}

/* 10. 路由切换：<router-view> 外部的 transition（若 app.js 层未移除，由 CSS 兜底截断） */
html.lowend-gfx .main-content,
html.lowend-gfx .page-body,
html.lowend-gfx .view-wrapper,
html.lowend-gfx .router-view-wrapper,
html.lowend-gfx .fade-transform-enter-from,
html.lowend-gfx .fade-transform-leave-to {
  transition: opacity 0.08s linear !important;
  transform: none !important;
  animation: none !important;
}

/* 11. 表格专项：关闭 stripe 斑马纹背景、hover 行色变、禁用每格过渡，
       并启用合成层分离（滚动时不整张表重绘） */
html.lowend-gfx .el-table {
  will-change: transform;
  transform: translateZ(0);
}
html.lowend-gfx .el-table__row {
  background: transparent !important;
}
html.lowend-gfx .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell,
html.lowend-gfx .el-table__body tr.el-table__row:nth-child(even) td.el-table__cell {
  background: transparent !important;
}
html.lowend-gfx .el-table__body tr:hover > td.el-table__cell {
  background-color: transparent !important;
}
html.lowend-gfx .el-table .el-table__cell {
  transition: none !important;
  will-change: auto;
}
/* 表头固定列、左侧固定列的阴影：改为 0（每一次横向滚动都重新画阴影非常贵） */
html.lowend-gfx .el-table th.el-table__cell.is-leaf,
html.lowend-gfx .el-table td.el-table__cell.gutter {
  background: #f5f7fa !important;
}
html.dark.lowend-gfx .el-table th.el-table__cell.is-leaf,
html.dark.lowend-gfx .el-table td.el-table__cell.gutter {
  background: #1a2333 !important;
}
html.lowend-gfx .el-table__fixed-right::before,
html.lowend-gfx .el-table__fixed::before,
html.lowend-gfx .el-table__fixed-right-patch,
html.lowend-gfx .el-table__fixed-body-wrapper {
  box-shadow: none !important;
}

/* 12. Input/Select/Dropdown 内的 transition（El Plus 默认对弹出层有滑入 + 边框色/背景变，统一改为 0s 颜色）*/
html.lowend-gfx .el-input__wrapper.is-focus,
html.lowend-gfx .el-input__wrapper:hover,
html.lowend-gfx .el-select__wrapper:hover,
html.lowend-gfx .el-cascader__wrapper:hover,
html.lowend-gfx .el-textarea__inner:hover {
  box-shadow: none !important;
}
html.lowend-gfx .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px var(--primary) inset !important;
}

/* ---- 性能模式切换开关条（放在主题抽屉底部）---- */
.perf-mode-bar {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.06), rgba(var(--primary-rgb), 0.05));
  border: 1px dashed rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.perf-mode-bar .perf-mode-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.4;
}
.perf-mode-bar .perf-mode-label .t1 {
  font-weight: 600;
  color: #0f172a;
  font-size: 13px;
}
.perf-mode-bar .perf-mode-label .t2 {
  color: #64748b;
  font-size: 12px;
}
html.dark .perf-mode-bar {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12), rgba(var(--primary-rgb), 0.10));
  border-color: rgba(148, 163, 184, 0.22);
}
html.dark .perf-mode-bar .perf-mode-label .t1 { color: #e6eaf3; }
html.dark .perf-mode-bar .perf-mode-label .t2 { color: #94a3b8; }
.perf-mode-bar--locked {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.10), rgba(245, 158, 11, 0.04)) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}
.perf-mode-bar--locked .perf-mode-label .t1::after {
  content: " 🔒";
  font-size: 12px;
}
.perf-mode-bar--locked .perf-mode-label .t2 { color: #b45309 !important; }
html.dark .perf-mode-bar--locked .perf-mode-label .t2 { color: #fbbf24 !important; }
html.dark .tbl-tag.reviewer   { background: #4a3c16; color: #f6c46a; }
html.dark .tbl-tag.admin      { background: #4a1e25; color: #ff8b95; }

/* 积分排行 */
html.dark .lb-rank { background: #2a3142; color: #b8c3d6; }
html.dark .lb-rank.top1 { background: #6b4f1b; color: #ffe29a; }
html.dark .lb-rank.top2 { background: #363f52; color: #cfe0f7; }
html.dark .lb-rank.top3 { background: #5a3720; color: #ffcfa8; }
html.dark .lb-name { color: #e6eaf3; }
html.dark .lb-wp { color: #8a99b3; }
html.dark .lb-points-num { color: #fff; }
html.dark .lb-empty { color: #8a99b3; }

/* 班组/分类/商品卡片 */
html.dark .wp-card-stopped { background: #141d2f; opacity: 0.88; }
html.dark .wp-stopped { background: #243044; color: #8a99b3; }
html.dark .pc-card:hover {
  border-color: rgba(var(--primary-rgb), 0.45);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
html.dark .pc-icon-wrap { background: rgba(var(--primary-rgb), 0.14); }
html.dark .pc-count-active { background: rgba(var(--primary-rgb), 0.18); color: #fff; }
html.dark .pc-count-empty { background: #243044; color: #8a99b3; }

/* 设置/上传/小部件 */
html.dark .settings-upload-placeholder {
  background: #141d2f;
  border-color: #3a4b6b;
  color: #8a99b3;
}
html.dark .settings-upload-placeholder:hover {
  border-color: var(--primary);
  color: var(--primary);
}
html.dark .settings-upload-preview {
  background: #141d2f;
  border-color: #3a4b6b;
}
html.dark .pr-thumb-wrap {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), #1a2333);
  border-color: #232f45;
}
html.dark .sys-warning {
  background: #3d3418;
  border-color: #725a23;
}
html.dark .sys-warning .warn-txt { color: #ffd88a; }
html.dark .sys-warning .warn-label {
  background: #a07417;
  color: #fff6de;
}

/* 主色渐变类硬编码修复 */
html.dark .cat-points-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
html.dark .pc-card-glow {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
html.dark .pc-card-glow::after {
  background: var(--primary);
}
html.dark .points-cost-badge {
  background: linear-gradient(135deg, #4a3c16, #463a16);
  color: #f6c46a;
  border-color: #725a23;
}

/* 分页/搜索/上传组件统一 */
html.dark .el-input__inner,
html.dark .el-textarea__inner {
  color: #e6eaf3;
}
html.dark .el-textarea__inner::-webkit-scrollbar-thumb {
  background: #3a4b6b;
  border-radius: 3px;
}
html.dark .el-pager li {
  background: #243044;
  color: #b8c3d6;
  border: 1px solid #232f45;
}
html.dark .el-pager li.is-active {
  color: #fff !important;
  border-color: var(--primary);
}
html.dark .el-pagination button:disabled {
  background: #243044;
  color: #4d596f;
}
html.dark .el-pagination .btn-prev,
html.dark .el-pagination .btn-next {
  background: #243044;
  color: #b8c3d6;
  border: 1px solid #232f45;
}

/* tab 等 */
html.dark .el-tabs__item  { color: #8a99b3; }
html.dark .el-tabs__item.is-active { color: var(--primary); }
html.dark .el-tabs__nav-wrap::after { background: #232f45; }

/* 抽屉/对话框关闭和小工具 */
html.dark .el-drawer__header,
html.dark .el-dialog__headerbtn .el-dialog__close,
html.dark .el-drawer__header .el-drawer__close-btn {
  color: #b8c3d6;
}

/* 登录页主题色 - 已在全局改由变量驱动；此处做深色兜底 */
html.dark .login-wrap .login-panel input,
html.dark .login-wrap .login-panel .el-form-item__label,
html.dark .login-wrap .login-panel .panel-title,
html.dark .login-wrap .login-panel .panel-subtitle {
  color: #e6eaf3;
}

/* 深色 + 主题色联动：保证 stat-card 装饰渐变用主题色 */
html.dark .stat-card::before {
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.18), transparent 70%);
}

/* =========================================================
   ======== 性能模式 V4（最终兜底，写在文件末尾确保赢）======
   =========================================================
   解决之前 V2 规则（0.12s/0.08s）覆盖 V3 大锤的 CSS 层叠顺序问题：
   本块必须最后加载，且对全局 * 下 transition / animation 一刀切 0ms。
   白名单：仅 el-loading-spinner / el-icon-loading（提交反馈）保留旋转动画。
   ========================================================= */

/* A1. 全局 * 一刀切 0ms */
html.lowend-gfx,
html.lowend-gfx *,
html.lowend-gfx *::before,
html.lowend-gfx *::after {
  transition-duration: 0ms !important;
  transition-delay: 0ms !important;
  transition-property: none !important;
  animation-duration: 0ms !important;
  animation-delay: 0ms !important;
  animation-iteration-count: 1 !important;
  animation-timing-function: step-end !important;
  scroll-behavior: auto !important;
  transform: none !important;
}
/* A2. 白名单：loading 转圈允许保留 */
html.lowend-gfx .el-loading-spinner .circular,
html.lowend-gfx .el-loading-spinner .path,
html.lowend-gfx .el-icon-loading {
  transition-duration: 1s !important;
  animation-duration: 1s !important;
  animation-iteration-count: infinite !important;
}

/* B. 所有 Element Plus 内部过渡 enter/leave 瞬间到终态 */
html.lowend-gfx .el-drawer-fade-enter-active, html.lowend-gfx .el-drawer-fade-leave-active,
html.lowend-gfx .dialog-fade-enter-active, html.lowend-gfx .dialog-fade-leave-active,
html.lowend-gfx .el-message-fade-enter-active, html.lowend-gfx .el-message-fade-leave-active,
html.lowend-gfx .el-notification-fade-enter-active, html.lowend-gfx .el-notification-fade-leave-active,
html.lowend-gfx .el-message-box-fade-enter-active, html.lowend-gfx .el-message-box-fade-leave-active,
html.lowend-gfx .fade-enter-active, html.lowend-gfx .fade-leave-active,
html.lowend-gfx .fade-transform-enter-active, html.lowend-gfx .fade-transform-leave-active,
html.lowend-gfx .el-fade-in-linear-enter-active, html.lowend-gfx .el-fade-in-linear-leave-active,
html.lowend-gfx .el-collapse-transition,
html.lowend-gfx .el-drawer, html.lowend-gfx .el-dialog, html.lowend-gfx .el-message,
html.lowend-gfx .el-notification, html.lowend-gfx .el-message-box,
html.lowend-gfx .notify-root .notify-popover, html.lowend-gfx .el-menu--popup,
html.lowend-gfx .el-popper, html.lowend-gfx body > .el-popper {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

/* C. 弹出遮罩 v-modal：不淡入，直接 0.5 透明度不抖动 */
html.lowend-gfx .v-modal {
  transition: none !important;
  opacity: 0.5 !important;
}

/* D. 路由切换 / 抽屉滑入 / 对话框 scale：直接切，不做位移 */
html.lowend-gfx .el-drawer-fade-enter-from, html.lowend-gfx .el-drawer-fade-leave-to,
html.lowend-gfx .dialog-fade-enter-from, html.lowend-gfx .dialog-fade-leave-to,
html.lowend-gfx .v-modal-enter-from, html.lowend-gfx .v-modal-leave-to,
html.lowend-gfx .notify-pop-enter-from, html.lowend-gfx .notify-pop-leave-to,
html.lowend-gfx .fade-transform-enter-from, html.lowend-gfx .fade-transform-leave-to {
  transform: none !important;
  opacity: 0 !important;
}
html.lowend-gfx .el-drawer-fade-enter-to, html.lowend-gfx .el-drawer-fade-leave-from,
html.lowend-gfx .dialog-fade-enter-to, html.lowend-gfx .dialog-fade-leave-from {
  transform: none !important;
  opacity: 1 !important;
}

/* E. hover / active / focus：全部不做 transform、不触发 box-shadow 大面积重绘 */
html.lowend-gfx *:hover, html.lowend-gfx *:active, html.lowend-gfx *:focus-visible {
  transform: none !important;
  transition: none !important;
  box-shadow: none !important;
}
/* 允许 el-button 保留外框 primary 色（用 inset box-shadow，不画外扩大面积） */
html.lowend-gfx .el-button {
  box-shadow: none !important;
}
html.lowend-gfx .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px var(--primary) inset !important;
}

/* =========================================================
   分类页：卡片 / 列表 视图切换控件 + 列表样式
   ========================================================= */

/* page-header 右侧按钮统一行内排布 + 对齐 */
.page-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* ---- 视图切换二段式 ---- */
.view-toggle {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  height: 36px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  user-select: none;
}
.view-toggle .vt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 86px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}
.view-toggle .vt-btn + .vt-btn {
  border-left: 1px solid var(--border-color, #e2e8f0);
}
.view-toggle .vt-btn:hover {
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.06);
  color: var(--primary, #6366f1);
}
.view-toggle .vt-btn.is-active {
  background: var(--primary, #6366f1);
  color: #ffffff;
}
.view-toggle .vt-btn svg {
  display: block;
  flex: 0 0 auto;
  opacity: 0.9;
}
html.dark .view-toggle {
  background: #1a2333;
  border-color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
html.dark .view-toggle .vt-btn + .vt-btn {
  border-left-color: #334155;
}
html.dark .view-toggle .vt-btn {
  color: #cbd5e1;
}
html.dark .view-toggle .vt-btn:hover {
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.18);
}

/* ---- 资讯分类的小分类 pill：列表视图缩小 ---- */
.news-cat-pill--sm {
  font-size: 12px !important;
  padding: 2px 10px !important;
  border-radius: 6px !important;
  height: 24px !important;
  line-height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  font-weight: 600 !important;
}

/* ---- 紧凑列表容器 nc-list ---- */
.nc-list {
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
}
.nc-list-head, .nc-row {
  display: flex;
  align-items: center;
}
.nc-list-head {
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.06);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.2px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.nc-row {
  padding: 12px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  transition: background-color 0.12s ease;
  gap: 0;
}
.nc-row:hover {
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.035);
}
.nc-row + .nc-row {
  border-top: 1px solid var(--border-color, #e2e8f0);
}
.nc-empty-row {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  padding: 40px 0;
}

/* 列宽度分配：资讯分类 5 列（无图标） */
.nc-col--name { flex: 0 0 30%; min-width: 180px; }
.nc-col--count { flex: 0 0 14%; min-width: 110px; }
.nc-col--status { flex: 0 0 12%; min-width: 90px; }
.nc-col--sort { flex: 0 0 12%; min-width: 90px; }
.nc-col--actions { flex: 1 1 auto; min-width: 280px; }

/* 视频 / 商品分类 6 列（含图标 + 描述）*/
.nc-col--icon { flex: 0 0 8%; min-width: 72px; }
.nc-col--icon + .nc-col--name { flex: 0 0 22%; min-width: 150px; }
.nc-col--desc { flex: 1 1 auto; min-width: 160px; }

/* 单元格内元素 */
.nc-cell-name {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
.nc-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}
.nc-cell-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-50, #eef2ff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  overflow: hidden;
}
.nc-cell-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nc-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 26px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 24px;
}
.nc-count-pill.is-active {
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.12);
  color: var(--primary, #6366f1);
}
.nc-count-pill.is-empty {
  background: #f1f5f9;
  color: #94a3b8;
}
.nc-desc-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding-right: 8px;
}
.nc-sort {
  font-size: 13px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.nc-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
/* =========================================================
   操作按钮 op-btn 规范（与用户截图的"编辑/下架/删除"实色块完全对齐）
   - 统一：无下划线 / 无图标 / 实色填充 / 白色加粗文字 / 圆角6 / 高度28
   - 色彩变体：edit(绿) / warn(橙=下架/禁用/停工) / danger(红=删除) / success(绿=启用/恢复)
   ========================================================= */
.op-btn,
.op-btn.el-button,
.op-btn.is-link,
.op-btn.is-text,
.op-btn.el-button--text,
.nc-actions .el-button.op-btn,
.pc-actions .el-button.op-btn,
.cat-actions .el-button.op-btn,
.wp-card-footer .el-button.op-btn,
.pc-card-footer .el-button.op-btn,
.cat-card-footer .el-button.op-btn {
  /* 重置 Element Plus 原生 link 样式（删除下划线/透明背景）*/
  background-image: none !important;
  background-color: transparent;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
  outline: none !important;

  /* 统一尺寸与排版 */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  height: 28px !important;
  min-width: 56px !important;
  padding: 0 14px !important;
  margin: 0 !important;

  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 26px !important;
  letter-spacing: 0 !important;
  color: #ffffff !important;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  transition: filter 0.1s ease, opacity 0.1s ease;
  flex: 0 0 auto;
}
/* 去掉所有子元素（图标/图标 span/svg/i），只保留文字 */
.op-btn .el-icon,
.op-btn > svg,
.op-btn > i,
.op-btn [class*="icon"],
.op-btn [class^="icon"] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
}
.op-btn:hover,
.op-btn.el-button:hover {
  filter: brightness(1.05);
  opacity: 0.94;
  color: #fff !important;
}
.op-btn:active,
.op-btn.el-button:active {
  filter: brightness(0.97);
  color: #fff !important;
  opacity: 1;
}
.op-btn:disabled,
.op-btn.is-disabled {
  filter: grayscale(0.5);
  opacity: 0.55;
  cursor: not-allowed;
}

/* 色彩变体（与截图匹配：编辑绿 / 下架橙 / 删除红） */
.op-btn--edit, .op-btn--success {
  background-color: #10b981 !important; /* emerald-500 截图 编辑 绿 */
}
.op-btn--warn {
  background-color: #f59e0b !important; /* amber-500 截图 下架/禁用 橙 */
}
.op-btn--danger {
  background-color: #ef4444 !important; /* red-500 截图 删除 红 */
}

/* hover/active 变体微调（避免 Element Plus 原生 link 的 underline 动画冒出来） */
.op-btn--edit:hover, .op-btn--success:hover { background-color: #059669 !important; }
.op-btn--warn:hover { background-color: #d97706 !important; }
.op-btn--danger:hover { background-color: #dc2626 !important; }

/* 按钮组容器统一样式（8px 间距/不换行）— 替代各自 footer 的 gap */
.nc-actions,
.pc-actions,
.cat-actions,
.wp-card-footer,
.pc-card-footer .pc-actions,
.cat-card-footer .cat-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}
/* 取消 wp-card-footer / pc-card-footer 原来的 padding-top + border-top，让按钮组顶对齐更紧凑 */
.wp-card-footer,
.pc-card-footer,
.cat-card-footer {
  padding-top: 10px !important;
  border-top: 1px solid var(--border-light, #e5e7eb) !important;
  margin-top: 0 !important;
}
/* wp-card-footer .el-button 原先 + margin-left:8px；在 gap 统一之后消除 */
.wp-card-footer .el-button + .el-button,
.pc-card-footer .el-button + .el-button,
.cat-card-footer .el-button + .el-button {
  margin-left: 0 !important;
}

/* ---- 移除之前的 nc-actions 按钮尺寸补丁（改由 .op-btn 统一处理） ---- */
.nc-actions .el-button [class*="el-icon"],
.nc-actions .el-button svg {
  display: none !important;
}

html.lowend-gfx .op-btn {
  transition: none !important;
}

/* 深色模式适配 */
html.dark .nc-list-head {
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.12);
  border-bottom-color: #334155;
  color: #cbd5e1;
}
html.dark .nc-row {
  background: #1a2333;
  border-bottom-color: #334155;
}
html.dark .nc-row:hover {
  background: #232f47;
}
html.dark .nc-empty-row {
  background: #1a2333;
  border-bottom-color: #334155;
}
html.dark .nc-name { color: #e6eaf3; }
html.dark .nc-count-pill.is-empty {
  background: #243044;
  color: #94a3b8;
}
html.dark .nc-cell-icon {
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.18);
}
html.dark .nc-desc-text { color: #94a3b8; }
html.dark .nc-sort { color: #94a3b8; }

/* ---- 小屏（<900px）nc-list 简化：隐藏描述列 ---- */
@media (max-width: 900px) {
  .nc-col--desc { display: none; }
  .nc-col--status { flex: 0 0 16%; }
  .nc-col--actions { min-width: 200px; }
}
