* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f7fa; --panel: #fff; --line: #e3e8ef; --text: #1f2733; --muted: #6b7585;
  --brand: #1a6fd4; --brand2: #0d4fa3; --ok: #1a9d6b; --warn: #e08b18; --err: #d94040;
  --shadow: 0 2px 12px rgba(20,40,80,.06); --r: 10px;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }

/* 登录 / 申请 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: linear-gradient(160deg, #eaf2fd 0%, #f7f9fc 55%, #eef4fb 100%); }
.auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 12px 40px rgba(20,60,120,.10); padding: 32px 28px; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.auth-logo .mark { width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(135deg,#1a6fd4,#0d4fa3);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.auth-logo h1 { font-size: 19px; font-weight: 700; letter-spacing: .3px; }
.auth-sub { color: var(--muted); font-size: 12.5px; margin: 6px 0 24px; }
.auth-tabs { display: flex; gap: 6px; background: #f0f4f9; padding: 4px; border-radius: 10px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.auth-tabs button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; background: #fff; color: var(--text); outline: none; transition: border .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field textarea { min-height: 76px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 9px;
  padding: 10px 18px; background: var(--brand); color: #fff; font-weight: 500; transition: background .15s; }
.btn:hover { background: var(--brand2); }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.btn.ghost { background: #eef3fa; color: var(--brand); }
.btn.danger { background: #fdecec; color: var(--err); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.auth-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; }
.msg { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.msg.err { background: #fdecec; color: var(--err); }
.msg.ok { background: #e8f7f0; color: var(--ok); }
/* 登录页底部：账号开通联系方式 */
.auth-contact { margin-top: 20px; padding-top: 15px; border-top: 1px dashed var(--line); }
.auth-contact .ac-h { font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.auth-contact .ac-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 3px 0; }
.auth-contact .ac-row > span { flex: 0 0 48px; color: var(--muted); font-size: 12.5px; }
.auth-contact .ac-row b { font-weight: 600; }
.auth-contact .ac-wx { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; letter-spacing: .3px; }
.auth-contact .ac-copy { margin-left: auto; border: 1px solid #cfe0f6; background: #f2f7fd; color: var(--brand);
  border-radius: 7px; padding: 3px 10px; font-size: 12px; }
