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

:root {
  --bg: #F5F6F8;
  --surface: #ffffff;
  --border: #E6E8EB;
  --border-2: #D5D8DD;
  --text: #1F2328;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --primary: #185FA5;
  --primary-50: #E6F1FB;
  --primary-100: #B5D4F4;
  --primary-600: #0C447C;
  --danger: #A32D2D;
  --danger-50: #FCEBEB;
  --danger-100: #F7C1C1;
  --warn: #854F0B;
  --warn-50: #FAEEDA;
  --warn-100: #FAC775;
  --ok: #3B6D11;
  --ok-50: #EAF3DE;
  --ok-100: #C0DD97;
  --r: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }

/* layout */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.brand { padding: 0 20px 18px; border-bottom: 1px solid var(--border); }
.brand-name { font-size: 15px; font-weight: 500; letter-spacing: .3px; }
.brand-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.role-box { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.role-label { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.role-select {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border-2);
  border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer;
}
.role-user { font-size: 12px; color: var(--text-2); margin-top: 8px; }
.role-user b { color: var(--text); font-weight: 500; }

.nav { padding: 12px 12px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 6px; font-size: 13.5px;
  color: var(--text-2); width: 100%; text-align: left; margin-bottom: 2px;
}
.nav-item:hover { background: #F3F4F6; color: var(--text); }
.nav-item.active { background: var(--primary-50); color: var(--primary-600); font-weight: 500; }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .45; }

.sidebar-foot { padding: 14px 20px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); }

.main { padding: 24px 28px 60px; min-width: 0; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-title { font-size: 19px; font-weight: 500; letter-spacing: .2px; }
.page-desc { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* generic */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 14px; font-weight: 500; }
.section-title { font-size: 14px; font-weight: 500; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title .count { font-size: 12px; color: var(--text-3); font-weight: 400; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat-num { font-size: 26px; font-weight: 500; line-height: 1.2; letter-spacing: -.5px; }
.stat-label { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.stat.warn .stat-num { color: var(--warn); }
.stat.danger .stat-num { color: var(--danger); }

.pill { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 4px; line-height: 1.75; white-space: nowrap; }
.pill-red { background: var(--danger-50); color: var(--danger); }
.pill-amber { background: var(--warn-50); color: var(--warn); }
.pill-green { background: var(--ok-50); color: var(--ok); }
.pill-blue { background: var(--primary-50); color: var(--primary-600); }
.pill-gray { background: #F0F1F3; color: var(--text-2); }

.btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border-radius: 6px; font-size: 13px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); transition: .15s; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--border-2); color: var(--text); }

.empty { color: var(--text-3); font-size: 13px; padding: 18px 0; text-align: center; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(7, minmax(172px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: #FBFBFC; border: 1px solid var(--border); border-radius: 10px; padding: 10px; min-height: 140px; }
.kcol-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 9px; }
.kcol-name { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.kcol-n { font-size: 11.5px; color: var(--text-3); }

.emp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; cursor: pointer; transition: .15s; }
.emp-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(24, 95, 165, .1); }
.emp-name { font-size: 13px; font-weight: 500; display: flex; align-items: center; justify-content: space-between; }
.emp-meta { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.emp-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }

/* list rows */
.row-list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13.5px; font-weight: 500; }
.row-sub { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.row-right { display: flex; align-items: center; gap: 8px; }

/* table */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-2); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #FBFBFC; }
.tbl .clickable { cursor: pointer; }

/* progress */
.prog { height: 5px; border-radius: 3px; background: #EDEFF2; overflow: hidden; }
.prog-bar { height: 100%; border-radius: 3px; background: var(--primary); }

/* journey */
.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 6px 0 2px; }
.jstep { position: relative; padding-top: 22px; text-align: center; }
.jstep::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: #E6E8EB; }
.jstep:first-child::before { left: 50%; }
.jstep:last-child::before { right: 50%; }
.jstep.done::before { background: var(--primary-100); }
.jstep .dot { position: absolute; top: 1px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--border-2); z-index: 1; }
.jstep.done .dot { background: var(--primary); border-color: var(--primary); }
.jstep.current .dot { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(24, 95, 165, .12); }
.jstep-label { font-size: 12.5px; font-weight: 500; }
.jstep-date { font-size: 11px; color: var(--text-3); }
.jstep.current .jstep-label { color: var(--primary-600); }

/* goal items */
.goal { border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px; margin-bottom: 9px; }
.goal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.goal-title { font-size: 13.5px; font-weight: 500; }
.goal-metric { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.goal-w { font-size: 11.5px; color: var(--text-3); }

/* timeline */
.tl { padding-left: 4px; }
.tl-item { position: relative; padding: 0 0 15px 20px; border-left: 1.5px solid var(--border); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.tl-item.key::before { background: var(--primary); }
.tl-item.risk::before { background: var(--danger); }
.tl-date { font-size: 11.5px; color: var(--text-3); }
.tl-text { font-size: 13px; margin-top: 1px; }
.tl-who { color: var(--text-2); }

/* drawer */
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .32); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--surface); z-index: 41; overflow-y: auto; box-shadow: -8px 0 32px rgba(0, 0, 0, .1); }
.drawer-head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px 24px 14px; z-index: 2; }
.drawer-body { padding: 18px 24px 40px; }
.drawer-close { position: absolute; top: 16px; right: 20px; font-size: 20px; color: var(--text-3); line-height: 1; }
.drawer-close:hover { color: var(--text); }
.dh-name { font-size: 17px; font-weight: 500; }
.dh-meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

