/* ===== 框架区样式：随需求不变，内容差异只体现在数据文件 ===== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: #1f2329; background: #f5f6f8;
  overflow: hidden;
}
.hidden { display: none !important; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #c9cdd4; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 布局骨架 ===== */
.app { height: 100vh; display: flex; flex-direction: column; }
.layout-body { flex: 1; display: flex; min-height: 0; }

/* ===== 标题栏（40px 深色紧凑，下方无 border） ===== */
.header {
  height: 40px; flex-shrink: 0; background: #1f2329; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-icon {
  width: 20px; height: 20px; border-radius: 4px; background: #1677ff;
  display: flex; align-items: center; justify-content: center;
}
.header-icon svg { width: 13px; height: 13px; }
.header-title { font-size: 13px; font-weight: 600; }
.header-tags { display: flex; gap: 8px; }
.header-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.85);
}

/* ===== 左侧菜单（220px） ===== */
.sidebar {
  width: 220px; flex-shrink: 0; background: #fff;
  border-right: 1px solid #e5e6e8; overflow-y: auto;
  display: flex; flex-direction: column;
}
.prd-btn {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 8px 0; padding: 8px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: #4e5969; cursor: pointer;
}
.prd-btn:hover { background: #f2f3f5; }
.prd-btn.active { background: #e6f4ff; color: #1677ff; }
.prd-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-divider { height: 1px; background: #e5e6e8; margin: 4px 8px; }
.menu-section { flex: 1; padding: 4px 0 16px; }
.menu-group-label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 6px; font-size: 12px; font-weight: 600; color: #1f2329;
}
.menu-group-label svg { width: 14px; height: 14px; color: #4e5969; flex-shrink: 0; }
.menu-subgroup-label {
  padding: 8px 16px 4px 30px; font-size: 12px; font-weight: 600; color: #1f2329;
}
.menu-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; margin: 0 8px; border-radius: 6px;
  font-size: 13px; color: #4e5969; cursor: pointer;
}
.menu-item:hover { background: #f2f3f5; }
.menu-item.active { background: #e6f4ff; color: #1677ff; }
.menu-item.menu-item-sub { padding-left: 46px; margin: 0; border-radius: 0; }
.menu-item .menu-empty-tag {
  margin-left: auto; font-size: 10px; color: #b0b4ba;
  border: 1px solid #e5e6e8; border-radius: 999px; padding: 0 6px; line-height: 16px;
}

/* ===== 内容区 ===== */
.content { flex: 1; min-width: 0; overflow: hidden; position: relative; }

/* --- 整体 PRD 视图（目录 + A4 纸张） --- */
.prd-view { display: flex; height: 100%; }
.prd-toc {
  width: 220px; flex-shrink: 0; background: #fff;
  border-right: 1px solid #e5e6e8; overflow-y: auto; padding: 12px 0;
}
.toc-item {
  padding: 7px 16px; font-size: 13px; color: #4e5969; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toc-item:hover { background: #f2f3f5; }
.toc-item.active { background: #e6f4ff; color: #1677ff; }
.toc-item.lv1 { font-weight: 600; color: #1f2329; }
.toc-item.active.lv1 { color: #1677ff; }
.toc-item.lv2 { padding-left: 40px; }
.toc-item.lv3 { padding-left: 52px; }
.prd-scroll { flex: 1; overflow-y: auto; padding: 32px 48px; }
.prd-paper {
  width: 794px; min-height: 1123px; margin: 0 auto; background: #fff;
  box-shadow: 0 2px 12px rgba(31,35,41,.08); border-radius: 4px;
  padding: 64px 72px;
}
.prd-paper h1 { font-size: 20px; font-weight: 600; margin: 28px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #91caff; }
.prd-paper h1:first-child { margin-top: 0; }
.prd-paper h2 { font-size: 16px; font-weight: 600; margin: 22px 0 10px; }
.prd-paper h3 { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
.prd-paper p { font-size: 13px; line-height: 1.9; color: #4e5969; margin: 6px 0; white-space: pre-line; }
.prd-paper ul { margin: 6px 0 6px 20px; }
.prd-paper li { font-size: 13px; line-height: 1.9; color: #4e5969; }
.fig-caption { font-size: 12px; color: #8a8f99; text-align: center; margin: 6px 0; }

/* --- PRD 表格 --- */
.prd-table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0; }
.prd-table th { background: #f7f8f9; color: #1f2329; font-weight: 600; text-align: left; }
.prd-table th, .prd-table td { border: 1px solid #eef0f3; padding: 8px 12px; line-height: 1.6; }
.prd-table td { color: #4e5969; white-space: pre-line; }

/* --- 待填充占位 --- */
.todo-box {
  border: 1px dashed #b0b4ba; background: #fafbfc; border-radius: 6px;
  padding: 18px; margin: 8px 0; color: #8a8f99; font-size: 13px; line-height: 1.8;
  text-align: center;
}

/* --- 原型视图 --- */
.proto-view { height: 100%; display: flex; flex-direction: column; }
.proto-topbar {
  height: 44px; flex-shrink: 0; background: #fff;
  display: flex; align-items: center; padding: 0 16px; gap: 16px;
}
.proto-tabs { display: flex; gap: 4px; }
.proto-tab {
  padding: 6px 16px; font-size: 13px; color: #4e5969; cursor: pointer; border-radius: 6px;
}
.proto-tab:hover { background: #f2f3f5; }
.proto-tab.active { background: #e6f4ff; color: #1677ff; font-weight: 500; }
.proto-title { font-size: 13px; font-weight: 600; color: #1f2329; }
.proto-content { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.proto-stage {
  max-width: 1200px; margin: 0 auto; background: #fff;
  border: 1px solid #e5e6e8; border-radius: 8px; padding: 20px;
}
.proto-prd-scroll { height: 100%; overflow-y: auto; padding: 32px 48px; }
.proto-prd-paper {
  width: 794px; min-height: 1123px; margin: 0 auto; background: #fff;
  box-shadow: 0 2px 12px rgba(31,35,41,.08); border-radius: 4px;
  padding: 64px 72px;
}
.proto-prd-paper h1 { font-size: 20px; font-weight: 600; margin: 28px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #91caff; }
.proto-prd-paper h1:first-child { margin-top: 0; }
.proto-prd-paper h2 { font-size: 16px; font-weight: 600; margin: 22px 0 10px; }
.proto-prd-paper h3 { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
.proto-prd-paper p { font-size: 13px; line-height: 1.9; color: #4e5969; margin: 6px 0; white-space: pre-line; }
.proto-prd-paper li { font-size: 13px; line-height: 1.9; color: #4e5969; }

/* --- 原型内容块（结构化词汇渲染） --- */
.pb-heading { font-size: 14px; font-weight: 600; color: #1f2329; margin: 14px 0 8px; }
.pb-text { font-size: 13px; color: #4e5969; line-height: 1.9; margin: 4px 0; }
.pb-kpi-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.pb-kpi { flex: 1; min-width: 140px; background: #f7f8f9; border-radius: 8px; padding: 12px 14px; }
.pb-kpi .k-label { font-size: 12px; color: #8a8f99; }
.pb-kpi .k-value { font-size: 20px; font-weight: 600; margin-top: 4px; }
.k-blue { color: #1677ff; } .k-orange { color: #ff7d00; } .k-green { color: #00b42a; }
.k-red { color: #f53f3f; } .k-gray { color: #4e5969; }
.pb-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pb-btn { font-size: 13px; padding: 6px 14px; border-radius: 6px; border: 1px solid #e5e6e8; background: #fff; color: #4e5969; }
.pb-btn.primary { background: #1677ff; border-color: #1677ff; color: #fff; }
.pb-btn.danger { color: #f53f3f; border-color: #fdcdc7; }
.pb-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.pb-filter .f-label { font-size: 13px; color: #4e5969; }
.pb-filter .f-widget {
  font-size: 13px; color: #8a8f99; background: #f7f8f9;
  border: 1px solid #e5e6e8; border-radius: 6px; padding: 6px 12px; min-width: 120px;
}
.pb-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pb-step { font-size: 12px; color: #4e5969; background: #f7f8f9; border-radius: 999px; padding: 4px 12px; }
.pb-form { margin: 8px 0; }
.pb-form-row { display: flex; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed #eef0f3; }
.pb-form-row .f-label { width: 140px; flex-shrink: 0; font-size: 13px; color: #1f2329; padding-top: 5px; }
.pb-form-row .f-label .required { color: #f53f3f; margin-right: 2px; }
.pb-form-row .f-body { flex: 1; }
.pb-empty {
  border: 1px dashed #b0b4ba; background: #fafbfc; border-radius: 8px;
  padding: 40px 20px; text-align: center; color: #8a8f99; font-size: 13px; line-height: 1.9;
}
.pb-placeholder {
  border: 1px dashed #b0b4ba; background: #fafbfc; border-radius: 8px;
  padding: 24px; text-align: center; color: #8a8f99; font-size: 13px;
}
.pb-iframe {
  width: 100%; border: 1px solid #e5e6e8; border-radius: 8px;
  background: #000; display: block; margin: 0 auto;
}

/* --- 原型画布占位（web 端内容区域示意框） --- */
.proto-canvas {
  width: 100%; aspect-ratio: 16 / 9; background: #0d1117; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: #6e7681; font-size: 13px;
}
.proto-canvas .c-title { color: #8b949e; font-size: 15px; font-weight: 500; }
