/* ============================================================
   人事管理系统 · 设计系统
   纯本地 CSS，无 CDN、无构建步骤（园区断网也能用）
   ============================================================ */
:root {
  --bg: #f4f7f5;
  --card: #ffffff;
  --ink: #1b2b28;
  --ink-2: #46605a;
  --muted: #7c918c;
  --line: #e2eae6;
  --line-soft: #eef3f0;

  --brand: #1f6f5c;
  --brand-ink: #145245;
  --brand-soft: #e7f2ee;
  --brand-softer: #f2f8f6;

  --ok: #2f7d4f;      --ok-soft: #e8f5ed;
  --warn: #b56a12;    --warn-soft: #fdf4e4;
  --danger: #bf3b2f;  --danger-soft: #fcecea;
  --info: #2b6c99;    --info-soft: #e9f2f9;

  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 50, 40, .04), 0 6px 18px -8px rgba(20, 50, 40, .12);
  --shadow-lg: 0 12px 36px -12px rgba(20, 50, 40, .22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Hiragino Sans GB", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

/* ---------- 布局骨架 ---------- */
.app { display: flex; min-height: 100vh; }

.side {
  width: 216px; flex: 0 0 216px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 18px;
}
.brand-mark {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #2a8470, #17584a);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: .5px;
  box-shadow: 0 4px 10px -3px rgba(23, 88, 74, .5);
}
.brand-txt { line-height: 1.25; }
.brand-txt b { display: block; font-size: 14.5px; }
.brand-txt span { font-size: 11.5px; color: var(--muted); }

.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 0; }
.nav-label {
  font-size: 11px; color: var(--muted); letter-spacing: .08em;
  padding: 6px 10px 4px; font-weight: 600;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8.5px 10px; margin: 1px 0;
  border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 13.5px;
  transition: background .12s, color .12s;
}
.nav a svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .72; }
.nav a:hover { background: var(--brand-softer); color: var(--brand-ink); }
.nav a.on {
  background: var(--brand-soft); color: var(--brand-ink);
  font-weight: 600;
}
.nav a.on svg { opacity: 1; }
.nav .count {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--brand); color: #fff;
  padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center;
}
.nav a.on .count { background: var(--brand-ink); }