.block { margin-bottom: 22px; }
.block-h { font-size: 13px; font-weight: 500; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.block-h .pill { font-weight: 400; }

.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 10px; font-size: 13px; }
.kv dt { color: var(--text-2); font-size: 12.5px; }
.kv dd { min-width: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* modal */
.modal { position: fixed; z-index: 60; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 40px)); background: var(--surface); border-radius: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, .18); max-height: 86vh; overflow-y: auto; }
.modal-head { padding: 18px 22px 12px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 500; }
.modal-body { padding: 16px 22px; }
.modal-foot { padding: 12px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; padding: 8px 10px; border: 1px solid var(--border-2); border-radius: 6px; outline: none; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); }
.field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

.fade-in { animation: fi .18s ease-out; }
@keyframes fi { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: column; }
  .nav { display: flex; gap: 6px; overflow-x: auto; }
  .main { padding: 18px 16px 50px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .drawer { width: 100%; }
}

/* app additions */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #1F2328; color: #fff; padding: 9px 18px; border-radius: 8px; font-size: 13px; z-index: 90; max-width: 80%; }
.toast.err { background: var(--danger); }
.loading { padding: 60px 0; text-align: center; color: var(--text-3); font-size: 13px; }
.side-row { display: flex; gap: 6px; }
.side-row .role-select { flex: 1; }
.sync-card { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.sync-card:last-child { border-bottom: none; }
.dot-state { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-ok { background: #639922; }
.dot-err { background: var(--danger); }
.dot-idle { background: var(--border-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* 花名册连接与自检 */
.link-row { display: flex; gap: 10px; align-items: center; padding: 4px 0 12px; }
.link-row input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--border-2); border-radius: 6px; font-size: 12.5px; outline: none; color: var(--text); background: #fff; }
.link-row input:focus { border-color: var(--primary); }
.diag { border-top: 1px solid var(--border); padding-top: 10px; }
.diag-row { display: flex; gap: 9px; align-items: flex-start; padding: 6px 0; font-size: 12.5px; line-height: 1.6; }
.diag-row .dot-state { margin-top: 6px; }
.diag-name { flex: none; width: 108px; color: var(--text-2); }
.diag-detail { color: var(--text); word-break: break-word; }
.hint-bar { font-size: 12.5px; color: var(--text-3); line-height: 1.7; padding-top: 4px; }
.hint-ok { margin-top: 8px; font-size: 12.5px; color: #4E7A17; background: #F2F8E8; border-radius: 6px; padding: 7px 11px; }
.diag-hint { display: block; margin-top: 3px; color: var(--text-3); font-size: 12px; line-height: 1.6; }

/* 角色与权限 */
.role-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.role-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.role-card-name { font-size: 13.5px; font-weight: 500; }
.role-card-num { font-size: 24px; font-weight: 500; letter-spacing: -.5px; line-height: 1.2; }
.role-card-den { font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.role-card-desc { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.role-card-src { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-top: auto; }
.cell-input { width: 100%; padding: 6px 9px; border: 1px solid var(--border-2); border-radius: 6px; font-size: 12.5px; outline: none; color: var(--text); background: #fff; }
.cell-input:focus { border-color: var(--primary); }

/* 转正质量看板 */
.insight { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--text-3); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; line-height: 1.7; color: var(--text-2); }
.insight.amber { border-left-color: var(--warn); }
.insight.green { border-left-color: var(--ok); }
.insight.red { border-left-color: var(--danger); }
.insight-tag { flex: none; font-size: 11.5px; color: var(--text-3); padding-top: 2px; letter-spacing: .5px; }
.mbar { position: relative; height: 18px; background: #F2F3F5; border-radius: 4px; overflow: hidden; min-width: 76px; }
.mbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--primary); opacity: .22; }
.mbar-fill.ok { background: var(--ok); opacity: .3; }
.mbar-fill.danger { background: var(--danger); opacity: .3; }
.mbar-fill.idle { background: var(--border-2); opacity: .5; }
.mbar-num { position: relative; font-size: 11.5px; line-height: 18px; padding-left: 7px; color: var(--text); }
.muted { color: var(--text-3); }
.fn-row { display: grid; grid-template-columns: 132px 1fr 96px 52px; gap: 12px; align-items: center; padding: 7px 0; }
.fn-label { font-size: 12.5px; color: var(--text-2); }
.fn-bar { height: 12px; background: #F2F3F5; border-radius: 3px; overflow: hidden; }
.fn-fill { height: 100%; background: var(--primary); opacity: .55; border-radius: 3px; }
.fn-num { font-size: 12.5px; text-align: right; }
.fn-of { color: var(--text-3); }
.fn-rate { font-size: 12.5px; text-align: right; color: var(--text-2); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* 流失时点与趋势 */
.fn-fill.danger { background: var(--danger); opacity: .32; }
.churn-stage { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin: -2px 0 6px 144px; }
.mo-wrap { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 6px 2px 0; }
.mo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.mo-n { font-size: 11.5px; color: var(--text-2); line-height: 1; }
.mo-bar { width: 100%; max-width: 34px; height: 96px; display: flex; align-items: flex-end; background: #F2F3F5; border-radius: 4px; overflow: hidden; }
.mo-bar > div { width: 100%; background: var(--danger); opacity: .35; border-radius: 4px 4px 0 0; min-height: 2px; }
.mo-l { font-size: 11px; color: var(--text-3); line-height: 1; white-space: nowrap; }

/* ---------- 七项核心指标卡 ---------- */
.core-wrap { margin-bottom: 18px; }
.core-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.core-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 14px 16px 13px; position: relative; overflow: hidden;
}
.core-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--border-2);
}
.core-card.tone-ok::before { background: var(--ok); }
.core-card.tone-amber::before { background: var(--warn); }
.core-card.tone-danger::before { background: var(--danger); }
.core-card.star { background: linear-gradient(180deg, #FFFDF8 0%, #ffffff 60%); border-color: #EADFC8; }
.core-card.star::before { width: 3px; background: var(--warn); }

.core-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.core-name { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.core-flag {
  font-size: 10.5px; padding: 1px 6px; border-radius: 20px;
  background: var(--warn-50); color: var(--warn); border: 1px solid var(--warn-100);
}
.core-badge {
  margin-left: auto; font-size: 10.5px; padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--border-2); color: var(--text-3); background: var(--bg);
}
.core-badge.st-live { color: var(--ok); border-color: var(--ok-100); background: var(--ok-50); }
.core-badge.st-approx { color: var(--warn); border-color: var(--warn-100); background: var(--warn-50); }
.core-badge.st-pending { color: var(--text-3); border-color: var(--border-2); background: var(--bg); }

.core-val { font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.core-card.tone-ok .core-val { color: var(--ok); }
.core-card.tone-amber .core-val { color: var(--warn); }
.core-card.tone-danger .core-val { color: var(--danger); }
.core-unit { font-size: 14px; font-weight: 500; margin-left: 2px; color: var(--text-3); }
.core-na { font-size: 26px; color: var(--text-3); }

.core-meta { font-size: 11.5px; color: var(--text-2); margin-top: 3px; }

.core-track { position: relative; height: 5px; border-radius: 3px; background: #EEF0F3; margin: 10px 0 6px; }
.core-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--text-3); }
.core-card.tone-ok .core-track i { background: var(--ok); }
.core-card.tone-amber .core-track i { background: var(--warn); }
.core-card.tone-danger .core-track i { background: var(--danger); }
.core-track b { position: absolute; top: -3px; width: 1.5px; height: 11px; background: var(--border-2); }

.core-extra { font-size: 11.5px; color: var(--text-2); }
.core-hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }

.core-verdict {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 12px;
  padding: 11px 14px; border-radius: var(--r); font-size: 13px; line-height: 1.65;
  background: var(--primary-50); color: var(--primary-600); border: 1px solid var(--primary-100);
}
.core-verdict.tone-red { background: var(--danger-50); color: var(--danger); border-color: var(--danger-100); }
.core-verdict.tone-amber { background: var(--warn-50); color: var(--warn); border-color: var(--warn-100); }
.core-verdict.tone-green { background: var(--ok-50); color: var(--ok); border-color: var(--ok-100); }

.core-defs { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.core-defs summary { padding: 10px 14px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.core-defs summary:hover { color: var(--primary); }
.core-defs .tbl { border-top: 1px solid var(--border); }
.core-defs td { font-size: 12px; color: var(--text-2); vertical-align: top; }
.defs-note { padding: 10px 14px; font-size: 11.5px; color: var(--text-3); border-top: 1px solid var(--border); }

.q-card { padding: 4px 16px; }
.q-row { display: grid; grid-template-columns: 210px 130px 70px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.q-row:last-child { border-bottom: none; }
.q-label { font-size: 12.5px; }
.q-bar { height: 6px; background: #EEF0F3; border-radius: 3px; overflow: hidden; }
.q-fill { height: 100%; background: var(--warn); border-radius: 3px; }
.q-num { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.q-impact { font-size: 12px; color: var(--text-2); }

@media (max-width: 1280px) { .core-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==================== 员工端：深色侧栏 + 关卡式旅程 ==================== */
.en-layout { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; background: #F5F6F8; }

.en-side {
  background: linear-gradient(180deg, #1B2431 0%, #16202B 100%);
  color: #E6EAF0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.en-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 16px; }
.en-logo {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; letter-spacing: -.3px;
  box-shadow: 0 2px 8px rgba(37,99,235,.4);
}
.en-brand-name { font-size: 13.5px; font-weight: 500; color: #fff; }
.en-brand-sub { font-size: 11px; color: #8A97A8; margin-top: 1px; }

.en-navwrap { padding: 8px 10px; flex: 1; }
.en-nav {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 7px; font-size: 13px; color: #B7C2D0; margin-bottom: 3px;
}
.en-nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.en-nav.active { background: rgba(59,130,246,.18); color: #93C5FD; font-weight: 500; }
.en-nav-ico { font-size: 13px; opacity: .9; }
.en-side-foot {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07);
  font-size: 12px; color: #8A97A8; display: flex; align-items: center; gap: 7px;
}
.en-foot-ico { font-size: 12px; }

.en-mainwrap { min-width: 0; display: flex; flex-direction: column; }
.en-topbar {
  height: 52px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.en-topbar-title { font-size: 14px; font-weight: 500; }
.en-topbar-right { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-2); }
.en-bell { position: relative; font-size: 14px; }
.en-bell i { position: absolute; right: -1px; top: -1px; width: 6px; height: 6px; border-radius: 50%; background: #E5484D; }
.en-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: #3B82F6; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.en-username { color: var(--text); }

.en-main { padding: 20px 24px 60px; max-width: 1180px; width: 100%; }
.en-crumb { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.en-welcome { font-size: 15px; color: var(--text); margin-bottom: 14px; }
.en-welcome b { color: #1D4ED8; font-size: 17px; }

.en-hero { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px 14px; }
.en-info3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.en-info { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; background: #FCFDFE; }
.en-info-label { font-size: 11.5px; color: var(--text-3); }
.en-info-val { font-size: 15px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.en-accent { color: #D97706; }

.en-segs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 16px 0 10px; }
.seg-bar { height: 6px; border-radius: 3px; background: #E9ECF1; overflow: hidden; }
.seg-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #60A5FA, #2563EB); }
.seg.done .seg-bar i, .seg.current .seg-bar i { width: 100%; }
.seg.current .seg-bar i { background: linear-gradient(90deg, #93C5FD, #3B82F6); }
.seg-label { font-size: 12px; color: var(--text-2); margin-top: 7px; }
.seg.done .seg-label, .seg.current .seg-label { color: #1D4ED8; font-weight: 500; }
.seg-date { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }

.en-quest-bar { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.qb-label { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.qb-label b { color: #1D4ED8; font-size: 15px; }
.qb-track { flex: 1; height: 6px; border-radius: 3px; background: #EDF0F4; overflow: hidden; }
.qb-track i { display: block; height: 100%; background: linear-gradient(90deg, #34D399, #059669); border-radius: 3px; }
.qb-badges { display: flex; gap: 4px; }
.badge {
  width: 20px; height: 20px; border-radius: 50%; font-size: 10.5px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-2); color: var(--text-3); background: #F7F8FA;
}
.badge.got { background: linear-gradient(135deg, #FBBF24, #F59E0B); border-color: #F59E0B; color: #fff; font-size: 11px; }
.badge.doing { border-color: #3B82F6; color: #2563EB; background: #EFF6FF; }
.en-hrbp { margin-top: 12px; font-size: 12px; color: var(--text-3); text-align: center; }

.en-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-top: 14px; }
.en-card-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.en-card-title .pill { margin-left: auto; }
.en-heart { font-size: 14px; }

/* 接下来要做的 N 件事 */
.q-tasks { display: flex; flex-direction: column; gap: 10px; }
.q-task { display: flex; align-items: flex-start; gap: 12px; padding: 11px 13px; background: #FBFCFE; border: 1px solid var(--border); border-radius: 8px; }
.q-task.ok { background: #F5FBF3; border-color: #D6E9C8; }
.q-num {
  width: 22px; height: 22px; border-radius: 50%; flex: none; margin-top: 1px;
  background: #E8EEF7; color: #2563EB; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.q-task.ok .q-num { background: #DBEBD0; color: var(--ok); }
.q-body { flex: 1; min-width: 0; }
.q-title { font-size: 13.5px; font-weight: 500; }
.q-hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.q-tag { font-size: 11px; color: #2563EB; background: #EFF6FF; border: 1px solid #DBEAFE; border-radius: 20px; padding: 1px 8px; white-space: nowrap; margin-top: 2px; }

/* 当前节点 */
.q-stage-date { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.q-stage-goal { font-size: 13.5px; margin-top: 6px; }
.q-stage-sub { font-size: 12.5px; color: var(--text-2); margin-top: 6px; line-height: 1.7; }
.q-stage .btn { margin-top: 12px; }
.q-stage-progress { font-size: 11.5px; color: var(--text-3); margin-left: 10px; }

.s-tasks { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.s-task { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; background: #FAFBFD; border: 1px solid var(--border); }
.s-task.ok { background: #F6FBF3; border-color: #DCEBD2; }
.s-avatar {
  width: 34px; height: 22px; border-radius: 5px; font-size: 10.5px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; flex: none;
  background: #EEF2F8; color: #4B5A6B;
}
.s-avatar.leader { background: #E7F0FE; color: #1D4ED8; }
.s-avatar.dept { background: #E6F5EC; color: #0F7B4F; }
.s-avatar.hrbp { background: #FDF0E3; color: #B45309; }
.s-body { flex: 1; min-width: 0; }
.s-title { font-size: 13px; }
.s-hint { font-size: 11.5px; color: var(--text-3); }
.s-state { font-size: 11px; padding: 1px 8px; border-radius: 20px; white-space: nowrap; }
.s-state.done { background: #E6F3DC; color: var(--ok); }
.s-state.wait { background: #FDF4E5; color: var(--warn); }

/* 三人小队 */
.en-mates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mate { border: 1px solid var(--border); border-radius: 10px; padding: 16px 14px 14px; text-align: center; background: #FCFDFE; }
.mate-avatar {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 600;
}
.mate-avatar.blue { background: linear-gradient(135deg,#DCE9FF,#BBD3FF); color: #1D4ED8; }
.mate-avatar.green { background: linear-gradient(135deg,#DFF5E6,#C3EBD2); color: #0F7B4F; }
.mate-avatar.orange { background: linear-gradient(135deg,#FFEEDB,#FFDDB8); color: #B45309; }
.mate-name { font-size: 13.5px; font-weight: 600; }
.mate-role { font-size: 11px; color: var(--text-2); background: #F1F3F6; border-radius: 20px; padding: 1px 9px; display: inline-block; margin: 5px 0 7px; }
.mate-state { font-size: 11px; border-radius: 20px; padding: 1px 8px; display: inline-block; margin-bottom: 7px; }
.mate-state.ready { background: #E6F3DC; color: var(--ok); }
.mate-state.wait { background: #FDF4E5; color: var(--warn); }
.mate-state.idle { background: #F1F3F6; color: var(--text-3); }
.mate-desc { font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.en-coop-note { margin-top: 12px; font-size: 12px; color: var(--text-3); text-align: center; padding-top: 10px; border-top: 1px dashed var(--border); }

/* ==================== 管理者 / HRBP：小队关卡卡 ==================== */
.team-hint { font-size: 12.5px; color: var(--text-2); background: #F7F9FC; border: 1px solid var(--border); border-left: 3px solid #93C5FD; border-radius: 6px; padding: 9px 13px; margin-bottom: 14px; }
.qcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.qcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.qcard.act { border-color: #BFD8F7; box-shadow: 0 2px 10px rgba(37,99,235,.07); }
.qcard-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qcard-name { font-size: 14px; font-weight: 600; }
.qcard-day { font-size: 11.5px; color: var(--text-3); }
.qcard-stage { font-size: 11px; background: #EFF6FF; color: #1D4ED8; border: 1px solid #DBEAFE; border-radius: 20px; padding: 1px 9px; }
.qcard-steps { display: flex; gap: 6px; margin: 11px 0 10px; }
.step {
  flex: 1; font-size: 10.5px; text-align: center; padding: 3px 0; border-radius: 5px;
  border: 1px dashed var(--border-2); color: var(--text-3); background: #FAFBFD;
}
.step b { font-weight: 500; margin-right: 3px; }
.step.ok { border-style: solid; border-color: #CFE4C1; background: #F3F9EE; color: var(--ok); }
.step.wait.me { border-style: solid; border-color: #F0C88A; background: #FFF9EF; color: var(--warn); }
.qcard-act { font-size: 12.5px; padding: 8px 11px; border-radius: 7px; background: #FFFBF3; border: 1px solid #F3E2C7; color: #7A4E07; }
.qcard-act.wait { background: #F7F9FB; border-color: var(--border); color: var(--text-2); }
.qcard-label { font-size: 10.5px; background: #fff; border: 1px solid currentColor; border-radius: 20px; padding: 0 7px; margin-right: 7px; opacity: .85; }
.qcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }

@media (max-width: 1180px) {
  .qcards { grid-template-columns: 1fr; }
  .en-segs { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
.en-role-switch {
  border: 1px solid var(--border-2); background: #fff; color: var(--text-2);
  border-radius: 6px; font-size: 11.5px; padding: 3px 6px; cursor: pointer;
}

/* ==================== 接力棒 ==================== */
.rl-wrap { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.rl-title { font-size: 12.5px; color: var(--text-2); margin-bottom: 9px; }
.rl-title b { color: #1D4ED8; }
.rl-mine {
  color: #B45309; background: #FFF7E8; border: 1px solid #F3E2C7;
  border-radius: 20px; padding: 1px 8px; font-size: 11px; margin-left: 4px;
  animation: rlPulse 1.8s ease-in-out infinite;
}
@keyframes rlPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,119,6,0); } 50% { box-shadow: 0 0 0 4px rgba(217,119,6,.12); } }

.rl-chain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rl-node {
  flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 6px 8px; border-radius: 8px; border: 1px solid var(--border);
  background: #FBFCFE; position: relative;
}
.rl-node.done { background: #F6FBF3; border-color: #DCEBD2; }
.rl-node.hold { background: #FFFAF0; border-color: #F0C88A; box-shadow: 0 0 0 3px rgba(217,119,6,.07); }
.rl-node.none { opacity: .5; }
.rl-avatar {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; background: #EEF2F8; color: #4B5A6B;
}
.rl-avatar.employee { background: #E7F0FE; color: #1D4ED8; }
.rl-avatar.leader { background: #E7F0FE; color: #1D4ED8; }
.rl-avatar.dept { background: #E6F5EC; color: #0F7B4F; }
.rl-avatar.hrbp { background: #FDF0E3; color: #B45309; }
.rl-who { font-size: 10.5px; color: var(--text-3); }
.rl-name { font-size: 12px; font-weight: 500; }
.rl-tag { font-size: 10px; color: var(--text-3); }
.rl-node.hold .rl-tag { color: #B45309; font-weight: 500; }
.rl-node.done .rl-tag { color: var(--ok); }
.rl-arrow { color: var(--border-2); font-size: 12px; flex: none; }

/* ==================== 任务卡上的按钮 ==================== */
.q-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.q-done { font-size: 11px; color: var(--ok); background: #E9F5E1; border-radius: 20px; padding: 1px 8px; }
.q-wait { font-size: 11px; color: var(--text-3); background: #F3F5F8; border-radius: 20px; padding: 1px 8px; }
.q-lock { font-size: 11px; color: var(--text-3); }
.btn-relay { white-space: nowrap; }

/* 小队卡里的待办清单 */
.qcard-todo { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }
.qc-task {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid #F0E0C6; border-radius: 6px; padding: 6px 9px; font-size: 12.5px;
}

/* 本队卡点条 */
.bottle-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #FFF9F0; border: 1px solid #F3E2C7; border-radius: 6px;
  padding: 9px 13px; margin-bottom: 14px; font-size: 12.5px;
}
.bb-title { font-size: 11px; color: #B45309; background: #fff; border: 1px solid #F3E2C7; border-radius: 20px; padding: 1px 8px; }
.bb-stage { font-weight: 500; color: #7A4E07; }
.bb-num { color: #B45309; font-weight: 600; }
.bb-rest { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

/* ==================== 通关地图 ==================== */
.map-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.ms-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 13px 16px; }
.ms-card.warn { background: #FFFBF3; border-color: #F3E2C7; }
.ms-num { font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ms-num small { font-size: 13px; color: var(--text-3); font-weight: 500; }
.ms-card.warn .ms-num { color: #B45309; }
.ms-label { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.map-grid { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.map-card { padding: 4px 0 0; overflow-x: auto; }
.map-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.map-tbl thead th {
  text-align: center; font-weight: 500; padding: 10px 4px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.map-th-name { text-align: left !important; padding-left: 16px !important; width: 180px; font-size: 12px; color: var(--text-3); }
.map-th-n { display: block; font-size: 10.5px; color: var(--text-3); }
.map-th-l { display: block; font-size: 12px; color: var(--text-2); }
.map-row { cursor: pointer; }
.map-row:hover td { background: #FAFBFD; }
.map-name { padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--border); }
.map-name b { font-weight: 500; font-size: 13px; }
.map-name i { display: block; font-style: normal; font-size: 11px; color: var(--text-3); }
.map-avatar {
  display: inline-flex; width: 24px; height: 24px; border-radius: 50%; margin-right: 8px;
  align-items: center; justify-content: center; background: #EEF2F8; color: #4B5A6B;
  font-size: 11px; vertical-align: middle;
}
.map-td { text-align: center; border-bottom: 1px solid var(--border); padding: 8px 4px; }
.map-cell {
  display: inline-flex; width: 24px; height: 24px; border-radius: 6px; align-items: center; justify-content: center;
  font-size: 11px; border: 1px dashed var(--border-2); color: transparent; background: #FAFBFD;
}
.map-cell.done { background: linear-gradient(135deg, #FBBF24, #F59E0B); border: none; color: #fff; }
.map-cell.cur { background: #EFF6FF; border: 1px solid #93C5FD; color: #2563EB; }
.map-cell.late { background: #FDF2F2; border: 1px solid #F5C2C2; color: #C0392B; }
.map-score { border-bottom: 1px solid var(--border); padding: 8px 16px 8px 4px; text-align: right; white-space: nowrap; }
.map-clear { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.map-title { display: block; font-size: 10.5px; margin-top: 1px; }
.map-title.gold { color: #B45309; }
.map-title.blue { color: #2563EB; }
.map-title.gray { color: var(--text-3); }

.rank-card { padding: 15px 16px; }
.rank-title { font-size: 13.5px; font-weight: 500; }
.rank-sub { font-size: 11.5px; color: var(--text-3); margin: 2px 0 12px; }
.rank-row { display: grid; grid-template-columns: 18px 1fr 62px 30px; gap: 8px; align-items: center; padding: 6px 0; }
.rank-i { font-size: 11px; color: var(--text-3); text-align: center; }
.rank-i.top { color: #B45309; font-weight: 600; }
.rank-d { font-size: 12.5px; }
.rank-d i { font-style: normal; font-size: 10.5px; color: var(--text-3); margin-left: 5px; }
.rank-bar { height: 5px; border-radius: 3px; background: #EEF0F3; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #93C5FD, #3B82F6); border-radius: 3px; }
.rank-n { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.rank-note { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-3); line-height: 1.6; }

@media (max-width: 1200px) {
  .map-grid { grid-template-columns: 1fr; }
  .map-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 飞书登录屏 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #f5f7fb 0%, #eaf0fa 100%); }
.login-card { width: 360px; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(30, 60, 120, .12); padding: 44px 36px; text-align: center; }
.login-brand { font-size: 20px; font-weight: 700; color: #1a2b4c; }
.login-sub { font-size: 13px; color: #8494ad; margin: 8px 0 32px; }
.login-feishu-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; background: #3370ff; color: #fff; border-radius: 10px; font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s; }
.login-feishu-btn:hover { background: #2b5fd9; }
.login-tip { font-size: 12px; color: #9aa8bf; margin-top: 18px; }
.login-tip-top { margin-top: 0; }

/* 临时密码登录 */
.login-or { position: relative; text-align: center; margin: 22px 0 14px; }
.login-or::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #eef2f8; }
.login-or span { position: relative; padding: 0 10px; background: #fff; font-size: 12px; color: #a9b6ca; }
.login-alt { background: none; border: 0; padding: 6px 0; width: 100%; font-size: 13px; color: #3370ff; cursor: pointer; font-family: inherit; }
.login-alt:hover { color: #2b5fd9; text-decoration: underline; }
.login-form { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.login-input { width: 100%; height: 42px; padding: 0 14px; border: 1px solid #dbe3ef; border-radius: 10px; font-size: 14px; color: #1a2b4c; background: #fbfcfe; outline: none; font-family: inherit; transition: border-color .15s, background .15s; }
.login-input::placeholder { color: #a9b6ca; }
.login-input:focus { border-color: #3370ff; background: #fff; box-shadow: 0 0 0 3px rgba(51, 112, 255, .1); }
.login-submit { height: 44px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.login-err { font-size: 12px; color: #d64545; background: #fff5f5; border: 1px solid #ffdcdc; border-radius: 8px; padding: 8px 10px; text-align: left; line-height: 1.5; }
.login-note { font-size: 11px; color: #a9b6ca; line-height: 1.6; margin-top: 2px; }

/* ---------- 权限：固定身份展示 ---------- */
.role-fixed { font-size: 12px; color: var(--text-2); background: var(--bg-2); border-radius: 6px; padding: 6px 10px; }
.role-scope { font-size: 11px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.en-rolechip { font-size: 12px; color: #c9d6ee; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px 10px; }
