:root {
  --brand: #2f6feb;
  --brand-dark: #1c56c9;
  --brand-soft: #eaf1fe;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #8f959e;
  --border: #e3e6ea;
  --border-soft: #eef0f3;
  --ok: #16a34a;
  --ok-soft: #e8f6ed;
  --warn: #c2410c;
  --warn-soft: #fdf0e7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(31, 35, 41, 0.05), 0 4px 14px rgba(31, 35, 41, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -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(--brand); text-decoration: none; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; flex: 0 0 34px;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.brand-sub { font-size: 11px; color: var(--text-3); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--border-soft); color: var(--text); }
.nav-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.nav-ico { width: 16px; height: 16px; flex: 0 0 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.identity {
  margin-top: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.identity-row { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.identity-name { font-size: 13px; font-weight: 500; }
.identity-dept { font-size: 11px; color: var(--text-3); }
.identity-label { font-size: 11px; color: var(--text-3); margin-bottom: 8px; }

/* ---------- main ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-crumb { font-size: 12px; color: var(--text-3); }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-weight: 500;
}
.pill-muted { background: var(--border-soft); color: var(--text-2); font-weight: 400; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }

/* demo switcher */
.demo-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 16px 28px 0; padding: 11px 16px;
  background: var(--warn-soft); border: 1px solid #f6d9c4;
  border-radius: var(--radius); font-size: 12.5px; color: var(--warn);
}
.demo-bar strong { font-weight: 600; }
.demo-bar select {
  border: 1px solid #e8c4a8; background: #fff; border-radius: 6px;
  padding: 4px 8px; font-size: 12.5px; color: var(--text);
}

.content { padding: 22px 28px 64px; max-width: 940px; width: 100%; }

.view { display: none; }
.view.on { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- home ---------- */
.hero {
  background: linear-gradient(135deg, #2f6feb 0%, #4b86f0 100%);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  color: #fff;
  margin-bottom: 20px;
}
.hero h1 { font-size: 20px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.3px; }
.hero p { font-size: 13.5px; opacity: .88; max-width: 520px; }
.hero-meta { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-meta span {
  font-size: 12px; background: rgba(255,255,255,.16);
  padding: 4px 10px; border-radius: 999px;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.entry {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex; flex-direction: column; gap: 7px;
}
.entry:hover { border-color: #c7d7f8; box-shadow: var(--shadow); transform: translateY(-1px); }
.entry-ico {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 3px;
}
.entry-ico svg { width: 17px; height: 17px; stroke: var(--brand); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.entry-t { font-size: 14px; font-weight: 500; }
.entry-d { font-size: 12.5px; color: var(--text-2); }
.entry-n { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
.section-head h2 { font-size: 15px; font-weight: 600; }
.section-head span { font-size: 12px; color: var(--text-3); }

/* ---------- accordion (入职须知) ---------- */
.acc {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 10px;
}
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; text-align: left; transition: background .15s;
}
.acc-head:hover { background: #fbfcfd; }
.acc-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px;
  background: var(--brand-soft); display: flex; align-items: center; justify-content: center;
}
.acc-ico svg { width: 15px; height: 15px; stroke: var(--brand); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acc-title { flex: 1; font-size: 14px; font-weight: 500; }
.acc-tag { font-size: 11px; color: var(--text-3); margin-right: 4px; }
.chev { width: 16px; height: 16px; stroke: var(--text-3); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; flex: 0 0 16px; }
.acc.open .chev { transform: rotate(90deg); }
.acc-body { display: none; padding: 0 18px 18px 60px; border-top: 1px solid var(--border-soft); }
.acc.open .acc-body { display: block; animation: fade .2s ease; }

.kv { margin-top: 14px; }
.kv-row { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border-soft); }
.kv-row:last-child { border-bottom: none; }
.kv-k { flex: 0 0 108px; font-size: 12.5px; color: var(--text-2); }
.kv-v { flex: 1; font-size: 13.5px; }
.hl { background: #fff8e1; border-radius: 3px; padding: 0 3px; }

ul.plain { margin: 12px 0 0; padding-left: 18px; }
ul.plain li { font-size: 13.5px; margin-bottom: 7px; }
ul.plain li::marker { color: var(--brand); }

.meta-note {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg); font-size: 12px; color: var(--text-2);
  display: flex; gap: 8px; align-items: flex-start;
}
.meta-note svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; stroke: var(--text-3); fill: none; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- SOP ---------- */
.sop-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.sop-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.sop-title { font-size: 14.5px; font-weight: 600; }
.sop-desc { font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; }
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before {
  content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--border);
}
.step-n {
  width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; position: relative; z-index: 1;
}
.step-b { flex: 1; padding-top: 3px; }
.step-t { font-size: 13.5px; font-weight: 500; }
.step-d { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.step-owner { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

.empty-slot {
  border: 1px dashed #c9d3e0; border-radius: var(--radius);
  padding: 22px; text-align: center; color: var(--text-3); font-size: 13px;
}

/* ---------- QA chat ---------- */
.chat-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 560px; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-head-t { font-size: 14px; font-weight: 600; }
.chat-head-s { font-size: 11.5px; color: var(--text-3); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: #fafbfc; }
.msg { display: flex; gap: 10px; max-width: 88%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-av { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; }
.msg.bot .msg-av { background: var(--brand-soft); color: var(--brand); }
.msg.me .msg-av { background: #e8ebef; color: var(--text-2); }
.bubble { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; font-size: 13.5px; }
.msg.me .bubble { background: var(--brand); border-color: var(--brand); color: #fff; }
.bubble p + p { margin-top: 8px; }
.src {
  margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border);
  font-size: 11.5px; color: var(--text-3); display: flex; gap: 6px; align-items: flex-start;
}
.src svg { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 2px; stroke: var(--text-3); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; padding: 11px 18px; border-top: 1px solid var(--border-soft); background: #fff; }
.chip {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-2); background: #fff;
  transition: all .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.chat-input { display: flex; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--border-soft); background: #fff; }
.chat-input input {
  flex: 1; border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 13px; outline: none; transition: border-color .15s;
}
.chat-input input:focus { border-color: var(--brand); }
.btn {
  background: var(--brand); color: #fff; border-radius: 9px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 500; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { background: #b9c6dd; cursor: not-allowed; }

.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: bounce 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- tabbar (mobile) ---------- */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .shell { display: block; }
  .content { padding: 16px 16px 84px; }
  .topbar { padding: 11px 16px; }
  .demo-bar { margin: 12px 16px 0; font-size: 12px; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 20px; }
  .hero h1 { font-size: 18px; }
  .acc-body { padding-left: 18px; }
  .kv-row { flex-direction: column; gap: 2px; }
  .kv-k { flex: none; }
  .chat-wrap { height: calc(100vh - 260px); min-height: 400px; }
  .msg { max-width: 94%; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 0; font-size: 10.5px; color: var(--text-3);
  }
  .tab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tab.on { color: var(--brand); }
}

/* ==========================================================
   制度中心 / 组织架构 / 管理员编辑 新增组件
   ========================================================== */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.entry-lg { padding: 20px; }

/* ---------- 面包屑 ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--brand); padding: 2px 0; }
.crumb:hover { text-decoration: underline; }
.crumb-sep { font-size: 12px; color: var(--text-3); }
.crumb-cur { font-size: 13px; color: var(--text-2); font-weight: 500; }

/* ---------- 制度详情卡 ---------- */
.doc-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.doc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-title { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.doc-sum {
  font-size: 13px; color: var(--text-2); margin-top: 6px;
  padding-left: 10px; border-left: 2px solid var(--brand);
}

/* ---------- 汇报线 ---------- */
.line-panel {
  display: flex; align-items: stretch; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 4px;
}
.line-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.line-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-2); font-weight: 500;
}
.line-label svg { width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.line-arrow { display: flex; align-items: center; color: var(--text-3); font-size: 15px; }

.pcard {
  position: relative;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; background: #fff; transition: border-color .15s;
}
.pcard-name { font-size: 13.5px; font-weight: 500; }
.pcard-title { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.pcard-lead { background: #fbfcfe; border-color: #d7e2f7; }
.pcard-me { border-color: var(--brand); background: var(--brand-soft); }
.pcard-me .pcard-name { color: var(--brand); }
.pcard-me .pcard-title { color: var(--brand); opacity: .8; }
.pcard-badge {
  position: absolute; top: -8px; right: 8px;
  background: var(--brand); color: #fff; font-size: 10.5px;
  padding: 1px 7px; border-radius: 999px; font-weight: 500;
}
.pcard-empty { border-style: dashed; background: #fbfcfd; }
.pcard-empty .pcard-name { color: var(--text-3); }
.pcard-empty .pcard-title { color: var(--text-3); }

/* ---------- 组织树 ---------- */
.org-root { display: flex; flex-direction: column; gap: 0; }
.org-gm { display: flex; justify-content: center; margin-bottom: 0; }
.org-gm .pcard { min-width: 180px; text-align: center; background: #fbfcfe; border-color: #d7e2f7; }
.org-tree {
  margin-top: 18px; padding-top: 4px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  border-top: 1px dashed var(--border);
}
.dept-node { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dept-head {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 12px 15px; text-align: left; transition: background .15s;
}
.dept-head:hover { background: #fbfcfd; }
.dept-name { flex: 1; font-size: 13.5px; font-weight: 500; }
.dept-count { font-size: 11.5px; color: var(--text-3); }
.chev { width: 15px; height: 15px; flex: 0 0 15px; stroke: var(--text-3); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.chev-open { transform: rotate(90deg); }
.dept-body { padding: 0 15px 15px; border-top: 1px solid var(--border-soft); }
.dept-lead { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.dept-role { font-size: 11.5px; color: var(--text-3); flex: 0 0 42px; }
.dept-lead .pcard { flex: 1; }
.dept-members { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; padding-left: 50px; }

/* ---------- 图文混排 ---------- */
.figures { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.figure {
  position: relative; margin: 0; width: 168px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: #fafbfc;
}
.figure img { display: block; width: 100%; height: 108px; object-fit: cover; background: #f0f2f5; }
.figure figcaption {
  font-size: 11px; color: var(--text-3); padding: 5px 8px;
  border-top: 1px solid var(--border-soft); background: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.figure-broken img { display: none; }
.figure-broken::after {
  content: "图片加载失败"; display: flex; align-items: center; justify-content: center;
  height: 108px; font-size: 12px; color: var(--text-3); background: #f0f2f5;
}
.fig-del {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(31,35,41,.62); color: #fff; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.fig-del:hover { background: var(--brand); }
.fig-add {
  width: 168px; height: 141px; flex: 0 0 auto;
  border: 1px dashed #c9d3e0; border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; color: var(--text-2); cursor: pointer; background: #fbfcfd;
  transition: all .15s;
}
.fig-add:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.fig-add svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fig-add input[type=file] { display: none; }

/* ---------- 管理员 ---------- */
.btn-mini {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 5px 11px; border-radius: 7px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  transition: all .15s;
}
.btn-mini:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-danger:hover { border-color: #d0453f; color: #d0453f; background: #fdf0ef; }
.btn-ico { width: 13px; height: 13px; flex: 0 0 13px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.admin-bar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--radius); font-size: 12.5px;
  background: var(--ok-soft); color: var(--ok); border: 1px solid #c9e6d3;
  margin-bottom: 14px;
}
.admin-bar .btn-mini { margin-left: auto; }
.admin-bar-off { background: var(--bg); color: var(--text-2); border-color: var(--border); }

#adminBtn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  transition: all .15s;
}
#adminBtn:hover { border-color: var(--brand); color: var(--brand); }
#adminBtn.on { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }

/* ---------- 浮层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(31, 35, 41, .42);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 460px;
  max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(31,35,41,.18);
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-wide { max-width: 720px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-soft);
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-x { font-size: 22px; line-height: 1; color: var(--text-3); padding: 0 4px; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 14px 20px; border-top: 1px solid var(--border-soft);
}
.btn-ghost { background: #fff; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 12.5px; font-weight: 500; margin-bottom: 6px; }
.field-hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.field-hint-inline { font-weight: 400; color: var(--text-3); }
.field-input {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; outline: none; transition: border-color .15s; background: #fff;
}
.field-input:focus { border-color: var(--brand); }
.field-area { min-height: 62px; resize: vertical; margin: 8px 0; }
.check-row { display: flex; flex-wrap: wrap; gap: 14px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.step-edit {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px; margin-bottom: 11px; background: #fbfcfd;
}
.step-edit-head { display: flex; align-items: center; gap: 9px; }
.step-edit-head .field-input { flex: 1; }
.step-edit-head .step-n { flex: 0 0 27px; }

/* ---------- 范围说明与建议 ---------- */
.scope-note {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 12px 15px; border-radius: var(--radius); font-size: 12.5px;
  background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 14px;
}
.scope-note strong { font-weight: 600; }
.scope-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- 轻提示 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%) translateY(10px);
  background: rgba(31,35,41,.9); color: #fff; font-size: 13px;
  padding: 9px 17px; border-radius: 9px; z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 40px);
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 新增组件响应式 ---------- */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .line-panel { flex-direction: column; }
  .line-arrow { transform: rotate(90deg); justify-content: center; }
  .org-tree { grid-template-columns: 1fr; }
  .dept-members { padding-left: 0; }
  .overlay { padding: 12px; align-items: flex-start; padding-top: 24px; }
  .modal { max-height: calc(100vh - 48px); }
  .figure, .fig-add { width: calc(50% - 5px); }
  .figure img, .fig-add, .figure-broken::after { height: 96px; }
  .fig-add { height: 124px; }
  #toast { bottom: 84px; }
}