.auth-contact .ac-copy:hover { background: #e6f0fc; }

/* 主框架 */
.shell { display: flex; min-height: 100vh; }
.side { width: 220px; background: #10233d; color: #cbd7e8; display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side .brand h2 { color: #fff; font-size: 15px; line-height: 1.4; }
.side .brand small { color: #8ba3c4; font-size: 11px; }
.side nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }

/* 子项：紧排小字，左侧竖线表示从属关系 */
.side nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; color: #b9c9de;
  font-size: 12px; margin-bottom: 1px; cursor: pointer; transition: background .12s, color .12s; }
.side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side nav a.on { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(26,111,212,.45); }
.side nav a > span { font-size: 12px; width: 15px; text-align: center; flex-shrink: 0; opacity: .9; }

/* 大类：胶囊标题。三级层次——当前板块最亮 > 其他展开中亮 > 收起最淡 */
.side nav .grp { font-size: 13.5px; font-weight: 600; color: #dce9fa; padding: 9px 11px 9px 13px;
  letter-spacing: .3px; display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none;
  border-radius: 9px; margin: 11px 0 3px; border-left: 3px solid rgba(26,111,212,.8);
  background: linear-gradient(90deg, rgba(26,111,212,.22), rgba(26,111,212,.05) 80%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s; }
.side nav .grp:first-child { margin-top: 2px; }
.side nav .grp:hover { color: #fff; background: linear-gradient(90deg, rgba(40,132,238,.38), rgba(40,132,238,.10) 80%); }
.side nav .grp.act { color: #fff; border-left-color: var(--brand);
  background: linear-gradient(90deg, rgba(26,111,212,.62), rgba(26,111,212,.16) 82%);
  box-shadow: inset 0 0 0 1px rgba(130,185,255,.22), 0 2px 10px rgba(10,40,90,.35); }
.side nav .grp.fold { color: #93a9c6; border-left-color: rgba(255,255,255,.16); font-weight: 500;
  background: rgba(255,255,255,.035); box-shadow: none; }
.side nav .grp.fold:hover { color: #cfdff3; background: rgba(255,255,255,.075); }
.side nav .grp .gc { font-size: 10px; opacity: .8; transition: transform .18s; transform-origin: center; }
.side nav .grp.fold .gc { transform: rotate(-90deg); }
.side nav .grp .gt { flex: 1; }
.side nav .grp .gn { background: rgba(255,255,255,.16); color: #e8f1fd; border-radius: 20px; padding: 1px 7px;
  font-size: 10.5px; font-weight: 500; line-height: 1.5; }
.side nav .grp.act .gn { background: rgba(255,255,255,.3); color: #fff; }
.side nav .grp.fold .gn { background: rgba(255,255,255,.07); color: #93a9c6; }

/* 子项容器：展开时左侧竖线+浅底，收起隐藏 */
.side nav .gnav { margin: 0 0 6px 20px; padding-left: 7px; border-left: 1px solid rgba(255,255,255,.13);
  border-radius: 0 0 0 2px; }
.side nav .gnav.fold { display: none; }
.side .navtools { display: flex; gap: 6px; padding: 8px 14px 0; }
.side .navtools button { flex: 1; background: rgba(255,255,255,.08); color: #b9cbe2; border: 0;
  border-radius: 6px; padding: 5px; font-size: 11px; cursor: pointer; }
.side .navtools button:hover { background: rgba(255,255,255,.16); color: #fff; }
.side .who { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.side .who b { color: #fff; display: block; font-size: 13px; margin-bottom: 2px; }
.side .who button { margin-top: 8px; width: 100%; background: rgba(255,255,255,.1); color: #dce7f5; border: 0;
  border-radius: 7px; padding: 7px; font-size: 12px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 24px; display: flex;
  align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.top h1 { font-size: 17px; font-weight: 600; }
.menu-btn { display: none; }   /* 仅手机端显示；基础值放这里，别放到文件末尾把媒体查询盖掉 */
.top .badge { font-size: 11.5px; padding: 3px 9px; border-radius: 20px; background: #eaf2fd; color: var(--brand); margin-left: 8px; }
.top .badge.warn { background: #fff3e0; color: var(--warn); }
.top .badge.err { background: #fdecec; color: var(--err); }
.content { padding: 22px 24px 60px; overflow: auto; flex: 1; }

.panel > h3 .h3l { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.panel > h3 .h3l .ptitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.back { background: var(--brand); color: #fff; flex: 0 0 auto; }
.btn.back:hover { background: var(--brand2); }
.backbar { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 14px; margin-bottom: 14px; }
.backbar .bc { color: var(--muted); font-size: 12.5px; }
.backbar .bc b { color: var(--text); font-weight: 600; }

/* 分段页签（产品基础信息：规格 / 型号 / 单位） */
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs .tab { border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px;
  padding: 7px 18px; border-radius: 8px; cursor: pointer; transition: .15s; }
.tabs .tab:hover { border-color: var(--brand); color: var(--brand); }
.tabs .tab.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* 卡片 / 统计 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.card .k { color: var(--muted); font-size: 12.5px; }
.card .v { font-size: 25px; font-weight: 700; margin-top: 6px; }
.card .v small { font-size: 13px; color: var(--muted); font-weight: 400; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  margin-bottom: 18px; overflow: hidden; }
.panel > h3 { font-size: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel .body { padding: 18px; }

/* 表格 */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 120px; }
.tbl-wrap { overflow-x: auto; }
/* 宽表：固定列宽，超长内容省略，操作列不会被挤出去 */
.tbl-fixed { table-layout: fixed; width: 100%; font-size: 12px; }
.tbl-fixed th { font-size: 11.5px; }
.tbl-fixed .tag { font-size: 10.5px; padding: 2px 6px; }
.p2 { display: block; line-height: 1.45; }
.p2 b { display: block; font-weight: 600; font-size: 12px; }
.p2 em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: -.2px; }
.tbl-fixed th, .tbl-fixed td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 9px 8px; }
/* 捆绑员工：多人以逗号间隔，最多两行，超出省略（完整名单看悬停提示） */
.stfn { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  white-space: normal; overflow: hidden; line-height: 1.45; font-size: 12px; color: var(--text); }
/* 列表分页：超过 20 条才出现 */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 2px 2px; flex-wrap: wrap; }
.pager .pginfo { color: var(--muted); font-size: 12px; }
.pager .pginfo b { color: var(--text); font-weight: 600; }
.pager .btn[disabled] { opacity: .45; cursor: not-allowed; }
/* 拜访监控：状态标签与统计 */
.vstat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.vcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fbfcfe; }
.vcard .k { font-size: 11.5px; color: var(--muted); }
.vcard .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
.vcard.err .v { color: var(--err); }
.vcard.warn .v { color: var(--warn); }
.vcard.ok .v { color: var(--ok); }
.tag.err { background: #fdecec; color: var(--err); }
/* 日报「今日拜访名单」按机构分组 */
.vgrp { margin-bottom: 10px; }
.vgh { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.vgrp .chkrow .chk { font-size: 12px; padding: 5px 9px; }
/* 日报拜访名单：一行一人 = 勾选 + 结果 + 失败原因 + 沟通事宜 */
.vrow { display: grid; grid-template-columns: 210px 92px 1fr 1.15fr; gap: 8px; align-items: center;
  padding: 5px 8px; border-bottom: 1px dashed var(--line); }
.vrow:last-child { border-bottom: 0; }
.vrow .chk { padding: 4px 8px; font-size: 12px; max-width: 100%; overflow: hidden; }
.vrow .chk b { font-weight: 600; white-space: nowrap; }
.vrow select, .vrow input { width: 100%; min-width: 0; font-size: 12px; padding: 5px 7px; }
.vrow:not(.on) { opacity: .55; }
.vrow.on { background: #fbfdff; }
@media (max-width: 900px) { .vrow { grid-template-columns: 1fr 1fr; } }
/* 日报里「今日工作计划」清单（与工作计划表同一份数据） */
.plist { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 4px 0 8px; }
.prow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 6px 10px;
  border-bottom: 1px dashed var(--line); font-size: 12px; }
.prow:last-child { border-bottom: 0; }
.prow:nth-child(odd) { background: #fcfdff; }
.prow b { font-weight: 600; }
.prow .pn { color: var(--muted); font-size: 11.5px; }
.prow .pp { flex: 1 1 180px; min-width: 120px; color: #2b3644; }
.prow .pr { font-size: 11.5px; color: var(--muted); }
.prow .pr.ok { color: var(--ok); }
.prow .pr.bad { color: var(--err); }
.tbl-fixed .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; font-weight: 500; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f8fafc; color: var(--muted); font-weight: 500; font-size: 12px; position: sticky; top: 0; }
/* 操作列吸附右侧：列多时横向滚动也始终能看到「编辑」，不用来回拖 */
th:last-child, td:last-child { position: sticky; right: 0; min-width: 104px; }
th:last-child { z-index: 3; box-shadow: -6px 0 8px -6px rgba(20,40,80,.18); }
td:last-child { background: #fff; box-shadow: -6px 0 8px -6px rgba(20,40,80,.12); }
tr:hover td:last-child { background: #fafcff; }
tr:hover td { background: #fafcff; }
td .act { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; background: #eef3fa; color: var(--muted); }
.tag.ok { background: #e8f7f0; color: var(--ok); }
.tag.warn { background: #fff3e0; color: var(--warn); }
.tag.err { background: #fdecec; color: var(--err); }
.tag.blue { background: #eaf2fd; color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; font-size: 13px; }

/* 弹窗：固定居中、固定尺寸，内容再多只在弹窗内滚动，窗口本身不移动、不跳变 */
body:has(.mask) { overflow: hidden; }   /* 弹窗打开时锁住背景滚动 */
.mask { position: fixed; inset: 0; background: rgba(12,24,42,.42); z-index: 50; display: flex;
  align-items: center; justify-content: center; padding: 28px 16px; overflow: hidden; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 680px;
  height: 660px; max-height: calc(100vh - 56px); display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden; animation: modalIn .12s ease-out; }
.modal.wide { max-width: 920px; }
/* 小体量弹窗（确认、改密、少量字段）：同样是固定高度，打开即定，不随内容变化 */
.modal.slim { height: 470px; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal .mh { flex: 0 0 auto; padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; min-height: 54px; }
.modal .mh > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .mh button { border: 0; background: transparent; font-size: 20px; color: var(--muted); line-height: 1; flex: 0 0 auto; }
.modal .mh button:hover { color: var(--err); }
/* 内容区：唯一可滚动的区域，高度由弹窗固定高度撑满 */
.modal .mb { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.modal .mb::-webkit-scrollbar { width: 8px; }
.modal .mb::-webkit-scrollbar-thumb { background: #cdd6e3; border-radius: 8px; }
.modal .mf { flex: 0 0 auto; padding: 14px 20px; border-top: 1px solid var(--line); display: flex;
  justify-content: flex-end; gap: 8px; background: #fcfdff; }
.modal .mb .tbl-wrap { max-height: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 0 14px; }
.full { grid-column: 1 / -1; }
.region-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.region-row select:disabled { background: #f4f6f9; color: #aab2bf; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--brand); background: #eef4fd; }
.sort-ind { color: var(--muted); font-size: 12px; margin-left: 6px; opacity: .55; }
th.sortable:hover .sort-ind { opacity: 1; color: var(--brand); }
/* 已按该列排序：表头与箭头同时高亮，一眼看出当前按哪列排的 */
th.s-asc, th.s-desc { color: var(--brand); background: #eef4fd; }
th.s-asc .sort-ind, th.s-desc .sort-ind { color: var(--brand); opacity: 1; font-weight: 700; }
a.lnk { color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
a.lnk:hover { color: #0d4fa3; }
.check-field label { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; color: var(--ink); }
.check-field label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.check-field small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 760px) { .region-row { grid-template-columns: 1fr 1fr 1fr; gap: 5px; } }

.progress { height: 8px; background: #eef2f7; border-radius: 8px; overflow: hidden; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--brand); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* 多选标签 / 行内组合 / NMPA 匹配与详情 */
.field small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 6px; line-height: 1.5; }
.chkrow { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.chk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; font-size: 13px; background: #fbfcfe; }
.chk:hover { border-color: var(--brand); color: var(--brand); }
.chk input { accent-color: var(--brand); width: 15px; height: 15px; }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row input { flex: 1 1 auto; min-width: 0; }
.nmpa-pick:empty { display: none; }
/* 联想浮层：脱离文档流盖在下方字段上，不把「所属公司 / 级别」挤走 */
.cert-ac { position: relative; }
.nmpa-pick { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden auto;
  max-height: 282px; background: #fff; box-shadow: 0 12px 28px rgba(16,35,61,.16); }
.nmpa-pick.up { top: auto; bottom: calc(100% + 6px); box-shadow: 0 -10px 28px rgba(16,35,61,.16); }
.nmpa-item { display: block; padding: 8px 11px; border-bottom: 1px solid var(--line); cursor: pointer;
  font-size: 13px; line-height: 1.45; }
.nmpa-item:last-child { border-bottom: 0; }
.nmpa-item:hover, .nmpa-item.cur { background: #eef4fd; }
.nmpa-item.cur { box-shadow: inset 3px 0 0 var(--brand); }
.nmpa-item b { color: var(--brand); margin-right: 8px; }
.nmpa-item em { display: block; color: var(--muted); font-style: normal; font-size: 11.5px; margin-top: 2px; }
.nmpa-item mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }
.nmpa-empty { padding: 10px 12px; color: var(--muted); font-size: 12.5px; background: #fafcff; }
.sub-h { font-weight: 600; font-size: 13px; margin-bottom: 8px; color: var(--text); }
.nmpa-detail { padding: 2px 0; }
.nmpa-detail .nd-h { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.kv { display: flex; gap: 12px; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed #eef1f6; }
.kv > span { flex: 0 0 128px; color: var(--muted); }
.kv > b { flex: 1 1 auto; font-weight: 500; word-break: break-word; }
.kv .clamp { max-height: 130px; overflow-y: auto; font-weight: 400; }

@media (max-width: 760px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: translateX(0); }
  .content { padding: 14px 12px 80px; }
  .top { padding: 12px 14px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .mask { padding: 10px; }
  .modal, .modal.wide, .modal.slim { max-width: none; width: 100%; height: calc(100vh - 20px); max-height: calc(100vh - 20px); border-radius: 12px; }
  .modal .mb { padding: 14px; }
  .modal .mh, .modal .mf { padding-left: 14px; padding-right: 14px; }
}
.menu-btn { border: 0; background: #eef3fa; color: var(--brand); border-radius: 8px; padding: 7px 10px; }

/* ===== 销售板块 ===== */
/* 表单分区标题（价格提成 / 物流票据 / 机构对接人） */
.form-sep { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--brand);
  margin: 8px 0 12px; padding-left: 8px; border-left: 3px solid var(--brand); line-height: 1.2; }
/* 单选组：已付 / 未付 */
.radiorow { display: flex; gap: 10px; flex-wrap: wrap; }
.radiorow .chk { flex: 0 0 auto; }
/* 可搜索下拉（医疗机构） */
.combo { position: relative; }
.combo input { width: 100%; }
.combo-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 10px 30px rgba(20,40,80,.16);
  max-height: 220px; overflow-y: auto; }
.combo-list.show { display: block; }
.combo-list a { display: block; padding: 8px 12px; font-size: 13px; color: var(--text); cursor: pointer;
  border-bottom: 1px solid #f2f5f9; }
.combo-list a:last-child { border-bottom: 0; }
.combo-list a:hover { background: #eef4fd; color: var(--brand); }
.combo-list a small { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 11px; }
.combo-list .empty { padding: 14px 12px; font-size: 12px; }
.field small.err { color: var(--err); }
/* 物流单号：第二行公司名、悬停轨迹卡 */
.sub2 { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.track-pop { display: none; position: fixed; z-index: 80; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 14px 40px rgba(16,35,61,.22); padding: 10px 12px; font-size: 12px; }
.tp-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tp-h b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; }
.tp-line { display: flex; gap: 8px; padding: 5px 0; border-top: 1px dashed #eef1f6; }
.tp-line span { flex: 0 0 78px; color: var(--muted); font-size: 10.5px; }
.tp-line em { flex: 1 1 auto; font-style: normal; font-size: 11.5px; color: var(--text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-line.on em { color: var(--brand); font-weight: 500; }
.tp-empty { color: var(--muted); font-size: 11.5px; padding: 6px 0; }
.tp-foot { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }
/* 物流详情弹窗 */
.td-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.td-list { border-left: 2px solid #e3e8ef; margin-left: 4px; padding-left: 14px; }
.td-item { padding: 8px 0; border-bottom: 1px dashed #eef1f6; }
.td-item span { display: block; color: var(--muted); font-size: 11.5px; }
.td-item em { font-style: normal; font-size: 13px; }
.td-item.on em { color: var(--brand); font-weight: 600; }
/* 付款 / 发票：一列两行标签，避免并排被压扁 */
.tagstack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.tagstack .tag { font-size: 10.5px; padding: 1px 6px; line-height: 1.5; }
/* ===== 进销存管理板块 ===== */
/* 只读流水表：没有操作列，最后一列不吸附右侧 */
.tbl-fixed.noact th:last-child, .tbl-fixed.noact td:last-child {
  position: static; box-shadow: none; min-width: 0; background: transparent; }
/* 日期段筛选 */
.drange { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.drange input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 12px; color: var(--text); }
.drange em { font-style: normal; }
.p2 em.low { color: var(--err); }
/* 拜访监控：最近结果里带时间 / 失败原因 / 沟通事宜，允许换行不被裁掉 */
.tbl-fixed td .p2 { white-space: normal; overflow: hidden; text-overflow: ellipsis;
  display: block; max-width: 100%; font-size: 11px; line-height: 1.45; color: var(--muted); }
.tbl-fixed td .p2.errv { color: var(--err); }

/* ===== 员工管理板块 / 系统设置板块 ===== */
/* 权限勾选矩阵 */
.permbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.permbar .hint { margin-left: 4px; }
.tbl-fixed.permx td { padding: 7px 8px; }
.tbl-fixed.permx tbody tr:hover td { background: #f7fafd; }
.tbl-fixed.permx input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }
/* 机构人员捆绑分组 */
.bindbox { max-height: 460px; overflow-y: auto; padding-right: 4px; }
.bdg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fbfcfe; }
.bdh { font-size: 12.5px; font-weight: 600; color: var(--brand); margin-bottom: 8px; }
.bdg .chkrow { gap: 8px 16px; }
.bdg .chk small { color: var(--muted); }
/* 待结算金额强调 */
.warnv { color: var(--warn); font-weight: 700; }

/* ===== 员工区域 / 周目标 / 报销 ===== */
/* 区域选择：城市多选区 + 已选标签 */
.rgbox { max-height: 240px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fbfcfe; gap: 8px 14px; }
.rgbox .chk { flex: 0 0 auto; }
.rgpicked { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; align-items: center; }
.rgchip { display: inline-flex; align-items: center; gap: 6px; background: #eef4fd; color: var(--brand);
  border-radius: 20px; padding: 3px 8px 3px 10px; font-size: 12px; }
.rgchip a { cursor: pointer; color: var(--muted); font-size: 13px; line-height: 1; text-decoration: none; }
.rgchip a:hover { color: var(--err); }

/* ===== 团队PK / 月度指标 ===== */
.ratebar { position: relative; height: 16px; background: #eef2f7; border-radius: 8px; overflow: hidden; }
.ratebar i { display: block; height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #4a86e8, #2f6fd0); }
.ratebar b { position: absolute; right: 8px; top: -1px; font-size: 11px; color: #24303f; font-weight: 600; }
tr.merow td { background: #f4f8ff; }
tr.merow td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

/* ===== 经营概览 ===== */
.dgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fbfcfe; }
.dcard .k { font-size: 12px; color: var(--muted); }
.dcard .v { font-size: 19px; font-weight: 700; margin-top: 4px; letter-spacing: .2px; }
.dcard .s { font-size: 11px; color: var(--muted); margin-top: 3px; }
.d2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.d2col > .panel { margin: 0; }
.hrow { display: grid; grid-template-columns: 150px 1fr 150px; gap: 10px; align-items: center;
  padding: 5px 0; border-bottom: 1px dashed var(--line); }
.hrow:last-child { border-bottom: 0; }
.hname { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar { height: 10px; background: #eef2f7; border-radius: 6px; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #4a86e8, #2f6fd0); }
.hbar.blue i { background: linear-gradient(90deg, #37b3a4, #2a8f83); }
.hbar.ok i { background: linear-gradient(90deg, #34a853, #268043); }
.hbar.warn i { background: linear-gradient(90deg, #f0a020, #d98617); }
.hval { font-size: 11px; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; }
.hval.errv { color: var(--err); }
@media (max-width: 1100px) {
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d2col { grid-template-columns: 1fr; }
}

/* 财务流水 / 提成设置（5 卡统计 + 提成预览） */
.vstat.vstat5 { grid-template-columns: repeat(5, 1fr); }
.vcard .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cmtip { padding: 7px 10px; border-radius: 8px; background: #f7f8fa; border: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.cmtip.on { background: #eef6ff; border-color: #cfe6ff; color: #1668b3; font-weight: 600; }
@media (max-width: 1100px) { .vstat.vstat5 { grid-template-columns: repeat(2, 1fr); } }
/* 行内操作按钮：多按钮时收紧一点，避免把行高撑成三行 */
.act .btn.sm { padding: 4px 8px; font-size: 12px; white-space: nowrap; }


/* ===================== 手机端适配（≤760px） ===================== */
.drawer-mask { position: fixed; inset: 0; background: rgba(10,22,40,.42); z-index: 25; }
@media (max-width: 760px) {
  /* 顶栏：标题不换行、授权标签截断、日期收到第二行 */
  .top { padding: 10px 12px; align-items: flex-start; gap: 6px; }
  .top > div:first-child { flex-wrap: wrap; gap: 6px !important; min-width: 0; }
  .top h1 { font-size: 15.5px; max-width: 56vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top .badge { font-size: 10.5px; padding: 2px 7px; margin-left: 0; max-width: 62vw;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top .hint { font-size: 11.5px; padding-top: 2px; }
  .menu-btn { padding: 6px 9px; font-size: 15px; line-height: 1; }

  /* 登录页：标题一行放得下，卡片收窄留白 */
  .auth-card { padding: 26px 20px; border-radius: 14px; }
  .auth-logo h1 { font-size: 16.5px; }
  .auth-logo .mark { width: 38px; height: 38px; border-radius: 10px; font-size: 16px; }
  .auth-sub { margin: 5px 0 18px; }

  /* 内容与面板留白收紧 */
  .content { padding: 12px 10px 72px; }
  .panel > h3 { padding: 11px 12px; font-size: 13.5px; }
  .panel .body { padding: 12px; }
  .panel { border-radius: 12px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 12px 13px; }
  .card .v { font-size: 20px; }
  .toolbar { gap: 6px; }
  .toolbar input { flex: 1 1 100%; min-width: 0; }
  .toolbar .btn { flex: 1 1 auto; justify-content: center; }
  .drange { flex-wrap: wrap; }
  .pager { justify-content: center; }

  /* 列表：表格改成卡片，一行一条，字段名在左、值在右 */
  .tbl-wrap { overflow: visible; }
  .ctable { display: block; table-layout: auto; font-size: 13px; }
  .ctable thead { display: none; }
  .ctable tbody { display: block; }
  .ctable tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: 11px;
    padding: 4px 12px; margin: 0 0 10px; box-shadow: 0 1px 3px rgba(16,42,80,.05); }
  .ctable tr:last-child { margin-bottom: 0; }
  .ctable td { display: flex; align-items: flex-start; gap: 10px; width: auto !important;
    overflow: visible; text-overflow: clip; white-space: normal; padding: 8px 0; border: 0;
    border-bottom: 1px dashed #eef1f6; text-align: right; }
  .ctable td:last-child { border-bottom: 0; }
  .ctable td:empty { display: none; }   /* 没填的字段不占一行 */
  .ctable td::before { content: attr(data-label); flex: 0 0 96px; text-align: left; color: var(--muted);
    font-size: 12px; line-height: 1.6; }
  /* 勾选框挪到卡片左上角，别单占一行 */
  .ctable tr { position: relative; }
  .ctable tr:has(input.ck) { padding-left: 34px; }
  .ctable td:has(input.ck) { position: absolute; left: 9px; top: 9px; width: auto; padding: 0; border: 0; }
  .ctable td:not([data-label]) { justify-content: flex-end; }
  .ctable td:not([data-label])::before { content: none; }
  .ctable td > * { min-width: 0; }
  .ctable td .p2 { text-align: right; }
  .ctable td .act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .ctable td .act .btn.sm { padding: 6px 11px; }
  .ctable .ck { width: 17px; height: 17px; }
  /* 非卡片化的表（首页图表类）允许横向滑动，不挤成竖排 */
  .tbl-wrap > table:not(.ctable) { min-width: 620px; }
  .tbl-fixed th, .tbl-fixed td { padding: 8px 7px; }

  /* 弹窗：整屏高度，底部按钮不遮挡 */
  .modal .mf { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal .mb { padding-bottom: 20px; }
  .grid2, .grid3, .dgrid, .d2col, .vstat.vstat5 { grid-template-columns: 1fr; }
  .kv { flex-direction: column; gap: 2px; }
  .kv > span { flex: none; font-size: 12px; }
}
@media (max-width: 420px) {
  .ctable td::before { flex-basis: 86px; }
}

/* 使用说明入口（登录页底部） */
.auth-guide{margin-top:14px;text-align:center;font-size:13px;letter-spacing:.3px}
.auth-guide a{color:#1B4F63;text-decoration:none;border-bottom:1px dashed #9AB4BC;padding-bottom:1px}
.auth-guide a:hover{color:#C0713A;border-bottom-color:#C0713A}
