/* 数字东谷 · 界面稿公共样式（在 tokens.css 之上补充外壳与组件） */
body { min-width: 0; }

/* ===== 期数角标 ===== */
.phase {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 600;
  white-space: nowrap; vertical-align: middle; letter-spacing: 0.02em;
}
.phase-1 { background: var(--accent); color: #fff; }
.phase-2 { background: var(--accent-soft); color: var(--accent); }
.phase-3 { background: transparent; color: var(--secondary); border: 1px dashed var(--tertiary); }

/* ===== 示例数据条 ===== */
.sample-strip {
  font-size: 12px; line-height: 16px; color: var(--secondary);
  display: flex; align-items: center; gap: 8px;
}
.sample-strip::before {
  content: "示例数据"; font-weight: 600; color: var(--secondary);
  background: var(--neutral-soft); border-radius: var(--radius-pill); padding: 2px 8px;
}

/* ===== 登录错误提示（第28轮⑤） ===== */
.login-err {
  min-height: 16px; margin-top: 8px; color: #d33; font-size: 13px; text-align: center;
}

/* ===== 角色切换（评审用） ===== */
.role-switch {
  position: fixed; right: 16px; bottom: 16px; z-index: 300;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 12px; border-radius: var(--radius-pill);
  background: var(--surface-solid); box-shadow: var(--shadow-raised);
  border: 0.5px solid var(--separator); font-size: 12px; color: var(--secondary);
}
.role-switch .segmented { border-radius: var(--radius-pill); }
.role-switch .segmented button { padding: 4px 10px; font-size: 12px; border-radius: var(--radius-pill); }

/* ===== 工作页外壳 ===== */
.app { display: grid; grid-template-columns: 272px 1fr 280px; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface-solid); border-right: 0.5px solid var(--separator);
  padding: 16px 12px 12px;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.side-brand .name { font-size: 17px; font-weight: 600; }
.side-brand .status { margin-left: auto; font-size: 12px; color: var(--secondary); display: flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tertiary); display: inline-block; }
.dot-warn { background: var(--warn); }
.dot-on { background: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-control);
  font-size: 15px; color: var(--label); font-weight: 500;
}
.side-nav a:hover { background: rgba(0,0,0,0.04); }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); }
.side-nav .ico { width: 20px; text-align: center; font-size: 15px; }
.side-nav .role-note { margin-left: auto; font-size: 11px; color: var(--tertiary); font-weight: 400; }
.side-list { flex: 1; overflow-y: auto; padding-top: 4px; margin: 0 -4px; padding-left: 4px; padding-right: 4px; }
.side-group { font-size: 12px; color: var(--tertiary); font-weight: 600; padding: 8px 10px 4px; }
.sess {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-control);
  font-size: 14px; color: var(--label); white-space: nowrap; overflow: hidden;
}
.sess span.t { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.sess:hover { background: rgba(0,0,0,0.04); }
.sess.active { background: rgba(120,120,128,0.14); font-weight: 500; }
.sess .sd { font-size: 12px; color: var(--tertiary); flex-shrink: 0; }
/* 入职进度卡（入职 30 天内） */
.onb-card { display: block; margin-top: 12px; padding: 12px 12px 10px; border-radius: var(--radius-modal); background: rgba(0,122,255,0.06); color: var(--label); border: 0.5px solid rgba(0,122,255,0.18); }
.onb-card:hover { background: rgba(0,122,255,0.10); }
.onb-card .onb-t { font-size: 13px; font-weight: 600; color: var(--accent); }
.onb-card .onb-n { font-size: 15px; font-weight: 600; margin-top: 6px; }
.onb-card .onb-bar { margin-top: 8px; height: 6px; }
.onb-card .onb-s { font-size: 12px; color: var(--secondary); margin-top: 6px; }
/* 回看区 */
.review { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 12px; }
.review-hd { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 8px; }
.review-t { font-size: 15px; font-weight: 600; }
.review-s { font-size: 12px; color: var(--tertiary); }
.review-search { height: 32px; font-size: 13px; background: var(--bg); border-color: transparent; }
.review-seg { display: flex; margin: 8px 0 4px; }
.review-seg button { flex: 1; padding: 5px 0; }
.side-group.topic { display: flex; align-items: center; gap: 6px; color: var(--secondary); }
.tdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.side-group .cnt { margin-left: auto; font-weight: 400; color: var(--tertiary); }
.side-user {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px 4px;
  border-top: 0.5px solid var(--separator);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar.gray { background: #8E8E93; }
.side-user .who { flex: 1; min-width: 0; }
.side-user .nm { font-size: 14px; font-weight: 600; }
.side-user .dept { font-size: 12px; color: var(--secondary); }

.main { background: var(--bg, #F5F8FD); min-width: 0; display: flex; flex-direction: column; }
.page-head {
  display: flex; align-items: center; gap: 12px; padding: 18px 32px 14px;
  border-bottom: 0.5px solid var(--separator); background: var(--bg);
}
.page-head h1 { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.page-head .spacer { flex: 1; }
.page-body { padding: 24px 32px 96px; max-width: 1136px; width: 100%; }

/* ===== 通用块 ===== */
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.sec-title .sub { font-size: 13px; font-weight: 400; color: var(--secondary); }
.box { background: var(--surface-solid); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 20px; }
.notice {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-modal);
  font-size: 14px; line-height: 20px;
}
.notice-info { background: var(--accent-soft); color: var(--label); }
.notice-warn { background: var(--warn-soft); color: var(--label); }
.notice .ni { font-weight: 700; }
.muted { color: var(--secondary); }
.small { font-size: 13px; line-height: 18px; }
.xs { font-size: 12px; line-height: 16px; }
.big-num { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -0.02em; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.bar { height: 8px; border-radius: var(--radius-pill); background: rgba(120,120,128,0.12); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bar.gray > i { background: #8E8E93; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--secondary); padding: 8px 10px; border-bottom: 0.5px solid var(--separator); }
.tbl td { padding: 12px 10px; border-bottom: 0.5px solid var(--separator); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }

/* 权限不足 */
.locked { margin: 80px auto; max-width: 420px; text-align: center; }
.locked .lk { font-size: 34px; margin-bottom: 12px; }

/* ===== S9 培训任务（知识卡/小测） ===== */
.train-item { padding: 14px 16px; border-radius: var(--radius-modal); background: rgba(120,120,128,0.05); border: 0.5px solid var(--separator); }
.train-item + .train-item { margin-top: 12px; }
.train-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.train-tag.card { color: var(--accent); }
.train-tag.quiz { color: var(--warning); }
.train-topic { font-weight: 400; color: var(--secondary); font-size: 12px; }
.train-t { font-size: 15px; font-weight: 600; line-height: 21px; }
.train-b { font-size: 14px; line-height: 20px; margin-top: 6px; }
.train-opts { margin: 8px 0 0; padding-left: 20px; font-size: 14px; line-height: 22px; }
.train-ans { font-size: 13px; margin-top: 8px; }

/* ===== S9 画像弹层（负责人/老板查看成员） ===== */
.szdg-modal-mask {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.32); padding: 24px;
}
.szdg-modal {
  width: 560px; max-width: 100%; max-height: 86vh; overflow-y: auto;
  background: var(--surface-solid); border-radius: var(--radius-card); box-shadow: var(--shadow-raised);
  padding: 20px 24px 24px;
}
.szdg-modal-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.szdg-modal-bd .attr-row { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }


/* ===== 第58轮：移动端基本适配（≤860px） =====
   修「移动视口横向溢出 905px」：根因是上方 body min-width:1280px 桌面定宽
   + .app 侧栏 272px 固定列。窄屏放开定宽、侧栏收成顶栏（品牌+导航横排），
   待办/记录列表暂藏（移动端一期先保关键路径：登录/对话/会议），主区通栏。 */
@media (max-width: 860px) {
  body { min-width: 0; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 10px 12px 8px; border-right: none; border-bottom: 0.5px solid var(--separator); }
  .side-todos, .side-list { display: none; }
  .side-brand { padding-bottom: 8px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .side-nav a { padding: 6px 10px; font-size: 14px; }
  .side-user { border-top: none; padding: 6px 8px 0; }
}

/* 第62轮修意见2(a)：文件解析摘要卡 */
.fs-card { background: rgba(142,142,147,.08); border: 0.5px solid rgba(0,0,0,.08); border-radius: 10px; padding: 10px 12px; }
.fs-card .fs-hd { font-weight: 600; font-size: 13px; }
.fs-card .fs-meta { font-weight: 400; color: var(--secondary, var(--secondary, #6E6E73)); font-size: 12px; }
.fs-card .fs-sub { font-size: 12px; color: var(--secondary, var(--secondary, #6E6E73)); margin-top: 2px; }
.fs-card .fs-points { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--label, #1D1D1F); }
.fs-card .fs-points li { margin: 2px 0; }

/* ===== SZDG-D1：顶部助手胶囊 + 底部换助手面板 + 移动端底部标签 ===== */
/* 顶部胶囊：默认（桌面）隐藏，仅在移动端作为顶栏出现，保证电脑端布局不回退 */
.assistant-pills { display: none; }
.ap { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--separator); background: var(--surface-solid); color: var(--text); font-size: 13px; cursor: pointer; line-height: 1; }
.ap .tdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ap.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* 底部换助手面板（弹层，桌面/移动都可用） */
.sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; z-index: 200; }
.sheet-overlay[hidden] { display: none; }
.sheet { width: 100%; max-width: 560px; margin: 0 auto; background: var(--surface-solid); border-radius: 16px 16px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); animation: sheetUp .18s ease; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-hd { font-size: 15px; font-weight: 600; padding: 4px 8px 10px; display: flex; flex-direction: column; }
.sheet-sub { font-size: 12px; color: var(--secondary); font-weight: 400; margin-top: 2px; }
.sheet-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 10px; border: none; background: transparent; border-radius: 10px; color: inherit; font-size: 15px; cursor: pointer; }
.sheet-item:hover { background: var(--separator); }
.sheet-item .tdot { width: 10px; height: 10px; border-radius: 50%; }
.sheet-item .si-name { font-weight: 600; }
.sheet-item .si-sub { margin-left: auto; font-size: 12px; color: var(--secondary); }
.new-tag { margin-left: 8px; font-size: 11px; color: #fff; background: var(--ok); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.sheet-cancel { width: 100%; margin-top: 8px; padding: 12px; border: none; border-radius: 10px; background: var(--separator); color: var(--text); font-size: 15px; cursor: pointer; }

/* 移动端底部标签：桌面隐藏 */
.bottom-tabs { display: none; }

@media (max-width: 860px) {
  .side { display: none !important; }
  .assistant-pills { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 12px 4px; max-width: 820px; width: 100%; margin: 0 auto; }
  .assistant-pills .ap { padding: 7px 13px; font-size: 13px; }
  .bottom-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; background: var(--surface-solid); border-top: 0.5px solid var(--separator); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .bottom-tabs .bt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--secondary); text-decoration: none; font-size: 11px; }
  .bottom-tabs .bt.active { color: var(--accent); }
  .bottom-tabs .bt-ico { width: 20px; height: 20px; }
  .composer-wrap { padding-bottom: 72px; }
  .stream { padding-bottom: 120px; }
}

/* ===== SZDG-1010W-03 我的页面员工档案卡 ===== */
.me-profile-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-solid); border: 1px solid var(--separator);
  border-radius: var(--radius-card);
  padding: 16px 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.mpc-left { display: flex; align-items: center; gap: 14px; }
.mpc-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.mpc-name { font-size: 17px; font-weight: 600; color: var(--label); }
.mpc-dept { font-size: 13px; color: var(--secondary); margin-top: 2px; }
.mpc-hire { font-size: 12px; margin-top: 2px; }

/* ===== SZDG-1010W-06 GuideEngine ===== */
#guide-overlay { display: none; }
#guide-overlay .guide-tip {
  position: fixed; display: none; width: 260px; z-index: 310;
  background: var(--surface-solid); border-radius: var(--radius-card);
  padding: 14px 16px; box-shadow: var(--shadow-raised);
}
#guide-overlay .guide-step b { font-size: 15px; color: var(--label); }
#guide-overlay .guide-step p { font-size: 13px; color: var(--secondary); margin: 6px 0 10px; line-height: 1.5; }
#guide-overlay .guide-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ===== SZDG-1010W-07 ChoicePrompt ===== */
.cp-card { background: var(--surface-2); border-radius: var(--radius-control); padding: 14px; margin: 8px 0; }
.cp-title { font-size: 14px; font-weight: 600; color: var(--label); margin-bottom: 10px; }
.cp-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-opts.multi { flex-direction: column; }
.cp-opt { padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--separator); background: var(--surface-solid); font-size: 13px; cursor: pointer; }
.cp-opt.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.cp-confirm { margin-top: 10px; }
.cp-free { display: flex; gap: 8px; margin-top: 10px; }
.cp-free input { flex: 1; }
/* U-03 知识审核侧栏 */
.kr-layout { display:flex; gap:16px; margin-top:12px; }
.kr-main { flex:1; min-width:0; }
.kr-side { width:320px; flex-shrink:0; }
.kr-item { padding:10px 0; border-bottom:1px solid var(--border,#eee); }
.kr-label { font-size:13px; color:var(--muted,#666); margin-bottom:4px; }
.kr-value { font-size:14px; }
.kr-actions { display:flex; flex-direction:column; gap:8px; }
.kr-actions .btn { width:100%; }
@media (max-width:768px) {
  .kr-layout { flex-direction:column; }
  .kr-side { width:100%; }
}

/* 右侧信息栏（三栏布局） */
.right-bar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--page-bg, #F5F8FD); border-left: 0.5px solid var(--separator, #E4ECF7);
  padding: 16px 12px 12px;
}
.right-card {
  background: var(--surface-solid, #fff); border-radius: 12px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.right-card h3 { font-size: 14px; font-weight: 600; margin: 0 0 10px; color: var(--label, #17365F); }
.right-stat { display: flex; gap: 16px; margin-bottom: 10px; }
.right-stat .num { font-size: 20px; font-weight: 700; color: var(--brand-primary, #1766D6); }
.right-stat .lbl { font-size: 12px; color: var(--secondary, #7186A4); }
@media (max-width: 1100px) {
  .app { grid-template-columns: 272px 1fr; }
  .right-bar { display: none; }
}

/* 项目页两列网格 */
.pj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 768px) { .pj-grid { grid-template-columns: 1fr; } }


/* 项目页两列网格 */
.pj-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.pj-row { break-inside: avoid; }
@media (max-width: 768px) { .pj-list { grid-template-columns: 1fr; } }


/* 项目页两列网格 - 直接用CSS */
.page-body:has(.pj-row) { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.page-body:has(.pj-row) .pj-filter,
.page-body:has(.pj-row) .pj-tip { grid-column: 1 / -1; }
@media (max-width: 768px) { .page-body:has(.pj-row) { grid-template-columns: 1fr; } }


/* 项目页两列网格 - 修复版 */
.page-body:has(> .pj-row) { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.page-body:has(> .pj-row) .pj-filter,
.page-body:has(> .pj-row) .pj-tip,
.page-body:has(> .pj-row) .pj-kw-wrap { grid-column: 1 / -1; }
@media (max-width: 768px) { .page-body:has(> .pj-row) { grid-template-columns: 1fr; } }


/* 项目页两列网格 */
.page-body:has(.pj-row) .pj-filter,
.page-body:has(.pj-row) .pj-tip { grid-column: 1 / -1 !important; }

