:root {
  --brand: #1f5fa8;
  --brand-dark: #143f74;
  --brand-light: #e8f0fa;
  --ink: #1c2530;
  --ink-2: #56626f;
  --ink-3: #8b95a1;
  --line: #e3e8ef;
  --bg: #f4f6f9;
  --card: #ffffff;
  --red: #c0392b;
  --green: #1e8449;
  --amber: #b9770e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 36, 63, .06), 0 6px 18px rgba(16, 36, 63, .05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.6;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
.hide { display: none !important; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef4fb 0%, #f7f9fc 55%, #f4f6f9 100%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--card); border-radius: 16px;
  box-shadow: 0 8px 40px rgba(16, 36, 63, .10); padding: 32px 28px 26px;
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-logo .mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; letter-spacing: .5px;
}
.login-logo h1 { font-size: 16px; margin: 0; font-weight: 600; }
.login-logo p { margin: 0; font-size: 12px; color: var(--ink-3); }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 208px; flex: 0 0 208px; background: #0f2947; color: #cfdcec;
  padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; }
.sidebar .brand .mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
}
.sidebar .brand span { color: #fff; font-weight: 600; font-size: 14px; }
.nav-group { margin: 14px 0 4px; padding: 0 10px; font-size: 11px; letter-spacing: .12em; color: #6f88a6; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: #cfdcec; cursor: pointer; font-size: 13.5px; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); }
.nav-item.active { background: var(--brand); color: #fff; font-weight: 500; }
.nav-item .dot {
  margin-left: auto; background: #e5533d; color: #fff; font-size: 11px;
  border-radius: 9px; padding: 0 6px; line-height: 17px;
}

.main { flex: 1; min-width: 0; max-width: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 24px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 16px; margin: 0; font-weight: 600; }
.topbar .spacer { flex: 1; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px;
  border: 1px solid var(--line); border-radius: 20px; background: #fff; cursor: pointer;
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand-light);
  color: var(--brand-dark); display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.role-tag { font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); padding: 0 6px; border-radius: 4px; }
.content { padding: 20px 24px 60px; flex: 1; min-width: 0; max-width: 100%; }

/* ---------- 卡片与表格 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-size: 15px; margin: 0; font-weight: 600; }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.stat { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--ink-3); }
.stat .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.stat .v small { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }

.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-weight: 500; color: var(--ink-2); background: #f7f9fc;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 10px; border-bottom: 1px solid #eef1f5; vertical-align: middle; white-space: nowrap; }
table.data tr:hover td { background: #fafbfd; }
table.data td.num { font-variant-numeric: tabular-nums; text-align: right; }
table.data th.num { text-align: right; }
/* 补贴标准表：固定列宽，目的地过长省略 */
.route-table table.data { table-layout: fixed; }
.route-table table.data td { overflow: hidden; text-overflow: ellipsis; }
.route-table table.data td:last-child { overflow: visible; }
.empty { text-align: center; color: var(--ink-3); padding: 22px 0; font-size: 13px; }

/* ---------- 分页 ---------- */
.pager {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef1f5;
}
.pg-info { font-size: 12.5px; color: var(--ink-3); }
.pg-info b { color: var(--ink-2); font-weight: 600; }
.pg-sep { margin: 0 6px; color: #c8d0da; }
.pager .spacer { flex: 1; }
.pager .pg-size { width: auto; min-width: 100px; flex: 0 0 auto; padding: 5px 8px; font-size: 12.5px; }
.pg-nav { display: flex; align-items: center; gap: 4px; }
.pg-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); background: #fff;
  border-radius: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; font-variant-numeric: tabular-nums;
}
.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pg-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-gap { padding: 0 2px; color: var(--ink-3); font-size: 12px; }

.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 20px; line-height: 18px; }
.tag.gray { background: #eef1f5; color: var(--ink-2); }
.tag.blue { background: var(--brand-light); color: var(--brand-dark); }
.tag.green { background: #e6f4ec; color: var(--green); }
.tag.amber { background: #fdf2e0; color: var(--amber); }
.tag.red { background: #fbeae8; color: var(--red); }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; white-space: nowrap;
}
.btn:hover { border-color: #c9d4e2; background: #fbfcfe; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--brand); padding: 4px 8px; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.danger { color: var(--red); border-color: #f0d3ce; background: #fdf6f5; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
[hidden] { display: none !important; }  /* 申请用车按目的地类型切换字段 */
.field > label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.field > label .req { color: var(--red); margin-left: 2px; }
.input, select.input, textarea.input {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 95, 168, .10); }
textarea.input { min-height: 78px; resize: vertical; }
.input[readonly] { background: #f7f9fc; color: var(--ink-2); }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
/* 客户简称：桌面悬停看全称，手机点一下 toast 出全称 */
.cname { border-bottom: 1px dotted var(--line); cursor: help; }
.cname:hover { border-bottom-color: var(--brand); color: var(--brand-dark); }
/* 用车列表客户名称：悬停/划过即时显示公司地址 */
.addr-tip { cursor: help; }
.addr-tip-box {
  position: fixed; z-index: 9999; left: 0; top: 0;
  max-width: min(340px, 88vw); padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  box-shadow: 0 10px 28px rgba(15, 35, 65, .18);
  font-size: 12.5px; line-height: 1.6; color: var(--ink);
  word-break: break-all; white-space: normal; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .12s;
}
.addr-tip-box.show { opacity: 1; visibility: visible; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- 里程计算 ---------- */
.calc-row { display: flex; gap: 8px; align-items: center; }
.calc-row .input { flex: 1; min-width: 0; }
.calc-row .btn { white-space: nowrap; }
.km-opts { margin-top: 8px; }
.km-opt-head { font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.km-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; background: #fff; }
.km-opt:hover { border-color: var(--brand); background: var(--brand-light); }
.km-opt input { margin: 0; accent-color: var(--brand); }
.km-opt .km-val { font-weight: 600; min-width: 78px; color: var(--ink); }
.km-opt .hint { margin: 0; }
.km-err { background: #fdf2e0; color: #8a5a00; border: 1px solid #f2ddb8; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.55; }

/* ---------- 客户联系人编辑器 ---------- */
.ct-block { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 4px; }
.ct-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.ct-title .hint { margin: 0; font-weight: 400; }
.ct-head, .ct-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr 1.4fr 32px; gap: 8px; align-items: center; }
.ct-head { font-size: 12px; color: var(--ink-3); padding: 0 2px 4px; }
.ct-row { margin-bottom: 8px; }
.ct-row .input { padding: 6px 9px; font-size: 13px; }
#ct-add { margin-top: 2px; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(15, 30, 50, .38); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 620px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(10, 25, 45, .25);
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
.modal.max { max-width: 900px; }
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; font-weight: 600;
}
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--ink-3); font-size: 20px; line-height: 1; padding: 2px 6px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px 16px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }

/* ---------- 提示 ---------- */
#toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast-item {
  background: #1c2530; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: toastIn .18s ease-out;
}
.toast-item.err { background: #a83227; }
.toast-item.ok { background: #1b6b3a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters .input { width: auto; min-width: 150px; }
#ph-kw { min-width: 250px; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv .k { color: var(--ink-3); }
.kv .v { color: var(--ink); word-break: break-all; }

.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-grid img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.mobile-tab { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .content { padding: 14px 14px 84px; }
  .topbar { padding: 10px 14px; }
  .topbar h2 { font-size: 15px; }
  .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .ct-head { display: none; }
  .ct-row { grid-template-columns: 1fr 1fr 32px; }
  .ct-row .input[data-f=phone], .ct-row .input[data-f=email] { grid-column: span 3; }
  .mobile-tab {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line); padding: 6px 0 8px;
    justify-content: space-around; box-shadow: 0 -4px 16px rgba(16, 36, 63, .06);
  }
  .mobile-tab div {
    flex: 1; text-align: center; font-size: 11px; color: var(--ink-3); cursor: pointer; padding: 4px 0;
  }
  .mobile-tab div.active { color: var(--brand); font-weight: 600; }
  .mobile-tab div b { display: block; font-size: 17px; font-weight: 400; line-height: 1.3; }
  .modal { max-height: 92vh; }
  .card { padding: 14px; }
}

/* ---------- 工资表导入 ---------- */
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 8px 0; cursor: pointer; }
.chk input { width: 15px; height: 15px; accent-color: var(--brand); }
.imp-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 12px; background: #fafbfd; }
.kv { display: flex; gap: 10px; font-size: 13px; padding: 3px 0; }
.kv b { flex: 0 0 76px; color: var(--ink-3); font-weight: 500; }
.kv span { color: var(--ink); min-width: 0; }
.imp-sec { margin-top: 16px; font-size: 13px; font-weight: 600; }
.imp-warn { margin-top: 12px; background: #fdf2e0; color: #8a5a00; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; line-height: 1.7; }

/* 弹窗内的紧凑表格（社保费率等） */
table.data.compact th, table.data.compact td { padding: 5px 8px; }

/* 只读/冻结的输入框（如已锁定月份的社保费率） */
input:disabled, select:disabled, textarea:disabled { background: #f1f3f6; color: #7b8794; cursor: not-allowed; }

/* ---------- 客诉登记：多选下拉 / 历史用语 / 异常图片 / 分类标签 ---------- */
/* 操作列多个小按钮连排时留一点间距，避免误点（用车/加班/餐补/请假通用） */
.data td .btn.sm + .btn.sm { margin-left: 3px; }
.row-acts { display: flex; gap: 2px; flex-wrap: nowrap; }
.row-acts .btn.sm { padding: 3px 6px; }
.danger-text { color: var(--red) !important; }
.danger-text:hover { background: #fdf1ef !important; }
/* 餐补金额：手工改过总价的行带「已改价」小标，悬停看系统原算金额与原因 */
.amt-adj { white-space: nowrap; cursor: help; }
.amt-adj i {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  font-style: normal; font-size: 10px; line-height: 16px;
  color: #a15c00; background: #fdf2e0; border-radius: 8px;
}

/* 员工档案：联系方式、车辆信息 */
.contact-cell { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--ink-2); }
.veh-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.veh-chip {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 20px;
  background: #f1f4f8; color: var(--ink-2); border: 1px solid transparent; white-space: nowrap;
}
.veh-chip.on { background: var(--brand-light); color: var(--brand-dark); border-color: var(--brand-light); }

.msel { position: relative; }
.msel-head {
  display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 36px;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.msel-head:hover { border-color: #c9d4e2; }
.msel.open .msel-head { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 95, 168, .10); }
.msel-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-text.ph { color: var(--ink-3); }
.msel-arrow { color: var(--ink-3); font-size: 11px; }
.msel-pop {
  display: none; position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 230px; overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 26px rgba(16, 36, 63, .12); padding: 6px;
}
.msel.open .msel-pop { display: block; }
.msel-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.msel-item:hover { background: var(--brand-light); }
.msel-item input { accent-color: var(--brand); margin: 0; }
.msel-item em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--ink-3); }

.ta-row { display: flex; gap: 8px; align-items: flex-start; }
.ta-row textarea { flex: 1; min-width: 0; }
.ta-row .btn { white-space: nowrap; }

.hist-list { max-height: 52vh; overflow-y: auto; }
.hist-item { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.hist-item:hover { border-color: var(--brand); background: var(--brand-light); }
.hist-text { font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.hist-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

.photo-grid .ph { position: relative; }
.photo-grid .ph-x {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(192, 57, 43, .92); color: #fff; font-size: 13px; line-height: 20px; text-align: center;
  cursor: pointer; user-select: none;
}

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: var(--brand-light); color: var(--brand-dark); font-size: 12.5px; border: 1px solid #d5e3f4;
}
.cat-chip i { font-style: normal; cursor: pointer; color: #7f9bc0; font-size: 14px; line-height: 1; }
.cat-chip i:hover { color: var(--red); }

/* ---------- 异常图片库 ---------- */
.photo-grid .ph { display: flex; flex-direction: column; gap: 5px; width: 122px; }
.photo-grid .ph img { width: 122px; height: 100px; cursor: pointer; }
.photo-grid .ph figcaption { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; word-break: break-all; }
.ph-cap {
  width: 122px; font-size: 11.5px; padding: 4px 6px; border: 1px solid #cfd8e3;
  border-radius: 6px; color: var(--ink-2); background: #fbfcfd;
}
.ph-cap::placeholder { color: #aab4c0; }
.ph-cap:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(31, 95, 168, .10); }

.photo-view { display: flex; justify-content: center; background: #eef1f5; border-radius: 10px; padding: 10px; }
.photo-view img { max-width: 100%; max-height: 62vh; object-fit: contain; }

.photo-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 12px; }
.pcard {
  margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pcard:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.pcard img { width: 100%; height: 132px; object-fit: cover; display: block; background: #eef1f5; }
.pcard figcaption { padding: 8px 10px; }
.pc-cust {
  font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-foot { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.pc-foot .pc-time { margin-top: 0; flex: 1; min-width: 0; }
.pc-cat {
  flex: none; font-size: 11px; color: var(--brand-dark); background: var(--brand-light);
  border-radius: 99px; padding: 1px 7px; white-space: nowrap;
}
.pc-sub { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-cap { font-size: 12px; color: var(--ink-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-time { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.photo-sum { display: flex; gap: 26px; padding: 10px 2px 4px; }
.photo-sum div { display: flex; align-items: baseline; gap: 6px; }
.photo-sum b { font-size: 20px; color: var(--brand-dark); }
.photo-sum span { font-size: 12px; color: var(--ink-3); }

.pchip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 4px; }
.pchip-label { font-size: 12px; color: var(--ink-3); margin-right: 2px; }
.pchip {
  border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px;
  font-size: 12px; color: var(--ink-2); cursor: pointer; font-family: inherit;
}
.pchip:hover { border-color: var(--brand); color: var(--brand); }
.pchip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pchip em { font-style: normal; margin-left: 5px; opacity: .75; }
.load-more { text-align: center; margin-top: 16px; }

/* ---------- 请假管理：年假余额 ---------- */
.leave-bal {
  display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px; background: #f7fafd;
  border: 1px solid #e2ebf5; border-radius: 10px;
}
.leave-bal > div { display: flex; align-items: baseline; gap: 6px; }
.leave-bal b { font-size: 19px; color: var(--brand-dark); }
.leave-bal span { font-size: 12px; color: var(--ink-3); }
.leave-tip {
  padding: 9px 12px; margin-bottom: 12px; border-radius: 8px;
  background: var(--brand-light); color: var(--brand-dark); font-size: 12.5px; line-height: 1.6;
}
.leave-tip.warn { background: #fdf3e6; color: #8a5a12; }
.leave-tip b { font-size: 14px; }
.warn-text { color: #b4640d; }

/* ---------- 员工薪酬：独立查询密码 ---------- */
.pay-lock { text-align: center; padding: 46px 24px 40px; }
.pay-lock h3 { margin: 12px 0 0; font-size: 17px; }
.pay-lock-badge {
  display: inline-block; font-size: 11px; letter-spacing: 2px; font-weight: 700;
  color: var(--brand-dark); background: var(--brand-light); border: 1px solid #d5e3f4;
  border-radius: 999px; padding: 3px 12px;
}
.pay-lock-form {
  display: flex; gap: 8px; justify-content: center; max-width: 380px; margin: 0 auto;
}
.pay-lock-form .input { flex: 1; min-width: 0; }

/* 客诉表单：外勤时间成对输入 */
.dt-pair { display: flex; gap: 10px; align-items: center; }
.dt-pair > div { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dt-pair .input { flex: 1; min-width: 0; }
.dt-lab { flex: none; font-size: 12px; color: var(--ink-3); }

/* ---------- 工作台：数据概览大屏 ---------- */
.board {
  position: relative; overflow: hidden; border-radius: 16px; padding: 18px 20px 20px;
  background: radial-gradient(130% 150% at 0% 0%, #1a416d 0%, #102c4b 46%, #0a1e36 100%);
  color: #dbe7f4; box-shadow: 0 12px 32px rgba(10, 30, 55, .20);
}
.board::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 34px 34px;
}
.board > * { position: relative; z-index: 1; }
.board-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.board-head > div { flex: 1 1 auto; min-width: 0; }
.board-head h3 {
  margin: 0; font-size: 17px; font-weight: 600; color: #fff; letter-spacing: .04em;
}
.board-head p { margin: 3px 0 0; font-size: 12px; color: #7e9ab9; }
.board-tag {
  margin-left: auto; font-size: 10px; letter-spacing: .22em; color: #4d7ba8;
  border: 1px solid rgba(120, 170, 225, .28); border-radius: 999px; padding: 3px 10px;
}

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.kpi {
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 11px; padding: 9px 12px 10px;
  min-width: 0;
}
.kpi .k { font-size: 11.5px; color: #8fa9c6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v {
  font-size: 21px; font-weight: 600; color: #fff; letter-spacing: -.02em; line-height: 1.35;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.kpi .v small { font-size: 11px; font-weight: 400; color: #7e9ab9; margin-left: 3px; }

.board-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; margin-top: 12px; }
.board-grid.even { grid-template-columns: 1fr 1fr; }
.bpanel {
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px; padding: 12px 14px 14px; min-width: 0;
  display: flex; flex-direction: column;
}
.bar-list { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; }
.bpanel h4 {
  margin: 0 0 10px; font-size: 12.5px; font-weight: 500; color: #a9c0d8; letter-spacing: .04em;
}
.b-empty { font-size: 12px; color: #6d88a5; padding: 12px 0 6px; }
.b-foot { margin-top: 10px; padding-top: 9px; border-top: 1px dashed rgba(255, 255, 255, .09); font-size: 11.5px; color: #7e9ab9; }

.trend { width: 100%; max-width: 100%; min-width: 0; height: auto; display: block; }
.bx { fill: #6f8dab; font-size: 10px; }
.bx2 { fill: #c9a44a; font-size: 10px; }
.bl { fill: #8fa9c6; font-size: 10px; }

.bar-row { display: flex; align-items: center; gap: 8px; padding: 3.5px 0; font-size: 12px; }
.bar-row .nm { flex: 0 0 118px; font-size: 11.5px; color: #c3d5e7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .tr { flex: 1; height: 7px; background: rgba(255, 255, 255, .09); border-radius: 4px; overflow: hidden; min-width: 20px; }
.bar-row .tr i { display: block; height: 100%; border-radius: 4px; }
.bar-row .vl { flex: 0 0 40px; text-align: right; color: #fff; font-variant-numeric: tabular-nums; }
.bar-row .pc { flex: 0 0 44px; text-align: right; color: #8fa9c6; font-size: 11.5px; font-variant-numeric: tabular-nums; }

.part-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.part-row {
  display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .07);
}
.part-row .mono { color: #c3d5e7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part-row .cnt { margin-left: auto; color: #ffd166; font-variant-numeric: tabular-nums; }

/* ---------- 工作台：本周 / 上周客诉 ---------- */
.wk-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px 10px; min-width: 0; border-top: 3px solid var(--brand);
  display: flex; flex-direction: column;
}
.wk-card > .empty, .wk-card > .table-wrap { flex: 1; }
.wk-card > .empty { display: grid; place-items: center; min-height: 120px; }
.wk-card.prev { border-top-color: #c3ccd8; }
.wk-head { display: flex; align-items: flex-start; gap: 10px; }
.wk-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.wk-head .hint { margin: 2px 0 0; font-size: 12px; }
.wk-num {
  margin-left: auto; font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -.02em;
  color: var(--brand); font-variant-numeric: tabular-nums;
}
.wk-card.prev .wk-num { color: var(--ink-2); }
.wk-num small { font-size: 11px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.wk-meta {
  display: flex; gap: 6px 14px; flex-wrap: wrap; margin: 9px 0 8px; font-size: 12px; color: var(--ink-2);
}
.wk-meta b { color: var(--ink); font-weight: 600; }
.wk-delta { font-size: 12px; color: var(--ink-3); }
.wk-delta.up { color: var(--red); }
.wk-delta.down { color: var(--green); }
.wk-card table.data { font-size: 12.5px; }
.wk-card table.data th { padding: 6px 8px; }
.wk-card table.data td { padding: 5px 8px; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .board-grid, .board-grid.even { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .part-grid { grid-template-columns: 1fr; }
  .board { padding: 14px; }
  .board-tag { display: none; }
  .bpanel.graph { overflow-x: auto; }
  .bpanel.graph .trend { min-width: 0; }
  .bar-row .nm { flex: 0 0 92px; }
}

/* ---------- 客诉详情 ---------- */
.rate-hi { color: var(--red); font-weight: 600; }
.cdetail { min-width: 0; }
.cd-hero {
  display: flex; align-items: flex-start; gap: 12px;
  padding-bottom: 13px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.cd-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; font-weight: 600; }
.cd-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.cd-tags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cd-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cd-main, .cd-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cd-sec { min-width: 0; }
.cd-sec h4 {
  margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .05em; display: flex; align-items: center; gap: 6px;
}
.cd-sec h4 em { font-style: normal; color: var(--brand); }
.cd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cd-stats > div { background: #f7f9fc; border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 12px; }
.cd-stats b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cd-stats span { font-size: 11.5px; color: var(--ink-3); }
.cd-stats > div.hi { background: #fdf3f2; border-color: #f6dedb; }
.cd-stats > div.hi b { color: var(--red); }
.cd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.cd-item.wide { grid-column: 1 / -1; }
.cd-item .k { font-size: 11.5px; color: var(--ink-3); margin-bottom: 1px; }
.cd-item .v { font-size: 13.5px; word-break: break-all; }
.cd-item .v small { display: block; color: var(--ink-3); font-size: 12px; }
.cd-text {
  font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
  background: #fafbfd; border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 12px;
  max-height: 220px; overflow: auto;
}
.cd-engs { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-chip { background: var(--brand-light); color: var(--brand-dark); border-radius: 20px; padding: 2px 10px; font-size: 12.5px; }
.cd-out { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.cd-out > span { color: var(--ink-3); margin-right: 6px; }
.cd-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-ph { margin: 0; border-radius: 8px; overflow: hidden; background: #f2f5f9; cursor: zoom-in; }
.cd-ph img { width: 100%; height: 96px; object-fit: cover; display: block; }
.cd-ph figcaption {
  font-size: 11px; color: var(--ink-3); padding: 4px 6px; background: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 900px) {
  .cd-body { grid-template-columns: 1fr; }
  .cd-photos { grid-template-columns: repeat(3, 1fr); }
  .cd-ph img { height: 84px; }
}
@media (max-width: 560px) {
  .cd-grid { grid-template-columns: 1fr; }
  .cd-photos { grid-template-columns: 1fr 1fr; }
  .cd-stats b { font-size: 17px; }
  .cd-hero { flex-wrap: wrap; }
  .cd-tags { margin-left: 0; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .pager { gap: 8px; }
  .pager .pg-info { width: 100%; }
  .pager .spacer { display: none; }
  .pager .pg-nav { margin-left: auto; }
  .pg-btn { min-width: 28px; height: 28px; padding: 0 6px; }
}

/* 小程序 0 元通道：6 位登录码 */
.mp-pin {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border-radius: 12px;
  background: #f3f4f6; border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 34px; font-weight: 700; letter-spacing: 4px; color: var(--ink-1);
  user-select: all;
}
.mp-pin .sep { color: var(--ink-3); font-weight: 400; }
.mp-switch { color: var(--brand, #1d4ed8); text-decoration: underline; }

/* 员工工作台：欢迎条 + 四个快捷录入 */
.staff-hero { display: flex; align-items: center; gap: 16px; }
.staff-hero .hero-hi { font-size: 18px; font-weight: 700; color: var(--ink); }
.staff-hero .hero-pend { text-align: center; min-width: 92px; padding-left: 18px; border-left: 1px solid var(--line); }
.staff-hero .hero-pend b { display: block; font-size: 28px; line-height: 1.1; color: var(--brand); }
.staff-hero .hero-pend small { color: var(--ink-3); font-size: 12px; }
.quick-grid { margin-top: 14px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px 18px; min-height: 104px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.quick-btn:hover { border-color: var(--brand); transform: translateY(-2px); }
.quick-btn:active { transform: translateY(0); }
.quick-btn b { font-size: 24px; line-height: 1.2; color: var(--brand); }
.quick-btn span { font-size: 15px; font-weight: 600; color: var(--ink); }
.quick-btn small { font-size: 12px; color: var(--ink-3); }
@media (max-width: 560px) {
  .quick-btn { padding: 12px; min-height: 88px; }
  .quick-btn b { font-size: 20px; }
}

/* 待办跳转定位 + 勾选批量审批 */
.row-link { color: var(--brand-dark); cursor: pointer; text-decoration: none; border-bottom: 1px dashed transparent; }
.row-link:hover { border-bottom-color: var(--brand-dark); }
.batch-bar { display: inline-flex; align-items: center; gap: 10px; margin-right: 12px; white-space: nowrap; }
.batch-bar .chk { white-space: nowrap; }
.batch-chk, .batch-all { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.batch-list { margin: 0 0 10px; padding-left: 20px; max-height: 260px; overflow: auto; font-size: 13px; line-height: 1.9; }
.batch-list li b { margin-right: 10px; }
.batch-detail { color: var(--brand-dark); font-weight: 600; margin-right: 10px; white-space: nowrap; }
@media (max-width: 560px) {
  .batch-list li { display: flex; flex-wrap: wrap; gap: 0 6px; }
  .batch-detail { margin-right: 4px; }
}
.focus-row { background: #fff6d9 !important; box-shadow: inset 3px 0 0 var(--amber); }
.focus-row td { background: transparent !important; }
@media (max-width: 560px) {
  .batch-bar { gap: 6px; margin-right: 6px; }
  .batch-bar .chk { font-size: 12px; }
}

/* 待办事项：隐藏单号后的人员 / 事由 / 时间列 */
.nowrap { white-space: nowrap; }
.data td.ellip { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data td.nowrap.hint { font-size: 12px; }
@media (max-width: 560px) {
  .data td.ellip { max-width: 130px; }
}

/* 员工工作台：加入「申报餐补」后共 5 个快捷入口 */
.grid.quick-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grid.quick-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .grid.quick-5 { grid-template-columns: 1fr 1fr; }
}
