/* 数字东谷 · 一期页面专属样式（登录/告知/对话/我的/团队/看板） */

/* ===== 登录页 ===== */
.wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px 64px; }
.top-tag { position: fixed; top: 20px; right: 24px; display: flex; gap: 10px; align-items: center; z-index: 5; }
.card-login { width: 440px; padding: 36px 36px 32px; text-align: center; }
.brand-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.brand-row .name { font-size: 17px; font-weight: 600; }
.qr {
  width: 216px; height: 216px; margin: 28px auto 16px; padding: 14px; border-radius: var(--radius-card);
  background: #fff; border: 0.5px solid var(--separator); position: relative;
}
.scan-title { font-size: 17px; font-weight: 600; }
.steps { display: flex; justify-content: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--secondary); }
.dev-login { margin-top: 20px; padding-top: 16px; border-top: 0.5px dashed var(--separator); }
.dev-login .dev-t { font-size: 12px; color: var(--tertiary); margin-bottom: 10px; }
.footer { margin-top: 24px; font-size: 13px; color: var(--secondary); text-align: center; line-height: 20px; }

/* ===== 首次告知 ===== */
.sheet { width: 760px; padding: 36px 40px 32px; }
.hello { font-size: 13px; color: var(--secondary); margin-bottom: 8px; }
.four { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.item { background: var(--surface-solid); border-radius: var(--radius-card); padding: 18px 18px 16px; border: 0.5px solid var(--separator); }
.item .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.item .no {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.item .q { font-size: 17px; font-weight: 600; }
.item ul { list-style: none; font-size: 14px; line-height: 21px; color: var(--label); }
.item li { position: relative; padding-left: 12px; margin-top: 3px; }
.item li::before { content: ""; position: absolute; left: 0; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--tertiary); }
.item .hint { font-size: 12px; color: var(--secondary); margin-top: 6px; }
.not {
  margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-modal); background: var(--neutral-soft);
  font-size: 14px; line-height: 21px;
}
.not b { font-weight: 600; }
.actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; align-items: center; }
.actions .left { margin-right: auto; font-size: 12px; color: var(--secondary); }

/* ===== 对话 ===== */
/* 2026-10-05 自动滚底修复：本条规则在 chat.css 之后加载、会覆盖 chat.css 的 .stream，
   所以底部留白必须加在这里（否则最新一条仍被底部 sticky 输入框挡住）。
   220px = 输入框区(输入框+提示行+脚注+渐变遮罩)约 190px + 安全间距。
   注意：本规则带 overflow-y:auto，.stream 本身就是滚动容器（见 app.js 的 chatScroller）。 */
