/* ============================================================
   技术需求台账 · 样式表
   浅色商务主题 · 无外部依赖
   ============================================================ */

:root {
  /* 基础色 */
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --border: #e3e8ef;
  --border-strong: #cdd5e0;
  --text: #1c2434;
  --text-2: #52606d;
  --text-3: #8a97a8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eef4ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --ok: #059669;
  --ok-soft: #ecfdf5;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 2px 8px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;

  /* 七阶段配色 */
  --s0: #94a3b8;
  --s1: #60a5fa;
  --s2: #3b82f6;
  --s3: #8b5cf6;
  --s4: #f59e0b;
  --s5: #10b981;
  --s6: #0d9488;
}

* { box-sizing: border-box; }

/* 关键：作者样式里的 display:flex 会盖掉 HTML hidden 属性自带的 display:none，
   导致 .hidden = true 静默失效（横幅关不掉）。这里统一兜住。 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--primary); text-decoration: none; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfd6e4; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #b3bccd; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  height: 58px; padding: 0 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .2px; white-space: nowrap; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--text-3); letter-spacing: 0; }

.tabs { display: flex; gap: 2px; background: var(--bg); padding: 3px; border-radius: 9px; }
.tabs button {
  padding: 6px 15px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--text-2);
  transition: all .15s;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

.topbar .spacer { flex: 1; }

.search {
  position: relative; width: 230px;
}
.search input {
  width: 100%; padding: 7px 10px 7px 30px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2); outline: none; transition: all .15s;
}
.search input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.search::before { content: "⌕"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f2c7c7; }
.btn-danger:hover { background: var(--danger-soft); border-color: #e9a8a8; color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg); border-color: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 主容器 ---------- */
.wrap { max-width: 1380px; margin: 0 auto; padding: 22px; }
.wrap.narrow { max-width: 1000px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 21px; letter-spacing: -.2px; }
.page-head p { margin: 3px 0 0; color: var(--text-3); font-size: 13px; }

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent, var(--primary)); }
.stat .k { font-size: 12px; color: var(--text-3); font-weight: 600; }
.stat .v { font-size: 27px; font-weight: 700; line-height: 1.25; margin-top: 2px; letter-spacing: -.5px; }
.stat .d { font-size: 11.5px; color: var(--text-3); }

