:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ---------- 按钮 ---------- */
.btn {
  border: none; border-radius: var(--radius); cursor: pointer;
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  transition: background .15s, opacity .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: #cbd5e1; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover:not(:disabled) { background: #15803d; }

/* 投标工作流：阶段时间轴 */
.section-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 10px; }
.ms-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ms-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; }
.ms-item.done { background: #f0fdf4; border-color: #bbf7d0; }
.ms-item.done .ms-check { text-decoration: line-through; color: var(--text-muted); }
.ms-check { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ms-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.ms-owner { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.ms-add { display: flex; gap: 8px; margin-top: 10px; }
.ms-add input { flex: 1; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: rgba(0,0,0,.05); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

/* ---------- 登录页 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 20px;
}
.auth-card {
  background: var(--card); border-radius: 16px; padding: 36px;
  width: 100%; max-width: 400px; box-shadow: 0 20px 40px rgba(0,0,0,.15);
}
.auth-title { font-size: 20px; text-align: center; margin-bottom: 24px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.tab {
  flex: 1; padding: 8px; border: none; background: transparent; cursor: pointer;
  font-size: 14px; color: var(--text-muted); border-bottom: 2px solid transparent;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-muted); }
.auth-form input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; color: var(--text);
}
.auth-form input:focus { outline: none; border-color: var(--primary); }
.auth-hint { font-size: 12px; color: var(--text-muted); text-align: center; }
.error-msg { margin-top: 16px; padding: 10px; background: #fef2f2; color: var(--danger);
  border-radius: var(--radius); font-size: 13px; text-align: center; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px; position: sticky; top: 0; z-index: 10;
}
.logo { font-size: 16px; font-weight: 700; }
.logo-img { height: 36px; width: auto; display: block; }
.topbar-nav { display: flex; gap: 4px; }
.nav-btn {
  border: none; background: transparent; cursor: pointer; padding: 8px 16px;
  font-size: 14px; color: var(--text-muted); border-radius: var(--radius);
}
.nav-btn.active { background: #eff6ff; color: var(--primary); font-weight: 600; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 132px; padding: 4px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  display: none; flex-direction: column; gap: 2px; z-index: 30;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu .nav-btn { width: 100%; text-align: left; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-chip {
  font-size: 13px; color: var(--text-muted); background: var(--bg);
  padding: 4px 12px; border-radius: 20px;
}

/* ---------- 内容区 ---------- */
.content { max-width: 1200px; margin: 0 auto; padding: 24px; }
.view-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.view-header h2 { font-size: 20px; }
.detail-actions { display: flex; gap: 8px; }
.empty { text-align: center; color: var(--text-muted); padding: 60px 0; }

/* ---------- 项目卡片 ---------- */
.project-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.project-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s;
  border: 1px solid var(--border);
}
.project-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.project-card h3 { font-size: 16px; margin-bottom: 8px; }
.project-card .desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); transition: width .3s; }
.project-meta-row { display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 12px; color: var(--text-muted); }

/* ---------- 状态徽章 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-planning { background: #f1f5f9; color: #475569; }
.badge-active { background: #dbeafe; color: #1e40af; }
.badge-paused { background: #fef3c7; color: #92400e; }
.badge-done { background: #dcfce7; color: #166534; }
.badge-todo { background: #f1f5f9; color: #475569; }
.badge-doing { background: #dbeafe; color: #1e40af; }
.badge-blocked { background: #fee2e2; color: #991b1b; }
.badge-low { background: #f1f5f9; color: #64748b; }
.badge-medium { background: #fef3c7; color: #92400e; }
.badge-high { background: #fee2e2; color: #991b1b; }
.badge-admin { background: #fce7f3; color: #9d174d; }
.badge-editor { background: #dbeafe; color: #1e40af; }
.badge-viewer { background: #f1f5f9; color: #475569; }

/* ---------- 项目详情 ---------- */
.project-meta {
  background: var(--card); border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 20px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.project-meta .row { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; margin-bottom: 12px; }
.project-meta .row > div { display: flex; gap: 6px; align-items: center; }
.project-meta .label { color: var(--text-muted); }

/* ---------- 事件看板 ---------- */
.event-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.event-col { background: #eef1f5; border-radius: var(--radius); padding: 12px; min-height: 200px; }
.event-col-header { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center; }
.event-col-header .count { background: rgba(0,0,0,.08); border-radius: 10px; padding: 0 8px; font-size: 12px; }
.event-card {
  background: var(--card); border-radius: 8px; padding: 12px; margin-bottom: 10px;
  box-shadow: var(--shadow); cursor: pointer; border-left: 3px solid var(--border);
}
.event-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.event-card.p-high { border-left-color: var(--danger); }
.event-card.p-medium { border-left-color: var(--warning); }
.event-card.p-low { border-left-color: var(--text-muted); }
.event-card .title { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.event-card .footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); }
.mini-progress { height: 4px; background: var(--border); border-radius: 2px; margin: 8px 0; overflow: hidden; }
.mini-progress .fill { height: 100%; background: var(--success); }

/* ---------- 表格 ---------- */
.table-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
/* 列宽拖动手柄定位基准（素材/价格/投标/关键词/负责人/用户等通用表格）；标题居中 */
.data-table thead th { position: relative; text-align: center; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.data-table th { background: #f8fafc; color: var(--text-muted); font-weight: 600; font-size: 13px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }

/* ---------- 模态框 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--card); border-radius: 14px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,.2);
}
.modal-header { display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 17px; }
.modal-close { border: none; background: transparent; font-size: 24px; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-body { padding: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; font-family: inherit; color: var(--text);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }
/* 左右分栏：左侧危险操作，右侧取消/保存 */
.modal-actions-split { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.modal-actions-right { display: flex; gap: 8px; margin-left: auto; }
.form-hint { font-size: 12px; color: var(--text-muted); margin: -8px 0 14px; line-height: 1.5; }
.form-hint.warn { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 8px 10px; }
.form-sep { border: none; border-top: 1px dashed var(--border); margin: 18px 0 6px; }

/* ===== 招标文件与素材面板 ===== */
.bid-files-panel { margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fafbfc; padding: 16px; }
.project-bid-files { margin: 20px 0 8px; }
.project-bid-files .bid-files-panel { margin-top: 0; }
.bf-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.bf-sub { font-weight: 400; font-size: 12px; color: var(--text-muted); margin-left: 6px; }
.bf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.bf-kind { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; transition: border-color .15s, background .15s, box-shadow .15s; }
/* 拖拽文件悬停到分类卡片上的高亮 */
.bf-kind.bf-dragover {
  border: 1px dashed #22c55e;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}
.bf-kind-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bf-kind-name { font-size: 13px; font-weight: 600; color: var(--text); }
.bf-kind-name.required::after { content: " *"; color: #dc2626; }
.bf-upload { font-size: 12px; color: var(--primary); cursor: pointer; padding: 2px 8px; border: 1px solid var(--primary); border-radius: 12px; white-space: nowrap; }
.bf-upload:hover { background: var(--primary); color: #fff; }
.bf-hint { font-size: 11px; color: var(--text-muted); margin: 5px 0 7px; line-height: 1.45; }
.bf-list { list-style: none; margin: 0; padding: 0; }
.bf-item { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 0; border-top: 1px dashed #eef0f3; }
.bf-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bf-size { color: var(--text-muted); font-size: 11px; flex: 0 0 auto; }
.bf-del { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.bf-del:hover { color: #dc2626; }
.bf-empty { font-size: 12px; color: #9ca3af; padding: 3px 0; }
.bf-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.bf-note { font-size: 12px; color: var(--text-muted); }
.form-tip { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.ck-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px 10px; max-height: 168px; overflow: auto;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px;
}
/* 提高特异性（> .form-group label 的 display:block），确保复选项真正以 flex 行内对齐，
   避免长地区名折行到复选框下方导致「名称与选择框没对齐」 */
.form-group .ck-item { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; line-height: 1.4; }
.form-group .ck-item input { flex: 0 0 auto; margin: 0; accent-color: var(--primary); cursor: pointer; }
.ck-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- 招标信息列表分页器 ---------- */
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.pager-info { font-size: 13px; color: var(--d-muted); margin-right: 4px; }
.pager-btn {
  min-width: 34px; padding: 6px 10px; font-size: 13px; cursor: pointer;
  background: rgba(56, 189, 248, .08); border: 1px solid var(--d-border);
  color: var(--d-text); border-radius: 8px; transition: all .15s;
}
.pager-btn:hover:not(:disabled) { background: rgba(56, 189, 248, .18); color: var(--d-cyan); }
.pager-btn.active { background: var(--d-cyan); color: #051019; border-color: var(--d-cyan); font-weight: 600; }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-ellipsis { color: var(--d-muted); padding: 0 2px; }

/* ---------- 结果流程步骤条 ---------- */
.stage-flow {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.stage-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.stage-flow-head h3 { font-size: 15px; }
.stage-steps { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.stage-node {
  flex: 1; min-width: 120px; display: flex; flex-direction: column; align-items: center;
  position: relative; padding: 10px 8px; border: 1px solid var(--border); border-radius: 10px;
  background: #f8fafc; margin-right: 18px;
}
.stage-node:last-child { margin-right: 0; }
.stage-node::after {
  content: ""; position: absolute; right: -18px; top: 50%; width: 18px; height: 2px;
  background: var(--border);
}
.stage-node:last-child::after { display: none; }
.stage-node.s-doing { border-color: var(--primary); background: #eff6ff; }
.stage-node.s-done { border-color: var(--success); background: #f0fdf4; }
.stage-node.s-skipped { opacity: .55; }
.stage-node .s-name { font-size: 13px; font-weight: 600; margin-bottom: 6px; text-align: center; }
.stage-node .s-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.stage-node .s-btn { font-size: 11px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; cursor: pointer; color: var(--text-muted); }
.stage-node .s-btn:hover { border-color: var(--primary); color: var(--primary); }
.stage-node .s-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.stage-node .s-note { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-align: center; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 评论 ---------- */
.comment-list { margin-top: 8px; }
.comment-item { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.comment-item:last-child { border-bottom: none; }
.comment-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form input { flex: 1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 12px 24px; border-radius: var(--radius);
  font-size: 14px; z-index: 200; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* ---------- 权限可见性 ---------- */
body.role-viewer .editor-only,
body.role-viewer .admin-only,
body.role-editor .admin-only { display: none !important; }

@media (max-width: 768px) {
  .event-board { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; }
  .content { padding: 16px; }
}

/* ---------- 招标情报模块 ----------
 * 招标页复用了 dashboard.css 的深色科技风 .dash 面板，
 * 因此控件使用 .dash 作用域内的 --d-* 变量，保持视觉一致。
 */
.run-info {
  padding: 12px 14px;
  border: 1px solid var(--d-border, var(--border));
  border-radius: 10px;
  background: var(--d-panel, var(--card));
  font-size: 13px;
  color: var(--d-muted, var(--text-muted));
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-sel,
.filter-input {
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
}

.filter-input { min-width: 160px; }

/* dash 内的表格跟随深色主题 */
.dash .table-wrap {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--d-border);
  border-radius: 12px;
}
.dash .data-table th {
  background: rgba(56, 189, 248, .08);
  color: var(--d-cyan);
  border-bottom: 1px solid var(--d-border);
}
.dash .data-table td {
  color: var(--d-text);
  border-bottom: 1px solid var(--d-border);
}
.dash .data-table tr:hover td { background: rgba(56, 189, 248, .05); }
.dash .data-table a { color: var(--d-text); text-decoration: none; }
.dash .data-table a:hover { color: var(--d-cyan); text-decoration: underline; }
.dash .empty { color: var(--d-muted); }

/* ---------- 招标情报表格：列宽可拖拉 ---------- */
#record-table-wrap { overflow-x: auto; }
#record-table { table-layout: fixed; }
#record-table th { position: relative; }
#record-table td { overflow: hidden; }
#record-table td:first-child a {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col-resize-handle {
  position: absolute; top: 0; right: 0; height: 100%; width: 8px;
  cursor: col-resize; user-select: none; z-index: 2;
}
.col-resize-handle::after {
  content: ""; position: absolute; top: 20%; right: 3px; height: 60%; width: 2px;
  background: var(--d-border); border-radius: 1px; transition: background .15s;
}
.col-resize-handle:hover::after { background: var(--d-cyan); }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }

/* ---------- 表头点击排序（招标列表 / 项目看板共用） ---------- */
.sort-ind {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  font-size: 11px; line-height: 1; opacity: .55; pointer-events: none;
}
th.th-sort { cursor: pointer; user-select: none; white-space: nowrap; padding-right: 28px; }
/* 招标列表（深色面板） */
#record-table th.th-sort { transition: color .15s, background .15s; }
#record-table th.th-sort:hover { color: #fff; background: rgba(56, 189, 248, .16); }
#record-table th.th-sort.sort-active { color: #fff; }
#record-table .sort-ind { color: var(--d-muted); }
#record-table th.th-sort.sort-active .sort-ind { color: var(--d-cyan); opacity: 1; }
/* 项目看板列表（浅色表格） */
table.project-list-table th.th-sort { transition: color .15s, background .15s; }
table.project-list-table th.th-sort:hover { color: var(--text); background: #eef2f7; }
table.project-list-table th.th-sort.sort-active { color: #0284c7; }
table.project-list-table .sort-ind { color: #94a3b8; }
table.project-list-table th.th-sort.sort-active .sort-ind { color: #0284c7; opacity: 1; }

@media (max-width: 768px) {
  .run-info { flex-direction: column; align-items: flex-start; }
  .filter-input { min-width: 120px; }
}

/* —— 标书制作：替换映射行 —— */
.repl-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.repl-row .filter-input { flex: 1; min-width: 0; }
.repl-row .mk-key { flex: 0 0 110px; }
.repl-row .mk-del { flex: 0 0 auto; padding: 4px 10px; line-height: 1; }

/* —— 标书制作：生成记录 —— */
.doc-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--card-border, #e5e7eb); border-radius: 8px; margin-bottom: 6px; background: var(--card, #fff); }
.doc-item .doc-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-item .doc-meta { color: var(--text-muted); font-size: 12px; flex: 0 0 auto; }

/* —— 一键导入项目 —— */
.import-panel { max-width: 860px; margin: 18px 0; padding: 20px 22px; background: var(--card, #fff); border: 1px solid var(--card-border, #e5e7eb); border-radius: 12px; }
.import-desc { color: var(--text-muted); line-height: 1.7; margin: 0 0 16px; }
.import-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.import-filename { color: var(--text-muted); font-size: 13px; }
.import-result { margin-top: 18px; }
.import-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.import-detail { margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: #f7f8fa; border: 1px solid #eef0f3; }
.import-detail-title { font-weight: 600; margin-bottom: 6px; }
.import-detail ul { margin: 0; padding-left: 18px; }
.import-detail li { font-size: 13px; line-height: 1.6; color: #475467; }
.import-detail.import-errors { background: #fff1f0; border-color: #ffccc7; }
.import-detail.import-errors .import-detail-title { color: #cf1322; }
.import-detail.import-ok { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; font-weight: 600; }

/* 项目进度看板：视图切换 + 列表视图 + 分页 */
.view-header-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.view-toggle button { border: none; background: var(--surface); color: var(--text-muted); padding: 6px 16px; cursor: pointer; font-size: 13px; transition: background .15s, color .15s; }
.view-toggle button.active { background: var(--primary); color: #fff; }
.project-list-wrap { margin-top: 16px; overflow-x: auto; }
table.project-list-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
table.project-list-table th, table.project-list-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.project-list-table thead th { background: var(--bg); color: var(--text-muted); font-weight: 600; }
table.project-list-table tbody tr { cursor: pointer; transition: background .12s; }
table.project-list-table tbody tr:hover { background: var(--bg); }
table.project-list-table td.p-name { white-space: normal; max-width: 300px; font-weight: 600; color: var(--text); }
/* 多选列 */
table.project-list-table th.col-sel, table.project-list-table td.col-sel { width: 38px; text-align: center; padding-left: 8px; padding-right: 8px; }
table.project-list-table th.col-sel input, table.project-list-table td.col-sel input { width: 16px; height: 16px; cursor: pointer; vertical-align: middle; }
.mini-bar { display: inline-block; height: 6px; width: 70px; background: var(--border); border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.mini-bar > i { display: block; height: 100%; background: var(--primary); }

/* 项目看板批量操作工具栏 */
.batch-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px; font-size: 13px;
}
.batch-count { font-weight: 600; color: var(--text); }
.batch-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px; cursor: pointer; }
.batch-select:disabled { opacity: .5; cursor: not-allowed; }
.batch-toolbar .btn-sm { margin-left: auto; }
.batch-toolbar .btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.batch-toolbar .btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* ==================== 设备参数对比 ==================== */
.equip-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.equip-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text-muted); font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.equip-tab:hover { border-color: var(--primary); color: var(--primary); }
.equip-tab.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}
.equip-tab-icon { font-size: 15px; line-height: 1; }

.equip-dropzone {
  display: flex; align-items: center; gap: 16px;
  border: 2px dashed var(--border); border-radius: 12px;
  background: var(--card); padding: 18px 22px; margin-bottom: 14px;
  cursor: pointer; transition: all .15s;
}
.equip-dropzone:hover, .equip-dropzone.dragging {
  border-color: var(--primary); background: #eff6ff;
}
.equip-drop-icon { font-size: 26px; line-height: 1; }
.equip-drop-text { display: flex; flex-direction: column; gap: 4px; }
.equip-drop-text strong { font-size: 14px; color: var(--text); font-weight: 600; }
.equip-drop-text span { font-size: 12.5px; color: var(--text-muted); }

.equip-stat {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; color: var(--text-muted);
}
.eq-stat-item b { color: var(--text); font-size: 15px; font-weight: 700; margin-right: 2px; }
.eq-legend { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.eq-legend:last-child { margin-left: 4px; }
.eq-dot-best, .eq-dot-diff {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block;
}
.eq-dot-best { background: #bbf7d0; border: 1px solid #22c55e; }
.eq-dot-diff { background: transparent; border: 2px solid var(--primary); border-radius: 50%; }

.equip-compare { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.eq-scroll { overflow: auto; max-height: calc(100vh - 320px); }
table.eq-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.eq-table th, table.eq-table td {
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  padding: 9px 12px; vertical-align: middle;
}
table.eq-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: #f8fafc; font-weight: 600; color: var(--text);
}
.eq-th-param {
  position: sticky; left: 0; z-index: 4; min-width: 150px;
  text-align: left; background: #f1f5f9 !important; color: var(--text-muted);
  font-size: 12.5px; letter-spacing: .3px;
}
.eq-th-dev { min-width: 190px; max-width: 240px; text-align: center; border-top: 3px solid var(--primary); }
.eq-dev-head { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.eq-dev-brand { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.25; }
.eq-dev-model {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eq-dev-meta { display: flex; align-items: center; gap: 6px; justify-content: center; flex-wrap: wrap; }
.eq-doc-type {
  font-size: 11px; padding: 1px 7px; border-radius: 20px;
  background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; white-space: nowrap;
}
.eq-score { font-size: 11px; padding: 1px 7px; border-radius: 20px; white-space: nowrap; }
.eq-score-high { background: #dcfce7; color: #15803d; }
.eq-score-mid { background: #fef3c7; color: #b45309; }
.eq-score-low { background: #fee2e2; color: #b91c1c; }
.eq-dev-certs { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
.eq-cert {
  font-size: 10.5px; padding: 0 5px; border-radius: 4px;
  background: #f1f5f9; color: var(--text-muted); border: 1px solid var(--border);
}
.eq-dev-ops { display: flex; gap: 4px; justify-content: center; margin-top: 3px; }
.eq-op {
  border: 1px solid var(--border); background: var(--card); color: var(--text-muted);
  font-size: 11.5px; padding: 2px 7px; border-radius: 6px; cursor: pointer; line-height: 1.6;
}
.eq-op:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.eq-op-danger:hover { border-color: var(--danger); color: var(--danger); background: #fef2f2; }

.eq-group-row td {
  background: #f8fafc; font-size: 12px; font-weight: 700; color: var(--primary);
  letter-spacing: .5px; padding: 6px 12px !important;
}
.eq-param { text-align: left; color: var(--text); min-width: 150px; }
.eq-unit { font-size: 11px; color: var(--text-muted); margin-left: 4px; font-weight: 400; }
.eq-better {
  display: inline-block; font-size: 10px; color: var(--text-muted);
  margin-left: 6px; padding: 0 4px; border: 1px solid var(--border); border-radius: 4px;
  font-weight: 400; vertical-align: middle;
}
.eq-val { text-align: center; color: var(--text); }
.eq-val-unit { font-size: 11px; color: var(--text-muted); margin-left: 3px; }
.eq-val.eq-best {
  background: #dcfce7; color: #15803d; font-weight: 700;
  box-shadow: inset 0 0 0 1px #86efac;
}
.eq-val.eq-missing { color: #cbd5e1; }
.eq-differs .eq-param { font-weight: 700; }
.eq-differs .eq-param::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: middle;
}
.eq-val[data-eq-cell] { cursor: pointer; }
.eq-val[data-eq-cell]:hover { background: #eff6ff; }
.eq-val[data-eq-manual]::after {
  content: "人"; font-size: 9px; color: #7c3aed; vertical-align: super; margin-left: 2px;
}

/* 编辑参数弹窗 */
.eq-edit-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }
.eq-edit-group { margin-bottom: 16px; }
.eq-edit-group-title {
  font-size: 12.5px; font-weight: 700; color: var(--primary);
  padding: 5px 10px; background: #f1f5f9; border-radius: 6px; margin-bottom: 10px;
}
.eq-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.eq-field { margin-bottom: 0; }
.eq-field label { font-size: 12px; display: flex; align-items: center; gap: 5px; }
.eq-field-wrap { position: relative; display: flex; align-items: center; }
.eq-field-wrap input { flex: 1; padding-right: 46px; }
.eq-field-unit {
  position: absolute; right: 10px; font-size: 11.5px; color: var(--text-muted); pointer-events: none;
}
.eq-manual-tag {
  font-size: 9.5px; padding: 0 4px; border-radius: 3px;
  background: #ede9fe; color: #6d28d9; font-weight: 500;
}

/* 招标列表：可点击编辑的单元格（采购单位 / 投标时间） */
.cell-edit { cursor: pointer; }
.cell-edit:hover { background: rgba(59, 130, 246, 0.1); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35); border-radius: 4px; }
.cell-empty { color: #94a3b8; font-size: 12px; }

/* 项目看板：三维筛选条（状态 / 项目负责人 / 标书负责人） */
.proj-filter-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px; font-size: 13px;
}
.proj-filter-bar .pf-group { display: inline-flex; align-items: center; gap: 7px; }
.proj-filter-bar .pf-group > label { color: var(--text-muted); white-space: nowrap; }
.proj-filter-bar .pf-select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 13px; cursor: pointer;
  min-width: 120px; max-width: 200px;
}
.proj-filter-bar .pf-select:focus { outline: none; border-color: var(--primary); }
.proj-filter-bar .btn-sm { padding: 5px 12px; font-size: 12px; }
.proj-filter-bar .pf-summary { color: var(--primary); font-weight: 600; margin-left: auto; }

/* 项目开关：已关闭态与「当前节点」列 */
.badge-closed { background: rgba(148, 163, 184, 0.22); color: #64748b; border: 1px solid rgba(148, 163, 184, 0.45); }
.project-list-table tr.row-closed td { opacity: 0.62; }
.project-list-table tr.row-closed .p-name { text-decoration: line-through; text-decoration-color: rgba(148,163,184,.7); }
.project-list-table td.col-node { white-space: nowrap; }
.project-list-table td.col-node .node-name { margin-right: 6px; }
.project-list-table th.col-op, .project-list-table td.col-op { width: 76px; text-align: center; }
.project-list-table td.col-op .btn { padding: 3px 10px; font-size: 12px; }
.project-card.is-closed { opacity: 0.66; border-style: dashed; }
.project-card.is-closed h3 { text-decoration: line-through; text-decoration-color: rgba(148,163,184,.7); }

/* 项目列表：表头列宽拖动 */
.project-list-table thead th { position: relative; }
.th-resizer {
  position: absolute; top: 0; right: -5px; width: 11px; height: 100%;
  cursor: col-resize; user-select: none; z-index: 3;
}
/* 常驻短竖线：居中、小巧不突兀 */
.th-resizer::before {
  content: ""; position: absolute; top: 50%; right: 5px; width: 2px; height: 14px;
  transform: translateY(-50%);
  background: rgba(148, 163, 184, 0.9); border-radius: 1px;
  transition: background .12s, width .12s, height .12s;
}
.th-resizer:hover { background: rgba(59, 130, 246, 0.10); }
.th-resizer:hover::before,
body.col-resizing .th-resizer::before {
  background: #2563eb; width: 3px; height: 22px;
}
body.col-resizing { cursor: col-resize; user-select: none; }
body.col-resizing * { pointer-events: none !important; }
body.col-resizing .th-resizer { pointer-events: auto !important; }

/* 项目/标书负责人合并列 */
.project-list-table td.col-leaders { white-space: nowrap; }

/* 结果流程：环节负责人 */
.stage-node .s-owner {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin: 6px 0 2px; font-size: 12px;
}
.stage-node .s-owner-label { color: var(--text-muted); }
.stage-node .s-owner-value { font-weight: 600; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-node .s-owner-value.empty { color: #94a3b8; font-weight: 400; }

/* ---------- 产品价格库 ---------- */
.pt-count {
  background: var(--bg, #f1f5f9); border-radius: 999px; padding: 1px 8px;
  font-size: 12px; color: var(--text-muted);
}
tr.price-sep td {
  background: var(--bg, #f8fafc); font-weight: 600; font-size: 13px;
  padding: 8px 14px; border-top: 1px solid var(--border);
}
tr.price-sep .ps-cat { margin-right: 12px; color: var(--text); }
tr.price-sep .ps-meta { font-weight: 400; font-size: 12px; color: var(--text-muted); }
td.price-num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
td.price-model { font-weight: 500; }

/* 产品价格：Excel 批量导入 */
.pi-tpl-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.price-import-drop {
  display: flex; align-items: center; gap: 14px; padding: 22px 20px;
  border: 2px dashed var(--border); border-radius: 12px; background: var(--card, #fff);
  cursor: pointer; transition: all .15s; margin-bottom: 12px;
}
.price-import-drop:hover { border-color: var(--primary); }
.price-import-drop.dragover {
  border-color: #16a34a; background: rgba(22, 163, 74, .07);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}
.pid-icon { font-size: 24px; line-height: 1; }
.pid-text { font-size: 14px; color: var(--text-muted); }
.pid-text b { color: var(--primary); }
.pi-result { margin-bottom: 12px; font-size: 13px; }
.pi-loading { color: var(--text-muted); }
.pi-summary {
  background: rgba(22, 163, 74, .09); border: 1px solid rgba(22, 163, 74, .3);
  border-radius: 8px; padding: 10px 12px; color: #15803d; font-weight: 600;
}
.pi-summary .pi-meta { font-weight: 400; color: var(--text-muted); margin-left: 8px; font-size: 12px; }
.pi-errors {
  margin-top: 10px; border: 1px solid rgba(220, 38, 38, .3);
  background: rgba(220, 38, 38, .05); border-radius: 8px; padding: 10px 12px;
}
.pie-title { color: #b91c1c; font-weight: 600; margin-bottom: 6px; }
.pi-errors ul { margin: 0; padding-left: 18px; color: var(--text); }
.pi-errors li { margin: 3px 0; line-height: 1.5; }
.pie-more { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.pi-err {
  border: 1px solid rgba(220, 38, 38, .35); background: rgba(220, 38, 38, .07);
  border-radius: 8px; padding: 10px 12px; color: #b91c1c;
}

/* ---------- 标书素材库：扫描入库 + 设置 串成一条链路 ---------- */
/* ---------- 分裂按钮组：主操作与相邻操作拼成一个控件 ---------- */
/* 用容器裁切圆角，而不是给首尾子按钮分别设圆角：
   这样按钮被角色权限隐藏后只剩一个时，圆角依然是完整的。 */
.btn-group {
  display: inline-flex; align-items: stretch;
  border-radius: var(--radius); overflow: hidden;
}
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn + .btn { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .38); }
.btn-group > .btn:focus-visible { outline-offset: -2px; }
.btn-icon { padding-left: 11px; padding-right: 11px; }

/* 副标题：路径 / 可扫描数 / 已登记数 / 修改设置，全在一行里说清楚 */
#mat-sub .mat-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; letter-spacing: 0;
  background: rgba(56, 189, 248, .14); border: 1px solid rgba(56, 189, 248, .22);
  color: var(--d-cyan, #00e5ff); padding: 1px 6px; border-radius: 5px;
}
#mat-sub .mat-dim { opacity: .75; }
#mat-sub .mat-warn { color: #f87171; }
#mat-sub .mat-link {
  color: var(--d-cyan, #00e5ff); text-decoration: none;
  border-bottom: 1px dashed rgba(0, 229, 255, .5); padding-bottom: 1px;
}
#mat-sub .mat-link:hover { border-bottom-style: solid; }

/* 设置弹窗：目录状态 / 错误提示 */
.cfg-status { margin-top: 6px; font-size: 12px; }
.cfg-status.ok { color: #15803d; }
.cfg-status.bad { color: #b91c1c; }
.cfg-notice {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; line-height: 1.5;
}

/* 空态：给出下一步动作，而不是只有一句说明 */
.mat-empty { padding: 48px 20px; }
.mat-empty-title { font-size: 15px; color: var(--d-text, #e2e8f0); margin-bottom: 8px; }
.mat-empty-tip { font-size: 13px; color: var(--d-muted, #7c8db5); margin-bottom: 18px; line-height: 1.6; }
.mat-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- 设备对比：报告检测项 ---------- */
.eq-ti-count {
  background: rgba(22, 163, 74, .12); border: 1px solid rgba(22, 163, 74, .3);
  color: #15803d; border-radius: 999px; padding: 1px 8px; font-size: 11px;
}
.eq-ti-list {
  max-height: 280px; overflow-y: auto;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px 0;
}
.eq-ti-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; font-size: 13px; line-height: 1.5;
}
.eq-ti-item:nth-child(even) { background: #f8fafc; }
.eq-ti-no { color: var(--text-muted, #94a3b8); width: 26px; text-align: right; flex: 0 0 auto; }
.eq-ti-name { color: var(--text, #1e293b); font-weight: 500; flex: 0 0 auto; }
.eq-ti-detail {
  color: var(--text-muted, #94a3b8); flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eq-ti-verdict {
  flex: 0 0 auto; background: rgba(22, 163, 74, .1); color: #15803d;
  border-radius: 5px; padding: 0 6px; font-size: 12px;
}

/* ---------- 设备资料库：资料卡片墙 ---------- */
.eq-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.eq-doc-card {
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.eq-doc-card:hover {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .12);
  transform: translateY(-2px);
}
.eq-doc-top { display: flex; align-items: center; justify-content: space-between; }
.eq-doc-icon { font-size: 26px; line-height: 1; }
.eq-doc-kind {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.eq-kind-report { background: #dbeafe; color: #1d4ed8; }
.eq-kind-brochure { background: #fef3c7; color: #b45309; }
.eq-kind-other { background: #f1f5f9; color: #475569; }
.eq-doc-name {
  font-size: 13px; color: var(--text-muted, #64748b); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eq-doc-title {
  font-size: 14.5px; font-weight: 600; color: var(--text, #1e293b);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eq-doc-line { font-size: 12.5px; color: var(--text-muted, #64748b); }
.eq-doc-ti { color: #15803d; }
.eq-doc-certs { display: flex; gap: 5px; flex-wrap: wrap; }
.eq-doc-meta { font-size: 12px; color: var(--text-muted, #94a3b8); }
.eq-doc-ops {
  display: flex; gap: 6px; margin-top: auto; padding-top: 8px;
  border-top: 1px dashed var(--border, #e2e8f0); flex-wrap: wrap;
}

/* ---------- 查看弹窗：原件预览 + 识别信息 ---------- */
.eqpv-wrap { display: flex; gap: 14px; min-height: 420px; }
.eqpv-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.eqpv-loading { color: var(--text-muted, #94a3b8); padding: 40px; text-align: center; }
.eqpv-frame-wrap { flex: 1 1 auto; min-height: 480px; }
.eqpv-frame { width: 100%; height: 66vh; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; background: #f8fafc; }
.eqpv-imgwrap { flex: 1 1 auto; text-align: center; overflow: auto; }
.eqpv-img { max-width: 100%; max-height: 66vh; border-radius: 8px; }
.eqpv-textwrap { flex: 1 1 auto; overflow: auto; }
.eqpv-text {
  font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-all;
  background: #f8fafc; border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px; padding: 14px; max-height: 66vh; overflow: auto; margin: 0;
}
.eqpv-unsupported {
  flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center;
  color: var(--text-muted, #64748b); min-height: 300px;
}
.eqpv-side {
  flex: 0 0 280px; max-height: 66vh; overflow-y: auto;
  border-left: 1px solid var(--border, #e2e8f0); padding-left: 14px;
}
.eqpv-side-title { font-size: 13px; font-weight: 600; color: var(--text, #1e293b); margin-bottom: 8px; }
.eqpv-kv {
  display: flex; gap: 8px; font-size: 12.5px; padding: 4px 0; line-height: 1.5;
}
.eqpv-kv span { color: var(--text-muted, #94a3b8); flex: 0 0 76px; }
.eqpv-kv b { color: var(--text, #1e293b); font-weight: 500; min-width: 0; word-break: break-all; }

@media (max-width: 900px) {
  .eqpv-wrap { flex-direction: column; }
  .eqpv-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border, #e2e8f0); padding-top: 12px; max-height: 240px; flex: 0 0 auto; }
  .eqpv-frame, .eqpv-img, .eqpv-text { max-height: 46vh; height: 46vh; }
}

/* ---------- 设备资料库：品牌分类栏 ---------- */
.equip-brand-tabs { margin: -6px 0 14px; }
.equip-brand-tabs .eq-brand-tab {
  padding: 4px 12px; font-size: 12.5px; border-radius: 999px; gap: 4px;
}
.equip-brand-tabs .eq-brand-tab i {
  font-style: normal; font-size: 11px; opacity: .65;
}
.equip-brand-tabs .eq-brand-tab.active i { opacity: .9; }

/* ---------- 资料库：左侧分类导航 ---------- */
.content:has(#view-equipment:not(.hidden)) { max-width: 1360px; }
.equip-layout { display: flex; align-items: flex-start; gap: 20px; }
.equip-side {
  flex: 0 0 224px; width: 224px; position: sticky; top: 16px;
  background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px; padding: 12px 10px 10px;
}
.equip-side-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 2px 8px 10px; border-bottom: 1px solid var(--border, #eef1f6); margin-bottom: 8px;
}
.equip-side-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.equip-side-sub { font-size: 11px; color: var(--text-muted, #94a3b8); letter-spacing: .5px; }
.equip-side-nav { display: flex; flex-direction: column; gap: 4px; }
.equip-side-group { display: flex; flex-direction: column; gap: 2px; }
.equip-side-groupbtn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 9px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s; text-align: left;
}
.equip-side-groupbtn:hover { background: var(--bg, #f1f5f9); }
.equip-side-groupbtn .esg-icon { font-size: 15px; line-height: 1; }
.equip-side-groupbtn .esg-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equip-side-groupbtn .esg-total {
  font-size: 11px; font-weight: 600; color: var(--text-muted, #94a3b8);
  background: var(--bg, #f1f5f9); border-radius: 999px; padding: 1px 7px;
}
.equip-side-group.open > .equip-side-groupbtn { color: var(--primary); }
.equip-side-group.open > .equip-side-groupbtn .esg-total { background: rgba(37, 99, 235, .1); color: var(--primary); }
.equip-side-items {
  display: flex; flex-direction: column; gap: 2px;
  margin: 2px 0 6px 14px; padding-left: 8px; border-left: 1px solid var(--border, #eef1f6);
}
.equip-side-group:not(.open) .equip-side-item { opacity: .88; }
.equip-side-item {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 6px 9px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text-muted, #64748b); font-size: 13px; cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
}
.equip-side-item:hover { background: var(--bg, #f1f5f9); color: var(--text); }
.equip-side-item.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .22);
}
.equip-side-item .esi-icon { font-size: 13.5px; line-height: 1; }
.equip-side-item .esi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equip-side-item .esi-count { font-style: normal; font-size: 11px; opacity: .7; }
.equip-main { flex: 1; min-width: 0; }
.equip-head-text { min-width: 0; }
.equip-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-muted, #64748b); }
@media (max-width: 900px) {
  .equip-layout { flex-direction: column; }
  .equip-side { position: static; width: 100%; flex: 0 0 auto; }
  .equip-side-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .equip-side-group { width: auto; }
  .equip-side-items { flex-direction: row; flex-wrap: wrap; border-left: 0; margin: 0; padding: 0; }
}

/* ---------- 资料库 · 业绩案例台账 ---------- */
.perf-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.perf-hint { font-size: 12.5px; color: var(--text-muted, #64748b); }
.perf-table-wrap {
  overflow-x: auto; background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0); border-radius: 12px;
}
#perf-table { min-width: 880px; font-size: 12.5px; }
#perf-table thead th { white-space: nowrap; }
#perf-table td { vertical-align: middle; padding: 9px 10px; }
#perf-table td.perf-num { text-align: center; color: var(--text-muted, #94a3b8); }
#perf-table td.perf-money { text-align: right; white-space: nowrap; font-weight: 600; }
#perf-table td.perf-date { white-space: nowrap; color: var(--text-muted, #64748b); }
.perf-name { font-weight: 600; color: var(--text); max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perf-sub { font-size: 11.5px; color: var(--text-muted, #94a3b8); margin-top: 2px; }
.perf-files { display: flex; flex-wrap: wrap; gap: 4px; min-width: 145px; }
.perf-chip {
  display: inline-flex; align-items: center; gap: 3px; max-width: 150px;
  padding: 2px 7px; border: 1px solid var(--border, #dbe3ef); border-radius: 999px;
  background: var(--bg, #f5f8fd); font-size: 11px; color: var(--text-muted, #475569);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.perf-chip:hover { border-color: var(--primary); color: var(--primary); }
.perf-chip.missing { opacity: .5; cursor: default; border-style: dashed; }
.perf-chip.missing:hover { border-color: var(--border, #dbe3ef); color: var(--text-muted, #475569); }
.perf-usable { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; white-space: nowrap; }
.perf-usable.yes { background: #e7f6ee; color: #0f6e56; }
.perf-usable.no { background: #fdeaea; color: #a32d2d; }
.perf-usable.pending { background: #fdf3dd; color: #854f0b; }
.perf-ops { display: flex; gap: 4px; white-space: nowrap; }
.perf-op {
  border: 1px solid var(--border, #dbe3ef); background: var(--card, #fff);
  border-radius: 6px; padding: 3px 7px; font-size: 11.5px; cursor: pointer; color: var(--text-muted, #475569);
}
.perf-op:hover { border-color: var(--primary); color: var(--primary); }
.perf-op.danger:hover { border-color: #dc2626; color: #dc2626; }
.perf-addzone {
  margin-top: 6px; padding: 12px; border: 1px dashed var(--border, #cbd5e1);
  border-radius: 10px; background: var(--bg, #f8fafc);
}
.perf-addzone.dragging { border-color: var(--primary); background: #eff6ff; }
.perf-addrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.perf-addrow select, .perf-addrow input[type=file] { font-size: 12.5px; }
.perf-filelist { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.perf-filerow {
  display: flex; align-items: center; gap: 8px; padding: 6px 9px;
  border: 1px solid var(--border, #eef1f6); border-radius: 8px; font-size: 12.5px;
}
.perf-filerow .pf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perf-filerow .pf-kind { font-size: 11px; color: var(--text-muted, #94a3b8); white-space: nowrap; }
@media (max-width: 900px) {
  .perf-toolbar { flex-direction: column; align-items: flex-start; }
}
