/* 云梯 · 设计系统：iOS 原生感 × 品牌靛蓝 · 低占用纯 CSS */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --accent: #3b5bdb;          /* 品牌靛蓝 */
  --accent-soft: #eef1fd;     /* 靛蓝浅底 */
  --bg: #f5f5f7;              /* iOS 系统灰底 */
  --card: #ffffff;
  --card2: #f9f9fb;           /* 卡内次级面 */
  --ink: #1c1c1e;             /* 正文墨色 */
  --ink2: #3a3a3c;
  --text2: #6c6c70;           /* 辅助文字 */
  --line: #e8e8ed;            /* hairline */
  --green: #34c759; --yellow: #ffcc00; --orange: #ff9f0a; --red: #ff3b30;
  --green-bg: #e7f8ec; --yellow-bg: #fff8e1; --orange-bg: #fff3e4; --red-bg: #ffedec; --blue-bg: var(--accent-soft);
  --r-card: 12px; --r-btn: 10px;
  --shadow-float: 0 12px 32px rgba(28, 28, 30, .12);
}
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
input, textarea { caret-color: var(--accent); }
::selection { background: var(--accent); color: #fff; }
a { color: var(--accent); }

/* ===== 布局 ===== */
.page { max-width: 720px; margin: 0 auto; padding-bottom: 84px; min-height: 100vh; }
.page-inner { padding: 14px 14px 20px; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(251,251,253,.94); color: var(--ink); padding: 13px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.topbar .back { background: none; border: none; color: var(--accent); cursor: pointer; padding: 2px 6px; display: inline-flex; }
.topbar .title { font-size: 17px; font-weight: 600; flex: 1; letter-spacing: -.01em; }
.topbar .sub { font-size: 12px; color: var(--text2); }
.topbar .badge { flex: none; }

/* ===== 卡片（iOS 分组插入式） ===== */
.card { background: var(--card); border-radius: var(--r-card); padding: 16px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; letter-spacing: -.01em; }
.card-title .tag { font-weight: 400; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: var(--r-btn); padding: 10px 16px; font-size: 14px; font-weight: 500; cursor: pointer; background: var(--accent); color: #fff; text-align: center; transition: transform .08s ease, opacity .08s ease; }
.btn:active { transform: scale(.97); opacity: .88; }
.btn.block { display: flex; width: 100%; padding: 13px; font-size: 15px; }
.btn.gray { background: var(--accent-soft); color: var(--accent); }
.btn.green { background: var(--green); }
.btn.red { background: var(--red); }
.btn.orange { background: var(--orange); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .5; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 90px; }

/* ===== 表单 ===== */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--text2); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 10px 12px; background: var(--card2); outline: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(59,91,219,.5); background: #fff; box-shadow: 0 0 0 4px rgba(59,91,219,.10); }
.field textarea { min-height: 64px; resize: vertical; }
.field-row { display: flex; gap: 8px; }
.field-row .field { flex: 1; }

/* ===== 徽标（iOS 语义色软底胶囊） ===== */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.badge.published { background: var(--blue-bg); color: var(--accent); }
.badge.completed { background: var(--yellow-bg); color: #8a6d00; }
.badge.archived { background: #ececf0; color: var(--text2); }
.badge.draft { background: #ececf0; color: var(--text2); }
.badge.pending { background: var(--yellow-bg); color: #8a6d00; }
.badge.approved { background: var(--green-bg); color: #1f8a3d; }
.badge.rejected { background: var(--red-bg); color: #c92a20; }
.badge.error { background: var(--red-bg); color: #c92a20; }
.badge.reward { background: var(--green-bg); color: #1f8a3d; }
.badge.penalty { background: var(--orange-bg); color: #b25000; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: var(--accent-soft); color: var(--accent); margin-right: 4px; }
.tag.yellow { background: var(--yellow-bg); color: #8a6d00; }

/* ===== 预警灯 ===== */
.light { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.light::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: .35; }
.light.green { color: #1f8a3d; } .light.yellow { color: #b58900; } .light.red { color: #c92a20; }

/* ===== 列表项 ===== */
.list-item { background: var(--card); border-radius: var(--r-card); padding: 13px 14px; margin-bottom: 10px; }
.list-item .li-title { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.list-item .li-sub { color: var(--text2); font-size: 12px; margin-top: 4px; }
.list-item .li-actions { margin-top: 9px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 任务填写条目 ===== */
.fill-item { background: var(--card); border-radius: var(--r-card); padding: 13px; margin-bottom: 10px; }
.fill-item.done { background: var(--card); }
.fill-item.done .fi-item-name::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-left: 7px; vertical-align: 2px; }
.fill-item .fi-head { font-size: 12px; margin-bottom: 6px; color: var(--text2); }
.fill-item .fi-item-name { font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.fill-item .fi-std { color: var(--ink2); font-size: 12px; white-space: pre-wrap; background: var(--card2); border-radius: 8px; padding: 9px 10px; margin-bottom: 9px; max-height: 120px; overflow: auto; }
.fill-item textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 9px 10px; min-height: 52px; background: var(--card2); }
.fill-item input[type=text], .fill-item input[type=date], .fill-item select { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 8px 9px; background: var(--card2); width: 100%; }
.fill-item textarea:focus, .fill-item input:focus, .fill-item select:focus { border-color: rgba(59,91,219,.5); background: #fff; outline: none; }
.fill-item .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.fill-item .mini-label { font-size: 11px; color: var(--text2); margin-bottom: 3px; }
.fill-item .updated-by { font-size: 11px; color: #aeaeb2; margin-top: 7px; text-align: right; }

/* ===== 单选组 ===== */
.radio-group { display: flex; gap: 8px; }
.radio-group .rg { flex: 1; text-align: center; padding: 9px 4px; border-radius: var(--r-btn); font-size: 13px; cursor: pointer; background: var(--card2); color: var(--ink2); transition: all .12s; }
.radio-group .rg.on { background: var(--accent); color: #fff; font-weight: 500; }
.radio-group .rg.on-red { background: var(--red); color: #fff; font-weight: 500; }

/* ===== 底部导航（iOS 风） ===== */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: rgba(251,251,253,.96); border-top: 1px solid var(--line); display: flex; max-width: 720px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.tabbar .tab { flex: 1; text-align: center; padding: 7px 0 6px; color: var(--text2); font-size: 10.5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tabbar .tab svg { width: 23px; height: 23px; }
.tabbar .tab.on { color: var(--accent); font-weight: 600; }
.tabbar .tab .dot { position: absolute; margin-left: 22px; margin-top: -3px; min-width: 16px; height: 16px; line-height: 16px; background: var(--red); color: #fff; border-radius: 8px; font-size: 10px; padding: 0 4px; }

/* ===== 首页 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.stat-card { background: var(--card); border-radius: var(--r-card); padding: 13px 6px; text-align: center; }
.stat-card .num { font-size: 21px; font-weight: 700; color: var(--accent); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-card .num.red { color: var(--red); } .stat-card .num.green { color: #1f8a3d; } .stat-card .num.yellow { color: #b58900; }
.stat-card .lbl { font-size: 11px; color: var(--text2); margin-top: 3px; }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.menu-item { background: var(--card2); border: 0; font: inherit; color: inherit; width: 100%; border-radius: var(--r-card); padding: 15px 4px; text-align: center; cursor: pointer; transition: transform .08s ease; }
.menu-item:active { transform: scale(.96); }
.menu-item .ico { color: var(--accent); display: flex; justify-content: center; }
.menu-item .lbl { font-size: 12px; margin-top: 7px; color: var(--ink); }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--r-card); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 12px; }
table.tbl th, table.tbl td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; white-space: pre-wrap; }
table.tbl th { background: var(--card2); font-weight: 600; position: sticky; top: 0; }
table.tbl td input, table.tbl td textarea, table.tbl td select { width: 100%; border: 1px solid transparent; background: transparent; min-width: 70px; font-size: 12px; }
table.tbl td input:focus, table.tbl td textarea:focus { border-color: var(--accent); background: #fff; outline: none; border-radius: 4px; }
table.tbl td textarea { min-height: 40px; }

/* ===== Toast ===== */
.toast { position: fixed; top: 44%; left: 50%; transform: translate(-50%,-50%); background: rgba(28,28,30,.88); color: #fff; padding: 11px 20px; border-radius: 12px; z-index: 100; font-size: 14px; max-width: 80%; text-align: center; animation: toastIn .18s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%,-46%); } to { opacity: 1; transform: translate(-50%,-50%); } }

/* ===== 弹层（移动底部抽屉 / PC 居中） ===== */
.mask { position: fixed; inset: 0; background: rgba(28,28,30,.4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.mask .sheet { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 720px; max-height: 82vh; overflow: auto; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
.mask .sheet::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 2px; background: #d8d8de; margin: 0 auto 14px; }
.mask .sheet.center { border-radius: 16px; margin: 0 20px; align-self: center; max-height: 86vh; }
.mask .sheet.center::before { display: none; }
.sheet-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

/* ===== 分段控件（iOS SegmentedControl） ===== */
.seg { display: flex; background: #e9e9ee; border-radius: 10px; padding: 2px; margin-bottom: 12px; }
.seg .seg-item { flex: 1; text-align: center; padding: 7px 2px; font-size: 13px; border-radius: 8px; cursor: pointer; color: var(--ink2); transition: all .15s; }
.seg .seg-item.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(28,28,30,.10); }

.empty { text-align: center; color: #aeaeb2; padding: 40px 0; font-size: 13px; }
.section-gap { height: 6px; }
.chart-box { background: #fff; border-radius: var(--r-card); padding: 14px; margin-bottom: 12px; position: relative; display: flex; flex-direction: column; }
.chart-box .chart-body { flex: 1; display: flex; align-items: center; justify-content: center; }
.chart-box .chart-body svg { display: block; width: 100%; max-width: 520px; }
.chart-box .cb-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; position: relative; }
.chart-box .cb-title > .cb-head { flex: 1; min-width: 0; }
.chart-box .cb-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.chart-box .cb-head b { font-weight: 600; font-size: 13.5px; color: var(--ink); letter-spacing: -.01em; }
.chart-box .cb-head em { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--text2); }
.hint-ico { color: var(--text2); cursor: pointer; display: inline-flex; flex: none; padding: 2px; border-radius: 50%; transition: color .15s, background .15s; }
.hint-ico:hover { color: var(--accent); background: var(--accent-soft); }
.hint-bubble { margin: -2px 0 10px; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.95; font-weight: 400; color: var(--text2); }
.seg-mini { display: inline-flex; background: #eeeef2; border-radius: 7px; padding: 2px; flex: none; }
.seg-mini a { font-size: 11.5px; line-height: 1; padding: 4px 9px; border-radius: 5px; color: var(--text2); cursor: pointer; font-weight: 500; }
.seg-mini a.on { background: #fff; color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cb-back { font-size: 12px; color: var(--accent); cursor: pointer; flex: none; font-weight: 500; }
.hint-bubble b { color: var(--ink); font-weight: 600; }
.hint-bubble sub, .hint-bubble sup { font-size: 9px; line-height: 0; }
.mut { color: var(--text2); font-size: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ PC 横屏桌面布局（≥1024px） ============ */
@media (min-width: 1024px) {
  body { background: #f5f5f7; }
  /* 侧边栏：macOS 风浅色 */
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 216px; background: #fbfbfd; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; }
  .sidebar .sb-brand { padding: 20px 18px 14px; color: var(--accent); font-size: 19px; font-weight: 700; letter-spacing: 2px; }
  .sidebar .sb-brand .sub { font-size: 11px; color: var(--text2); font-weight: 400; margin-top: 3px; letter-spacing: 0; }
  .sidebar .sb-user { padding: 11px 14px; margin: 0 10px; border-radius: 10px; background: var(--card2); font-size: 13px; }
  .sidebar .sb-user .nm { color: var(--ink); font-weight: 600; font-size: 13.5px; }
  .sidebar .sb-user .rl { color: var(--text2); font-size: 11px; margin-top: 2px; }
  .sidebar .sb-menu { flex: 1; overflow-y: auto; padding: 12px 10px; }
  .sidebar .sb-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 2px; font-size: 13.5px; cursor: pointer; color: var(--ink2); border-radius: 8px; }
  .sidebar .sb-item:hover { background: #f0f0f4; }
  .sidebar .sb-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  .sidebar .sb-item .ico { display: inline-flex; }
  .sidebar .sb-item .dot { margin-left: auto; min-width: 17px; height: 17px; line-height: 17px; background: var(--red); color: #fff; border-radius: 9px; font-size: 10px; text-align: center; padding: 0 4px; }
  .sidebar .sb-foot { padding: 10px 16px; font-size: 11px; color: var(--text2); border-top: 1px solid var(--line); }
  .sidebar .sb-foot .on { color: #1f8a3d; }
  .sidebar .sb-actions { display: flex; gap: 6px; padding: 8px 10px 6px; }
  .sidebar .sb-act { flex: 1; padding: 7px 0; border: 0; border-radius: 8px; background: var(--card2); color: var(--ink2); font-size: 12.5px; font-family: inherit; cursor: pointer; }
  .sidebar .sb-act:hover { background: #ececf1; color: var(--accent); }
  /* PC 端由侧栏承载的操作，页内不再重复显示 */
  .pc-hide { display: none !important; }
  .page { max-width: none; margin: 0 0 0 216px; padding-bottom: 24px; min-height: 100vh; }
  .page-inner { padding: 16px 20px; max-width: 1460px; margin: 0 auto; }
  .tabbar { display: none; }
  .card { border-radius: 12px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .stat-grid.wide8 { grid-template-columns: repeat(8, 1fr); }
  .menu-grid { grid-template-columns: repeat(8, 1fr); gap: 10px; }
  .menu-item { padding: 18px 4px; }
  .pc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; margin-bottom: 14px; }
  .pc-cols-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: stretch; margin-bottom: 14px; }
  .pc-cols > .card, .pc-cols > .chart-box, .pc-cols-3 > .card, .pc-cols-3 > .chart-box { margin-bottom: 0; height: 100%; }
  .chart-box svg { display: block; }
  /* 可编辑表格：iOS 风横线表 */
  .table-wrap { border-radius: 12px; }
  table.edit-tbl { border-collapse: collapse; width: 100%; font-size: 12.5px; background: #fff; }
  table.edit-tbl th, table.edit-tbl td { border: none; border-bottom: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
  table.edit-tbl th { background: var(--card2); font-weight: 600; white-space: nowrap; border-bottom: 1px solid #dedee4; }
  table.edit-tbl td input[type=text], table.edit-tbl td input[type=date], table.edit-tbl td input[type=number], table.edit-tbl td select { width: 100%; border: 1px solid transparent; background: transparent; font-size: 12.5px; padding: 3px 4px; border-radius: 6px; }
  table.edit-tbl td textarea { width: 100%; border: 1px solid transparent; background: transparent; font-size: 12.5px; min-height: 40px; padding: 3px 4px; resize: vertical; border-radius: 6px; }
  table.edit-tbl td input:focus, table.edit-tbl td textarea:focus, table.edit-tbl td select:focus { border-color: rgba(59,91,219,.5); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(59,91,219,.10); }
  table.edit-tbl tr.fresh td { background: #fffbe8; }
  table.edit-tbl td.ro { color: var(--ink2); background: var(--card2); white-space: pre-wrap; }
  table.edit-tbl td.ro.item-name { color: var(--ink); font-weight: 600; background: #fff; }
  .grp-row td { background: var(--accent-soft) !important; font-weight: 600; color: var(--accent); }
  /* 弹层居中 */
  .mask { align-items: center; }
  .mask .sheet { border-radius: 16px; margin: 0 auto; width: 560px; max-height: 84vh; box-shadow: var(--shadow-float); padding-top: 18px; }
  .mask .sheet::before { display: none; }
  /* 基础数据：左 tab 右内容 */
  .forms-pc { display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: start; }
  .forms-pc .seg { flex-direction: column; background: #fff; border-radius: 10px; padding: 4px; }
  .forms-pc .seg .seg-item { text-align: left; padding: 9px 12px; flex: none; }
  .btn-row .btn { flex: none; min-width: 110px; }
}

/* 品牌字标：书法字体（马善政楷书，子集仅含「云梯」二字，1.4KB） */
@font-face {
  font-family: 'YunTi';
  src: url('/assets/fonts/yunti-kai.woff2') format('woff2');
  font-display: swap;
}
.brand-font { font-family: 'YunTi', 'STKaiti', 'KaiTi', serif; font-weight: 400; }


.topbar .title.brand-font { font-size: 25px; letter-spacing: 3px; padding-left: 3px; line-height: 1.15; }
.sidebar .sb-brand.brand-font { font-size: 26px; letter-spacing: 4px; padding-left: 22px; color: var(--accent); }

/* ============ 「云梯」登录页：云海动态背景 ============ */
.page.login-page {
  position: relative; margin: 0 !important; max-width: none !important; padding: 0 !important;
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
  background: #dfe9f8;
}
.lx-media { position: fixed; top: -6%; left: -6%; width: 112%; height: 112%; object-fit: cover; pointer-events: none;
  animation: lxDrift 46s ease-in-out infinite alternate; }
.lx-scrim { position: fixed; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(240,246,255,.30), rgba(233,240,253,.52)); }
@keyframes lxDrift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-2.2%, -2.6%, 0) scale(1.045); } }
@media (prefers-reduced-motion: reduce) { .lx-media { animation: none; top: 0; left: 0; width: 100%; height: 100%; } }
/* 品牌 + 卡片 */
.lx-wrap { position: relative; z-index: 2; width: 392px; max-width: calc(100vw - 40px); padding: 28px 0; margin: auto; }
.lx-brand { text-align: center; margin-bottom: 24px; }

.lx-logo { font-family: 'YunTi', 'STKaiti', 'KaiTi', serif; font-size: 78px; font-weight: 400; letter-spacing: 6px; padding-left: 6px; line-height: 1.15; color: #fff; text-shadow: 0 2px 20px rgba(38, 60, 120, .40); }
.lx-en { margin-top: 10px; font-size: 11px; letter-spacing: 5px; padding-left: 5px; color: rgba(255,255,255,.92); font-weight: 500; }
.lx-card { background: rgba(255,255,255,.94); border-radius: 16px; padding: 30px 30px 24px;
  box-shadow: 0 24px 60px rgba(38, 60, 120, .22), 0 2px 8px rgba(38, 60, 120, .08); }
.lx-title { font-size: 19px; font-weight: 600; letter-spacing: 4px; color: #22305b; margin-bottom: 22px; text-align: center; }
.lx-card .field label { color: #556084; font-size: 12.5px; letter-spacing: 1px; }
.lx-card .field input { background: #f3f6fc; border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; transition: all .2s; color: #22305b; }
.lx-card .field input::placeholder { color: #98a4c0; }
.lx-card .field input:focus { background: #fff; border-color: rgba(59,91,219,.5); box-shadow: 0 0 0 4px rgba(59,91,219,.10); outline: none; }
.lx-card .btn.block { border-radius: 12px; }
.lx-reg { margin-top: 16px; text-align: center; font-size: 12.5px; color: #6a7694; }
.lx-reg a { color: var(--accent); cursor: pointer; text-decoration: none; }
/* 绩效处理历史：可收起的标题 + 行样式 */
.hist-head { display: flex; align-items: center; cursor: pointer; user-select: none; }
.hist-count { margin-left: auto; font-weight: 400; font-size: 12px; }
.hist-caret { width: 0; height: 0; margin-left: 8px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #98a4c0; transition: transform .2s; }
.hist-caret.up { transform: rotate(180deg); }
.hist-row { padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
.hist-row:last-child { border-bottom: 0; }
/* 绩效常用模板 */
.mode-seg { display: inline-flex; background: #f0f2f7; border-radius: 10px; padding: 3px; margin: -2px 0 10px; }
.mode-seg button { border: 0; background: none; font-family: inherit; font-size: 12.5px; color: var(--ink2); padding: 5px 14px; border-radius: 8px; cursor: pointer; }
.mode-seg button.on { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(38,60,120,.12); }
.tpl-pick { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.tpl-pick select { flex: 1; min-width: 0; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 10px; font-family: inherit; font-size: 13.5px; color: var(--ink); }
.tpl-fill { background: #f6f8fd; border: 1px solid #e3e9f5; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 2.2; color: #22305b; margin-bottom: 12px; }
.tpl-in { display: inline-block; border: 0; border-bottom: 1px solid #b9c6e2; background: #fff; border-radius: 6px; padding: 2px 8px; font: inherit; font-size: 13.5px; color: #22305b; text-align: center; vertical-align: baseline; }
.tpl-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,91,219,.10); }
.tpl-in.k-date { width: 68px; }
.tpl-in.k-name { width: 82px; }
.tpl-in.k-time { width: 88px; }
.tpl-in.k-blank { width: 128px; }
@media (max-width: 480px) {
  .tpl-fill { font-size: 13.5px; line-height: 2.1; padding: 10px 12px; }
  .tpl-in { font-size: 13px; }
  .tpl-in.k-date { width: 62px; }
  .tpl-in.k-name { width: 72px; }
  .tpl-in.k-time { width: 80px; }
  .tpl-in.k-blank { width: 104px; }
}
.rules-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.rule-row { padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 13px; }
.rule-cat { font-size: 11px; color: #8a8f99; letter-spacing: .5px; }
.rule-reward { color: #1f8a3d; margin-top: 2px; white-space: pre-wrap; }
.rule-row .mut { white-space: pre-wrap; }
.tpl-mgr-row { padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
/* 电子检查单 · 最近提交 */
.recent-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.recent-row.linked { cursor: pointer; border-radius: 8px; padding: 8px 8px; margin: 0 -8px; }
.recent-row.linked:hover { background: #f5f7fc; }
/* 从最近提交跳转过来时，高亮对应条目 */
.focus-flash { background: #e8efff !important; box-shadow: inset 3px 0 0 var(--accent); transition: background .6s ease, box-shadow .6s ease; }
/* 表格行的高亮要落到单元格上才看得见 */
table.edit-tbl tr.focus-flash td, tr.focus-flash td { background: #e8efff !important; }
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 44px !important; }
.pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; padding: 8px; border-radius: 8px; color: #98a4c0; cursor: pointer; }
.pwd-eye:hover { color: var(--accent); }
/* 登录失败原因 */
.login-err { background: #fdecec; color: #c92a2a; border: 1px solid #fbdede; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; margin-bottom: 10px; }
/* 「确认您是真人」勾选 */
.cv-box { display: flex; align-items: center; gap: 10px; border: 1px solid #dfe3ee; background: #fafbfe; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; user-select: none; transition: border-color .2s, background .2s; }
.cv-box:hover { border-color: #c8d2e6; }
.cv-box.loading { cursor: progress; }
.cv-box.done { border-color: #9ad3a8; background: #f3fbf5; }
.cv-check { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cv-sq { width: 20px; height: 20px; border: 2px solid #c3cada; border-radius: 4px; }
.cv-spin { width: 20px; height: 20px; border: 2px solid #c3cada; border-top-color: var(--accent); border-radius: 50%; animation: cvspin .7s linear infinite; }
@keyframes cvspin { to { transform: rotate(360deg); } }
.cv-ok { color: #1f8a3d; display: inline-flex; }
.cv-text { display: flex; flex-direction: column; line-height: 1.25; }
.cv-label { font-size: 13.5px; color: #22305b; }
.cv-sub { font-size: 10px; letter-spacing: 1.4px; color: #98a4c0; margin-top: 2px; }
.cv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cv-err { color: #c92a2a; font-size: 12px; margin: -4px 0 10px; }
@media (max-width: 640px) {
  .lx-logo { font-size: 58px; }
  .lx-card { padding: 26px 22px 20px; }
}

/* ===== 电子检查单：行填写进度 / 只读上下文 / 必填标记 ===== */
.fill-meter { background: var(--card2); border: 1px solid var(--line); border-radius: var(--r-btn); padding: 10px 12px; margin: -2px 0 12px; }
.fm-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--text2); }
.fm-head b { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.fm-head b.ok { color: #1f8a3d; }
.fm-bar { height: 6px; border-radius: 999px; background: #e9ecf3; margin: 7px 0 0; overflow: hidden; }
.fm-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .25s ease; }
.fm-miss { font-size: 12px; color: #b25000; margin-top: 7px; line-height: 1.9; }
.fm-miss.ok { color: #1f8a3d; }
.chip-miss { display: inline-block; padding: 1px 7px; margin: 0 5px 3px 0; border-radius: 999px; background: var(--orange-bg); color: #b25000; font-size: 11.5px; }
.ctx-box { border: 1px dashed #dfe3ee; border-radius: var(--r-btn); padding: 9px 12px; margin-bottom: 12px; background: #fcfcfe; }
.ctx-row { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.7; }
.ctx-k { flex: none; width: 62px; color: var(--text2); }
.ctx-v { color: var(--ink); white-space: normal; word-break: break-word; }
.ctx-v.pre { white-space: pre-wrap; line-height: 1.6; }
.col-tag { font-size: 10.5px; color: #a3a9b8; border: 1px solid #e6e8ef; border-radius: 5px; padding: 0 5px; margin-left: 6px; }
.req-tag { font-size: 10.5px; color: #c92a20; background: var(--red-bg); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.miss-tag { font-size: 10.5px; color: #fff; background: var(--orange); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.field.has-miss input, .field.has-miss textarea, .field.has-miss select { border-color: #f0c48a; background: #fffaf3; }
/* 自动判定的差错性质 */
.auto-judge { border: 1px solid var(--line); background: var(--card2); border-radius: var(--r-btn); padding: 10px 12px; }
.auto-judge b { font-size: 13.5px; color: var(--accent); }
.auto-judge b.pending { color: #b25000; }
.aj-why { display: block; margin-top: 3px; font-size: 12px; color: var(--text2); line-height: 1.6; }
/* 红线勾选项 */
.ck-row { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card2); border-radius: var(--r-btn); padding: 9px 14px; cursor: pointer; font-size: 13px; color: var(--ink); }
.ck-row input { width: 16px; height: 16px; accent-color: var(--red); margin: 0; }
.ck-row.on { border-color: #f0b7b2; background: var(--red-bg); color: #c92a20; font-weight: 600; }
/* 差错环节复核 */
.seg-review-bar { margin-top:10px; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:9px 12px; border:1px dashed #c9d3ee; background: #f6f8ff; border-radius: var(--r-btn); font-size:12.5px; color:#22305b; cursor:pointer; }
.seg-review-bar b { color: var(--accent); font-variant-numeric: tabular-nums; }
.review-row { padding:10px 0; border-bottom:1px solid #f0f2f5; }
.rr-text { font-size:13px; line-height:1.55; color: var(--ink); word-break:break-word; }
.rr-meta { display:flex; justify-content:space-between; gap:10px; font-size:12px; color: var(--text2); margin-top:4px; }
.rr-ops { display:flex; gap:8px; align-items:center; margin-top:7px; }
.rr-ops select { flex:1; min-width:0; border:1px solid var(--line); border-radius:8px; padding:7px 9px; background: var(--card2); }

/* 预警名单：可展开 + 一行近况 */
.warn-row { display:flex; align-items:center; gap:8px; padding:9px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.warn-row:last-child { border-bottom:none; }
.warn-name { display:block; font-size:13.5px; color: var(--ink); }
.warn-red { display:inline-block; margin-left:6px; padding:0 6px; border-radius:5px; background: var(--red-bg); color:#c92a20; font-size:10.5px; line-height:16px; vertical-align:1px; }
.warn-note { display:block; font-size:11.5px; color: var(--text2); margin-top:2px; line-height:1.45; }
.warn-note.t-up { color:#c92a20; }
.warn-note.t-down { color:#1f8a3d; }
.warn-scroll { max-height:320px; overflow:auto; }
.warn-more { display:flex; align-items:center; justify-content:center; gap:4px; padding:9px 0 2px; font-size:12.5px; color: var(--accent); cursor:pointer; }

/* 薄弱人员卡片：元信息、复测提示、销项条件 */
.weak-meta { display:flex; flex-wrap:wrap; gap:4px 10px; margin-top:5px; font-size:12px; color: var(--text2); }
.weak-meta span { position:relative; }
.weak-meta span + span::before { content:'·'; margin-right:8px; color:#c8ccd6; }
.weak-tip { margin-top:5px; font-size:12px; line-height:1.6; color:#b25000; }
.weak-close { margin-top:8px; font-size:12px; color: var(--text2); }
.weak-close.ok { color:#1f8a3d; font-weight:500; }
.weak-readonly { padding:10px 12px; border:1px solid var(--line); border-radius: var(--r-btn); background:#f2f3f6; color: var(--ink); font-size:13px; }

/* 通用输入控件（不放在 .field 里的行内控件用它，保证和表单控件同一套视觉） */
.ctl { width:100%; border:1px solid var(--line); border-radius: var(--r-btn); padding:9px 12px; background: var(--card2); color: var(--ink); font: inherit; outline:none; transition: border-color .15s, box-shadow .15s, background .15s; }
.ctl:focus { border-color: rgba(59,91,219,.5); background:#fff; box-shadow: 0 0 0 4px rgba(59,91,219,.10); }
.ctl.auto { width:auto; }
.ctl.sm { padding:6px 10px; font-size:12.5px; border-radius:8px; }
.ctl.xs { padding:5px 8px; font-size:12.5px; border-radius:8px; }

/* 可展开卡片头（薄弱人员·安全红线规则等）：与「最近提交」等折叠区保持同一套视觉 */
.collapse-head { display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; user-select:none; }
.collapse-title { font-size:15px; font-weight:600; letter-spacing:-.01em; color: var(--ink); }
.collapse-title .hint { margin-left:8px; font-size:12px; font-weight:400; color: var(--text2); }
.collapse-toggle { display:inline-flex; align-items:center; gap:3px; font-size:12px; color: var(--text2); }
.rule-row { display:flex; align-items:center; gap:8px; padding:7px 0; border-top:1px solid #f0f2f5; }

/* 复测条目的结构化结果选择 */
.weak-pick { display:flex; align-items:center; gap:6px; }
.weak-pick select { flex:1; min-width:0; border:1px solid var(--line); border-radius:8px; padding:5px 8px; background: var(--card2); font: inherit; }

.preview-row { padding:7px 0; border-top:1px solid #f0f2f5; }
/* 基础数据：模块开关 */
.feat-row { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius: var(--r-btn); background: var(--card2); cursor:pointer; font-size:13px; line-height:1.6; }
.feat-row.on { border-color:#9ad3a8; background:#f3fbf5; }
.feat-row input { width:16px; height:16px; margin-top:3px; accent-color: var(--accent); }
