/* ============================================================
   洁净型风机箱选型系统 V2.3 - 完整样式
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #F0F2F5;
  color: #1F2937;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.hidden { display: none !important; }

:root {
  --primary: #0066B3;
  --primary-dark: #004B86;
  --primary-light: #3D8AC9;
  --primary-bg: #E8F1F9;
  --accent: #F39C12;
  --success: #27AE60;
  --danger: #E74C3C;
  --warning: #F1C40F;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --radius: 6px;
  --radius-lg: 10px;
}

/* ============================================================
   登录页
   ============================================================ */
.login-page {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #004B86 0%, #0066B3 50%, #3D8AC9 100%);
  overflow: hidden;
  z-index: 1000;
}
.login-bg { position: absolute; inset: 0; overflow: hidden; }
.login-shape {
  position: absolute; border-radius: 50%; opacity: 0.1;
  background: #fff;
  animation: float 20s ease-in-out infinite;
}
.login-shape.s1 { width: 400px; height: 400px; top: -100px; left: -100px; }
.login-shape.s2 { width: 300px; height: 300px; bottom: -80px; right: -50px; animation-delay: -7s; }
.login-shape.s3 { width: 200px; height: 200px; top: 40%; right: 20%; animation-delay: -14s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(50px, -50px) rotate(120deg); }
  66% { transform: translate(-30px, 30px) rotate(240deg); }
}

.login-card {
  position: relative; z-index: 1;
  background: #fff;
  width: 420px; max-width: 90%;
  padding: 36px 40px 28px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 28px; font-weight: 800;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 6px 16px rgba(0,102,179,0.3);
}
.login-title {
  text-align: center; font-size: 18px; font-weight: 700;
  color: var(--primary-dark); margin-bottom: 4px;
}
.login-subtitle {
  text-align: center; font-size: 10px; color: var(--gray-400);
  letter-spacing: 1.5px; margin-bottom: 24px;
}
.login-form .form-row { margin-bottom: 14px; }
.login-form label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--gray-700); margin-bottom: 6px;
}
.login-form input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px; font-size: 14px;
  transition: all 0.15s;
}
.login-form input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,179,0.1);
}
.login-error {
  color: var(--danger); font-size: 12px; min-height: 18px; margin: 6px 0;
}
.btn-login {
  width: 100%; padding: 12px; margin-top: 8px;
  font-size: 15px; border-radius: 8px;
}
.login-tips {
  margin-top: 22px; padding: 12px;
  background: var(--gray-50); border-radius: 8px;
  font-size: 11px; color: var(--gray-500);
}
.tip-title { font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.tip-row { line-height: 1.8; }
.tip-row code {
  background: #fff; padding: 1px 6px; border-radius: 3px;
  font-family: "Consolas", monospace; color: var(--primary-dark);
  border: 1px solid var(--gray-200);
}
.login-footer {
  text-align: center; font-size: 11px; color: var(--gray-400);
  margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--gray-100);
}

/* ============================================================
   顶部品牌栏
   ============================================================ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff; padding: 0 32px; height: 72px;
  box-shadow: var(--shadow); flex-shrink: 0;
  border-bottom: 3px solid var(--accent);
}
.brand-left { display: flex; align-items: center; gap: 14px; min-width: 280px; }
.brand-logo {
  width: 48px; height: 48px;
  background: #fff; color: var(--primary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; letter-spacing: -1px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.brand-cn { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.brand-en { font-size: 10px; opacity: 0.85; margin-top: 2px; }
.brand-center { text-align: center; flex: 1; }
.product-cn { font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.product-en { font-size: 11px; opacity: 0.85; letter-spacing: 1.5px; margin-top: 4px; }
.brand-right { text-align: right; min-width: 240px; }
.version {
  font-size: 12px; background: rgba(255,255,255,0.18);
  padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 4px;
}
.user-info {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  font-size: 13px;
}
.role-badge {
  padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.role-badge.admin { background: #E74C3C; color: #fff; }
.role-badge.sales { background: var(--accent); color: #fff; }
.role-badge.viewer { background: var(--success); color: #fff; }
.user-name { font-weight: 600; }
.btn-mini {
  background: rgba(255,255,255,0.2); color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 3px 10px; border-radius: 4px; font-size: 12px;
  cursor: pointer; font-family: inherit;
}
.btn-mini:hover { background: rgba(255,255,255,0.3); }

/* ============================================================
   布局
   ============================================================ */
.layout { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 220px; background: #fff;
  border-right: 1px solid var(--gray-200);
  padding: 16px 0; flex-shrink: 0; overflow-y: auto;
}
.nav-section {
  padding: 12px 20px 6px;
  font-size: 11px; font-weight: 600; color: var(--gray-400);
  letter-spacing: 1.5px;
}
.nav-section.admin-only { color: var(--danger); }
.nav-item {
  display: flex; align-items: center; padding: 10px 20px;
  color: var(--gray-700); text-decoration: none; font-size: 14px;
  cursor: pointer; border-left: 3px solid transparent;
  transition: all 0.15s; user-select: none;
}
.nav-item:hover { background: var(--gray-50); color: var(--primary); }
.nav-item.active {
  background: var(--primary-bg); color: var(--primary);
  border-left-color: var(--primary); font-weight: 600;
}
.nav-item .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; background: var(--gray-100);
  border-radius: 50%; font-size: 11px; font-weight: 700;
  margin-right: 10px; color: var(--gray-500);
}
.nav-item.active .ico { background: var(--primary); color: #fff; }
.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  font-weight: 600; min-width: 18px; text-align: center;
}

