
/* ========== 设计变量（首页 v4 起逐步统一，旧样式仍用硬编码色值） ========== */
:root{
  --pri:#7c3aed; --pri-h:#6d28d9; --pri-soft:#ede9fe; --pri-soft2:#f5f3ff;
  --amber:#d97706; --amber-bg:#fef3c7; --amber-d:#a16207; --amber-line:#fcd34d;
  --green:#22c55e; --green-d:#15803d; --red:#ef4444;
  --t1:#1f2937; --t2:#4b5563; --t3:#6b7280; --t4:#9ca3af;
  --line:#eef0f4; --line2:#e5e7eb;
  --card:#fff; --radius:14px;
  --shadow:0 2px 8px rgba(17,24,39,.06); --shadow-h:0 4px 14px rgba(17,24,39,.10);
  --bg-home:#f4f5fa;
}

* { margin:0; padding:0; box-sizing:border-box; }
/* 全站统一浅灰白底（2026-10-24：取消首页/其他页双风格，渐变只留顶栏 3px 条） */
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-home);
  min-height: 100vh;
  color: #1f2937;
  padding-bottom: 40px;
}
button { font-family: inherit; }
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius:3px; }

/* ========== 顶部导航 ========== */
.topnav {
  position: sticky; top:0; z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  display: flex; align-items: center;
  padding: 0 24px; height: 60px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
/* 渐变只留顶栏这一小条 */
.topnav::before {
  content: ''; position: absolute; left:0; right:0; top:0; height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}
.logo { font-weight: 800; font-size: 18px; color:#7c3aed; margin-right: 32px; display:flex; align-items:center; gap:8px;}
.logo svg { width:22px; height:22px; }
.tabs { display:flex; gap:4px; flex:1; flex-wrap:wrap;}
.tab {
  padding: 8px 16px; border-radius: 8px; cursor:pointer;
  font-size: 14px; color:#4b5563; transition: all .2s; border:none; background:transparent;
}
.tab:hover { background:#f3f4f6; }
.tab.active { background:#7c3aed; color:#fff; }
.nav-right { display:flex; align-items:center; gap:12px; }
.btn-primary {
  background:#7c3aed; color:#fff; border:none; padding:8px 16px;
  border-radius:8px; cursor:pointer; font-size:14px; display:flex; align-items:center; gap:6px;
}
.btn-primary:hover { background:#6d28d9; }
.bell { position:relative; cursor:pointer; width:38px; height:38px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:#f3f4f6;}
.bell .dot { position:absolute; top:6px; right:6px; width:8px; height:8px; background:#ef4444; border-radius:50%; border:1.5px solid #fff;}

/* ========== 布局 ========== */
.container { width: 100%; max-width: 1840px; margin: 20px auto; padding: 0 24px; }
.view { display:none; }
.view.active { display:block; }

/* ========== 通用卡片 ========== */
.card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow); margin-bottom: 16px;
}

/* ========== 通用统计卡 / 进度条（复盘中心等页面复用） ========== */
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:16px; }
.stat-card {
  background:var(--card); border:1px solid var(--line); border-radius:12px;
  padding:16px 18px; box-shadow:var(--shadow); display:flex; align-items:center; gap:12px; min-width:0;
}
.stat-card .stat-num { font-size:24px; font-weight:800; color:var(--t1); line-height:1.2; }
.stat-card .stat-label { font-size:12.5px; color:var(--t3); }
.progress-fill { height:100%; background:var(--pri); border-radius:3px; transition:width .3s; }

/* ========== 通用小组件 ========== */
/* 步骤徽章：锁定 / 可并行 */
.badge.badge-lock { background:#fef3c7; color:#b45309; padding:1px 6px; font-size:11px; }
.badge.badge-parallel { background:#e0e7ff; color:#4338ca; margin-left:6px; padding:1px 7px; font-size:11px; }

/* 聊天「思考中」动画 */
.dot-typing { color:var(--t4); font-size:13px; }
.dot-typing::after { content:''; animation:dotBlink 1.2s steps(4,end) infinite; }
@keyframes dotBlink { 0%{ content:''; } 25%{ content:'.'; } 50%{ content:'..'; } 75%{ content:'...'; } }

/* 随手存一条（弹窗） */
.quick-capture textarea {
  width:100%; padding:10px 12px; border:1px solid var(--line2); border-radius:8px;
  font-size:14px; font-family:inherit; outline:none; resize:vertical; min-height:96px; margin-bottom:14px;
}
.quick-capture textarea:focus { border-color:var(--pri); }
.quick-capture .form-group textarea { min-height:auto; margin-bottom:0; }

/* 日常线内容列表（弹窗内） */
.daily-item-row { border-bottom:1px solid var(--line); padding:12px 0; }
.daily-item-row:last-child { border-bottom:none; }
.di-title { font-weight:700; font-size:14px; color:var(--t1); margin-bottom:4px; }
.di-summary { font-size:12.5px; color:var(--t3); line-height:1.6; }
.di-touch, .di-expect { font-size:12.5px; color:#4c1d95; line-height:1.6; margin-top:2px; }
.di-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:8px; font-size:12px; color:var(--t4); }

/* AI 拆解出的候选主线 */
.cand-item { display:flex; align-items:flex-start; gap:10px; padding:10px; border-radius:8px; cursor:pointer; }
.cand-item:hover { background:#fff; }
.cand-check { margin-top:3px; flex-shrink:0; }
.cand-dep { font-size:11.5px; color:var(--t4); margin-top:3px; }
.cand-status { border:1px solid var(--line2); border-radius:6px; font-size:12px; padding:3px 4px; background:#fff; flex-shrink:0; }

/* ========== badge ========== */
.badge { display:inline-block; padding:2px 10px; border-radius:10px; font-size:12px; font-weight:600; white-space:nowrap;}
.badge-pri-high { background:#ede9fe; color:#7c3aed; }
.badge-pri-mid { background:#fef3c7; color:#d97706; }
.badge-pri-low { background:#f3f4f6; color:#6b7280; }
.badge-status-doing { background:#dcfce7; color:#16a34a; }
.badge-status-hold { background:#ffedd5; color:#ea580c; }
.badge-status-drop { background:#f3f4f6; color:#6b7280; }
.badge-step-done { background:#dcfce7; color:#16a34a; }
.badge-step-doing { background:#dbeafe; color:#2563eb; }
.badge-step-todo { background:#f3f4f6; color:#6b7280; }

/* 触屏无 hover：直接展示，避免信息不可见 */
@media (hover:none){ .line-extra { display:block; } }

.dir-label { font-size:11px; color:#fff; background:#9ca3af; border-radius:4px; padding:1px 6px; margin-left:6px;}

/* ========== 收件箱 ========== */
.inbox-tabs { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap;}
.inbox-tab { padding:8px 16px; border-radius:20px; background:#fff; border:1px solid var(--line); cursor:pointer; font-size:13px; color:var(--t2);}
.inbox-tab:hover { border-color:#d8dce3; }
.inbox-tab.active { background:#7c3aed; color:#fff; border-color:#7c3aed; }
.problem-item { background:#fff; border-radius:14px; padding:16px 20px; border:1px solid var(--line); box-shadow:var(--shadow); margin-bottom:12px; display:flex; align-items:center; gap:14px;}
.status-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0;}
.dot-pending { background:#facc15;}
.dot-answered { background:#22c55e;}
.dot-upgraded { background:#a855f7;}
.problem-main { flex:1; min-width:0;}
.problem-title { font-weight:700; font-size:15px; margin-bottom:4px;}
.problem-meta { font-size:12px; color:#9ca3af;}
.problem-actions { display:flex; gap:6px; align-items:center; flex-shrink:0;}
.btn-mini-ai { background:#fef3c7; color:#d97706; border:none; padding:6px 12px; border-radius:6px; font-size:12px; cursor:pointer; font-weight:600;}
.ai-analysis-box { background:#f0fdf4; border-left:3px solid #22c55e; padding:10px 14px; border-radius:6px; margin-top:8px; font-size:13px; color:#166534; line-height:1.6; display:none;}
.ai-analysis-box.open { display:block;}
.ai-stream-box { background:#f5f3ff; border-left:3px solid #7c3aed; padding:10px 14px; border-radius:6px; margin-top:8px; font-size:13px; color:#4c1d95; line-height:1.7; white-space:pre-wrap;}
.ai-stream-box .stream-label { font-weight:700; color:#7c3aed; margin-bottom:4px; display:block;}
.ai-stream-box .stream-cursor { display:inline-block; width:8px; height:14px; background:#7c3aed; vertical-align:-2px; animation:blink 1s steps(2) infinite;}
@keyframes blink { 50% { opacity:0; } }

/* ========== 日常线 ========== */
.daily-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:20px;}
.daily-grid-compact { grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; }
.daily-card { background:#fff; border-radius:14px; padding:20px; box-shadow:var(--shadow); cursor:pointer; position:relative; transition:transform .15s, box-shadow .15s; border-top:4px solid #7c3aed;}
.daily-card:hover { transform:translateY(-3px); box-shadow:0 10px 24px rgba(0,0,0,0.12);}
.daily-card .dc-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; margin-bottom:12px; color:#fff;}
.daily-card .dc-name { font-weight:700; font-size:16px; margin-bottom:4px;}
.daily-card .dc-desc { font-size:12px; color:#6b7280; line-height:1.5; min-height:34px;}
.daily-card .dc-count { margin-top:12px; font-size:12px; color:#9ca3af; display:flex; align-items:center; justify-content:space-between;}
.daily-card .dc-badge { font-size:11px; padding:2px 8px; border-radius:10px; background:#f3f4f6; color:#6b7280;}
/* ========== 顶部「+新建」下拉 ========== */
.nav-new-wrap { position:relative; }
.nav-new-menu {
  position:absolute; right:0; top:calc(100% + 8px); min-width:180px;
  background:#fff; border-radius:12px; box-shadow:0 10px 32px rgba(0,0,0,0.18);
  padding:6px; z-index:80; display:none; flex-direction:column;
}
.nav-new-menu.open { display:flex; animation:popIn .15s ease-out; }
@keyframes popIn { from { opacity:0; transform:translateY(-6px) scale(0.98);} to { opacity:1; transform:translateY(0) scale(1);} }
.nav-new-menu-item { display:flex; align-items:center; gap:10px; padding:10px 14px; border:none; background:transparent; border-radius:8px; cursor:pointer; font-size:14px; color:#374151; text-align:left; width:100%; box-sizing:border-box; font-family:inherit;}
.nav-new-menu-item:hover { background:#f5f3ff; color:#7c3aed;}
.nav-new-menu-item .mi-icon { font-size:16px; width:22px; text-align:center; flex-shrink:0;}

/* ========== 右下角 AI 头像 ========== */
#aiAvatar {
  position:fixed; right:24px; bottom:24px; width:48px; height:48px; border-radius:50%;
  background: #7c3aed;
  color:#fff; border:none; cursor:pointer; z-index:90;
  box-shadow:0 4px 14px rgba(17,24,39,0.18);
  display:flex; align-items:center; justify-content:center;
  transition: transform .15s;
}
#aiAvatar:hover { transform:scale(1.08); }

/* UI-6（审计批次 III 2026-11-06）：主线详情执行路径卡头部按钮与右下角固定 AI 悬浮球
   在特定滚动位置视口重叠（首次点击易点空）——头部操作区预留悬浮球安全距离（10-28 UI-6 建议案 A） */
.detail-right .path-head { padding-right: 60px; }
#aiAvatar:active { transform:scale(0.96); }
#aiAvatar .ai-dot { position:absolute; top:2px; right:2px; width:10px; height:10px; background:#ef4444; border-radius:50%; border:2px solid #fff; display:none;}
#aiAvatar .ai-dot.show { display:block; }

/* ========== 时间线 ========== */
.timeline-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; flex-wrap:wrap; gap:12px;}
.range-group { display:flex; gap:6px; background:#fff; border:1px solid var(--line); box-shadow:var(--shadow); padding:4px; border-radius:10px;}
.range-btn { padding:6px 14px; border:none; background:transparent; border-radius:8px; cursor:pointer; font-size:13px; color:var(--t2);}
.range-btn:hover { background:#f3f4f6; }
.range-btn.active { background:#7c3aed; color:#fff;}
.search-box { padding:8px 14px; border-radius:8px; border:1px solid var(--line2); background:#fff; font-size:13px; width:220px; outline:none; color:var(--t1);}
.search-box::placeholder { color:var(--t4); }
.search-box:focus { border-color:var(--pri); }
.timeline-wrap { background:#fff; border-radius:14px; padding:30px 20px; border:1px solid var(--line); box-shadow:var(--shadow); overflow-x:auto; position:relative; min-height:calc(100vh - 380px);}
/* 轴线跟随内容宽度一起横向滚动 */
.timeline-nodes { display:flex; justify-content:flex-start; gap:12px; position:relative; padding-top:60px; flex-wrap:nowrap; width:max-content; min-width:100%;}
.timeline-nodes::before { content:''; position:absolute; left:0; right:0; top:66px; height:3px; background:#e5e7eb; z-index:0;}
/* flex:0 0 定宽 —— 否则节点多时会被压缩到几十像素，文字竖排挤成一团 */
.tl-node { flex:0 0 120px; width:120px; display:flex; flex-direction:column; align-items:center; cursor:pointer;}
.tl-dot { border-radius:50%; display:flex; align-items:center; justify-content:center; position:relative; z-index:2;}
.tl-dot.doing { background:#22c55e; border:3px solid #bbf7d0;}
.tl-dot.done { background:#a855f7; border:3px solid #e9d5ff;}
.tl-dot.hold { background:#fff; border:3px dashed #f97316;}
.tl-time { font-size:11px; color:#9ca3af; margin-top:10px;}
.tl-name { font-size:12px; font-weight:600; color:#374151; text-align:center; margin-top:2px;}
.tl-detail { background:#fff; border-radius:14px; padding:20px; box-shadow:var(--shadow); margin-top:16px;}
.tl-detail h4 { font-size:16px; font-weight:700; margin-bottom:16px;}
.vert-timeline { border-left:2px solid #e5e7eb; margin-left:8px; padding-left:20px;}
.vert-item { position:relative; padding-bottom:18px;}
.vert-item::before { content:''; position:absolute; left:-26px; top:4px; width:10px; height:10px; border-radius:50%; background:#7c3aed; border:2px solid #fff; box-shadow:0 0 0 2px #7c3aed;}
.vert-time { font-size:12px; color:#9ca3af;}
.vert-label { font-size:14px; color:#1f2937;}

/* ========== 复盘中心 ========== */
.review-row { background:#fff; border-radius:14px; padding:16px 20px; box-shadow:var(--shadow); margin-bottom:12px; cursor:pointer;}
.review-row-head { display:flex; align-items:center; gap:12px;}
.review-row-head .name { flex:1; font-weight:700; font-size:15px;}
.review-row-head .time { font-size:12px; color:#9ca3af;}
.review-progress { height:6px; background:#f3f4f6; border-radius:3px; margin-top:10px; overflow:hidden;}
.review-detail { display:none; margin-top:14px; padding-top:14px; border-top:1px solid #f3f4f6; font-size:13px; line-height:1.8;}
.review-detail.open { display:block;}
.review-detail .block { margin-bottom:8px;}
.review-detail .lbl { font-weight:700; color:#7c3aed;}
/* 复盘卡片：行内进度条 + 分类标签色（需求5） */
.rr-prog { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#6b7280; }
.rr-prog .rr-bar { display:inline-block; width:60px; height:6px; background:#f3f4f6; border-radius:3px; overflow:hidden; vertical-align:middle; }
.rr-prog .rr-bar i { display:block; height:100%; background:linear-gradient(90deg,#8b5cf6,#7c3aed); border-radius:3px; }
.rr-prog b { color:#1f2937; }
.review-detail .lbl-good { color:#16a34a; }
.review-detail .lbl-hold { color:#ea580c; }
.review-detail .lbl-next { color:#2563eb; }
.ai-monthly { background:#fef9c3; border-radius:14px; padding:20px; box-shadow:var(--shadow);}
.ai-monthly h4 { color:#a16207; margin-bottom:12px; display:flex; align-items:center; gap:8px;}
.ai-monthly .block { margin-bottom:8px; font-size:14px; line-height:1.7;}
.ai-monthly .lbl { font-weight:700;}

/* ========== 技能管理 ========== */
.skill-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px;}
.skill-card { background:#fff; border-radius:14px; padding:20px; box-shadow:var(--shadow);}
.skill-name { font-weight:700; font-size:16px; margin-bottom:6px;}
.skill-intro { font-size:13px; color:#6b7280; margin-bottom:14px; line-height:1.5; min-height:39px;}
.skill-meta { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; font-size:12px; color:#9ca3af;}
.stars { display:flex; gap:2px;}
.star { width:16px; height:16px; }
.skill-btns { display:flex; gap:8px;}
.btn-test { flex:1; background:#7c3aed; color:#fff; border:none; padding:8px; border-radius:8px; cursor:pointer; font-size:13px; font-weight:600;}
.btn-edit { flex:1; background:#f3f4f6; color:#4b5563; border:none; padding:8px; border-radius:8px; cursor:pointer; font-size:13px;}

/* ========== 知识库 ========== */
.kb-layout { display:grid; grid-template-columns:240px 1fr; gap:16px;}
.kb-tree { background:#fff; border-radius:14px; padding:16px; box-shadow:var(--shadow); height:fit-content;}
.kb-cat { font-weight:700; font-size:14px; padding:8px 6px; cursor:pointer; display:flex; align-items:center; gap:6px;}
.kb-cat:hover { background:#f9fafb; border-radius:6px;}
.kb-cat.active { color:#7c3aed;}
/* 折叠箭头：独立点击位（点箭头折叠/展开，点名称选中分类），KB-1 修复 2026-11-02 */
.kb-fold { display:inline-block; width:14px; flex:none; color:#9ca3af; font-size:11px; cursor:pointer; user-select:none; text-align:center;}
.kb-fold:hover { color:#7c3aed;}
.kb-sub { padding:5px 6px 5px 24px; font-size:13px; color:#6b7280; cursor:pointer; border-radius:6px;}
.kb-sub:hover { background:#f3f4f6;}
.kb-sub.active { background:#ede9fe; color:#7c3aed;}
.kb-main .search-box { width:100%; margin-bottom:16px; padding:10px 16px;}
.doc-card { background:#fff; border-radius:14px; padding:18px 20px; box-shadow:var(--shadow); margin-bottom:12px;}
.doc-title { font-weight:700; font-size:15px; margin-bottom:6px;}
.doc-summary { font-size:13px; color:#6b7280; margin-bottom:12px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.doc-tags { display:flex; gap:6px; flex-wrap:wrap;}
.doc-tag { background:#ede9fe; color:#7c3aed; padding:2px 10px; border-radius:10px; font-size:12px;}

/* ========== Markdown 渲染（AI 回复） ========== */
.bubble .md-h, .ai-analysis-box .md-h, .ai-stream-box .md-h { font-weight:700; margin:8px 0 4px; line-height:1.4;}
.bubble h1.md-h, .ai-analysis-box h1.md-h, .ai-stream-box h1.md-h { font-size:18px;}
.bubble h2.md-h, .ai-analysis-box h2.md-h, .ai-stream-box h2.md-h { font-size:16px;}
.bubble h3.md-h, .ai-analysis-box h3.md-h, .ai-stream-box h3.md-h { font-size:15px;}
.bubble .md-p, .ai-analysis-box .md-p, .ai-stream-box .md-p { margin:4px 0; line-height:1.7;}
.bubble .md-ul, .ai-analysis-box .md-ul, .ai-stream-box .md-ul,
.bubble .md-ol, .ai-analysis-box .md-ol, .ai-stream-box .md-ol { margin:4px 0; padding-left:22px;}
.bubble .md-ul, .ai-analysis-box .md-ul, .ai-stream-box .md-ul { list-style:disc;}
.bubble .md-ol, .ai-analysis-box .md-ol, .ai-stream-box .md-ol { list-style:decimal;}
.bubble .md-ul li, .ai-analysis-box .md-ul li, .ai-stream-box .md-ul li,
.bubble .md-ol li, .ai-analysis-box .md-ol li, .ai-stream-box .md-ol li { margin:2px 0; line-height:1.7;}
.bubble .md-code, .ai-analysis-box .md-code, .ai-stream-box .md-code {
  background:#f3f4f6; padding:1px 6px; border-radius:4px; font-family:Consolas,Monaco,monospace; font-size:12.5px; color:#be185d;
}
.bubble .md-pre, .ai-analysis-box .md-pre, .ai-stream-box .md-pre {
  background:#1f2937; color:#e5e7eb; padding:10px 12px; border-radius:8px; overflow-x:auto; margin:6px 0; font-size:12.5px; line-height:1.5;
}
.bubble .md-pre code, .ai-analysis-box .md-pre code, .ai-stream-box .md-pre code {
  background:transparent; color:inherit; padding:0; font-family:Consolas,Monaco,monospace;
}
.product-card { background:#fff; border-radius:10px; padding:14px; margin-bottom:12px; box-shadow:0 1px 4px rgba(0,0,0,0.08);}
.product-card .p-title { font-weight:700; font-size:14px; margin-bottom:4px;}
.product-card .p-meta { font-size:12px; color:#9ca3af; margin-bottom:10px;}
.p-eval { font-size:12px; line-height:1.7; margin-bottom:4px;}
.p-eval .good { color:#16a34a; }
.p-eval .bad { color:#ea580c; }
.p-eval .sug { color:#7c3aed; }
.product-card .p-btn { margin-top:8px; background:#f3f4f6; border:none; padding:5px 12px; border-radius:6px; font-size:12px; cursor:pointer;}
.drawer-input { padding:12px 16px; border-top:1px solid #f3f4f6; display:flex; gap:8px;}
.drawer-input input { flex:1; padding:10px 12px; border:1px solid #e5e7eb; border-radius:8px; font-size:14px; outline:none;}
.drawer-input button { background:#7c3aed; color:#fff; border:none; border-radius:8px; padding:0 16px; cursor:pointer; display:flex; align-items:center;}
.empty-tip { text-align:center; color:#9ca3af; font-size:13px; padding:30px 0;}

/* ========== 模态框 ========== */
.modal-mask { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:110; display:none; align-items:center; justify-content:center;}
.modal-mask.open { display:flex;}
.modal { background:#fff; border-radius:14px; padding:24px; width:460px; max-width:92vw; max-height:88vh; overflow-y:auto; box-shadow:0 10px 40px rgba(0,0,0,0.2);}
.modal h3 { font-size:18px; font-weight:700; margin-bottom:16px;}
.form-group { margin-bottom:14px;}
.form-group label { display:block; font-size:13px; color:#4b5563; margin-bottom:6px; font-weight:600;}
.form-group input, .form-group textarea, .form-group select {
  width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:8px; font-size:14px; font-family:inherit; outline:none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color:#7c3aed;}
/* 登录/注册弹窗输入框：显式紫色 focus（覆盖浏览器跟随系统强调色的橙色默认环，评审 X26） */
.auth-input { width:100%; box-sizing:border-box; padding:9px 12px; border:1px solid #e5e7eb; border-radius:8px; margin:6px 0 12px; font-size:14px; font-family:inherit; outline:none; }
.auth-input:focus { border-color:#7c3aed; box-shadow:0 0 0 3px rgba(124, 58, 237, .12); }
.form-group textarea { min-height:80px; resize:vertical;}
.modal-btns { display:flex; gap:10px; justify-content:flex-end; margin-top:18px; flex-wrap:wrap;}
.btn-cancel { background:#f3f4f6; color:#4b5563; border:none; padding:9px 18px; border-radius:8px; cursor:pointer; font-size:14px;}
.btn-confirm { background:#7c3aed; color:#fff; border:none; padding:9px 18px; border-radius:8px; cursor:pointer; font-size:14px; font-weight:600;}
.btn-danger { background:#ef4444; color:#fff; border:none; padding:9px 18px; border-radius:8px; cursor:pointer; font-size:14px; font-weight:600;}
.test-layout { display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.test-layout textarea { min-height:180px; }
.test-output { background:#f9fafb; border:1px dashed #d1d5db; border-radius:8px; padding:12px; min-height:180px; font-size:13px; color:#6b7280; overflow-y:auto;}
.decompose-list { background:#f5f3ff; border-radius:8px; padding:10px 14px; margin-top:10px; font-size:13px; color:#4c1d95;}
.decompose-list .d-item { padding:6px 0; border-bottom:1px dashed #ddd6fe;}
.decompose-list .d-item:last-child { border-bottom:none;}

/* ========== Toast ========== */
.toast { position:fixed; top:80px; left:50%; transform:translateX(-50%); background:#1f2937; color:#fff; padding:10px 20px; border-radius:8px; font-size:14px; z-index:200; opacity:0; transition:opacity .2s; pointer-events:none; max-width:80vw; box-shadow:0 8px 24px rgba(0,0,0,0.25);}
.toast.show { opacity:1; pointer-events:auto;}
.toast.err { background:#b91c1c;}

.section-title { color:var(--t1); font-size:22px; font-weight:800; margin-bottom:16px; display:flex; justify-content:space-between; align-items:center;}
.section-desc { color:var(--t3); font-size:13px; line-height:1.7; margin-bottom:16px; }
@media (max-width: 900px){
  .stat-grid, .skill-grid { grid-template-columns:repeat(2,1fr);}
  .dual-col { grid-template-columns:1fr;}
  .kb-layout { grid-template-columns:1fr;}
}


/* AI 等待通用旋转（app.js 拆解 loading 等处内联引用） */
@keyframes mdSpin { to { transform:rotate(360deg); } }
.btn-mini { background:#f5f3ff; color:#7c3aed; border:1px solid #ddd6fe; padding:4px 10px;
  border-radius:6px; font-size:12px; cursor:pointer; }
.btn-mini:hover { background:#ede9fe; }

/* ================= 布局壳：左侧固定展开图标导航（190px）+ 顶栏高频区 =================
 * 固定显示图标+文字（无悬停动效、无遮挡）；SVG 线性图标统一灰，active 紫。 */
.shell { display: flex; min-height: 100vh; background: #f6f7fa; }
.sidebar { width: 190px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; background: #fff; border-right: 1px solid #f0f0f4;
  padding: 14px 12px; box-sizing: border-box; z-index: 40;
  display: flex; flex-direction: column; }
.rlogo { display: flex; align-items: center; gap: 10px; padding: 0 10px; margin-bottom: 12px; }
.rlogo-ball { width: 30px; height: 30px; border-radius: 50%; background: #7c3aed; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rlogo-ball svg { width: 17px; height: 17px; }
.rlogo-tx { font-size: 16px; font-weight: 800; color: #7c3aed; }

.ri { display: flex; align-items: center; gap: 12px; border: none; background: transparent;
  height: 40px; padding: 0 12px; border-radius: 11px; cursor: pointer; position: relative;
  color: #6b7280; transition: background .15s, color .15s; text-align: left; width: 100%; }
.ri:hover { background: #f5f5f8; color: #374151; }
.ri.active { background: #ede9fe; color: #7c3aed; }
.ri.active::before { content: ''; position: absolute; left: -12px; top: 11px;
  width: 3px; height: 18px; border-radius: 2px; background: #7c3aed; }
.ri .ri-ic { width: 20px; height: 20px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; }
.ri .ri-ic svg { width: 20px; height: 20px; }
.ri .ri-tx { font-size: 13.5px; font-weight: 500; }
.ri.active .ri-tx { font-weight: 700; }
.ri-set { margin-top: auto; }
.rsep { height: 1px; background: #f0f0f4; margin: 7px 12px; flex-shrink: 0; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50; height: 54px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}
.topbar::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}
.top-chips { display: flex; gap: 4px; }
/* 顶栏是导航不是按钮：文字+下划线，不做胶囊（用户拍板治"看着像添加按钮"） */
.chip { padding: 6px 10px; border-radius: 0; border: none; background: transparent;
  font-size: 13.5px; color: #6b7280; cursor: pointer; transition: color .15s; font-weight: 500;
  position: relative; }
.chip:hover { background: transparent; color: #7c3aed; }
.chip.active { background: transparent; color: #7c3aed; font-weight: 700; }
.chip.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0;
  height: 2px; border-radius: 2px; background: #7c3aed; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
@media (max-width: 860px) {
  .sidebar { width: 64px; padding: 12px 0; }
  .sidebar .ri { justify-content: center; padding: 0; gap: 0; }
  .sidebar .ri .ri-tx, .sidebar .rlogo-tx, .sidebar .rsep { display: none; }
  .sidebar .rlogo { justify-content: center; padding: 0; }
  .top-chips { display: none; }   /* 窄屏收起顶栏高频区，图标轨即全量入口 */
}

/* ---- 新建主线三部曲向导 ---- */
.nl-steps { display:flex; align-items:center; gap:8px; margin-bottom:14px; }
.nl-steps .ns { font-size:13px; color:#9ca3af; padding:4px 10px; border-radius:999px; background:#f3f4f6; white-space:nowrap; }
.nl-steps .ns.cur { background:#ede9fe; color:#7c3aed; font-weight:700; }
.nl-steps .ns.done { background:#dcfce7; color:#15803d; }
.nl-steps .ns-sep { color:#d1d5db; font-size:12px; }
.nl-loading { display:flex; align-items:center; gap:10px; padding:18px 12px; color:#6b7280; font-size:13.5px; }
.nl-spin { width:15px; height:15px; border:2px solid #ddd6fe; border-top-color:#7c3aed; border-radius:50%;
           display:inline-block; animation:mdSpin .8s linear infinite; flex-shrink:0; }
.nl-mod { background:#fff; border:1px solid var(--line); border-radius:10px; padding:10px 14px; margin-bottom:10px; }
.nl-mod-t { font-size:13.5px; font-weight:700; color:#374151; margin-bottom:6px; }
.nl-srow { display:flex; align-items:center; gap:8px; padding:7px 4px; border-top:1px dashed #f0f0f4; }
.nl-srow:first-of-type { border-top:none; }
.nl-srow-main { flex:1; min-width:0; font-size:13px; color:var(--t1); }
.nl-swhy { color:#9ca3af; font-size:12.5px; }
.nl-sedit { color:#7c3aed; font-size:12.5px; cursor:pointer; flex-shrink:0; }
.nl-cand { display:flex; gap:8px; align-items:flex-start; padding:8px 10px; border:1px solid var(--line); border-radius:10px; margin-bottom:8px; font-size:13px; cursor:pointer; }
.nl-cand:hover { background:#f5f3ff; }

/* ---- 首页随手记条 ---- */
.quickbar { display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--line);
            border-radius:12px; padding:10px 12px; margin-bottom:14px; }
.quickbar input { flex:1; min-width:0; border:none; outline:none; font-size:14px; background:transparent; color:var(--t1); }
.quickbar input::placeholder { color:#9ca3af; }
.qb-chip { border:1px solid #e5e7eb; background:#fafafa; color:#374151; font-size:12.5px; padding:6px 10px;
           border-radius:999px; cursor:pointer; white-space:nowrap; flex-shrink:0; }
.qb-chip:hover { background:#f5f3ff; border-color:#ddd6fe; color:#7c3aed; }

/* ---- 随手记条右侧今日信息 + 进行中区行动徽章 ---- */
.qb-meta { display:flex; gap:12px; margin-left:auto; font-size:12px; color:#9ca3af; white-space:nowrap; flex-shrink:0; }
.qb-meta b { color:#6b7280; }
.sec-badge { display:inline-flex; gap:6px; margin-left:10px; }
.sec-badge-item { font-size:12px; padding:2px 8px; border-radius:999px; background:#ede9fe; color:#7c3aed; }
.sec-badge-item.warn { background:#fef2f2; color:#b91c1c; }

/* ---- v23.1 研发资产中心左侧独立菜单（文档/流程/组），替代顶部横排 tab 与右上角下拉 ---- */
.al-smenu { display:flex; flex-direction:column; gap:6px; min-width:118px; flex-shrink:0; }
.al-smenu .al-tab { display:block; width:100%; text-align:left; padding:9px 13px;
  border:1px solid var(--line2); border-radius:10px; background:var(--card);
  font-size:13.5px; color:var(--t2); cursor:pointer; transition:background .15s,border-color .15s; }
.al-smenu .al-tab:hover { background:var(--pri-soft2); border-color:#ddd6fe; }
.al-smenu .al-tab.active { background:var(--pri); border-color:var(--pri); color:#fff; font-weight:600; }

/* ---- v23.2 全局兜底：hidden 属性优先级高于内联 display（根治下拉菜单叠印复发，覆盖 kbToolsMenu 等同款写法） ---- */
[hidden] { display:none !important; }
