:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --border: #e3e8ef;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #2563eb;
  --brand-soft: #eff6ff;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 100%);
}
.login-card {
  width: 400px;
  background: #fff;
  border-radius: 14px;
  padding: 34px 32px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .3);
}
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card .sub { color: var(--muted); margin-bottom: 22px; font-size: 13px; }

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100vh; }
.sidebar {
  width: 252px;
  background: linear-gradient(180deg, #0b1426 0%, #0f172a 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  overflow: hidden;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.04);
}
.sidebar .brand {
  padding: 18px 18px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar .brand .dot {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--brand-color, #2563eb);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.sidebar nav { flex: 1; overflow-y: auto; padding: 8px 0 12px; }
.sidebar nav .grp {
  padding: 14px 18px 4px; font-size: 11px; color: #64748b;
  letter-spacing: .8px; text-transform: uppercase; font-weight: 600;
}
.sidebar nav .navitem {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; color: #94a3b8; font-size: 13.5px;
  cursor: pointer; border-left: 3px solid transparent;
  position: relative;
  transition: background-color .15s ease, color .15s ease;
}
.sidebar nav .navitem .ico {
  width: 18px; height: 18px; flex-shrink: 0; opacity: .85;
}
.sidebar nav .navitem .lab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav .navitem .badge {
  background: rgba(148, 163, 184, 0.16); color: #a7b4c8;
  font-size: 10px; line-height: 16px; padding: 0; border-radius: 999px;
  min-width: 18px; height: 18px; text-align: center; font-weight: 600; letter-spacing: .3px;
}
.sidebar nav .navitem .badge.alert {
  background: #ef4444; color: #fff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.6);
}
.sidebar nav .navitem .chev {
  font-size: 16px; color: #64748b; line-height: 1; margin-left: 2px;
  font-weight: 400;
}
.sidebar nav .navitem:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}
.sidebar nav .navitem:hover .chev { color: #94a3b8; }
.sidebar nav .navitem.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0.04) 100%);
  color: #ffffff;
  border-left-color: #3b82f6;
}
.sidebar nav .navitem.active .ico { opacity: 1; }
.sidebar nav .navitem.active .chev { color: #60a5fa; }
/* 子项（缩进 + 轻量文字） */
.sidebar nav .navitem.navitem-sub {
  padding-left: 42px;
  font-size: 12.8px;
  color: #64748b;
}
.sidebar nav .navitem.navitem-sub:hover { color: #cbd5e1; }
.sidebar nav .navitem.navitem-sub.active {
  color: #ffffff;
  border-left-color: #3b82f6;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0.04) 100%);
}
.sidebar .side-foot { padding: 12px 18px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 12px; color: #94a3b8; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 3px; }
.sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .16); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
}
.topbar .title { font-size: 16px; font-weight: 600; }
.topbar .right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.content { flex: 1; padding: 20px 22px 40px; overflow-y: auto; }

/* ---------- 组件 ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .grid.c4, .grid.c5 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.c4, .grid.c5, .grid.c3, .grid.c2 { grid-template-columns: 1fr; } }
/* 人事档案：窄屏隐藏表格、显示卡片 */
@media (max-width: 820px) { .ef-table-wrap { display: none; } }
/* 360° 全景档案 */
.ef360-head { display:flex; gap:14px; align-items:center; margin-bottom:14px; }
.ef360-avatar { width:56px; height:56px; border-radius:50%; background:linear-gradient(135deg,#2563eb,#7c3aed); color:#fff; display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:700; flex:0 0 auto; }
.ef360-name { font-size:19px; font-weight:700; }
.ef360-sub { color:var(--muted); font-size:13px; margin-top:2px; }
.ef360-alerts { display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.ef-alert { display:flex; gap:10px; align-items:flex-start; padding:10px 14px; border-radius:8px; font-size:13px; line-height:1.5; }
.ef-alert.warn { background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; }
.ef-alert.danger { background:#fef2f2; border:1px solid #fecaca; color:#991b1b; }
.ef-alert.ok { background:#f0fdf4; border:1px solid #bbf7d0; color:#166534; }
.ef360-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px 18px; }
.ef360-grid .kv { display:flex; justify-content:space-between; padding:7px 0; border-bottom:1px dashed var(--border); font-size:13.5px; }
.ef360-grid .kv b { color:#334155; font-weight:500; }
.ef360-grid .kv span { color:#0f172a; font-weight:600; }
.ef-rec-table { width:100%; border-collapse:collapse; font-size:13px; }
.ef-rec-table th, .ef-rec-table td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--border); }
.ef-rec-table th { color:var(--muted); font-weight:600; background:#f8fafc; }
.ef-empty { color:var(--muted); font-size:13px; padding:14px 0; text-align:center; }

.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 4px; }

/* 登录页（铭望咨询品牌顶栏 + 表单） */
.login-card { padding: 0; overflow: hidden; }
.login-band {
  background: linear-gradient(135deg, #16307a 0%, #1d4ed8 52%, #1e40af 100%);
  padding: 26px 32px 22px; color: #fff;
  position: relative; overflow: hidden;
}
.login-band::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%); pointer-events: none;
}
.login-band img.logo {
  display: block; height: 48px; width: auto; max-width: 100%;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.32));
}
.login-band .b-title { font-size: 15.5px; font-weight: 700; letter-spacing: .4px; margin-top: 14px; }
.login-band .b-en { font-size: 10px; opacity: .68; letter-spacing: 1.4px; margin-top: 4px; white-space: nowrap; }
.login-form { padding: 26px 32px 30px; }
.login-form h1 { font-size: 18px; margin: 0 0 4px; color: #1f2937; }
.login-form .sub { font-size: 13px; color: #6b7280; margin-bottom: 18px; }

/* 侧边栏品牌 logo */
.sidebar .brand { padding: 14px 16px 12px; }
.sidebar .brand img.slogo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0;
  background: rgba(255,255,255,.06); border-radius: 10px; padding: 3px; }
.sidebar .brand .b-meta { flex: 1; min-width: 0; line-height: 1.25; }
.sidebar .brand .b-meta .b-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: #fff; }
.sidebar .brand .b-meta .b-tag { font-size: 11px; color: #64748b; margin-top: 2px; }

/* 网络状态指示器 */
.net-status { display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #64748b; padding: 4px 10px; border-radius: 999px; background: #f1f5f9; }
.net-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.net-status.offline .dot { background: #dc2626; }
.net-status.syncing .dot { background: #f59e0b; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* 员工档案窄屏卡片视图 */
.employee-cards { display: none; }
@media (max-width: 820px) {
  .employee-cards { display: block; }
  .employee-cards .ec-card {
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow);
  }
  .employee-cards .ec-card .ec-name { font-weight: 600; font-size: 15px; }
  .employee-cards .ec-card .ec-meta { font-size: 12.5px; color: #64748b; margin-top: 4px; line-height: 1.7; }
  .employee-cards .ec-card .ec-meta b { color: #334155; font-weight: 500; }
  .employee-cards .ec-card .ec-bar { margin-top: 8px; }
  .employee-cards .ec-card .ec-actions { margin-top: 10px; display: flex; gap: 6px; }
}
@media (min-width: 821px) {
  .employee-cards { display: none !important; }
}

/* ============ 移动端适配（≤820px）：侧栏变顶栏，内容全宽，触控区加大 ============ */
@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 60;
    overflow: visible;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  }
  .sidebar .brand { padding: 10px 12px; border-bottom: none; flex-shrink: 0; }
  .sidebar .brand > div > div:last-child { display: none; } /* 隐藏副标题，省空间 */
  .sidebar .side-foot {
    order: 2; margin-left: auto;
    border-top: none; padding: 8px 10px;
    flex-shrink: 0; display: flex; gap: 12px; align-items: center; font-size: 12px;
  }
  .sidebar nav {
    order: 3; flex-basis: 100%;
    display: flex; flex: 1 1 100%; overflow-x: auto; padding: 0;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a {
    white-space: nowrap; padding: 13px 14px;
    border-left: none; border-bottom: 2px solid transparent;
  }
  .sidebar nav a.active {
    background: rgba(37, 99, 235, .18);
    border-bottom-color: #60a5fa;
  }
  .sidebar .grp { display: none; }
  .main { flex: 1; min-width: 0; }
  .topbar { padding: 0 14px; }
  .topbar .right { display: none; } /* 手机上省空间 */
  .content { padding: 14px 12px 60px; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } /* 手机一律单列，避免竖排文字 */
  .card-head { flex-wrap: wrap; }
  .btn { padding: 9px 14px; }               /* 触控目标 ≥40px */
  .btn.sm { padding: 8px 11px; }
  table { font-size: 13px; }
  th, td { padding: 9px 10px; }
  .modal { width: 94vw !important; max-width: 94vw; }
  .modal-body { max-height: 62vh; }
  .toast { font-size: 13.5px; max-width: 88vw; }
}

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 12.5px; white-space: nowrap; }
tbody tr:hover { background: #fafbfc; }
td .muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 7px; border: 1px solid var(--border);
  background: #fff; color: var(--text); cursor: pointer; font-size: 13px; font-family: inherit;
  transition: all .15s;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 13.5px; font-family: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
label.field { display: block; margin-bottom: 13px; }
label.field > span { display: block; font-size: 12.5px; color: #475569; margin-bottom: 5px; font-weight: 500; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 500; }
.tag.green { background: #dcfce7; color: #15803d; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.blue { background: #dbeafe; color: #1d4ed8; }
.tag.gray { background: #f1f5f9; color: #64748b; }
.tag.orange { background: #ffedd5; color: #c2410c; }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
  display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px;
  overflow-y: auto; z-index: 100;
}
.modal {
  background: #fff; border-radius: 12px; width: 640px; max-width: 100%;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .35);
}
.modal.wide { width: 880px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; max-height: 66vh; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #fafbfc; }
.modal-foot.bottom { border-bottom: none; border-top: 1px solid var(--border); }
.x { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; background: none; border: none; }
.x:hover { color: var(--text); }

/* toast */
#toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 10px 18px; border-radius: 8px; background: #0f172a; color: #fff;
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(15, 23, 42, .3);
}
.toast.ok { background: #16a34a; }
.toast.err { background: #dc2626; }

/* 导入 */
.drop {
  border: 2px dashed #cbd5e1; border-radius: 10px; padding: 34px; text-align: center;
  color: var(--muted); cursor: pointer; background: #fafbfc; transition: all .15s;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.map-row { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f1f5f9; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alert.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert.err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.preview-table { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.preview-table table { font-size: 12.5px; }
.preview-table th { position: sticky; top: 0; z-index: 1; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  padding: 8px 15px; background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-size: 13.5px; color: var(--muted); font-family: inherit;
}
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.hint { font-size: 12.5px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.switch input { width: 16px; height: 16px; }
.bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }

/* ============ 加载 / 进度反馈 ============ */
#progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
#progress.on { opacity: 1; }
#progress > i {
  display: block; height: 100%; width: 38%; background: linear-gradient(90deg, #2563eb, #60a5fa);
  animation: pr 1s ease-in-out infinite;
}
@keyframes pr { 0% { transform: translateX(-100%); } 100% { transform: translateX(360%); } }

.spinner {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
  border: 2px solid rgba(37, 99, 235, .25); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-box {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 46px 0; color: var(--muted); font-size: 13.5px;
}

/* 首屏骨架 */
.boot-splash {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.boot-card { text-align: center; color: var(--muted); }
.boot-brand { display: block; height: 46px; width: auto; margin: 0 auto 20px; }
.boot-logo {
  width: 54px; height: 54px; border-radius: 14px; margin: 0 auto 18px;
  background: var(--brand); color: #fff; font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.boot-bar {
  width: 190px; height: 3px; border-radius: 3px; background: #e2e8f0;
  overflow: hidden; margin: 0 auto 12px;
}
.boot-bar > i {
  display: block; height: 100%; width: 40%; background: var(--brand);
  animation: pr 1.1s ease-in-out infinite;
}
.boot-tip { font-size: 13px; }

.btn[disabled] { opacity: .7; cursor: not-allowed; }

/* ============ 专业版外壳（顶栏 + 分组侧边栏） ============ */
.topbar .top-actions { display: flex; align-items: center; gap: 10px; }
.topbar .top-actions .btn { padding: 6px 12px; font-size: 13px; }
.topbar .top-actions .icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: #f8fafc; cursor: pointer; position: relative; display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.topbar .top-actions .icon-btn:hover { background: #eef2f7; }
.topbar .top-actions .bell-dot {
  position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff;
  font-size: 10px; line-height: 1; padding: 2px 5px; border-radius: 10px; min-width: 14px; text-align: center;
}
.topbar .top-actions .user-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px; border-radius: 999px; background: #f1f5f9; font-size: 13px; color: #334155;
}
.topbar .top-actions .user-pill .user-dot {
  width: 24px; height: 24px; border-radius: 50%; background: #2563eb; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px;
}

/* 分组侧边栏（新版已在布局段定义，本段保留以便后向兼容；新规则优先） */
.sidebar .grp { padding: 14px 18px 4px; font-size: 11px; color: #64748b; letter-spacing: .8px; text-transform: uppercase; font-weight: 600; }

/* ============ KPI 卡片 ============ */
.kpi-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow);
}
.kpi-card .kpi-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi-card .kpi-label .ico {
  width: 28px; height: 28px; border-radius: 8px; background: #eef2ff; color: #2563eb;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.kpi-card .kpi-value { font-size: 28px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.kpi-card .kpi-sub { font-size: 12.5px; color: var(--muted); }
.kpi-card .kpi-sub .ok { color: #16a34a; }
.kpi-card .kpi-sub .warn { color: #d97706; }

/* ============ 信息横幅 ============ */
.banner {
  border-left: 4px solid #3b82f6; background: #eff6ff; color: #1e3a8a;
  padding: 14px 18px; border-radius: 8px; margin-bottom: 16px;
  font-size: 13.5px; line-height: 1.7;
}
.banner.green { border-color: #16a34a; background: #f0fdf4; color: #14532d; }
.banner.orange { border-color: #ea580c; background: #fff7ed; color: #7c2d12; }
.banner.purple { border-color: #7c3aed; background: #f5f3ff; color: #4c1d95; }
.banner strong { color: inherit; }

/* ============ 标签 ============ */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px;
  border: 1px solid; white-space: nowrap; line-height: 1.6;
}
.tag.green { color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }
.tag.orange { color: #d97706; background: #fff7ed; border-color: #fed7aa; }
.tag.red { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.tag.gray { color: #475569; background: #f1f5f9; border-color: #cbd5e1; }
.tag.blue { color: #2563eb; background: #eff6ff; border-color: #bfdbfe; }
.tag.purple { color: #7c3aed; background: #f5f3ff; border-color: #ddd6fe; }
.tag.solid-red { color: #fff; background: #dc2626; border-color: #b91c1c; font-weight: 600; }

/* ============ 选项卡 ============ */
.tabbar {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  background: var(--panel); padding: 6px 10px; border-radius: 8px 8px 0 0;
  overflow-x: auto; flex-wrap: nowrap;
}
.tabbar .tab {
  padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13.5px; color: var(--muted);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.tabbar .tab:hover { color: #1f2937; background: #f1f5f9; }
.tabbar .tab.active { color: #fff; background: #2563eb; }
.tabbar .tab.active .ico { color: #fff; }

/* ============ 简易可视化 ============ */
.chart-bars { padding: 18px 12px 12px; }
.chart-bars .bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; }
.chart-bars .bar-row .name { width: 100px; color: #475569; text-align: right; }
.chart-bars .bar-row .bar { height: 14px; background: linear-gradient(90deg, #60a5fa, #2563eb); border-radius: 4px; }
.chart-bars .bar-row .v { color: #94a3b8; margin-left: 4px; min-width: 40px; }

.funnel { padding: 16px 8px; }
.funnel .stage {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; margin: 0 auto 8px;
  background: linear-gradient(90deg, #dbeafe, #93c5f6); color: #1e3a8a;
  border-radius: 6px; font-size: 13.5px; min-width: 220px;
}
.funnel .stage:nth-child(2) { width: 88%; background: linear-gradient(90deg, #bfdbfe, #60a5fa); }
.funnel .stage:nth-child(3) { width: 76%; background: linear-gradient(90deg, #93c5f6, #3b82f6); color: #fff; }
.funnel .stage:nth-child(4) { width: 64%; background: linear-gradient(90deg, #60a5fa, #1d4ed8); color: #fff; }
.funnel .stage:nth-child(5) { width: 52%; background: linear-gradient(90deg, #2563eb, #1e3a8a); color: #fff; }

/* ============ 模块复合头部 ============ */
.module-head {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.module-head h2 { margin: 0; font-size: 18px; }
.module-head .desc { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.module-head .row-flex { margin-top: 10px; gap: 8px; flex-wrap: wrap; }

/* 数据表格辅助 */
.muted { color: var(--muted); }

/* ===== 日历（法定节假日） ===== */
.cal-wrap{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.cal{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff}
.cal-head{background:#f1f5f9;padding:6px 10px;font-weight:600;font-size:13px;color:#334155;text-align:center}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:#e2e8f0}
.cal-w{background:#f8fafc;text-align:center;font-size:11px;padding:4px 0;color:#64748b}
.cal-d{background:#fff;text-align:center;font-size:12px;padding:5px 2px 14px;position:relative;color:#334155}
.cal-d.empty{background:#fafafa}
.cal-d i{position:absolute;left:0;right:0;bottom:2px;font-size:9px;font-style:normal;color:#94a3b8;line-height:1.2}
.cal-d.rest{background:#dcfce7;color:#15803d;font-weight:600}
.cal-d.rest i{color:#16a34a}
.cal-d.work{background:#fee2e2;color:#b91c1c;font-weight:600}
.cal-d.work i{color:#dc2626}

/* ===== 人才盘点 · 理论与实操体系 ===== */
.tr-toc{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 4px}
.tr-toc-item{cursor:pointer;font-size:13px;padding:6px 12px;border:1px solid var(--bd,#e2e8f0);border-radius:18px;background:#f8fafc;color:#334155;transition:.15s}
.tr-toc-item:hover{background:#2563eb;color:#fff;border-color:#2563eb}
.tr-sec{margin-top:18px;scroll-margin-top:14px}
.tr-sec-h{display:flex;align-items:center;gap:10px;font-size:17px;font-weight:700;color:#0f172a;padding:10px 0;border-bottom:2px solid #2563eb;margin-bottom:12px}
.tr-no{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:7px;background:#2563eb;color:#fff;font-size:13px;font-weight:700}
.tr-model{border:1px solid var(--bd,#e2e8f0);border-radius:10px;overflow:hidden;max-width:760px}
.tr-layer{padding:12px 16px;display:flex;flex-direction:column;gap:2px}
.tr-layer b{font-size:14px}
.tr-layer span{font-size:12px;color:#64748b}
.tr-layer.head{background:#eff6ff}
.tr-layer.waist{background:#f1f5f9}
.tr-layer.leg{background:#f8fafc}
.tr-arrow{text-align:center;color:#94a3b8;font-size:12px;line-height:1;padding:2px 0}
.tr-stepper{display:flex;align-items:flex-start;flex-wrap:wrap;gap:0;margin:6px 0 14px}
.tr-step{display:flex;flex-direction:column;align-items:center;text-align:center;width:130px;position:relative}
.tr-step-no{width:30px;height:30px;border-radius:50%;background:#e2e8f0;color:#475569;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;border:2px solid #fff;box-shadow:0 0 0 1px #cbd5e1}
.tr-step.on .tr-step-no{background:#16a34a;color:#fff;box-shadow:0 0 0 1px #16a34a}
.tr-step-no.sm{width:22px;height:22px;font-size:12px;flex:0 0 auto}
.tr-step-name{font-size:12px;margin-top:5px;color:#334155;font-weight:600}
.tr-step-flag{font-size:10px;color:#94a3b8;margin-top:2px}
.tr-step.on .tr-step-flag{color:#16a34a}
.tr-step-line{flex:1;height:2px;background:#e2e8f0;margin-top:14px;min-width:14px}
.tr-stepgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:12px}
.tr-stepcard{border:1px solid var(--bd,#e2e8f0);border-radius:10px;padding:12px 14px;background:#fff}
.tr-stepcard-h{display:flex;align-items:center;gap:8px;font-weight:700;font-size:14px;color:#0f172a;margin-bottom:8px}
.tr-row{display:flex;gap:8px;padding:5px 0;border-bottom:1px dashed #eef2f7;font-size:13px}
.tr-k{flex:0 0 64px;color:#64748b;font-weight:600}
.tr-v{flex:1;color:#1e293b;line-height:1.7}
.tr-guide{margin-top:8px;background:#f0f9ff;border-left:3px solid #0ea5e9;padding:8px 10px;border-radius:0 6px 6px 0;font-size:12.5px;color:#0c4a6e;line-height:1.7}
.tr-flow{display:flex;gap:8px;align-items:flex-start;padding:6px 0;font-size:13px;color:#1e293b;line-height:1.6}
.tr-flow .tr-step-no{margin-top:1px}
.tr-7020{display:flex;align-items:center;gap:10px;margin:8px 0}
.tr-7020-bar{height:26px;border-radius:5px;flex:0 0 auto;min-width:30px}
.tr-7020-t{font-size:12.5px;line-height:1.5}
.tr-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.tr-links .btn{cursor:pointer}

/* ===== HR 知识库：按岗位学习打卡 ===== */
.kb-bar{display:inline-block;position:relative;width:120px;height:8px;background:#eef2f7;border-radius:6px;overflow:hidden;vertical-align:middle}
.kb-bar>span{display:block;height:100%;border-radius:6px}
.kb-hero{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.kb-role{border:1px solid #e2e8f0;border-radius:10px;padding:14px;background:#fff;cursor:pointer;transition:.15s}
.kb-role:hover{border-color:#2563eb;box-shadow:0 4px 14px rgba(37,99,235,.12)}
.kb-role.on{border-color:#2563eb;background:#f5f9ff;box-shadow:0 4px 14px rgba(37,99,235,.12)}
.kb-role h4{margin:0 0 4px;font-size:15px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.kb-role .meta{font-size:12px;color:#64748b;line-height:1.75}
.kb-chip{display:inline-block;padding:1px 8px;border-radius:20px;font-size:11px;background:#f1f5f9;color:#475569;margin:3px 5px 0 0}
.kb-item{border:1px solid #e6ebf2;border-radius:10px;padding:12px 14px;margin-bottom:10px;background:#fff}
.kb-item.done{background:#f8fcf9;border-color:#cdeed8}
.kb-item h5{margin:0 0 6px;font-size:14.5px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;line-height:1.9}
.kb-item .sum{font-size:13px;color:#475569;margin-bottom:6px}
.kb-item ul{margin:6px 0 8px;padding-left:20px;font-size:12.8px;color:#334155;line-height:1.9}
.kb-act{background:#f8fafc;border-left:3px solid #2563eb;padding:8px 10px;font-size:12.5px;color:#334155;border-radius:0 6px 6px 0}
.kb-quiz{margin-top:8px;background:#fffbeb;border:1px dashed #f59e0b;border-radius:8px;padding:9px 11px;font-size:12.5px;color:#78350f}
.kb-opt{padding:3px 8px;border-radius:6px;cursor:pointer;margin-top:3px}
.kb-opt:hover{background:#fef3c7}
.kb-opt.ok{background:#dcfce7;color:#15803d;font-weight:600}
.kb-opt.no{background:#fee2e2;color:#b91c1c}
.kb-actions{margin-top:10px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.kb-trend{display:flex;align-items:flex-end;gap:6px;height:150px;padding-top:10px}
.kb-tcol{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}
.kb-tcol span{display:block;width:70%;min-height:2px;background:linear-gradient(180deg,#60a5fa,#2563eb);border-radius:4px 4px 0 0}
.kb-tcol i{font-style:normal;font-size:11px;color:#475569;margin-top:4px}
.kb-tcol em{font-style:normal;font-size:10px;color:#94a3b8}

/* ============ 三级专业导航（模块 → 职能 → 功能页，可折叠） ============ */
.sidebar .nav-tools { display: flex; gap: 6px; align-items: center; padding: 10px 12px 9px; border-bottom: 1px solid rgba(255, 255, 255, .05); flex-shrink: 0; }
.sidebar .nav-search { flex: 1; position: relative; display: flex; align-items: center; min-width: 0; }
.sidebar .nav-search svg { position: absolute; left: 8px; width: 14px; height: 14px; color: #64748b; pointer-events: none; }
.sidebar .nav-search input {
  width: 100%; height: 30px; border-radius: 8px; padding: 0 8px 0 27px;
  border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .05);
  color: #e2e8f0; font-size: 12.5px; outline: none; font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.sidebar .nav-search input::placeholder { color: #64748b; }
.sidebar .nav-search input:focus { border-color: rgba(59, 130, 246, .6); background: rgba(37, 99, 235, .10); }
.sidebar .nav-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sidebar .nav-tbtn {
  height: 30px; padding: 0 10px; flex-shrink: 0; cursor: pointer; font-family: inherit;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04); color: #94a3b8; font-size: 12px;
  transition: color .15s ease, background .15s ease;
}
.sidebar .nav-tbtn:hover { color: #e2e8f0; background: rgba(255, 255, 255, .09); }

.sidebar nav { padding: 6px 8px 12px; }
.sidebar nav .nav-l1 { margin-bottom: 1px; }
.sidebar nav .nav-h1,
.sidebar nav .nav-h2 { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; transition: background-color .15s ease, color .15s ease; }
.sidebar nav .nav-h1 { padding: 9px 10px; border-radius: 8px; color: #cbd5e1; font-size: 13.5px; font-weight: 600; }
.sidebar nav .nav-h1:hover { background: rgba(255, 255, 255, .06); }
.sidebar nav .nav-h1 .ico { width: 17px; height: 17px; flex-shrink: 0; color: #93c5fd; opacity: .95; }
.sidebar nav .nav-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav .nav-no { font-size: 10px; color: #475569; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .4px; }
.sidebar nav .nav-caret {
  width: 0; height: 0; flex-shrink: 0; margin-left: 2px;
  border-left: 4px solid #64748b; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .18s ease;
}
.sidebar nav .nav-l1.open > .nav-h1 .nav-caret,
.sidebar nav .nav-l2.open > .nav-h2 .nav-caret { transform: rotate(90deg); }
.sidebar nav .nav-l1.open > .nav-h1 .ico { color: #bfdbfe; }

.sidebar nav .nav-l2wrap { display: none; }
.sidebar nav .nav-l1.open > .nav-l2wrap { display: block; animation: navFade .18s ease; }
.sidebar nav .nav-l2 { margin: 1px 0 1px 16px; padding-left: 5px; border-left: 1px solid rgba(255, 255, 255, .07); }
.sidebar nav .nav-h2 { padding: 7px 8px; border-radius: 7px; color: #94a3b8; font-size: 12.8px; }
.sidebar nav .nav-h2:hover { background: rgba(255, 255, 255, .05); color: #cbd5e1; }
.sidebar nav .nav-cnt { font-size: 10px; color: #64748b; background: rgba(148, 163, 184, .10); border-radius: 999px; padding: 0 5px; line-height: 15px; font-weight: 600; }

.sidebar nav .nav-l3 { display: none; }
.sidebar nav .nav-l2.open > .nav-l3 { display: block; animation: navFade .18s ease; }
.sidebar nav a.navitem.l3 {
  gap: 7px; margin: 1px 0; padding: 6px 8px 6px 13px; border-left: 0;
  border-radius: 7px; font-size: 12.5px; color: #94a3b8;
}
.sidebar nav a.navitem.l3 .navdot { width: 5px; height: 5px; border-radius: 50%; background: #475569; flex-shrink: 0; transition: background .15s ease; }
.sidebar nav a.navitem.l3:hover { background: rgba(255, 255, 255, .05); color: #e2e8f0; }
.sidebar nav a.navitem.l3:hover .navdot { background: #94a3b8; }
.sidebar nav a.navitem.l3.active { background: linear-gradient(90deg, rgba(37, 99, 235, .22) 0%, rgba(37, 99, 235, .04) 100%); color: #fff; }
.sidebar nav a.navitem.l3.active .navdot { background: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .18); }
.sidebar nav .nav-empty { padding: 16px 12px; color: #64748b; font-size: 12.5px; }
.sidebar .nav-foot {
  display: flex; justify-content: space-between; gap: 8px; flex-shrink: 0;
  padding: 7px 14px 9px; font-size: 11px; color: #475569; border-top: 1px solid rgba(255, 255, 255, .05);
}
.sidebar .nav-foot .nav-tip { opacity: .85; }
@keyframes navFade { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .sidebar .nav-tools { order: 1; flex: 1 1 auto; border-bottom: none; padding: 8px 10px; }
  .sidebar .nav-foot { display: none; }
  .sidebar nav { order: 4; max-height: 62vh; overflow-y: auto; overflow-x: hidden; display: block; }
  .sidebar nav .nav-l2wrap,
  .sidebar nav .nav-l3 { display: block !important; }
  .sidebar nav a.navitem.l3 { white-space: nowrap; padding: 7px 8px 7px 18px; }
}