.content { flex: 1; padding: 24px 28px; overflow-y: auto; background: var(--gray-50); }
.panel { display: none; animation: fadeIn 0.25s ease; }
.panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.panel-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--gray-200); }
.panel-header h2 { font-size: 22px; color: var(--primary-dark); margin-bottom: 6px; }
.panel-header p { color: var(--gray-500); font-size: 13px; }
.sub-title { font-size: 16px; color: var(--primary-dark); margin: 24px 0 12px; padding-left: 10px; border-left: 4px solid var(--primary); }

.card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.card-title {
  font-size: 15px; font-weight: 600; color: var(--primary-dark);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--gray-200);
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: ""; display: inline-block;
  width: 4px; height: 16px; background: var(--primary); border-radius: 2px;
}

/* ============================================================
   快速选型
   ============================================================ */
.quick-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.form-row { margin-bottom: 18px; }
.form-row > label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group input { flex: 1; padding: 9px 50px 9px 12px; border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-size: 14px; }
.input-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,179,0.1); }
.input-group .unit { position: absolute; right: 12px; font-size: 12px; color: var(--gray-400); pointer-events: none; }
.hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.hint-inline { font-size: 11px; color: var(--gray-400); font-weight: normal; }
.input-full, .select-full {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius); font-size: 14px; background: #fff; font-family: inherit;
}
.input-full:focus, .select-full:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,179,0.1); }
textarea.input-full { resize: vertical; min-height: 60px; }

.clean-grid, .config-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.clean-opt, .config-opt {
  cursor: pointer; padding: 10px 6px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius); text-align: center; background: #fff; transition: all 0.15s;
}
.clean-opt .co-name, .config-opt .cg-title { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.clean-opt .co-desc, .config-opt .cg-desc { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.clean-opt:hover, .config-opt:hover { border-color: var(--primary); }
.clean-opt.active, .config-opt.active { border-color: var(--primary); background: var(--primary-bg); }
.clean-opt.active .co-name, .config-opt.active .cg-title { color: var(--primary-dark); }

.install-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.install-opt {
  cursor: pointer; padding: 9px 6px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius); text-align: center; background: #fff;
  font-size: 13px; font-weight: 600; color: var(--gray-700); transition: all 0.15s;
}
.install-opt:hover { border-color: var(--primary); }
.install-opt.active { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-dark); }

.action-row { display: flex; gap: 10px; margin-top: 8px; }
.btn {
  padding: 11px 18px; border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; box-shadow: 0 2px 6px rgba(0,102,179,0.25); flex: 1;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,102,179,0.35); }
