/* 多客户企业管理平台 —— 全局样式（PC 优先，兼容平板） */
:root {
  --blue: #1677ff;
  --blue-d: #0e5fd8;
  --blue-l: #e9f1ff;
  --bg: #f4f6fa;
  --card: #fff;
  --line: #e9edf3;
  --line2: #f2f5fa;
  --text: #1f2329;
  --text2: #5f6875;
  --text3: #98a1b0;
  --green: #0f9e52;
  --green-l: #e8f8ee;
  --red: #e5484d;
  --red-l: #ffeceb;
  --orange: #d98400;
  --orange-l: #fff3e0;
  --purple: #6b4ee6;
  --purple-l: #f2eeff;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(24, 58, 110, .06);
  --shadow-lg: 0 12px 34px rgba(18, 38, 72, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d5dde9; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c0cad9; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= 登录页 ================= */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #0e5fd8 0%, #1677ff 42%, #57a0ff 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-wrap::after {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  right: -180px; top: -220px;
}
.login-wrap::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  left: -140px; bottom: -180px;
}
.login-box {
  width: 100%;
  max-width: 880px;
  background: #fff;
  border-radius: 18px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(6, 30, 70, .28);
  position: relative;
  z-index: 2;
}
.login-left {
  width: 46%;
  background: linear-gradient(160deg, #14418f 0%, #1a63d6 100%);
  color: #fff;
  padding: 46px 38px;
  display: flex;
  flex-direction: column;
}
.login-left .logo {
  width: 52px; height: 52px; border-radius: 15px;
  background: rgba(255, 255, 255, .95); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; margin-bottom: 26px;
}
.login-left h1 { font-size: 25px; font-weight: 700; letter-spacing: 1px; }
.login-left .sub { font-size: 13px; opacity: .8; margin-top: 12px; line-height: 1.9; }
.login-feats { margin-top: auto; font-size: 12.5px; line-height: 2.5; opacity: .92; }
.login-feats i { font-style: normal; margin-right: 8px; opacity: .7; }
.login-right { flex: 1; padding: 46px 42px; display: flex; flex-direction: column; justify-content: center; }
.login-right h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.login-right .tip { font-size: 12.5px; color: var(--text3); margin-bottom: 26px; }
.login-foot { margin-top: 22px; font-size: 12px; color: var(--text3); line-height: 1.9; }

/* ================= 表单控件 ================= */
.field { margin-bottom: 15px; }
.field > label {
  display: block;
  font-size: 12.5px;
  color: var(--text2);
  margin-bottom: 7px;
  font-weight: 600;
}
.field > label .req { color: var(--red); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%;
  height: 40px;
  border: 1px solid #dfe5ef;
  border-radius: 9px;
  padding: 0 13px;
  background: #fbfcfe;
  color: var(--text);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 74px; padding: 10px 13px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .1);
}
.input::placeholder, .textarea::placeholder { color: #b3bcc9; }
.input-lg { height: 46px; font-size: 15px; }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5L10 4.5' stroke='%2398a1b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.btn {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:hover { background: var(--blue-d); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { height: 46px; width: 100%; font-size: 15px; letter-spacing: .5px; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; border-radius: 8px; }
.btn-ghost { background: var(--blue-l); color: var(--blue); }
.btn-ghost:hover { background: #dbe9ff; }
.btn-line { background: #fff; color: var(--text2); border: 1px solid #dfe5ef; }
.btn-line:hover { background: #f7f9fc; color: var(--text); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #cf3f43; }
.btn-text { background: transparent; color: var(--blue); padding: 0 6px; height: auto; }
.btn-text:hover { background: transparent; text-decoration: underline; }
.btn-text.danger { color: var(--red); }

/* ================= 主框架 ================= */
.layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 214px;
  flex: 0 0 auto;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side-brand {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line2);
  flex: 0 0 auto;
}
.side-brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(140deg, var(--blue), #4b9bff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex: 0 0 auto;
}
.side-brand .nm { font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.side-brand .nm small { display: block; font-size: 10px; color: var(--text3); font-weight: 400; letter-spacing: 0; margin-top: 1px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 10px 0 20px; }
.side-grp { font-size: 10.5px; color: #a8b2c1; font-weight: 700; letter-spacing: .8px; padding: 13px 18px 6px; }
.side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  font-size: 13.5px;
  color: #4d5666;
  cursor: pointer;
  border-right: 3px solid transparent;
  transition: background .12s;
  user-select: none;
}
.side-item:hover { background: #f7faff; }
.side-item.on { background: var(--blue-l); color: var(--blue); font-weight: 600; border-right-color: var(--blue); }
.side-item .ic { font-size: 15px; width: 18px; text-align: center; flex: 0 0 auto; }
.side-item .badge-n {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10.5px; padding: 1px 6px; border-radius: 9px; font-weight: 600;
}
.side-item.locked { color: #c3cad6; cursor: not-allowed; }
.side-item.locked:hover { background: transparent; }
.side-foot { border-top: 1px solid var(--line2); padding: 12px 16px; flex: 0 0 auto; }
.side-foot .plan { font-size: 11px; color: var(--text3); line-height: 1.7; }
.side-foot .plan b { color: var(--blue); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 60px;
  flex: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 14px;
}
.topbar h2 { font-size: 16.5px; font-weight: 700; }
.topbar .crumb { font-size: 12px; color: var(--text3); margin-top: 2px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: 22px;
  cursor: pointer;
  transition: background .12s;
}
.user-chip:hover { background: #f4f7fc; }
.user-chip .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(140deg, var(--blue), #4b9bff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.user-chip .nm { font-size: 13px; font-weight: 600; line-height: 1.3; }
.user-chip .nm small { display: block; font-size: 10.5px; color: var(--text3); font-weight: 400; }

.content { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .t h3 { font-size: 19px; font-weight: 700; }
.page-head .t p { font-size: 12.5px; color: var(--text3); margin-top: 5px; }
.page-head .acts { margin-left: auto; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* ================= 卡片 / 统计 ================= */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.card.tight { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.card-h h4 { font-size: 14.5px; font-weight: 700; }
.card-h .sub { font-size: 12px; color: var(--text3); }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 13px; margin-bottom: 16px; }
.kpi {
  background: #fff; border-radius: var(--radius); padding: 15px 17px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue);
}
.kpi.g::after { background: var(--green); }
.kpi.r::after { background: var(--red); }
.kpi.o::after { background: var(--orange); }
.kpi.p::after { background: var(--purple); }
.kpi .lab { font-size: 12px; color: var(--text3); }
.kpi .val { font-size: 23px; font-weight: 700; margin-top: 7px; letter-spacing: -.5px; }
.kpi .val small { font-size: 13px; font-weight: 600; margin-left: 2px; }
.kpi .foot { font-size: 11.5px; color: var(--text3); margin-top: 6px; }
.kpi.g .val { color: var(--green); }
.kpi.r .val { color: var(--red); }
.kpi.o .val { color: var(--orange); }
.kpi.p .val { color: var(--purple); }

/* ================= 表格 ================= */
.tb-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tb-scroll { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb th {
  background: #f5f8fc; color: #4b5563; font-weight: 600; font-size: 12.5px;
  text-align: left; padding: 11px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.tb td { padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tb tbody tr:hover td { background: #fafcff; }
.tb tbody tr:last-child td { border-bottom: 0; }
.tb .num { text-align: right; font-variant-numeric: tabular-nums; }
.tb .op { white-space: nowrap; }
.tb .op a { margin-right: 12px; font-size: 12.5px; cursor: pointer; }
.tb .op a.danger { color: var(--red); }
.tb .op a:last-child { margin-right: 0; }
.tb .strong { font-weight: 600; }
.tb .muted { color: var(--text3); font-size: 12px; }

/* 表头排序（仅人员管理）：可点、hover 高亮、右侧箭头 */
html[data-hr="1"] #content table.tb th:not(.op) { cursor: pointer; user-select: none; }
html[data-hr="1"] #content table.tb th:not(.op):hover { background: #e9f1fb; color: var(--blue); }
html[data-hr="1"] #content table.tb th:not(.op)::after { content: "\21C5"; margin-left: 5px; font-size: 10px; color: #c2cbd9; }
html[data-hr="1"] #content table.tb th.asc::after { content: "\25B2"; color: var(--blue); }
html[data-hr="1"] #content table.tb th.desc::after { content: "\25BC"; color: var(--blue); }


/* ================= 标签 ================= */
.tag {
  display: inline-block; font-size: 11.5px; padding: 2.5px 9px; border-radius: 6px;
  font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.t-blue { background: var(--blue-l); color: var(--blue); }
.t-green { background: var(--green-l); color: var(--green); }
.t-orange { background: var(--orange-l); color: var(--orange); }
.t-red { background: var(--red-l); color: var(--red); }
.t-gray { background: #f0f2f6; color: #77808f; }
.t-purple { background: var(--purple-l); color: var(--purple); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  border: 1px solid #e3e9f3; color: var(--text3); cursor: pointer;
  background: #fff; user-select: none; transition: all .12s;
}
.chip:hover { border-color: #bcd7ff; color: var(--blue); }
.chip.on { background: var(--blue-l); border-color: #a9cbff; color: var(--blue); }
.chip.on.lock { background: #f6f7fa; border-color: #e3e9f3; color: #b3bcc9; }
.chip.lock { cursor: not-allowed; background: #f8f9fc; color: #c3cad6; }
.chip .pri { font-size: 11px; font-weight: 500; color: var(--text3); }

/* ================= 进度条 ================= */
.bar { height: 6px; border-radius: 4px; background: #eef1f6; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), #4b9bff); }
.bar > i.g { background: linear-gradient(90deg, #12b76a, #4ad991); }
.bar > i.o { background: linear-gradient(90deg, #f79009, #fdb022); }
.bar > i.r { background: linear-gradient(90deg, #e5484d, #f87171); }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row .bar { flex: 1; min-width: 60px; }
.bar-row .pct { font-size: 12px; color: var(--text2); font-weight: 600; width: 46px; text-align: right; }

/* ================= 工具栏 / 筛选 ================= */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search {
  position: relative; flex: 0 0 auto; width: 240px;
}
.search .input { padding-left: 34px; height: 38px; }
.search::before {
  content: "🔍"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: .5; pointer-events: none;
}
.toolbar .spacer { margin-left: auto; }
.seg { display: inline-flex; background: #eef1f6; border-radius: 9px; padding: 3px; flex: none; }
.seg button {
  border: 0; background: transparent; padding: 7px 15px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: #77808f; cursor: pointer; transition: all .12s;
  white-space: nowrap;
}
.seg button.on { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(24, 58, 110, .12); }

/* ================= 空状态 / 加载 ================= */
.empty { padding: 60px 20px; text-align: center; color: var(--text3); }
.empty .ic { font-size: 40px; opacity: .35; margin-bottom: 12px; }
.empty p { font-size: 13px; margin-bottom: 4px; }
.empty small { font-size: 12px; color: #b3bcc9; }
.loading { padding: 50px; text-align: center; color: var(--text3); font-size: 13px; }
.spin {
  width: 22px; height: 22px; border: 2.5px solid #e3e9f3; border-top-color: var(--blue);
  border-radius: 50%; animation: sp .7s linear infinite; margin: 0 auto 12px;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ================= 弹窗 ================= */
.mask {
  position: fixed; inset: 0; background: rgba(20, 34, 56, .42);
  display: flex; align-items: center; justify-content: center; z-index: 900;
  padding: 24px; animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column;
  animation: pop .18s cubic-bezier(.3, 1.2, .5, 1);
}
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.wide { max-width: 860px; }
.modal.slim { max-width: 420px; }
.modal-h {
  padding: 17px 20px; border-bottom: 1px solid var(--line2);
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
}
.modal-h h3 { font-size: 15.5px; font-weight: 700; }
.modal-h .x {
  margin-left: auto; cursor: pointer; color: var(--text3); font-size: 20px;
  line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.modal-h .x:hover { background: #f2f5fa; color: var(--text); }
.modal-b { padding: 20px; overflow-y: auto; flex: 1; }
.modal-f {
  padding: 14px 20px; border-top: 1px solid var(--line2);
  display: flex; justify-content: flex-end; gap: 10px; flex: 0 0 auto;
}
.modal-f .left { margin-right: auto; }

/* ================= 表单栅格 ================= */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.span2 { grid-column: span 2; }
.form-sec {
  font-size: 12.5px; font-weight: 700; color: var(--blue);
  margin: 6px 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line2);
}
.form-sec:first-child { margin-top: 0; }
.hint { font-size: 11.5px; color: var(--text3); margin-top: 5px; line-height: 1.6; }

/* ================= 提示条 ================= */
.notice {
  border-radius: 9px; padding: 11px 14px; font-size: 12.5px; line-height: 1.75;
  margin-bottom: 14px; border: 1px solid;
}
.notice.info { background: #f2f8ff; border-color: #cfe2ff; color: #2a5fa8; }
.notice.warn { background: #fff9ec; border-color: #ffe2a8; color: #a86a00; }
.notice.danger { background: #fff2f2; border-color: #ffd0d0; color: #b83030; }
.notice b { font-weight: 700; }

/* ================= 提示气泡 ================= */
.toasts { position: fixed; top: 20px; right: 20px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 13px 18px; font-size: 13.5px; min-width: 240px; max-width: 400px;
  border-left: 4px solid var(--blue); animation: slideIn .2s ease;
  display: flex; align-items: flex-start; gap: 10px;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--orange); }
.toast .txt { line-height: 1.55; }

/* ================= 详情抽屉/面板 ================= */
.kv-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 22px; }
.kv {
  display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line2);
  font-size: 13px; align-items: flex-start;
}
.kv .k { color: var(--text3); flex: 0 0 88px; }
.kv .v { color: var(--text); font-weight: 600; word-break: break-all; text-align: right; margin-left: auto; }
.kv.full { grid-column: span 2; }

.timeline { border-left: 2px solid #e6edf7; padding-left: 16px; margin-left: 4px; }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--blue);
}
.tl-item.gray::before { background: #dfe6f0; }
.tl-item .tt { font-size: 13px; font-weight: 600; }
.tl-item .td { font-size: 12px; color: var(--text3); margin-top: 3px; }

.steps { display: flex; align-items: center; gap: 0; margin: 4px 0 2px; }
.step { display: flex; align-items: center; gap: 7px; }
.step .dot {
  width: 18px; height: 18px; border-radius: 50%; font-size: 10px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: #f0f2f6; border: 1.5px solid #dfe6f0; color: #98a1b0; font-weight: 700;
}
.step.done .dot { background: var(--green-l); border-color: transparent; color: var(--green); }
.step.cur .dot { background: var(--orange-l); border-color: transparent; color: var(--orange); }
.step .lb { font-size: 12px; color: var(--text3); font-weight: 600; }
.step.done .lb { color: var(--green); }
.step.cur .lb { color: var(--orange); }
.step .ln { width: 26px; height: 2px; background: #dfe6f0; margin: 0 8px; border-radius: 1px; }
.step.done .ln { background: #b7e4c8; }

.todo-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px;
  border-radius: 10px; border-left: 3px solid var(--blue); background: #fbfcfe;
  margin-bottom: 10px; cursor: pointer; transition: background .12s;
}
.todo-item:hover { background: #f5f9ff; }
.todo-item.danger { border-left-color: var(--red); }
.todo-item.warn { border-left-color: var(--orange); }
.todo-item .tt { font-size: 13.5px; font-weight: 600; }
.todo-item .td { font-size: 12px; color: var(--text3); margin-top: 4px; line-height: 1.6; }
.todo-item .go { margin-left: auto; color: var(--text3); font-size: 16px; align-self: center; }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.quick {
  border: 1px solid #eaeff7; border-radius: 10px; padding: 15px 10px; text-align: center;
  cursor: pointer; transition: all .13s; background: #fff;
}
.quick:hover { border-color: #a9cbff; background: #f7fbff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22, 119, 255, .1); }
.quick .ic { font-size: 22px; }
.quick .nm { font-size: 12.5px; font-weight: 600; margin-top: 8px; }
.quick.off { opacity: .45; cursor: not-allowed; }
.quick.off:hover { transform: none; box-shadow: none; border-color: #eaeff7; background: #fff; }

.plan-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
  background: #fbfcfe;
}
.plan-card.overdue { border-color: #ffd0d0; background: #fff8f8; }
.plan-card.settled { opacity: .6; }
.plan-card .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.plan-card .hd .nm { font-size: 13px; font-weight: 600; }
.plan-card .hd .amt { margin-left: auto; font-size: 14px; font-weight: 700; }
.plan-row { display: grid; grid-template-columns: 74px 1fr 128px 128px 110px 100px; gap: 8px; margin-bottom: 8px; align-items: center; }
.plan-row .lb { font-size: 12px; color: var(--text3); }
.plan-row .del { color: var(--red); cursor: pointer; font-size: 12.5px; text-align: right; }
.plan-row .input { height: 34px; font-size: 12.5px; }

.aging { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding: 0 6px; }
.aging .col { flex: 1; text-align: center; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.aging .col .bx { background: linear-gradient(180deg, #4b9bff, var(--blue)); border-radius: 6px 6px 0 0; min-height: 3px; }
.aging .col.o .bx { background: linear-gradient(180deg, #fdb022, #f79009); }
.aging .col.r .bx { background: linear-gradient(180deg, #fb7c7c, #e5484d); }
.aging .col .vl { font-size: 12px; font-weight: 600; margin-bottom: 7px; color: var(--text2); }
.aging .col .lb { font-size: 11.5px; color: var(--text3); margin-top: 8px; }

.pager { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line2); font-size: 12.5px; color: var(--text3); }
.pager .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.pager button {
  height: 30px; min-width: 30px; padding: 0 10px; border-radius: 7px;
  border: 1px solid #dfe5ef; background: #fff; cursor: pointer; font-size: 12.5px; color: var(--text2);
}
.pager button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager button.on { background: var(--blue); border-color: var(--blue); color: #fff; }

.dropdown {
  position: absolute; right: 0; top: 46px; background: #fff; border-radius: 10px;
  box-shadow: var(--shadow-lg); min-width: 176px; padding: 6px; z-index: 500;
  border: 1px solid var(--line2);
}
.dropdown a {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 7px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.dropdown a:hover { background: #f4f7fc; }
.dropdown a.danger { color: var(--red); }
.dropdown .sep { height: 1px; background: var(--line2); margin: 5px 0; }

/* 顶栏消息铃铛：未读红点，0 条时隐藏 */
.bell-badge {
  background: var(--red); color: #fff; border-radius: 9px; font-size: 11px;
  padding: 0 5px; line-height: 16px; min-width: 16px; text-align: center; font-weight: 600;
}
#bell-menu .bell-item {
  display: block; padding: 9px 12px; border-bottom: 1px solid var(--line2); cursor: pointer;
}
#bell-menu .bell-item:hover { background: #f7f9fc; }
#bell-menu .bell-item.read { opacity: .58; }
#bell-menu .bell-t { font-size: 12.5px; font-weight: 600; color: var(--text); }
#bell-menu .bell-b { font-size: 11.5px; color: #7a8496; margin-top: 2px; line-height: 1.5; }
#bell-menu .bell-d { font-size: 11px; color: #a7b0be; margin-top: 3px; }
#bell-menu .bell-foot { padding: 7px; text-align: center; }
#bell-menu .bell-foot a { font-size: 12px; color: var(--blue); cursor: pointer; }
.rel { position: relative; }

.cred-box {
  background: #fdf6e6; border: 1px dashed #e8c273; border-radius: 10px;
  padding: 14px 16px; font-size: 13px; line-height: 2; color: #8a5a00;
}
.cred-box b { font-family: Consolas, Monaco, monospace; font-size: 14px; color: #5c3c00; }

@media (max-width: 1080px) {
  .sidebar { width: 62px; }
  .side-brand .nm, .side-item span.tx, .side-grp, .side-foot { display: none; }
  .side-item { justify-content: center; padding: 12px 0; }
  .dash-grid { grid-template-columns: 1fr; }
  .kv-list { grid-template-columns: 1fr; }
  .kv.full { grid-column: span 1; }
}
@media (max-width: 820px) {
  .login-box { flex-direction: column; max-width: 460px; }
  .login-left { width: 100%; padding: 30px 26px; }
  .login-feats { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: span 1; }
  .plan-row { grid-template-columns: 1fr 1fr; }
}

/* ================= 模块内子页签 ================= */
.tabs {
  display: flex; gap: 4px; margin: -4px 0 16px; border-bottom: 1px solid var(--line2);
  overflow-x: auto;
}
.tabs .tab {
  padding: 9px 15px; font-size: 13.5px; font-weight: 600; color: var(--text3);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .12s, border-color .12s; text-decoration: none;
}
.tabs .tab:hover { color: var(--blue); }
.tabs .tab.on { color: var(--blue); border-bottom-color: var(--blue); }

/* ================= 审批流转看板 ================= */
.flow-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 16px; }
.flow-col {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 15px 16px; min-height: 130px;
}
.flow-hd { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.flow-hd .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.flow-amt { font-size: 19px; font-weight: 700; margin: 9px 0 11px; letter-spacing: -.5px; }
.flow-item {
  padding: 8px 10px; border-radius: 8px; background: #fbfcfe; border: 1px solid #eef2f8;
  margin-bottom: 7px; cursor: pointer; transition: all .12s;
}
.flow-item:hover { border-color: #bcd7ff; background: #f7fbff; }
.flow-item .nm { font-size: 12.5px; font-weight: 600; }
.flow-item .mt { font-size: 11.5px; color: var(--text3); margin-top: 3px; }

/* ================= 审批步骤条 ================= */
.steps .step .ic {
  width: 20px; height: 20px; border-radius: 50%; font-size: 10.5px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: #f0f2f6; border: 1.5px solid #dfe6f0; color: #98a1b0; font-weight: 700;
}
.steps .step .tx { font-size: 12.5px; color: var(--text3); font-weight: 600; }
.steps .step.done .ic { background: var(--green-l); border-color: transparent; color: var(--green); }
.steps .step.done .tx { color: var(--green); }
.steps .step.on .ic { background: var(--orange-l); border-color: transparent; color: var(--orange); }
.steps .step.on .tx { color: var(--orange); }
.steps .step.rej .ic { background: var(--red-l); border-color: transparent; color: var(--red); }
.steps .step.rej .tx { color: var(--red); }
.steps .step:not(:last-child)::after {
  content: ""; width: 30px; height: 2px; background: #dfe6f0; margin: 0 10px; border-radius: 1px;
}
.steps .step.done:not(:last-child)::after { background: #b7e4c8; }

/* ================= 考勤扣款明细（悬停浮层） ================= */
.ded-link {
  cursor: help; font-variant-numeric: tabular-nums;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.ded-link:hover { text-decoration: underline solid; }
.att-tip {
  position: fixed; display: none; pointer-events: none; z-index: 1100; width: 304px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); font-size: 12.5px; overflow: hidden;
}
.att-tip-h {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 13px;
  background: #f7f9fc; border-bottom: 1px solid var(--line);
}
.att-tip-h b { font-size: 13.5px; }
.att-tip-h span { color: var(--text3); font-size: 11.5px; }
.att-tip-b { padding: 6px 13px; }
.att-tip-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; }
.att-tip-row .n { flex: none; width: 64px; color: var(--text2); }
.att-tip-row .d { flex: 1; color: var(--text3); font-size: 11.5px; }
.att-tip-row .a { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--red); }
.att-tip-row .a.zero { font-weight: 400; color: var(--text3); }
.att-tip-note { padding: 3px 0 5px 72px; font-size: 11.5px; color: var(--orange); }
.att-tip-f {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 13px; border-top: 1px solid var(--line); background: #fafbfd; font-weight: 600;
}
.att-tip-f b { font-variant-numeric: tabular-nums; }

/* ================= 社保 / 公积金计算器（右下角悬浮） ================= */
.calc-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 1000;
  height: 46px; padding: 0 18px; border-radius: 24px; background: var(--blue); color: #fff;
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 22px rgba(22, 119, 255, .34); cursor: pointer;
  user-select: none; transition: transform .15s, box-shadow .15s;
}
.calc-fab .ic { font-size: 19px; line-height: 1; }
.calc-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(22, 119, 255, .42); }
.calc-panel {
  position: fixed; right: 24px; bottom: 84px; z-index: 1000; width: 452px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); animation: pop .16s ease; overflow: hidden;
}
.calc-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; background: #f7f9fc; border-bottom: 1px solid var(--line);
}
.calc-h b { font-size: 13.5px; }
.calc-h .x { cursor: pointer; color: var(--text3); font-size: 18px; line-height: 1; padding: 0 4px; }
.calc-h .x:hover { color: var(--text); }
.calc-b { padding: 12px 14px 14px; max-height: 64vh; overflow-y: auto; }
.calc-sec { margin-bottom: 7px; font-size: 12.5px; font-weight: 700; color: var(--text2); }
.calc-base { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12.5px; color: var(--text2); }
.calc-inp {
  width: 54px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; outline: none;
}
.calc-inp:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(22, 119, 255, .12); }
.calc-inp.amt { width: 62px; color: var(--text); }
.calc-tb { width: 100%; border-collapse: collapse; font-size: 12px; }
.calc-tb th, .calc-tb td { padding: 5px 6px; border-bottom: 1px solid var(--line2); }
.calc-tb thead th { background: #f7f9fc; font-size: 11.5px; font-weight: 600; color: var(--text2); text-align: center; }
.calc-tb th.l, .calc-tb td.l { text-align: left; }
.calc-tb th.r, .calc-tb td.r { text-align: right; }
.calc-tb th.a, .calc-tb td.a { text-align: right; color: var(--red); font-variant-numeric: tabular-nums; }
.calc-tb td.a + td, .calc-tb td.a ~ td.r { border-left: 1px dashed var(--line); }
.calc-tb tr.sum td { background: #fafbfd; border-top: 1px solid var(--line); font-weight: 700; }
.calc-foot { margin-top: 12px; padding: 10px 12px; background: #f2f6fc; border-radius: 8px; font-size: 12.5px; line-height: 1.7; }
.calc-note { margin-top: 8px; font-size: 11px; line-height: 1.6; color: var(--text3); }

/* ---------- 二级子页签（社保台账内部） ---------- */
.tabs.sub2 { margin: 4px 0 12px; }
.tabs.sub2 .tab { padding: 7px 13px; font-size: 13px; }

/* ---------- 组织架构树 ---------- */
.org-tree { padding: 8px 0; }
.org-node {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--line2); font-size: 13px;
}
.org-node:last-child { border-bottom: none; }
.org-node:hover { background: #fafbfd; }
.org-sym { color: var(--blue); font-size: 12px; width: 14px; text-align: center; flex: none; }
.org-name { font-size: 13.5px; }
.org-ops { margin-left: auto; display: flex; gap: 12px; font-size: 12.5px; flex: none; }
.org-ops a { cursor: pointer; color: var(--blue); }
.org-ops a.danger { color: var(--red); }
.org-ops a:hover { text-decoration: underline; }

/* ---------- 人力报表 ---------- */
.rpt-grid { align-items: start; margin-top: 14px; }
.rpt-list { padding: 6px 14px 14px; }
.rpt-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12.5px; }
.rpt-name {
  width: 96px; flex: none; color: var(--text2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rpt-bar { flex: 1; height: 8px; background: var(--line2); border-radius: 5px; overflow: hidden; }
.rpt-bar i { display: block; height: 100%; border-radius: 5px; }
.rpt-val { width: 160px; flex: none; text-align: right; color: var(--text2); }
.rpt-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 14px 16px; }
.rpt-chip { background: #f2f6fc; border-radius: 8px; padding: 7px 12px; font-size: 12.5px; color: var(--text2); }
.rpt-chip b { color: var(--text); font-size: 14px; margin-left: 4px; }
.rpt-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 12px 14px 8px; }
.rpt-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  height: 100%; justify-content: flex-end; gap: 4px;
}
.rpt-bars { flex: 1; display: flex; align-items: flex-end; gap: 2px; width: 100%; justify-content: center; }
.rpt-bars i { width: 9px; min-height: 2px; border-radius: 2px 2px 0 0; display: block; }
.rpt-col span { font-size: 10.5px; color: var(--text3); }

/* ---------- 离职证明：A4 公文版式（标题居中 / 正文首行缩进 2 字符 / 落款右对齐） ---------- */
.cert-doc {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 32px 40px 38px; color: var(--text);
  font-family: "微软雅黑", "宋体", SimSun, serif;
}
.cert-title {
  text-align: center; font-size: 21px; font-weight: 700;
  letter-spacing: 5px; margin: 0 0 24px; color: var(--text);
}
.cert-p {
  text-indent: 2em; font-size: 14px; line-height: 2; margin: 0 0 12px; color: var(--text);
}
.cert-sign { text-align: right; margin-top: 34px; }
.cert-sign-p { font-size: 14px; line-height: 2; margin: 0; color: var(--text); }

@media (max-width: 1080px) {
  .flow-board { grid-template-columns: 1fr; }
  .calc-panel { width: calc(100vw - 36px); right: 18px; }
}
