:root {
  /* ---------- 石墨雾蓝主色阶（方案 C） ---------- */
  --p50: #EDF2F8;
  --p100: #DCE6F1;
  --p200: #B9CBE0;
  --p300: #8FAECB;
  --p400: #5E88B4;
  --p500: #3A6EA5;   /* 主色：导航、主按钮、链接、选中态 */
  --p600: #2F5C8B;   /* hover / 按下 */
  --p700: #274E77;   /* 深档：步骤条、侧栏选中、强调文字 */
  --p800: #1F3E5F;
  --p900: #1A3350;

  /* ---------- 品牌 logo 底色（比主色深一档，贴近原版盾牌标识） ---------- */
  --logo-bg: #274E77;

  /* ---------- 点缀（暖陶土，仅用于强调，不作主色） ---------- */
  --ac: #C07248;
  --ac50: #FAF0E9;

  /* ---------- 中性 ---------- */
  --ink: #1B2430;
  --ink2: #5C6673;
  --ink3: #98A2AF;
  --line: #E4E7EC;
  --line2: #EDF0F4;
  --bg: #F5F7FA;
  --bg2: #FAFBFC;
  --panel: #FFFFFF;

  /* ---------- 深色壳（PC 侧栏） ----------
     色值取自企业后台参考截图采样：底色 #0F2B3D（深藏蓝）、
     选中项 #0C2231（比底色更深一档的内嵌块）。 */
  --shell: #0F2B3D;
  --shell2: #14344A;
  --shell-on: #0C2231;
  --shelltx: #A9BECE;

  /* ---------- 语义色（低饱和，与主色同色温） ---------- */
  --ok: #2E8B62;
  --okbg: #EAF5EF;
  --warn: #C07E24;
  --warnbg: #FBF3E4;
  --danger: #C0483F;
  --dangerbg: #FBECEA;

  /* ---------- 旧变量名别名（保持既有引用全部生效） ---------- */
  --primary: #3A6EA5;
  --primary-dark: #2F5C8B;
  --primary-light: #EDF2F8;
  --success: #2E8B62;
  --success-light: #EAF5EF;
  --warning: #C07E24;
  --warning-light: #FBF3E4;
  --danger-light: #FBECEA;
  --border: #E4E7EC;
  --border-strong: #D6DCE4;
  --text: #1B2430;
  --text-2: #5C6673;
  --muted: #98A2AF;

  /* ---------- 圆角 / 阴影 ---------- */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 1px 2px rgba(27, 36, 48, .05), 0 2px 8px rgba(27, 36, 48, .04);
  --shadow-lg: 0 8px 28px rgba(27, 36, 48, .12);

  /* ---------- 品牌色阶别名（旧代码引用 --brand-*） ---------- */
  --brand-50: #EDF2F8;
  --brand-100: #DCE6F1;
  --brand-200: #B9CBE0;
  --brand-300: #8FAECB;
  --brand-400: #5E88B4;
  --brand-500: #3A6EA5;
  --brand-600: #2F5C8B;
  --brand-700: #274E77;
  --brand-800: #1F3E5F;
  --brand-900: #1E293B;

  /* ---------- 中性灰阶别名 ---------- */
  --gray-50: #FAFBFC;
  --gray-100: #F5F6F8;
  --gray-200: #E4E7EC;
  --gray-400: var(--line);
  --gray-500: #98A2AF;
  --gray-700: #5C6673;
  --gray-900: #1B2430;

  /* ---------- 字号阶梯 ---------- */
  --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-15: 15px;
  --fs-16: 16px; --fs-18: 18px; --fs-20: 20px; --fs-24: 24px; --fs-28: 28px; --fs-32: 32px;

  /* ---------- 间距（8px 基线） ---------- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;

  /* ---------- 字体栈 ---------- */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

/* ---------- 登录/注册/门户 通用 ---------- */
.center-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: linear-gradient(160deg, #F7F9FB 0%, #EDF1F7 45%, #F5F6F8 100%);
}
.center-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 32px 32px 26px;
}
.center-card.wide { max-width: 520px; }
.brand-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: center; margin-bottom: 18px; }
.brand-mini .logo {
  width: 38px; height: 38px; border-radius: 11px; background: var(--logo-bg); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.brand-mini .logo svg { width: 27px; height: 27px; }
.brand-mini .t { font-size: 15px; font-weight: 500; color: var(--text); }
@media (max-width: 480px) {
  .center-card { padding: 26px 20px 22px; }
  .brand-mini { gap: 8px; }
  .brand-mini .t { font-size: 13.5px; }
}
.center-card h2 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.center-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.center-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-2); }
.center-foot .sep { color: var(--border-strong); margin: 0 8px; }