.stream { flex: 1; overflow-y: auto; max-width: 820px; width: 100%; margin: 0 auto; padding: 20px 32px 220px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; }
.divider .dv { font-size: 12px; color: var(--tertiary); background: var(--bg); padding: 2px 10px; border-radius: var(--radius-pill); }
.msg-user { display: flex; justify-content: flex-end; margin: 12px 0; font-size: 15px; background: var(--accent); color: #fff; border-radius: 18px 18px 4px 18px; padding: 9px 15px; max-width: 70%; margin-left: auto; line-height: 22px; }
.msg-ai { display: flex; gap: 10px; margin: 12px 0; }
.ai-av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; color: #fff; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; background: var(--accent);
}
.ai-sys { background: #8E8E93; }
.ai-hr { background: #AF52DE; }
.ai-body { flex: 1; min-width: 0; }
.ai-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ai-meta .who { font-size: 13px; font-weight: 600; }
.ai-meta .route { font-size: 12px; color: var(--secondary); }
.bubble { background: var(--surface-solid); border-radius: 4px 18px 18px 18px; padding: 11px 15px; font-size: 15px; line-height: 24px; box-shadow: var(--shadow-card); border: 0.5px solid var(--separator); }
.bubble ol { padding-left: 20px; margin: 6px 0; }
.bubble ul { padding-left: 20px; margin: 6px 0; }
.seg-part { margin-bottom: 10px; }
.seg-part:last-child { margin-bottom: 0; }
.seg-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--label); margin-bottom: 3px; }
.seg-tag .tdot { width: 8px; height: 8px; border-radius: 50%; }
.seg-body { color: var(--label); }
.nobasis { padding: 4px 0; }
.nobasis .ttl { font-size: 15px; font-weight: 600; }
.hrcard { border: 0.5px solid var(--separator); border-radius: var(--radius-card); overflow: hidden; }
.hr-hd { font-size: 12px; color: var(--secondary); padding: 8px 14px; background: var(--neutral-soft); }
.hr-bd { padding: 14px; }
.hr-ttl { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.hr-bd dl { font-size: 14px; }
.hr-bd dt { font-weight: 600; margin-top: 6px; }
.hr-bd dd { margin-left: 0; color: var(--label); }
.cite { font-size: 11px; color: var(--accent); vertical-align: super; font-weight: 600; }
.acts { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.act {
  font-size: 13px; color: var(--secondary); padding: 5px 10px; border-radius: var(--radius-pill);
  background: var(--neutral-soft); margin-right: 4px;
}
.act.on { background: var(--accent-soft); color: var(--accent); }
.act-sep { width: 1px; height: 16px; background: var(--separator); margin: 0 6px; }
details.src { margin-top: 8px; }
details.src summary { cursor: pointer; font-size: 13px; color: var(--accent); list-style: none; }
details.src summary::-webkit-details-marker { display: none; }
.src-list { margin-top: 8px; }
.src-item { display: flex; align-items: baseline; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 0.5px solid var(--separator); }
.src-item:last-child { border-bottom: none; }
.src-item .cite { color: var(--accent); font-size: 11px; font-weight: 600; }
.src-item .file { font-weight: 500; }
.src-item .clause { color: var(--secondary); }
.swap-menu {
  display: none; position: absolute; z-index: 50; background: var(--surface-solid); border-radius: var(--radius-modal);
  box-shadow: var(--shadow-raised); border: 0.5px solid var(--separator); padding: 6px; min-width: 240px;
}
details.swap[open] .swap-menu { display: block; }
details.swap { position: relative; }
.swap-menu .sm-t { font-size: 12px; color: var(--tertiary); padding: 6px 10px 4px; }
.swap-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.swap-menu button:hover { background: rgba(0,0,0,0.04); }
.swap-menu button span { margin-left: auto; font-size: 12px; color: var(--tertiary); }

/* 输入区 */
.composer-wrap { border-top: 0.5px solid var(--separator); background: var(--bg); padding: 14px 32px 12px; }
.composer { max-width: 820px; margin: 0 auto; }
.composer textarea {
  width: 100%; min-height: 60px; max-height: 140px; resize: vertical; padding: 12px 14px; border-radius: var(--radius-control);
  border: 0.5px solid var(--separator); background: var(--surface-solid); font-size: 15px; line-height: 22px; outline: none;
}
.composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea:disabled { opacity: 0.5; }
.send-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.send-row .tip { font-size: 12px; color: var(--secondary); flex: 1; }
.send {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.send:disabled { opacity: 0.4; cursor: not-allowed; }
.foot-note { max-width: 820px; margin: 8px auto 0; font-size: 12px; color: var(--tertiary); }
.offline-banner { max-width: 820px; width: 100%; margin: 0 auto 12px; }

/* ===== 我的属性 ===== */
.attr-row { margin-bottom: 14px; }
.attr-l { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.attr-l .attr-v { color: var(--secondary); font-weight: 600; }
.attr-bar { height: 10px; }

/* ===== 团队 / 看板 ===== */
.stat .l { font-size: 13px; color: var(--secondary); }
.stat .big-num { margin-top: 6px; }
.stat .d { font-size: 12px; color: var(--secondary); margin-top: 4px; }
.topic { display: grid; grid-template-columns: 28px 1fr 140px 48px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 0.5px solid var(--separator); }
.topic:last-child { border-bottom: none; }
.topic .rk { font-size: 13px; color: var(--tertiary); font-weight: 600; }
.topic .nm { font-size: 15px; font-weight: 500; }
.topic .sm { font-size: 13px; color: var(--secondary); margin-top: 2px; }
.topic .n { text-align: right; font-size: 13px; color: var(--secondary); }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 16px; }
.north { padding: 24px 28px; }
.north .lbl { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.north .n { font-size: 48px; line-height: 56px; font-weight: 700; margin-top: 10px; }
.north .n small { font-size: 15px; font-weight: 500; color: var(--secondary); margin-left: 6px; }
.north .def { font-size: 13px; color: var(--secondary); margin-top: 6px; }
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini .l { font-size: 13px; color: var(--secondary); }
.mini .big-num { margin-top: 4px; }
.mini .d { font-size: 12px; color: var(--secondary); margin-top: 2px; }
.dept td .bar { width: 140px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.dept td .v { display: inline-block; width: 44px; font-size: 13px; }
.log { font-size: 12px; color: var(--secondary); margin-top: 16px; }
.locked { margin: 80px auto; max-width: 420px; text-align: center; }
.locked .lk { font-size: 34px; margin-bottom: 12px; }

/* @media (prefers-color-scheme: dark) {
  .msg-user { color: #fff; }
} */

/* ---- D-SZ1 返工：回看入口 + 对话日期分隔条 + 高亮 ---- */
.chat-head { position: relative; }
.review-toggle { margin-left: 12px; position: relative; }
.review-toggle summary { cursor: pointer; font-size: 13px; color: var(--secondary); padding: 4px 10px; border: 1px solid var(--separator); border-radius: 8px; list-style: none; user-select: none; }
.review-toggle summary::-webkit-details-marker { display: none; }
.review-toggle[open] summary { color: var(--accent); border-color: var(--accent); }
.review-panel { position: absolute; right: 0; top: 34px; width: 340px; max-height: 60vh; overflow: auto; background: var(--surface-solid); border: 1px solid var(--separator); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 12px; z-index: 20; }
.rv-hd { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.rv-list { display: flex; flex-direction: column; gap: 10px; }
.rv-group { }
.rv-date { font-size: 12px; font-weight: 600; color: var(--secondary); padding: 4px 0 2px; }
.rv-item { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left; padding: 7px 8px; border-radius: 8px; border: none; background: transparent; color: inherit; font-size: 13px; cursor: pointer; }
.rv-item:hover { background: var(--separator); }
.rv-tm { color: var(--secondary); font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; }
.rv-ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.day-sep { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; color: var(--secondary); font-size: 12px; font-weight: 600; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--separator); }
.day-jump { margin-left: auto; font-size: 12px; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0; }

.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { background: rgba(0,122,255,.18); } 100% { background: transparent; } }

/* ===== SZDG 前端修复：手机 390 宽团队页整体横向溢出（生产 591a53f 即有，非今晚合并引入）
   根因（本地 390 复测实测）：.page-head 为 flex 且不换行，右侧部门切换器
   .segmented.team-switch 作为 flex 项 min-width:auto 不可收缩，一人管多部门时
   整条超出视口，把 layout viewport 撑宽（古智豪 4 部门 535px、老板 616px > 390），
   页面整体横滚、切换器右侧部门被裁且无法点到。底导 bottom-tabs 是受害者不是根因。
   方案：≤600px 时 .page-head 允许换行，切换器独占一行、内部横向滚动（企微里
   手感比整条裁掉好，且 flex-basis:100% 保证滚动条区域是整行宽）。切换器撑宽的
   根因移除后页面不再横滚，不需要 body overflow-x:hidden 一刀切兜底。
   1280 桌面（>600px）完全不受影响。 */
@media (max-width: 600px) {
  .page-head { flex-wrap: wrap; row-gap: 8px; }
  .page-head .segmented.team-switch {
    order: 10;                 /* 排到行尾：独占新一行，徽章仍留在标题行 */
    flex: 1 1 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  /* 390 实测第二、三个撑宽者：.two 双列网格里的表格/统计盒 min-content 超出视口。
     窄屏改单列/两列，表格 table-layout:fixed 让单元格换行而不是撑破容器。 */
  .two { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .page-body .tbl { table-layout: fixed; }
  /* 高频主题行：窄屏放两行（名字一行、进度条独占一行），避免 140px 定宽进度条把
     名字列挤到一字一行（overflow 修完后布局宽度回到 326px，原 4 列定宽网格太挤） */
  .topic { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px 10px; }
  .topic .bar { grid-column: 2 / 4; width: 100%; }
  .topic .n { white-space: nowrap; }
}