.btn-ghost { background: #fff; color: var(--gray-700); border: 1.5px solid var(--gray-300); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.result-box { min-height: 480px; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 400px; color: var(--gray-400); }
.empty-icon { font-size: 64px; margin-bottom: 12px; opacity: 0.4; }
.result-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; padding: 16px 20px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: -20px -20px 16px;
}
.rh-title { font-size: 11px; opacity: 0.9; letter-spacing: 1.5px; }
.rh-model { font-size: 24px; font-weight: 700; letter-spacing: 1px; margin: 4px 0; }
.rh-code { font-size: 13px; background: rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 4px; display: inline-block; font-family: "Consolas", monospace; }
.rh-tag { display: inline-block; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-left: 8px; font-weight: 600; }
.perf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.perf-card { background: var(--gray-50); padding: 12px; border-radius: var(--radius); border-left: 3px solid var(--primary); }
.perf-label { font-size: 11px; color: var(--gray-500); }
.perf-value { font-size: 18px; font-weight: 700; color: var(--primary-dark); margin-top: 2px; }
.perf-unit { font-size: 11px; color: var(--gray-400); margin-left: 2px; }
.dim-section { background: var(--gray-50); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.dim-section h4 { font-size: 13px; color: var(--primary-dark); margin-bottom: 10px; }
.dim-table { width: 100%; font-size: 12px; }
.dim-table td { padding: 4px 0; }
.dim-table td:first-child { color: var(--gray-500); width: 130px; }
.dim-table td:last-child { color: var(--gray-800); font-weight: 600; font-family: "Consolas", monospace; text-align: right; }
.action-bar { display: flex; gap: 8px; margin-top: 14px; }
.action-bar .btn { flex: 1; padding: 9px 12px; font-size: 13px; }

/* ============================================================
   性能表 + 表格通用
   ============================================================ */
.filter-bar {
  background: #fff; padding: 12px 16px; border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); display: flex; align-items: center;
  flex-wrap: wrap; gap: 18px; margin-bottom: 14px;
}
.filter-group { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-600); }
.filter-group select, .filter-group input {
  padding: 6px 10px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius); font-size: 13px; background: #fff; min-width: 140px; font-family: inherit;
}
.table-wrap {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); overflow: auto; max-height: 75vh;
}
.perf-table, .cart-table, .lookup-table, .user-table, .audit-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.perf-table th, .perf-table td,
.cart-table th, .cart-table td,
.lookup-table th, .lookup-table td,
.user-table th, .user-table td,
.audit-table th, .audit-table td {
  padding: 8px 10px; border: 1px solid var(--gray-200);
  text-align: center; white-space: nowrap;
}
.perf-table thead th, .cart-table thead th, .lookup-table thead th,
.user-table thead th, .audit-table thead th {
  background: var(--primary); color: #fff; font-weight: 600;
  position: sticky; top: 0; z-index: 1; font-size: 12px;
}
tbody tr:nth-child(even) { background: var(--gray-50); }
tbody tr:hover { background: var(--primary-bg); }
.perf-table .col-model { position: sticky; left: 0; background: var(--primary-light); color: #fff; font-weight: 600; z-index: 2; }
.perf-table .col-q { background: var(--primary-bg); font-weight: 600; }
.perf-table .col-p { background: #fff8e6; font-weight: 700; color: #d35400; }
.perf-table .cell-kw { color: var(--primary-dark); font-weight: 600; }
.perf-table .cell-noise { color: var(--success); }
.perf-table .cell-speed { color: var(--accent); }
.perf-table .cell-eff { color: #8e44ad; }
.perf-table .cell-na { color: var(--gray-300); }
.table-legend {
  display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 16px; font-size: 12px;
  color: var(--gray-500); background: #fff; border: 1px solid var(--gray-200);
  border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-blue { background: var(--primary); }
.dot-green { background: var(--success); }
.dot-orange { background: var(--accent); }
.dot-purple { background: #8e44ad; }

.tag-ok { display: inline-block; background: var(--success); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.tag-warn { display: inline-block; background: var(--warning); color: var(--gray-900); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.tag-info { display: inline-block; background: var(--primary); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }

/* ============================================================
   命名生成器
   ============================================================ */
.naming-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.seg-group { display: flex; flex-wrap: wrap; gap: 6px; }
.seg {
  padding: 7px 14px; border: 1.5px solid var(--gray-300); background: #fff;
  border-radius: var(--radius); font-size: 13px; color: var(--gray-600);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.seg:hover { border-color: var(--primary); }
.seg.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.naming-result {
  background: linear-gradient(135deg, #1e3a5f 0%, #0066B3 100%);
  color: #fff; padding: 24px; border-radius: var(--radius);
  text-align: center; margin-bottom: 16px;
}
.naming-code {
  font-size: 24px; font-weight: 700;
  font-family: "Consolas", "Courier New", monospace;
  letter-spacing: 1px; word-break: break-all;
}
.naming-breakdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; font-size: 12px; }
.nb-piece { background: rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 4px; display: flex; align-items: center; gap: 4px; }
.nb-code { font-weight: 700; color: #ffd54f; }
.nb-name { opacity: 0.85; }
.naming-rules {
  font-size: 12px; color: var(--gray-500); background: var(--gray-50);
  padding: 12px; border-radius: var(--radius); max-height: 240px; overflow-y: auto;
}
.naming-rules table { width: 100%; }
.naming-rules td { padding: 3px 6px; }
.naming-rules td:first-child { color: var(--primary); font-weight: 600; font-family: "Consolas", monospace; }
.naming-rules td:nth-child(2) { color: var(--gray-700); }

/* ============================================================
   项目管理
   ============================================================ */
.project-toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.project-toolbar .btn { flex: 0 0 auto; padding: 9px 16px; }
.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.project-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 18px; transition: all 0.15s; cursor: pointer;
}
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary); }
.pc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.pc-name { font-size: 15px; font-weight: 700; color: var(--primary-dark); }
.pc-status {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: var(--success); color: #fff; font-weight: 600; text-transform: uppercase;
}
.pc-status.archived { background: var(--gray-400); }
.pc-info { font-size: 12px; color: var(--gray-600); line-height: 1.8; }
.pc-info .lbl { color: var(--gray-400); margin-right: 6px; min-width: 50px; display: inline-block; }
.pc-stats { display: flex; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--gray-200); }
.pc-stat { font-size: 11px; color: var(--gray-500); }
.pc-stat strong { color: var(--primary); font-size: 14px; display: block; }
.pc-actions { display: flex; gap: 6px; margin-top: 12px; }
.pc-actions .btn { flex: 1; padding: 6px 10px; font-size: 12px; }
.project-empty {
  text-align: center; padding: 60px 20px; color: var(--gray-400);
  background: #fff; border: 1px dashed var(--gray-300); border-radius: var(--radius-lg);
}

/* ============================================================
   选型清单
   ============================================================ */
.cart-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.cart-toolbar .btn { flex: 0 0 auto; padding: 8px 16px; font-size: 13px; }
.cart-table input[type="text"] {
  border: none; background: transparent; font-size: 12px; width: 100%;
  text-align: center; font-family: inherit; color: var(--gray-700);
}
.cart-table input[type="text"]:focus { outline: 1px dashed var(--primary); background: #fff; }
.btn-del { background: transparent; border: none; color: var(--danger); cursor: pointer; font-size: 14px; padding: 2px 6px; }
.btn-del:hover { background: var(--danger); color: #fff; border-radius: 4px; }

/* ============================================================
   过滤器选配
   ============================================================ */
.filter-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.filter-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 16px; text-align: center; transition: all 0.15s;
}
.filter-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.fc-icon {
  width: 50px; height: 50px; background: var(--primary-bg); color: var(--primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; margin: 0 auto 10px;
}
.fc-name { font-size: 14px; font-weight: 600; color: var(--primary-dark); }
.fc-eff { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.fc-use { font-size: 12px; color: var(--gray-600); margin-top: 6px; line-height: 1.5; }
.filter-table-wrap, .maintenance-tip {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
}
.maintenance-tip ul { padding-left: 22px; font-size: 13px; color: var(--gray-600); line-height: 2; }

/* ============================================================
   安装与维护
   ============================================================ */
.install-grid-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.install-list { padding-left: 22px; font-size: 13px; color: var(--gray-700); line-height: 1.9; }
.install-list li { margin-bottom: 4px; }
.fault-block { margin-bottom: 14px; padding: 10px; background: var(--gray-50); border-radius: var(--radius); border-left: 3px solid var(--accent); }
.fault-block:last-child { margin-bottom: 0; }
.fault-title { font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-bottom: 6px; }
.fault-block ul { padding-left: 18px; font-size: 12px; color: var(--gray-600); }
.fault-block li { margin-bottom: 2px; }

/* ============================================================
   型号对比
   ============================================================ */
.compare-picker {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.compare-picker .picker-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-right: 4px; }
.compare-picker .model-chip {
  padding: 5px 12px; border: 1.5px solid var(--gray-300);
  border-radius: 16px; font-size: 12px; color: var(--gray-600);
  background: #fff; cursor: pointer; user-select: none; transition: all 0.15s;
}
.compare-picker .model-chip:hover { border-color: var(--primary); }
.compare-picker .model-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.compare-table { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.compare-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th, .compare-table td { padding: 10px 14px; border: 1px solid var(--gray-200); text-align: center; }
.compare-table thead th { background: var(--primary); color: #fff; font-weight: 600; }
.compare-table tbody th { background: var(--gray-50); text-align: left; font-weight: 600; color: var(--gray-700); width: 130px; }
.compare-table .best { background: #e8f5e9 !important; color: var(--success); font-weight: 700; }

/* ============================================================
   用户管理 + 审计日志
   ============================================================ */
.user-toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.user-toolbar .btn { flex: 0 0 auto; padding: 9px 16px; }
.user-table .role-admin { color: #E74C3C; font-weight: 700; }
.user-table .role-sales { color: var(--accent); font-weight: 700; }
.user-table .role-viewer { color: var(--success); font-weight: 700; }
.user-table .active-yes { color: var(--success); }
.user-table .active-no { color: var(--danger); }
.audit-table .audit-login { color: var(--success); }
.audit-table .audit-create { color: var(--primary); }
.audit-table .audit-update { color: var(--accent); }
.audit-table .audit-delete { color: var(--danger); }
.audit-table code {
  background: var(--gray-100); padding: 1px 6px; border-radius: 3px;
  font-family: "Consolas", monospace; font-size: 11px;
}

/* ============================================================
   关于产品
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-grid .card p { font-size: 13px; color: var(--gray-600); line-height: 1.8; margin-bottom: 10px; }
.motto { color: var(--primary); font-weight: 600; font-style: italic; padding: 8px 12px; background: var(--primary-bg); border-radius: var(--radius); border-left: 3px solid var(--primary); }
.contact-list { list-style: none; font-size: 13px; color: var(--gray-700); line-height: 2.2; }
.contact-list .lbl { color: var(--gray-400); margin-right: 6px; font-weight: 600; min-width: 56px; display: inline-block; }

/* ============================================================
   模态框
   ============================================================ */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 2000; animation: fadeIn 0.2s;
}
.modal.active { display: flex; }
.modal-card {
  background: #fff; border-radius: var(--radius-lg);
  width: 480px; max-width: 90%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
  padding: 16px 20px; font-size: 16px; font-weight: 600;
  color: var(--primary-dark); border-bottom: 1px solid var(--gray-200);
}
.modal-body { padding: 20px; }
.modal-body .form-row { margin-bottom: 14px; }
.modal-body label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%; padding: 8px 10px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius); font-size: 13px; font-family: inherit;
}
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,179,0.1);
}
.modal-footer {
  padding: 12px 20px; border-top: 1px solid var(--gray-200);
  display: flex; gap: 8px; justify-content: flex-end;
}
.modal-footer .btn { flex: 0 0 auto; padding: 8px 18px; }

/* ============================================================
   通用提示
   ============================================================ */
.toast {
  position: fixed; top: 90px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 10px 20px;
  border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999; font-size: 14px; animation: slideDown 0.3s;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideDown { from { opacity: 0; transform: translate(-50%, -20px); } to { opacity: 1; transform: translate(-50%, 0); } }

.footer {
  background: var(--gray-800); color: var(--gray-400);
  text-align: center; padding: 14px; font-size: 12px;
  border-top: 3px solid var(--primary); flex-shrink: 0;
}
.footer div { margin: 2px 0; }

/* ============================================================
   V2.1 新增：常用工况预设 / 选型约束
   ============================================================ */
.preset-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--gray-200);
}
.preset-label { font-size: 12px; font-weight: 600; color: var(--gray-500); margin-right: 2px; }
.preset-chip {
  padding: 5px 12px; border: 1.5px solid var(--gray-300); border-radius: 16px;
  background: #fff; font-size: 12px; color: var(--gray-600); cursor: pointer;
  font-family: inherit; transition: all 0.15s; white-space: nowrap;
}
.preset-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.preset-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

.constraint-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.constraint-item { display: flex; flex-direction: column; gap: 4px; }
.constraint-item .ci-label { font-size: 12px; font-weight: 600; color: var(--gray-500); }
.input-group.input-sm input { padding: 7px 42px 7px 10px; font-size: 13px; }
.input-group.input-sm .unit { font-size: 11px; right: 10px; }
.opt-tag {
  display: inline-block; font-size: 10px; font-weight: 600; color: var(--gray-500);
  background: var(--gray-100); border-radius: 8px; padding: 1px 7px;
  margin-left: 4px; vertical-align: middle;
}

/* ============================================================
   V2.1 新增：结果头部 + 评分徽章
   ============================================================ */
.result-card { min-width: 0; position: relative; }
.rh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rh-model { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rh-model .rh-tag { margin-left: 0; }
.rh-score { text-align: right; flex-shrink: 0; line-height: 1.1; }
.rh-score span { display: block; font-size: 11px; opacity: 0.85; letter-spacing: 1px; }
.rh-score b { font-size: 26px; font-weight: 700; }
.rh-code { cursor: pointer; }
.rh-code::after { content: " ⧉"; opacity: 0.6; font-size: 11px; }
.rh-code:hover { background: rgba(255,255,255,0.32); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; vertical-align: middle;
}
.badge-ok { background: var(--success); color: #fff; }
.badge-warn { background: var(--danger); color: #fff; }

/* ============================================================
   V2.1 新增：选型校核面板
   ============================================================ */
.check-panel {
  background: var(--gray-50); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px; border-left: 3px solid var(--primary);
}
.check-title {
  font-size: 12px; font-weight: 700; color: var(--primary-dark);
  letter-spacing: 0.5px; margin-bottom: 6px;
}
.check-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 12px; border-bottom: 1px dashed var(--gray-200);
}
.check-item:last-child { border-bottom: none; }
.check-item .ci-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--gray-400);
}
.check-item.ok .ci-dot { background: var(--success); box-shadow: 0 0 0 3px rgba(39,174,96,0.15); }
.check-item.warn .ci-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(231,76,60,0.15); }
.check-item .ci-t { font-weight: 600; color: var(--gray-700); min-width: 76px; flex-shrink: 0; }
.check-item .ci-d { color: var(--gray-500); }
.check-item.warn .ci-d { color: var(--danger); font-weight: 600; }

/* ============================================================
   V2.1 新增：备选方案
   ============================================================ */
.alt-plans { margin: 14px 0; }
.alt-title {
  font-size: 12px; font-weight: 700; color: var(--primary-dark);
  letter-spacing: 0.5px; margin-bottom: 8px;
}
.alt-item {
  border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px; background: #fff;
  cursor: pointer; transition: all 0.15s;
}
.alt-item:hover { border-color: var(--primary); background: var(--primary-bg); }
.alt-item.active { border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 2px rgba(0,102,179,0.12); }
.alt-tier {
  display: inline-block; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--primary); padding: 1px 8px; border-radius: 10px; margin-bottom: 6px;
}
.alt-model { font-size: 15px; font-weight: 700; color: var(--primary-dark); }
.alt-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.alt-metrics span {
  font-size: 11px; color: var(--gray-600); background: var(--gray-100);
  padding: 2px 8px; border-radius: 4px; font-family: "Consolas", monospace;
}
.alt-meta { font-size: 11px; color: var(--gray-500); }
.alt-warn { font-size: 11px; color: var(--danger); margin-top: 4px; font-weight: 600; }

/* ============================================================
   V2.1 新增：选型说明 + 数据基准
   ============================================================ */
.sugg-box {
  background: #FFFBF0; border: 1px solid #F5E1B0; border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px;
}
.sugg-title { font-size: 12px; font-weight: 700; color: #B7791F; margin-bottom: 6px; letter-spacing: 0.5px; }
.sugg-box ul { padding-left: 18px; font-size: 12px; color: var(--gray-700); line-height: 1.9; }
.sugg-box ul li { margin-bottom: 2px; }

.basis-box {
  background: var(--gray-50); border: 1px dashed var(--gray-300);
  border-radius: var(--radius); padding: 10px 12px; margin-bottom: 4px;
  font-size: 11px; color: var(--gray-500); line-height: 1.75;
}
.basis-t {
  display: inline-block; font-weight: 700; color: var(--gray-600);
  margin-right: 8px;
}

/* ============================================================
   V2.1 新增：选型失败态
   ============================================================ */
.result-error {
  background: #FDF3F2; border: 1px solid #F5C6C0;
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.re-head { font-size: 15px; font-weight: 700; color: var(--danger); margin-bottom: 10px; }
.re-list { padding-left: 20px; font-size: 13px; color: var(--gray-700); line-height: 1.9; }
.re-list li { margin-bottom: 2px; }
.re-sugg { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #F5C6C0; }
.re-sugg-t { font-size: 12px; font-weight: 700; color: #B7791F; margin-bottom: 6px; }
.re-range {
  margin-top: 12px; font-size: 12px; color: var(--primary-dark);
  background: var(--primary-bg); padding: 8px 12px; border-radius: var(--radius);
}
.re-input { margin-top: 8px; font-size: 12px; color: var(--gray-500); }

/* ============================================================
   V2.1 新增：强调按钮 + 小号取值 + 品牌栏
   ============================================================ */
.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #D68910 100%);
  color: #fff; box-shadow: 0 2px 6px rgba(243,156,18,0.25);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(243,156,18,0.35); }
.perf-value.sm { font-size: 14px; }
.brand-text { display: flex; flex-direction: column; justify-content: center; }
.compare-result { min-height: 340px; }

@media (max-width: 1100px) {
  .quick-grid, .naming-grid, .install-grid-layout, .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .nav-item { padding: 10px 14px; font-size: 0; }
  .nav-item .ico { margin-right: 0; }
  .nav-section { font-size: 0; padding: 8px; }
  .topbar { padding: 0 12px; height: 60px; }
  .brand-en, .product-en { display: none; }
  .perf-grid { grid-template-columns: repeat(2, 1fr); }
  .constraint-grid { grid-template-columns: 1fr; }
  .preset-row { flex-wrap: wrap; }
}

/* ============================================================
   成本核算模块 V2.3
   ============================================================ */

/* ── 模块概览条 ── */
.cost-overview { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.cost-overview:empty { display: none; }
.ov-item { background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 6px 12px; font-size: 12px; color: var(--gray-700); }
.ov-item b { color: var(--primary); font-weight: 700; margin-left: 4px; }

/* ── 内部子标签 ── */
.cost-subtab { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 14px;
  border-bottom: 2px solid var(--gray-200); }
.cost-subtab button { background: none; border: none; padding: 10px 18px; font-size: 13px; font-weight: 600;
  color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  font-family: inherit; transition: color .15s, border-color .15s; }
.cost-subtab button:hover { color: var(--primary); }
.cost-subtab button.active { color: var(--primary); border-bottom-color: var(--primary); }
.cost-subpanel { display: none; }
.cost-subpanel.active { display: block; }

/* ── 估价布局 ── */
.cost-grid { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 16px; align-items: start; }

/* ── 单选式分段控件 ── */
.seg-radio { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 13px;
  cursor: pointer; margin: 0 8px 6px 0; background: #fff; user-select: none; }
.seg-radio input { margin: 0; cursor: pointer; }
.seg-radio:has(input:checked) { border-color: var(--primary); background: var(--primary-bg);
  color: var(--primary-dark); font-weight: 600; }

/* ── 选配项 ── */
.addon-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.addon-chip { display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 12px;
  cursor: pointer; background: #fff; user-select: none; transition: all .15s; }
.addon-chip:hover { border-color: var(--primary-light); }
.addon-chip:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); }
.addon-chip input { margin: 0; cursor: pointer; }
.ac-price { color: var(--gray-500); font-size: 11px; }

/* ── 结果 hero ── */
.ce-hero { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 14px; }
.ce-hero-label { font-size: 12px; opacity: .85; letter-spacing: .5px; }
.ce-hero-value { font-size: 34px; font-weight: 800; letter-spacing: -.5px; line-height: 1.25; }
.ce-hero-sub { font-size: 12px; opacity: .82; margin-top: 6px; line-height: 1.6; }
.ce-hero-right { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ce-hero-item { text-align: right; }
.ce-hero-item span { display: block; font-size: 11px; opacity: .8; margin-bottom: 2px; }
.ce-hero-item b { font-size: 17px; font-weight: 700; }
.ce-hero-item b.hi { color: #FFD966; font-size: 20px; }

/* ── 选型结果行（工况直通模式）── */
.ce-sel-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--primary-bg); border-radius: var(--radius); font-size: 12.5px;
  margin-bottom: 14px; color: var(--gray-700); }
.ce-sel-tag { background: var(--primary); color: #fff; font-size: 11px; padding: 2px 9px;
  border-radius: 10px; font-weight: 600; }
.ce-sel-tier { margin-left: auto; color: var(--primary-dark); font-weight: 600; }

/* ── 成本构成条 ── */
.ce-bar-wrap { margin-bottom: 14px; }
.ce-bar { display: flex; height: 26px; border-radius: var(--radius); overflow: hidden;
  background: var(--gray-200); }
.cseg { display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden;
  transition: opacity .15s; }
.cseg:hover { opacity: .85; }
.ce-bar-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px;
  font-size: 11.5px; color: var(--gray-600); }
.ce-bar-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.ce-bar-legend .lg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ── 关键指标格 ── */
.ce-kv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.ce-kv { background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 8px 10px; }
.ce-kv span { display: block; font-size: 11px; color: var(--gray-500); margin-bottom: 2px; }
.ce-kv b { font-size: 13.5px; color: var(--gray-800); font-variant-numeric: tabular-nums; }

/* ── 提示条 ── */
.ce-fx { background: var(--primary-bg); border-left: 3px solid var(--primary); padding: 9px 13px;
  border-radius: var(--radius); font-size: 13px; margin-bottom: 12px; color: var(--gray-700); }
.ce-fx b { color: var(--primary-dark); }
.ce-warn { background: #FEF9E7; border-left: 3px solid var(--warning); padding: 9px 13px;
  border-radius: var(--radius); font-size: 12.5px; color: #7D6608; line-height: 1.75;
  margin-bottom: 12px; }

/* ── 明细表 ── */
.ce-table-title { font-size: 13px; font-weight: 700; color: var(--gray-700);
  margin: 16px 0 8px; display: flex; justify-content: space-between;
  align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ce-tip { font-size: 11.5px; font-weight: 400; color: var(--gray-500); }
.ce-table-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--gray-200);
  border-radius: var(--radius); }
.ce-table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: #fff; }
.ce-table thead th { position: sticky; top: 0; z-index: 1; background: var(--gray-100);
  color: var(--gray-700); font-weight: 600; text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--gray-300); white-space: nowrap; }
.ce-table td { padding: 7px 10px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.ce-table tbody tr:last-child td { border-bottom: none; }
.ce-table tbody tr:hover { background: var(--gray-50); }
.td-grp { color: var(--gray-500); font-size: 11.5px; white-space: nowrap; }
.td-name { font-weight: 500; color: var(--gray-800); }
.td-num, .td-amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-amt { font-weight: 600; color: var(--gray-800); }
.td-amt.hi { color: var(--primary-dark); }
.td-formula { color: var(--gray-500); font-size: 11.5px; max-width: 340px; line-height: 1.5; }
.td-code { font-family: Consolas, Monaco, monospace; font-size: 11.5px; color: var(--gray-600);
  white-space: nowrap; }
.td-unit { color: var(--gray-500); font-size: 11.5px; white-space: nowrap; }
.td-note { color: var(--gray-500); font-size: 11.5px; }
.td-act, .td-rm { white-space: nowrap; }
.td-act .btn-mini { margin-right: 4px; }
.td-empty { text-align: center; color: var(--gray-500); padding: 20px; }
.td-err { color: var(--danger); font-size: 12px; }
.row-warn { background: #FEF9E7 !important; }
.row-new { background: #EAF7EF !important; }
.gdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.ce-footer-note { font-size: 11.5px; color: var(--gray-500); line-height: 1.75;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--gray-200); }

/* ── 批量汇总 ── */
.ce-batch-sum { display: flex; flex-wrap: wrap; gap: 22px; padding: 12px 16px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius); margin-bottom: 12px; font-size: 13px; color: var(--gray-600); }
.ce-batch-sum b { font-size: 16px; margin-left: 4px; color: var(--gray-800); }
.ce-batch-sum .ok { color: var(--success); }
.ce-batch-sum .bad { color: var(--danger); }
.ce-batch-sum .hi { color: var(--primary); }

/* ── 估价单详情 ── */
.ce-quote-detail { margin-top: 14px; }
.ce-quote-detail-inner { border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 14px; background: #fff; }
.ce-quote-detail-inner .ce-table-title { margin-top: 0; }

/* ── 参数维护 ── */
.cp-group { margin-bottom: 20px; }
.cp-group-title { font-size: 13px; font-weight: 700; color: var(--gray-700);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; gap: 8px; }
.cp-count { font-size: 11px; font-weight: 400; color: var(--gray-400); }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.cp-item { background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 9px 11px; }
.cp-label { display: block; font-size: 12px; color: var(--gray-700); margin-bottom: 5px; font-weight: 500; }
.cp-input { display: flex; align-items: center; gap: 6px; }
.cp-val { flex: 1; min-width: 0; border: 1px solid var(--gray-300); border-radius: 4px;
  padding: 6px 8px; font-size: 13px; font-family: inherit; text-align: right;
  font-variant-numeric: tabular-nums; background: #fff; color: var(--gray-800); }
.cp-val:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.cp-val.dirty { border-color: var(--accent); background: #FFF8E7; }
.cp-unit { font-size: 11px; color: var(--gray-500); white-space: nowrap; min-width: 30px; }
.cp-remark { font-size: 11px; color: var(--gray-500); margin-top: 5px; line-height: 1.55; }
.cp-cell { width: 100%; min-width: 62px; border: 1px solid var(--gray-300); border-radius: 4px;
  padding: 4px 6px; font-size: 12px; font-family: inherit; text-align: right;
  font-variant-numeric: tabular-nums; background: #fff; color: var(--gray-800);
  box-sizing: border-box; }
.cp-cell:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.cp-cell.dirty { border-color: var(--accent); background: #FFF8E7; }
.ce-table-edit td input.cp-cell { max-width: 120px; }
.ce-table-edit .td-note { min-width: 130px; }

.badge-ok { color: var(--success); font-weight: 600; font-size: 11.5px; }
.badge-warn { color: var(--gray-400); font-size: 11.5px; }
.btn-mini.danger { color: var(--danger); border-color: #F5B7B1; }
.btn-mini.danger:hover { background: #FDEDEC; }

@keyframes cpPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, .55); }
  50%      { box-shadow: 0 0 0 7px rgba(243, 156, 18, 0); }
}
.btn.pulse { animation: cpPulse 1.4s ease-in-out infinite; }

@media (max-width: 1400px) {
  .ce-kv-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1200px) {
  .cost-grid { grid-template-columns: 1fr; }
  .ce-kv-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .ce-kv-grid { grid-template-columns: repeat(2, 1fr); }
  .cp-grid { grid-template-columns: 1fr; }
  .ce-hero-right { gap: 14px; }
  .ce-hero-item { text-align: left; }
  .cost-subtab button { padding: 9px 12px; font-size: 12px; }
}

/* ============================================================
   V2.4 生产成本标准化
   ============================================================ */
.std-intro { margin: 0 0 14px; line-height: 1.8; font-size: 12.5px; color: var(--gray-500); }
.std-toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 12px; }
.std-toolbar .filter-group select { min-width: 118px; }
.std-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.std-actions .hint { flex: 1 1 240px; }

.std-chips { display: flex; gap: 6px; }
.std-chip {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius);
  padding: 5px 10px; font-size: 12.5px; color: var(--gray-600); background: #fff;
  user-select: none; transition: all .15s ease;
}
.std-chip:hover { border-color: var(--primary); color: var(--primary); }
.std-chip.on { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-dark); font-weight: 600; }
.std-chip input { margin: 0; }

#stMotors, #cpBomResult { min-height: 0; }
.std-motor-grid { min-width: 1180px; }

.std-cat-badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px;
  border-radius: 9px; background: var(--gray-100); color: var(--gray-600); white-space: nowrap;
}
.std-cat-shell    { background: #E3F0FA; color: #0066B3; }
.std-cat-motor    { background: #FDF0DF; color: #B9770E; }
.std-cat-core     { background: #E7F6EE; color: #1E8449; }
.std-cat-filter   { background: #EFE6F8; color: #6C3483; }
.std-cat-fastener { background: #ECEFF1; color: #566573; }
.std-cat-custom   { background: #FDEBD0; color: #A04000; }
.std-cat-other    { background: #E8EAF6; color: #34495E; }

.std-detail-wrap { margin-top: 14px; border: 1px solid var(--gray-200); border-radius: var(--radius);
  background: #fff; padding: 14px; }
.std-detail-head { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.std-detail-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.std-motor-card { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px; background: var(--primary-bg); border: 1px solid #CFE2F3;
  border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.std-motor-card .mc-item { font-size: 12px; color: var(--gray-600); }
.std-motor-card .mc-item b { display: block; font-size: 13.5px; color: var(--gray-800); font-weight: 700; }
.std-motor-card .mc-item b.hi { color: var(--primary-dark); }

.std-sub { font-weight: 400; font-size: 11.5px; color: var(--gray-400); margin-left: 6px; }
.std-cell-edit { width: 100%; border: 1px solid transparent; background: transparent;
  font-size: 12px; font-family: inherit; color: var(--gray-700); padding: 2px 4px; text-align: center; }
.std-cell-edit:hover { border-color: var(--gray-300); }
.std-cell-edit:focus { outline: none; border-color: var(--primary); background: #fff; }
.std-cell-edit.dirty { background: #FFF8E1; border-color: #F39C12; }

@media (max-width: 1200px) {
  .std-toolbar { gap: 10px 14px; }
  .std-motor-card { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ============================================================
   数据加载状态条（避免数据未就绪时「点了没反应」）
   ============================================================ */
.data-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 16px; font-size: 12.5px;
  border-bottom: 1px solid transparent;
}
.data-banner.loading {
  background: var(--primary-bg); color: var(--primary-dark);
  border-bottom-color: #CFE2F3;
}
.data-banner.error {
  background: #FDECEA; color: #B03A2E;
  border-bottom-color: #F5B7B1;
}
.data-banner.hidden { display: none; }
.data-banner .db-spin {
  width: 12px; height: 12px; flex: 0 0 12px;
  border: 2px solid rgba(0,102,179,0.25); border-top-color: var(--primary);
  border-radius: 50%; animation: dbspin 0.8s linear infinite;
}
@keyframes dbspin { to { transform: rotate(360deg); } }
.data-banner .db-btn {
  margin-left: auto; padding: 3px 12px; font-size: 12px; font-family: inherit;
  border: 1px solid #B03A2E; background: #fff; color: #B03A2E;
  border-radius: 4px; cursor: pointer; font-weight: 600;
}
.data-banner .db-btn:hover { background: #B03A2E; color: #fff; }

/* ============================================================
   V2.5 标准成本单：金额可直接编辑 + 导入导出
   ============================================================ */
.std-edit-tip {
  margin: 0 0 8px;
  padding: 8px 12px;
  background: #F4F9FD;
  border: 1px solid #CFE2F3;
  border-left: 4px solid #004B86;
  border-radius: 3px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #33475B;
}
.std-edit-tip b { color: #004B86; }
.std-ov-count {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid #F0D9A8;
  background: #FFF7E6;
  color: #9C4700;
  border-radius: 3px;
  font-weight: 600;
}

/* 表头：可编辑列加下划虚线提示 */
th.th-edit { color: #9C4700; }

/* 金额输入格：外观等同表格单元，聚焦时才显边框 */
.st-cell { padding: 2px 4px !important; }
.st-inp {
  width: 100%;
  min-width: 64px;
  padding: 3px 5px;
  font-family: inherit;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #1F2D3D;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  outline: none;
  cursor: text;
}
.st-inp:hover { border-color: #BFD4E8; background: #F8FBFE; }
.st-inp:focus {
  border-color: #004B86;
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(0, 75, 134, 0.14);
}
.st-inp.is-ov {
  background: #FFF7E6;
  border-color: #F0D9A8;
  color: #9C4700;
  font-weight: 700;
}
.st-inp.is-ov:focus { background: #FFFDF7; border-color: #9C4700; }

/* 计算列（不可编辑）加浅底以示区别 */
.st-sum { background: #F7F9FC; font-weight: 600; }

/* 价差涨跌（中国市场习惯：涨红跌绿） */
.std-up { color: #C0392B; font-weight: 600; }
.std-down { color: #1E7B34; font-weight: 600; }

/* 明细页：覆盖标记与人工调整行 */
.std-ov-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid #F0D9A8;
  background: #FFF7E6;
  color: #9C4700;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 600;
}
.std-ov-note {
  margin-top: 10px;
  padding: 7px 12px;
  background: #FFF7E6;
  border: 1px solid #F0D9A8;
  border-left: 4px solid #9C4700;
  border-radius: 3px;
  font-size: 12.5px;
  color: #7A4A00;
}
tr.std-adj-row td { background: #FFFCF2 !important; color: #9C4700; }

/* 电机清单卡片标题行：左标题右按钮 */
.std-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.std-card-actions { display: inline-flex; gap: 6px; flex-shrink: 0; }
.btn-sm { padding: 4px 11px !important; font-size: 12px !important; }