/* ---------- 门户首页 ---------- */
.portal {
  min-height: 100vh;
  background: linear-gradient(160deg, #F7F9FB 0%, #EAEFF6 50%, #F6F8FA 100%);
  padding: 56px 20px 40px;
  display: flex; flex-direction: column; align-items: center; position: relative;
}
.portal-head { text-align: center; margin-bottom: 40px; }
.portal-head .logo {
  width: 60px; height: 60px; border-radius: 16px; background: var(--logo-bg); color: #fff;
  margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(39, 78, 119, .28);
}
.portal-head .logo svg { width: 42px; height: 42px; }
.portal-head h1 { font-size: 26px; letter-spacing: .5px; }
.portal-head .sub { color: var(--text-2); margin-top: 8px; font-size: 14px; }
.portal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; max-width: 860px; width: 100%; }
.portal-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 26px 22px; cursor: pointer; transition: all .18s ease; box-shadow: var(--shadow);
  display: block; text-align: left;
}
.portal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--p200); }
.portal-card .ic {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.portal-card .ic svg { width: 24px; height: 24px; }
.portal-card.blue .ic { background: var(--primary-light); }
.portal-card.blue .ic svg { color: var(--primary); }
.portal-card.teal .ic { background: var(--okbg); }
.portal-card.teal .ic svg { color: var(--ok); }
.portal-card h3 { font-size: 17px; margin-bottom: 4px; }
.portal-card .en { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.portal-card ul { list-style: none; margin: 0; padding: 0; }
.portal-card ul li { color: var(--text-2); font-size: 13px; padding: 4px 0 4px 18px; position: relative; }
.portal-card ul li::before {
  content: ''; position: absolute; left: 4px; top: 12px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--border-strong);
}
.portal-card .go { margin-top: 16px; font-size: 13px; color: var(--primary); font-weight: 500; }
.portal-foot { margin-top: 34px; color: var(--muted); font-size: 12px; text-align: center; }
.portal-platform-link {
  position: absolute; right: 16px; bottom: 14px; font-size: 12px;
  color: #B9C2CE; text-decoration: none;
}
.portal-platform-link:hover { color: var(--ink2); }

/* ---------- 应用外壳 ---------- */
.layout { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: 210px; background: var(--shell); color: var(--shelltx); flex-shrink: 0;
  display: flex; flex-direction: column; transition: width .18s ease; overflow: hidden;
}
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .sb-logo-text .tx,
.sidebar.collapsed nav a span, .sidebar.collapsed .sb-logout span { display: none; }
.sidebar.collapsed .sb-top { padding: 14px 0 8px; flex-direction: column; align-items: center; gap: 8px; }
.sidebar.collapsed .sb-collapse svg { display: none; }
.sidebar.collapsed .sb-collapse::after { content: '»'; color: var(--shelltx); font-size: 12px; }
.sidebar .sb-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px 14px; }
.sidebar .sb-logo-text { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sidebar .sb-logo-text .mk {
  width: 30px; height: 30px; border-radius: 9px; background: var(--logo-bg); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.sidebar .sb-logo-text .mk svg { width: 21px; height: 21px; }
.sidebar .sb-logo-text .tx { min-width: 0; }
.sidebar .sb-logo-text .t { color: #fff; font-size: 14px; font-weight: 500; letter-spacing: .2px; white-space: nowrap; }
.sidebar .sb-logo-text .s { color: #8A96A8; font-size: 10.5px; margin-top: 1px; white-space: nowrap; }
.sidebar .sb-collapse {
  border: none; background: none; color: var(--shelltx); cursor: pointer; padding: 2px; line-height: 1;
}
.sidebar .sb-collapse svg { width: 14px; height: 14px; }
.sidebar .sb-collapse:hover { color: #fff; }
/* 参考图侧栏没有用户信息块（用户信息统一在页头右侧的下拉菜单里），故不再有对应样式 */
.sidebar nav { padding: 12px 10px; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: var(--shelltx); font-size: 13.5px; margin-bottom: 4px; white-space: nowrap;
}
.sidebar nav a svg { width: 15px; height: 15px; flex-shrink: 0; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: var(--shell-on); color: #fff; font-weight: 500; }
.sidebar .sb-bottom { padding: 12px 16px 14px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar .sb-logout {
  display: flex; align-items: center; gap: 10px; border: none; background: none; cursor: pointer;
  color: var(--shelltx); font-size: 13px; padding: 4px 0; font-family: inherit; white-space: nowrap;
}
.sidebar .sb-logout svg { width: 15px; height: 15px; }
.sidebar .sb-logout:hover { color: #fff; }
.sidebar .sb-ver { color: #6E7A8C; font-size: 11px; margin-top: 8px; white-space: nowrap; }
/* 企业端侧栏底部：一条分隔线 + 居中收起按钮（参考图采样：分隔线 #223C4C） */
.sidebar .sb-foot {
  flex: none; display: flex; align-items: center; justify-content: center;
  padding: 13px 0 15px; border-top: 1px solid #223C4C;
}
.sidebar .sb-foot-btn {
  border: 0; background: none; color: var(--shelltx); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px; border-radius: 6px; line-height: 0;
}
.sidebar .sb-foot-btn svg { width: 17px; height: 17px; }
.sidebar .sb-foot-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* 页头：参考图为「纯白底 + 1px 底边线 + 高 55px」，标题垂直居中 */
.page-head-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; min-height: 55px; flex: none;
  background: #fff; border-bottom: 1px solid #E4E9EF;
}
.page-head-bar .ph-left .ph-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 19px; font-weight: 700; color: var(--ink); line-height: 24px;
}
.page-head-bar .ph-left .ph-title svg { width: 18px; height: 18px; color: var(--primary); }
.page-head-bar .ph-left .ph-sub { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.page-head-bar .ph-left .ph-sub a { color: var(--primary); }
.page-head-bar .ph-right { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }

/* 页头右上角：日期 + 用户下拉（参考图：灰日期 + 青绿圆头像 + 姓名 + 折叠箭头） */
.page-head-bar .ph-right .df-today { font-size: 12.5px; color: #8A96A3; margin-right: 6px; }
.ph-user { position: relative; }
.ph-user-btn {
  display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; color: var(--ink); padding: 2px 0;
}
.ph-user-btn .av {
  width: 30px; height: 30px; border-radius: 50%; background: #0D8A80; color: #fff;
  font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none;
}
.ph-user-btn .nm { white-space: nowrap; }
.ph-user-btn svg { width: 14px; height: 14px; color: #9AA5B1; flex: none; }
.ph-user-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 150px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px;
  box-shadow: 0 8px 24px rgba(15, 43, 61, .14);
}
.ph-user-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none;
  cursor: pointer; font-family: inherit; font-size: 13px; color: var(--ink);
  padding: 8px 10px; border-radius: 6px; text-align: left;
}
.ph-user-menu button:hover { background: #F5F7FA; }
.ph-user-menu button svg { width: 15px; height: 15px; color: var(--text-2); flex: none; }
.content { flex: 1; padding: 0 22px 40px; overflow-x: auto; }

/* ---------- 组件 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.page-head h2 { font-size: 18px; }
.page-head .desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 15px; }
.panel-body { padding: 18px; }
.panel-hint { padding: 9px 18px; border-bottom: 1px solid var(--border); background: var(--gray-50); color: var(--muted); font-size: 12.5px; line-height: 1.6; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-card .label { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stat-card .value { font-size: 28px; font-weight: 600; margin-top: 6px; line-height: 1.2; }
.stat-card .unit { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.stat-card.blue .value { color: var(--primary); }
.stat-card.green .value { color: var(--success); }
.stat-card.orange .value { color: var(--warning); }
.stat-card.purple .value { color: #7A6BA0; }
.stat-card.gray .value { color: #8A94A0; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.tabs button {
  border: none; background: none; padding: 10px 16px; font-size: 14px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit;
}
.tabs button:hover { color: var(--primary); }
.tabs button.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.tabs .badge { margin-left: 6px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th {
  text-align: left; padding: 10px 14px; background: var(--bg2); color: var(--text-2);
  font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.grid td { padding: 11px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.grid tbody tr:hover { background: var(--bg2); }
table.grid td.nowrap, table.grid th.nowrap { white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 20px; }
.badge.pending { background: var(--warning-light); color: var(--warning); }
.badge.approved { background: var(--success-light); color: var(--success); }
.badge.rejected { background: var(--danger-light); color: var(--danger); }
.badge.gray { background: var(--bg); color: var(--text-2); }
.badge.blue { background: var(--primary-light); color: var(--primary); }
.badge.disabled { background: #8A94A0; color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  padding: 7px 14px; border-radius: 6px; font-size: 13.5px; cursor: pointer; font-family: inherit;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn.danger { color: var(--danger); border-color: #F0CFCC; background: #fff; }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg); color: var(--text); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.form-row { margin-bottom: 14px; }
.form-row > label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-row > label .req { color: var(--danger); margin-right: 3px; }
.input, select.input, textarea.input {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 14px; font-family: inherit; color: var(--text); background: #fff; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(58,110,165,.12); }
textarea.input { resize: vertical; min-height: 78px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 20px; }

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .f-item { display: flex; flex-direction: column; gap: 4px; }
.filters .f-item label { font-size: 12px; color: var(--text-2); }
.filters .input { width: auto; min-width: 140px; }

.cell-ellipsis { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty .ic { font-size: 30px; opacity: .35; margin-bottom: 8px; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; font-size: 13px; color: var(--text-2); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(27, 36, 48, .42); display: flex;
  align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; z-index: 100;
}
.modal {
  background: #fff; border-radius: 10px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg);
  animation: pop .16s ease;
}
.modal.wide { max-width: 720px; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 20px; max-height: 62vh; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.dl { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; font-size: 13.5px; }
.dl dt { color: var(--text-2); }
.dl dd { margin: 0; color: var(--text); word-break: break-all; }
.dl dd.pre { white-space: pre-wrap; }

/* ---------- Toast ---------- */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 9px 18px;
  box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; align-items: center; gap: 8px;
  animation: pop .16s ease; max-width: 90vw;
}
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.toast.success .dot { background: var(--success); }
.toast.error .dot { background: var(--danger); }
.toast.error { border-color: #F0CFCC; }
.toast.warn .dot { background: var(--warning); }

/* ---------- 条形图 ---------- */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 108px 1fr 46px; align-items: center; gap: 10px; font-size: 13px; }
.bar-row .nm { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { background: var(--line2); border-radius: 4px; height: 16px; overflow: hidden; }
.bar-row .fill { height: 100%; background: linear-gradient(90deg, var(--p400), var(--primary)); border-radius: 4px; min-width: 2px; }
.bar-row .val { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pie-legend { display: flex; flex-direction: column; gap: 8px; }
.pie-legend .lg { display: grid; grid-template-columns: 12px 1fr 56px; gap: 8px; align-items: center; font-size: 13px; }
.pie-legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.pie-legend .val { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pie-legend .track { background: var(--line2); border-radius: 4px; height: 8px; overflow: hidden; margin-top: 4px; grid-column: 2 / 4; }
.pie-legend .track .fill { height: 100%; border-radius: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; }
.alert.warn { background: var(--warning-light); color: #7A5010; border: 1px solid #EBD9B8; }
.alert.info { background: var(--primary-light); color: var(--p700); border: 1px solid var(--p200); }
.alert .btn { margin-left: auto; }

.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.nowrap { white-space: nowrap; }

/* ---------- 代表端：拜访记录 ---------- */
.filter-card { padding: 14px 18px 12px; }
.filter-line { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.filter-line .fl-item { display: flex; flex-direction: column; gap: 5px; }
.filter-line .fl-item > label { font-size: 12px; color: var(--text-2); }
.filter-line .fl-item .input { width: 240px; }
.filter-line .fl-item select.input { width: 120px; }
.filter-line .fl-btn { margin-left: auto; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: none; cursor: pointer;
  color: var(--text); font-size: 13.5px; font-family: inherit; padding: 6px 4px;
}
.link-btn svg { width: 15px; height: 15px; }
.link-btn:hover { color: var(--primary); }
.record-count { font-size: 12px; color: var(--muted); padding: 2px 0 8px; }
table.record { width: 100%; border-collapse: collapse; font-size: 13px; }
table.record th {
  text-align: left; padding: 10px 12px; color: var(--text-2); font-weight: 500;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.record td { padding: 10px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
table.record tbody tr { cursor: pointer; }
table.record tbody tr:hover { background: var(--bg2); }
table.record td.num, table.record th.num { text-align: right; }
.type-pill {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 12px;
  font-size: 12px; background: var(--bg); color: var(--text); line-height: 20px;
}
.type-pill.blue { background: var(--p500); color: #fff; }
.cam-ico { display: inline-flex; vertical-align: -3px; margin-left: 6px; color: var(--p400); }
.cam-ico svg { width: 15px; height: 15px; }
.pager-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px 2px; font-size: 12.5px; color: var(--text-2); }
.pager-nums { display: flex; align-items: center; gap: 6px; }
.pg {
  min-width: 24px; height: 24px; border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  border-radius: 6px; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; padding: 0 4px;
}
.pg:hover { border-color: var(--primary); color: var(--primary); }
.pg.cur { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg svg { width: 13px; height: 13px; }
.pg:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 代表端：拜访登记表单 ---------- */
.form-card { max-width: 1060px; padding: 20px 24px 24px; }
.form-card > h3 { font-size: 15px; margin-bottom: 18px; }
.fwrap { display: flex; flex-wrap: wrap; gap: 16px 26px; }
.field { display: flex; flex-direction: column; gap: 6px; width: 300px; }
.field.wide { width: 380px; }
.field.full { width: 100%; }
.field > label { font-size: 13px; color: var(--text); }
.field > label .req { color: var(--danger); margin-left: 2px; }
.field > label .opt { color: var(--muted); font-size: 12px; margin-left: 6px; }
.field .input { width: 100%; }
.field select.input { width: auto; min-width: 130px; padding-right: 28px; }
.field textarea.input { min-height: 76px; }
.combo { position: relative; display: inline-block; width: 100%; }
.combo .input { width: 100%; padding-right: 30px; }
.combo-arrow {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%) rotate(90deg);
  color: var(--muted); pointer-events: none; display: flex;
}
.combo-arrow svg { width: 12px; height: 12px; }
.combo-dd {
  display: none; position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-lg);
  max-height: 220px; overflow-y: auto; padding: 4px;
}
.combo-it { padding: 7px 10px; border-radius: 6px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.combo-it:hover { background: var(--primary-light); color: var(--primary); }
.combo-empty { padding: 8px 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.upload-hint { font-size: 12px; color: var(--text-2); margin-left: 8px; }
.upload-boxes { display: flex; gap: 12px; flex-wrap: wrap; }
.upload-box {
  width: 128px; height: 118px; border: 1.5px dashed var(--line); border-radius: 8px; background: var(--bg2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink3); font-size: 12.5px; cursor: pointer; transition: all .15s;
}
.upload-box:hover { border-color: var(--primary); color: var(--primary); }
.upload-box svg { width: 30px; height: 30px; }
.upload-thumb { position: relative; width: 128px; height: 118px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb .rm {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.form-actions { display: flex; gap: 12px; margin-top: 22px; }

/* ---------- 代表端：统计页 ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat-cards .sc {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow);
}
.sc .sc-ic { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sc .sc-ic svg { width: 20px; height: 20px; }
.sc .sc-ic.blue { background: var(--p50); color: var(--p500); }
.sc .sc-ic.green { background: var(--okbg); color: var(--ok); }
.sc .sc-ic.orange { background: var(--warnbg); color: var(--warn); }
.sc .sc-ic.red { background: var(--dangerbg); color: var(--danger); }
.sc .sc-label { font-size: 12.5px; color: var(--text-2); }
.sc .sc-value { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.25; font-variant-numeric: tabular-nums; }
.trend-panel { margin-top: 16px; }
.trend-panel .tp-title { font-size: 13.5px; color: var(--text); padding: 14px 18px 4px; }
.trend-row { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 14px; padding: 7px 18px; }
.trend-row .tm { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trend-row .tbar {
  height: 26px; background: var(--line2); border-radius: 5px; position: relative; overflow: hidden;
}
.trend-row .tfill {
  height: 100%; background: var(--p500); border-radius: 5px; min-width: 90px;
  display: flex; align-items: center; padding-left: 10px;
}
.trend-row .tfill span { font-size: 12px; color: #FFFFFF; white-space: nowrap; }
.select-mini { width: auto !important; min-width: 110px; }
.thumb-row { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; }

/* ---------- 管理员后台 ---------- */
.sc .sc-ic.purple { background: #F0EDF7; color: #7A6BA0; }
.stat-cards.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1280px) { .stat-cards.five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .stat-cards.five { grid-template-columns: repeat(2, 1fr); } }

.duo { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 1100px) { .duo { grid-template-columns: 1fr; } }

.ps-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg); border-radius: 8px; padding: 9px 14px; margin: 0 18px 10px;
}
.ps-row .nm { font-weight: 600; font-size: 13.5px; color: var(--text); }
.ps-row .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ps-row .rt { text-align: right; }
.ps-row .cnt { font-weight: 700; font-size: 15px; color: var(--text); }
.ps-row .sub2 { font-size: 12px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }

.seg-tabs {
  display: inline-flex; background: var(--bg); border-radius: 10px; padding: 4px; gap: 2px;
  flex-wrap: wrap; margin-bottom: 14px; max-width: 100%;
}
.seg-tabs button {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: none;
  padding: 7px 16px; border-radius: 7px; font-size: 13.5px; color: var(--text-2);
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.seg-tabs button svg { width: 15px; height: 15px; }
.seg-tabs button:hover { color: var(--primary); }
.seg-tabs button.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(27, 36, 48, .08); }

.export-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 16px; gap: 12px; flex-wrap: wrap; }
.export-count { font-size: 12.5px; color: var(--muted); }
.export-count b { color: var(--primary); font-size: 14px; }

.icon-btn { border: none; background: none; cursor: pointer; padding: 4px 6px; display: inline-flex; color: var(--muted); border-radius: 5px; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.red { color: var(--danger); }
.icon-btn.blue { color: var(--primary); }
.icon-btn:hover { background: var(--bg); }
table.record th.th-ops, table.record td.ops { text-align: right; }

.btn-ok, .btn-reject {
  border-radius: 8px; padding: 3px 14px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; background: #fff; transition: all .15s;
}
.btn-ok { border: 1px solid #93CFAF; color: var(--ok); }
.btn-ok:hover { background: var(--success-light); }
.btn-reject { border: 1px solid #E3A9A4; color: var(--danger); margin-left: 8px; }
.btn-reject:hover { background: var(--danger-light); }

.price-hint { font-size: 12px; color: var(--muted); margin: -8px 0 14px; }

/* ============================================================
   移动优先响应式（≤767px）：侧栏抽屉化 + 代表端底部标签栏
   ============================================================ */
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: none; background: none; color: var(--text);
  cursor: pointer; border-radius: 8px; flex-shrink: 0;
}
.menu-toggle:hover { background: var(--gray-100); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(27, 36, 48, .42); z-index: 55; }

@media (max-width: 767px) {
  .layout { position: relative; }
  /* 侧栏变抽屉（管理/平台端） */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 60;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.collapsed { width: 248px; }      /* 移动端不保留 60px 收起态 */
  .sidebar .sb-collapse { display: none; }   /* 隐藏桌面收起按钮 */
  .sidebar-backdrop.show { display: block; }

  .main { width: 100%; }
  .menu-toggle { display: inline-flex; margin-right: 8px; }
  .page-head-bar { padding: 10px 14px 8px; }
  .page-head-bar .ph-left .ph-title { font-size: var(--fs-16); }
  .content { padding: 0 14px 28px; }

  /* 统计卡降级 */
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .stat-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

  /* 表单全宽 + 触控目标 ≥44px + 防 iOS 缩放 */
  .field, .field.wide, .field.full { width: 100% !important; }
  .fwrap { gap: 12px; }
  .form-card { padding: 16px 14px 20px; }
  .input, select.input, textarea.input { font-size: 16px; }
  .btn { min-height: 40px; }
  .filters .input { min-width: 120px; }

  /* 代表端记录表 → 卡片堆叠（依赖 td[data-label]） */
  table.record { display: block; }
  table.record thead { display: none; }
  table.record tbody { display: block; }
  table.record tr {
    display: block; background: #fff; border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--shadow);
  }
  table.record td {
    display: flex; justify-content: space-between; gap: 12px; padding: 6px 0;
    border: none; text-align: right; white-space: normal;
  }
  table.record td::before {
    content: attr(data-label); color: var(--gray-500); font-size: var(--fs-12);
    text-align: left; flex-shrink: 0;
  }
  table.record td.num { text-align: right; }
  .pager-bar { flex-direction: column; gap: 8px; align-items: stretch; }
}

/* ---------- 代表端：移动端底部标签栏（现场快速切换） ---------- */
.rep-tabbar { display: none; }
@media (max-width: 767px) {
  .layout--rep .sidebar { display: none; }           /* 代表端移动端用底部标签栏，不用抽屉 */
  .layout--rep .menu-toggle { display: none; }
  .layout--rep .content { padding-bottom: 76px; }
  .rep-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(27, 36, 48, .05);
  }
  .rep-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 0 6px; color: var(--gray-500); font-size: 11px; text-decoration: none;
  }
  .rep-tabbar a svg { width: 22px; height: 22px; }
  .rep-tabbar a.active { color: var(--p700); }
}

/* ==================== 代表端手机界面（重设计） ==================== */
.rep-app, .wz, .rep-rec { max-width: 760px; margin: 0 auto; }

/* 工作台 */
.rep-header { background: var(--p500); padding: 18px 16px 26px; color: #fff; }
.rep-h-top { display: flex; justify-content: space-between; align-items: flex-start; }
.rep-h-greet { font-size: 19px; font-weight: 600; }
.rep-h-date { font-size: 12px; opacity: .85; margin-top: 4px; }
.rep-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.rep-dash { background: #fff; border-radius: 14px; margin: -16px 12px 0; padding: 14px; box-shadow: 0 2px 8px rgba(27, 36, 48, .05); }
.rep-dash-title { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; color: var(--ink); }
.rep-dash-sub { font-weight: 400; color: var(--ink3); font-size: 11px; }
.rep-kpi { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 10px; }
.rep-kpi-i { text-align: center; position: relative; }
.rep-kpi-i+.rep-kpi-i::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line2); }
.rep-kpi-i b { font-size: 20px; font-weight: 600; color: var(--p700); display: block; }
.rep-kpi-i b small { font-size: 11px; font-weight: 400; }
.rep-kpi-i span { font-size: 10.5px; color: var(--ink3); }
.rep-cta { margin: 14px 12px 0; background: var(--p500); border-radius: 14px; color: #fff; padding: 14px; display: flex; align-items: center; gap: 12px; width: calc(100% - 24px); box-sizing: border-box; border: none; cursor: pointer; }
.rep-cta-ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rep-cta-ic svg { width: 22px; height: 22px; }
.rep-cta-tx { flex: 1; display: flex; flex-direction: column; }
.rep-cta-tx b { font-size: 16px; }
.rep-cta-tx small { font-size: 12px; opacity: .85; }
.rep-cta-arr { font-size: 20px; opacity: .7; }
.rep-sec-title { margin: 18px 14px 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
.rep-news { background: #fff; border-radius: 14px; margin: 8px 12px 0; }
.rep-news-i { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line2); }
.rep-news-i:last-child { border-bottom: none; cursor: pointer; }
.rep-news-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ink3); }
.rep-news-dot.ok { background: var(--ok); } .rep-news-dot.rejected { background: var(--danger); } .rep-news-dot.pending { background: var(--warn); }
.rep-news-tx { flex: 1; font-size: 12.5px; color: var(--ink2); }
.rep-news-tx b.ok { color: var(--ok); } .rep-news-tx b.rejected { color: var(--danger); } .rep-news-tx b.pending { color: var(--warn); }
.rep-news-arr { color: #B9C2CE; }
.rep-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 12px 0; }
.rep-tile { background: #fff; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.rep-tile-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--p50); display: flex; align-items: center; justify-content: center; color: var(--p700); }
.rep-tile-ic.warn { background: var(--ac50); color: var(--warn); }
.rep-tile-ic svg { width: 18px; height: 18px; }
.rep-tile b { font-size: 14px; } .rep-tile small { font-size: 11.5px; color: var(--ink3); }

/* 我的 */
.rep-profile-h { background: var(--p500); padding: 20px 16px 34px; color: #fff; display: flex; align-items: center; gap: 14px; }
.rep-profile-av { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.rep-profile-info { flex: 1; }
.rep-profile-info b { font-size: 19px; display: block; }
.rep-profile-badge { display: inline-flex; align-items: center; font-size: 11.5px; margin-top: 5px; background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 10px; }
.rep-profile-badge.on { background: var(--okbg); color: var(--ok); }
.rep-profile-info small { display: block; font-size: 11.5px; opacity: .9; margin-top: 4px; }
.rep-profile-stat { background: #fff; border-radius: 14px; margin: -22px 12px 0; padding: 14px 0; display: grid; grid-template-columns: 1fr 1fr; text-align: center; box-shadow: 0 2px 8px rgba(27, 36, 48, .05); }
.rep-profile-stat div { border-right: 1px solid var(--line2); } .rep-profile-stat div:last-child { border: none; }
.rep-profile-stat b { font-size: 22px; font-weight: 600; color: var(--p700); } .rep-profile-stat span { font-size: 11px; color: var(--ink3); }
.rep-list { background: #fff; border-radius: 14px; margin: 12px 12px 0; padding: 0 14px; }
.rep-li { display: flex; align-items: center; gap: 12px; min-height: 54px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.rep-li:last-child { border-bottom: none; }
.rep-li>div { display: flex; flex-direction: column; }
.rep-li>div small { font-size: 11px; color: var(--ink3); font-weight: 400; }
.rep-li-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--p50); display: flex; align-items: center; justify-content: center; color: var(--p700); flex-shrink: 0; }
.rep-li-ic.warn { background: var(--ac50); color: var(--warn); } .rep-li-ic.ok { background: var(--okbg); color: var(--ok); }
.rep-li-ic svg { width: 16px; height: 16px; }
.rep-li-arr, .rep-li-v { margin-left: auto; color: var(--ink3); font-size: 13px; }
.rep-logout { margin: 16px 12px 0; background: #fff; border-radius: 14px; text-align: center; padding: 14px; color: var(--danger); font-size: 15px; font-weight: 600; width: calc(100% - 24px); box-sizing: border-box; border: none; cursor: pointer; }

/* 我的记录 */
.rep-rec-search { margin: 12px 12px 0; background: #fff; border-radius: 20px; padding: 10px 16px; font-size: 13px; color: var(--ink3); display: flex; gap: 8px; align-items: center; }
.rep-rec-search input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--ink); }
.rep-rec-search-ic { display: inline-flex; align-items: center; justify-content: center; color: var(--ink3); flex: none; }
.rep-rec-search-ic svg { width: 16px; height: 16px; }
.rep-rec-stat { background: #fff; border-radius: 14px; margin: 12px 12px 0; display: grid; grid-template-columns: repeat(4,1fr); padding: 12px 0; }
.rep-rec-stat div { text-align: center; border-right: 1px solid var(--line2); } .rep-rec-stat div:last-child { border: none; }
.rep-rec-stat b { font-size: 16px; font-weight: 600; color: var(--ink); display: block; } .rep-rec-stat b.ok { color: var(--ok); }
.rep-rec-stat span { font-size: 10.5px; color: var(--ink3); }
.rep-rec-list { margin: 12px 12px 0; }
.rec-card { background: #fff; border-radius: 14px; padding: 13px 14px 13px 17px; position: relative; overflow: hidden; margin-bottom: 10px; cursor: pointer; }
.rec-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ok); }
.rec-card.pending::before { background: var(--warn); } .rec-card.rejected::before { background: var(--danger); }
.rec-card-h { display: flex; justify-content: space-between; align-items: center; }
.rec-card-h b { font-size: 14.5px; color: var(--ink); }
.rec-card-m { font-size: 12.5px; color: var(--ink2); margin-top: 5px; }
.rec-card-tags { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.rec-tag { background: var(--p50); color: var(--p700); font-size: 11px; border-radius: 4px; padding: 2px 6px; }
.rec-card-date { font-size: 11px; color: var(--ink3); }
.rec-card-f { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); margin-top: 8px; }
.rec-card-detail { color: var(--p700); }

/* 三步向导 */
.wz { display: flex; flex-direction: column; min-height: calc(100vh - 120px); }
.wz-nav { background: var(--p500); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.wz-back { font-size: 22px; width: 28px; background: none; border: none; color: #fff; cursor: pointer; line-height: 1; }
.wz-nav-t { font-size: 16px; font-weight: 600; } .wz-nav-sp { width: 28px; }
.wz-steps { background: var(--p700); padding: 0 16px 12px; display: flex; align-items: center; gap: 8px; color: #E8F0FC; font-size: 12px; }
.wz-step { display: flex; align-items: center; gap: 5px; }
.wz-step i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; font-style: normal; }
.wz-step.on i { background: #fff; color: var(--p700); font-weight: 600; } .wz-step.done i { background: #fff; color: var(--p700); }
.wz-step.on { color: #fff; font-weight: 600; }
.wz-line { flex: 1; height: 1.5px; background: rgba(255,255,255,.35); }
.wz-body { flex: 1; padding-bottom: 8px; }
.wz-sect { margin: 16px 12px 0; font-size: 13px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.wz-sect small { font-weight: 400; color: var(--ink3); font-size: 11px; }
.wz-hosp { margin: 10px 12px 0; background: #fff; border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--p200); cursor: pointer; }
.wz-hosp-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--p50); display: flex; align-items: center; justify-content: center; color: var(--p700); flex-shrink: 0; }
.wz-hosp-ic svg { width: 22px; height: 22px; }
.wz-hosp-tx { flex: 1; display: flex; flex-direction: column; }
.wz-hosp-tx b { font-size: 15px; color: var(--ink); } .wz-hosp-tx b.ph { color: var(--ink3); font-weight: 400; }
.wz-hosp-tx small { font-size: 12px; color: var(--ink3); } .wz-hosp-arr { color: #B9C2CE; font-size: 18px; }
.wz-list { background: #fff; border-radius: 14px; margin: 10px 12px 0; padding: 0 14px; }
.wz-row { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line2); gap: 10px; }
.wz-row:last-child { border-bottom: none; }
.wz-row label { font-size: 14px; color: var(--ink); flex-shrink: 0; display: flex; flex-direction: column; }
.wz-row label small { font-size: 10.5px; color: var(--ink3); font-weight: 400; }
.wz-row .req { color: var(--danger); margin-right: 2px; }
.wz-val { margin-left: auto; font-size: 14px; color: var(--ink3); display: flex; align-items: center; gap: 6px; text-align: right; cursor: pointer; }
.wz-val.fill { color: var(--ink); } .wz-val .arr { color: #B9C2CE; font-size: 14px; }
.wz-in { border: none; outline: none; text-align: right; font-size: 14px; flex: 1; background: transparent; color: var(--ink); min-height: 52px; }
.wz-select { border: none; outline: none; background: transparent; font-size: 14px; color: var(--ink); flex: 1; text-align: right; max-width: 62%; -webkit-appearance: none; appearance: none; padding-right: 2px; }
.wz-select:disabled { color: #B8C0CB; }
.wz-punch-in { width: 100%; text-align: left; min-height: 44px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; display: block; }
.wz-row2 { background: #fff; border-radius: 14px; margin: 10px 12px 0; padding: 0 14px; display: flex; align-items: center; min-height: 52px; gap: 10px; }
.wz-row2 .wz-in { text-align: left; }
.wz-tip { background: var(--p50); color: var(--p700); border-radius: 10px; padding: 11px 14px; font-size: 12px; margin: 14px 12px 0; line-height: 1.7; }
.wz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 12px 0; }
.wz-chip { background: #fff; border: 1px solid var(--line2); border-radius: 20px; padding: 8px 14px; font-size: 13px; color: var(--ink2); cursor: pointer; }
.wz-chip.on { background: var(--p50); border-color: var(--p500); color: var(--p700); font-weight: 600; }
.wz-seg { display: flex; background: #E9EDF2; border-radius: 10px; margin: 10px 12px 0; padding: 3px; }
.wz-seg span { flex: 1; text-align: center; font-size: 13px; padding: 8px 0; color: var(--ink2); border-radius: 8px; cursor: pointer; }
.wz-seg span.on { background: #fff; color: var(--p700); font-weight: 600; }
.wz-punch { margin: 10px 12px 0; background: #fff; border-radius: 14px; padding: 16px; }
.wz-punch-h { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.wz-punch-st { font-size: 11px; font-weight: 400; color: var(--warn); } .wz-punch-st.on { color: var(--ok); }
.wz-punch-btn { background: var(--p500); color: #fff; border-radius: 12px; text-align: center; padding: 14px; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; border: none; width: 100%; cursor: pointer; }
.wz-punch-btn svg { width: 18px; height: 18px; }
.wz-punch-tip { text-align: center; font-size: 11.5px; color: var(--ink3); margin-top: 8px; }
.wz-ta { background: #fff; border-radius: 14px; margin: 10px 12px 0; padding: 12px 14px; }
.wz-ta-t { font-size: 13.5px; font-weight: 600; } .wz-ta-t .req { color: var(--danger); } .wz-ta-t small { font-weight: 400; color: var(--ink3); font-size: 11px; }
.wz-ta-box { border: none; outline: none; width: 100%; background: var(--bg2); border-radius: 10px; margin-top: 8px; padding: 10px; font-size: 13px; color: var(--ink); resize: vertical; min-height: 64px; box-sizing: border-box; font-family: inherit; }
.wz-ta-cnt { text-align: right; font-size: 11px; color: var(--ink3); margin-top: 4px; }
.wz-bar { display: flex; gap: 10px; padding: 10px 12px 16px; background: #fff; border-top: 1px solid var(--line2); }
.wz-btn { flex: 1; border-radius: 12px; text-align: center; padding: 13px 0; font-size: 15px; font-weight: 600; border: none; cursor: pointer; }
.wz-btn.pri { flex: 2.2; background: var(--p500); color: #fff; } .wz-btn.gh { background: var(--bg); color: var(--ink); }
.upload-boxes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.upload-box { width: 84px; height: 84px; border: 1.5px dashed var(--p200); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink3); font-size: 11px; cursor: pointer; }
.upload-thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; position: relative; }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb .rm { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 11px; line-height: 1; cursor: pointer; }

/* 选择列表 / 合规弹窗 */
.rep-pick { padding: 4px 0; }
.rep-pick input { width: 100%; box-sizing: border-box; margin-bottom: 10px; }
.rep-pick-list { max-height: 50vh; overflow: auto; }
.rep-pick-item { padding: 12px 8px; border-bottom: 1px solid var(--line2); font-size: 14px; cursor: pointer; }
.rep-pick-item.on { color: var(--p700); font-weight: 600; } .rep-pick-item:hover { background: var(--bg); }
.rep-comply { padding: 4px 0; line-height: 1.9; }
.rep-comply p { font-size: 13px; color: var(--ink2); margin-bottom: 8px; }
.rep-comply .rep-warn { color: var(--danger); font-weight: 500; }

/* 拜访时长自填 + 自动判定结果 */
.wz-dur { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 13px 14px; margin: 0 12px 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.wz-dur input { border: none; outline: none; flex: 1; font-size: 20px; font-weight: 600; color: var(--ink); background: transparent; }
.wz-dur input::placeholder { font-size: 14px; font-weight: 400; color: #B8C0CB; }
.wz-dur-unit { font-size: 14px; color: var(--ink3); flex: none; }
.wz-derive { margin: 0 12px 10px; background: linear-gradient(135deg, var(--p500), var(--p600)); border-radius: 12px; padding: 12px 14px; color: #fff; box-shadow: 0 4px 12px rgba(58, 110, 165, .25); }
.wz-derive-row { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; }
.wz-derive-row span { font-size: 13px; opacity: .85; }
.wz-derive-row b { font-size: 17px; font-weight: 600; }
.wz-tip.warn { color: var(--warn); }

/* 打卡信息采集明细 */
.wz-punch-info { margin-top: 10px; border-top: 1px dashed var(--line2); padding-top: 8px; }
.wz-pi { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 4px 0; line-height: 1.5; }
.wz-pi span { color: var(--ink3); flex: none; }
.wz-pi b { font-weight: 500; color: var(--ink); text-align: right; word-break: break-all; }
.wz-punch-tip .wz-warn { display: block; margin-top: 5px; color: var(--warn); font-style: normal; line-height: 1.6; }

/* ==================== 数据总览（企业管理端） ====================
   视觉基线：按参考截图 1:1 复刻。色值与尺寸均由参考图逐个像素采样得出：
     青绿 #0D8A80（主色：柱状/环形/排名徽章/代表头像/占比条）
     橙   #E08C1A（月度趋势折线）
     天蓝 #409EFF（分段控件选中态）
     藏蓝 #2B6CB0（医院榜徽章、蓝调图标）
     红   #D93025（异常数值：定位异常数、0% 实到率、与均值正差）
     底   #F5F7FA / 卡 #FFFFFF / 表头 #F7F9FC / 线 #E4E9EF
   所有色值以 --df-* 局部变量声明，作用域限定在 .df-dash 内，
   不影响其余页面的既有配色（石墨雾蓝 #3A6EA5 体系）。 */
.df-dash {
  --df-teal: #0D8A80;
  --df-teal-lo: #4FB3AA;
  --df-blue: #2B6CB0;
  --df-sky: #409EFF;
  --df-orange: #E08C1A;
  --df-violet: #8B5CF6;
  --df-red: #D93025;
  --df-ink: #1F2933;
  --df-ink2: #52606D;
  --df-muted: #8A96A3;
  --df-head: #F7F9FC;
  --df-line: #E4E9EF;
  --df-track: #F0F4F8;
  --df-tag: #7B8794;
  --df-gap: 16px;
  --df-vgap: 14px;
}
/* 参考图卡片为「描边为主、几乎无投影」，此处压掉全局 .panel 阴影；边框色统一到采样值 #E4E9EF */
.df-dash .panel { box-shadow: none; border-color: var(--df-line); }
.df-dash > * + * { margin-top: var(--df-vgap); }
.df-dash .panel + .panel { margin-top: 0; }

/* ---------- 筛选条（直接坐在页面底色上，不再套白卡） ----------
   参考图：页头底边线 → 分段控件顶 = 20px，控件底 → 状态卡顶 = 16px */
.df-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.df-seg { display: inline-flex; border: 1px solid var(--df-line); border-radius: 6px; overflow: hidden; background: #fff; }
.df-seg button {
  border: 0; background: #fff; color: #606266; font-size: 13px; line-height: 14px;
  padding: 8px 15px; cursor: pointer; border-left: 1px solid var(--df-line);
  font-family: inherit; transition: background .15s, color .15s;
}
.df-seg button:first-child { border-left: 0; }
.df-seg button:hover { background: #F5F7FA; }
.df-seg button.on { background: var(--df-sky); color: #fff; }
.df-range { font-size: 13px; color: var(--df-muted); }
.df-range b { color: var(--df-sky); font-weight: 400; }
.df-today { font-size: 12.5px; color: var(--df-muted); margin-right: 4px; }

/* ---------- 4 张状态卡（高 68px：图标 36 + 上下内边距 16） ---------- */
.df-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--df-gap); }
.df-card {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--df-line); border-radius: 8px; min-height: 68px;
  box-sizing: border-box;
}
.df-card.clickable { cursor: pointer; transition: border-color .15s; }
.df-card.clickable:hover { border-color: var(--df-sky); }
.df-card-b { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.df-card-v { font-size: 20px; font-weight: 600; color: var(--df-ink); line-height: 1.2; }
.df-card-lb { font-size: 12.5px; color: var(--df-muted); line-height: 1.35; }
.df-card.t-red .df-card-v { color: var(--df-red); }
.df-card.t-amber .df-card-v { color: var(--df-orange); }

/* 图标块：状态卡 36px、KPI 卡 30px，圆角方底 + 同色系图标 */
.df-ic { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }
.df-ic svg { width: 19px; height: 19px; }
.df-ic.sm { width: 30px; height: 30px; border-radius: 7px; }
.df-ic.sm svg { width: 16px; height: 16px; }
.df-ic.teal { background: #E6F5F3; color: var(--df-teal); }
.df-ic.blue { background: #EAF2FB; color: var(--df-blue); }
.df-ic.amber { background: #FDF5E6; color: var(--df-orange); }
.df-ic.red { background: #FDECEA; color: var(--df-red); }
.df-ic.violet { background: #F6F2FE; color: var(--df-violet); }
.df-ic.sm.teal { background: #ECF6F5; }
.df-ic.sm.blue { background: #EEF3F9; }
.df-ic.sm.amber { background: #FDF6ED; }
.df-ic.sm.red { background: #FCEFEE; }

/* ---------- 5 张 KPI 卡 ---------- */
.df-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--df-gap); }
.df-kpi { padding: 16px; background: #fff; border: 1px solid var(--df-line); border-radius: 8px; box-sizing: border-box; }
.df-kpi-t { display: flex; align-items: center; gap: 9px; }
.df-kpi-lb { font-size: 13px; color: var(--df-ink2); }
.df-kpi-v { font-size: 26px; font-weight: 600; color: var(--df-ink); margin: 10px 0 0; line-height: 1.1; }
.df-kpi-v small { font-size: 12.5px; font-weight: 400; color: var(--df-ink2); margin-left: 4px; }
.df-kpi-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.df-kpi-cy { font-size: 12px; color: var(--df-muted); }
.df-hint { font-size: 11.5px; color: var(--df-teal); background: #E6F5F3; border-radius: 4px; padding: 2px 6px; flex: none; }

/* 同一行的两块面板等高（与参考图一致：趋势/环形同为 360、排行/TOP5 同为 244）
   注意：面板间距为 12px，比卡片间距（16px）更紧，与参考图一致 */
.df-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.df-grid > .panel { display: flex; flex-direction: column; }
.df-grid > .panel > .table-wrap { flex: 1; }
.df-panel .panel-head { padding: 12px 18px; }
.df-panel .panel-head h3 { font-size: 15px; font-weight: 600; color: var(--df-ink); }
.df-chart { padding: 0 10px 6px; line-height: 0; }
.df-chart svg { display: block; width: 100%; height: auto; }
.df-chart text { font-size: 11px; fill: var(--df-muted); font-family: inherit; }
.df-meta { font-size: 12px; color: var(--df-muted); }
.df-meta b { color: var(--df-ink2); font-weight: 500; }

/* ---------- 拜访类型分布（环形图） ----------
   参考图：环（外径 180）距面板左侧 157px，图例贴面板右侧 16px，两端分布 */
.df-donut-wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 43px 22px 87px 157px; flex-wrap: wrap;
}
.df-donut { flex: none; line-height: 0; }
.df-donut-lg { display: flex; flex-direction: column; gap: 12px; }
.df-donut-i { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--df-ink); white-space: nowrap; }
.df-donut-i .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.df-donut-i b { font-weight: 400; color: var(--df-ink2); margin-left: 3px; }

/* ---------- 人员拜访排行 ----------
   列宽取自参考图采样：排名 58 / 代表 自适应 / 拜访 104 / 实到 86 / 实到率 67
   / 占比 163 / 与均值 100 / 差旅费 70，表格左内边距 17、右内边距 14 */
.df-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.df-table th, .df-table td { overflow: hidden; }
.df-table th:nth-child(1), .df-table td:nth-child(1) { width: 58px; }
.df-table th:nth-child(3), .df-table td:nth-child(3) { width: 104px; }
.df-table th:nth-child(4), .df-table td:nth-child(4) { width: 86px; }
.df-table th:nth-child(5), .df-table td:nth-child(5) { width: 67px; }
.df-table th:nth-child(6), .df-table td:nth-child(6) { width: 163px; }
.df-table th:nth-child(7), .df-table td:nth-child(7) { width: 100px; }
.df-table th:nth-child(8), .df-table td:nth-child(8) { width: 70px; }
.df-table thead th {
  background: var(--df-head); color: #3E4C59; font-weight: 400; font-size: 13px;
  text-align: left; padding: 11px 14px 11px 17px; border-bottom: 1px solid var(--df-line); white-space: nowrap;
  height: 34px; box-sizing: border-box;
}
.df-table thead th.num { text-align: right; }
.df-sort { display: inline-flex; flex-direction: column; gap: 1px; margin-left: 4px; vertical-align: middle; }
.df-sort i { width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; display: block; }
.df-sort i.u { border-bottom: 4px solid #C3CAD3; }
.df-sort i.d { border-top: 4px solid #C3CAD3; }
.df-table tbody td { padding: 8px 14px 8px 17px; border-bottom: 1px solid var(--df-line); vertical-align: middle; color: var(--df-ink); }
.df-table tbody tr:last-child td { border-bottom: 0; }
.df-table td.num { text-align: right; color: var(--df-ink2); }
.df-table td.red { color: var(--df-red); }
.df-table td.gapup { color: var(--df-red); }
.df-table td.gapdown { color: var(--df-teal); }
.df-rk {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 5px; background: var(--df-teal);
  color: #fff; font-size: 12px; font-weight: 500;
}
.df-rep { display: inline-flex; align-items: center; gap: 10px; }
.df-av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--df-teal); color: #fff;
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.df-rep-b { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.df-rep-n { color: var(--df-ink); line-height: 1.35; }
.df-rep-s { font-size: 12px; color: var(--df-muted); line-height: 1.35; }
.df-share { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.df-share-t { width: 97px; height: 6px; border-radius: 3px; background: var(--df-track); overflow: hidden; flex: none; }
.df-share-t i { display: block; height: 100%; border-radius: 3px; background: var(--df-teal); }
.df-share-n { color: var(--df-ink2); min-width: 36px; text-align: right; }

/* ---------- 医院 TOP 5 ---------- */
.df-hosp { padding: 6px 18px 14px; }
.df-hosp-i { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--df-line); }
.df-hosp-i:last-child { border-bottom: 0; }
.df-hosp-rk {
  width: 24px; height: 24px; border-radius: 6px; background: var(--df-blue); color: #fff;
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.df-hosp-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.df-hosp-n { font-size: 13px; color: var(--df-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-hosp-s { font-size: 12px; color: var(--df-muted); }
.df-tag {
  font-size: 11px; color: var(--df-tag); background: #F5F7FA; border: 0; border-radius: 4px;
  padding: 3px 8px; flex: none; letter-spacing: .06em;
}

@media (max-width: 1320px) {
  .df-cards { grid-template-columns: repeat(2, 1fr); }
  .df-kpis { grid-template-columns: repeat(3, 1fr); }
  .df-donut-wrap { justify-content: center; gap: 46px; padding: 26px 18px 30px; }
}
@media (max-width: 1100px) { .df-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .df-cards, .df-kpis { grid-template-columns: 1fr; }
  .df-donut-wrap { gap: 20px; }
}