/* ---------- 面板 ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 18px; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 17px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-head .hint { font-size: 12px; color: var(--text-3); font-weight: 400; }
.panel-body { padding: 16px 17px; }
.panel-body.tight { padding: 0; }

/* ---------- 阶段分布条 ---------- */
.funnel { display: flex; gap: 4px; height: 46px; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.funnel .seg {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700; min-width: 0; position: relative;
}
.funnel .seg .n { font-size: 17px; line-height: 1.1; }
.funnel .seg span { opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 3px; }
.funnel .seg.zero { opacity: .28; }

/* ---------- 需求卡片（列表） ---------- */
.list-group-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; color: var(--text-2);
  margin: 20px 0 10px;
}
.list-group-title .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.list-group-title .cnt { font-weight: 500; color: var(--text-3); font-size: 12px; }
.list-group-title:first-child { margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 13px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; cursor: pointer; transition: all .16s; position: relative;
  box-shadow: var(--shadow-sm);
}
.card:hover { border-color: #b9c8e6; box-shadow: var(--shadow); transform: translateY(-1px); }
.card .row1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card h3 { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.4; letter-spacing: -.1px; }
.card .org { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card .desc {
  font-size: 12.5px; color: var(--text-2); margin: 9px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .nextbox {
  margin-top: 11px; padding: 8px 10px; background: var(--bg); border-radius: 7px;
  font-size: 12.5px; display: flex; gap: 7px; align-items: flex-start;
}
.card .nextbox .lbl { color: var(--text-3); font-weight: 600; flex: none; font-size: 11.5px; padding-top: 1px; }
.card .nextbox.overdue { background: var(--danger-soft); }
.card .nextbox.overdue .lbl { color: var(--danger); }
.card .foot { display: flex; align-items: center; gap: 8px; margin-top: 11px; flex-wrap: wrap; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
}
.badge.stage { color: #fff; }
.badge.pri-high { background: var(--danger-soft); color: var(--danger); }
.badge.pri-mid { background: var(--warn-soft); color: var(--warn); }
.badge.pri-low { background: #f1f5f9; color: #64748b; }
.badge.due { background: #f1f5f9; color: var(--text-2); font-weight: 600; }
.badge.due.soon { background: var(--warn-soft); color: var(--warn); }
.badge.due.over { background: var(--danger-soft); color: var(--danger); }
.badge.tag { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.badge.plain { background: var(--bg); color: var(--text-2); font-weight: 600; }

.avatars { display: flex; }
.avatars .av {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff;
  margin-left: -7px;
}
.avatars .av:first-child { margin-left: 0; }

/* ---------- 看板 ---------- */
.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 14px; }
.col {
  width: 258px; flex: none; background: #eef1f7; border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: calc(100vh - 190px);
}
.col-head {
  padding: 11px 13px 9px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.col-head .bar { width: 4px; height: 15px; border-radius: 3px; flex: none; }
.col-head .name { font-size: 13px; font-weight: 700; flex: 1; }
.col-head .cnt {
  font-size: 11.5px; font-weight: 700; color: var(--text-2);
  background: rgba(255,255,255,.75); border-radius: 20px; padding: 1px 8px;
}
.col-body { padding: 9px; overflow-y: auto; flex: 1; min-height: 60px; display: flex; flex-direction: column; gap: 9px; }
.col.drop { background: #dfe8fb; box-shadow: inset 0 0 0 2px var(--primary); }
.col-body:empty::after {
  content: "拖到这里"; display: grid; place-items: center; height: 60px;
  color: var(--text-3); font-size: 12px; border: 1px dashed var(--border-strong); border-radius: 8px;
}

.kcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 12px; cursor: grab; box-shadow: var(--shadow-sm); transition: all .15s;
}
.kcard:hover { border-color: #b9c8e6; box-shadow: var(--shadow); }
.kcard.dragging { opacity: .4; cursor: grabbing; }
.kcard h4 { margin: 0 0 3px; font-size: 13px; font-weight: 700; line-height: 1.4; }
.kcard .org { font-size: 11.5px; color: var(--text-3); }
.kcard .nxt { font-size: 12px; color: var(--text-2); margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--border); display: flex; gap: 6px; }
.kcard .nxt .lbl { color: var(--text-3); flex: none; font-size: 11px; font-weight: 600; }
.kcard .meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; }

/* ---------- 详情页 ---------- */
.detail-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.detail-head {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
  border-top: 3px solid var(--accent, var(--primary));
}
.detail-head h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.3px; line-height: 1.35; }
.detail-head .sub { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }
.detail-head .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }

.cols { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 940px) { .cols { grid-template-columns: 1fr; } }

.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field .k { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.field .v { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.field .v.muted { color: var(--text-3); font-style: italic; }

/* 下一步动作 */
.next-panel { border: 1px solid #fde68a; background: linear-gradient(180deg, #fffdf5, #fffefb); border-radius: var(--radius); padding: 15px 17px; margin-bottom: 18px; }
.next-panel.overdue { border-color: #fecaca; background: linear-gradient(180deg, #fff8f8, #fff); }
.next-panel .cap { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.next-panel .cap .lbl { font-size: 12px; font-weight: 800; color: var(--warn); letter-spacing: .3px; display: flex; align-items: center; gap: 6px; }
.next-panel.overdue .cap .lbl { color: var(--danger); }
.next-panel .txt { font-size: 15px; font-weight: 600; line-height: 1.55; }
.next-panel .txt.empty { color: var(--text-3); font-weight: 400; font-style: italic; }

/* 阶段推进器 */
.stepper { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px;
  cursor: pointer; transition: all .14s; position: relative; border: 1px solid transparent;
}
.step:hover { background: var(--bg); }
.step .dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff; border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.step .nm { font-size: 13px; font-weight: 600; color: var(--text-2); flex: 1; }
.step.done .nm { color: var(--text); }
.step.cur { background: var(--primary-soft); border-color: #c7dbfe; }
.step.cur .nm { color: var(--primary); font-weight: 800; }
.step.cur .dot { box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.step .mark { font-size: 11px; font-weight: 700; color: var(--primary); opacity: 0; }
.step:hover .mark { opacity: 1; }

/* 时间线 */
.tl { position: relative; padding-left: 24px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 17px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .pt {
  position: absolute; left: -24px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--text-3); box-sizing: border-box;
}
.tl-item.t-stage .pt { border-color: var(--primary); }
.tl-item.t-note .pt { border-color: var(--text-3); }
.tl-item.t-contact .pt { border-color: var(--s4); }
.tl-item.t-plan .pt { border-color: var(--s5); }
.tl-item .hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item .t { font-size: 11.5px; color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-item .kind { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px; background: var(--bg); color: var(--text-2); }
.tl-item .bd { font-size: 13.5px; margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.tl-empty { color: var(--text-3); font-size: 13px; font-style: italic; padding: 6px 0; }

/* 快速添加 */
.quick { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 13px; margin-bottom: 18px; }
.quick .seg-ctl { display: flex; gap: 5px; margin-bottom: 9px; flex-wrap: wrap; }
.quick .seg-ctl button {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.quick .seg-ctl button.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 表单 ---------- */
input[type=text], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); outline: none; transition: all .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { resize: vertical; min-height: 76px; line-height: 1.6; }
label.fl { display: block; font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* 相关人编辑行 */
.person-row { display: grid; grid-template-columns: 1fr 1.2fr 84px 32px; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 640px) { .person-row { grid-template-columns: 1fr; } }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  color: var(--text-3); font-size: 16px; border: 1px solid transparent;
}
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* 相关人展示 */
.person {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.person:last-child { border-bottom: none; }
.person .av {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.person .nm { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.person .rl { font-size: 11.5px; color: var(--text-3); }
.person .role-tag { margin-left: auto; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16,24,40,.42); z-index: 100;
  display: grid; place-items: center; padding: 22px; backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 660px; max-height: 90vh; display: flex; flex-direction: column;
  animation: pop .16s ease-out;
}
.modal.wide { max-width: 900px; }
@keyframes pop { from { transform: scale(.97) translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 9px;
  background: var(--surface-2); border-radius: 0 0 14px 14px;
}

/* 周报输出 */
.report {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 17px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
  max-height: 56vh; overflow-y: auto;
}

/* ---------- 其它 ---------- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-3); }
.empty-state .big { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.empty-state h3 { margin: 0 0 6px; color: var(--text-2); font-size: 15px; }
.empty-state p { margin: 0 0 18px; font-size: 13px; }

.todo-list { display: flex; flex-direction: column; }
.todo {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border);
  cursor: pointer;
}
.todo:last-child { border-bottom: none; }
.todo:hover .todo-t { color: var(--primary); }
.todo .todo-d { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; width: 92px; flex: none; font-weight: 600; }
.todo .todo-d.over { color: var(--danger); }
.todo .todo-d.soon { color: var(--warn); }
.todo .todo-t { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; }
.todo .todo-s { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #1c2434; color: #fff; padding: 10px 20px; border-radius: 9px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 200;
  animation: pop .16s ease-out;
}
.backup-warn {
  display: flex; align-items: center; gap: 10px; padding: 9px 15px; font-size: 12.5px;
  background: var(--warn-soft); border-bottom: 1px solid #fde68a; color: #92400e;
  line-height: 1.55;
}
.backup-warn .spacer { flex: 1; }
.backup-warn.danger { background: var(--danger-soft); border-bottom-color: #fecaca; color: #991b1b; }
.backup-warn.danger .btn-sm { border-color: #fecaca; color: #991b1b; background: #fff; }
.backup-warn .btn-sm { white-space: nowrap; flex-shrink: 0; }
.backup-warn > span:first-child { min-width: 0; }

/* 顶栏存储状态徽标 —— 让你随时知道数据到底存哪了 */
.store-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 10px;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: all .15s;
}
.store-pill:hover { border-color: var(--border-strong); }
.store-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.store-pill.s-warn { color: #92400e; background: var(--warn-soft); border-color: #fde68a; }
.store-pill.s-warn .dot { background: var(--warn); }
.store-pill.s-danger { color: #991b1b; background: var(--danger-soft); border-color: #fecaca; }
.store-pill.s-danger .dot { background: var(--danger); }

.storage-facts { margin: 0; padding: 0; list-style: none; }
.storage-facts li {
  display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px dashed var(--border);
  font-size: 13px; line-height: 1.6;
}
.storage-facts li:last-child { border-bottom: none; }
.storage-facts .tag {
  flex-shrink: 0; min-width: 68px; font-weight: 700; font-size: 12px;
  height: 22px; line-height: 22px; text-align: center; border-radius: 6px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.storage-facts .tag.ok { background: var(--ok-soft); color: #065f46; border-color: #a7f3d0; }
.storage-facts .tag.warn { background: var(--warn-soft); color: #92400e; border-color: #fde68a; }
.storage-facts .tag.bad { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }

@media print {
  .topbar, .tabs, .btn, .quick, .backup-warn, .store-pill { display: none !important; }
  body { background: #fff; }
}

/* ============================================================
   人员库（v2 新增）
   ============================================================ */

/* 表单内提示 */
.fl-hint { font-weight: 500; color: var(--text-3); font-size: 11px; margin-left: 7px; }

/* 已选相关人 */
.picked-box {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  min-height: 40px; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2); margin-bottom: 8px;
}
.picked-empty { font-size: 12.5px; color: var(--text-3); font-style: italic; padding-left: 2px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 3px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 20px; font-size: 12.5px; font-weight: 600; max-width: 100%;
}
.chip.new { border-style: dashed; border-color: #a9c2ea; background: var(--primary-soft); }
.chip .av {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 11px;
}
.chip-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.chip-t i { font-style: normal; font-size: 10.5px; color: var(--text-3); font-weight: 500; }
.chip-x {
  width: 17px; height: 17px; border-radius: 50%; color: var(--text-3);
  font-size: 13px; line-height: 1; display: grid; place-items: center; flex: none;
}
.chip-x:hover { background: var(--danger-soft); color: var(--danger); }

/* 人员搜索下拉 */
.picker-wrap { position: relative; }
.suggest {
  position: fixed; z-index: 300;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 9px; box-shadow: var(--shadow-lg); overflow-y: auto; max-height: 240px;
}
.sg-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.sg-item:last-child { border-bottom: none; }
.sg-item:hover { background: var(--primary-soft); }
.sg-item .av {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 12px;
}
.sg-item > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sg-item b { font-size: 13px; font-weight: 700; }
.sg-item i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.sg-item.sg-new { background: #fbfdff; }
.sg-item.sg-new b { color: var(--primary); }

/* 人员卡片 */
.pcard {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: all .16s; box-shadow: var(--shadow-sm);
}
.pcard:hover { border-color: #b9c8e6; box-shadow: var(--shadow); transform: translateY(-1px); }
.av.lg {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 17px;
}
.pc-main { flex: 1; min-width: 0; }
.pc-nm { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.pc-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

/* 人员详情 */
.person-hero { display: flex; align-items: center; gap: 16px; }
.person-hero .av.big {
  width: 60px; height: 60px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 24px;
}
.person-hero .ph-main h1 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.2px; }
.person-hero .ph-main .ph-sub { font-size: 13px; color: var(--text-3); }

.contact-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 13.5px; }
.contact-row .ck { width: 52px; flex: none; font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.contact-row .cv { word-break: break-all; }

.link-unit {
  display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--border);
  cursor: pointer;
}
.link-unit:last-child { border-bottom: none; }
.link-unit:hover .lu-t { color: var(--primary); }
.link-unit .lu-bar { width: 4px; height: 34px; border-radius: 3px; flex: none; }
.link-unit .lu-t { display: block; font-size: 14px; font-weight: 700; line-height: 1.35; }
.link-unit .lu-s { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.link-unit .lu-side { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }

.link-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 9px; cursor: pointer; margin-bottom: 8px; transition: all .15s;
}
.link-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.link-item > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.link-item b { font-size: 13.5px; font-weight: 700; }
.link-item i { font-style: normal; font-size: 11.5px; color: var(--text-3); }

.mini-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border-radius: 20px; padding: 0 7px; margin-left: 5px;
  vertical-align: 1px;
}

.person.tappable { cursor: pointer; border-radius: 8px; padding-left: 8px; padding-right: 8px; margin-left: -8px; }
.person.tappable:hover { background: var(--bg); }