.side-foot {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px;
}
.avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 600; font-size: 12.5px;
}
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 12.5px; }
.side-foot .who span { color: var(--muted); font-size: 11px; }
.side-foot .who-link {
  display: inline-block; margin-top: 3px; color: var(--brand-ink);
  font-size: 11px; text-decoration: none; opacity: .85;
}
.side-foot .who-link:hover { opacity: 1; text-decoration: underline; }
.side-foot a.out { color: var(--muted); font-size: 12px; }
.side-foot a.out:hover { color: var(--danger); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 60px; flex: 0 0 60px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
.crumb { font-size: 13px; color: var(--muted); }
.crumb b { color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .today {
  font-size: 12.5px; color: var(--muted);
  background: var(--bg); padding: 5px 11px; border-radius: 20px;
}

.content { padding: 22px 24px 48px; max-width: 1400px; width: 100%; }

/* ---------- 页头 ---------- */
.page-head {
  display: flex; align-items: flex-end; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.page-head .t h2 { font-size: 21px; }
.page-head .t p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.page-head .ops { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  margin-bottom: 18px; overflow: hidden;
}
.panel-h {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--line-soft);
}
.panel-h h3 { font-size: 14.5px; }
.panel-h .sub { font-size: 12.5px; color: var(--muted); }
.panel-h .ops { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel-b { padding: 16px 18px; }
.panel-b.flush { padding: 0; }

/* ---------- 指标卡 ---------- */
.stats { display: grid; gap: 14px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 16px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 27px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; }
.stat .v small { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 5px; }
.stat.is-warn .v { color: var(--warn); }
.stat.is-danger .v { color: var(--danger); }
.stat.is-ok .v { color: var(--ok); }
.stat::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--brand); opacity: .9;
}
.stat.is-warn::after { background: var(--warn); }
.stat.is-danger::after { background: var(--danger); }
.stat.is-ok::after { background: var(--ok); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
  transition: all .12s;
}
.btn:hover { border-color: #cfdcd7; background: var(--brand-softer); color: var(--brand-ink); }
.btn svg { width: 15px; height: 15px; }
.btn.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 3px 10px -4px rgba(31, 111, 92, .6);
}
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn.danger { color: var(--danger); border-color: #f0d3cf; background: #fff; }
.btn.danger:hover { background: var(--danger-soft); border-color: #e7bcb6; color: var(--danger); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 发起审批：可用流程按钮组 ---------- */
.start-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.start-grid .btn { height: 38px; }

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.search {
  position: relative; flex: 1; min-width: 200px; max-width: 320px;
}
.search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted);
}
.search input {
  width: 100%; height: 34px; padding: 0 12px 0 32px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit; color: var(--ink);
  background: #fff; outline: none; transition: border-color .12s, box-shadow .12s;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.toolbar select {
  height: 34px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: var(--r-sm); font-size: 13px; font-family: inherit;
  color: var(--ink-2); background: #fff; outline: none; cursor: pointer;
}
.toolbar select:focus { border-color: var(--brand); }
.toolbar .grow { flex: 1; }

/* ---------- 表格 ---------- */
.tw { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  letter-spacing: .03em; padding: 10px 14px; white-space: nowrap;
  background: #fafcfb; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1;
}
table.tb td {
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.tb tbody tr { transition: background .1s; }
table.tb tbody tr:hover { background: var(--brand-softer); }
table.tb tbody tr:last-child td { border-bottom: none; }
table.tb .num { font-variant-numeric: tabular-nums; }
table.tb .r { text-align: right; }
table.tb .c { text-align: center; }
table.tb .nowrap { white-space: nowrap; }
table.tb a.row-link { color: var(--ink); font-weight: 500; }
table.tb a.row-link:hover { color: var(--brand); }

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 500; padding: 2px 8px;
  border-radius: 20px; white-space: nowrap; line-height: 1.7;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.muted { background: #eff2f1; color: var(--muted); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
/* inline-flex 会盖掉浏览器默认的 [hidden]{display:none}，显式兜一层 */
.badge[hidden] { display: none !important; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- 空状态 ---------- */
.empty { padding: 46px 20px; text-align: center; }
.empty .ic {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px;
  background: var(--brand-softer); color: var(--brand);
  display: grid; place-items: center;
}
.empty .ic svg { width: 24px; height: 24px; }
.empty b { display: block; font-size: 14px; margin-bottom: 4px; }
.empty p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13.5px; font-family: inherit; color: var(--ink); background: #fff;
  outline: none; transition: border-color .12s, box-shadow .12s;
}
.field textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 76px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 提示条 ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 15px; border-radius: var(--r-sm);
  font-size: 13px; margin-bottom: 16px; border: 1px solid transparent;
}
.alert svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.alert.warn { background: var(--warn-soft); color: #8a5310; border-color: #f3dfba; }
.alert.danger { background: var(--danger-soft); color: #8f2e24; border-color: #f0cdc8; }
.alert.ok { background: var(--ok-soft); color: #24603c; border-color: #c9e6d4; }
.alert.info { background: var(--info-soft); color: #245b80; border-color: #cfe2f0; }

/* ---------- 待办列表 ---------- */
.todo { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.todo:last-child { border-bottom: none; }
.todo .ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  display: grid; place-items: center;
}
.todo .ico svg { width: 17px; height: 17px; }
.todo .ico.warn { background: var(--warn-soft); color: var(--warn); }
.todo .ico.danger { background: var(--danger-soft); color: var(--danger); }
.todo .ico.info { background: var(--info-soft); color: var(--info); }
.todo .ico.brand { background: var(--brand-soft); color: var(--brand); }
.todo .bd { flex: 1; min-width: 0; }
.todo .bd b { font-size: 13.5px; display: block; }
.todo .bd span { font-size: 12.5px; color: var(--muted); }
.todo .go { align-self: center; font-size: 12.5px; white-space: nowrap; }

/* ---------- 详情页 ---------- */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 24px; }
.dl .i .k { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.dl .i .v { font-size: 13.5px; font-weight: 500; }
.dl .i .v.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .01em; }

.person {
  display: flex; align-items: center; gap: 15px;
  padding: 20px 18px;
}
.person .av {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 16px;
  background: linear-gradient(145deg, #2a8470, #17584a); color: #fff;
  display: grid; place-items: center; font-size: 21px; font-weight: 600;
}
.person .nm { font-size: 18px; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.person .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; }
.tabs a {
  padding: 11px 13px; font-size: 13.5px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--brand); }
.tabs a.on { color: var(--brand-ink); font-weight: 600; border-bottom-color: var(--brand); }

/* ---------- 进度条 ---------- */
.bar { height: 6px; background: var(--line-soft); border-radius: 20px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 20px; background: var(--brand); }

/* ---------- 分页 ---------- */
.pager {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 18px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--muted);
}
.pager .spacer { flex: 1; }

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; }
  .menu-btn { display: inline-flex !important; }
}
.menu-btn {
  display: none; width: 34px; height: 34px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
  cursor: pointer; color: var(--ink-2);
}

/* ---------- 月历 ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); }
.cal .hd {
  background: #fafcfb; padding: 9px 8px; text-align: center;
  font-size: 12px; color: var(--muted); font-weight: 600;
}
.cal .d { background: #fff; min-height: 82px; padding: 8px 9px; position: relative; }
.cal .d .n { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal .d.blank { background: #fbfcfc; }
.cal .d.weekend .n { color: var(--muted); }
.cal .d.stat_holiday { background: #fdf5f3; }
.cal .d.stat_holiday .n { color: var(--danger); }
.cal .d.makeup_workday { background: #f2f8fb; }
.cal .d.makeup_workday .n { color: var(--info); }
.cal .d.org_holiday { background: #f8f6fc; }
.cal .d.org_holiday .n { color: #6a5a9e; }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal .d.today .n::after {
  content: "今天"; font-size: 9.5px; font-weight: 500; color: #fff;
  background: var(--brand); border-radius: 10px; padding: 1px 6px; margin-left: 5px;
  vertical-align: 2px;
}
.cal .tag { display: block; font-size: 10.5px; margin-top: 5px; line-height: 1.5; }
.cal .tag.rest { color: var(--muted); }
.cal .tag.holi { color: var(--danger); }
.cal .tag.mk { color: var(--info); }
.cal .tag.org { color: #6a5a9e; }
.cal .tag.none { color: #c3cfcb; }

/* 空的时间胶囊不占位 */
.topbar .today:empty { display: none; }

/* ---------- 工资条 ---------- */
.slip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .slip-grid { grid-template-columns: 1fr; } }
.tb tfoot td { padding-top: 10px; padding-bottom: 10px; }

/* ============================================================
   登录页（独立版式，不依赖侧栏骨架）
   ============================================================ */
.auth-body { background: var(--bg); }

.auth {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* ---- 左：品牌区 ---- */
.auth-side {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 46px 56px 34px;
  background: linear-gradient(150deg, #1f6f5c 0%, #17564a 55%, #123f37 100%);
  color: #eaf3f0;
}
.auth-side::after {
  content: ""; position: absolute; right: -140px; bottom: -160px;
  width: 440px; height: 440px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.13), rgba(255,255,255,0) 68%);
}
.auth-side::before {
  content: ""; position: absolute; right: 40px; top: -110px;
  width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.10);
}
.auth-brand { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.auth-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 600; color: #fff;
}
.auth-brand b { display: block; font-size: 16px; letter-spacing: .02em; color: #fff; }
.auth-brand span { display: block; font-size: 11px; color: rgba(234,243,240,.62); letter-spacing: .06em; }

.auth-pitch { position: relative; z-index: 1; margin-top: auto; padding-top: 60px; }
.auth-pitch h1 {
  font-size: 31px; line-height: 1.42; font-weight: 600;
  color: #fff; letter-spacing: -.01em;
}
.auth-pitch p {
  margin: 14px 0 0; max-width: 430px;
  font-size: 13.5px; line-height: 1.75; color: rgba(234,243,240,.72);
}

.auth-feats {
  position: relative; z-index: 1;
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; gap: 1px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.auth-feats li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.auth-feats i {
  font-style: normal; font-size: 10.5px; font-weight: 600;
  color: rgba(255,255,255,.42); letter-spacing: .08em;
  padding-top: 3px; min-width: 18px;
}
.auth-feats b { display: block; font-size: 13.5px; color: #fff; font-weight: 500; }
.auth-feats span { display: block; font-size: 11.5px; color: rgba(234,243,240,.55); margin-top: 1px; }

.auth-foot {
  position: relative; z-index: 1;
  margin-top: 26px; font-size: 11px;
  color: rgba(234,243,240,.42); letter-spacing: .04em;
}

/* ---- 右：表单区 ---- */
.auth-main {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 32px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 352px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 30px 26px;
  box-shadow: var(--shadow-lg);
}
.auth-card h2 { font-size: 20px; letter-spacing: -.01em; }
.auth-sub { margin: 6px 0 22px; font-size: 12.5px; color: var(--muted); }

.auth-btn {
  width: 100%; height: 42px; margin-top: 22px;
  border: 1px solid var(--brand); border-radius: var(--r-sm);
  background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 500; letter-spacing: .22em;
  cursor: pointer; font-family: inherit;
  transition: background .16s, border-color .16s, box-shadow .16s;
  box-shadow: 0 6px 16px -8px rgba(31,111,92,.65);
}
.auth-btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.auth-btn:active { transform: translateY(.5px); }

.auth-tip {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px; line-height: 1.7; color: var(--muted);
}
.auth-tip code {
  display: inline-block; margin-top: 4px; padding: 2px 6px;
  background: var(--brand-softer); border: 1px solid var(--line);
  border-radius: 5px; font-size: 11px; color: var(--brand-ink);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.auth-copy { margin-top: 22px; font-size: 11px; color: #a8b8b3; }

/* ---- 窄屏：品牌区收起，只留表单 ---- */
@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { min-height: 100vh; padding: 28px 20px; }
  .auth-card { padding: 26px 22px 22px; }
}

/* ============================================================
   表单页（新增 / 编辑）
   ============================================================ */
.crumb .sep { margin: 0 7px; color: #c2cfca; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }

.form-page { max-width: 1080px; }
.form-card { padding: 0 0 6px; }
.form-card-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .form-card-wrap { grid-template-columns: 1fr; } }

.form-sec {
  font-size: 12.5px; font-weight: 600; color: var(--brand-ink);
  letter-spacing: .04em;
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--brand-softer);
}
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px 20px; padding: 18px 22px 10px;
}
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .field.wide { grid-column: 1 / -1; }

/* 表单里的第二个区块（如岗位的「作息与判定」）：和顶部标题区分开，不抢主标题 */
.form-sec.sub { background: #fff; border-top: 1px solid var(--line-soft); color: var(--ink-2); }
.form-note { padding: 4px 22px 16px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }

/* 控件：统一 36px 高，和列表页按钮对齐 */
.field .inp {
  width: 100%; height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 11px; font-size: 13.5px; color: var(--ink);
  background: #fff; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea.inp { height: auto; padding: 9px 11px; line-height: 1.6; resize: vertical; }
.field .inp:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 111, 92, .10);
}
.field .inp:disabled { background: var(--bg); color: var(--muted); }
.field.bad .inp { border-color: #e0a49c; background: #fffbfa; }
.field.bad .inp:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(191, 59, 47, .10); }
.err-msg { font-size: 11.5px; color: var(--danger); margin-top: 5px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.55; }
.field label .req { color: var(--danger); margin-left: 2px; }

/* 复选框 */
.field .chk { width: 15px; height: 15px; accent-color: var(--brand); vertical-align: -2px; margin-right: 6px; }
/* 勾选框不该吃输入框的 100% 宽/36px 高（.field input 的通用规则会误伤） */
.field input[type="checkbox"], .field input[type="radio"],
.form-grid input[type="checkbox"], .form-grid input[type="radio"] {
  width: 18px; height: 18px; flex: 0 0 18px;
  padding: 0; margin: 0;
  accent-color: var(--brand);
  vertical-align: -3px;
}

/* 操作条 */
.form-actions {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 24px; padding: 14px 22px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.form-actions .btn.primary { height: 36px; padding: 0 22px; }
.form-actions .spacer { flex: 1; }
.form-note { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* 列表行的编辑/删除按钮：贴右排一行，不换行 */
td.row-ops { white-space: nowrap; text-align: right; }
td.row-ops form { display: inline-block; margin-left: 6px; }

/* 右侧说明栏 */
.form-side { padding: 0 0 16px; position: sticky; top: 16px; }
.form-side .form-sec { background: #fff; border-bottom: 1px solid var(--line-soft); }
.form-side .rule-list { margin: 0; padding: 12px 22px 0 22px; list-style: none; }
.form-side .rule-list li {
  position: relative; padding-left: 14px; margin-bottom: 10px;
  font-size: 12px; line-height: 1.7; color: var(--ink-2);
}
.form-side .rule-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 5px; height: 5px; border-radius: 50%; background: #bfd4cd;
}
.form-side .rule-list b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.form-side .hint { padding: 0 22px; }

/* ---------- 工作日历维护 ---------- */
.cal-edit td { padding: 6px 10px; vertical-align: middle; }
.cal-edit .sm-inp { height: 30px; font-size: 12.5px; padding: 0 8px; }
.cal-edit .chk { width: 15px; height: 15px; accent-color: var(--brand); }
.cal-edit .dow-rest { color: var(--danger); }
.cal-edit tr.row-rest td:first-child { color: var(--muted); }
.cal-edit tr.row-holi { background: #fdf7f6; }
.cal-edit tr.row-mk { background: #f4f9fc; }
.cal-edit tr.row-org { background: #f9f7fd; }

/* 工具类 */
.muted { color: var(--muted); }

/* 日历维护：日期列不换行，行高压紧 */
.cal-edit th:nth-child(1), .cal-edit td:nth-child(1),
.cal-edit th:nth-child(2), .cal-edit td:nth-child(2) { white-space: nowrap; }
.cal-edit td:nth-child(1) { font-size: 13px; }

/* 员工删除确认页 */
.del-target { display: flex; gap: 12px; align-items: center; }
.del-target .av {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--danger-soft); color: var(--danger);
  font-weight: 600; font-size: 18px;
}
.del-target .nm { font-size: 15px; font-weight: 600; color: var(--ink); }
.del-target .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.del-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.del-actions .form-note { max-width: 560px; line-height: 1.7; }
td.row-ops .btn + .btn, td.row-ops .btn + form { margin-left: 6px; }

/* 页面内确认弹窗（替代原生 confirm：嵌入式预览/禁用弹窗的环境里原生框会被直接吞掉） */
.mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(23, 33, 30, .38);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.mask[hidden] { display: none; }
.cfm {
  width: 100%; max-width: 440px; background: var(--card);
  border-radius: 12px; box-shadow: 0 18px 48px rgba(16, 32, 28, .22);
  overflow: hidden;
}
.cfm-h {
  padding: 16px 20px 0; font-size: 15px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.cfm-h .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.cfm-b {
  padding: 10px 20px 18px; font-size: 13px; line-height: 1.75; color: var(--ink-2);
  white-space: pre-line; max-height: 46vh; overflow: auto;
}
.cfm-f {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 20px; background: var(--brand-softer); border-top: 1px solid var(--line-soft);
}
.cfm-f .btn { height: 34px; }

/* ---------- 批量勾选与批量删除 ---------- */
.chk-col { width: 40px; }
input.rowchk {
  width: 15px; height: 15px; margin: 0; cursor: pointer;
  accent-color: var(--danger); vertical-align: middle;
}
.bulk-count { font-size: 12.5px; color: var(--danger); white-space: nowrap; }
.bulk-count:empty { display: none; }
.bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 18px; border-bottom: 1px solid var(--line-soft);
  background: var(--brand-softer);
}
.bulkbar .bulk-tip { font-size: 12px; color: var(--muted); }

/* 系统生成的编码/工号：只读、浅底，视觉上区分「系统给的」与「我填的」 */
.field .inp[readonly] {
  background: var(--bg); color: var(--ink-2); cursor: default;
  border-style: dashed;
}
.field .inp[readonly]:focus {
  border-color: var(--line); box-shadow: none;
}

/* 自助模式：申请人锁定本人，只读展示 */
.field .ro {
  display: block; min-height: 36px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.4;
}

/* ---------- 移动工作台（纯 H5 入口） ---------- */
.mp-hero { padding: 22px 18px 4px; }
.mp-hi { font-size: 22px; font-weight: 700; color: var(--ink); }
.mp-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 16px 4px; }
.mp-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.mp-card:active { transform: scale(.985); }
.mp-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.mp-ic svg { width: 20px; height: 20px; color: var(--brand); }
.mp-t { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.mp-d { font-size: 12px; color: var(--muted); }
.mp-badge {
  background: var(--danger); color: #fff; font-size: 11px; font-style: normal;
  border-radius: 10px; padding: 1px 7px; line-height: 1.6;
}
.mp-tip {
  margin: 12px 16px 24px; font-size: 12.5px; color: var(--muted); line-height: 1.6;
  background: var(--brand-softer); padding: 12px 14px; border-radius: 10px;
}


/* ---------- 多选筛选（胶囊 chips） ---------- */
.calsel { padding: 14px 18px 12px; display: grid; gap: 10px; }
.csrow { display: flex; align-items: flex-start; gap: 12px; }
.cslabel {
  flex: 0 0 46px; font-size: 12.5px; color: var(--muted);
  padding-top: 7px; letter-spacing: .02em;
}
.cshelptext { font-size: 11.5px; color: #a9b8b3; padding-top: 8px; white-space: nowrap; }
.chips {
  display: flex; flex-wrap: wrap; gap: 6px; flex: 1;
  max-height: 96px; overflow-y: auto; padding: 1px 4px 1px 1px;
}
.chip {
  position: relative;
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; user-select: none;
  transition: all .12s; line-height: 1;
}
.chip[hidden] { display: none; }
.chip:hover { border-color: #cfdcd7; background: var(--brand-softer); color: var(--brand-ink); }
.chip input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}
.chip.on, .chip:has(input:checked) {
  background: var(--brand-soft); border-color: var(--brand);
  color: var(--brand-ink); font-weight: 600;
}
.chip.on::before, .chip:has(input:checked)::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); margin-right: 6px;
}
.cs-select {
  height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 12.5px; font-family: inherit; color: var(--ink-2); background: #fff;
  outline: none; cursor: pointer; flex: 0 0 auto;
}
.cs-select:focus { border-color: var(--brand); }
.csrow .grow2 { flex: 1; }

/* 范围摘要条 */
.scope {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 18px; font-size: 12.5px; color: var(--ink-2);
  background: var(--brand-softer); border-top: 1px solid var(--line-soft);
}
.scope b { color: var(--brand-ink); }
.scope .sep { color: #c9d6d1; }
.scope .grow2 { flex: 1; }

/* 日历格里的人数与"缺园区"提示 */
.cal .d .n { position: relative; }
.cal .d .need {
  position: absolute; right: 0; top: -1px; font-size: 10px; font-weight: 500;
  color: var(--brand-ink); background: var(--brand-soft); border-radius: 4px;
  padding: 0 4px; line-height: 15px;
}
.cal .d .sub { font-size: 10px; color: #a9b8b3; margin-top: 3px; }
.cal .d .sub.gap { color: var(--warn); }
.cal .tag.mix { color: var(--warn); font-weight: 600; }

/* ---------- 附件（合同扫描件 / 学历证书 / 证照照片） ---------- */
.panel-h .att-hint { font-weight: 400; }
.att-warn {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 10px 18px;
  background: #fffaf0; border-top: 1px solid #f5e6c8;
  font-size: 12.5px; color: #8a6a25;
}
.att-warn svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--warn); }

.att-up {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 4px;
  border-bottom: 1px dashed var(--line);
}
.att-up select {
  height: 34px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: var(--r-sm); font-size: 13px; font-family: inherit;
  color: var(--ink-2); background: #fff; outline: none; cursor: pointer;
}
.att-up select:focus { border-color: var(--brand); }
.att-up .att-title {
  flex: 1; min-width: 180px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit; color: var(--ink); background: #fff; outline: none;
}
.att-up .att-title:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.att-tip { font-size: 11.5px; color: #a9b8b3; }

.att-file { position: relative; display: inline-flex; }
.att-file input[type=file] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.att-file-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px; max-width: 260px;
  border: 1px dashed #cfdcd7; border-radius: var(--r-sm);
  background: #fbfdfc; font-size: 12.5px; color: var(--ink-2);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.att-file-btn svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--muted); }
.att-file-btn:hover { border-color: var(--brand); background: var(--brand-softer); color: var(--brand-ink); }
.att-file-text.picked { color: var(--brand-ink); font-weight: 600; }

.att-list { display: grid; gap: 2px; margin-top: 10px; }
.att {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--line-soft);
}
.att:last-child { border-bottom: 0; }
.att-ic {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 8px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--brand-softer); border: 1px solid var(--line);
}
.att-ic svg { width: 19px; height: 19px; color: var(--brand); }
.att-ic img { width: 100%; height: 100%; object-fit: cover; }
.att-meta { flex: 1; min-width: 0; }
.att-meta .nm { font-size: 13.5px; font-weight: 600; }
.att-meta .nm a { color: var(--ink); }
.att-meta .nm a:hover { color: var(--brand); text-decoration: underline; }
.att-meta .sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.att-ops { display: flex; gap: 6px; flex: 0 0 auto; }
.att-empty {
  margin-top: 12px; padding: 22px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--r);
  background: #fbfcfc; color: var(--muted); font-size: 12.5px; line-height: 1.7;
}
.att-note {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm);
  background: #fbfcfc; border: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.7;
}

/* ---------- 下拉多选菜单（替换原来的胶囊 chips） ---------- */
.ms { position: relative; flex: 1; min-width: 0; max-width: 420px; }
.ms-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  height: 34px; padding: 0 11px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; font-size: 13px; font-family: inherit;
  color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.ms-btn:hover { border-color: #cfdcd7; }
.ms.open .ms-btn, .ms-btn:focus-visible {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none;
}
.ms-val {
  flex: 1; min-width: 0; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.ms-val.is-empty { color: var(--muted); }
.ms-val.is-set { color: var(--brand-ink); font-weight: 600; }
.ms-caret {
  flex: 0 0 auto; width: 0; height: 0;
  border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
  border-top: 5px solid var(--muted);
  transition: transform .15s;
}
.ms.open .ms-caret { transform: rotate(180deg); border-top-color: var(--brand); }

.ms-pop {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 40;
  width: max(100%, 260px); padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg);
}
.ms-pop[hidden] { display: none; }

/* 卡片 .panel 有 overflow:hidden，绝对定位面板会被裁掉；
   打开时改由 JS 计算位置，钉在视口上（fixed 不受祖先裁切），宽度与高度按可用空间自适应 */
.ms-pop.is-fixed {
  position: fixed; top: auto; right: auto; bottom: auto; left: auto;
  z-index: 200; width: auto; display: flex; flex-direction: column;
  max-height: calc(100vh - 20px);
}
.ms-pop.is-fixed[hidden] { display: none; }
.ms-pop.is-fixed .ms-tools, .ms-pop.is-fixed .ms-foot { flex: 0 0 auto; }
.ms-pop.is-fixed .ms-list {
  flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto;
  overscroll-behavior: contain;
}
.ms-tools { display: flex; align-items: center; gap: 5px; padding: 2px 2px 6px; }
.ms-find {
  flex: 1; min-width: 0; height: 30px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 12.5px; font-family: inherit; color: var(--ink); background: #fbfcfc;
  outline: none;
}
.ms-find:focus { border-color: var(--brand); background: #fff; }
.ms-mini {
  flex: 0 0 auto; height: 30px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font-size: 12px; font-family: inherit; color: var(--ink-2); cursor: pointer;
}
.ms-mini:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-softer); }

.ms-list { max-height: 244px; overflow-y: auto; padding: 2px 1px; }
.ms-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: var(--ink-2); line-height: 1.4;
}
.ms-opt[hidden] { display: none; }
.ms-opt:hover { background: var(--brand-softer); }
.ms .ms-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.ms-box {
  flex: 0 0 16px; width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid #cfdcd7; background: #fff;
  display: grid; place-items: center; transition: all .12s;
}
.ms-box svg { width: 11px; height: 11px; color: #fff; opacity: 0; }
.ms-opt input:checked + .ms-box { background: var(--brand); border-color: var(--brand); }
.ms-opt input:checked + .ms-box svg { opacity: 1; }
.ms-opt input:checked ~ .ms-text { color: var(--brand-ink); font-weight: 600; }
.ms-opt.is-off { opacity: .38; cursor: not-allowed; }
.ms-opt.is-off:hover { background: transparent; }
.ms-empty { padding: 14px 10px; text-align: center; font-size: 12.5px; color: var(--muted); }
.ms-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; padding: 6px 2px 2px; border-top: 1px solid var(--line-soft);
}
.ms-count { flex: 1; font-size: 11.5px; color: var(--muted); }

/* 筛选行里下拉的排布 */
.calsel .csrow { align-items: center; }
.calsel .ms { flex: 0 0 268px; width: 268px; }
.calsel .cs-select { min-width: 150px; }

.calsel .cslabel { padding-top: 0; }
.calsel .cshelptext { padding-top: 0; }
.ms-pop.up { top: auto; bottom: calc(100% + 4px); }

/* 窄屏：筛选行改成竖排，避免下拉与选择框挤出卡片被裁掉 */
@media (max-width: 760px) {
  .calsel .csrow { flex-wrap: wrap; gap: 8px; }
  .calsel .cslabel { flex: 0 0 100%; }
  .calsel .ms { flex: 1 1 100%; width: auto; max-width: none; }
  .calsel .cshelptext { flex: 1 1 100%; }
  .calsel .cs-select { flex: 1 1 100%; width: 100%; }
}

/* 列表页工具条里的下拉多选 */
.toolbar .ms { flex: 0 0 190px; width: 190px; max-width: 190px; }

/* 控件特别多的工具条（员工档案：状态 + 园区 + 部门 + 岗位）收紧一档，别掉成两行 */
.toolbar.is-dense { gap: 8px; }
.toolbar.is-dense .search { min-width: 170px; max-width: 250px; }
.toolbar.is-dense select { max-width: 112px; }
.toolbar.is-dense .ms { flex: 0 0 190px; width: 190px; max-width: 190px; }
/* 右侧按钮组：用 auto 外边距推右，不用空占位 —— 换行时不会被 flex:1 的空 div 挤成孤行 */
.toolbar .t-ops { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* 中等宽度放不下「搜索框 + 4 个下拉 + 按钮」，就让搜索框独占一行，下拉也收紧一档 */
@media (max-width: 1200px) {
  .toolbar.is-dense .search { flex: 1 1 100%; max-width: none; }
  .toolbar.is-dense .ms { flex: 0 0 158px; width: 158px; max-width: 158px; }
}

/* ---------- 多列栅格（原来是行内样式，抽成类便于手机端重排）---------- */
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.collect-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.stat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.rv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* ============================================================
   移动端适配
   桌面端样式一律不改，全部改版收在断点里（≤760px 为主，≤900px 处理抽屉）
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
button, a, input, select, textarea, label { -webkit-tap-highlight-color: transparent; }

/* 手机专用组件：桌面隐藏 */
.tabbar, .side-mask, .back-btn { display: none; }

@media (max-width: 900px) {
  /* ---- 侧栏抽屉 ---- */
  .side {
    width: min(84vw, 306px);
    flex: 0 0 auto;
    height: 100vh;
    height: 100dvh;
    box-shadow: var(--shadow-lg);
    border-right: 0;
    z-index: 21;
  }
  .nav a { padding: 11px 10px; font-size: 14.5px; }
  .nav a svg { width: 18px; height: 18px; flex-basis: 18px; }
  .nav-label { padding: 8px 10px 4px; }

  .side-mask:not([hidden]) {
    display: block;
    position: fixed; inset: 0;
    background: rgba(16, 34, 29, .42);
    z-index: 20;
  }
  body.drawer-on { overflow: hidden; }

  .menu-btn { display: inline-flex !important; }

  .back-btn:not([hidden]) {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: 0 0 34px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: #fff; color: var(--ink-2); cursor: pointer;
  }
  .back-btn:active { background: var(--brand-softer); }

  /* ---- 顶栏 ---- */
  .topbar { height: 54px; flex: 0 0 54px; padding: 0 12px; gap: 8px; }
  .crumb {
    font-size: 13.5px; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .topbar .today { font-size: 11.5px; padding: 4px 9px; flex: 0 0 auto; }
}

@media (max-width: 760px) {
  /* ---- 内容区：给底栏留位置 ---- */
  .content {
    padding: 14px 12px calc(58px + env(safe-area-inset-bottom, 0px) + 22px);
    max-width: none;
  }

  /* ---- 底部快捷导航 ---- */
  .tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 5px 2px calc(5px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 16px -10px rgba(20, 50, 40, .3);
  }
  .tabbar > a, .tabbar > .tab-more {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 1px; position: relative;
    border: 0; background: none; font-family: inherit; cursor: pointer;
    color: var(--muted); font-size: 10.5px; line-height: 1.2;
  }
  .tabbar svg { width: 21px; height: 21px; }
  .tabbar > a.on { color: var(--brand); font-weight: 600; }
  .tabbar .count {
    position: absolute; top: 1px; left: 50%; margin-left: 4px;
    background: var(--danger); color: #fff; font-style: normal;
    font-size: 9.5px; font-weight: 700; line-height: 1;
    padding: 2px 4px; border-radius: 20px; min-width: 14px; text-align: center;
  }
  /* 抽屉展开时收起底栏，否则底栏会压在抽屉上 */
  body.drawer-on .tabbar { display: none; }

  /* ---- 页头 ---- */
  .page-head {
    flex-direction: column; align-items: stretch;
    gap: 10px; margin-bottom: 14px;
  }
  .page-head .t h2 { font-size: 19px; }
  .page-head .t p { font-size: 12.5px; }
  .page-head .ops { margin-left: 0; gap: 8px; }
  .page-head .ops .btn { flex: 1 1 auto; justify-content: center; }

  /* ---- 卡片/面板 ---- */
  .panel { border-radius: 10px; margin-bottom: 14px; }
  .panel-h { padding: 12px 14px; gap: 8px; flex-wrap: wrap; }
  .panel-h h3 { font-size: 14px; }
  .panel-b { padding: 13px 14px; }
  .panel-b.flush { padding: 0; }

  /* ---- 指标卡：两列 ---- */
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
  /* 卡片是奇数个时，最后一张占满整行，避免右边留个豁口 */
  .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 12px 12px 11px; border-radius: 10px; }
  .stat:hover { transform: none; }
  .stat .k { font-size: 11.5px; gap: 4px; }
  .stat .v { font-size: 22px; margin-top: 4px; }
  .stat .v small { font-size: 11px; }
  .stat .d { font-size: 11px; line-height: 1.45; }

  /* ---- 按钮：加大触摸区 ---- */
  .btn { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
  .btn svg { width: 16px; height: 16px; }

  /* ---- 工具条：搜索独占一行，筛选/按钮平分 ---- */
  .toolbar { padding: 11px 12px; gap: 8px; }
  .toolbar .search { flex: 1 1 100%; max-width: none; }
  .search input { height: 40px; font-size: 16px; }
  .toolbar select {
    flex: 1 1 auto; min-width: 0; height: 40px;
    font-size: 16px; padding: 0 8px;
  }
  .toolbar .grow { display: none; }
  .toolbar .ms { flex: 1 1 100%; width: auto; max-width: none; }
  /* 员工档案的紧凑档位在手机上要退回整行，否则多选只有 158px 宽 */
  .toolbar.is-dense .ms { flex: 1 1 100%; width: auto; max-width: none; }
  .toolbar.is-dense select { max-width: none; }
  .toolbar .btn { flex: 0 1 auto; }

  /* ---- 表格 → 卡片（列名由 base.html 的 JS 写进 data-label）---- */
  table.tb.tb-card { display: block; width: 100%; font-size: 13.5px; }
  table.tb.tb-card thead { display: none; }
  table.tb.tb-card tbody { display: block; }
  table.tb.tb-card tr {
    display: block; position: relative;
    background: #fff; border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow);
    padding: 2px 0; margin: 0 0 9px;
  }
  table.tb.tb-card tr:hover { background: #fff; }
  table.tb.tb-card td {
    display: grid; grid-template-columns: 5.6em minmax(0, 1fr);
    gap: 10px; align-items: baseline;
    padding: 7px 13px; border-bottom: 0;
    font-size: 13.5px; line-height: 1.55;
    overflow-wrap: anywhere;
  }
  table.tb.tb-card td::before {
    content: attr(data-label);
    color: var(--muted); font-size: 12px; font-weight: 400;
    line-height: 1.4;
    grid-column: 1;
  }
  /* 单元格里有多个元素（值 + 补充说明）时，都落在右列，标签留在左列首行 */
  table.tb.tb-card td > * { grid-column: 2; }
  table.tb.tb-card td.c-pick > *,
  table.tb.tb-card td.c-span > * { grid-column: auto; }
  table.tb.tb-card td[data-label=""] { grid-template-columns: minmax(0, 1fr); }
  table.tb.tb-card td[data-label=""]::before { display: none; }
  table.tb.tb-card td .right, table.tb.tb-card td.r { text-align: left; }
  table.tb.tb-card td.c { text-align: left; }
  /* 勾选框：浮到卡片右上角 */
  table.tb.tb-card td.c-pick {
    position: absolute; right: 6px; top: 4px;
    display: block; padding: 6px; grid-template-columns: none;
  }
  table.tb.tb-card td.c-pick::before { display: none; }
  table.tb.tb-card td.c-pick input { width: 18px; height: 18px; }
  /* 整行提示（无数据等） */
  table.tb.tb-card td.c-span {
    display: block; text-align: center;
    padding: 30px 14px; grid-template-columns: none;
  }
  table.tb.tb-card td.c-span::before { display: none; }
  /* 行内操作：卡片底部单起一行，右对齐 */
  table.tb.tb-card td.row-ops {
    display: flex; justify-content: flex-end; align-items: center;
    gap: 8px; flex-wrap: wrap;
    padding: 10px 13px 2px; margin-top: 3px;
    border-top: 1px solid var(--line-soft);
  }
  table.tb.tb-card td.row-ops::before { display: none; }
  table.tb.tb-card td.row-ops .btn { height: 32px; }
  table.tb.tb-card td a.row-link { color: var(--brand); font-weight: 600; }
  /* 卡片首行（工号/姓名这类主字段）稍微突出 */
  table.tb.tb-card td:first-child:not(.c-pick) { padding-top: 11px; }
  /* 卡片里的标签、按钮别被 grid 拉成整行宽 */
  table.tb.tb-card td .badge,
  table.tb.tb-card td .btn,
  table.tb.tb-card td .bar { justify-self: start; }
  table.tb.tb-card td .bar { width: 100%; max-width: 180px; }

  /* ---- 宽表格（8 列以上，如考勤/工资）：卡片内改两列紧凑排 ---- */
  table.tb.tb-card.tb-dense tr {
    display: grid; grid-template-columns: 1fr 1fr;
    padding: 5px 0; column-gap: 0;
  }
  table.tb.tb-card.tb-dense td {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 0; padding: 5px 12px; font-size: 13px;
  }
  table.tb.tb-card.tb-dense td::before {
    font-size: 11px; line-height: 1.3; margin-bottom: 1px;
  }
  table.tb.tb-card.tb-dense td:first-child { padding-top: 5px; }
  table.tb.tb-card.tb-dense td.c-pick {
    position: absolute; right: 4px; top: 2px; padding: 6px;
  }
  table.tb.tb-card.tb-dense td.row-ops {
    grid-column: 1 / -1; flex-direction: row;
    justify-content: flex-end; align-items: center;
    margin-top: 3px; border-top: 1px solid var(--line-soft);
  }
  table.tb.tb-card.tb-dense td.c-span { grid-column: 1 / -1; }

  /* ---- 多列栅格一律竖排 ---- */
  .dash-cols, .collect-grid, .rv-grid { grid-template-columns: 1fr; gap: 14px; }
  .stat4 { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* ---- 详情页字段：一行一个，标签左值右 ---- */
  .dl { grid-template-columns: 1fr; gap: 0; }
  .dl .i {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-soft);
  }
  .dl .i:last-child { border-bottom: 0; }
  .dl .i .k { margin-bottom: 0; flex: 0 0 auto; font-size: 12.5px; }
  .dl .i .v { text-align: right; min-width: 0; overflow-wrap: anywhere; }

  .person { padding: 16px 14px; gap: 12px; }
  .person .av { width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; font-size: 18px; }
  .person .nm { font-size: 17px; flex-wrap: wrap; gap: 6px; }
  .person .meta { font-size: 12.5px; }

  .tabs { overflow-x: auto; padding: 0 14px; -webkit-overflow-scrolling: touch; }
  .tabs a { white-space: nowrap; font-size: 13.5px; padding: 11px 10px; }

  /* ---- 表单 ---- */
  .form-page { max-width: none; }
  .form-sec { padding: 13px 14px 10px; font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; gap: 13px; padding: 14px 14px 8px; }
  .field label { font-size: 13px; }
  /* 16px 是硬要求：低于它 iOS Safari 聚焦时会自动放大整页 */
  .field input, .field select, .field textarea,
  .field .inp, .search input, .toolbar select { font-size: 16px; }
  .field input, .field select, .field .inp { height: 44px; padding: 0 12px; }
  .field textarea.inp { height: auto; }
  .field select.inp { padding-right: 6px; }
  .field .chk { width: 18px; height: 18px; }

  /* 表单操作条：吸在底栏上方，长表单不用滚到底才能提交 */
  .form-actions {
    position: sticky;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 6;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 -4px 18px -10px rgba(20, 50, 40, .38);
    flex-wrap: wrap;
  }
  .form-actions .btn.primary { height: 42px; flex: 1 1 auto; justify-content: center; }
  .form-actions .btn { height: 42px; }
  .form-note { font-size: 11.5px; width: 100%; margin-left: 0; }
  .form-side { position: static; }

  /* ---- 分页 ---- */
  .pager { padding: 11px 12px; flex-wrap: wrap; gap: 6px; justify-content: center; }
  .pager .spacer { display: none; }
  .pager .btn { height: 34px; }

  /* ---- 提示条 ---- */
  .alert { padding: 11px 13px; font-size: 13px; border-radius: 10px; margin-bottom: 12px; }

  /* ---- 待办 ---- */
  .todo { padding: 11px 0; gap: 10px; }
  .todo .bd b { font-size: 13.5px; }
  .todo .bd span { font-size: 12px; }

  /* ---- 工作日历：手机上压格子 ---- */
  .cal .hd { padding: 7px 1px; font-size: 11px; }
  .cal .d { min-height: 52px; padding: 4px 3px; }
  .cal .d .n { font-size: 12px; }
  .cal .d.today .n::after { display: none; }
  .cal .tag { font-size: 9px; margin-top: 2px; line-height: 1.35; }

  /* 日历筛选：三行下拉压成两列，别把首屏撑满 */
  .calsel .ms { flex: 1 1 calc(50% - 4px); width: auto; max-width: none; }
  .calsel .cs-select { flex: 1 1 calc(50% - 4px); width: auto; }
  .calsel .cslabel, .calsel .cshelptext { flex: 0 0 100%; }

  /* ---- 附件面板 ---- */
  .att-list { margin-top: 8px; }

  /* ---- 空状态 ---- */
  .empty { padding: 36px 16px; }
  .empty .ic { width: 46px; height: 46px; }
}

/* 超窄屏（iPhone SE 这类 375 以下）再收一点 */
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  table.tb.tb-card td { grid-template-columns: 4.2em minmax(0, 1fr); gap: 8px; }
  .tabbar > a, .tabbar > .tab-more { font-size: 10px; }
}

/* 横屏 / 平板：底栏会让内容被挡，收窄到 760 以下才显示 */
@media (min-width: 761px) {
  .tabbar { display: none !important; }
}


/* ============================================================
   个人考勤：档案锁定信息 + 月历
   ============================================================ */
.pinfo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; padding: 14px 18px 15px; }
.pinfo .it .k { font-size: 11.5px; color: var(--muted); }
.pinfo .it .v { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 1px; }
.pinfo .it .v .lock {
  font-size: 10.5px; font-weight: 500; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 1px 7px; margin-left: 5px;
}
@media (max-width: 760px) { .pinfo { grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 12px 14px; } }

.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 14px 16px 6px; }
.mcal .hd { text-align: center; font-size: 11.5px; color: var(--muted); padding-bottom: 2px; }
.mcal .d {
  min-height: 98px; border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 7px 8px; background: #fff;
}
.mcal .d.out { border-color: transparent; background: transparent; min-height: 0; }
.mcal .d .dn {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.mcal .d .dn .badge { font-size: 10px; padding: 0 5px; }
.mcal .d .tm { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; white-space: nowrap; }
.mcal .d .tm b { color: var(--ink-2); font-weight: 600; }
.mcal .d.s-late, .mcal .d.s-early { background: var(--warn-soft); border-color: #f0ddc0; }
.mcal .d.s-absent { background: var(--danger-soft); border-color: #f3d2ce; }
.mcal .d.s-missing { background: #fffdf2; border-color: #ece1b8; }
.mcal .d.s-leave { background: var(--info-soft); border-color: #d3e3f1; }
.mcal .d.s-ot { background: var(--ok-soft); border-color: #cfe8d8; }
.mcal .d.s-rest { background: #fafbfa; }
@media (max-width: 760px) {
  .mcal { gap: 5px; padding: 10px 8px 4px; }
  .mcal .d { min-height: 70px; padding: 5px 6px; border-radius: 8px; }
  .mcal .d .tm { font-size: 9.5px; }
  /* 手机上「应上下班」整月都一样，压缩掉，留「实打卡 + 迟到早退」更有用 */
  .mcal .d .tm.should { display: none; }
  .mcal .d .dn .badge { display: none; }
}

.legend {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  padding: 4px 18px 16px; font-size: 11.5px; color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); display: inline-block; }

/* ============================================================
   考勤规则同步页：按部门分组勾选 + 覆盖警示
   ============================================================ */
.sync-group { border-top: 1px solid var(--line-soft); }
.sync-group:first-of-type { border-top: none; }
.sync-gh {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 8px; font-size: 13px;
}
.sync-gh b { color: var(--ink); }
.sync-warn {
  margin: 10px 16px 0; padding: 10px 14px;
  border-radius: 10px; background: var(--warn-soft);
  border: 1px solid #f0ddc0; color: var(--ink-2);
  font-size: 12.5px; line-height: 1.7;
}
.sync-warn b { color: #8a5a00; }
tr.picked td { background: var(--brand-soft) !important; }

/* 同步页：园区筛选 + 行内单独设时间 */
.org-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.org-tabs .chip { text-decoration: none; }
.pick-lbl {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-2); white-space: nowrap;
}
/* 行内时间框不在 .field 里，单独给一套基础样式（照抄 .field .inp 的观感，缩小一号） */
.tb .inp.wt {
  height: 30px; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0 6px; font-size: 12.5px; color: var(--ink); background: #fff;
  font-family: inherit; vertical-align: middle;
}
.tb .inp.wt:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 111, 92, .10);
}
.tb .inp.wt:disabled { background: var(--bg); color: var(--muted); border-style: dashed; }


/* ============================================================
   可搜索下拉（单选）：原生 select 藏起来，只留输入框 + 弹层
   ============================================================ */
.ss { position: relative; }
.ss-native {
  position: absolute; left: 0; top: 0;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.ss-inp { padding-right: 30px !important; }
.ss::after {
  content: ""; position: absolute; right: 12px; top: 50%;
  width: 6px; height: 6px; border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.ss-pop {
  position: absolute; z-index: 70; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px -8px rgba(16, 44, 36, .30), 0 2px 6px rgba(16, 44, 36, .06);
  max-height: 264px; overflow-y: auto;
}
.ss-pop.is-fixed { position: fixed; }
.ss-opt {
  padding: 8px 10px; border-radius: 7px; font-size: 13px; line-height: 1.4;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-opt.hot, .ss-opt:hover { background: var(--brand-softer); }
.ss-opt.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.ss-opt b { color: var(--brand); font-weight: 600; }
.ss-empty { padding: 14px 10px; font-size: 12.5px; color: var(--muted); text-align: center; }
.ss-inp.bad { border-color: #e0a49c; background: #fffbfa; }


/* ============================================================
   组织架构树（折叠阶梯）
   ============================================================ */
.og-panel { padding-bottom: 4px; }
.og-org { border-top: 1px solid var(--line-soft); }
.og-org > summary,
.og-dept > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  transition: background .12s;
}
.og-org > summary::-webkit-details-marker,
.og-dept > summary::-webkit-details-marker { display: none; }
.og-org > summary {
  padding: 13px 16px; font-size: 13.5px;
}
.og-org > summary:hover { background: var(--brand-softer); }
.og-org[open] > summary { background: var(--brand-softer); border-bottom: 1px solid var(--line-soft); }

.og-caret {
  width: 0; height: 0; flex: 0 0 auto;
  border-left: 5px solid var(--muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform .15s;
}
details[open] > summary > .og-caret { transform: rotate(90deg); }

.og-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px; color: var(--brand-ink); background: var(--brand-soft);
  padding: 1px 6px; border-radius: 5px; flex: 0 0 auto;
}
.og-code.sm { font-size: 10.5px; background: #eff2f1; color: var(--muted); }
.og-name { font-size: 13.5px; color: var(--ink); }
.og-count { font-size: 12px; color: var(--muted); margin-left: 4px; }
.og-count b { color: var(--ink-2); font-weight: 600; }
.og-count.sm { font-size: 11.5px; }
.og-sub { font-size: 11.5px; color: var(--muted); }
.og-ops { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.og-ops .btn.xs { height: 26px; padding: 0 9px; font-size: 12px; }

.og-org-body { padding: 4px 14px 10px 38px; }
.og-dept { border-left: 1px dashed var(--line); padding-left: 10px; margin: 2px 0; }
.og-dept > summary { padding: 7px 6px; border-radius: 7px; font-size: 13px; }
.og-dept > summary:hover { background: #f6f9f8; }
.og-dept-name { color: var(--ink-2); font-weight: 500; }
.og-dept-body { padding-left: 22px; padding-bottom: 4px; }

/* 岗位行 = 可点击展开的 details：点开看该岗位的员工 */
.og-pos {
  border: 1px solid transparent; border-radius: 7px; margin: 1px 0;
  font-size: 12.5px;
}
.og-pos > summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 6px 10px; cursor: pointer; list-style: none; border-radius: 7px;
}
.og-pos > summary::-webkit-details-marker { display: none; }
.og-pos > summary:hover { background: #f6f9f8; }
.og-pos > summary .og-caret { margin-right: -2px; }
.og-pos[open] > summary { background: #f1f6f4; }
.og-pos-title { color: var(--ink); font-weight: 500; }
.chip-cat {
  font-size: 11px; color: var(--ink-2); background: #eff2f1;
  padding: 1px 6px; border-radius: 4px;
}
.og-time { font-size: 12px; color: var(--ink-2); }
.og-pos .og-n { color: var(--brand-ink, #1f6f5c); }

/* 岗位下的员工清单：默认收起，岗位展开后显示 */
.og-emps {
  display: none; flex-wrap: wrap; gap: 4px 6px;
  flex-basis: 100%; margin: 0 10px 4px 26px; padding: 6px 0 2px;
  border-top: 1px dotted var(--line-soft, #e6ecea);
}
.og-pos[open] > .og-emps { display: flex; }
.og-emp {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 999px; font-size: 12px;
  background: var(--brand-softer, #eaf3ef); color: var(--brand-ink, #1f6f5c);
  text-decoration: none; border: 1px solid transparent;
}
.og-emp:hover { border-color: var(--brand, #1f6f5c); }
.og-emp-name { font-weight: 500; }
.og-empty.sm { padding: 2px 0 0; font-size: 12px; }
.badge.sm { font-size: 10px; padding: 0 5px; line-height: 16px; }

/* 组织架构 / 主数据：部门节点与部门列表上的「+ 岗位」入口 */
.og-add {
  margin-left: 2px; padding: 0 8px; border-radius: 999px; font-size: 11px;
  line-height: 18px; text-decoration: none; color: var(--brand, #1f6f5c);
  background: var(--brand-softer, #eaf3ef); border: 1px solid var(--brand-soft, #cfe6dd);
}
.og-add:hover { background: var(--brand-soft, #cfe6dd); }

.og-positions { margin-top: 6px; padding: 6px 0 2px; border-top: 1px dashed var(--line); }
.og-pos-h { font-size: 12px; color: var(--ink-2); padding: 2px 6px 6px; }
.og-empty { padding: 10px 8px; font-size: 12.5px; color: var(--muted); }
/* 部门下「一个人都没有」的岗位定义：一行灰字带过，不占可展开行 */
.og-unused {
  margin: 2px 0 4px 6px; padding: 2px 0; font-size: 12px;
  color: var(--muted); line-height: 1.7;
}
.og-foot {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-top: 1px solid var(--line-soft); font-size: 12px;
}

.og-bulk {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 80; display: flex; align-items: center; gap: 10px;
  min-width: 380px; padding: 10px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px -10px rgba(16, 44, 36, .28);
  font-size: 12.5px; color: var(--ink-2);
}
.og-bulk[hidden] { display: none; }
.og-bulk .grow { flex: 1; }

@media (max-width: 760px) {
  .og-org-body { padding-left: 12px; }
  .og-ops { gap: 4px; }
  .og-count { display: none; }
  .og-pos { flex-wrap: wrap; }
  .og-bulk { left: 10px; right: 10px; transform: none; min-width: 0; bottom: 10px; }
}

/* 考勤月度汇总：园区分组行 / 合计行 / 提示行 */
tr.grp > td { background: var(--brand-softer); font-weight: 650; color: var(--brand-ink); }
tr.total > td { font-weight: 700; border-top: 2px solid var(--line); background: var(--brand-softer); }
.tb .num { font-variant-numeric: tabular-nums; }
.hint { margin: 0; padding: 2px 16px 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ============ 审批流页面（todo / approvals / approval_detail） ============ */
.cols-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
table.kv th{width:34%;text-align:left;font-weight:500;color:var(--muted);padding:8px 10px;background:var(--brand-softer,#f7f8fa);white-space:nowrap}
table.kv td{padding:8px 10px}
ol.steps{list-style:none;margin:0;padding:6px 14px 8px}
ol.steps li{padding:8px 0 8px 14px;border-left:2px solid var(--line,#e5e7eb);position:relative;font-size:13.5px;color:var(--muted)}
ol.steps li b{color:inherit;font-weight:600}
ol.steps li.cur{color:var(--brand,#1f6f5c);border-left-color:var(--brand,#1f6f5c)}
ol.steps li.cur b{color:var(--brand,#1f6f5c)}
.form-inline{display:flex;gap:8px;align-items:center;padding:10px 14px;flex-wrap:wrap}
.form-inline .inp{flex:1;min-width:160px}
@media (max-width:760px){
  .cols-2{grid-template-columns:1fr}
  table.kv th{width:40%}
}

/* ============================================================
   导航重组：可折叠分组（系统管理默认收起）
   ============================================================ */
.nav-fold { margin-top: 14px; }
.nav-fold-t {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  list-style: none;
}
.nav-fold-t::-webkit-details-marker { display: none; }
.nav-fold-t::after {
  content: '▸'; font-size: 10px; opacity: .7; flex: 0 0 auto;
  transition: transform .15s;
}
.nav-fold[open] > .nav-fold-t::after { transform: rotate(90deg); }
.nav-fold[open] > .nav-fold-t { color: var(--ink-2); }

/* ============================================================
   下拉菜单按钮：把多个同类入口收进一个"发起流程"按钮
   ============================================================ */
.btn-menu { position: relative; display: inline-block; }
.btn-menu > summary {
  list-style: none; cursor: pointer; user-select: none;
}
.btn-menu > summary::-webkit-details-marker { display: none; }
.btn-menu > summary .caret { font-size: 10px; opacity: .8; margin-left: 2px; }
.btn-menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); min-width: 152px; padding: 5px;
  display: flex; flex-direction: column;
}
.btn-menu-list a {
  padding: 9px 12px; border-radius: 7px; text-decoration: none;
  color: var(--ink-2); font-size: 13px; white-space: nowrap;
}
.btn-menu-list a:hover { background: var(--brand-softer); color: var(--brand-ink); }
