:root {
  --navy: #13213c;
  --navy-2: #1a2b4a;
  --navy-3: #22375c;
  --ink: #182234;
  --muted: #66758c;
  --muted-2: #8b99ad;
  --line: #e3e9f3;
  --line-strong: #cfd8e6;
  --bg: #f3f6fb;
  --card: #ffffff;
  --blue: #2f6bff;
  --blue-soft: #eaf0ff;
  --green: #0f9d58;
  --green-soft: #e7f7ef;
  --orange: #f07d23;
  --orange-soft: #fff1e5;
  --red: #df3f46;
  --red-soft: #fdecec;
  --gold: #c7922b;
  --gold-soft: #fbf3df;
  --shadow-sm: 0 2px 8px rgba(22, 39, 74, .06);
  --shadow: 0 14px 38px rgba(19, 33, 60, .12);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --sidebar-w: 238px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.unit { font-size: .72em; margin-left: 2px; color: var(--muted); font-weight: 500; }

/* ---------------- 登录 ---------------- */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 42%) 1fr;
  background: #eef2f9;
}
.login-brand {
  position: relative;
  overflow: hidden;
  padding: 64px 58px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(47, 107, 255, .38), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(217, 154, 30, .22), transparent 38%),
    linear-gradient(145deg, #0f1b31 0%, #16294a 58%, #1c3358 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 78%);
}
.login-brand::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255,255,255,.035), 0 0 0 120px rgba(255,255,255,.02);
}
.brand-mark {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(135deg, #3d7bff, #19b3a0);
  box-shadow: 0 10px 24px rgba(47, 107, 255, .35);
  margin-bottom: 26px;
}
.brand-en {
  font-size: 11px; letter-spacing: .32em; color: rgba(255,255,255,.55);
  font-weight: 600; margin-bottom: 12px;
}
.login-brand h1 {
  font-size: 42px; line-height: 1.22; margin: 0 0 18px;
  letter-spacing: .02em; font-weight: 700;
}
.brand-sub { color: rgba(255,255,255,.68); font-size: 15px; margin: 0 0 40px; }
.brand-points { list-style: none; padding: 0; margin: 0 0 48px; display: grid; gap: 16px; max-width: 420px; }
.brand-points li { display: flex; gap: 14px; align-items: baseline; color: rgba(255,255,255,.8); font-size: 13.5px; }
.brand-points li span { color: #6f9bff; font-weight: 700; font-size: 12px; letter-spacing: .08em; }
.brand-foot { color: rgba(255,255,255,.4); font-size: 12px; letter-spacing: .06em; }
.login-panel { display: grid; place-items: center; padding: 40px 28px; }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 38px 36px 30px; }
.login-card h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: .01em; }
.login-tip { color: var(--muted); font-size: 13px; margin: 0 0 26px; line-height: 1.7; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 11px 13px; background: #fbfcfe; outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.field textarea { min-height: 78px; resize: vertical; }
.login-error { color: var(--red); font-size: 12.5px; min-height: 18px; margin-bottom: 8px; }
.btn {
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 9px 16px; font-weight: 500; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 8px 18px rgba(47,107,255,.24); }
.btn.primary:hover { background: #1f5bee; color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #f2c9cb; background: #fff7f7; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.quick-title { display: flex; align-items: center; gap: 12px; margin: 24px 0 14px; color: var(--muted-2); font-size: 12px; }
.quick-title::before, .quick-title::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.quick-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-role {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; text-align: left;
  background: #fbfcfe; transition: .15s;
}
.quick-role:hover { border-color: var(--blue); background: var(--blue-soft); }
.quick-role b { display: block; font-size: 13px; }
.quick-role span { color: var(--muted); font-size: 11.5px; }
.demo-note { color: var(--muted-2); font-size: 11.5px; margin: 18px 0 0; text-align: center; }
.demo-note b { color: var(--ink); }

/* ---------------- 应用骨架 ---------------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 30;
  background: linear-gradient(180deg, #13213c, #101a2f);
  color: #fff; padding: 22px 16px 18px; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.06);
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 6px 22px; }
.side-brand .mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; background: linear-gradient(135deg, #3d7bff, #19b3a0);
}
.side-brand b { font-size: 17px; letter-spacing: .04em; display: block; }
.side-brand span { font-size: 9.5px; letter-spacing: .18em; color: rgba(255,255,255,.45); }
.nav-group { margin-top: 18px; }
.nav-group:first-of-type { margin-top: 8px; }
.nav-label { font-size: 10.5px; letter-spacing: .16em; color: rgba(255,255,255,.38); padding: 0 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: rgba(255,255,255,.7); font-size: 13.5px; transition: .15s; margin-bottom: 2px; position: relative;
}
.nav-item svg { width: 18px; height: 18px; opacity: .82; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(63, 122, 255, .17); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: #5c8dff;
}
.nav-item .nav-count {
  margin-left: auto; font-size: 10.5px; background: rgba(223,63,70,.9); color: #fff;
  border-radius: 20px; padding: 2px 7px; font-weight: 600;
}
.side-foot { margin-top: auto; }
.side-user { border-top: 1px solid rgba(255,255,255,.09); padding-top: 16px; display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.12); font-weight: 700; font-size: 13px; flex: 0 0 auto;
}
.side-user .who { line-height: 1.35; min-width: 0; }
.side-user .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 11px; color: rgba(255,255,255,.5); }
.side-user .logout { margin-left: auto; border: 0; background: transparent; color: rgba(255,255,255,.5); padding: 6px; border-radius: 6px; }
.side-user .logout:hover { color: #fff; background: rgba(255,255,255,.08); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  padding: 15px 30px; display: flex; align-items: center; gap: 18px;
}
.top-title h1 { font-size: 18px; margin: 0; letter-spacing: .01em; }
.top-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.role-switch {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 5px 8px 5px 10px; background: #fff;
}
.role-switch label { font-size: 11.5px; color: var(--muted); }
.role-switch select { border: 0; background: transparent; outline: none; font-weight: 600; font-size: 12.5px; padding: 3px 2px; }
.scope-chip {
  font-size: 11.5px; color: var(--blue); background: var(--blue-soft);
  border-radius: 20px; padding: 5px 10px; white-space: nowrap;
}
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 9px; width: 36px; height: 36px; display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.page { padding: 24px 30px 48px; max-width: 1500px; width: 100%; }
.mobile-nav { display: none; }

/* ---------------- 通用组件 ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.section { margin-top: 22px; }
.sec-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 13px; }
.sec-head h2 { margin: 0; font-size: 16px; letter-spacing: .01em; }
.sec-head .sub { color: var(--muted); font-size: 12px; margin-left: 2px; padding-bottom: 1px; }
.sec-head .side { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.link { color: var(--blue); font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px; background: #eef2f8; color: var(--muted); white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .65; }
.badge.blue { background: var(--blue-soft); color: #2557d6; }
.badge.green { background: var(--green-soft); color: #0b7c46; }
.badge.orange { background: var(--orange-soft); color: #c45f12; }
.badge.red { background: var(--red-soft); color: #c62f36; }
.badge.gold { background: var(--gold-soft); color: #9a6c14; }
.badge.gray { background: #eff2f7; color: #66758c; }
.badge.no-dot::before { display: none; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 20px;
  padding: 5px 12px; font-size: 12.5px; color: var(--muted); transition: .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.count-pill { background: #eef2f8; border-radius: 20px; padding: 1px 7px; font-size: 11px; color: var(--muted); }
.chip.active .count-pill { background: rgba(255,255,255,.18); color: #fff; }
.hint { color: var(--muted-2); font-size: 12px; line-height: 1.6; }
.empty { text-align: center; color: var(--muted-2); padding: 42px 16px; font-size: 13px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 6px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.search { position: relative; min-width: 220px; flex: 1; max-width: 340px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }
.search input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 9px 12px 9px 33px; background: #fbfcfe; outline: none;
}
.search input:focus { border-color: var(--blue); background: #fff; }
.select {
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 11px;
  background: #fff; outline: none; color: var(--ink); min-width: 108px;
}
.toolbar .spacer { flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafbfe; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .02em; padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: #fafbfe; white-space: nowrap;
}
.data-table td { padding: 13px 14px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .12s; cursor: pointer; }
.data-table tbody tr:hover { background: #f7faff; }
.cell-main { font-weight: 600; display: block; margin-bottom: 3px; }
.cell-sub { color: var(--muted); font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }
.amount { font-variant-numeric: tabular-nums; font-weight: 700; }
.amount small, .num small { color: var(--muted); font-weight: 500; font-size: 11px; margin-left: 2px; }

/* 进度条 */
.bar { height: 6px; border-radius: 4px; background: #e9edf5; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4b83ff, #2f6bff); }
.bar.green > i { background: linear-gradient(90deg, #34c078, #0f9d58); }
.bar.orange > i { background: linear-gradient(90deg, #ffa869, #f07d23); }
.bar.red > i { background: linear-gradient(90deg, #ef7378, #df3f46); }
.bar-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* ---------------- 工作台 ---------------- */
.hero {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.hero h2 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.hero p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.hero .right-meta { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); line-height: 1.7; }
.hero .right-meta b { color: var(--ink); font-size: 17px; display: block; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpi {
  position: relative; overflow: hidden; padding: 17px 17px 15px; border-radius: var(--r);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: .16s; text-align: left;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(19,33,60,.11); border-color: #c7d4ea; }
.kpi::after {
  content: ""; position: absolute; right: -24px; top: -24px; width: 82px; height: 82px;
  border-radius: 50%; background: var(--kpi-tint, #eef4ff);
}
.kpi .kpi-label { position: relative; z-index: 1; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .kpi-value { position: relative; z-index: 1; font-size: 29px; font-weight: 700; letter-spacing: -.02em; margin-top: 9px; font-variant-numeric: tabular-nums; }
.kpi .kpi-value .unit { font-size: 12px; }
.kpi .kpi-foot { position: relative; z-index: 1; font-size: 11.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 6px; align-items: center; }
.kpi .kpi-foot .flag { color: var(--red); font-weight: 600; }
.kpi .kpi-count { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 5px; }
.kpi.recv { background: linear-gradient(150deg, #fff 60%, #fff7ee); }
.month-strip {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px;
}
.month-cell {
  background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px;
  cursor: pointer; transition: .15s; text-align: left;
}
.month-cell:hover { border-color: var(--blue); background: #fbfdff; }
.month-cell span { display: block; color: var(--muted); font-size: 11.5px; }
.month-cell b { font-size: 19px; display: block; margin-top: 5px; font-variant-numeric: tabular-nums; }
.month-cell b small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.dash-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.panel-head { padding: 16px 18px 13px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 14.5px; }
.panel-head .side { margin-left: auto; }
.panel-body { padding: 8px 18px 16px; }
.panel-body.pad { padding: 16px 18px; }
.mini-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center;
  padding: 11px 0; border-bottom: 1px dashed #e8edf5;
}
.mini-row:last-child { border-bottom: 0; }
.mini-row .name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.mini-row .meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.mini-row .val { text-align: right; font-size: 12px; color: var(--muted); }
.mini-row .val b { display: block; color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.mini-progress { grid-column: 1 / -1; margin-top: 2px; }
.gap-row { padding: 11px 0; border-bottom: 1px dashed #e8edf5; }
.gap-row:last-child { border-bottom: 0; }
.gap-row .g-top { display: flex; align-items: center; gap: 8px; }
.gap-row .g-top b { font-size: 13px; }
.gap-row .g-roles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.role-chip { font-size: 11px; padding: 2px 7px; border-radius: 5px; background: var(--orange-soft); color: #b25b12; }
.role-chip.ok { background: var(--green-soft); color: #0b7c46; }
.role-chip.pending { background: var(--blue-soft); color: #2557d6; }
.overdue-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed #e8edf5; cursor: pointer; }
.overdue-row:last-child { border-bottom: 0; }
.overdue-row .days { flex: 0 0 auto; min-width: 52px; text-align: center; background: var(--red-soft); color: var(--red); border-radius: 7px; padding: 5px 6px; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.overdue-row .days b { display: block; font-size: 15px; }
.overdue-row .who { min-width: 0; }
.overdue-row .who b { font-size: 13px; display: block; }
.overdue-row .who span { color: var(--muted); font-size: 11.5px; }
.warn-banner {
  display: flex; align-items: center; gap: 12px; background: #fff8f2; border: 1px solid #f6dcc4;
  border-radius: 11px; padding: 12px 14px; color: #8f4d0d; font-size: 12.5px;
}
.warn-banner svg { width: 19px; height: 19px; flex: 0 0 auto; }
.grade-bar { display: flex; height: 12px; border-radius: 7px; overflow: hidden; background: #eef2f8; }
.grade-bar i { display: block; height: 100%; }
.grade-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.grade-legend span { display: inline-flex; align-items: center; gap: 5px; }
.grade-legend em { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(15,26,47,.42); opacity: 0; pointer-events: none; transition: .2s; z-index: 40; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 94vw); background: #fff;
  z-index: 41; transform: translateX(102%); transition: transform .24s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column; box-shadow: -18px 0 50px rgba(15,26,47,.18);
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); position: relative; flex: 0 0 auto; }
.drawer-close { position: absolute; right: 16px; top: 16px; border: 0; background: #f2f5fa; border-radius: 8px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); }
.drawer-close:hover { background: #e8edf5; color: var(--ink); }
.drawer-body { overflow-y: auto; padding: 18px 22px 36px; flex: 1; }
.drawer-foot { border-top: 1px solid var(--line); padding: 12px 22px; display: flex; gap: 8px; justify-content: flex-end; flex: 0 0 auto; background: #fbfcfe; }
.dr-title { display: flex; align-items: flex-start; gap: 10px; padding-right: 38px; }
.dr-title h2 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.dr-title .sub { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.dr-head-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 16px -22px 0; padding: 0 22px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 11px 12px 10px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--blue); }
.tab .count { font-size: 10.5px; color: var(--muted-2); margin-left: 3px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.info-item { min-width: 0; }
.info-item span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.info-item b { font-weight: 600; font-size: 13px; word-break: break-all; }
.info-item.full { grid-column: 1 / -1; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.stat-tile { background: #f7f9fd; border-radius: 10px; padding: 12px; }
.stat-tile span { font-size: 11px; color: var(--muted); display: block; }
.stat-tile b { font-size: 19px; display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-tile b small { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.grade-ladder { display: grid; gap: 7px; }
.ladder-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: #f8fafd; }
.ladder-row.current { background: var(--blue-soft); box-shadow: inset 0 0 0 1px #c9dbff; }
.ladder-row .g-name { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.ladder-row .g-rule { font-size: 11.5px; color: var(--muted); }
.ladder-row .g-cycle { font-size: 11px; color: var(--muted); white-space: nowrap; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; font-size: 13.5px; font-weight: 600; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-title .side { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line-strong); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before { content: ""; position: absolute; left: -17px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.tl-item:last-child { padding-bottom: 0; }
.tl-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tl-top b { color: var(--ink); font-size: 12.5px; }
.tl-note { font-size: 12.5px; line-height: 1.65; margin-top: 5px; color: #3d4a60; }
.attach-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.attach { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; background: #f2f5fa; border-radius: 6px; padding: 4px 7px; color: var(--muted); }
.attach svg { width: 12px; height: 12px; }
.source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.source-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff;
  text-align: left; transition: .15s; position: relative;
}
.source-card:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.source-card.covered { background: #f8fdfa; border-color: #cfe9db; }
.source-card.pending { background: #fbfdff; border-color: #d7e3f8; }
.source-card .sc-top { display: flex; align-items: center; gap: 7px; }
.source-card .sc-top b { font-size: 12.5px; }
.source-card .sc-person { font-size: 12.5px; margin-top: 6px; color: #34435b; }
.source-card .sc-note { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.source-card .sc-status { position: absolute; right: 9px; top: 9px; }
.qualify-banner { display: flex; gap: 11px; align-items: flex-start; border-radius: 11px; padding: 13px 14px; margin-bottom: 13px; }
.qualify-banner.ok { background: var(--green-soft); color: #0b6b3e; }
.qualify-banner.risk { background: var(--orange-soft); color: #9a5010; }
.qualify-banner svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.qualify-banner b { display: block; font-size: 13px; }
.qualify-banner span { font-size: 11.5px; opacity: .8; line-height: 1.6; display: block; margin-top: 2px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.price-cell { background: #f8fafd; border-radius: 9px; padding: 11px 12px; }
.price-cell span { font-size: 11px; color: var(--muted); display: block; }
.price-cell b { font-size: 18px; display: block; margin-top: 3px; font-variant-numeric: tabular-nums; }
.milestone-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed #e8edf5; }
.milestone-row:last-child { border-bottom: 0; }
.milestone-row .m-name b { font-size: 12.5px; }
.milestone-row .m-name span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.approval-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #e8edf5; }
.approval-row:last-child { border-bottom: 0; }
.approval-step { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #eef2f8; color: var(--muted); font-size: 10.5px; font-weight: 700; flex: 0 0 auto; }
.approval-step.done { background: var(--green-soft); color: var(--green); }
.approval-row .a-info { min-width: 0; flex: 1; }
.approval-row .a-info b { font-size: 12.5px; }
.approval-row .a-info span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ---------------- 模态框 ---------------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,26,47,.45); z-index: 50; opacity: 0; pointer-events: none; transition: .18s; }
.modal-mask.open { opacity: 1; pointer-events: auto; }
.modal-host { position: fixed; inset: 0; z-index: 51; display: none; place-items: center; padding: 20px; }
.modal-host.open { display: grid; }
.modal {
  width: min(620px, 100%); max-height: 90vh; overflow-y: auto; background: #fff;
  border-radius: 16px; box-shadow: 0 28px 70px rgba(15,26,47,.3);
  animation: pop .2s ease;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { padding: 19px 22px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-head .sub { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 13px 22px 18px; display: flex; gap: 9px; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 15px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { font-size: 12px; color: var(--muted); margin: 16px 0 9px; font-weight: 600; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; }
.form-section::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.form-error { color: var(--red); font-size: 12px; margin-top: 8px; }
.edit-row { background: #f8fafd; border-radius: 9px; padding: 11px 13px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.edit-row .er-name { font-size: 12.5px; font-weight: 600; min-width: 72px; }
.edit-row input { flex: 1; border: 1px solid var(--line-strong); border-radius: 7px; padding: 7px 9px; background: #fff; min-width: 0; }
.edit-row .er-hint { font-size: 11px; color: var(--muted-2); }

/* ---------------- 表格内的等级徽标 ---------------- */
.grade-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 20px; padding: 3px 9px; white-space: nowrap; }
.grade-dot { width: 6px; height: 6px; border-radius: 50%; }

/* ---------------- 设置 ---------------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.setting-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.setting-card .sc-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.setting-card .sc-head h3 { margin: 0; font-size: 14.5px; }
.setting-card .sc-head .side { margin-left: auto; }
.setting-card .sc-body { padding: 15px 18px 18px; }
.setting-card.wide { grid-column: 1 / -1; }
.switch { position: relative; width: 38px; height: 21px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d8e0eb; border-radius: 20px; transition: .15s; }
.switch span::before { content: ""; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(17px); }
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { padding: 9px 10px; border-bottom: 1px solid #eef2f8; text-align: center; font-size: 12px; }
.matrix th { font-size: 11.5px; color: var(--muted); font-weight: 600; background: #fafbfe; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix tbody tr:last-child td { border-bottom: 0; }
.check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; }
.check.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.check.on::after { content: "✓"; font-size: 11px; }
.check:disabled { cursor: not-allowed; opacity: .55; }
.round-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.round-card { background: #f7f9fd; border-radius: 9px; padding: 10px 11px; }
.round-card span { font-size: 11px; color: var(--muted); display: block; }
.round-card b { font-size: 14px; display: block; margin-top: 3px; }
.round-card em { font-style: normal; font-size: 11px; color: var(--muted-2); display: block; margin-top: 2px; }
.admin-list { display: grid; gap: 7px; }
.admin-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; background: #f8fafd; }
.admin-row .avatar.small { width: 28px; height: 28px; border-radius: 7px; font-size: 11px; background: var(--blue-soft); color: var(--blue); }
.admin-row b { font-size: 12.5px; }
.admin-row span { color: var(--muted); font-size: 11px; }
.admin-row .side { margin-left: auto; }
.staff-row .avatar.small { width: 28px; height: 28px; border-radius: 7px; font-size: 11px; background: var(--blue-soft); color: var(--blue); flex: 0 0 auto; }
.staff-who { display: flex; align-items: center; gap: 9px; }
.staff-row .ops { display: flex; gap: 6px; justify-content: flex-end; }
.staff-row .ops .btn { white-space: nowrap; }
.server-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.server-item { background: #f7f9fd; border-radius: 9px; padding: 10px 12px; }
.server-item span { font-size: 11px; color: var(--muted); display: block; margin-bottom: 3px; }
.server-item b { font-size: 12.5px; font-weight: 600; line-height: 1.55; }
.client-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.client-item { background: #f7f9fd; border-radius: 9px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; }
.client-item > div { min-width: 0; }
.client-item b { display: block; font-size: 12.5px; }
.client-item span { font-size: 11px; color: var(--muted); }
.client-item .btn { margin-left: auto; flex: 0 0 auto; }
.client-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 12px; }
.client-actions .hint { margin-left: auto; }
.client-auto { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.client-auto .select { flex: 1; min-width: 220px; }
.wecom-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.wecom-head { display: flex; align-items: flex-start; gap: 10px; }
.wecom-head > div { min-width: 0; }
.wecom-head b { font-size: 13px; display: block; margin-bottom: 3px; }
.wecom-head span:not(.badge) { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.wecom-head .badge { margin-left: auto; flex: 0 0 auto; }
.wecom-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; }
.wecom-form .field { margin: 0; }
.wecom-form .check-row, .wecom-form .wecom-actions, .wecom-form .hint { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.check-row input { width: auto; }
.wecom-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wecom-bind { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.wecom-bind-head b { font-size: 12.5px; display: block; margin-bottom: 3px; }
.wecom-bind-head span { font-size: 11.5px; color: var(--muted); }
.bind-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bind-chip { display: inline-flex; align-items: center; gap: 4px; background: #f2f6fd; border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 11.5px; }
.bind-remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.bind-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.bind-add .select { flex: 1; min-width: 150px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 16px);
  background: #13213c; color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; z-index: 60; opacity: 0; pointer-events: none; transition: .22s;
  box-shadow: 0 14px 30px rgba(19,33,60,.3); max-width: min(90vw, 520px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #a82b31; }
.toast.ok { background: #0c7b47; }

/* ---------------- 资料库 ---------------- */
.hero-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 16px; align-items: start; }
.folder-rail { padding: 10px; position: sticky; top: 78px; }
.rail-title { font-size: 11px; color: var(--muted-2); letter-spacing: .06em; padding: 6px 10px 8px; text-transform: uppercase; }
.folder-row {
  width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: transparent;
  padding: 9px 10px; border-radius: 9px; cursor: pointer; text-align: left; color: var(--muted); font-size: 13px;
}
.folder-row svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted-2); }
.folder-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-row em { font-style: normal; font-size: 11px; color: var(--muted-2); }
.folder-row:hover { background: #f4f7fc; color: var(--ink); }
.folder-row.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.folder-row.active svg, .folder-row.active em { color: var(--blue); }
.file-main { min-width: 0; }
.file-toolbar { padding: 12px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search-box {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px;
  border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff;
}
.search-box svg { width: 15px; height: 15px; color: var(--muted-2); flex: 0 0 auto; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: none; padding: 9px 0; background: transparent; }
.file-sum { font-size: 12px; color: var(--muted); }
.file-grid { display: grid; gap: 10px; margin-top: 12px; }
.file-card { display: flex; align-items: center; gap: 13px; padding: 14px 16px; }
.file-card.locked { background: #fbfcfe; }
.file-ico {
  width: 40px; height: 40px; border-radius: 10px; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; flex: 0 0 auto;
}
.file-ico svg { width: 19px; height: 19px; }
.file-card.locked .file-ico { background: #eef2f8; color: var(--muted-2); }
.file-info { flex: 1; min-width: 0; }
.file-info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.file-desc { display: block; font-size: 12px; color: var(--muted-2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.file-side .btn { white-space: nowrap; }

/* ---------------- 跟进附件 ---------------- */
.attach.link { border: 1px solid var(--line); cursor: pointer; color: var(--blue); background: var(--blue-soft); }
.attach.link:hover { border-color: var(--blue); }
.attach.link:disabled { opacity: .6; cursor: default; }
.media-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.media-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fbfcfe; }
.media-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.media-head b { font-size: 13px; }
.media-head span { font-size: 11px; color: var(--muted-2); }
.media-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; min-height: 26px; }
.media-empty { font-size: 11.5px; color: var(--muted-2); }
.media-chip {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 6px; max-width: 100%;
}
.media-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.media-chip em { font-style: normal; font-size: 11px; color: var(--muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-chip.audio { color: var(--muted); }
.media-chip.audio svg { width: 14px; height: 14px; color: var(--blue); }
.media-chip button { border: 0; background: transparent; padding: 2px; color: var(--muted-2); cursor: pointer; display: grid; }
.media-chip button svg { width: 12px; height: 12px; }
.media-chip button:hover { color: var(--red); }
.btn.recording { background: var(--red-soft); border-color: var(--red); color: var(--red); animation: recPulse 1.4s infinite; }
@keyframes recPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(223, 63, 70, .25); } 50% { box-shadow: 0 0 0 5px rgba(223, 63, 70, 0); } }
.upload-drop {
  border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 22px 16px; text-align: center;
  cursor: pointer; background: #fbfcfe; transition: border-color .15s, background .15s;
}
.upload-drop:hover, .upload-drop.picked { border-color: var(--blue); background: var(--blue-soft); }
.upload-drop svg { width: 24px; height: 24px; color: var(--blue); }
.upload-drop b { display: block; margin-top: 6px; font-size: 13px; }
.upload-drop span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted-2); }

/* ---------------- 年度升降级 ---------------- */
.grade-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-box { padding: 13px 16px; }
.stat-box span { display: block; font-size: 11.5px; color: var(--muted); }
.stat-box b { display: block; margin-top: 5px; font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-box b small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.ok { color: #0b7c46; }
.risk { color: #c62f36; }
.grade-board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.grade-tile {
  text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; border-top: 3px solid var(--gc, var(--blue));
}
.grade-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(19, 33, 60, .09); }
.grade-tile.active { border-color: var(--gc, var(--blue)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gc, #2f6bff) 25%, transparent); }
.gt-top { display: flex; align-items: center; gap: 6px; }
.gt-no { width: 18px; height: 18px; border-radius: 5px; background: var(--gc, var(--blue)); color: #fff; font-size: 10.5px; display: grid; place-items: center; flex: 0 0 auto; }
.gt-top b { font-size: 12.5px; }
.gt-top em { margin-left: auto; font-style: normal; font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.gt-top em small { font-size: 9.5px; color: var(--muted); font-weight: 500; margin-left: 1px; }
.gt-desc { font-size: 10.5px; color: var(--muted); margin: 8px 0 7px; line-height: 1.5; min-height: 30px; }
.gt-foot { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); border-top: 1px solid var(--line); padding-top: 6px; }
.grade-rule-card .card-head { padding-bottom: 0; }
.grade-rule-card .rule-row { cursor: default; }
.grade-rule-card .rule-row:hover { background: transparent; }
.empty-cell { color: var(--muted); font-size: 12.5px; }
.review-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.review-summary > div { background: #f7f9fd; border-radius: 10px; padding: 11px 12px; }
.review-summary span { display: block; font-size: 11px; color: var(--muted); }
.review-summary b { display: block; margin-top: 4px; font-size: 19px; }

/* ---------------- 关系图谱 ---------------- */
.badge.purple { background: #efeaff; color: #6247d8; }
.mind-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; }
.mind-root { display: flex; align-items: center; gap: 8px; }
.mind-root label { font-size: 12px; color: var(--muted); }
.mind-root select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; font-size: 12.5px; color: var(--ink); }
.mind-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: #fff; }
.mind-tool { border: 0; background: transparent; width: 28px; height: 26px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 15px; display: grid; place-items: center; }
.mind-tool:hover { background: var(--blue-soft); color: var(--blue); }
.mind-tool svg { width: 14px; height: 14px; }
.mind-scale { min-width: 42px; text-align: center; font-size: 11.5px; color: var(--muted); }
.mind-wrap {
  position: relative; height: 580px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px;
  background:
    radial-gradient(circle at 18% 20%, rgba(47, 107, 255, .07), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(122, 92, 255, .06), transparent 40%),
    #fbfcff;
  background-image: radial-gradient(#e5ebf5 1px, transparent 1px);
  background-size: 22px 22px;
  cursor: grab; touch-action: none;
}
.mind-wrap.dragging { cursor: grabbing; }
.mind-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mind-links { position: absolute; left: 0; top: 0; pointer-events: none; }
.mind-links path { fill: none; stroke: #c3d2e9; stroke-width: 1.6; }
.mind-node {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.mind-node:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(19, 33, 60, .12); z-index: 2; }
.mind-node.person.root { border-color: var(--blue); background: linear-gradient(180deg, #f4f8ff, #fff); }
.mind-node.person.overdue { border-color: #f0b4b7; }
.mind-node.project { border-left: 3px solid #7a5cff; }
.mind-node.project.dead { opacity: .62; border-left-color: var(--muted-2); }
.mind-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 600; background: #2f6bff;
}
.mind-avatar.g1 { background: #c7922b; }
.mind-avatar.g2 { background: #d9a441; }
.mind-avatar.g3 { background: #2f6bff; }
.mind-avatar.g4 { background: #0f9b8e; }
.mind-avatar.g5 { background: #7a5cff; }
.mind-avatar.g6 { background: #8b99ad; }
.mind-glyph {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto; display: grid; place-items: center;
  background: #efeaff; color: #6247d8; font-size: 13px; font-weight: 600;
}
.mind-text { min-width: 0; }
.mind-text b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mind-text span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mind-root-tag {
  display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 5px; font-style: normal;
  font-size: 9.5px; color: var(--blue); background: var(--blue-soft); vertical-align: 1px;
}
.mind-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.mind-dead { position: absolute; top: 7px; right: 8px; font-style: normal; font-size: 9.5px; color: var(--muted-2); background: #eff2f7; border-radius: 4px; padding: 1px 4px; }
.mind-legend {
  position: absolute; left: 12px; bottom: 10px; display: flex; gap: 12px; flex-wrap: wrap;
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px;
  font-size: 10.5px; color: var(--muted); backdrop-filter: blur(3px);
}
.mind-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mind-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.mind-legend i.ring { border: 1.5px solid var(--red); background: transparent; }
.mind-empty {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #fff; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 14px 18px;
  font-size: 12px; color: var(--muted); max-width: 340px; text-align: center;
}
.mind-path { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; }
.mind-path-node { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; color: var(--ink); }
.mind-path-arrow { color: var(--muted-2); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .month-strip { grid-template-columns: repeat(3, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { padding: 38px 30px 34px; justify-content: flex-start; }
  .login-brand h1 { font-size: 30px; }
  .brand-points { display: none; }
  .brand-foot { display: none; }
  .login-panel { padding: 26px 18px 40px; }
  .login-card { padding: 28px 22px 24px; border-radius: 16px; }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .page { padding: 18px 16px 86px; }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 4px; color: var(--muted); font-size: 10.5px; border-radius: 9px;
  }
  .mobile-nav a svg { width: 19px; height: 19px; }
  .mobile-nav a.active { color: var(--blue); background: var(--blue-soft); }
  .hero h2 { font-size: 21px; }
  .hero .right-meta { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { padding: 14px; }
  .kpi .kpi-value { font-size: 23px; }
  .kpi:last-child { grid-column: 1 / -1; }
  .month-strip { grid-template-columns: 1fr 1fr; gap: 8px; }
  .month-cell { padding: 11px 12px; }
  .month-cell b { font-size: 17px; }
  .table-wrap { margin: 0; }
  .data-table { min-width: 720px; }
  .drawer { width: 100%; }
  .drawer-body { padding: 16px 16px 30px; }
  .drawer-head { padding: 17px 16px 13px; }
  .tabs { margin: 14px -16px 0; padding: 0 16px; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .source-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .round-grid { grid-template-columns: 1fr 1fr; }
  .client-grid { grid-template-columns: 1fr; }
  .wecom-form { grid-template-columns: 1fr; }
  .client-actions .hint { margin-left: 0; width: 100%; }
  .top-actions .role-switch { display: none; }
  .topbar .mobile-menu { display: grid; }
  .file-layout { grid-template-columns: 1fr; }
  .folder-rail { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .rail-title { width: 100%; }
  .folder-row { width: auto; flex: 0 0 auto; }
  .file-card { flex-wrap: wrap; }
  .file-info { flex: 1 1 calc(100% - 56px); }
  .file-side { width: 100%; justify-content: flex-end; }
  .media-panel { grid-template-columns: 1fr; }
  .mind-wrap { height: 460px; }
  .mind-root { width: 100%; }
  .mind-root select { flex: 1; min-width: 0; }
  .mind-tools { margin-left: 0; }
  .grade-stats { grid-template-columns: 1fr 1fr; }
  .grade-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-summary { grid-template-columns: 1fr 1fr; }
  .mobile-nav a { font-size: 9.5px; padding: 6px 2px; }
  .mobile-nav a svg { width: 18px; height: 18px; }
  .toast { bottom: 84px; }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi .kpi-label { font-size: 11.5px; }
  .kpi .kpi-value { font-size: 21px; }
  .login-brand h1 { font-size: 26px; }
  .quick-roles { grid-template-columns: 1fr; }
  .month-strip { grid-template-columns: 1fr 1fr; }
}

/* 排行看板 */
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 24px; height: 24px; border-radius: 50%; background: #eef2f8; color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.rank-no.top { background: linear-gradient(135deg, #f7d774, #e7b53c); color: #6b4b00; }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-weight: 600; font-size: 13px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.rank-sub { color: var(--muted); font-size: 11.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-val { text-align: right; flex: 0 0 auto; }
.rank-val b { font-size: 15px; font-variant-numeric: tabular-nums; }
.rank-val .unit { font-size: 11px; color: var(--muted); margin-left: 2px; }
.rank-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 附件在线预览 */
.attach-preview { display: flex; justify-content: center; align-items: center; background: #0f172a; border-radius: 12px; overflow: hidden; min-height: 240px; margin-top: 14px; }
.attach-preview-img { max-width: 100%; max-height: 70vh; display: block; }
.attach-preview-video { width: 100%; max-height: 70vh; background: #000; }
.attach-preview-audio { width: 100%; max-width: 520px; }
.attach-preview-file { color: #cbd5e1; display: grid; justify-items: center; gap: 8px; padding: 40px; }

/* 审批中心与交付阶段 */
.flow-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.flow-line .chip { display: inline-flex; gap: 6px; align-items: center; }
.flow-line .chip em { font-style: normal; color: var(--muted); font-size: 11px; }
.approval-steps { display: grid; gap: 8px; }
.approval-step { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; }
.approval-step .dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; margin-top: 3px; flex: 0 0 auto; }
.approval-step.done .dot { background: var(--green); }
.approval-step.reject .dot { background: var(--red, #d64545); }
.approval-step.current .dot { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.approval-step b { font-weight: 600; }
.approval-step em { font-style: normal; display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.approval-step.done b, .approval-step.reject b { color: var(--muted); }

.stage-timeline { display: grid; gap: 10px; }
.stage-node { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.stage-node.done { border-color: #cfe8d8; background: #f6fbf7; }
.stage-node.next { border-color: var(--blue); background: var(--blue-soft); }
.stage-node .seq { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #eef2f8; color: var(--muted); font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.stage-node.done .seq { background: var(--green); color: #fff; }
.stage-node.next .seq { background: var(--blue); color: #fff; }
.stage-node .body { flex: 1; min-width: 0; }
.stage-node .body b { font-size: 13px; }
.stage-node .body .meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.6; }

.setting-list { display: grid; gap: 10px; }
.setting-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.setting-block h3 { margin: 0 0 8px; font-size: 13px; }
.step-editor { display: grid; grid-template-columns: 26px 1.1fr .8fr 1.4fr .8fr 30px; gap: 8px; align-items: center; margin-bottom: 8px; }
.step-editor input { min-width: 0; }
.required-grid { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.required-grid label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.check-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.step-editor.flow-step { grid-template-columns: 26px 1.4fr .8fr 30px; }
.setting-block summary { cursor: pointer; font-size: 13px; }
.setting-block .seq { color: var(--muted); font-size: 12px; font-weight: 700; }



/* ---------- P2：内部聊天 ---------- */
.badge.ok { background: var(--green-soft); color: #0b7c46; }
.badge.warn { background: var(--orange-soft); color: #c45f12; }
.badge.danger { background: var(--red-soft); color: #c62f36; }
.badge.muted { background: #eff2f7; color: #66758c; }
.btn.xs { padding: 3px 7px; font-size: 11.5px; border-radius: 6px; line-height: 1.3; }
.btn.xs svg { width: 13px; height: 13px; }
.empty.sm { padding: 24px 12px; font-size: 12px; }
.panel-grid.two { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.panel-grid.two .panel { height: 100%; }

.chat-layout { display: grid; grid-template-columns: 288px 1fr; min-height: 580px; overflow: hidden; padding: 0; }
.chat-side { border-right: 1px solid var(--line); background: #fbfcff; display: flex; flex-direction: column; min-height: 0; }
.chat-side-head { padding: 15px 16px 11px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.chat-side-head em { font-style: normal; background: #eef2f9; border-radius: 20px; padding: 1px 8px; font-size: 11px; }
.chat-convs { flex: 1; overflow-y: auto; padding: 6px; }
.chat-conv { display: flex; gap: 10px; width: 100%; padding: 10px; border: 0; background: transparent; text-align: left; cursor: pointer; align-items: center; border-radius: 10px; font: inherit; }
.chat-conv:hover { background: #f1f5ff; }
.chat-conv.active { background: #e8efff; }
.chat-avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #3d74ff, #7c5cff); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.chat-avatar.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 10.5px; }
.chat-conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-conv-main b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv-main b em { font-style: normal; color: var(--muted); font-size: 10.5px; font-weight: 500; }
.chat-conv-main > span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
.chat-time { font-size: 10px; color: var(--muted-2); }
.chat-unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; display: grid; place-items: center; font-weight: 600; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; min-height: 62px; }
.chat-head h3 { margin: 0; font-size: 15px; }
.chat-head .sub { font-size: 11.5px; color: var(--muted); }
.chat-head-tag { margin-left: auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; background: #f7f9fd; display: flex; flex-direction: column; gap: 12px; min-height: 380px; max-height: 520px; }
.chat-msg { display: flex; gap: 8px; max-width: 78%; align-items: flex-start; }
.chat-msg.mine { margin-left: auto; flex-direction: row-reverse; }
.chat-bubble { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; box-shadow: var(--shadow-sm); min-width: 60px; }
.chat-msg.mine .chat-bubble { background: #e8f0ff; border-color: #d3e1ff; }
.chat-who { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.chat-text { font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.chat-stamp { font-size: 10px; color: var(--muted-2); margin-top: 5px; text-align: right; }
.chat-img { max-width: 240px; border-radius: 8px; display: block; }
.chat-audio { max-width: 240px; height: 34px; }
.chat-file { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--blue); font-size: 12.5px; cursor: pointer; padding: 0; font: inherit; }
.chat-file svg { width: 16px; height: 16px; flex: 0 0 auto; }
.chat-file em { font-style: normal; color: var(--muted); font-size: 10.5px; }
.chat-compose { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; background: #fff; }
.chat-compose textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px; font-family: inherit; line-height: 1.5; min-height: 44px; max-height: 120px; }
.chat-attach-hint { font-size: 11px; color: var(--muted); padding: 0 16px 8px; min-height: 16px; }
.member-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.member-pick { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.member-pick:hover { background: #f4f7ff; }
.member-pick b { font-weight: 600; }
.member-pick span { color: var(--muted); font-size: 11px; }

/* ---------- P2：公共网盘 ---------- */
.drive-shell { display: grid; grid-template-columns: 248px 1fr; gap: 16px; align-items: start; }
.drive-tree { padding: 10px; max-height: 660px; overflow: auto; }
.drive-tree-head { padding: 5px 8px 10px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.drive-tree-head em { font-style: normal; display: block; margin-top: 3px; color: var(--muted-2); font-size: 10.5px; }
.drive-tree-row { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: transparent; padding: 7px 9px; border-radius: 8px; font-size: 12.5px; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.drive-tree-row:hover { background: #f2f6ff; }
.drive-tree-row.active { background: #e8efff; color: var(--blue); font-weight: 600; }
.drive-tree-row.root { margin-bottom: 2px; }
.drive-tree-row svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--muted); }
.drive-tree-row.active svg { color: var(--blue); }
.drive-main { padding: 14px 16px; min-height: 400px; }
.drive-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.drive-crumb { display: flex; align-items: center; gap: 1px; flex-wrap: wrap; }
.drive-crumb svg { width: 14px; height: 14px; color: var(--muted-2); }
.drive-toolbar-meta { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.drive-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 10px; margin-bottom: 16px; }
.drive-folder { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.drive-folder:hover { border-color: #c9d9ff; background: #f9fbff; }
.drive-folder-icon { width: 34px; height: 34px; border-radius: 9px; background: #fff4e2; display: grid; place-items: center; flex: 0 0 auto; }
.drive-folder-icon svg { width: 18px; height: 18px; color: #d08a1c; }
.drive-folder-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drive-folder-main b { font-size: 12.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drive-folder-main span { font-size: 10.5px; color: var(--muted); }
.drive-actions { display: flex; gap: 1px; opacity: .35; transition: opacity .15s; }
.drive-folder:hover .drive-actions { opacity: 1; }
.drive-files-head { display: grid; grid-template-columns: 2.6fr .7fr .8fr .9fr 1.4fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.drive-file-row { display: grid; grid-template-columns: 2.6fr .7fr .8fr .9fr 1.4fr; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f3f9; }
.drive-file-row:last-child { border-bottom: 0; }
.drive-file-name { display: flex; gap: 9px; align-items: center; border: 0; background: transparent; cursor: pointer; text-align: left; min-width: 0; font: inherit; padding: 0; }
.drive-file-name > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drive-file-name b { font-size: 12.8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drive-file-name em { font-style: normal; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drive-file-badge { width: 32px; height: 32px; border-radius: 8px; background: #eef2f9; color: #506283; display: grid; place-items: center; font-size: 9px; font-weight: 700; flex: 0 0 auto; letter-spacing: .3px; }
.drive-file-badge.kind-img { background: #e9f6ee; color: #0b7c46; }
.drive-file-badge.kind-pdf { background: #fdecec; color: #c62f36; }
.drive-file-badge.kind-video, .drive-file-badge.kind-audio { background: #efeaff; color: #6247d8; }
.drive-file-actions { display: flex; gap: 1px; justify-content: flex-end; }
.muted { color: var(--muted); font-size: 11.5px; }
.preview-media { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 10px; }
.preview-audio { width: 100%; margin: 30px 0; }
.preview-frame { width: 100%; height: 68vh; border: 0; border-radius: 10px; background: #fff; }
.preview-text { background: #f7f9fd; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 66vh; overflow: auto; margin: 0; }

/* ---------- P2：智慧人事 ---------- */
.hr-staff-list { max-height: 560px; overflow-y: auto; }
.hr-staff-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid #f0f3f9; background: transparent; padding: 11px 18px; cursor: pointer; text-align: left; font: inherit; }
.hr-staff-row:hover { background: #f8faff; }
.hr-staff-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hr-staff-main b { font-size: 13px; font-weight: 600; }
.hr-staff-main b em { font-style: normal; color: var(--muted); font-size: 10.5px; font-weight: 500; margin-left: 4px; }
.hr-staff-main span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-staff-contract { flex: 0 0 auto; }
.hr-staff-att { flex: 0 0 118px; font-size: 11px; color: var(--muted); text-align: right; }
.hr-leave-list { max-height: 520px; overflow-y: auto; padding: 4px 18px 16px; }
.hr-leave-item { border-bottom: 1px solid #f0f3f9; padding: 11px 0; }
.hr-leave-item:last-child { border-bottom: 0; }
.hr-leave-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hr-leave-top b { font-size: 12.8px; }
.hr-leave-top em { font-style: normal; font-size: 11px; color: var(--muted); }
.hr-leave-item p { margin: 6px 0 0; font-size: 11.8px; color: var(--muted); line-height: 1.6; }
.hr-leave-actions { display: flex; gap: 6px; margin-top: 8px; }
.hr-detail { max-height: 68vh; overflow-y: auto; }
.hr-section { border-top: 1px solid var(--line); padding: 14px 0; }
.hr-detail .hr-section:first-child { border-top: 0; padding-top: 0; }
.hr-section h4 { margin: 0 0 10px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.hr-section h4 .muted { font-weight: 400; font-size: 11px; }
.hr-section-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.hr-section-foot .muted { margin-right: auto; }
.hr-contract-list { display: grid; gap: 8px; }
.hr-contract-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.hr-contract-item > div:first-child { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.hr-contract-item b { font-size: 12.5px; }
.hr-contract-item span { font-size: 11px; color: var(--muted); }
.hr-contract-actions { display: flex; gap: 4px; }

/* ---------- P3：考勤统计（仿钉钉） ---------- */
.att-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 14px 0 4px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.att-cal-day { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: transparent; border-radius: 12px; padding: 6px 0; font: inherit; cursor: pointer; color: var(--muted); }
.att-cal-day span { font-size: 11px; }
.att-cal-day b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; font-weight: 500; color: var(--ink); }
.att-cal-day.active b { background: #2563eb; color: #fff; }
.att-cal-day.today b { box-shadow: 0 0 0 2px rgba(37,99,235,.4) inset; }
.att-cal-day:hover { background: #f5f8ff; }
.att-gauge { padding: 6px 0 4px; }
.att-gauge-wrap { position: relative; width: 280px; max-width: 100%; margin: 0 auto; text-align: center; }
.att-gauge-label { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; flex-direction: column; gap: 3px; }
.att-gauge-label b { font-size: 30px; line-height: 1; letter-spacing: -.5px; }
.att-gauge-label span { font-size: 12px; color: var(--muted); }
.att-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px auto 8px; max-width: 520px; text-align: center; }
.att-metrics > div { display: flex; flex-direction: column; gap: 3px; }
.att-metrics b { font-size: 22px; font-weight: 600; }
.att-metrics span { font-size: 11.5px; color: var(--muted); }
.att-dept-head, .att-dept-row { display: grid; grid-template-columns: minmax(150px, 1.4fr) minmax(100px, 1fr) 80px 84px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f3f9; }
.att-dept-head { font-size: 11px; color: var(--muted); padding-top: 16px; }
.att-dept-name { display: flex; flex-direction: column; gap: 2px; }
.att-dept-name b { font-size: 13px; }
.att-dept-name span { font-size: 10.5px; color: var(--muted); }
.att-dept-bar { height: 8px; border-radius: 99px; background: #edf1f8; overflow: hidden; }
.att-dept-bar span { display: block; height: 100%; border-radius: 99px; background: #2563eb; }
.att-dept-num, .att-dept-hours { font-size: 12px; text-align: right; color: var(--muted); }
.att-dept-num { color: var(--ink); font-weight: 600; }


/* ---------- P2：业务团队看板 ---------- */
.team-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.team-board { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 8px; background: #fcfdff; }
.team-board-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 3px; }
.team-board-head b { font-size: 13px; }
.team-board-head span { font-size: 10.5px; color: var(--muted); }
.rank-row.compact { padding: 7px 2px; }
.rank-row.compact .rank-no { width: 20px; height: 20px; font-size: 11px; }
.rank-row.compact .rank-val b { font-size: 14px; }

@media (max-width: 980px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 220px; }
  .chat-convs { max-height: 160px; }
  .chat-msgs { max-height: none; min-height: 320px; }
  .drive-shell { grid-template-columns: 1fr; }
  .drive-tree { max-height: 190px; }
  .drive-files-head, .drive-file-row { grid-template-columns: 1.9fr .8fr 1.2fr; }
  .drive-files-head span:nth-child(2), .drive-files-head span:nth-child(3),
  .drive-file-row > .muted { display: none; }
  .panel-grid.two { grid-template-columns: 1fr; }
  .team-boards { grid-template-columns: 1fr; }
  .hr-staff-att { display: none; }
  .member-picks { grid-template-columns: 1fr; }
}
.avatar.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; background: var(--blue-soft); color: var(--blue); }
@media (max-width: 780px) {
  .mobile-nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a { flex: 0 0 auto; min-width: 58px; }
}

/* ---------- P3-A 集团组织 / 管理员体系 ---------- */
.admin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-col { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--card); }
.admin-col-head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); margin-bottom: 10px; }
.admin-col-head span { color: var(--muted); font-size: 12px; }
.admin-row .ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.org-company { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--card); }
.org-co-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.org-co-head b { display: block; }
.org-co-head span { color: var(--muted); font-size: 12px; }
.org-co-head .ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.org-depts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.org-dept { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg); border-radius: var(--r-sm); padding: 6px 8px; font-size: 12px; flex: 1 1 150px; }
.org-dept em { font-style: normal; color: var(--muted); margin-left: 6px; }
.org-dept .ops { display: flex; gap: 4px; }
.density-compact .nav-item { padding-top: 6px; padding-bottom: 6px; }
.density-compact .data-table td { padding-top: 6px; padding-bottom: 6px; }
.layout-wide .app-main { max-width: 1680px; }
@media (max-width: 900px) { .admin-split { grid-template-columns: 1fr; } }
.no-nav-icons .nav-item .ico { display: none; }

/* ---------- P3-B 信息员介绍任务 ---------- */
.referral-block { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ref-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; }
.ref-head span { color: var(--muted); font-size: 12px; }
.ref-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 12px; }
.ref-name { flex: 0 0 130px; color: var(--muted); }
.ref-row .bar { flex: 1; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ref-row .bar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.ref-val { flex: 0 0 56px; text-align: right; font-weight: 600; }

/* ---------- P3-C 待办事项 ---------- */
.todo-list { display: flex; flex-direction: column; }
.todo-item { display: flex; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); align-items: flex-start; }
.todo-item:first-child { border-top: 0; }
.todo-item.done { opacity: .62; }
.todo-item.overdue { background: linear-gradient(90deg, rgba(220, 38, 38, .05), transparent 55%); }
.todo-check { flex: 0 0 30px; height: 30px; margin-top: 2px; border-radius: 50% !important; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; padding: 0; }
.todo-check svg { width: 16px; height: 16px; }
.todo-item.done .todo-check { background: var(--blue); border-color: var(--blue); color: #fff; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-weight: 600; font-size: 14px; }
.todo-item.done .todo-title { text-decoration: line-through; }
.todo-body { color: var(--muted); font-size: 12px; margin-top: 3px; }
.todo-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 7px; font-size: 12px; color: var(--muted); }
.todo-meta .prio { padding: 2px 7px; border-radius: 6px; font-size: 11px; }
.todo-meta .prio.red { background: rgba(220, 38, 38, .1); color: var(--red); }
.todo-meta .prio.orange { background: rgba(234, 138, 22, .12); color: var(--orange); }
.todo-meta .prio.gray { background: var(--bg); color: var(--muted); }
.todo-link { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); }
.todo-link svg, .todo-due svg { width: 13px; height: 13px; }
.todo-due { display: inline-flex; align-items: center; gap: 4px; }
.todo-due.red { color: var(--red); font-weight: 600; }
.todo-owner { margin-left: auto; }
.todo-actions { display: flex; gap: 4px; align-items: center; }
@media (max-width: 620px) { .todo-owner { margin-left: 0; } .todo-actions { flex-direction: column; } }

.backup-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow: auto; }
.backup-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.backup-row b { display: block; font-size: 13px; }
.backup-row span { color: var(--muted); font-size: 12px; }

/* ===== P4 工作台 / 首页快捷入口 / 返回键 / 权限编辑 ===== */
.top-back { flex: 0 0 auto; width: 34px; height: 34px; margin-right: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.top-back svg { width: 16px; height: 16px; transform: rotate(180deg); }
.top-back:hover { color: var(--blue); border-color: var(--blue); }

.shortcut-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.shortcut-tile { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.shortcut-tile:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.shortcut-tile.more { border-style: dashed; color: var(--muted); }
.sc-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--blue-soft, rgba(37,99,235,.1)); color: var(--blue); display: grid; place-items: center; }
.sc-icon svg { width: 16px; height: 16px; }

.wb-search { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 12px 16px; }
.wb-search .search { flex: 1; }
.wb-group { margin-bottom: 22px; }
.wb-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.wb-group-head h3 { font-size: 15px; margin: 0; }
.wb-group-head span { color: var(--muted); font-size: 12px; }
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.wb-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card, #fff); text-align: left; cursor: pointer; transition: .15s; }
.wb-tile:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 40, 90, .08); }
.wb-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft, rgba(37,99,235,.1)); color: var(--blue); display: grid; place-items: center; }
.wb-icon svg { width: 21px; height: 21px; }
.wb-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wb-text b { font-size: 14px; color: var(--text); }
.wb-text em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.remind-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.remind-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.remind-row.overdue { border-color: rgba(220, 38, 38, .35); background: rgba(220, 38, 38, .04); }
.remind-row b { display: block; font-size: 13px; }
.remind-row span { color: var(--muted); font-size: 12px; }

.perm-rule-row, .member-edit-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.perm-rule-row select, .member-edit-row select { max-width: 160px; }
.mini-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.shortcut-editor { display: flex; flex-direction: column; gap: 8px; }
.shortcut-edit-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.shortcut-edit-row input[data-sc-name] { flex: 1; min-width: 120px; }
.field-check-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.attach-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.attach { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 12px; }
.attach svg { width: 14px; height: 14px; }
.attach.link { cursor: pointer; color: var(--blue); }
.attach-x { border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--muted); display: inline-flex; }
.attach-x svg { width: 12px; height: 12px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; flex-direction: row; }
.checkbox-line input { width: auto; }
.attach-preview { padding: 12px; display: grid; place-items: center; background: #0f172a08; border-radius: 12px; }
.attach-preview-img, .attach-preview-video { max-width: 100%; max-height: 62vh; border-radius: 10px; }
.attach-preview-audio { width: 100%; }
.attach-preview-file { text-align: center; padding: 30px; color: var(--muted); }
.attach-preview-file svg { width: 40px; height: 40px; }
