/* ============================================================
   恒春绩效考核系统 · 设计系统
   品牌色取自恒瑃移民 LOGO：橙 #E6902B（日轮）+ 藏青 #151E3D（字形）
   规范来源：hengchun-au-visa-card/references/brand-spec.md
   ------------------------------------------------------------
   橙色是浅色，白字压不住（对比度仅 2.5:1），因此：
     · 实心填充 → 品牌橙 + 藏青字（6.5:1）
     · 文字/链接 → 用加深的 --primary-deep（5.0:1）
     · 浅橙底上的文字 → --primary-ink（5.5:1）
   ============================================================ */
:root {
  /* ---------- 品牌原色 ---------- */
  --brand-orange: #E6902B;
  --brand-orange-600: #C4771A;
  --brand-orange-700: #A35F12;
  --brand-orange-800: #8C5009;
  --brand-orange-200: #F2D9B4;
  --brand-orange-100: #FBEBD6;
  --brand-orange-50: #FDF6EC;
  --brand-navy: #151E3D;
  --brand-navy-600: #1E2A52;
  --brand-navy-300: #4A5680;
  --brand-cream: #F6F3EE;

  /* ---------- 主色（沿用既有变量名，JS 无需改动） ---------- */
  --primary: #E6902B;
  --primary-dark: #C4771A;
  --primary-deep: #A35F12;
  --primary-ink: #8C5009;
  --primary-light: #FBEBD6;
  --primary-soft: #FDF6EC;
  --primary-line: #F2D9B4;

  /* ---------- 绩效等级语义色 ----------
     刻意避开品牌橙，防止「等级色」与「主色」语义打架。 */
  --gold: #A9721A;   --gold-bg: #FAEEDA;   --gold-line: #F0D9A8;
  --green: #2E7D5B;  --green-bg: #EAF3DE;  --green-line: #C0DD97;
  --blue: #185FA5;   --blue-bg: #E6F1FB;   --blue-line: #B5D4F4;
  --orange: #C2410C; --orange-bg: #FAECE7; --orange-line: #F5C4B3;
  --red: #C0392B;    --red-bg: #FDF3F2;    --red-line: #EFCFCB;
  --gray: #5F5E5A;   --gray-bg: #F1EFE8;   --gray-line: #E3DFD3;

  /* ---------- 中性 ---------- */
  --bg: #F6F3EE;
  --surface: #FFFFFF;
  --surface-2: #FBF9F5;
  --surface-3: #F1EDE5;
  --border: #E7E1D6;
  --border-soft: #F0EBE1;
  --border-strong: #D8CFBC;
  --text: #151E3D;
  --text-2: #5B5749;
  --text-3: #8A7F6B;

  /* ---------- 形状与阴影 ---------- */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(21,30,61,.04), 0 3px 12px rgba(21,30,61,.05);
  --shadow-md: 0 4px 18px rgba(21,30,61,.08);
  --shadow-lg: 0 18px 48px rgba(21,30,61,.18);
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
button { font-family: inherit; }
::selection { background: var(--brand-orange-100); color: var(--brand-navy); }

/* 首次加载失败时的显性提示条（默认隐藏，由 common.js 控制） */
#boot-error {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 999;
  max-width: min(680px, calc(100vw - 32px));
  background: var(--red-bg); color: var(--red); border: 1px solid var(--red-line);
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6;
  box-shadow: var(--shadow-lg);
}

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--brand-navy);
  color: #C3C9DC;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand {
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  display: flex; align-items: center; gap: 11px;
}
.sidebar .brand .brand-sun {
  width: 34px; height: 34px; flex: 0 0 34px; display: block;
  filter: drop-shadow(0 2px 6px rgba(230,144,43,.35));
}
.sidebar .brand .brand-text { min-width: 0; }
.sidebar .brand h1 { font-size: 14.5px; color: #FFFFFF; letter-spacing: .01em; line-height: 1.3; }
/* 窄侧栏里副标题一律单行省略，避免断成「管理办公／室」这种难看的两行 */
.sidebar .brand p {
  margin: 3px 0 0; font-size: 10.5px; color: #8E97B4; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar nav { padding: 12px 10px 24px; flex: 1; }
.sidebar .nav-group { margin-top: 14px; }
.sidebar .nav-group > span {
  display: block; padding: 0 10px 7px; font-size: 10.5px; letter-spacing: .1em;
  color: #737D9C; font-weight: 500;
}
.sidebar a.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; margin-bottom: 2px; border-radius: var(--radius-sm);
  color: #C3C9DC; font-size: 13.5px; text-decoration: none;
  transition: background .15s, color .15s;
}
.sidebar a.nav-item:hover { background: rgba(255,255,255,.08); color: #FFFFFF; text-decoration: none; }
.sidebar a.nav-item.active {
  background: var(--brand-orange); color: var(--brand-navy); font-weight: 600;
}
.sidebar a.nav-item.active .nav-icon { opacity: 1; }
.sidebar .nav-icon { width: 16px; text-align: center; opacity: .85; }
.sidebar .side-foot {
  padding: 12px 16px; font-size: 11px; color: #737D9C;
  border-top: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; gap: 8px;
}
.sidebar .side-foot img { width: 18px; height: 18px; opacity: .75; }

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

.topbar {
  height: 58px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .page-title { font-size: 15.5px; font-weight: 600; }
.topbar .page-sub { font-size: 12.5px; color: var(--text-3); }
.topbar .spacer { flex: 1; }
/* 周期下拉按内容自适应宽度，避免选项文字被硬编码宽度截断 */
.topbar select { width: auto; min-width: 150px; max-width: 46vw; }

.content { padding: 22px; flex: 1; }
.content > section { margin-bottom: 22px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 10px; background: var(--surface-2);
}
.card-head h3 { font-size: 14px; display: flex; align-items: center; }
.card-head h3::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--primary); margin-right: 9px; flex: 0 0 auto;
}
.card-head .sub { font-size: 12px; color: var(--text-3); }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid.c1 { grid-template-columns: 1fr; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1180px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid.c3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* ---------------- 指标磁贴 ---------------- */
.kpi, .stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.kpi .label, .sc-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi .value, .sc-value {
  font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px;
  line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums;
}
.kpi .value small, .sc-value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.kpi .foot, .sc-foot { font-size: 12px; color: var(--text-3); margin-top: 7px; }
.sc-label { margin-top: 0; display: block; }
.kpi.accent, .stat-card.accent {
  background: var(--primary-soft); border-color: var(--primary-line);
}
.stat-card.accent .sc-value { color: var(--primary-ink); }
.kpi.accent { border-left: 3px solid var(--primary); }

/* ---------------- 徽章 / 标签 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; line-height: 1.75;
  background: var(--gray-bg); color: var(--gray); white-space: nowrap;
}
.badge.g-O { background: var(--gold-bg); color: var(--gold); }
.badge.g-E { background: var(--green-bg); color: var(--green); }
.badge.g-M { background: var(--gray-bg); color: var(--gray); }
.badge.g-Mplus { background: var(--blue-bg); color: var(--blue); }
.badge.g-Mminus { background: var(--gray-bg); color: var(--text-3); }
.badge.g-I { background: var(--orange-bg); color: var(--orange); }
.badge.g-F { background: var(--red-bg); color: var(--red); }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.warn { background: var(--orange-bg); color: var(--orange); }
.badge.danger { background: var(--red-bg); color: var(--red); }
.badge.info { background: var(--blue-bg); color: var(--blue); }
.badge.primary { background: var(--primary-light); color: var(--primary-ink); }

.grade-chip { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center;
  border-radius: 8px; font-weight: 700; font-size: 13px; }
.grade-chip.g-O { background: var(--gold-bg); color: var(--gold); }
.grade-chip.g-E { background: var(--green-bg); color: var(--green); }
.grade-chip.g-M { background: var(--gray-bg); color: var(--gray); }
.grade-chip.g-Mplus { background: var(--blue-bg); color: var(--blue); }
.grade-chip.g-Mminus { background: var(--gray-bg); color: var(--text-3); }
.grade-chip.g-I { background: var(--orange-bg); color: var(--orange); }
.grade-chip.g-F { background: var(--red-bg); color: var(--red); }
.grade-chip.empty { background: var(--gray-bg); color: var(--text-3); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; padding: 10px 14px; background: var(--surface-2);
  color: var(--text-3); font-weight: 500; font-size: 12px; letter-spacing: .03em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--primary-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { white-space: nowrap; }

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

/* ---------------- 表单 ---------------- */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px; background: #fff; color: var(--text); transition: .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,144,43,.16);
}
textarea { resize: vertical; min-height: 76px; }
select { cursor: pointer; }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* 表内联输入框 / 行内布局 / 标签片 —— 工作内容填报等模块使用 */
.in {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 13px;
  background: #fff; color: var(--text); transition: .15s;
}
.in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,144,43,.16); }
.in.sm { min-width: 88px; }
.in.xs { width: 66px; text-align: right; font-variant-numeric: tabular-nums; }
select.in { cursor: pointer; padding: 8px 11px; font-size: 13.5px; }

