/* ============================================================
 * 工资条管家 · 设计系统  —— Stripe 风格
 * 关键词：冷白底 / 柔光渐变 / 旗舰紫 / 大扩散软阴影 / 克制圆角
 * 管理端 / 员工端 / 登录页 共用
 * ============================================================ */

:root {
  /* 底色与文字 */
  --bg: #f6f9fc;
  --card: #ffffff;
  --ink: #0a2540;
  --text: #3c4257;
  --text-2: #525f7f;
  --muted: #8792a2;

  /* 品牌与语义色 */
  --primary: #635bff;
  --primary-600: #4f46e8;
  --primary-700: #3b34c4;
  --primary-50: #f3f2ff;
  --cyan: #00b8e6;
  --indigo: #7a73ff;
  --success: #0e9f6e;
  --success-50: #e8f8f1;
  --warn: #e8a30c;
  --warn-50: #fff7e6;
  --danger: #df1b41;
  --danger-50: #fdeef1;

  /* 描边 */
  --border: rgba(16, 45, 94, .09);
  --border-2: rgba(16, 45, 94, .16);

  /* 形状 */
  --radius: 12px;
  --radius-sm: 8px;

  /* 阴影：Stripe 式的低对比大扩散 */
  --shadow-xs: 0 1px 2px rgba(50, 50, 93, .06);
  --shadow: 0 2px 5px -1px rgba(50, 50, 93, .10), 0 1px 3px -1px rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 10px -2px rgba(50, 50, 93, .12), 0 2px 6px -2px rgba(0, 0, 0, .05);
  --shadow-lg: 0 18px 42px -12px rgba(50, 50, 93, .18), 0 6px 16px -8px rgba(0, 0, 0, .08);
  --shadow-brand: 0 8px 22px -6px rgba(99, 91, 255, .55);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* 全局柔光底色 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(860px 520px at 6% -8%, rgba(99, 91, 255, .10), transparent 62%),
    radial-gradient(720px 440px at 104% 4%, rgba(0, 184, 230, .10), transparent 60%),
    radial-gradient(680px 460px at 52% 108%, rgba(122, 115, 255, .06), transparent 62%);
}
a { color: var(--primary); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cfd7e3; border-radius: 8px; border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #b6c1d2; background-clip: padding-box; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 940px; background: var(--card); border-radius: 16px;
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1.05fr 1fr;
  overflow: hidden; border: 1px solid rgba(255, 255, 255, .8);
}
.login-side {
  color: #fff; padding: 52px 42px; position: relative; overflow: hidden;
  background: linear-gradient(115deg, #6d66ff 0%, #635bff 34%, #7c5cff 62%, #00b8e6 100%);
}
.login-side::before {
  content: ''; position: absolute; left: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); filter: blur(6px);
}
.login-side::after {
  content: ''; position: absolute; right: -80px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(0, 212, 255, .22); filter: blur(4px);
}
.login-side h1 { font-size: 27px; margin: 0 0 10px; letter-spacing: -.3px; position: relative; }
.login-side p { opacity: .85; margin: 0 0 28px; font-size: 13px; position: relative; }
.login-side ul { list-style: none; padding: 0; margin: 0; position: relative; }
.login-side li { padding: 9px 0 9px 26px; position: relative; font-size: 13.5px; opacity: .95; }
.login-side li::before {
  content: ''; position: absolute; left: 0; top: 15px; width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255, 255, 255, .28); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6);
}
.login-form { padding: 52px 46px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { margin: 0 0 6px; font-size: 21px; color: var(--ink); letter-spacing: -.3px; }
.login-form .sub { color: var(--muted); margin-bottom: 28px; font-size: 13px; }
@media (max-width: 780px) {
  .login-card { grid-template-columns: 1fr; }
  .login-side { display: none; }
}

/* ---------- 表单控件 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font); background: #fff; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 91, 255, .14);
}
.textarea { min-height: 74px; resize: vertical; }
.input::placeholder { color: #b4bdcc; }
.select { appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238792a2' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: linear-gradient(180deg, #7a73ff, #635bff); color: #fff; font-size: 14px;
  cursor: pointer; font-family: var(--font); font-weight: 500; white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .12s;
  box-shadow: 0 2px 4px rgba(50, 50, 93, .12), 0 1px 2px rgba(99, 91, 255, .25);
}
.btn:hover {
  background: linear-gradient(180deg, #6d66ff, #554be0); transform: translateY(-1px); box-shadow: var(--shadow-brand);
}
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(50, 50, 93, .15); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { background: #fff; color: var(--text-2); border-color: var(--border-2); box-shadow: var(--shadow-xs); }
.btn.ghost:hover { background: #fafbfe; color: var(--ink); border-color: rgba(16, 45, 94, .24); box-shadow: var(--shadow-md); }
.btn.primary-light { background: var(--primary-50); color: var(--primary-700); border-color: #dedbff; box-shadow: none; }
.btn.primary-light:hover { background: #eceaff; box-shadow: 0 4px 12px -4px rgba(99, 91, 255, .3); }
.btn.danger { background: linear-gradient(180deg, #e83a58, #df1b41); }
.btn.danger:hover { background: linear-gradient(180deg, #e02a4a, #c91537); box-shadow: 0 8px 22px -6px rgba(223, 27, 65, .5); }
.btn.success { background: linear-gradient(180deg, #12b37c, #0e9f6e); }
.btn.success:hover { background: linear-gradient(180deg, #0fa872, #0a8c60); box-shadow: 0 8px 22px -6px rgba(14, 159, 110, .5); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.icon { padding: 6px 9px; }
.btn.block { width: 100%; }

/* 分段控件（批次详情 tab） */
.btn[data-act="batch-tab"] { border-radius: 999px; padding: 7px 15px; box-shadow: none; font-weight: 500; }
.btn[data-act="batch-tab"].ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn[data-act="batch-tab"].ghost:hover { background: var(--primary-50); color: var(--primary-700); transform: none; box-shadow: none; }

/* ---------- 管理端布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 20;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px);
  border-right: 1px solid var(--border); color: var(--text);
}
.sidebar .brand {
  padding: 18px 18px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 11px;
}
.brand img.logo {
  width: 32px; height: 32px; border-radius: 8px; display: block; flex: none;
  object-fit: contain; background: transparent;
}
.brand .txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand .txt > span:first-child, .brand .txt { color: var(--ink); }
.brand .txt small { font-size: 10.5px; color: var(--muted); font-weight: 500; letter-spacing: 1.2px; }
.nav { padding: 12px 12px; flex: 1; overflow-y: auto; }
.nav-group {
  padding: 14px 12px 6px; font-size: 10.5px; letter-spacing: 1.4px;
  color: var(--muted); text-transform: uppercase; font-weight: 600;
}
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: var(--text-2); font-size: 14px; cursor: pointer; margin-bottom: 2px;
  transition: background .15s, color .15s; position: relative;
}
.nav a:hover { background: #f4f6fb; color: var(--ink); }
.nav a.active {
  background: linear-gradient(90deg, rgba(99, 91, 255, .13), rgba(99, 91, 255, .05));
  color: var(--primary-700); font-weight: 600;
}
.nav a.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #7a73ff, #635bff);
  box-shadow: 0 0 10px rgba(99, 91, 255, .55);
}
.nav .ico { width: 18px; height: 18px; flex: none; opacity: .85; }
.sidebar .foot { padding: 12px; border-top: 1px solid var(--border); }
.side-user {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  background: #f7f9fd; border: 1px solid var(--border); transition: background .15s;
}
.side-user:hover { background: #f2f5fc; }
.side-user .av {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #8b84ff, #635bff); color: #fff; font-weight: 600; font-size: 13px;
  box-shadow: 0 2px 8px -2px rgba(99, 91, 255, .5);
}
.side-user .meta { min-width: 0; flex: 1; line-height: 1.35; }
.side-user .nm { color: var(--ink); font-size: 13px; font-weight: 500; }
.side-user .co { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .out { color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.side-user .out:hover { color: var(--danger); }

.main { margin-left: 240px; flex: 1; min-width: 0; }
.topbar {
  height: 64px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
  justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 10;
}
.topbar h2 { font-size: 18px; margin: 0; font-weight: 600; color: var(--ink); letter-spacing: -.3px; }
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.topbar .chip {
  padding: 4px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px; box-shadow: var(--shadow-xs);
}
/* 顶部「工资条入口」按钮：把原本裸露的网址文本换成可点击按钮 */
.topbar .chip-link {
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none; cursor: pointer;
  font-weight: 600; letter-spacing: .2px;   /* 加粗：这是入口按钮，不是说明文字 */
  color: var(--primary); border-color: rgba(99, 91, 255, .35);
  background: linear-gradient(180deg, #fff, var(--primary-50));
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.topbar .chip-link::after { content: '↗'; font-size: 11px; line-height: 1; opacity: .75; }
.topbar .chip-link:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 12px -3px rgba(99, 91, 255, .5);
}
.topbar .chip-link:hover::after { opacity: 1; }
.topbar .chip-link:active { transform: translateY(1px); }
.user-chip { display: flex; align-items: center; gap: 9px; color: var(--text-2); padding-left: 4px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #8b84ff, #635bff); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
  box-shadow: 0 2px 8px -2px rgba(99, 91, 255, .5);
}
.content { padding: 26px 30px 44px; max-width: 1480px; }
@media (max-width: 1100px) { .content { padding: 20px; } }
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar .brand span, .nav a span, .nav-group, .side-user .meta, .side-user .out { display: none; }
  .sidebar .brand, .nav a { justify-content: center; }
  .nav a { padding: 10px; }
  .main { margin-left: 64px; }
}

/* ---------- 卡片 / 栅格 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card + .card { margin-top: 18px; }
.card-head {
  padding: 15px 20px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #fcfdff);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); position: relative; padding-left: 11px; }
.card-head h3::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, #8b84ff, #635bff);
}
.card-head .desc { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.card-body { padding: 20px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } }

/* ---------- 统计卡 ---------- */
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .16s, box-shadow .16s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat::before {
  content: ''; position: absolute; right: -26px; top: -26px; width: 86px; height: 86px;
  border-radius: 50%; background: var(--c); opacity: .10; filter: blur(2px);
}
.stat::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(16, 45, 94, .05); }
.stat .label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.stat .label::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none;
  box-shadow: 0 0 0 3px rgba(16, 45, 94, .04);
}
.stat .value { font-size: 27px; font-weight: 600; margin-top: 7px; letter-spacing: -.8px; color: var(--ink); }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat .bar {
  height: 3px; background: var(--c); border-radius: 0 3px 3px 0; position: absolute;
  left: 0; bottom: 0; z-index: 1; transition: width .5s ease;
}
.stat.s1 { --c: var(--primary); }
.stat.s2 { --c: var(--success); }
.stat.s3 { --c: var(--warn); }
.stat.s4 { --c: var(--danger); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; padding: 12px 16px; background: #fbfcfe; color: var(--text-2); font-weight: 600;
  border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 12.5px; letter-spacing: .3px;
}
table.tbl td { padding: 12px 16px; border-bottom: 1px solid rgba(16, 45, 94, .06); vertical-align: middle; color: var(--text); }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: #f9fbfe; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr td:first-child { border-left: 2px solid transparent; }
table.tbl tbody tr:hover td:first-child { border-left-color: var(--primary); }
table.tbl td.r, table.tbl th.r { text-align: right; }
table.tbl td.c, table.tbl th.c { text-align: center; }
table.tbl td b { color: var(--ink); font-weight: 600; }
.link-btn { color: var(--primary-700); cursor: pointer; font-size: 13px; transition: color .12s; }
.link-btn:hover { color: var(--primary); text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { color: #b81137; }
/* 文字按钮用 button 实现时要清掉浏览器默认外观 */
button.link-btn {
  background: none; border: none; padding: 2px 2px; font-family: inherit;
  font-size: 13px; line-height: 1.5; white-space: nowrap;
}
button.link-btn.danger { color: var(--st-disputed); }
button.link-btn.danger:hover { color: #a5211b; }
.empty { text-align: center; padding: 52px 20px; color: var(--muted); }
.empty .big {
  width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center;
  margin: 0 auto 12px; font-size: 24px; opacity: .85;
  background: linear-gradient(135deg, rgba(99, 91, 255, .12), rgba(0, 184, 230, .12));
}

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500; line-height: 1.7; white-space: nowrap;
}
.badge.gray { background: #f3f5f9; color: #667085; }
.badge.blue { background: var(--primary-50); color: var(--primary-700); }
.badge.green { background: var(--success-50); color: #0a7a55; }
.badge.orange { background: var(--warn-50); color: #96660a; }
.badge.red { background: var(--danger-50); color: #b81137; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 140px; }
.toolbar .grow { flex: 1; }
.pager {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 20px;
  border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); background: #fcfdff;
}
.pager .pages { display: flex; gap: 6px; align-items: center; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--border-2);
  background: #fff; cursor: pointer; font-size: 13px; color: var(--text-2); transition: .12s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary-700); }
.page-btn.active {
  background: linear-gradient(180deg, #7a73ff, #635bff); color: #fff; border-color: transparent;
  box-shadow: 0 4px 10px -2px rgba(99, 91, 255, .5);
}
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(10, 37, 64, .32); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
  backdrop-filter: blur(4px);
}
.mask.show { display: flex; animation: fadeIn .16s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 520px; max-height: 88vh;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: modalIn .2s cubic-bezier(.2, .8, .3, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal.wide { max-width: 880px; }
.modal-head { padding: 17px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: linear-gradient(180deg, #fff, #fcfdff); }
.modal-head h3 { margin: 0; font-size: 16px; color: var(--ink); letter-spacing: -.2px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #fbfcfe; }
.close-x {
  cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; background: none; border: none;
  width: 30px; height: 30px; border-radius: 8px; transition: .12s;
}
.close-x:hover { color: var(--ink); background: #f3f5f9; }

/* ---------- 自研日期/月份选择器 ---------- */
.picker-panel {
  position: fixed; z-index: 300; width: 278px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 11px; user-select: none;
  animation: pickerIn .12s ease;
}
@keyframes pickerIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.picker-head button {
  width: 30px; height: 30px; border: none; background: #f3f5f9; border-radius: 8px;
  cursor: pointer; font-size: 16px; color: var(--text); line-height: 1; transition: background .12s;
}
.picker-head button:hover { background: #e8ecf4; }
.picker-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.picker-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.picker-week span { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.picker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.picker-grid.months { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.picker-grid button, .picker-foot button {
  border: none; background: none; cursor: pointer; border-radius: 8px;
  font-size: 13px; color: var(--text); padding: 0; transition: background .12s;
}
.picker-grid.days button { height: 32px; }
.picker-grid.days button:hover { background: #eef2f9; }
.picker-grid.days button.today { color: var(--primary); font-weight: 700; }
.picker-grid.days button.sel { background: linear-gradient(180deg, #7a73ff, #635bff); color: #fff; font-weight: 600; box-shadow: 0 3px 8px -2px rgba(99, 91, 255, .5); }
.picker-grid.months button { height: 38px; }
.picker-grid.months button:hover { background: #eef2f9; }
.picker-grid.months button.sel { background: linear-gradient(180deg, #7a73ff, #635bff); color: #fff; font-weight: 600; box-shadow: 0 3px 8px -2px rgba(99, 91, 255, .5); }
.picker-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.picker-foot button { padding: 6px 12px; background: #f3f5f9; font-size: 12.5px; }
.picker-foot button:hover { background: #e8ecf4; }

/* ---------- 提示 ---------- */
.toast-box { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  padding: 11px 20px; border-radius: 10px; background: #fff; box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary); font-size: 13.5px; max-width: 480px; color: var(--ink);
  animation: slideDown .22s cubic-bezier(.2, .8, .3, 1);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.info { background: var(--primary-50); color: #3d34b5; border-color: #dedbff; }
.alert.warn { background: var(--warn-50); color: #8a6207; border-color: #f7e5b8; }
.alert.error { background: var(--danger-50); color: #ac1436; border-color: #f8d3da; }

/* ---------- 上传区 ---------- */
.drop {
  border: 2px dashed rgba(16, 45, 94, .16); border-radius: var(--radius); padding: 34px; text-align: center;
  background: linear-gradient(180deg, #fdfdff, #f9fbfe); cursor: pointer; transition: .16s;
}
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-50); }
.drop .big {
  width: 52px; height: 52px; margin: 0 auto; border-radius: 15px; display: grid; place-items: center;
  font-size: 22px; color: var(--primary-700);
  background: linear-gradient(135deg, rgba(99, 91, 255, .14), rgba(0, 184, 230, .12));
}
.drop p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- 步骤条 ---------- */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.step { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.step .n {
  width: 26px; height: 26px; border-radius: 50%; background: #f1f4f9; color: #98a3b5; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.step.done .n { background: var(--success); color: #fff; }
.step.active .n { background: linear-gradient(180deg, #7a73ff, #635bff); color: #fff; box-shadow: 0 3px 10px -2px rgba(99, 91, 255, .55); }
.step.active { color: var(--ink); font-weight: 500; }
.step-line { flex: 1; height: 2px; background: linear-gradient(90deg, rgba(16, 45, 94, .10), rgba(16, 45, 94, .05)); margin: 0 12px; min-width: 20px; }

/* ---------- 二维码发放 ---------- */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.qr-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center;
  background: #fff; transition: transform .16s, box-shadow .16s;
}
.qr-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.qr-card img { width: 130px; height: 130px; }
.qr-card .nm { font-weight: 600; margin-top: 8px; font-size: 14px; color: var(--ink); }
.qr-card .dp { color: var(--muted); font-size: 12px; }

/* 装饰性光斑：只负责好看，一律不参与命中测试。
   否则这些绝对定位的圆会盖在按钮上把点击吃掉（工作台 hero 的按钮曾被 .hero::after 挡住） */
.hero::before, .hero::after,
.login-side::before, .login-side::after,
.emp-head::before,
.stat::before, .stat::after,
.ring::after,
.timeline::before { pointer-events: none; }

/* ---------- 概览页组件 ---------- */
.hero {
  border-radius: 16px; padding: 26px 28px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(105deg, #6d66ff 0%, #635bff 30%, #7c5cff 58%, #00b8e6 100%);
  box-shadow: 0 22px 48px -20px rgba(80, 70, 200, .55);
}
.hero::before {
  content: ''; position: absolute; left: -40px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); filter: blur(8px);
}
.hero::after {
  content: ''; position: absolute; right: -30px; bottom: -110px; width: 280px; height: 280px; border-radius: 50%;
  background: rgba(0, 212, 255, .26); filter: blur(10px);
}
.hero .hi { font-size: 12.5px; opacity: .85; letter-spacing: .4px; position: relative; }
.hero h1 { margin: 6px 0 6px; font-size: 22px; font-weight: 600; position: relative; letter-spacing: -.4px; }
.hero .sub { font-size: 13px; opacity: .88; position: relative; max-width: 640px; line-height: 1.7; }
.hero .acts { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.hero .acts .btn {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; backdrop-filter: blur(8px); box-shadow: none;
}
.hero .acts .btn:hover { background: rgba(255, 255, 255, .26); transform: translateY(-1px); }
.hero .acts .btn.solid { background: #fff; color: var(--primary-700); border-color: #fff; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .25); }
.hero .acts .btn.solid:hover { background: #f7f7ff; }

.ring {
  width: 96px; height: 96px; border-radius: 50%; flex: none; display: grid; place-items: center;
  position: relative; background: conic-gradient(from -90deg, var(--success) calc(var(--p) * 1%), rgba(16, 45, 94, .07) 0);
  box-shadow: inset 0 0 0 1px rgba(16, 45, 94, .04);
}
.ring::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); }
.ring .txt { position: relative; z-index: 1; text-align: center; line-height: 1.2; }
.ring .txt b { display: block; font-size: 21px; font-weight: 600; letter-spacing: -.6px; color: var(--ink); }
.ring .txt span { font-size: 11px; color: var(--muted); }

.stack { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: rgba(16, 45, 94, .06); }
.stack i { display: block; height: 100%; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: rgba(16, 45, 94, .08); border-radius: 2px; }
.timeline .item { position: relative; padding: 9px 0; }
.timeline .item::before {
  content: ''; position: absolute; left: -18px; top: 15px; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary); box-shadow: 0 0 0 3px rgba(99, 91, 255, .14);
}

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.quick {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: #fff;
  display: flex; gap: 13px; align-items: flex-start; cursor: pointer; color: var(--text);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.quick:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(99, 91, 255, .35); text-decoration: none; }
.quick .qi {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  font-size: 17px; color: var(--primary-700);
  background: linear-gradient(135deg, rgba(99, 91, 255, .14), rgba(0, 184, 230, .10));
}
.quick .qt { font-weight: 600; font-size: 14px; color: var(--ink); }
.quick .qd { color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.6; }

/* ---------- 员工端 ---------- */
.emp-wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 60px; min-height: 100vh; }
.emp-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; border: 1px solid var(--border); }
.emp-head {
  color: #fff; padding: 26px 20px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #6d66ff 0%, #635bff 40%, #00b8e6 130%);
}
.emp-head::before {
  content: ''; position: absolute; left: -50px; top: -60px; width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); filter: blur(6px);
}
.emp-head .co { font-size: 13px; opacity: .88; position: relative; }
.emp-head .tt { font-size: 19px; font-weight: 600; margin-top: 4px; position: relative; }
.emp-head .amt { font-size: 34px; font-weight: 700; margin-top: 10px; letter-spacing: -1px; position: relative; }
.emp-head .amt small { font-size: 14px; font-weight: 500; opacity: .9; margin-right: 3px; }
.emp-body { padding: 4px 18px 18px; }
.sec-title { font-size: 12.5px; color: var(--muted); padding: 14px 0 8px; font-weight: 600; letter-spacing: .4px; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px dashed rgba(16, 45, 94, .08); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-2); }
.kv .v { font-weight: 500; color: var(--ink); }
.kv .v.plus { color: var(--success); }
.kv .v.minus { color: var(--danger); }
.kv.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; font-size: 15px; }
.kv.total .v { color: var(--primary-700); font-weight: 700; font-size: 19px; }
.emp-actions { display: flex; gap: 10px; padding: 0 18px 20px; }
.emp-actions .btn { flex: 1; }
.emp-note { font-size: 12px; color: var(--muted); text-align: center; padding: 0 18px 18px; line-height: 1.7; }
.lock-box { padding: 28px 20px; text-align: center; }
.lock-box .icon {
  width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center;
  font-size: 26px; opacity: .85;
  background: linear-gradient(135deg, rgba(99, 91, 255, .14), rgba(0, 184, 230, .12));
}
.hist-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed rgba(16, 45, 94, .08); font-size: 13.5px; }
.hist-item:last-child { border-bottom: none; }

/* ---------- 员工访问密码 ---------- */
.pwd-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.pwd-tab {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border-2);
  background: #fff; color: var(--muted); font-size: 13.5px; cursor: pointer; transition: .14s;
}
.pwd-tab.active {
  background: var(--primary-50); border-color: var(--primary); color: var(--primary-700); font-weight: 600;
  box-shadow: 0 2px 8px -2px rgba(99, 91, 255, .35);
}
.pattern-pad { display: grid; place-items: center; margin: 6px auto 10px; touch-action: none; }
.pattern-pad canvas { touch-action: none; display: block; }
.pattern-tip { font-size: 13px; color: var(--muted); margin: 6px 0 14px; min-height: 20px; }

/* ============================================================
 * v2 · 可用性与信息密度改造（P0 / P1）
 * 发放四态语义色 / 筛选行 / 步骤条 / ⋯操作菜单 / 行展开抽屉
 * 批量操作条 / 骨架屏 / 空状态 / 移动端 Tab Bar / 无障碍
 * ============================================================ */
:root {
  --brand: #635bff;
  --brand-400: #7a73ff;
  --brand-50: #f3f2ff;
  --cyan: #00b8e6;
  --mint: #11efe3;
  --line: #e3e8ee;
  --ink-3: #697386;

  /* 发放四态 —— 全产品唯一语义，禁止复用作其他含义 */
  --st-confirmed: #0e9f6e;   --st-confirmed-bg: #e6f6ef;
  --st-viewed: #2f6fed;      --st-viewed-bg: #eaf1fe;
  --st-disputed: #dc4b44;    --st-disputed-bg: #fdedec;
  --st-unviewed: #667085;    --st-unviewed-bg: #f1f4f8;
  --st-draft: #c4700a;       --st-draft-bg: #fdf3e3;
}

/* ---------- 四态徽章（对比度均 ≥ 4.5:1） ---------- */
.badge.st-confirmed { background: var(--st-confirmed-bg); color: #0a7a55; }
.badge.st-viewed    { background: var(--st-viewed-bg);    color: #1f4fbd; }
.badge.st-disputed  { background: var(--st-disputed-bg);  color: #a5211b; }
.badge.st-unviewed  { background: var(--st-unviewed-bg);  color: var(--st-unviewed); }
.badge.st-draft     { background: var(--st-draft-bg);     color: #8a4f04; }
.badge.st-published { background: #e6f6ef;                color: #0a7a55; }
.badge.st-closed    { background: #eef1f7;                color: #4b5a70; }

/* 危险操作：红色文字 + 淡红描边，不用实心红 */
.btn.danger-text { background: #fff; color: var(--st-disputed); border-color: #f3cfcc; box-shadow: var(--shadow-xs); }
.btn.danger-text:hover { background: var(--st-disputed-bg); border-color: #eab6b2; color: #a5211b; box-shadow: var(--shadow-md); }

/* ---------- 通用可见性 ---------- */
[hidden] { display: none !important; }

/* ---------- 表格：48px 行高 + 粘性表头 ---------- */
table.tbl td { padding: 13px 16px; }
.table-scroll { max-height: calc(100vh - 250px); overflow: auto; }
.table-scroll thead th { position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px 0 var(--border); }
table.tbl tr[data-resigned="1"] td { opacity: .6; }
/* 离职行整体淡化，但复选框必须清晰可辨，否则看着像没勾上 */
table.tbl tr[data-resigned="1"] td.ck-cell { opacity: 1; }
table.tbl tr[data-resigned="1"] .ava { filter: grayscale(1); }

/* 表内头像 + 姓名（合并列） */
.who { display: flex; align-items: center; gap: 10px; }
.ava {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--brand-400), var(--brand));
  box-shadow: 0 2px 6px -2px rgba(99, 91, 255, .5);
}
.who .nm { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.who .sub { font-size: 11.5px; color: var(--muted); }
.cell-2 { display: flex; flex-direction: column; line-height: 1.45; }
.cell-2 .t1 { font-weight: 600; color: var(--ink); }
.cell-2 .t2 { font-size: 12px; color: var(--muted); }

/* ---------- KPI 卡：去掉恒 100% 装饰条，改补充说明 ---------- */
.stat { padding: 15px 18px 17px; }
.stat .hint { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.stat .hint b { color: var(--ink-3); font-weight: 600; }
.stat.alert { border-color: #f4cdca; background: linear-gradient(180deg, #fff, #fffbfb); }
.stat.alert .value { color: var(--st-disputed); }
.stat .trend { font-size: 12px; color: var(--st-confirmed); }
.stat .trend.down { color: var(--st-disputed); }

/* ---------- 统计卡包装容器 ---------- */
.kpi-row { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .kpi-row { grid-template-columns: 1fr; } }

/* ---------- 筛选行（独立成行，不再和卡片标题挤在一起） ---------- */
.card-head .toolbar { gap: 8px; }
.fbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 18px; border-bottom: 1px solid var(--border); background: #fcfdff;
}
.fbar .input.search { width: 250px; min-width: 180px; }
.fbar .select { width: auto; min-width: 118px; }
.fbar .spacer { flex: 1; }
.fbar .meta { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .fbar .input.search { width: 100%; } .fbar .spacer { display: none; } }

/* ---------- 步骤条（替代编号 Tab，由批次状态驱动） ---------- */
.stepper {
  display: flex; align-items: flex-start; list-style: none; margin: 0; padding: 4px 0 0;
}
.stepper .stp { position: relative; flex: 1; min-width: 0; padding: 0 2px; }
.stepper .stp + .stp::before {
  content: ''; position: absolute; top: 16px; left: -50%; right: 50%;
  height: 2px; background: var(--line); z-index: 0;
}
.stepper .stp.done + .stp::before { background: var(--st-confirmed); }
.stepper .stp > button {
  position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column;
  align-items: center; gap: 6px; padding: 0; border: none; background: none;
  font: inherit; cursor: pointer;
}
.stepper .n {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #8792a2; background: #f1f4f9;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 3px #fff; transition: transform .15s;
}
.stepper .lb { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.stepper .cap { font-size: 11px; color: var(--muted); opacity: .8; }
.stepper .stp.done .n { background: var(--st-confirmed); color: #fff; box-shadow: 0 0 0 1px var(--st-confirmed), 0 0 0 3px #fff; }
.stepper .stp.done .lb { color: var(--ink-3); }
.stepper .stp.cur .n {
  background: linear-gradient(180deg, var(--brand-400), var(--brand)); color: #fff;
  box-shadow: 0 0 0 4px rgba(99, 91, 255, .16);
}
.stepper .stp.cur .lb { color: var(--ink); font-weight: 600; }
.stepper .stp > button:hover .n { transform: scale(1.06); }
.stepper .stp > button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
@media (max-width: 860px) {
  .stepper { overflow-x: auto; padding-bottom: 4px; }
  .stepper .stp { min-width: 92px; }
  .stepper .cap { display: none; }
}

/* ---------- ⋯ 更多操作菜单 ---------- */
.more-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border-2);
  background: #fff; color: var(--text-2); display: grid; place-items: center;
  cursor: pointer; line-height: 1; transition: .12s;
}
.more-btn:hover { background: var(--brand-50); border-color: var(--brand); color: var(--primary-700); }
.ops { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.menu-pop {
  position: fixed; z-index: 150; min-width: 176px; padding: 6px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: menuIn .12s ease;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.menu-pop .mi {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px;
  border: none; background: none; border-radius: 8px; font: inherit; font-size: 13px;
  color: var(--text-2); text-align: left; cursor: pointer; transition: background .12s;
}
.menu-pop .mi:hover { background: #f4f6fc; color: var(--ink); }
.menu-pop .mi.danger { color: var(--st-disputed); }
.menu-pop .mi.danger:hover { background: var(--st-disputed-bg); color: #a5211b; }
.menu-pop .sep { height: 1px; background: var(--line); margin: 4px 2px; }

/* ---------- 行展开抽屉 ---------- */
.exp-btn {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: .12s;
}
.exp-btn:hover { background: var(--brand-50); color: var(--primary-700); }
.exp-btn svg { width: 13px; height: 13px; transition: transform .18s; }
tr.open .exp-btn svg { transform: rotate(90deg); }
tr.open > td { background: #fafbfe; }
tr.drawer-row > td { padding: 0 !important; background: #fafbfe; border-bottom: 1px solid var(--border); }
.drawer-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 18px; padding: 14px 18px 16px 44px;
  border-left: 3px solid var(--brand); margin: 0 0 0 16px;
}
.drawer-item .k { font-size: 11.5px; color: var(--muted); letter-spacing: .3px; }
.drawer-item .v { font-size: 13.5px; color: var(--ink); font-weight: 500; margin-top: 2px; word-break: break-all; }
.drawer-item.wide { grid-column: 1 / -1; }
.drawer-item .v.empty-v { color: var(--muted); font-weight: 400; }

/* ---------- 批量操作浮动条 ---------- */
.bulkbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 120;
  display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 18px;
  border-radius: 14px; background: linear-gradient(120deg, #111a2e, #1c2541); color: #fff;
  box-shadow: 0 18px 40px -12px rgba(10, 20, 50, .55); animation: bulkIn .18s ease;
}
@keyframes bulkIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.bulkbar .cnt { font-size: 13.5px; opacity: .92; white-space: nowrap; }
.bulkbar .btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; }
.bulkbar .btn:hover { background: rgba(255, 255, 255, .26); transform: none; box-shadow: none; }
.bulkbar .btn.solid { background: #fff; color: #0a2540; font-weight: 600; border-color: #fff; }
.bulkbar .x { background: none; border: none; color: rgba(255, 255, 255, .7); cursor: pointer; font-size: 18px; padding: 2px 8px; border-radius: 8px; }
.bulkbar .x:hover { color: #fff; background: rgba(255, 255, 255, .14); }

/* ---------- 骨架屏（与真实行等高，避免数据到达时跳动） ---------- */
.sk-row { display: flex; align-items: center; gap: 16px; padding: 0 16px; height: 48px; border-bottom: 1px solid rgba(16, 45, 94, .05); }
.sk {
  height: 11px; border-radius: 6px;
  background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite;
}
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- 空状态（插画 + 说明 + 唯一主行动） ---------- */
.es { text-align: center; padding: 50px 20px; }
.es .ic {
  width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 14px; display: grid; place-items: center;
  font-size: 30px; background: linear-gradient(135deg, rgba(99, 91, 255, .13), rgba(0, 184, 230, .12));
}
.es h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.es p { margin: 0 auto 16px; font-size: 13px; color: var(--muted); max-width: 430px; line-height: 1.75; }
.es .acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- 列表内嵌确认进度 ---------- */
.prog-cell { min-width: 156px; }
.prog-cell .pline { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.mini-stack { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: #eef1f7; }
.mini-stack i { height: 100%; }

/* ---------- 工作台：待办卡 ---------- */
.hero.todo { padding: 20px 24px; box-shadow: 0 16px 36px -18px rgba(80, 70, 200, .5); }
.hero.todo .row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.hero.todo .lg { font-size: 15.5px; font-weight: 600; letter-spacing: -.2px; }
.hero.todo .lg b { font-size: 22px; margin: 0 3px; }
.hero.todo .sb { font-size: 12.5px; opacity: .9; margin-top: 3px; }
.hero.todo .acts { margin-top: 0; }

/* ---------- 员工端：退出按钮常驻右上角 + CTA 拇指区 ---------- */
.emp-card { overflow: visible; }
.emp-head { position: relative; overflow: hidden; border-radius: 15px 15px 0 0; }
.emp-head .amt { font-size: 38px; }
.emp-exit {
  position: absolute; right: 12px; top: 12px; z-index: 2; min-width: 58px; height: 36px;
  padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); color: #fff;
  font-size: 13px; cursor: pointer; font-family: var(--font); transition: background .15s;
}
.emp-exit:hover { background: rgba(255, 255, 255, .3); }
/* 页面内返回按钮（左上）：钉钉原生 `<` 在从工作通知直接打开时无历史可退，
   点了没反应，这里给一个始终可用的返回入口 */
.emp-back {
  position: absolute; left: 12px; top: 12px; z-index: 3; min-width: 62px; height: 36px;
  padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); color: #fff;
  font-size: 13px; cursor: pointer; font-family: var(--font); transition: background .15s;
  display: inline-flex; align-items: center; gap: 4px; line-height: 1;
}
.emp-back:hover { background: rgba(255, 255, 255, .3); }
.emp-back:active { background: rgba(255, 255, 255, .42); }
.emp-actions {
  background: #fff; border-top: 1px solid var(--border);
  padding: 12px 18px 16px; border-radius: 0 0 15px 15px;
}
@media (max-width: 767px) {
  /* 固定到底部拇指区，同时给正文留出等高的滚动余量，避免遮住合计行 */
  .emp-wrap { padding-bottom: 104px; }
  .emp-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    max-width: 480px; margin: 0 auto; border-top: 1px solid var(--border);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px -12px rgba(10, 37, 64, .22);
  }
}

/* ---------- 无障碍：跳转链接 + 统一焦点环 ---------- */
.skip-link {
  position: fixed; left: 8px; top: -60px; z-index: 400; padding: 10px 16px;
  background: #fff; color: var(--primary-700); border-radius: 10px; box-shadow: var(--shadow-lg);
  transition: top .15s;
}
.skip-link:focus { top: 8px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- 移动端：侧栏转底部 Tab Bar，表格转卡片 ---------- */
.tabbar { display: none; }
@media (max-width: 767px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; height: 56px; }
  .topbar .chip { display: none; }
  .content { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 48px; color: var(--muted); font-size: 11px; text-decoration: none;
  }
  .tabbar a.active { color: var(--primary-700); font-weight: 600; }
  .tabbar a svg { width: 20px; height: 20px; }
  .input, .select, .textarea { min-height: 42px; }
  .btn { min-height: 42px; }
  .btn.sm { min-height: 34px; }
  .more-btn { width: 40px; height: 40px; }
  .exp-btn { width: 38px; height: 38px; }
  .drawer-inner { padding: 12px 14px; margin-left: 6px; grid-template-columns: 1fr 1fr; }
  .card-head { flex-direction: column; align-items: stretch; }
  .card-head .toolbar { width: 100%; }
  .hero { padding: 20px; }
  .hero h1 { font-size: 19px; }
  .bulkbar { left: 8px; right: 8px; bottom: 68px; transform: none; justify-content: space-between; }
}
@media (max-width: 1023px) and (min-width: 768px) {
  .sidebar { width: 56px; }
  .sidebar .brand span, .nav a span, .nav-group, .side-user .meta, .side-user .out { display: none; }
  .sidebar .brand, .nav a, .side-user { justify-content: center; }
  .nav a { padding: 10px; }
  .main { margin-left: 56px; }
}
@media (min-width: 768px) and (max-width: 1280px) {
  .sidebar { width: 216px; }
  .main { margin-left: 216px; }
}
@media (min-width: 1025px) and (max-width: 1280px) {
  .kpi-row { grid-template-columns: repeat(4, 1fr); }
}

/* 表格转卡片（移动端） */
@media (max-width: 767px) {
  table.tbl.cards thead { display: none; }
  table.tbl.cards, table.tbl.cards tbody, table.tbl.cards tr,
  table.tbl.cards td { display: block; width: 100%; }
  table.tbl.cards tr {
    border: 1px solid var(--border); border-radius: 14px; margin: 0 0 12px; padding: 0;
    background: #fff; overflow: hidden; box-shadow: var(--shadow-xs);
  }
  table.tbl.cards td {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 9px 14px; border-bottom: 1px solid rgba(16, 45, 94, .06); text-align: right !important;
  }
  table.tbl.cards td:last-child { border-bottom: none; }
  table.tbl.cards td::before { content: attr(data-l); flex: none; font-size: 12.5px; color: var(--muted); text-align: left; }
  table.tbl.cards td.no-lbl::before { display: none; }
  table.tbl.cards td.no-lbl { display: block; text-align: center !important; padding: 0; }
  table.tbl.cards tr:hover td:first-child { border-left: none; }
}

/* ---------- 公司 Logo（系统设置，极简） ---------- */
.lg-row { display: flex; gap: 18px; align-items: center; }
.lg-thumb {
  position: relative; width: 92px; height: 92px; flex: none; padding: 0; cursor: pointer;
  border: 1px solid var(--border-2); border-radius: 12px; background: transparent;
  display: grid; place-items: center; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.lg-thumb img { width: 74px; height: 74px; object-fit: contain; display: block; }
.lg-thumb:hover { border-color: var(--primary); }
.lg-thumb.over { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 91, 255, .14); }
.lg-thumb.busy { opacity: .55; pointer-events: none; }
.lg-thumb-mask {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10, 37, 64, .5); color: #fff; font-size: 12.5px;
  opacity: 0; transition: opacity .15s;
}
.lg-thumb:hover .lg-thumb-mask, .lg-thumb:focus-visible .lg-thumb-mask { opacity: 1; }
.lg-info { min-width: 0; }
.lg-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-tip { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 9px; }

/* ---------- 员工端顶栏 Logo ---------- */
.emp-logo {
  width: 54px; height: 54px; object-fit: contain; margin: 0 auto 10px; display: block;
}

/* =========================================================
 * 年度汇总 / 报表中心
 * ========================================================= */
/* 年度汇总页面容器（卡片纵向排列） */
.annual-page { display: grid; gap: 16px; align-items: start; }

/* 开关 */
.switch-row { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.switch {
  position: relative; width: 48px; height: 27px; flex: none; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--border-2); background: #e7ebf2;
  transition: background .18s, border-color .18s; padding: 0;
}
.switch .knob {
  position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(16, 45, 94, .28); transition: transform .18s;
}
.switch.on { background: linear-gradient(180deg, #7a73ff, #635bff); border-color: #635bff; }
.switch.on .knob { transform: translateX(21px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }

.ck-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ck-line input, .cb { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

.rpt-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted);
}
.rpt-acts { display: inline-flex; gap: 8px; }

.chart { width: 100%; height: auto; display: block; }
.chart-empty {
  height: 120px; display: grid; place-items: center; color: #b3bccb; font-size: 12.5px;
  background: #fafbfe; border-radius: 8px; border: 1px dashed var(--border);
}

/* 报表中心 */
.rpt-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rpt-type {
  text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 12px;
  padding: 13px 15px; cursor: pointer; font-family: var(--font); transition: all .16s;
}
.rpt-type:hover { border-color: rgba(99, 91, 255, .4); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.rpt-type.on { border-color: var(--primary); background: linear-gradient(180deg, #f7f6ff, #fff); box-shadow: 0 0 0 3px rgba(99, 91, 255, .12); }
.rpt-type .rt { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.rpt-type.on .rt { color: var(--primary-700); }
.rpt-type .rd { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.rpt-sum { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.rpt-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 13px; border-radius: 999px;
  background: var(--primary-50); color: var(--primary-700); font-size: 12.5px;
}
.rpt-chip b { font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- 员工端年度汇总 ---------- */
.an-head {
  background: linear-gradient(135deg, #7a73ff, #635bff 60%, #4f46e8);
  color: #fff; padding: 22px 18px 20px; text-align: center; position: relative;
}
.an-head .tt { font-size: 18px; font-weight: 600; }
.an-head .sb { font-size: 12px; opacity: .88; margin-top: 4px; }
.an-head .amt { font-size: 32px; font-weight: 700; margin-top: 12px; letter-spacing: -.8px; }
.an-head .amt small { font-size: 14px; font-weight: 500; opacity: .9; margin-right: 3px; }
.an-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); }
.an-kpi { background: #fff; padding: 12px 8px; text-align: center; }
.an-kpi .k { font-size: 11.5px; color: var(--muted); }
.an-kpi .v { font-size: 15px; font-weight: 600; color: var(--ink); margin-top: 3px; font-variant-numeric: tabular-nums; }
.an-sec { padding: 14px 16px 4px; }
.an-sec .st { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .4px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.an-sel { width: auto; font-size: 12px; padding: 3px 24px 3px 8px; min-height: 26px; border-radius: 7px; }
.an-rank { padding: 0 16px 6px; }
.an-rank .row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(16, 45, 94, .08); font-size: 13.5px; }
.an-rank .row:last-child { border-bottom: none; }
.an-rank .row .nm { color: var(--text-2); }
.an-rank .row .vl { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.an-rank .row.hot .vl { color: var(--primary-700); }
.an-month { padding: 0 16px 6px; }
.an-month .row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed rgba(16, 45, 94, .08); font-size: 13px; }
.an-month .row:last-child { border-bottom: none; }
.an-month .row .p { color: var(--text-2); width: 74px; flex: none; }
.an-month .row .bar { flex: 1; height: 7px; background: #eef1f7; border-radius: 4px; margin: 0 10px; overflow: hidden; }
.an-month .row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #7a73ff, #635bff); border-radius: 4px; }
.an-month .row .v { width: 92px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-entry {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 36px);
  margin: 0 18px 16px; padding: 12px; border-radius: 12px; cursor: pointer;
  background: var(--primary-50); color: var(--primary-700); font-size: 14px; font-weight: 600;
  border: 1px solid #dedbff; font-family: var(--font); transition: all .16s;
}
.an-entry:hover { background: #eceaff; box-shadow: 0 6px 16px -8px rgba(99, 91, 255, .5); }

/* ---------- 花名册批量选择 ---------- */
.ck-cell { width: 42px; padding-left: 14px !important; padding-right: 0 !important; }
.ck-cell .ck { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
table.tbl tbody tr.sel { background: #f3f1ff; }
table.tbl tbody tr.sel td:first-child { border-left-color: var(--primary); }
.selbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--primary-50, #f5f3ff); font-size: 13px;
}
.selbar[hidden] { display: none; }
.selbar .selbar-t { color: var(--ink-2, var(--text-2)); }
.selbar .selbar-t b { color: var(--primary); font-size: 14px; }
.selbar .selbar-t .sub { margin-left: 6px; color: var(--ink-3, #8792a2); font-size: 12px; }
.selbar .spacer { flex: 1; }
.pick-row {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 13px; line-height: 1.75;
}
.pick-row:hover { border-color: var(--primary); background: var(--primary-50, #f5f3ff); }
.pick-row input[type="radio"] { margin-top: 3px; accent-color: var(--primary); cursor: pointer; }

/* ---------- 站点页脚（备案信息） ---------- */
.site-foot {
  padding: 22px 16px 26px;
  text-align: center;
  font-size: 12px;
  color: #98a1b2;
  line-height: 1.9;
}
.site-foot a {
  color: #98a1b2;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-foot a:hover { color: #6b7684; }
.site-foot .co { color: #7b8494; }
/* 登录 / 全屏布局页：给页脚留出空间，备案号不用下滑才看得见
   （:has 不被老内核支持时退化为「页脚在首屏下方」，不影响可用性） */
body:has(.site-foot) .login-wrap { min-height: calc(100vh - 100px); }
@media print { .site-foot { display: none !important; } }
/* 手机端不显示页脚：钉钉里屏幕宝贵，员工只关心工资条本身。
   备案号在电脑端首页（pay.ksdhr.com）底部仍完整展示。 */
@media (max-width: 480px) { .site-foot { display: none !important; } }

/* ---------- 打印 ---------- */
@media print {
  .no-print, .sidebar, .topbar { display: none !important; }
  .main { margin-left: 0 !important; }
  body { background: #fff; }
  body::before { display: none; }
  .card { box-shadow: none; border-color: #ddd; }
  .hero { box-shadow: none; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); }
}
