/* =============================================================
 * 海南海神制药 KPI 系统 — 全局样式
 * 制药科技风：深蓝主色 + 清爽卡片
 * ============================================================= */
:root {
  --primary: #1e3a8a;
  --primary-2: #1d4ed8;
  --primary-light: #eff6ff;
  --teal: #0e7490;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --ok: #16a34a;
  --warn: #f59e0b;
  --bad: #e74c3c;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 16px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }

/* ---------- 通用组件 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-weight: 600; border-bottom: 1px solid var(--border); font-size: 15px; }
.card-body { padding: 18px; }
.card.h-full { height: 100%; }
.card.h-full .card-body { height: calc(100% - 49px); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 700; margin-top: 4px; }
.stat-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }

.progress { width: 100%; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; transition: width .6s ease; }

.avatar { border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }

.btn { border: none; border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 14px; transition: .15s; }
.btn-primary { background: var(--primary-2); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-ghost { background: #f1f5f9; color: var(--text); }
.btn-ghost:hover { background: #e2e8f0; }
.btn-warn { background: var(--warn); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.tag { font-size: 13px; font-weight: 600; }
.tag.up { color: var(--ok); } .tag.down { color: var(--bad); }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 20px; background: linear-gradient(160deg, #0f2557 0%, #1e3a8a 55%, #0e7490 130%); }
.login-brand { text-align: center; color: #fff; margin-bottom: 28px; }
.login-brand .logo { font-size: 54px; }
.login-brand h1 { font-size: 26px; margin-top: 6px; letter-spacing: 2px; }
.login-brand p { opacity: .85; font-size: 15px; letter-spacing: 4px; }
.login-brand small { display: block; margin-top: 12px; opacity: .6; font-size: 12px; }
.login-accounts { width: 100%; max-width: 760px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.login-group { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); border-radius: var(--radius); padding: 14px; }
.login-group-title { color: #cbd5e1; font-size: 13px; margin-bottom: 10px; font-weight: 600; }
.login-users { display: flex; flex-direction: column; gap: 8px; }
.login-user { display: flex; align-items: center; gap: 10px; background: #fff; border: none; border-radius: 10px; padding: 8px 10px; text-align: left; transition: .15s; }
.login-user:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.lu-info { display: flex; flex-direction: column; }
.lu-info b { font-size: 14px; }
.lu-info span { font-size: 11px; color: var(--muted); }
.login-foot { margin-top: 24px; }
.login-foot .link { color: #fff; opacity: .85; font-size: 13px; border: 1px solid rgba(255, 255, 255, .3); padding: 8px 16px; border-radius: 999px; }

/* 工号密码登录 */
.login-form-wrap { width: 100%; max-width: 420px; }
.login-form { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.lf-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lf-field span { font-size: 13px; font-weight: 600; color: #334155; }
.lf-field input { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; outline: none; }
.lf-field input:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(14,116,144,.12); }
.login-error { display: none; color: #dc2626; font-size: 13px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 10px; margin-bottom: 14px; }
.btn-block { width: 100%; justify-content: center; }
.login-hint { margin-top: 12px; text-align: center; font-size: 12px; color: #64748b; }
.login-demo-tip { margin-top: 16px; text-align: center; color: #fff; opacity: .75; font-size: 12px; }

/* 修改密码弹窗 */
.modal .form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* ---------- 移动端外壳 ---------- */
.phone { max-width: 430px; margin: 20px auto; background: #0b1220; border-radius: 38px; padding: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); min-height: 90vh; display: flex; flex-direction: column; }
.phone-status { color: #64748b; text-align: center; font-size: 11px; padding: 4px 0 8px; letter-spacing: 1px; }
.phone-screen { flex: 1; background: var(--bg); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; }
.m-content { flex: 1; overflow-y: auto; }
.phone-home { height: 4px; width: 120px; background: #334155; border-radius: 999px; margin: 8px auto 4px; }

.m-tabbar { display: flex; background: #fff; border-top: 1px solid var(--border); border-radius: 0 0 26px 26px; }
.m-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 11px; color: var(--muted); position: relative; }
.m-tab.active { color: var(--primary-2); font-weight: 600; }
.m-tab-icon { font-size: 18px; position: relative; }
.m-tab .dot { position: absolute; top: -6px; right: -10px; background: var(--bad); color: #fff; font-size: 9px; min-width: 14px; height: 14px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

.m-page { padding: 14px; }
.m-hero { background: linear-gradient(135deg, #1e3a8a, #0e7490); border-radius: var(--radius); padding: 16px; color: #fff; margin-bottom: 16px; }
.m-hero-top { display: flex; justify-content: space-between; align-items: center; }
.m-hero-sub { font-size: 12px; opacity: .8; }
.m-hero-cycle { font-size: 17px; font-weight: 700; margin-top: 2px; }
.m-hero-phase { text-align: right; font-size: 13px; font-weight: 600; }
.m-hero-phase small { display: block; font-weight: 400; opacity: .8; }
.m-section-title { font-size: 14px; font-weight: 700; margin: 16px 2px 10px; display: flex; align-items: center; gap: 6px; }
.m-count { background: var(--primary-light); color: var(--primary-2); font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 600; }

.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-item { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.task-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 600; font-size: 14px; }
.task-desc { font-size: 12px; color: var(--muted); margin: 2px 0; }
.task-dead { font-size: 11px; color: var(--muted); }
.task-arrow { color: #cbd5e1; font-size: 20px; }

.my-perf { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #fff, #eff6ff); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid #dbeafe; }
.my-perf-score { font-size: 40px; font-weight: 800; color: var(--primary); line-height: 1; }
.my-perf-score small { font-size: 14px; color: var(--muted); font-weight: 500; }
.my-perf-info { flex: 1; }
.my-perf-rank { font-size: 12px; color: var(--muted); margin: 4px 0; }
.my-perf-trend { font-size: 12px; color: var(--ok); font-weight: 600; }

.m-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.m-quick-item { background: #fff; border-radius: 12px; padding: 12px 4px; text-align: center; box-shadow: var(--shadow); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.m-quick-item span:first-child { font-size: 22px; }

.m-page-head { margin-bottom: 14px; }
.m-page-head h2 { font-size: 18px; }
.m-page-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 自评 */
.sa-block-title { font-weight: 700; font-size: 14px; margin: 16px 0 10px; color: var(--primary); }
.sa-list { display: flex; flex-direction: column; gap: 12px; }
.sa-item { background: #fff; border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.sa-item-head { display: flex; justify-content: space-between; align-items: center; }
.sa-name { font-weight: 600; }
.sa-weight { background: var(--primary-light); color: var(--primary-2); font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.sa-target { font-size: 11px; color: var(--muted); margin: 4px 0 8px; }
.sa-slider { display: flex; align-items: center; gap: 10px; }
.sa-slider input[type=range] { flex: 1; }
.sa-val { font-weight: 700; color: var(--primary-2); min-width: 28px; text-align: right; }
.sa-comment { width: 100%; margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12px; }
.sa-foot { position: sticky; bottom: 0; background: var(--bg); padding-top: 12px; }
.sa-preview { text-align: center; font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 10px; }
.sa-btns { display: flex; gap: 10px; }
.sa-btns .btn { flex: 1; }

input[type=range] { -webkit-appearance: none; height: 6px; background: #e2e8f0; border-radius: 999px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary-2); cursor: pointer; box-shadow: 0 2px 6px rgba(29, 78, 216, .4); }

/* 评价他人 */
.ev-anon { background: #fef3c7; color: #92400e; font-size: 12px; padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.ev-dims { display: flex; flex-direction: column; gap: 16px; background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.ev-dim-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.ev-dim-head b { color: var(--primary-2); }
.ev-comment-box { margin-top: 16px; }
.ev-comment-box label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.ev-comment-box textarea { width: 100%; min-height: 90px; border: 1px solid var(--border); border-radius: 10px; padding: 10px; resize: vertical; }

/* 报告 */
.rep-score { display: flex; align-items: center; gap: 18px; background: linear-gradient(135deg, #fff, #eff6ff); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.rep-score-num { font-size: 52px; font-weight: 800; line-height: 1; }
.rep-score-meta { display: flex; flex-direction: column; gap: 6px; }
.rep-coef, .rep-rank { font-size: 13px; color: var(--muted); }
.rep-radar { display: flex; justify-content: center; margin: 8px 0 16px; }
.rep-inds { background: #fff; border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.rep-ind { margin-bottom: 12px; }
.rep-ind-top { display: flex; justify-content: space-between; font-weight: 600; }
.rep-ind-top b { color: var(--primary); }
.rep-ind-sub { font-size: 11px; color: var(--muted); margin: 2px 0 5px; }
.rep-360 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: #fff; border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.rep-360-item { text-align: center; }
.rep-360-item span { display: block; font-size: 12px; color: var(--muted); }
.rep-360-item b { font-size: 20px; }
.rep-360-item.total { grid-column: span 3; border-top: 1px dashed var(--border); padding-top: 8px; }
.rep-list { margin: 6px 0 0 18px; font-size: 13px; }
.rep-list.ok li { color: var(--ok); } .rep-list.warn li { color: #b45309; }
.rep-appeal { margin-top: 14px; padding: 12px; border-radius: 10px; text-align: center; font-weight: 600; }
.rep-appeal.pending { background: #fef3c7; color: #92400e; }
.rep-appeal.approved { background: #dcfce7; color: #166534; }
.rep-appeal.rejected { background: #fee2e2; color: #991b1b; }

/* 团队 / 通知 / 个人 */
.team-list, .notif-list { display: flex; flex-direction: column; gap: 10px; }
.team-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.team-info { flex: 1; }
.team-info b { display: block; } .team-info span { font-size: 12px; color: var(--muted); }
.team-score { font-weight: 700; color: var(--primary); margin-right: 6px; }
.notif-item { display: flex; gap: 12px; background: #fff; border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.notif-item.read { opacity: .6; }
.notif-icon { font-size: 22px; }
.notif-title { font-weight: 600; } .notif-content { font-size: 13px; color: var(--muted); margin: 2px 0; }
.notif-time { font-size: 11px; color: #94a3b8; }
.profile-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #1e3a8a, #0e7490); border-radius: var(--radius); padding: 18px; color: #fff; }
.profile-card b { font-size: 18px; } .profile-card span { display: block; font-size: 12px; opacity: .85; }
.profile-dept { background: rgba(255, 255, 255, .2); display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; margin-top: 4px; }
.profile-menu { margin-top: 16px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.profile-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.profile-item:last-child { border-bottom: none; }
.profile-item span { color: #cbd5e1; }
.profile-about { text-align: center; color: #94a3b8; font-size: 11px; margin-top: 18px; }

/* ---------- PC 外壳 ---------- */
.pc-layout { display: flex; min-height: 100vh; }
.pc-side { width: 232px; background: linear-gradient(180deg, #0f2557, #1e3a8a); color: #cbd5e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.pc-logo { padding: 20px 18px; font-size: 18px; font-weight: 800; color: #fff; display: flex; flex-direction: column; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.pc-logo span { font-size: 11px; font-weight: 400; opacity: .65; letter-spacing: 2px; }
.pc-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.pc-nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; color: #cbd5e1; font-size: 14px; transition: .15s; }
.pc-nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.pc-nav-item.active { background: var(--primary-2); color: #fff; font-weight: 600; }
.pc-nav-icon { font-size: 17px; }
.pc-side-foot { padding: 12px 10px; border-top: 1px solid rgba(255, 255, 255, .1); }
.pc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pc-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.pc-top-title { font-size: 18px; font-weight: 700; white-space: nowrap; }
.pc-top-right { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.dev-toggle { background: var(--primary-light); color: var(--primary-2); border: none; border-radius: 8px; padding: 7px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pc-user { display: flex; align-items: center; gap: 8px; }
.pc-user b { font-size: 13px; display: block; } .pc-user span { font-size: 11px; color: var(--muted); }
.pc-content { padding: 24px; flex: 1; }

/* 手机端打开 PC 页面时的顶栏适配 */
@media (max-width: 768px) {
  .pc-top { padding: 10px 14px; }
  .pc-top-title { font-size: 15px; }
  .pc-top-right { gap: 8px; justify-content: flex-end; }
  .pc-top-right .btn { padding: 6px 10px; font-size: 12px; }
  .pc-user { gap: 6px; }
  .pc-user .avatar { width: 28px; height: 28px; font-size: 12px; }
  .pc-user b { font-size: 12px; }
  .pc-user span { font-size: 10px; }
  .dev-toggle { padding: 6px 10px; font-size: 11px; }
  .token-pill { padding: 5px 10px; font-size: 12px; }
  .token-pill .tp-icon { font-size: 12px; }
  .token-pill .tp-unit { display: none; }
  .pc-content { padding: 14px; }
}

@media (max-width: 480px) {
  .pc-top-right { width: 100%; justify-content: space-between; }
  .pc-top-right .pc-user { order: -1; }
}

/* PC 页面通用 */
.pc-page { width: 100%; min-width: 0; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-grid > div { min-width: 0; }
.prog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.prog-cell-top { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.prog-label { color: var(--muted); font-size: 11px; }
.talent-list, .talent { display: flex; flex-direction: column; gap: 10px; }
.talent { display: flex; align-items: center; gap: 10px; }
.talent b { font-size: 14px; } .talent span { font-size: 12px; color: var(--muted); }
.talent.warn b { color: var(--bad); }

.heat { display: flex; flex-direction: column; gap: 12px; }
.heat-row { display: flex; align-items: center; gap: 12px; }
.heat-dept { width: 64px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.heat-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.heat-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.heat-bar span { width: 32px; }
.heat-bar b { width: 28px; text-align: right; color: var(--text); }

/* 表格 */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 12px 14px; background: #f8fafc; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.data-table tr:hover td { background: #f8fafc; }
.data-table.compact th, .data-table.compact td { padding: 8px 12px; }
.data-table .rule { color: var(--muted); font-size: 12px; }
.row-act { display: flex; gap: 6px; }
.status-pill { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: var(--muted); }
.status-pill.ok { background: #dcfce7; color: #166534; }
.status-pill.bad { background: #fee2e2; color: #991b1b; }

/* 工具栏 / 筛选 */
.pc-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ft { padding: 6px 14px; border-radius: 999px; background: #fff; font-size: 13px; color: var(--muted); box-shadow: var(--shadow); }
.ft.active { background: var(--primary-2); color: #fff; }
.pc-search { border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; width: 240px; }
.pc-hint { font-size: 12px; color: var(--muted); background: var(--primary-light); border-left: 3px solid var(--primary-2); padding: 10px 14px; border-radius: 8px; }
.pc-hint.inline { background: none; border: none; padding: 0; margin-left: 12px; }

/* 指标体系 */
.pc-arch { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.arch-layer { padding: 12px 16px; border-radius: 10px; color: #fff; font-weight: 600; }
.arch-layer span { display: block; font-weight: 400; font-size: 12px; opacity: .85; margin-top: 2px; }
.arch-layer.l1 { background: var(--primary); }
.arch-layer.l2 { background: var(--teal); margin-left: 20px; }
.arch-layer.l3 { background: #15803d; margin-left: 40px; }
.ind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ind-sum { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* 组织架构 */
.org-tree { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.org-gm { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; background: linear-gradient(135deg, #1e3a8a, #0e7490); color: #fff; border-radius: 14px; width: 100%; max-width: 360px; margin: 0 auto 20px; }
.org-gm span { font-size: 12px; opacity: .85; }
.org-vps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.org-vp { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #f8fafc; }
.org-vp-head { display: flex; align-items: center; gap: 8px; font-weight: 600; padding-bottom: 10px; border-bottom: 1px dashed var(--border); margin-bottom: 10px; }
.org-vp-head span { font-size: 11px; color: var(--muted); font-weight: 400; }
.org-depts { display: flex; flex-direction: column; gap: 12px; }
.org-dept { background: #fff; border-radius: 10px; padding: 10px; border: 1px solid var(--border); }
.org-mgr { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.org-mgr span { font-size: 11px; color: var(--muted); font-weight: 400; }
.org-emps { display: flex; flex-wrap: wrap; gap: 6px; }
.org-emp { display: inline-flex; align-items: center; gap: 4px; background: #f1f5f9; border-radius: 999px; padding: 2px 8px 2px 2px; font-size: 11px; cursor: pointer; transition: background .15s, transform .1s; }
.org-emp:hover { background: #dbeafe; transform: translateY(-1px); }
.org-other { margin-top: 20px; border: 1px dashed #f59e0b; border-radius: 12px; padding: 14px; background: #fffbeb; }
.org-other-head { font-weight: 600; font-size: 13px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.org-other-head .muted { font-size: 11px; color: var(--muted); font-weight: 400; }
.org-emp.other { background: #fef3c7; border: 1px dashed #f59e0b; }
.org-other-head { flex-wrap: wrap; }
.chk-all { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 400; color: var(--muted); cursor: pointer; }
.other-chk { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.other-name { display: inline-flex; align-items: center; gap: 4px; }
.org-toolbar { margin-bottom: 16px; }
.org-toolbar .toolbar-btns { display: flex; gap: 10px; }

/* 考核周期 */
.cycle-flow { display: flex; align-items: center; overflow-x: auto; padding: 10px 0; }
.cycle-step { text-align: center; min-width: 90px; }
.cycle-dot { width: 36px; height: 36px; border-radius: 50%; background: #e2e8f0; color: var(--muted); display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-weight: 700; }
.cycle-step.done .cycle-dot { background: var(--ok); color: #fff; }
.cycle-step.current .cycle-dot { background: var(--primary-2); color: #fff; box-shadow: 0 0 0 4px rgba(29, 78, 216, .2); }
.cycle-label { font-size: 13px; font-weight: 600; }
.cycle-date { font-size: 11px; color: var(--muted); }
.cycle-line { flex: 1; height: 2px; background: var(--border); min-width: 20px; }
.cycle-actions { display: flex; gap: 12px; margin-bottom: 16px; }

/* 校准 */
.cal-dist { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.cal-warn { color: var(--bad); font-weight: 600; }
.cal-ok { color: var(--ok); font-weight: 600; }
.cal-input { width: 64px; border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; }
.cal-foot { display: flex; align-items: center; gap: 8px; }

/* 系统设置 */
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.set-row label { width: 120px; font-size: 13px; font-weight: 600; }
.set-row .progress { flex: 1; }
.set-input { width: 80px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.set-note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-sw { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .2s; }
.slider-sw:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider-sw { background: var(--ok); }
.switch input:checked + .slider-sw:before { transform: translateX(20px); }

/* 雷达图 */
.radar-grid { fill: none; stroke: #e2e8f0; }
.radar-axis { stroke: #e2e8f0; }
.radar-area { fill: rgba(29, 78, 216, .25); stroke: var(--primary-2); stroke-width: 2; }
.radar-label { font-size: 12px; fill: var(--muted); font-weight: 600; }

/* 响应式 */
@media (max-width: 1100px) { .ind-grid { grid-template-columns: 1fr; } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .pc-side { width: 64px; }
  .pc-logo span, .pc-nav-item span:last-child { display: none; }
  .pc-nav-item { justify-content: center; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .org-vps { grid-template-columns: 1fr; }
  .prog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .pc-layout { flex-direction: column; }
  .pc-side { width: 100%; height: auto; flex-direction: row; position: static; }
  .pc-nav { flex-direction: row; overflow-x: auto; }
  .pc-side-foot { display: none; }
  .login-accounts { grid-template-columns: 1fr; }
}

/* ===== 弹窗 / 人员管理表单 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  padding: 16px; animation: fadeIn .15s ease;
}
.modal {
  width: min(640px, 96vw); max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(15, 23, 42, .3);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #eef2f7; font-size: 17px;
}
.modal-head b { color: var(--primary); }
.modal-x {
  border: none; background: #f1f5f9; color: #64748b; width: 30px; height: 30px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.modal-x:hover { background: #e2e8f0; }
.modal-body { padding: 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid #eef2f7;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #475569; }
.form-field > span { font-weight: 600; }
.form-field input, .form-field select {
  padding: 9px 11px; border: 1px solid #d8e0ea; border-radius: 8px; font-size: 14px;
  background: #fbfdff; color: #1e293b;
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table th.num { text-align: right; }

/* 薪资联动表格：固定列宽，避免串列 */
.salary-table { table-layout: fixed; width: 100%; }
.salary-table th, .salary-table td { overflow: hidden; text-overflow: ellipsis; }
.salary-table th:nth-child(1), .salary-table td:nth-child(1) { width: 12%; }
.salary-table th:nth-child(2), .salary-table td:nth-child(2) { width: 12%; }
.salary-table th:nth-child(3), .salary-table td:nth-child(3) { width: 8%; }
.salary-table th:nth-child(4), .salary-table td:nth-child(4) { width: 15%; }
.salary-table th:nth-child(5), .salary-table td:nth-child(5) { width: 16%; }
.salary-table th:nth-child(6), .salary-table td:nth-child(6) { width: 11%; }
.salary-table th:nth-child(7), .salary-table td:nth-child(7) { width: 14%; }
.salary-table th:nth-child(8), .salary-table td:nth-child(8) { width: 12%; }
.salary-table td.grade-dist { white-space: nowrap; }
.salary-table td.grade-dist span { white-space: nowrap; display: inline-block; margin-right: 4px; }
.pa-name { white-space: nowrap; }

/* 人员管理表格：固定列宽，避免串列 */
.personnel-table { table-layout: fixed; width: 100%; min-width: 1100px; }
.personnel-table th, .personnel-table td { overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.personnel-table th:nth-child(1), .personnel-table td:nth-child(1) { width: 8%; }
.personnel-table th:nth-child(2), .personnel-table td:nth-child(2) { width: 11%; }
.personnel-table th:nth-child(3), .personnel-table td:nth-child(3) { width: 10%; }
.personnel-table th:nth-child(4), .personnel-table td:nth-child(4) { width: 10%; }
.personnel-table th:nth-child(5), .personnel-table td:nth-child(5) { width: 12%; }
.personnel-table th:nth-child(6), .personnel-table td:nth-child(6) { width: 8%; }
.personnel-table th:nth-child(7), .personnel-table td:nth-child(7) { width: 11%; }
.personnel-table th:nth-child(8), .personnel-table td:nth-child(8) { width: 10%; }
.personnel-table th:nth-child(9), .personnel-table td:nth-child(9) { width: 7%; }
.personnel-table th:nth-child(10), .personnel-table td:nth-child(10) { width: 16%; min-width: 130px; }
.personnel-table td.pa-name { white-space: nowrap; }
.personnel-table .row-act { white-space: nowrap; }
.personnel-table .row-act .btn { flex-shrink: 0; }
.btn-danger { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }
.muted { color: #94a3b8; font-size: 13px; }

/* ============ 指标体系（重构后） ============ */
.cat-tag { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 20px; margin-bottom: 8px; font-weight: 600; }
.cat-bus { background: #e0f2fe; color: #0369a1; }
.cat-mgmt { background: #ecfdf5; color: #047857; }
.ind-sub { margin-bottom: 10px; }
.ind-sub .data-table { margin: 0; }
.ind-arch .arch-layer { background: #f8fafc; }
.bonus-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bonus-range { background: #fef3c7; color: #b45309; font-weight: 700; padding: 4px 12px; border-radius: 8px; white-space: nowrap; }
.ind-admin-bar { margin: 14px 0 6px; }
.ind-admin-bar .btn { font-size: 14px; }

/* 指标管理 / 审批 */
.ind-status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; background: #f8fafc; margin-bottom: 12px; }
.ind-status.status-ok { background: #ecfdf5; }
.ind-status.status-warn { background: #fffbeb; }
.ind-status.status-pending { background: #eff6ff; }
.ind-status.status-bad { background: #fef2f2; }
.ind-meta { color: #64748b; font-size: 13px; }
.approval-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; border: 1px solid #e2e8f0; }
.approval-bar.ok { background: #ecfdf5; border-color: #a7f3d0; }
.approval-bar.warn { background: #fffbeb; border-color: #fde68a; }
.approval-bar.pending { background: #eff6ff; border-color: #bfdbfe; }
.approval-bar.bad { background: #fef2f2; border-color: #fecaca; }
.ind-edit-hint { background: #f1f5f9; border-left: 3px solid #3b82f6; padding: 8px 12px; border-radius: 6px; color: #475569; font-size: 13px; margin-bottom: 14px; }
.ind-in { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 6px; padding: 5px 7px; font-size: 13px; font-family: inherit; }
.ind-in.num { max-width: 70px; }
.ind-edit .data-table th, .ind-edit .data-table td { padding: 6px 8px; vertical-align: middle; }
.btn.sm, .btn-danger.sm { padding: 4px 10px; font-size: 12px; }

/* 总经理审批签字画板 */
.sig-canvas { width: 100%; max-width: 620px; height: 190px; background: #fff; border: 1.5px dashed #94a3b8; border-radius: 10px; display: block; touch-action: none; cursor: crosshair; }
.sig-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.sig-bar .muted { flex: 1; }

/* 总经理审批意见展示块 */
.gm-approval { margin-top: 18px; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; }
.gm-appr-head { padding: 10px 14px; background: #0f172a; color: #f8fafc; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gm-appr-head .muted { color: #cbd5e1; font-size: 12px; font-weight: 400; }
.gm-appr-body { display: flex; gap: 18px; padding: 14px; align-items: flex-start; flex-wrap: wrap; }
.gm-appr-opinion { flex: 1; min-width: 220px; font-size: 14px; color: #334155; line-height: 1.7; white-space: pre-wrap; }
.gm-appr-sig { flex: 0 0 auto; }
.sig-img { max-width: 240px; max-height: 130px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }

/* 绩效面谈记录（线上字段） */
.iv-block { margin-top: 6px; }
.iv-form { display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; }
.iv-form .iv-row { display: flex; gap: 12px; flex-wrap: wrap; }
.iv-form .iv-row label { flex: 1; min-width: 140px; }
.iv-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #475569; font-weight: 600; }
.iv-form input, .iv-form textarea { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; color: #0f172a; }
.iv-form textarea { resize: vertical; line-height: 1.6; }
.iv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.iv-view { display: flex; flex-direction: column; gap: 8px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; }
.iv-item { display: flex; gap: 10px; font-size: 14px; line-height: 1.6; }
.iv-item .iv-k { flex: 0 0 92px; color: #64748b; }
.iv-item .iv-v { flex: 1; color: #0f172a; white-space: pre-wrap; word-break: break-word; }
.iv-empty { padding: 16px; text-align: center; color: #94a3b8; font-size: 14px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; }
.iv-emp-done { padding: 10px 12px; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; font-size: 13px; }
.sign-line { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; color: #475569; }
.sign-line .sign-img { max-width: 220px; max-height: 110px; }

/* ============ AI 智能体 / Token 计费层 ============ */
.token-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid #0e7490; background: #ecfeff; color: #0e7490; font-weight: 700; font-size: 13px; cursor: pointer; line-height: 1; }
.token-pill .tp-icon { font-size: 14px; }
.token-pill .tp-unit { font-size: 11px; font-weight: 500; opacity: .8; }
.token-pill.warn { border-color: #f59e0b; background: #fffbeb; color: #b45309; }
.token-pill.danger { border-color: #dc2626; background: #fef2f2; color: #dc2626; }
.token-pill:hover { filter: brightness(0.97); }

.lock-banner { padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 14px; line-height: 1.5; }
.lock-banner.warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.lock-banner.danger { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }

.ai-zone-banner { padding: 12px 14px; border-radius: 10px; background: linear-gradient(135deg, #eff6ff, #f0fdfa); border: 1px solid #bfdbfe; color: #1e3a5f; font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
.ai-zone-banner.warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }

.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 6px; }
.ai-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 3px rgba(15,23,42,.05); transition: .15s; }
.ai-card:hover { box-shadow: 0 6px 18px rgba(14,116,144,.14); border-color: #7dd3fc; transform: translateY(-2px); }
.ai-card-head { display: flex; align-items: center; gap: 12px; }
.ai-icon { font-size: 28px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 12px; }
.tier-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-top: 4px; }
.ai-card-desc { font-size: 13px; color: #475569; line-height: 1.6; flex: 1; }
.ai-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px dashed #e2e8f0; padding-top: 10px; }
.ai-cost { font-size: 12px; color: #0891b2; font-weight: 700; }

.cost-preview { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; line-height: 1.6; }
.cost-preview.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.ai-note { margin-top: 10px; padding: 8px 10px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; font-size: 12px; color: #64748b; line-height: 1.6; }
.ai-agent-desc { font-size: 14px; color: #334155; line-height: 1.6; margin: 0 0 6px; }
.ai-result { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.8; color: #0f172a; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; max-height: 50vh; overflow: auto; }

/* Token 结算后台 */
.billing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.billing-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.bal-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed #eef2f7; font-size: 14px; }
.bal-row:last-child { border-bottom: none; }
.bal-row span { color: #64748b; }
.bal-row b { font-size: 16px; color: #0f172a; }
.bal-row b.danger { color: #dc2626; }
.bal-row b.ok { color: #16a34a; }

.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.pkg-card { border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; text-align: center; background: #fff; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pkg-card.hot { border-color: #0e7490; box-shadow: 0 4px 14px rgba(14,116,144,.12); }
.pkg-name { font-weight: 700; font-size: 14px; color: #0f172a; }
.pkg-tokens { font-size: 13px; color: #0891b2; font-weight: 700; }
.pkg-price { font-size: 18px; font-weight: 800; color: #b45309; }
.pkg-card .btn { width: 100%; }

.day-row { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 5px 0; font-size: 12px; }
.day-label { color: #64748b; }
.day-row b { color: #0e7490; }

.ledger-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ledger-table th, .ledger-table td { padding: 8px 10px; border-bottom: 1px solid #eef2f7; text-align: left; }
.ledger-table th { background: #f8fafc; color: #475569; font-weight: 700; position: sticky; top: 0; }
.ledger-table tbody tr:hover { background: #f8fafc; }
.ledger-table td.led-sum { color: #64748b; max-width: 240px; }

/* 结算模式开关 */
.mode-switch { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.bal-row b.warn { color: #b45309; }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.danger { background: #fee2e2; color: #dc2626; }
.btn.xs { padding: 3px 10px; font-size: 12px; border-radius: 7px; }
.ledger-table td b { color: #0e7490; }

/* 移动端 Token / AI */
.token-m-bal { background: linear-gradient(135deg, #0e7490, #1e3a8a); color: #fff; border-radius: 14px; padding: 18px; text-align: center; margin-bottom: 14px; }
.token-m-bal.danger { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
.token-m-bal .tmb-label { font-size: 13px; opacity: .85; }
.token-m-bal .tmb-val { font-size: 30px; font-weight: 800; margin: 4px 0; }
.token-m-bal .tmb-val small { font-size: 14px; font-weight: 600; opacity: .8; }
.token-m-bal .tmb-sub { font-size: 12px; opacity: .9; }
.m-block { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.m-block-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: #0f172a; }
.led-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed #eef2f7; font-size: 13px; }
.led-row:last-child { border-bottom: none; }
.led-row small { color: #94a3b8; }
.led-cost { color: #dc2626; font-weight: 700; }

@media (max-width: 600px) {
  .gm-appr-body { flex-direction: column; }
  .sig-img { max-width: 100%; }
}

/* 人员管理导入 */
.import-summary { background: #f8fafc; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; font-size: 13px; }
.import-errors { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; font-size: 12px; color: #92400e; }
.import-errors ul { margin: 6px 0 0 18px; padding: 0; }
.import-errors li { margin-bottom: 4px; }