.row { display: flex; align-items: center; gap: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.desc { font-size: 13.5px; color: var(--text-2); margin: 6px 0; }
.plain { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.95; }
.plain li { color: var(--text-2); }
.plain li b { color: var(--text); }

/* ---------------- 进度条 ---------------- */
.bar { height: 8px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 6px; transition: width .4s; }
.bar > i.warn { background: var(--orange); }
.bar > i.danger { background: var(--red); }

/* 阶段流程条 */
.flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flow .step {
  display: flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-3);
}
.flow .step.done { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-ink); }
.flow .step.current { background: var(--primary); border-color: var(--primary); color: var(--brand-navy); font-weight: 600; }
.flow .step .idx { font-size: 11px; opacity: .8; }

/* ---------------- 提示条 ---------------- */
.notice {
  display: flex; gap: 10px; padding: 12px 15px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.65; border: 1px solid;
}
.notice + .notice { margin-top: 10px; }
.notice.info { background: var(--blue-bg); border-color: var(--blue-line); color: #0C447C; }
.notice.warn { background: var(--orange-bg); border-color: var(--orange-line); color: #7B2A08; }
.notice.danger { background: var(--red-bg); border-color: var(--red-line); color: #7F1D1D; }
.notice.ok { background: var(--green-bg); border-color: var(--green-line); color: #173B2A; }
.notice .ic {
  flex: 0 0 auto; font-weight: 700; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
  background: rgba(255,255,255,.7); margin-top: 1px;
}
.notice b { font-weight: 600; }

/* ---------------- 弹层 ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(21,30,61,.42); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px; z-index: 100; overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px; overflow: hidden; animation: pop .16s ease-out;
}
.modal.wide { max-width: 960px; }
@keyframes pop { from { transform: translateY(-8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; }
.modal-head h3 { font-size: 15px; flex: 1; }
.modal-head .x { cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; background: none; border: 0; }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 20px; max-height: 66vh; overflow-y: auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--border-soft);
  display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2);
}

/* ---------------- 提示气泡 ---------------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--brand-navy); color: #E7E9F2; padding: 11px 16px; border-radius: var(--radius-sm);
  font-size: 13px; box-shadow: var(--shadow-lg); animation: slide .2s ease-out; max-width: 380px;
  border-left: 3px solid var(--primary);
}
.toast.err { background: #7F1D1D; border-left-color: #F09595; }
.toast.ok { background: #173B2A; border-left-color: #97C459; }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 其他 ---------------- */
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--border-soft); margin: 14px 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary-light); color: var(--primary-ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: 0 0 auto;
}
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip .meta { line-height: 1.25; }
.user-chip .meta b { font-size: 13px; display: block; }
.user-chip .meta span { font-size: 11.5px; color: var(--text-3); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  padding: 9px 16px; border: 0; background: none; cursor: pointer; font-size: 13.5px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button:hover { color: var(--primary-deep); }
.tabs button.active { color: var(--primary-deep); border-bottom-color: var(--primary); font-weight: 600; }

.score-input { width: 78px; padding: 5px 8px; text-align: right; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------------- 等级制评分：下拉与按钮两种形态 ---------------- */
.grade-select { width: 132px; padding: 5px 8px; font-size: 13px; }
.grade-pick { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.grade-pick .gp { width: 30px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: transform .08s ease, box-shadow .12s ease; }
.grade-pick .gp:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.grade-pick .gp.on { border-color: transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06); }
.grade-pick .gp.on.g-O { background: var(--gold-bg); color: var(--gold); }
.grade-pick .gp.on.g-E { background: var(--green-bg); color: var(--green); }
.grade-pick .gp.on.g-Mplus { background: var(--blue-bg); color: var(--blue); }
.grade-pick .gp.on.g-M { background: var(--gray-bg); color: var(--gray); }
.grade-pick .gp.on.g-Mminus { background: var(--gray-bg); color: var(--text-3); }
.grade-pick .gp.on.g-I { background: var(--orange-bg); color: var(--orange); }
.grade-pick .gp.on.g-F { background: var(--red-bg); color: var(--red); }

/* ---------------- 价值观评价区块 ---------------- */
.vblock { margin-top: 14px; }
.vline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vlabel { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.vtext { flex: 1; min-width: 180px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg .seg-btn { border: 0; background: transparent; padding: 6px 14px; font-size: 12.5px; color: var(--text-2);
  cursor: pointer; font-family: inherit; }
.seg .seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg .seg-btn.on { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; }
.vcard { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface); transition: border-color .12s ease, background .12s ease; }
.vcard:hover { border-color: var(--primary); }
.vcard:has(input:checked), .vcard.on { border-color: var(--primary); background: var(--primary-soft); }
.vcard .vhead { display: flex; align-items: center; gap: 7px; font-size: 13.5px;
  flex: 1; min-width: 0; cursor: pointer; }

/* 小问号：把「核心内涵 / 正向行为 / 反面提醒」收进浮层，卡片上只留一行名字。
   五段说明并排铺开时没人会在勾选前逐字读完，按需查看反而更容易被读到。 */
.vq { flex: 0 0 auto; width: 17px; height: 17px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3);
  font-size: 11px; font-weight: 700; line-height: 1; font-family: inherit;
  cursor: help; display: inline-flex; align-items: center; justify-content: center; }
.vq:hover, .vq.q-on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.vrow .vlabel { display: inline-flex; align-items: center; gap: 6px; }

/* 说明浮层。fixed 挂在 body 上：卡片所在的 .card 有 overflow:hidden，
   浮层若留在卡片内部，超出的部分会被直接裁掉 —— 看起来像「没弹出来」。 */
.vtip { position: fixed; z-index: 400; display: none; width: 330px; max-width: calc(100vw - 20px);
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow-md); font-size: 12.5px; line-height: 1.7; color: var(--text-2); text-align: left; }
/* 用 .on 类而不用 [hidden]：.vtip{display:block} 会盖掉 UA 的 [hidden]{display:none}，
   于是「属性上是隐藏、界面上却一直显示」—— 与 .vrow 是同一个坑。 */
.vtip.on { display: block; }
.vtip .vq-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.vtip .vq-sec { margin-top: 9px; font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: .05em; }
.vtip .vq-txt { margin: 3px 0 0; }
.vtip .vq-list { margin: 4px 0 0; padding-left: 17px; }
.vtip .vq-list li { margin-bottom: 3px; }
.vtip .vq-anti { color: var(--text-3); }
/* 空状态：一条价值观都没勾时，说清「这里等下会冒出什么」。
   否则下方是一片空白，容易被当成没加载出来。 */
.vempty { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--border-strong);
  border-radius: 12px; background: var(--surface-2); font-size: 12.5px; line-height: 1.7; color: var(--text-3); }
.vempty[hidden] { display: none; }

.vrows { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
/* 勾选后展开的评点面板。这里必须是块级：原来那一行 flex 装不下
   「两组点位 + 一段说明」，会把点位挤成竖排单字。 */
.vrow { display: block; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
/* 必须显式声明：[hidden] 的 display:none 来自 UA 样式，会被上面的 display:block 盖掉，
   导致「属性上是隐藏、界面上却全都在」。.vrow[hidden] 比 .vrow 更具体，可胜过它。 */
.vrow[hidden] { display: none; }
.vr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vr-n { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: var(--primary-light);
  color: var(--primary-ink); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }

/* 两组点位并排：左边「做得好的点」、右边「做得不好的点」。
   并排是刻意的 —— 一起看到，才不容易只勾好话不勾差话。 */
.vr-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.vr-g { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-soft); background: var(--surface); }
.vr-g.good { border-color: var(--green-line); background: var(--green-bg); }
.vr-g.bad { border-color: var(--red-line); background: var(--red-bg); }
.vr-t { font-size: 12.5px; font-weight: 700; color: var(--text); }
.vr-hint { margin: 2px 0 7px; font-size: 11.5px; color: var(--text-3); }
/* 逐条点位：勾中的条目本身就是评价结论，所以整行都可点，不用瞄准小方块。 */
.vtick { display: flex; align-items: flex-start; gap: 7px; padding: 5px 6px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.6; color: var(--text-2); cursor: pointer; }
.vtick:hover { background: rgba(21,30,61,.04); }
.vtick input { margin-top: 2px; flex: 0 0 auto; }
/* 「具体表现」必填：标签要常驻可见 —— 只写在 placeholder 里，
   人一落笔它就消失了，「这项必填」这个信息也跟着没了。 */
.vr-note { margin-top: 10px; }
.vr-note .vr-nl { display: block; margin-bottom: 5px; font-size: 12.5px; color: var(--text-2); }
.vr-note .vr-nl .req { color: var(--red); font-weight: 700; }
.vrow .vtext { width: 100%; min-width: 0; }
/* 漏填时的高亮：提交被拦下后，要能一眼看出是哪一格没写 */
.vtext.miss { border-color: var(--red); background: var(--red-bg); }

/* 点位的只读标签（只读态与环评汇总用） */
.vtag-list { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.vtag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; line-height: 1.6;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.vtag.good { border-color: var(--green-line); background: var(--green-bg); color: var(--green); }
.vtag.bad { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }

/* 业绩维度的两栏自由文本（做得好的 / 待改进的） */
.perfgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.perfbox { display: flex; flex-direction: column; gap: 4px; }
.perfbox > span { font-size: 12px; font-weight: 600; }
.perfbox.good > span { color: var(--green); }
.perfbox.bad > span { color: var(--red); }
.perfbox textarea { min-height: 0; }

/* 评分明细里挂在维度名下的业绩两栏结果 */
.perfnote { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.perfnote .pn { font-size: 12px; line-height: 1.6; color: var(--text-2); }
.perfnote .pn > span { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: 11px; font-weight: 600; }
.perfnote .pn.good > span { background: var(--green-bg); color: var(--green); }
.perfnote .pn.bad > span { background: var(--red-bg); color: var(--red); }

@media (max-width: 820px) {
  .vr-groups, .perfgrid { grid-template-columns: 1fr; }
}

/* ---------------- 顶部四步进度看板 ----------------
   状态只有三档：已完成 / 待填写 / 已逾期。不做百分比，不做连线进度条。 */
.pboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pstep { padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.pstep.done { border-color: var(--green-line); background: var(--green-bg); }
.pstep.late { border-color: var(--red-line); background: var(--red-bg); }
.pstep .ph { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pstep .ph b { font-weight: 600; }
.pstep .pn { flex: 0 0 auto; width: 17px; height: 17px; border-radius: 50%; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--text-2); }
.pstep.done .pn { background: var(--green); color: #fff; }
.pstep.late .pn { background: var(--red); color: #fff; }
.pstep .pstate { margin-left: auto; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.pstep.done .pstate { color: var(--green); }
.pstep.late .pstate { color: var(--red); }
.pstep .ps { font-size: 11.5px; color: var(--text-3); line-height: 1.55; margin-top: 5px; }
.pstep .pddl { font-size: 11.5px; color: var(--text-2); margin-top: 6px; }
@media (max-width: 900px) { .pboard { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-wrap svg { flex: 0 0 auto; }

/* ============================================================
   登录页
   左侧藏青品牌区（放橙色日轮 LOGO），右侧米白登录区。
   ============================================================ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--brand-cream); padding: 24px;
}
.auth-card {
  width: 100%; max-width: 940px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 24px 64px rgba(21,30,61,.18);
  display: grid; grid-template-columns: 1fr 1fr;
}
@media (max-width: 820px) { .auth-card { grid-template-columns: 1fr; } .auth-aside { display: none !important; } }

.auth-aside {
  background: var(--brand-navy); color: #C3C9DC; padding: 38px 34px;
  display: flex; flex-direction: column;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand img { width: 42px; height: 42px; display: block; }
.auth-brand .bn { font-size: 16.5px; color: #FFFFFF; font-weight: 600; line-height: 1.3; }
.auth-brand .bs { font-size: 10.5px; color: #8E97B4; letter-spacing: .09em; margin-top: 2px; }
.auth-aside h2 { color: #FFFFFF; font-size: 19px; margin-bottom: 10px; line-height: 1.45; }
.auth-aside .lead { font-size: 13px; line-height: 1.9; color: #A9B0C7; margin: 0; }
.auth-aside ul { padding-left: 0; margin: 22px 0 0; font-size: 12.5px; line-height: 1.75; color: #C3C9DC; list-style: none; }
.auth-aside ul li { position: relative; padding-left: 17px; margin-bottom: 9px; }
.auth-aside ul li::before {
  content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--brand-orange);
}
.auth-aside .aside-foot {
  margin-top: auto; padding-top: 22px; font-size: 11.5px; color: #737D9C;
  border-top: 1px solid rgba(255,255,255,.09);
}

.auth-main { padding: 38px 36px; display: flex; flex-direction: column; }
.auth-main h3 { font-size: 18px; }
.auth-main .hint { font-size: 12.5px; color: var(--text-3); margin: 6px 0 22px; line-height: 1.7; }
/* 登录表单：复用全局 .field 的标签与输入框样式，这里只补间距 */
.auth-form { margin: 0 0 16px; }
.auth-form .btn { margin-top: 4px; }
.auth-form .field:last-of-type { margin-bottom: 14px; }

/* 账号列表撑满剩余高度；仅当确实还有内容未展示时才显示底部渐隐，
   否则最后一行会被压灰、看起来像被禁用。 */
.auth-fallback { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.account-wrap { position: relative; min-height: 0; flex: 1; display: flex; flex-direction: column; }
.account-wrap::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  pointer-events: none; opacity: 0; transition: opacity .18s;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #FFFFFF 72%);
}
.account-wrap.has-more::after { opacity: 1; }

.account-list { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.account-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: .15s; text-align: left; background: #fff; width: 100%;
}
.account-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.account-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.account-item .meta { flex: 1; min-width: 0; line-height: 1.35; }
.account-item .meta b { font-size: 13.5px; display: block; }
.account-item .meta span { font-size: 11.5px; color: var(--text-3); }

/* 制度对照 */
.doc-quote {
  border-left: 3px solid var(--primary); background: var(--primary-soft); padding: 10px 14px;
  font-size: 13px; color: var(--text-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 8px 0;
}
footer.page-foot { padding: 18px 22px 30px; color: var(--text-3); font-size: 12px; }

/* ============================================================
   窄屏 / 飞书移动端适配
   飞书手机端为主要使用场景之一，此区块负责把固定侧栏改为抽屉，
   并压紧间距、放大可点区域，保证在手机 WebView 内可用。
   ============================================================ */
.nav-toggle { padding: 4px 9px; font-size: 15px; line-height: 1; }
.nav-mask { display: none; position: fixed; inset: 0; background: rgba(21,30,61,.5); z-index: 55; }
.lark-chip { flex: 0 0 auto; }

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh; z-index: 60;
    transform: translateX(-101%); transition: transform .22s ease;
    box-shadow: 0 0 28px rgba(21,30,61,.35);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-mask { display: block; }

  .main { width: 100%; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .page-title { font-size: 14.5px; }
  .topbar .page-sub { display: none; }
  .topbar .lark-chip { display: none; }
  /* 窄屏顶栏只保留姓名与头像，否则部门/角色那行会把标题挤出视口 */
  .user-chip .meta span { display: none; }
  .user-chip .meta b { font-size: 12.5px; }
  .topbar > div:first-of-type { min-width: 0; }
  .topbar .page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .content { padding: 12px; }
  .content > section { margin-bottom: 14px; }
  footer.page-foot { padding: 12px 14px 24px; }

  .grid { gap: 12px; }
  .card-head { padding: 12px 14px; flex-wrap: wrap; }
  .card-body { padding: 14px; }
  .kpi, .stat-card { padding: 13px 14px; }
  .kpi .value, .sc-value { font-size: 22px; }

  /* iOS 内嵌 WebView 在字号小于 16px 时会自动放大页面，统一抬高输入字号 */
  input[type=text], input[type=password], input[type=number], input[type=date], input[type=search],
  select, textarea, .in { font-size: 16px; }
  .btn { padding: 8px 13px; }
  .btn.sm { padding: 5px 11px; font-size: 13px; }

  .mask { padding: 12px 10px; }
  .modal { max-width: 100%; border-radius: var(--radius); }
  .modal.wide { max-width: 100%; }
  .modal-body { max-height: 72vh; padding: 15px; }
  .modal-head, .modal-foot { padding: 13px 15px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; justify-content: center; }

  thead th { padding: 9px 11px; }
  tbody td { padding: 10px 11px; }

  .auth-page { padding: 0; align-items: stretch; }
  .auth-card { max-width: none; border: 0; border-radius: 0; box-shadow: none; min-height: 100vh; }
  .auth-main { padding: 30px 22px; }
  .account-list { max-height: none; }
}

@media (max-width: 520px) {
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .chips { gap: 5px; }
  .kpi .value, .sc-value { font-size: 20px; }
  .auth-main { padding: 24px 18px; }
  /* 320px 级窄屏：周期下拉放开 min-width 限制，用户信息只留头像，
     否则顶栏会横向溢出、把「退出」按钮挤出视口。 */
  .topbar select { min-width: 0; max-width: 42vw; }
  .user-chip .meta { display: none; }
}

/* ============================================================
   360 环评：评价人选择、逐项评价与侧栏待办提示
   ============================================================ */

/* ---- 评价人选择列表（弹窗内） ---- */
.cand-list {
  margin-top: 12px;
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.cand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.45;
}
.cand-row:last-child { border-bottom: 0; }
.cand-row:hover { background: var(--primary-soft); }
.cand-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  accent-color: var(--primary);
}
.cand-row > span { min-width: 0; }

/* ---- 逐项评价的「不清楚」勾选 ---- */
.unclear-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
}
.unclear-row input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--brand-orange-600);
}

/* ---- 侧栏待办小红点 ---- */
.nav-dot {
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 2px rgba(230, 144, 43, .25);
  vertical-align: middle;
}

/* ---- 逐项评价表格在窄屏下的自适应 ---- */
@media (max-width: 720px) {
  .unclear-row { font-size: 11px; }
  .cand-row { padding: 9px 12px; }
}
