/* ===== 工程检测项目·员工年度产出考核系统 ===== */
* { box-sizing: border-box; }
body { zoom: 1.05;  margin: 0; font: 13px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; background: #f2f4f7; color: #223; }

/* 顶部 */
.hdr { display: flex; align-items: center; gap: 18px; height: 56px; padding: 0 18px; background: #1d2b44; color: #fff; position: sticky; top: 0; z-index: 50; }
.hdr .brand { display: flex; align-items: center; gap: 10px; }
.hdr .logo { width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 6px; background: #2f6fed; font-weight: 700; }
.hdr .t1 { font-size: 14px; font-weight: 600; }
.hdr .t2 { font-size: 11px; opacity: .65; }
.hdr .nav { display: flex; gap: 2px; margin-left: 10px; flex: 1; }
.hdr .nav a { display: flex; align-items: center; gap: 5px; padding: 7px 14px; border-radius: 6px; color: #cfd8e8; text-decoration: none; font-size: 13px; }
.hdr .nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.hdr .nav a.on { background: #2f6fed; color: #fff; }
.hdr .nav a i { font-style: normal; opacity: .8; }
.hdr-right { display: flex; gap: 8px; align-items: center; }

/* 控件 */
.btn { height: 28px; padding: 0 12px; border: 1px solid #ccd3de; background: #fff; color: #334; border-radius: 5px; cursor: pointer; font-size: 12px; }
.btn:hover { border-color: #2f6fed; color: #2f6fed; }
.btn.primary { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.btn.primary:hover { background: #2560d8; color: #fff; }
.btn.danger { color: #c0392b; border-color: #e2b3ac; }
.btn.danger:hover { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn.sm { height: 24px; padding: 0 8px; font-size: 11px; }
.sel, .ipt { height: 28px; padding: 0 8px; border: 1px solid #ccd3de; border-radius: 5px; background: #fff; font-size: 12px; color: #223; max-width: 100%; }
.ipt:focus, .sel:focus { outline: none; border-color: #2f6fed; }
.ipt.mini { height: 24px; padding: 0 5px; font-size: 12px; width: 100%; }
.ipt.n, .ipt.mini.n { text-align: right; }
.w80 { width: 80px; } .w90 { width: 90px; } .w130 { width: 130px; }
.lbl { font-size: 12px; color: #667; }
.hint { font-size: 11px; color: #889; }
.note { margin-top: 10px; padding: 8px 12px; background: #f7f9fc; border-left: 3px solid #2f6fed; color: #556; font-size: 12px; }
.note b { color: #223; }

/* 布局 */
#view { padding: 14px; }
.card { background: #fff; border: 1px solid #e3e7ee; border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.card h3 .sub, .sub { font-size: 11px; font-weight: 400; color: #889; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .row2 { grid-template-columns: 1fr; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar .sep { width: 1px; height: 20px; background: #e0e4ea; margin: 0 2px; }
.inline { display: flex; gap: 8px; margin-bottom: 10px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: #fff; border: 1px solid #e3e7ee; border-radius: 8px; padding: 12px 14px; }
.kpi .kt { font-size: 12px; color: #778; }
.kpi .kv { font-size: 20px; font-weight: 700; margin: 2px 0; color: #1d2b44; }
.kpi .ks { font-size: 11px; color: #99a; }

/* 表格 */
.tbl-wrap { overflow: auto; max-height: 68vh; border: 1px solid #e6e9ef; border-radius: 6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { position: sticky; top: 0; background: #f4f6fa; padding: 7px 8px; text-align: left; font-weight: 600; color: #455; border-bottom: 1px solid #e0e4ea; white-space: nowrap; z-index: 2; }
.tbl td { padding: 5px 8px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.tbl tbody tr:hover { background: #fafbfe; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.b { font-weight: 700; color: #1d2b44; }
.tbl td.sub { color: #889; }
.tbl td.red, .red { color: #c0392b !important; font-weight: 600; }
.tbl td.ok { color: #27a35f; }
.tbl td.warn { color: #c07a12; }
.tbl td.cell { cursor: pointer; }
.tbl td.cell:hover { background: #eef4ff; }
.tbl td.empty, .empty { padding: 22px; text-align: center; color: #aab; }
.empty.big { padding: 44px; font-size: 13px; }
.tbl tr.sum td { background: #f7f9fc; font-weight: 600; border-top: 1px solid #dde2ea; }
.tbl tr.prow { cursor: pointer; }
.tbl .c-sel { width: 32px; text-align: center; }
.tbl .c-idx { width: 40px; color: #aab; text-align: center; }
.tbl.mini { font-size: 11px; }
.tbl.mini td { padding: 4px 6px; }
.tbl.kv td.k { width: 150px; font-weight: 600; color: #455; }
.tbl.kv td { padding: 6px 8px; }
.detail { padding: 6px 0 12px; }
.batch-fill { cursor: pointer; color: #2f6fed; font-size: 11px; padding: 0 2px; }
.batch-fill:hover { background: #2f6fed; color: #fff; border-radius: 3px; }
.ed { width: 100%; height: 24px; border: 1px solid #2f6fed; border-radius: 3px; padding: 0 4px; font-size: 12px; }

/* 标签 / 进度条 */
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; margin: 0 4px 4px 0; }
.tag-ok { background: #e6f6ec; color: #27a35f; }
.tag-warn, .tag-warning { background: #fdf3e0; color: #c07a12; }
.tag-err { background: #fdeae8; color: #c0392b; }
.checks { margin: 8px 0 12px; }
.ok-line { padding: 10px 12px; background: #e6f6ec; color: #27a35f; border-radius: 6px; }
.bar { height: 8px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #2f6fed, #5b8def); }
.lnk { color: #2f6fed; text-decoration: none; }
.lnk:hover { text-decoration: underline; }
.chk { display: inline-block; margin-right: 10px; font-size: 12px; color: #455; }

/* 统计条 */
.statbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; padding: 8px 12px; background: #f7f9fc; border-radius: 6px; }
.sbox { font-size: 12px; color: #667; }
.sbox b { color: #1d2b44; font-size: 13px; }

/* 提示 */
#toastBox { position: fixed; right: 18px; bottom: 18px; z-index: 999; }
.toast { min-width: 160px; padding: 9px 14px; margin-top: 8px; border-radius: 6px; background: #1d2b44; color: #fff; font-size: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.toast-err { background: #c0392b; }
.modal-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 900; display: flex; align-items: center; justify-content: center; }
.modal { width: 620px; max-width: 92vw; background: #fff; border-radius: 8px; padding: 18px; }
.modal h3 { margin: 0 0 8px; font-size: 15px; }
.modal .tip { font-size: 12px; color: #778; margin: 0 0 10px; }
.paste-area { width: 100%; border: 1px solid #ccd3de; border-radius: 5px; padding: 8px; font: 12px/1.6 monospace; }
.modal-btns { margin-top: 12px; text-align: right; }
.modal-btns .btn { margin-left: 8px; }
.fld { margin-bottom: 10px; }
.fld label { display: block; font-size: 12px; color: #667; margin-bottom: 3px; }
.fld .ipt { width: 100%; }

/* 登录 */
.login-mask { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1d2b44, #2f6fed); }
.login { width: 360px; background: #fff; border-radius: 10px; padding: 30px 28px; text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.lg-logo { width: 48px; height: 48px; line-height: 48px; margin: 0 auto 12px; border-radius: 10px; background: #2f6fed; color: #fff; font-weight: 700; font-size: 20px; }
.login h2 { margin: 0 0 4px; font-size: 17px; }
.lg-sub { color: #889; font-size: 12px; margin: 0 0 20px; }
.ipt.lg { width: 100%; height: 36px; margin-bottom: 10px; font-size: 13px; }
.btn.lg { width: 100%; height: 36px; font-size: 14px; }
.lg-tip { margin-top: 16px; font-size: 11px; color: #99a; line-height: 1.7; }
.lg-err { display: none; margin: 8px 0 0; padding: 7px 10px; border-radius: 6px;
  background: #fdecea; color: #c0392b; font-size: 12px; line-height: 1.6; text-align: left; }
.lg-err.on { display: block; }
.lg-warn { margin: 0 0 12px; padding: 7px 10px; border-radius: 6px;
  background: #fdf3e0; color: #a8700c; font-size: 11px; line-height: 1.7; text-align: left; }
.lg-ok { margin: 0 0 12px; padding: 7px 10px; border-radius: 6px;
  background: #e6f6ec; color: #1e7a45; font-size: 11px; line-height: 1.7; text-align: left; }

/* 头部数据来源标识 */
.chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; cursor: default; }
.chip-ok { background: rgba(255,255,255,.16); color: #eaf6ff; border: 1px solid rgba(255,255,255,.25); }
.chip-warn { background: rgba(253,243,224,.9); color: #8a5a08; border: 1px solid rgba(255,255,255,.25); }

/* 与服务器断开提示条 */
#offlineBar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
  background: #c0392b; color: #fff; font-size: 12px; text-align: center; padding: 6px 10px; }

/* 读不到服务器数据的提示条（避免"库里有、页面空"被误以为数据丢了） */
#loadErrBar { position: fixed; left: 0; right: 0; top: 0; z-index: 9999; display: none;
  background: #c0392b; color: #fff; font-size: 12px; padding: 8px 12px;
  display: flex; align-items: center; justify-content: center; gap: 10px; }
#loadErrBar .btn { background: #fff; color: #c0392b; border: 0; }
.lg-foot { margin-top: 12px; font-size: 11px; color: #99a; }
.lg-foot a { color: #2f6fed; }
.login.shake { animation: lgshake .4s; }
@keyframes lgshake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }

/* 致命错误提示（避免"点了没反应"） */
.fatal { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 99999;
  background: #fdecea; border: 1px solid #f5c2bd; color: #a5281a; border-radius: 8px;
  padding: 12px 14px; font-size: 13px; line-height: 1.7; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.fatal .fd { font-size: 11px; color: #8a4b41; margin-top: 4px; word-break: break-all; }
.fatal .fb { margin-top: 8px; }
.fatal .fb button { margin-right: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer;
  border: 1px solid #d99a93; background: #fff; color: #a5281a; border-radius: 5px; }
.fatal .fb button:hover { background: #fbdedb; }

/* 用户 / 权限提示 */
.perm { margin-left: auto; font-size: 11px; color: #889; }

/* 右上角用户下拉菜单 */
.umenu-wrap { position: relative; }
.ubtn { display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff;
  border-radius: 6px; padding: 3px 8px; cursor: pointer; line-height: 1.25; }
.ubtn:hover { background: rgba(255, 255, 255, .2); }
.ubtn b { font-size: 12px; font-weight: 600; }
.ubtn i { font-style: normal; font-size: 10px; opacity: .7; }
.ubtn .caret { position: absolute; right: -11px; top: 50%; transform: translateY(-50%); font-size: 9px; opacity: .6; }
.umenu { display: none; position: absolute; right: 0; top: 100%; margin-top: 6px; z-index: 60;
  min-width: 190px; background: #fff; border: 1px solid #e2e6ee; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 30, 50, .18); padding: 5px 0; }
.umenu.open { display: block; }
.umenu a { display: block; padding: 7px 14px; font-size: 13px; color: #33425c; text-decoration: none; }
.umenu a:hover { background: #f2f6fd; }
.umenu a.danger { color: #c0392b; }
.umenu a.danger:hover { background: #fdecea; }
.umenu .um-sep { height: 1px; background: #eef1f6; margin: 5px 0; }
.umenu .um-h { padding: 8px 14px 6px; font-size: 13px; font-weight: 600; color: #1d2b44; border-bottom: 1px solid #eef1f6; margin-bottom: 4px; }
.umenu .um-h span { display: block; font-weight: 400; font-size: 11px; color: #889; margin-top: 2px; }

/* 操作指引 */
.g-hl { position: relative; z-index: 10002; outline: 2px solid #2f6fed; outline-offset: 2px; border-radius: 4px; background: #fff; }
.g-tip { position: absolute; z-index: 10003; background: #fff; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 30, 50, .25); border: 1px solid #e2e6ee; overflow: hidden; }
.g-tip .g-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f4f7fd; border-bottom: 1px solid #e6ebf4; }
.g-tip .g-badge { font-size: 12px; font-weight: 600; color: #2f6fed; }
.g-tip .g-step { font-size: 11px; color: #889; }
.g-tip .g-x { margin-left: auto; cursor: pointer; color: #99a; font-size: 13px; }
.g-tip .g-x:hover { color: #c0392b; }
.g-tip .g-b { padding: 10px 12px; }
.g-tip .g-b b { display: block; font-size: 13px; color: #1d2b44; margin-bottom: 4px; }
.g-tip .g-b p { margin: 0; font-size: 12px; line-height: 1.7; color: #55606f; }
.g-tip .g-f { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid #eef1f6; background: #fbfcfe; }
.g-tip .g-f .g-never { font-size: 11px; color: #99a; margin-right: auto; cursor: pointer; }
.g-tip .g-f .g-never:hover { color: #667; }

/* 多选弹窗 */
.ms-list { max-height: 46vh; overflow: auto; padding: 6px 2px; border: 1px solid #eef1f6; border-radius: 6px; }
.ms-item { display: block; margin: 0 0 2px; padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.ms-item:hover { background: #f4f7fd; }
.tbl td.ro { cursor: default; background: #fafbfc; }
.tbl td.ro:hover { background: #fafbfc; }
