:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f0f2f5;
    --border: #e3e6ea;
    --text: #1f2329;
    --text-2: #646a73;
    --text-3: #8f959e;
    --primary: #185fa5;
    --primary-2: #2f7fd0;
    --primary-soft: #e6f1fb;
    --green: #2e9e5b;
    --green-soft: #e7f5ec;
    --amber: #c8821a;
    --amber-soft: #fbf0db;
    --red: #d8504a;
    --red-soft: #fbe9e8;
    --purple: #6c4fc1;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(20,30,50,.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Segoe UI, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
h1,h2,h3 { margin: 0; font-weight: 600; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
input, select, textarea { font-family: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; outline: none; background: #fff; color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-2); }
.btn { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 8px; font-size: 13px; transition: .15s; }
.btn:hover { border-color: var(--primary-2); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-block { width: 100%; padding: 11px; font-size: 14px; margin-top: 6px; }
.btn-danger { color: var(--red); border-color: #f0c4c2; }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.link-btn { background: none; border: none; color: var(--text-3); font-size: 12px; text-decoration: underline; padding: 4px; }
.link-btn:hover { color: var(--primary); }

/* ===== 登录 ===== */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e9f1fb, #f5f6f8); position: relative; padding: 20px 16px 48px; }
/* 管局要求备案号挂在首页底部。登录页是 flex 居中的，页脚用绝对定位钉在最下面，
   上面的 padding-bottom 给它留位，窗口再矮也不会压到卡片。 */
.login-screen > .icp-bar { position: absolute; left: 0; right: 0; bottom: 14px; }
.icp-bar { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.8; }
.icp-bar a { color: inherit; text-decoration: none; }
.icp-bar a:hover { color: var(--primary); text-decoration: underline; }
/* 登录后首页那条跟着内容滚到底，补一点边距和上面的栅格对齐 */
.home-view > .icp-bar { padding: 0 18px 18px; }
.login-card { width: 380px; background: var(--surface); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand-logo { width: 46px; height: 46px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.login-brand h1 { font-size: 19px; }
.login-brand p { margin: 2px 0 0; color: var(--text-3); font-size: 12px; }
.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 10px; margin-bottom: 16px; }
.tab { flex: 1; border: none; background: transparent; padding: 8px; border-radius: 8px; color: var(--text-2); font-size: 13px; }
.tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }
.auth-form label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.auth-form input { margin-top: 5px; }
.form-msg { color: var(--red); font-size: 12px; min-height: 16px; margin-bottom: 4px; }
.form-msg.ok { color: var(--green); }
.form-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin: 8px 0; cursor: pointer; }
.hint { font-size: 11px; color: var(--text-3); margin-top: 10px; }

/* ===== 主布局 ===== */
.main-screen { min-height: 100vh; display: flex; flex-direction: column; }
.app-header { height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.app-title { font-weight: 600; font-size: 15px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
/* 桌面端徽标：只有探测到本机看图程序才会亮（网页端一直是 hidden），
   用来回答"我开的到底是哪个入口、现在有没有网"。 */
.ds-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2);
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px 10px; white-space: nowrap; }
.ds-chip.hidden { display: none; }
.ds-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ds-dot.on { background: #2e9e5b; }
.ds-dot.off { background: #d0453f; }
.user-menu { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.layout { flex: 1; display: flex; min-height: 0; }
.sidebar { width: 248px; background: var(--surface); border-right: 1px solid var(--border); padding: 14px 10px; overflow-y: auto; }
.sidebar-title { font-size: 12px; color: var(--text-3); padding: 6px 8px; }
.project-list { display: flex; flex-direction: column; gap: 4px; }
.project-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.project-item:hover { background: var(--surface-2); }
.project-item.active { background: var(--primary-soft); border-color: #bcdcff; }
.project-item .pi-name { font-weight: 600; font-size: 13px; }
.project-item .pi-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.workspace { flex: 1; padding: 20px 24px; overflow-y: auto; }

.empty-state { text-align: center; color: var(--text-3); margin-top: 12vh; }
.empty-state .empty-icon { font-size: 52px; }
.empty-state h2 { font-size: 17px; color: var(--text-2); margin: 12px 0 6px; }

.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.project-header h2 { font-size: 20px; }
.project-meta { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.project-meta span { margin-right: 12px; }
.project-stat-chips { display: flex; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 20px; font-size: 12px; background: var(--surface-2); color: var(--text-2); }
.chip.open { background: var(--amber-soft); color: var(--amber); }
.chip.closed { background: var(--green-soft); color: var(--green); }
.chip.over { background: var(--red-soft); color: var(--red); }

/* ===== Tabs ===== */
.tabs-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab-nav { border: none; background: transparent; padding: 10px 16px; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent; }
.tab-nav:hover { color: var(--primary); }
.tab-nav.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ===== 通用面板 ===== */
.panel-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.panel-bar .filters { display: flex; gap: 8px; align-items: center; }
.panel-bar select { width: auto; padding: 7px 10px; }

/* ===== 图模空间 ===== */
.draw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.draw-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: .15s; }
.draw-card:hover { box-shadow: var(--shadow); border-color: var(--primary-2); }
.draw-thumb { height: 130px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 34px; overflow: hidden; }
.draw-thumb img { width: 100%; height: 100%; object-fit: cover; }
.draw-info { padding: 10px 12px; }
.draw-info .di-name { font-weight: 600; font-size: 13px; }
.draw-info .di-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* 批注查看器 */
.viewer-wrap { position: relative; background: #1f2329; border-radius: var(--radius); overflow: hidden; display: inline-block; max-width: 100%; }
.viewer-wrap img { display: block; max-width: 100%; max-height: 68vh; }
.viewer-pin { position: absolute; width: 26px; height: 26px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.viewer-pin.closed { background: var(--green); }
.viewer-pin.open { background: var(--amber); }

/* ===== 问题列表 ===== */
.issue-list { display: flex; flex-direction: column; gap: 10px; }
.issue-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 14px; cursor: pointer; transition: .15s; }
.issue-card:hover { box-shadow: var(--shadow); border-color: var(--primary-2); }
.issue-no { font-weight: 700; color: var(--primary); width: 42px; flex-shrink: 0; }
.issue-main { flex: 1; min-width: 0; }
.issue-title { font-weight: 600; font-size: 14px; }
.issue-sub { font-size: 12px; color: var(--text-3); margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.badge { padding: 2px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.b-sev-critical { background: var(--red-soft); color: var(--red); }
.b-sev-major { background: var(--amber-soft); color: var(--amber); }
.b-sev-minor { background: var(--primary-soft); color: var(--primary); }
.b-sev-suggestion { background: var(--surface-2); color: var(--text-2); }
.b-st-pending { background: var(--amber-soft); color: var(--amber); }
.b-st-in_progress { background: var(--primary-soft); color: var(--primary); }
.b-st-review { background: #efe6fb; color: var(--purple); }
.b-st-closed { background: var(--green-soft); color: var(--green); }
.b-st-rejected { background: var(--red-soft); color: var(--red); }
.overdue { color: var(--red); font-weight: 600; }

/* ===== 问题详情：一条时间线 + 唯一一块「现在轮到你」操作卡 ===== */
.issue-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 12px; }
.issue-top h2 { margin: 0 0 6px; font-size: 18px; }
.issue-top-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--text-3); }
.issue-top-r { display: flex; gap: 6px; align-items: center; }
.tl-list { border-left: 2px solid var(--border); margin: 0 0 14px 6px; padding-left: 16px; }
.tl-row { position: relative; padding: 8px 0 10px; }
.tl-row::before { content: ''; position: absolute; left: -22px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); }
.tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.tl-head b { color: var(--primary); }
.tl-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.tl-tag.t-create, .tl-tag.t-reply { background: #eef6ff; color: #1a5fb4; border-color: #cfe0f5; }
.tl-tag.t-pass { background: var(--green-soft); color: var(--green); border-color: #bfe3cd; }
.tl-tag.t-reject { background: var(--red-soft); color: var(--red); border-color: #f0c9c9; }
.tl-tag.t-status, .tl-tag.t-chat { background: transparent; color: var(--text-3); border-style: dashed; }
.tl-text { margin-top: 4px; white-space: pre-wrap; line-height: 1.6; word-break: break-word; }
.tl-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tl-img { max-width: 240px; max-height: 160px; object-fit: contain; }
.issue-img { max-width: 100%; border-radius: 8px; margin: 6px 6px 6px 0; border: 1px solid var(--border); }
.zl { cursor: zoom-in; }
/* 附图全屏看：盖在弹窗（z-index 2000）之上，看图页/合模的 1000 层也压得住 */
.img-viewer { position: fixed; inset: 0; z-index: 3000; background: rgba(8,10,14,.94); display: flex; align-items: center; justify-content: center; padding: 52px 14px 14px; }
.img-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; cursor: zoom-out; }
.iv-bar { position: absolute; top: 0; left: 0; right: 0; height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; color: #e8eaed; font-size: 13px; }
.iv-cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-x { background: #2b3038; border: 1px solid #454b54; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 13px; color: #e8eaed; flex: 0 0 auto; }
.now-card { border: 1px solid var(--primary); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; margin-bottom: 12px; }
.now-card.is-wait { border-style: dashed; border-color: var(--border); background: var(--surface-2); }
.now-head { font-size: 13px; margin-bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.now-head b { color: var(--primary); }
.now-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.now-ops .btn { white-space: nowrap; }
.cmt-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; background: var(--surface); }
.cmt-box summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.cmt-box #cmtList { margin-top: 8px; max-height: 240px; overflow: auto; }
.cmt-box textarea { margin-top: 8px; width: 100%; }
.cmt-box .btn { margin-top: 6px; }
.comment { border-bottom: 1px solid var(--surface-2); padding: 10px 0; }
.comment .c-head { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.comment .c-body { line-height: 1.5; }

/* ===== 统计 ===== */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-card .sc-num { font-size: 26px; font-weight: 700; }
.stat-card .sc-label { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.chart-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.chart-block h3 { font-size: 14px; margin-bottom: 14px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12px; }
.bar-label { width: 90px; color: var(--text-2); text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--surface-2); border-radius: 6px; height: 18px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--primary); transition: width .4s; }
.bar-val { width: 30px; color: var(--text-2); }

/* ===== 图档库 ===== */
.doc-table { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.doc-table th, .doc-table td { padding: 11px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--surface-2); }
.doc-table th { background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.doc-table tr:last-child td { border-bottom: none; }

/* ===== 成员 ===== */
.member-row { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.member-row .m-name { font-weight: 600; }
.member-row .m-role { font-size: 12px; color: var(--text-3); margin-left: 8px; }

/* ===== Modal ===== */
.modal-root { position: fixed; inset: 0; background: rgba(20,28,40,.45); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.modal.wide { max-width: 880px; }
.modal h2 { font-size: 17px; margin-bottom: 16px; }
.modal .form-row { margin-bottom: 13px; }
.modal .form-row label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.drop-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--text-3); cursor: pointer; }
.drop-zone:hover { border-color: var(--primary-2); color: var(--primary); }

/* ===== Toast ===== */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #1f2329; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13px; z-index: 80; box-shadow: var(--shadow); }
/* 错误提示必须和成功同款里跳出来：app.js 里 20 多处 toast(msg, true) 以前被签名吞掉了 */
.toast.err { background: #b3261e; font-weight: 600; }

/* ===== CAD 矢量查看器（专业黑底风格） ===== */
.cad-modal-body { margin-top: 10px; }
.cad-container { width: 100%; height: 64vh; border: 1px solid #333; border-radius: 8px; overflow: hidden; position: relative; background: #1a1a1a; }

.cad-root { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; background: #1a1a1a; }

/* 工具栏 */
.cad-toolbar {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #2a2a2a 0%, #222222 100%);
  border-bottom: 1px solid #444;
  flex-shrink: 0; flex-wrap: wrap;
}
.cad-btn {
  cursor: pointer;
  border: 1px solid #444;
  background: #333;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  color: #ccc;
  transition: all 0.15s;
}
.cad-btn:hover { border-color: #666; color: #fff; background: #444; }
.cad-btn.active { background: #0066cc; border-color: #0088ff; color: #fff; }
.cad-separator { width: 1px; height: 20px; background: #444; margin: 0 4px; }
.cad-hint { font-size: 11px; color: #88ccff; margin-left: 8px; }
.cad-spacer { flex: 1; }

/* 模型 / 布局 空间切换标签 */
.cad-space-tabs {
  display: flex; align-items: center; gap: 2px;
  background: #111; border: 1px solid #444;
  border-radius: 4px; padding: 2px;
}
.cad-space-tag {
  cursor: pointer;
  padding: 3px 10px;
  font-size: 11px;
  color: #999;
  border-radius: 3px;
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
}
.cad-space-tag:hover { color: #fff; background: #333; }
.cad-space-tag.active {
  background: #0088ff;
  color: #fff;
  font-weight: 600;
}

/* 状态栏 */
.cad-statusbar {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px;
  background: #111;
  border-top: 1px solid #333;
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
}
.cad-statusbar .cad-status-sep { color: #444; }
.cad-statusbar [data-role="coords"] { color: #00ff88; font-family: "Consolas", "Monaco", monospace; }
.cad-statusbar [data-role="zoom"] { color: #ffaa00; }
.cad-statusbar [data-role="status"] { color: #aaa; }

/* 画布区域 */
.cad-canvas-wrap { flex: 1; position: relative; min-height: 0; background: #1a1a1a; }
.cad-canvas-wrap canvas { display: block; width: 100%; height: 100%; }

/* 十字光标 */
.cad-crosshair {
  position: absolute;
  pointer-events: none;
  display: none;
  z-index: 3;
}

/* 加载遮罩 */
.cad-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(26,26,26,.95);
  z-index: 5;
  font-size: 13px;
  color: #aaa;
}
.cad-loading.hidden { display: none; }
.cad-spinner {
  width: 36px; height: 36px;
  border: 3px solid #333;
  border-top-color: #0088ff;
  border-radius: 50%;
  animation: cad-spin .8s linear infinite;
}
@keyframes cad-spin { to { transform: rotate(360deg); } }

/* 图层面板 */
.cad-layers {
  position: absolute; top: 44px; right: 10px;
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  padding: 10px;
  max-height: 46vh;
  overflow-y: auto;
  display: none;
  min-width: 180px;
  z-index: 6;
}
.cad-layers.show { display: block; }
.cad-layers .cl-title { font-weight: 600; font-size: 12px; color: #aaa; margin-bottom: 6px; }
.cad-layers .cl-actions { display: flex; gap: 6px; margin-bottom: 8px; }
.cad-layers .cl-btn {
  cursor: pointer; border: 1px solid #444; background: #333;
  border-radius: 4px; padding: 3px 8px; font-size: 11px; color: #aaa;
}
.cad-layers .cl-btn:hover { background: #444; color: #fff; }
.cad-layers .cl-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; padding: 3px 0;
  color: #ccc; white-space: nowrap;
}
.cad-layers .cl-item input { accent-color: #0088ff; }
.cad-layers .cl-empty { font-size: 12px; color: #666; padding: 6px 0; }
.cad-layers::-webkit-scrollbar { width: 6px; }
.cad-layers::-webkit-scrollbar-track { background: #1a1a1a; }
.cad-layers::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* 定位标记 */
.cad-locate-dot {
  position: absolute; transform: translate(-50%, -50%);
  background: rgba(255,68,68,.95);
  color: #fff; padding: 6px 14px; border-radius: 16px;
  font-size: 12px; font-weight: 600;
  box-shadow: 0 0 0 4px rgba(255,68,68,.3), 0 4px 16px rgba(0,0,0,.5);
  pointer-events: none;
  animation: cad-pulse 1.4s ease-in-out infinite;
  z-index: 7;
}
@keyframes cad-pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(255,68,68,.3), 0 4px 16px rgba(0,0,0,.5); }
  50% { box-shadow: 0 0 0 12px rgba(255,68,68,.05), 0 4px 16px rgba(0,0,0,.5); }
}

/* ---------- 移动端（手机 / 平板）：CAD 矢量查看器 ----------
   画布上的手势由 cad-viewer.js 接管（touch-action:none），这里只管按钮够大、
   工具栏不换行溢出、状态栏和图层面板在小屏上不挡图。 */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .cad-toolbar { gap: 6px; padding: 6px 8px; }
  .cad-btn { padding: 9px 12px; font-size: 14px; min-height: 40px; }
  .cad-btn-ico { font-size: 16px; }
  .cad-separator { display: none; }
  .cad-hint { font-size: 12px; width: 100%; margin: 2px 0 0; order: 9; }
  .cad-spacer { display: none; }
  .cad-space-tag { padding: 9px 12px; font-size: 13px; }
  .cad-statusbar { font-size: 12px; padding: 7px 10px; gap: 6px; }
  .cad-layers { top: auto; bottom: 46px; right: 8px; left: 8px; max-height: 44vh; min-width: 0; }
  .cad-layers .cl-item { padding: 7px 0; font-size: 14px; white-space: normal; }
  .cad-layers .cl-btn { padding: 8px 12px; font-size: 13px; }
  .canvasWrap, .cad-canvas-wrap { touch-action: none; }
}

/* 文字标签（支持中文） */
.cad-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.cad-label {
  position: absolute; transform: translate(-0%, -50%);
  white-space: nowrap; color: #ffffff;
  font-weight: 500;
  text-shadow: 0 0 4px rgba(0,0,0,1), 0 0 8px rgba(0,0,0,0.8);
  line-height: 1; user-select: none;
  font-family: "Microsoft YaHei", "PingFang SC", "SimHei", "SimSun", "STHeiti", "STFangsong", sans-serif;
  letter-spacing: 0.5px;
}

/* 窗口缩放选择框 */
.cad-zoom-window {
  position: absolute;
  border: 1px solid #00aaff;
  background: rgba(0,170,255,.15);
  pointer-events: none;
  z-index: 4;
}

/* 测量标签 */
.cad-measure-label {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(0,255,136,.95);
  color: #000;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  z-index: 7;
  white-space: nowrap;
}
.cad-measure-label .measure-value { font-family: "Consolas", monospace; }
.cad-measure-label .measure-angle { font-size: 10px; color: #333; margin-top: 2px; }

/* ===== CAD 全屏覆盖层 ===== */
.cad-fullscreen-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: #111;
  display: flex; flex-direction: column;
  animation: cad-fs-fadein 0.2s ease;
}
@keyframes cad-fs-fadein { from { opacity: 0; } to { opacity: 1; } }

.cad-fs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}
.cad-fs-title {
  display: flex; align-items: center; gap: 12px;
  color: #fff; font-size: 14px; font-weight: 600;
}
.cad-fs-back {
  cursor: pointer; border: 1px solid #444; background: #333;
  border-radius: 4px; padding: 4px 12px; font-size: 12px; color: #ccc;
}
.cad-fs-back:hover { background: #444; color: #fff; }
.cad-fs-actions { display: flex; gap: 8px; }
.cad-fs-btn {
  cursor: pointer; border: 1px solid #444; background: #333;
  border-radius: 4px; padding: 5px 14px; font-size: 12px; color: #ccc;
  text-decoration: none; display: inline-flex; align-items: center;
}
.cad-fs-btn:hover { background: #444; color: #fff; }
.cad-fs-close { background: #663333; border-color: #884444; }
.cad-fs-close:hover { background: #884444; }

.cad-fs-body {
  flex: 1; display: flex; min-height: 0; overflow: hidden;
}

/* 左侧文件树 */
.cad-fs-sidebar {
  width: 240px; background: #1a1a1a; border-right: 1px solid #333;
  display: flex; flex-direction: column; flex-shrink: 0;
  overflow: hidden;
}
.cad-fs-sidebar-title {
  padding: 10px 12px; font-size: 12px; color: #888;
  border-bottom: 1px solid #333; font-weight: 600;
}
.cad-fs-file-tree {
  flex: 1; overflow-y: auto; padding: 8px 0;
}
.cad-fs-file-tree::-webkit-scrollbar { width: 6px; }
.cad-fs-file-tree::-webkit-scrollbar-track { background: #111; }
.cad-fs-file-tree::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.cad-fs-folder { margin-bottom: 4px; }
.cad-fs-folder-name {
  padding: 6px 12px; font-size: 12px; color: #aaa;
  cursor: default; font-weight: 600;
}
.cad-fs-file {
  padding: 6px 12px 6px 24px; font-size: 12px; color: #ccc;
  cursor: pointer; transition: background 0.1s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cad-fs-file:hover { background: #2a2a2a; color: #fff; }
.cad-fs-file.active { background: #003366; color: #fff; border-left: 3px solid #0088ff; }

/* 右侧 CAD 主区域 */
.cad-fs-main {
  flex: 1; min-width: 0; position: relative;
}
.cad-fs-main .cad-container {
  width: 100%; height: 100%; border: none; border-radius: 0;
}

/* ===== 问题定位按钮 ===== */
.issue-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-locate { white-space: nowrap; }


/* ===== 首页总览 ===== */
.app-brand { display: flex; align-items: center; gap: 10px; }
.brand-cube { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; letter-spacing: .5px; }
.app-header .app-title { font-size: 16px; font-weight: 600; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.user-menu { display: flex; align-items: center; gap: 8px; }

.home-view { flex: 1; overflow: auto; background: var(--bg); }
.home-layout { display: grid; grid-template-columns: 250px 1fr 260px; gap: 16px; padding: 18px; max-width: 1500px; margin: 0 auto; }

/* 左侧用户卡 + 快捷入口 */
.home-side { display: flex; flex-direction: column; gap: 14px; }
.home-user-card { background: linear-gradient(135deg, var(--primary), #3a7fc0); border-radius: var(--radius); color: #fff; padding: 22px 18px; text-align: center; box-shadow: var(--shadow); }
.home-user-avatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.25); margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; border: 2px solid rgba(255,255,255,.5); }
.home-user-name { font-size: 16px; font-weight: 600; }
.home-user-role { font-size: 12px; opacity: .85; margin-top: 4px; }
.home-quick { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.home-quick-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.home-quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-item { background: var(--surface-2); border-radius: 10px; padding: 12px 4px; text-align: center; cursor: pointer; transition: .15s; border: 1px solid transparent; }
.quick-item:hover { background: var(--primary-soft); border-color: var(--primary-2); }
.quick-icon { font-size: 20px; }
.quick-label { font-size: 11px; color: var(--text-2); margin-top: 5px; }

/* 中部统计 + 项目网格 */
.home-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-big { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); text-align: center; }
.stat-num { font-size: 34px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat-num.open { color: var(--amber); }
.stat-num.closed { color: var(--green); }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.home-section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin: 4px 2px 0; }
.section-bar { width: 4px; height: 16px; border-radius: 2px; background: var(--primary); display: inline-block; }
.home-search { width: 220px; margin-left: auto; padding: 6px 10px; font-size: 12px; }
.home-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.hp-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: .18s; border: 1px solid var(--border); }
.hp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(20,30,50,.14); }
.hp-cover { height: 150px; position: relative; display: flex; align-items: center; justify-content: center; }
.hp-cover-text { font-size: 34px; opacity: .9; }
.hp-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.hp-cover-btn { position: absolute; right: 8px; bottom: 8px; border: 0; border-radius: 11px; padding: 3px 9px; font-size: 11px; line-height: 1.5; color: #fff; background: rgba(15,25,40,.62); cursor: pointer; opacity: 0; transition: .18s; }
.hp-card:hover .hp-cover-btn { opacity: 1; }
.hp-cover-btn:hover { background: var(--primary); }
/* 触屏没有 hover，按钮得一直摆着，不然手机上谁也找不到入口 */
@media (hover: none), (max-width: 860px) { .hp-cover-btn { opacity: 1; } }
.hp-badge { position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.hp-body { padding: 12px 14px; }
.hp-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.hp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.hp-enter { color: var(--primary); font-weight: 600; }
.hp-empty { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius); padding: 46px; text-align: center; color: var(--text-3); box-shadow: var(--shadow); }

/* 项目封面编辑弹窗 */
.cv-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 26px 16px; text-align: center; color: var(--text-3); font-size: 13px; cursor: pointer; transition: .15s; }
.cv-zone:hover, .cv-zone.over { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.cv-preview { margin: 12px 0 4px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.cv-preview img { display: block; width: 100%; max-height: 230px; object-fit: cover; }
.cv-none { padding: 26px; text-align: center; color: var(--text-3); font-size: 13px; }
.cv-tip { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }

/* 右侧待办 */
.home-todo { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.home-todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { background: var(--surface); border-radius: 10px; padding: 11px 12px; cursor: pointer; border-left: 3px solid var(--primary); box-shadow: var(--shadow); transition: .15s; }
.todo-item:hover { transform: translateX(2px); }
.todo-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-empty { background: var(--surface); border-radius: 10px; padding: 30px 14px; text-align: center; color: var(--text-3); font-size: 13px; box-shadow: var(--shadow); }

/* ===== 项目工作台：左侧竖菜单 ===== */
.proj-menu { width: 200px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 10px 8px; gap: 2px; transition: width .18s; overflow: hidden; }
#projectLayout.folded .proj-menu { width: 48px; }
#projectLayout.folded .proj-nav-item span.pn-label, #projectLayout.folded .proj-back { display: none; }
.proj-back { background: var(--surface-2); border: none; border-radius: 8px; padding: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; margin-bottom: 10px; }
.proj-back:hover { background: var(--primary-soft); color: var(--primary); }
.proj-nav { display: flex; flex-direction: column; gap: 2px; }
.proj-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; border-radius: 8px; padding: 10px 12px; font-size: 14px; color: var(--text-2); cursor: pointer; text-align: left; }
.proj-nav-item:hover { background: var(--surface-2); color: var(--text); }
.proj-nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.pni { font-size: 16px; width: 20px; text-align: center; }
.proj-topbar { height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.proj-fold { background: var(--surface-2); border: none; border-radius: 6px; width: 30px; height: 30px; font-size: 15px; cursor: pointer; color: var(--text-2); }
.proj-fold:hover { background: var(--primary-soft); color: var(--primary); }
.proj-crumb { font-size: 15px; font-weight: 600; }
.workspace { flex: 1; overflow: auto; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.project-view { flex: 1; padding: 16px 18px; overflow: auto; }

/* ===== 控制台 ===== */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px; align-items: start; }
.dash-card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.dash-card-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.dash-info { display: flex; flex-direction: column; gap: 9px; }
.di-row { display: flex; justify-content: space-between; font-size: 13px; }
.di-row span { color: var(--text-3); }
.di-row b { font-weight: 500; }
.dash-issue { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--surface-2); font-size: 13px; cursor: pointer; }
.dash-issue:last-child { border-bottom: none; }
.dash-issue:hover { background: var(--surface-2); border-radius: 6px; }
.di-no { color: var(--primary); font-weight: 600; white-space: nowrap; }
.di-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.di-status { color: var(--text-3); font-size: 12px; white-space: nowrap; }

/* ===== 项目资料 ===== */
.mat-toolbar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.mat-tb-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.mat-tb-btn:hover { border-color: var(--primary-2); color: var(--primary); background: var(--primary-soft); }
/* 下载申请按钮上的待审批数 */
.dl-badge { display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 2px; border-radius: 8px; background: #f56c6c; color: #fff; font-size: 11px; line-height: 16px; text-align: center; font-weight: 600; }
.mat-tb-spacer { flex: 1; }
.mat-tb-search { width: 180px; padding: 6px 10px; font-size: 12px; border: 1px solid var(--border); border-radius: 6px; }
.mat-body { display: flex; background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); min-height: 500px; }
.mat-tree { width: 200px; border-right: 1px solid var(--border); padding: 10px 6px; overflow-y: auto; flex-shrink: 0; }
.mat-tree-item { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-tree-item:hover { background: var(--surface-2); }
.mat-tree-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.mat-tree-icon { font-size: 14px; flex-shrink: 0; }
.mat-tree-badge { font-size: 11px; background: var(--surface-2); border-radius: 8px; padding: 0 6px; color: var(--text-3); margin-left: auto; flex-shrink: 0; }
.mat-right { flex: 1; min-width: 0; overflow: auto; }
.mat-breadcrumb { padding: 10px 16px; font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--surface-2); }
.mat-bc-item { cursor: pointer; color: var(--text-2); }
.mat-bc-item:hover { color: var(--primary); }
.mat-bc-sep { color: var(--text-3); }
.mat-bc-total { margin-left: auto; color: var(--text-3); font-size: 12px; }
.mat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mat-table th { text-align: left; color: var(--text-3); font-weight: 500; font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.mat-table td { padding: 10px 12px; border-bottom: 1px solid var(--surface-2); vertical-align: middle; }
.mat-table tr:hover td { background: #fafbfc; }
.mat-seq { color: var(--text-3); width: 50px; }
.mat-name { font-weight: 500; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 备注名（图纸真实名称）：可点着填，所以给指针；没填时是淡占位 */
.mat-alias { cursor: pointer; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-alias:hover { background: #f2f6fb; }
.mat-alias-empty { color: #c2c8d0; }
/* 项目资料表和 BIM 表曾经同一个病：九列宽度加起来就超过右栏，auto 布局于是把每一列
   都压到内容宽度以下 —— 「大小」「修改时间」竖排、操作列三个按钮叠成一列、一行 81px。
   现在砍掉序号/大小/修改时间（大小和时间收进名称底下那行小字），再用固定表宽兜住。 */
#viewMaterials .mat-table { table-layout: fixed; min-width: 820px; }
#viewMaterials .mat-table th, #viewMaterials .mat-table td { white-space: nowrap; }
#viewMaterials .mat-name { max-width: none; padding-right: 16px; }
#viewMaterials .mat-ops { white-space: nowrap; }
.mat-icon-folder { font-size: 16px; margin-right: 4px; }
.mat-conv { font-size: 12px; font-weight: 400; margin-left: 6px; white-space: nowrap; }
tr.mat-row-folder { cursor: pointer; }
tr.mat-row-folder:hover td { background: #f0f5ff; }
tr.mat-row-cad { cursor: pointer; }
tr.mat-row-cad:hover td { background: #f0f5ff; }
.mat-empty { text-align: center; padding: 60px 20px; color: var(--text-3); font-size: 14px; }

/* ===== 右键菜单 ===== */
.ctx-menu { position: fixed; z-index: 2000; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); min-width: 160px; padding: 4px 0; }
.ctx-item { padding: 8px 16px; font-size: 13px; cursor: pointer; color: var(--text); }
.ctx-item:hover { background: var(--primary-soft); color: var(--primary); }
.ctx-danger { color: var(--red); }
.ctx-danger:hover { background: var(--red-soft); }

/* ===== 拖拽上传覆盖层 ===== */
.mat-drop-overlay { position: fixed; inset: 0; z-index: 1500; background: rgba(24,95,165,.18); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.mat-drop-inner { background: var(--surface); border: 3px dashed var(--primary-2); border-radius: 16px; padding: 40px 60px; text-align: center; box-shadow: 0 10px 40px rgba(24,95,165,.3); }
.mat-drop-icon { font-size: 48px; margin-bottom: 12px; }
.mat-drop-text { font-size: 16px; font-weight: 600; color: var(--primary); }

/* ===== 通用文件预览覆盖层 ===== */
.file-preview-overlay { position: fixed; inset: 0; z-index: 1000; background: #f5f6f8; display: flex; flex-direction: column; }
.fp-header { height: 48px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; flex-shrink: 0; }
.fp-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-close { background: var(--surface-2); border: none; border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.fp-close:hover { background: var(--red-soft); color: var(--red); }
.fp-body { flex: 1; overflow: hidden; position: relative; }

/* ===== 问题截图缩略图 ===== */
.issue-screenshot { position: relative; margin-top: 8px; display: inline-block; max-width: 240px; }
.issue-screenshot-img { max-width: 100%; max-height: 120px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; object-fit: cover; }
.issue-screenshot-img:hover { border-color: var(--primary); }
.btn-locate-img { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-locate-img:hover { background: var(--primary); }

/* ============ 图迈式 CAD 内嵌查看面板 ============ */
#viewCadViewer { display: flex; flex-direction: column; height: 100%; padding: 0 !important; background: #141414; }
.cv-view.hidden { display: none !important; }
.cv-topbar {
    height: 44px; background: #1f1f1f; border-bottom: 1px solid #333;
    display: flex; align-items: center; gap: 8px; padding: 0 12px; flex-shrink: 0;
}
.cv-tb-btn {
    background: #2c2c2c; color: #ccc; border: 1px solid #454545; border-radius: 4px;
    padding: 6px 13px; cursor: pointer; font-size: 12.5px; font-family: inherit;
    white-space: nowrap;
}
.cv-tb-btn:hover { background: #3a3a3a; color: #fff; }
.cv-tb-blue { background: #1e5a74; border-color: #4fc3f7; color: #fff; }
.cv-tb-green { background: #2c5a34; border-color: #66bb6a; color: #fff; }
.cv-tb-red { background: #5a2c2c; border-color: #e57373; color: #fff; }
.cv-sep { width: 1px; height: 20px; background: #3d3d3d; }
.cv-fname { color: #7fd4fa; font-size: 13px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-spacer { flex: 1; }
.cv-main { flex: 1; display: flex; min-height: 0; background: #0f0f0f; }
#cvFrame { flex: 1; border: none; background: #111; min-width: 0; }
.cv-dock {
    width: 270px; background: #1b1b1b; border-left: 1px solid #333;
    display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden;
}
.cvd-head {
    padding: 10px 14px; color: #ddd; font-size: 13px; font-weight: bold;
    border-bottom: 1px solid #333; background: #232323; flex-shrink: 0;
}
.cvd-tree {
    padding: 8px 6px; border-bottom: 1px solid #2e2e2e; max-height: 46%;
    overflow: auto; flex-shrink: 0;
}
.cvd-tree .mat-tree-item {
    color: #bbb; font-size: 12.5px; padding-top: 5px; padding-bottom: 5px;
    border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 5px;
}
.cvd-tree .mat-tree-item:hover { background: #2a2a2a; }
.cvd-tree .mat-tree-item.active { background: #1e5a74; color: #fff; }
.cvd-tree .mat-tree-badge { margin-left: auto; color: #777; font-size: 11px; }
.cvd-files { flex: 1; overflow: auto; padding: 8px 6px; }
.cvd-file {
    display: flex; align-items: center; gap: 7px; padding: 6px 9px;
    border-radius: 4px; cursor: pointer; color: #ccc; font-size: 12.5px;
}
.cvd-file:hover { background: #2a2a2a; }
.cvd-file.active { background: #1e5a74; color: #fff; }
.cvd-cad .cvd-name { color: #8fd3f4; }
.cvd-file.active .cvd-name { color: #fff; }
.cvd-icon { flex-shrink: 0; }
.cvd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvd-empty { color: #666; font-size: 12px; padding: 14px; text-align: center; }
#viewCadViewer:fullscreen .cv-main { height: calc(100% - 44px); }

/* ============ BIM 模型功能区 ============ */
.bim-tip { color: #999; font-size: 12px; margin-left: 8px; }
/* 模型表和合模方案并排。左栏至少要 760px 才装得下那张 4 列表，装不下就整块换行
   到第二排（各占满宽），而不是把列压扁 —— 之前 flex:1.4 给到 638px，于是
   「就绪」竖排、操作列三个按钮叠成一列、一行模型高 191px。 */
.bim-wrap { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 4px; align-items: flex-start; }
.bim-left { flex: 1 1 760px; min-width: 0; }
.bim-right { flex: 1 1 320px; min-width: 0; }
/* BIM 表用固定表宽：名称列吃掉剩余宽度并省略号收尾，其余三列绝不换行。
   极端窄（合模方案换行前）由 #bimTableWrap 的横向滚动兜底，不会再撑高行。 */
#bimTableWrap { overflow-x: auto; }
#viewBim .mat-table { table-layout: fixed; min-width: 620px; }
#viewBim .mat-table th, #viewBim .mat-table td { white-space: nowrap; }
#viewBim .mat-name { max-width: none; padding-right: 16px; }
.mat-nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-nm .mat-ext { color: #999; font-size: 11px; font-weight: 400; }
.mat-sub { color: var(--text-3); font-size: 11.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
#viewBim .mat-ops { white-space: nowrap; }
.bim-sec-title { font-weight: bold; margin: 4px 0 8px; color: #444; }
/* 「只列常驻」这类限定说明收在标题后面，别占整行 —— 原来那两行灰字会折到
   「点过「加入模型库」的」这种半截话，看着像界面坏了 */
.bim-sec-hint { font-weight: 400; font-size: 11.5px; color: var(--text-3); margin-left: 8px; cursor: help; }
.bim-fed-card { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.bim-fed-name { font-weight: bold; margin-bottom: 6px; }
.bim-fed-models { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.bim-fed-chip { background: #eef2f6; border-radius: 10px; padding: 2px 10px; font-size: 12px; color: #556; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bim-fed-chip.bad { background: #fdecea; color: #c0392b; text-decoration: line-through; }
.bim-fed-ops { display: flex; gap: 6px; }
.bim-fed-pick { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; border: 1px solid #e3e6ea; border-radius: 6px; padding: 8px; }
.bim-fed-pick-item { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 2px; }
.fed-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
#fedPickUpload { align-self: flex-start; margin: 4px 0 6px; }
.bim-fed-pick { max-height: 300px; }
.fed-group { color: #7a828c; font-size: 12px; margin: 6px 0 2px; border-top: 1px dashed #e3e6ea; padding-top: 6px; }
.fed-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.fed-sub { color: #9aa3ad; font-size: 11px; }
.bim-fed-pick-empty { color: #98a1ab; font-size: 13px; padding: 10px 2px; }

/* ============ 上传进度面板 ============ */
#uploadPanel {
    position: fixed; right: 16px; bottom: 16px; z-index: 300;
    background: #23262b; color: #ddd; border: 1px solid #3a3d44;
    border-radius: 8px; padding: 12px 14px; width: 320px; max-width: 92vw;
    box-shadow: 0 6px 24px rgba(0,0,0,.4); font-family: inherit;
    max-height: 72vh; display: flex; flex-direction: column;
}
#uploadPanel .upl-head { font-size: 13px; font-weight: bold; margin-bottom: 8px; color: #fff; flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
#uploadPanel .upl-headtxt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 文件多时可滚动查看全部上传项，不再被顶出屏幕外 */
#uploadPanel .upl-list { max-height: 48vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
#uploadPanel .upl-foot { flex-shrink: 0; margin-top: 8px; }
#uploadPanel .upl-item { margin-bottom: 8px; position: relative; padding-right: 26px; }
#uploadPanel .upl-name { font-size: 12px; color: #bbb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; }
#uploadPanel .upl-sub { color: #999; font-size: 11px; }
#uploadPanel .upl-bar { height: 6px; background: #3a3d44; border-radius: 3px; overflow: hidden; }
#uploadPanel .upl-fill { height: 100%; width: 0%; background: #4a9eff; border-radius: 3px; transition: width .2s; }
#uploadPanel .upl-item.ok .upl-fill { background: #66bb6a; }
#uploadPanel .upl-item.fail .upl-fill { background: #e57373; }
#uploadPanel .upl-item.cancel .upl-fill { background: #7a7f88; }
#uploadPanel .upl-item.cancel .upl-name { color: #888; text-decoration: line-through; }
#uploadPanel .upl-pct { font-size: 11px; color: #999; margin-top: 2px; }
/* 取消按钮：标题栏「全部取消」+ 每行右侧「×」（任一上传中都可随时点） */
#uploadPanel .upl-x {
    flex-shrink: 0; background: none; border: 1px solid #4a4f57; color: #9aa0a8;
    border-radius: 4px; width: 20px; height: 20px; padding: 0; cursor: pointer;
    font-size: 13px; line-height: 18px; text-align: center; font-family: inherit;
}
#uploadPanel .upl-x:hover { color: #fff; border-color: #7a8088; background: #3a3d44; }
#uploadPanel .upl-cancelall { width: auto; padding: 1px 8px; font-size: 11px; }
#uploadPanel .upl-item .upl-x { position: absolute; top: -2px; right: 0; }

/* ============ 上传前核对弹窗（浅色主题，走 modal 容器） ============ */
.urv-sum { font-size: 13px; color: var(--text); margin-bottom: 6px; }
.urv-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; border: 1px solid var(--border); color: var(--text-2); }
.urv-tag.new { background: #eef6ff; border-color: #bcd8f5; color: #1e5a74; }
.urv-tag.upd { background: #fff6e5; border-color: #f0d49a; color: #9a6700; }
.urv-tag.dup { background: #f2f3f5; color: #7a828c; }
.urv-note { font-size: 12px; color: var(--text-2); background: #fafbfc; border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px; margin-bottom: 8px; line-height: 1.6; }
.urv-tree { max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; }
.urv-dir { color: var(--text-2); font-weight: 600; margin: 6px 0 2px; word-break: break-all; }
.urv-dir:first-child { margin-top: 0; }
.urv-file { display: flex; align-items: baseline; gap: 8px; padding: 2px 0 2px 14px; border-bottom: 1px dashed #f0f1f3; }
.urv-file.is-upd { background: #fffbf0; }
.urv-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urv-fsize { flex-shrink: 0; width: 72px; text-align: right; color: var(--text-3); }
.urv-fdate { flex-shrink: 0; width: 112px; text-align: right; color: var(--text-3); }
.urv-flag { flex-shrink: 0; font-size: 11px; color: #9a6700; }
.urv-more { color: var(--text-3); font-size: 12px; padding: 2px 0 2px 14px; }
@media (max-width: 700px) { .urv-fdate { display: none; } .urv-tree { max-height: 40vh; } }

/* 问题卡片：选择框前置样式 */
.issue-card > input[type="checkbox"] { flex-shrink: 0; width: 15px; height: 15px; margin-top: 3px; accent-color: #1e5a74; cursor: pointer; }

/* ===== 看图批注卡片：内联详情与编辑（不打开图纸） ===== */
.fi-card .fi-detail { display: none; margin-top: 8px; }
.fi-card.open .fi-detail { display: block; }
.fi-imgs { margin: 6px 0; }
.fi-imgs img { max-width: 240px; max-height: 150px; border-radius: 6px; border: 1px solid var(--border); margin: 0 8px 8px 0; display: inline-block; }
.fi-noimg { color: var(--text-3); font-size: 12px; }
.fi-edit { display: flex; flex-direction: column; gap: 6px; }
.fi-edit-row { display: flex; gap: 6px; flex-wrap: wrap; }
.fi-edit-row select, .fi-edit-row input, .fi-e-note { border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 12.5px; background: var(--surface); color: var(--text); }
.fi-e-note { width: 100%; min-height: 56px; resize: vertical; }
.fi-edit-ops { text-align: right; }

/* ===== 用户管理（管理员弹窗） ===== */
.ua-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.ua-add input, .ua-add select { flex: 1; min-width: 120px; border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; font-size: 13px; background: var(--surface); color: var(--text); }
.ua-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ua-table th, .ua-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: middle; }
.ua-table th { background: var(--surface-2, #f2f4f8); font-weight: 600; }
.ua-table .ua-remark, .ua-table .ua-role { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 5px; padding: 4px 6px; font-size: 12.5px; background: var(--surface); color: var(--text); }
.ua-ops { display: flex; gap: 4px; flex-wrap: wrap; }
.ua-on { color: #1c7c3c; }
.ua-off { color: #c0392b; }
.ua-hint { color: var(--text-3); font-size: 12px; margin-top: 10px; }

/* ===== 资料文件夹分享（免登录链接） ===== */
.share-tip { background: var(--primary-soft); color: var(--text-2); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7; margin: 12px 0 14px; }
.share-tip b { color: var(--primary); }
.share-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.share-form label { font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 5px; }
.share-form select, .share-form input { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; background: var(--surface); color: var(--text); }
.share-form select { width: auto; }
.share-form input { min-width: 190px; flex: 1; }
.share-form .share-chk { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 9px; }
/* 复选框只占自己那 15px：.share-form input 的 min-width:190px + flex:1 会把它撑成
   一条九十多像素宽的透明框，字和框对不上，看着就像排版乱了 */
.share-form .share-chk input { flex: none; width: 15px; height: 15px; min-width: 0; margin: 0; padding: 0; border: 0; accent-color: var(--primary); }
/* 生成按钮要和输入框齐高、且不被挤成一小块 */
.share-form .sh-gen { padding: 9px 18px; font-size: 13px; font-weight: 600; }
/* 附带合模模型：单独一块，标题一行、方案网格排布。
   复选框的尺寸必须在这里按死——.share-form input 的 min-width:190px + flex:1 会把它
   撑成三百多像素宽的透明框，文字全被挤到下一行，勾选区看上去就散了。 */
.share-fed { display: block; border-bottom: 0; padding: 0 0 14px; font-size: 12px; color: var(--text-2); }
.fed-head { font-weight: 600; color: var(--text); margin-bottom: 9px; }
.fed-sub { font-weight: 400; color: var(--text-3); margin-left: 8px; }
.fed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px 12px; }
.share-fed .fed-item { flex-direction: row; align-items: center; gap: 9px; margin: 0; padding: 7px 10px; cursor: pointer;
    border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.share-fed .fed-item:hover { border-color: var(--primary-2); background: var(--primary-soft); }
.share-fed .fed-item input { flex: none; width: 15px; height: 15px; min-width: 0; margin: 0; padding: 0; border: 0; accent-color: var(--primary); }
.share-fed .fed-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.sh-hint { font-size: 11.5px; font-weight: 400; color: var(--text-3); }
.share-list { margin-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.share-loading, .share-empty { color: var(--text-3); font-size: 12.5px; line-height: 1.8; padding: 18px 0; text-align: center; }
.share-empty span { color: var(--text-3); font-size: 12px; }

/* 一条分享 = 一张卡：顶上说明数量和状态，中间一条地址一行，底下是操作 */
.share-i { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.share-i.dead { opacity: .62; box-shadow: none; }
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 13px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.sh-count { font-size: 12.5px; font-weight: 600; color: var(--text); }
.sh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.sh-chip.warn { background: var(--amber-soft); color: var(--amber); border-color: #eed9ac; }
.sh-chip.bad { background: var(--red-soft); color: var(--red); border-color: #f0c4c2; }
.sh-links { display: flex; flex-direction: column; }
.sh-link { display: flex; align-items: center; gap: 11px; padding: 11px 13px; }
.sh-link + .sh-link { border-top: 1px dashed var(--border); }
.sh-url-wrap { flex: 1; min-width: 0; }
.sh-url { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace; color: var(--primary); background: var(--surface-2); }
.sh-url:focus { background: var(--surface); border-color: var(--primary-2); }
.sh-note { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }
.sh-tag { flex: 0 0 auto; width: 34px; text-align: center; font-size: 11px; font-weight: 600; padding: 3px 0; border-radius: 6px; }
.sh-tag.pub { background: var(--green-soft); color: var(--green); }
.sh-tag.lan { background: var(--primary-soft); color: var(--primary); }
.sh-tag.local { background: var(--surface-2); color: var(--text-3); }
.sh-copy { flex: 0 0 auto; }
.sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 13px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 11.5px; color: var(--text-3); }

/* ===== 手机端适配（≤760px）：单栏 + 横向导航 + 资料表只留关键列 ===== */
@media (max-width: 760px) {
    .app-header { height: 48px; padding: 0 10px; }
    .app-header .app-title { font-size: 14px; }
    .user-menu > span:not(.user-avatar) { display: none; }
    .home-layout { grid-template-columns: 1fr; padding: 10px; gap: 12px; }
    #projectLayout { flex-direction: column; }
    .proj-menu, #projectLayout.folded .proj-menu {
        width: 100%; flex-direction: row; align-items: center; gap: 6px; overflow-x: auto;
        border-right: none; border-bottom: 1px solid var(--border); padding: 6px 8px;
    }
    .proj-nav { flex-direction: row; gap: 4px; }
    .proj-nav-item { width: auto; padding: 7px 9px; font-size: 13px; white-space: nowrap; }
    .proj-fold { display: none; }
    .project-view { padding: 10px; }
    .mat-toolbar { flex-wrap: wrap; gap: 5px; padding: 8px 10px; }
    .mat-tb-btn { padding: 6px 8px; font-size: 12px; }
    .mat-tb-search { flex: 1 1 100%; }
    .mat-body { flex-direction: column; min-height: 0; }
    /* 项目资料左侧文件夹树在手机上隐藏（见 #viewMaterials 规则）；其它用 .mat-tree 的页面保留 */
    .mat-tree { width: 100%; max-height: 170px; border-right: none; border-bottom: 1px solid var(--border); }
    .mat-table th:nth-child(4), .mat-table td:nth-child(4),
    .mat-table th:nth-child(6), .mat-table td:nth-child(6),
    .mat-table th:nth-child(7), .mat-table td:nth-child(7) { display: none; }
    /* 资料表砍成 6 列（☐/名称/备注名/创建人/修改人/操作）：一屏只放得下 ☐+名称+操作。
       上面那条通用规则按旧 9 列的列号写的，会把「操作」一起收掉，所以这里显式留回第 6 列。
       两张表都叫 .mat-table 但列数不同（资料 6 列 / BIM 4 列），只能按视图分别收。 */
    #viewMaterials .mat-table th:nth-child(3), #viewMaterials .mat-table td:nth-child(3),
    #viewMaterials .mat-table th:nth-child(4), #viewMaterials .mat-table td:nth-child(4),
    #viewMaterials .mat-table th:nth-child(5), #viewMaterials .mat-table td:nth-child(5) { display: none; }
    #viewMaterials .mat-table th:nth-child(6), #viewMaterials .mat-table td:nth-child(6) { display: table-cell; }
    #viewMaterials .mat-table { min-width: 0; }
    /* 手机上操作列放不下三个按钮，收回允许换行（配套下面 .mat-ops .btn 的手指尺寸） */
    #viewMaterials .mat-ops { white-space: normal; }
    /* BIM 表已砍成 4 列（名称/状态/构件/操作）：手机留 名称+状态，构件收掉，
       操作由上面那条通用规则收（长按菜单承担打开）。旧 7 列时收的是 1/4/5/6，
       照搬会把新的第 1 列「名称」藏掉。 */
    #viewBim .mat-table th:nth-child(3), #viewBim .mat-table td:nth-child(3) { display: none; }
    #viewBim .mat-table { min-width: 0; }
    .mat-table th, .mat-table td { padding: 7px 5px; font-size: 12.5px; }
    .mat-name { max-width: 44vw; }
    /* 操作列里最多四个按钮，收进 215/235px 的格子里必然挤爆：让它换行且按手指尺寸给够高 */
    .mat-ops .btn { min-height: 30px; padding: 4px 7px; font-size: 12px; margin: 1px 3px 1px 0; }
    .ctx-menu { max-width: 78vw; }
    .ctx-item { padding: 11px 16px; font-size: 14px; }
    /* 项目资料：手机只留右侧文件列表（含文件夹层级），左侧文件夹树太占地方，直接藏掉 */
    #viewMaterials .mat-tree { display: none !important; }
    #viewMaterials .mat-body { min-height: 0; }
    .bim-wrap { flex-direction: column; gap: 10px; padding: 8px 0; }
    .bim-left, .bim-right { flex: none; width: 100%; }
    .bim-tip { display: block; margin: 2px 0 0; }
    .modal-root { padding: 0; align-items: flex-end; }
    .modal, .modal.wide {
        max-width: 100%; padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
        max-height: 82vh; border-radius: 14px 14px 0 0;
    }
    .share-form { flex-direction: column; align-items: stretch; }
    .share-form input { min-width: 0; }
    .share-form .sh-gen { width: 100%; }
    .share-fed .share-chk { display: block; margin: 6px 0; }
    .fed-list { grid-template-columns: 1fr; }
    /* 地址行在手机上竖排：标签、地址、复制按钮各占一行，不然 URL 会被挤成几个字 */
    .sh-link { flex-wrap: wrap; gap: 8px; }
    .sh-tag { width: auto; padding: 2px 8px; }
    .sh-url-wrap { flex: 1 1 100%; order: 2; }
    .sh-link .sh-tag { order: 1; }
    .sh-link .sh-copy { order: 3; margin-left: auto; }
    .sh-foot { justify-content: flex-end; }
    .login-card { width: 100%; padding: 22px 18px; }
}

/* ============ 问题闭环列表：表头筛选 + 压缩网格行 + 分页 ============ */
/* 列宽要和 .issue-thead 完全一致，改一处要改两处，所以写在同一个选择器里 */
.issue-thead, .issue-card { grid-template-columns: 56px minmax(160px, 1.8fr) 72px minmax(120px, 1.2fr) 108px minmax(110px, 1.1fr) 88px; }
.issue-thead {
    display: grid; gap: 8px; padding: 8px 12px 6px; font-size: 11px; font-weight: 600;
    color: var(--text-3); background: var(--surface-2, #f3f5f8); border: 1px solid var(--border);
    border-radius: 8px 8px 0 0; border-bottom: none; align-items: end;
}
.issue-thead .thc { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.issue-thead .thc em { font-style: normal; line-height: 1.2; }
.hf {
    width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 4px;
    padding: 3px 6px; font-size: 11px; font-weight: 400; color: var(--text);
    background: var(--surface); min-width: 0;
}
.hf:focus { outline: none; border-color: var(--primary); }
.issue-list { display: flex; flex-direction: column; gap: 4px; }
.issue-card {
    display: grid; align-items: center; gap: 8px;
    padding: 5px 10px; border-radius: 6px; font-size: 12px;
    background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: .12s;
}
.issue-card:hover { box-shadow: var(--shadow); border-color: var(--primary-2); }
.c-no { display: flex; flex-direction: row; align-items: center; gap: 5px; font-weight: 700; color: var(--primary); }
.c-no input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: #1e5a74; cursor: pointer; flex-shrink: 0; }
.disp-no { font-variant-numeric: tabular-nums; font-size: 12px; }
.c-title { min-width: 0; }
.issue-title {
    font-weight: 600; font-size: 12.5px; line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.issue-sub {
    font-size: 11px; color: var(--text-3); margin-top: 1px;
    display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; align-items: center;
}
.issue-sub > * { flex-shrink: 0; }
.issue-sub .badge { padding: 0 6px; line-height: 16px; font-size: 10.5px; }
.cell-1 {
    display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; font-size: 11.5px; color: var(--text-2);
}
.c-who, .c-time { font-size: 11.5px; color: var(--text-2); min-width: 0; }
.c-op, .c-rv { font-size: 11.5px; color: var(--text-2); min-width: 0; }
.c-op .tl-meta, .c-rv .tl-meta { margin: 0; }
.c-rv .rv-ap { display: none; }
.c-act { display: flex; flex-direction: row; gap: 4px; align-items: center; flex-wrap: wrap; }
.c-act .btn { white-space: nowrap; padding: 2px 7px; font-size: 11px; line-height: 1.5; min-height: 0; }
.btn-xs { padding: 1px 6px !important; font-size: 11px !important; line-height: 1.5; min-height: 0; }
/* 列表里不再铺开标注截图（会把行高顶成卡片）；只留 📷 入口，详情里再看 */
.issue-screenshot { display: none; }
.b-st-approving { background: #e2f1f5; color: #0d6d80; }
/* 分页条 */
.issue-page {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 10px 4px 4px; font-size: 12.5px; color: var(--text-2);
}
.issue-page .ip-total b { color: var(--text); font-variant-numeric: tabular-nums; }
.issue-page .ip-size, .issue-page .ip-go { display: inline-flex; align-items: center; gap: 5px; }
.issue-page select, .issue-page input {
    border: 1px solid var(--border); border-radius: 5px; padding: 4px 7px;
    font-size: 12.5px; background: var(--surface); color: var(--text); width: auto;
}
.issue-page .ip-custom { width: 64px; }
.issue-page .ip-go input { width: 56px; }
.issue-page .ip-nav { display: inline-flex; align-items: center; gap: 8px; }
.issue-page #issPageInfo { font-variant-numeric: tabular-nums; min-width: 48px; text-align: center; }
.issue-page .btn:disabled { opacity: .45; cursor: default; }
/* 贴图区（新建问题 / 整改回复 / 复核 / 通过共用）：没有这组样式时粘贴的截图会按原始尺寸铺开 */
.paste-zone { border: 1px dashed var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 6px; font-size: 12px; color: var(--text-3); cursor: pointer; background: var(--surface-2); }
.paste-zone:hover { border-color: var(--primary); color: var(--text-2); }
.new-issue-imgs { flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ni-thumb { position: relative; width: 110px; height: 78px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; flex: 0 0 auto; }
.ni-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ni-x { position: absolute; top: 2px; right: 4px; cursor: pointer; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 50%; width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 12px; }
@media (max-width: 1080px) {
    .issue-thead { display: none; }
    .issue-card { grid-template-columns: 46px 1fr; padding: 8px 10px; }
    .c-title, .c-who, .c-op, .c-time, .c-rv, .c-act { grid-column: 2; }
    .c-no { grid-row: 1 / span 6; flex-direction: column; align-items: flex-start; }
    .c-act { flex-direction: row; flex-wrap: wrap; }
    .cell-1 { white-space: normal; }
}

/* ============ 复制到…（目标文件夹选择器） ============ */
.mat-tb-btn.mat-tb-hot { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.cp-tip { font-size: 13px; color: var(--text-2); margin-bottom: 10px; word-break: break-all; }
.cp-crumb { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.cp-crumb-item { cursor: pointer; padding: 2px 5px; border-radius: 4px; }
.cp-crumb-item:hover { color: var(--primary); background: var(--primary-soft); }
.cp-sep { color: var(--text-3); }
.cp-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; }
.cp-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.cp-item:hover { background: var(--primary-soft); }
.cp-item.cp-bad { opacity: .45; cursor: not-allowed; }
.cp-item.cp-bad:hover { background: none; }
.cp-badge { margin-left: auto; font-size: 11px; color: var(--text-3); }
.cp-empty { padding: 18px; text-align: center; color: var(--text-3); font-size: 12px; }
.cp-oklist { max-height: 30vh; overflow-y: auto; font-size: 12px; color: var(--green); margin: 6px 0; }
.cp-badlist { max-height: 30vh; overflow-y: auto; font-size: 12px; color: var(--red); margin: 6px 0; }
