:root {
  --brand: #C4232B;
  --brand-dark: #A31C22;
  --brand-soft: #FBE9EA;
  --ink: #231F20;
  --ink-2: #4A4547;
  --muted: #857F81;
  --line: #E4E1E2;
  --bg: #F6F5F5;
  --card: #FFFFFF;
  --success: #1E8E3E;
  --success-soft: #E7F4EB;
  --warn: #B06E00;
  --warn-soft: #FDF1DC;
  --danger: #D64545;
  --danger-soft: #FBE9E9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(35, 31, 32, .06), 0 6px 18px rgba(35, 31, 32, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.login-card .logo {
  display: block;
  margin: 0 auto 18px;
  max-width: 190px;
  height: auto;
}
.login-card h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: .5px;
}
.login-card .sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.login-card .field { text-align: left; margin-bottom: 12px; }
.login-card .field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.login-card .err { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 6px; }
.login-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: 56px;
  background: #FFFFFF;
  border-bottom: 1px solid #C4232B;   /* 第 26 批：白色主题 + 底部极细品牌红线 */
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 30;
}
/* 第 27 批：顶栏不再放 Logo 图，最左边统一为纯文字「综合平台」 */
.topbar .brand-name {
  color: #231F20;             /* 第 27 批：墨黑纯文字，白底上更清晰 */
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .3px;
  white-space: nowrap;
}
.topbar nav { display: flex; gap: 4px; margin-left: 8px; }
.topbar nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
}
.topbar nav a:hover { background: #F1EFEF; }
.topbar nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}
.topbar .spacer { flex: 1; }
/* 导航分组：前段高频、后段看板/基础类；手机端后段收进「更多」 */
.nav-sep { flex: 0 0 auto; width: 1px; height: 20px; background: var(--line); margin: 0 7px; }
.nav-more { display: inline-flex; flex: 0 0 auto; padding: 6px 10px; border: 1px solid var(--line);
  background: #FFF; border-radius: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.nav-more.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.nav-menu { display: none; position: absolute; top: 52px; right: 12px; min-width: 168px; z-index: 60;
  background: #FFF; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(35,31,32,.14); padding: 6px; }
.nav-menu.on { display: block; }
.nav-menu-title { font-size: 11.5px; color: var(--ink-3, #9CA3AF); padding: 4px 10px 6px; }
.nav-menu a { display: block; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: var(--ink-2); }
.nav-menu a:hover { background: #F1EFEF; }
.nav-menu a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
/* PC 上后段 4 个已在导航里直接显示，下拉不再重复列 */
.nav-menu a.nav-dup { display: none; }
@media (max-width: 860px) { .nav-menu a.nav-dup { display: block; } }
.who {
  display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px;
}
.who .chip {
  background: #F1EFEF; border-radius: 999px; padding: 2px 10px; font-size: 12px;
}

/* ---------- 布局 ---------- */
.layout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px;
  max-width: 1440px;
  margin: 0 auto;
}
.sidebar {
  width: 226px;
  flex: 0 0 226px;
  position: sticky;
  top: 74px;
}
.main { flex: 1; min-width: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between;
}

/* ---------- 表单控件 ---------- */
.input, .select, .textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.textarea { min-height: 62px; resize: vertical; }
.field { margin-bottom: 10px; }
.field > label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.field .req { color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #FAF9F9; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-sm { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: #F1EFEF; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.spacer { flex: 1; }

/* ---------- 列表 ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 130px; }
.toolbar .grow { flex: 1; min-width: 180px; }

table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top;
}
table.grid th {
  font-size: 12px; color: var(--ink-2); font-weight: 600; background: #FAF9F9;
  position: sticky; top: 0;
}
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover { background: #FBFAFA; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 26px 4px; text-align: center; }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; background: #F1EFEF; color: var(--ink-2); white-space: nowrap;
}
.tag-A { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tag-B { background: #E9EEF6; color: #2B5797; }
.tag-C { background: #F1EFEF; color: var(--muted); }
.s-success { color: var(--success); background: var(--success-soft); }
.s-warn { color: var(--warn); background: var(--warn-soft); }
.s-danger { color: var(--danger); background: var(--danger-soft); }
.s-muted { color: var(--muted); background: #F1EFEF; }
.warn-text { color: var(--danger); }

/* ---------- 客户详情 ---------- */
.cust-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cust-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.cust-meta { color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; }
.kv .k { color: var(--muted); }

.quickbar {
  position: sticky;
  top: 56px;
  z-index: 20;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  margin-bottom: 16px;
}
.quickbar .line { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.quickbar .q-content { flex: 1 1 260px; min-width: 200px; }
.quickbar .q-next { flex: 1 1 220px; min-width: 180px; }
.quickbar .q-way { flex: 0 0 104px; }
.quickbar .q-err { color: var(--danger); font-size: 12px; min-height: 16px; }
.quickbar .tip { color: var(--muted); font-size: 12px; margin-bottom: 6px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 18px 0; }
.tl-dot {
  position: absolute; left: -26px; top: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink-2);
}
.tl-item.is-followup .tl-dot { border-color: var(--brand); color: var(--brand); }
.tl-item.is-contact .tl-dot { border-color: #2B5797; color: #2B5797; }
/* 第 7.5 批：维护期服务计划节点 */
.tl-item.is-plan .tl-dot { border-color: #1F8A70; color: #1F8A70; }
.tl-meta { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.tl-body { white-space: pre-wrap; word-break: break-word; }
.tl-next {
  margin-top: 5px; font-size: 13px; color: var(--ink-2);
  border-left: 2px solid var(--brand); padding-left: 8px; background: #FCFAFA;
}
.tl-day {
  font-size: 12px; color: var(--muted); margin: 0 0 8px -26px; padding: 2px 0;
}

/* ---------- 折叠区 ---------- */
details.fold {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; margin-bottom: 10px;
}
details.fold > summary {
  cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 14px;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: '▸'; color: var(--muted); font-size: 12px; }
details.fold[open] > summary::before { content: '▾'; }
details.fold > .fold-body { padding: 4px 14px 14px; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(35, 31, 32, .38);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px;
}
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 520px;
  max-height: 88vh; overflow: auto; box-shadow: 0 18px 48px rgba(35, 31, 32, .22);
}
.modal header {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-weight: 600; display: flex; align-items: center;
}
.modal .content { padding: 16px 18px; }
.modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

.chk {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 0 12px 6px 0; font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.chk input { margin: 0; }

/* ---------- 三层资产：产品 → 席位 → 序列号 ---------- */
.asset-group {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 12px; background: #FFF;
}
.asset-group .ag-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.asset-group .ag-head > .ag-name { font-weight: 600; }
.asset-group .ag-keys { margin-top: 8px; }
.asset-group code { background: #F1EFEF; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- 手机底部动作栏 ---------- */
.tabbar { display: none; }

@media (max-width: 860px) {
  .layout { padding: 12px 12px 84px; gap: 0; }
  .sidebar { display: none; }
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar .brand-name { display: inline; font-size: 12px; letter-spacing: 0; }  /* 第 26 批：手机端也显示「综合平台」 */
  /* 第 27 批：手机端顶栏同样不显示 Logo 图 */
  .topbar nav {
    flex: 1 1 auto; min-width: 0; gap: 2px; margin-left: 4px;
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { white-space: nowrap; flex: 0 0 auto; padding: 6px 9px; font-size: 13px; }
  /* 手机端：看板/基础类收进「更多」，主导航只留高频业务 */
  .topbar nav a[data-more], .topbar .nav-sep { display: none; }
  .nav-more { display: block; padding: 6px 8px; font-size: 12.5px; }
  .nav-menu { top: 48px; right: 8px; }
  .topbar .spacer { display: none; }
  .who { gap: 6px; font-size: 12px; flex: 0 0 auto; }
  .who #whoRole { display: none; }
  .who #logout { padding: 4px 8px; font-size: 12px; }
  .quickbar { top: 56px; padding: 9px 10px; }
  .toolbar .input, .toolbar .select, .toolbar .grow { width: 100%; flex: 1 1 100%; }
  table.grid th, table.grid td { padding: 8px 7px; font-size: 13px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar button {
    flex: 1; border: 0; background: transparent; padding: 6px 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--ink-2); font-size: 12px;
  }
  .tabbar button .ico { font-size: 18px; line-height: 1; }
  .tabbar button.active { color: var(--brand); font-weight: 600; }
  .tabbar button[disabled] { opacity: .4; }
}

/* ---------- 轻提示（6.5 批） ---------- */
.toast {
  position: fixed; left: 50%; bottom: 82px; transform: translateX(-50%); z-index: 200;
  background: rgba(35, 31, 32, .93); color: #fff; padding: 9px 14px; border-radius: 8px;
  font-size: 13px; max-width: 84vw; line-height: 1.5; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

/* ---------- 附件（第 3 批） ---------- */
.file-group { margin-bottom: 14px; }
.file-group .fg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.file-group .ag-name { font-weight: 600; }
.file-prev img { max-width: 100%; max-height: 180px; border-radius: 8px; display: block; margin-bottom: 6px; }
.file-prev { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.file-img { max-width: 100%; max-height: 68vh; display: block; margin: 0 auto; border-radius: 8px; }
.file-doc { width: 100%; height: 68vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ---------- 公海与快速记录附件（第 4 批） ---------- */
.tl-files { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tl-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* ---------- 客户自助门户（第 7 批） ---------- */
.p-wrap { max-width: 900px; margin: 0 auto; padding: 18px; }
.p-wrap .main { min-width: 0; }
/* ---------- 第 10 批：工作台 ---------- */
.wb-h2 { font-size: 19px; margin: 0 0 12px; }
.wb-h2 span { font-size: 12.5px; color: var(--ink-3, #9CA3AF); font-weight: 400; margin-left: 8px; }
.wb-tabs { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px;
  scrollbar-width: none; }
.wb-tabs::-webkit-scrollbar { display: none; }
.wb-tab { flex: 0 0 auto; padding: 7px 13px; border: 1px solid var(--line); background: #FFF;
  border-radius: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.wb-tab.on { background: var(--brand); border-color: var(--brand); color: #FFF; font-weight: 600; }
.wb-scroll { overflow-x: auto; }
.wb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wb-table th, .wb-table td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.wb-table th { background: #F3F4F6; white-space: nowrap; }
.wb-table .empty { text-align: center; color: var(--ink-3, #9CA3AF); padding: 18px; }
.wb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.wb-kpi { background: #FFF; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.wb-kpi .k { font-size: 12px; color: var(--ink-3, #9CA3AF); }
.wb-kpi .v { font-size: 20px; font-weight: 700; color: var(--brand); line-height: 1.4; }
.wb-kpi .s { font-size: 11.5px; color: var(--ink-3, #9CA3AF); }
.wb-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wb-row > .field { flex: 1 1 180px; min-width: 0; }
.wb-cal { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11.5px; }
.wb-cal th { background: #F3F4F6; padding: 6px; text-align: center; }
.wb-cal td { border: 1px solid var(--line); height: 62px; vertical-align: top; padding: 4px; }
.wb-cal .wb-cal-out { background: #FAFAFA; }
.wb-cal-day { font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.wb-ev { border-radius: 4px; padding: 1px 4px; margin-bottom: 2px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.wb-ev.c-blue { background: #DBEAFE; color: #1E5FA8; }
.wb-ev.c-green { background: #D1FAE5; color: #1E8E5A; }
.wb-ev.c-purple { background: #EDE9FE; color: #6B4EA8; }
.wb-ev.c-orange { background: #FFEDD5; color: #C2410C; }
.wb-ev.c-red { background: #FDECEC; color: #C4232B; }
.wb-ev.c-gray { background: #F1F5F9; color: #64748B; }

/* 客户身份条：紧凑一行，放在页签下方、内容上方 */
.portal-id {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 8px 12px;
  background: #FFF; border: 1px solid var(--line); border-radius: 10px;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.5;
}
.portal-id-ico { font-size: 13px; flex: 0 0 auto; }
@media (max-width: 860px) {
  .portal-id { margin: 0 0 10px; padding: 7px 10px; font-size: 12px; }
}
.p-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.p-stats > div {
  flex: 1; min-width: 92px; background: #FAF9F9; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; text-align: center;
}
.p-stats > div b { display: block; font-size: 20px; color: var(--brand); font-variant-numeric: tabular-nums; }
.p-stats > div span { font-size: 12px; color: var(--muted); }
.p-team {
  flex: 1; min-width: 130px; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; background: #FAF9F9;
}
.p-team-name { font-weight: 600; }
.p-team-role { font-size: 12px; color: var(--muted); }
.p-team-phone { margin-top: 3px; font-size: 12.5px; }
.p-team-phone a { color: var(--brand); text-decoration: none; }
.p-solu { margin-top: 10px; background: #FAF9F9; border-radius: 8px; padding: 10px 12px; }
.p-solu div { white-space: pre-wrap; word-break: break-word; margin-top: 4px; }
.p-tip { font-size: 12px; color: var(--muted); margin-top: 8px; }
.p-files .tag { margin-right: 6px; }
.msg-img { max-width: 100%; max-height: 220px; border-radius: 6px; display: block; }
.p-file { flex: 0 0 auto; width: 132px; }
.p-file-meta { font-size: 12px; color: var(--muted); margin-top: 4px; word-break: break-all; }
.p-kb-body { white-space: pre-wrap; word-break: break-word; margin-top: 8px; color: var(--ink-2); }
.p-star { flex: 0 0 auto; }

/* 第 7.6 批：门户原厂资源与底部动作栏 */
.p-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.p-link {
  display: block; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  background: #FAF9F9; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600;
}
.p-link:hover { border-color: var(--brand); background: #FFF6F6; }
.p-link small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.p-reg { background: #FAF9F9; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 10px 0; }
.p-reg ol { margin: 6px 0 10px 18px; padding: 0; font-size: 14px; line-height: 1.8; }
.p-ima { border: 1px solid #F0D7D8; background: #FFF6F6; border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.p-ima b { display: block; margin-bottom: 4px; }
.p-ima p { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.rec-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); display: inline-block; }
.rec-dot.on { animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .25; } }

@media (max-width: 860px) {
  .p-wrap { padding: 12px 12px 84px; }
  .p-stats > div { min-width: 44%; }
  .p-file { width: 108px; }
}

/* ---------- 服务工单富媒体消息（第 6 批） ---------- */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #FBFAFA; }
.msg-cust { background: #FFF6F6; border-color: #F0D7D8; }
.msg-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.msg-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.msg-file { margin-top: 6px; font-size: 13px; }

/* ---------- 第 8 批：看板迷你柱状图（季度报告 / 门户服务看板） ---------- */
.bar-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.bar-row .bl { width: 54px; font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.bar-row .bar { position: relative; flex: 1; height: 15px; background: #F2F2F2; border-radius: 3px; overflow: hidden; }
.bar-row .bar i { position: absolute; left: 0; top: 0; height: 100%; }
.bar-row .bar i.a { background: var(--brand); opacity: .85; }
.bar-row .bar i.b { background: var(--ink); opacity: .55; }
.bar-row .bar b { position: absolute; right: 5px; top: 0; font-size: 11px; line-height: 15px; color: #333; }

/* ---------- 第 9 批：手机端单手操作（快捷短语 / 大按钮 / 防 iOS 缩放） ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips .chipx { border: 1px solid var(--line); border-radius: 16px; padding: 7px 13px; font-size: 13px;
  background: #fff; color: var(--ink); cursor: pointer; line-height: 1.2; }
.chips .chipx.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 600; }
@media (max-width: 860px) {
  .input, .select, .textarea { font-size: 16px; }
  .modal .btn, .modal .btn-sm { min-height: 44px; padding-left: 16px; padding-right: 16px; }
  .chips .chipx { padding: 9px 15px; font-size: 14px; }
  .m-mybtn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
}

/* ---------- 第 9 批：手机端卡片式列表（单手可达） ---------- */
.m-cards { display: none; }
.t-desktop { display: block; }
.m-only { display: none; }

@media (max-width: 860px) {
  .m-cards { display: block; margin-top: 10px; }
  .t-desktop { display: none; }
  .m-only { display: inline-flex; align-items: center; justify-content: center; }

  /* 手机端：筛选默认收起，先让结果出现在首屏 */
  .m-filters { display: none; }
  .m-filters.open { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
  .m-filters.open .select { flex: 1 1 46%; width: 46%; }

  .m-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px;
    margin-bottom: 10px;
    background: #fff;
    cursor: pointer;
  }
  .m-card:active { background: #FBF5F5; }
  .mc-top { display: flex; align-items: flex-start; gap: 8px; }
  .mc-name {
    flex: 1; min-width: 0; font-size: 16px; font-weight: 600;
    line-height: 1.4; word-break: break-all;
  }
  .mc-meta { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.6; }
  .mc-acts {
    display: flex; gap: 8px; margin-top: 10px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mc-acts .btn {
    flex: 1; min-height: 38px; text-align: center;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
  }

  /* 底部主操作区：贴近拇指，避免误触返回 */
  .quickbar .line { gap: 8px; }
  .quickbar .q-save { flex: 1 1 100%; min-height: 44px; font-size: 15px; }
}

/* ===== 第 11 批：统一附件 / 统一待办 / 指派事件 ===== */
.wb-ev.c-teal { background: #E0F2F1; color: #00695C; }
.wb-attach-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wb-attach-row input[type=file] { flex: 1 1 190px; min-width: 0; font-size: 13px; }
.wb-att {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.wb-att > a:first-child { flex: 1 1 220px; min-width: 0; }
.wb-todo-cat { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.wb-todo-cat > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 2px 0; }
.wb-todo-list { margin-top: 8px; }
.wb-todo-item {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 6px; background: #FAFAFA; margin-bottom: 6px;
}
.wb-todo-item.is-overdue { background: #FFF4F4; }
.wb-todo-t { flex: 1 1 260px; min-width: 0; font-weight: 600; font-size: 14px; }
.wb-todo-item .cust-meta { flex: 1 1 180px; min-width: 0; }
.wb-todo-act { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .wb-todo-t, .wb-todo-item .cust-meta { flex-basis: 100%; }
  .wb-todo-act { width: 100%; }
}

/* ===== 第 13 批：全局搜索 ===== */
.top-search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px;
}
.top-search:hover { background: var(--brand-soft); border-color: var(--brand); }
.gs-box { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.gs-box .input { flex: 1; min-width: 0; }
.gs-group { margin: 10px 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.gs-item {
  display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; margin-bottom: 6px; cursor: pointer; background: #fff;
}
.gs-item:hover { border-color: var(--brand); background: #FFF9F9; }
.gs-t { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 14px; }
.gs-s { color: var(--muted); font-size: 12px; }
.gs-empty { color: var(--muted); padding: 18px 4px; text-align: center; }

/* ===== 第 13 批：自定义下拉 / 日期控件（根治原生弹层「往上飘到浏览器顶部」）=====
   原生 <select> 与 <input type=date> 的弹出层由浏览器绘制，在本平台 sticky 顶栏 +
   fixed 蒙层 + overflow:auto 弹窗的组合下会被定位到视口最上方。这里用 DOM 面板替代原生弹层，
   位置由 getBoundingClientRect() 精确计算，彻底不依赖浏览器原生 popup。 */
.xp {
  position: fixed; z-index: 9999; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(35,31,32,.18); padding: 6px;
  min-width: 160px; max-height: 300px; overflow: auto;
}
.xp-item {
  padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; white-space: nowrap;
}
.xp-item:hover { background: #F4F1F1; }
.xp-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.xp-cal { width: 264px; max-height: none; overflow: visible; }
.xp-cal-head { display: flex; align-items: center; gap: 4px; padding: 2px 2px 8px; }
.xp-cal-head .m { flex: 1; text-align: center; font-weight: 600; }
.xp-cal-head button { border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; padding: 2px 8px; }
.xp-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.xp-cal-grid .w { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.xp-cal-grid .d {
  text-align: center; padding: 6px 0; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.xp-cal-grid .d:hover { background: #F4F1F1; }
.xp-cal-grid .d.out { color: #C9C5C6; }
.xp-cal-grid .d.today { border: 1px solid var(--brand); }
.xp-cal-grid .d.on { background: var(--brand); color: #fff; font-weight: 600; }
.xp-cal-foot { display: flex; gap: 6px; padding-top: 8px; }
.xp-cal-foot .btn { flex: 1; padding: 5px 6px; font-size: 12px; }
.xdate-wrap { position: relative; display: flex; gap: 6px; align-items: center; }
.xdate-wrap .xdate-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--line);
  background: #fff; border-radius: 8px; cursor: pointer; font-size: 15px;
}
.xdate-wrap .xdate-btn:hover { border-color: var(--brand); }

/* ===== 第 13 批：按时间折叠 / 多选筛选 / 通用小组件 ===== */
.fold-old { margin-top: 8px; }
.fold-old > summary { font-size: 13px; color: var(--ink-2); }
.owner-pick { border: 1px solid var(--line); border-radius: 8px; padding: 8px; max-height: 150px; overflow: auto; }
.owner-pick .chk { display: flex; margin: 0 0 4px; }
.mini-hint { font-size: 12px; color: var(--muted); }
.sub-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; background: #FCFBFB; }
.ann-item { border-left: 3px solid var(--brand); padding: 4px 0 10px 12px; margin-bottom: 12px; }
.ann-item .t { font-weight: 600; }
.ann-item .d { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.ann-img { max-width: 100%; max-height: 260px; border-radius: 6px; margin: 6px 8px 0 0; }
.ir-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.ir-item .t { font-weight: 600; margin-bottom: 2px; }
.ir-item .c { color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }
.ir-item .m { color: var(--muted); font-size: 12px; margin-top: 4px; }
.link-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #E9EEF6; color: #2B5797; font-size: 12px; }

/* ---------- 第 13 批：客户门户优化（主页 / 公告 / 知识库 / 语音 / 在用许可） ---------- */
.p-ann-body { white-space: normal; word-break: break-word; color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.p-ann-img { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; margin: 8px 0; border: 1px solid var(--line); }
.p-proj { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.p-proj:last-child { border-bottom: 0; }
.p-proj > div:first-child { flex: 1 1 200px; min-width: 0; }
.p-kb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 12px; align-items: start; }
.p-kb-main, .p-kb-side { min-width: 0; }
.p-kb-side .card { margin-bottom: 12px; }
.p-ima-mini { background: #FFF6F6; border: 1px solid #F0D7D8; border-radius: 8px; padding: 10px; }
.p-ima-mini b { display: block; margin-bottom: 4px; font-size: 13.5px; }
.p-ima-mini p { margin: 0 0 9px; font-size: 12.5px; color: var(--ink-2); }
.p-steps { margin: 6px 0 8px 18px; padding: 0; font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.p-steps li { margin-bottom: 4px; }
.p-key-pick { max-height: 168px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #FAF9F9; }
.p-key-pick label { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 0; cursor: pointer; }
.p-key-pick code { background: #F1EFEF; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.msg-voice-tip { font-size: 12px; color: var(--muted); }
.p-voice { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line);
  background: #FFF; border-radius: 20px; padding: 7px 15px; cursor: pointer; min-width: 168px; }
.p-voice:hover { border-color: var(--brand); }
.p-voice.playing { border-color: var(--brand); background: #FFF6F6; }
.p-voice-ico { font-size: 15px; flex: 0 0 auto; }
.p-voice-wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; flex: 0 0 auto; }
.p-voice-wave i { width: 3px; height: 6px; background: var(--brand); border-radius: 2px; display: block; }
.p-voice-wave i:nth-child(2) { height: 10px; }
.p-voice-wave i:nth-child(3) { height: 14px; }
.p-voice-wave i:nth-child(4) { height: 8px; }
.p-voice.playing .p-voice-wave i { animation: voicewave .6s infinite alternate; }
@keyframes voicewave { from { transform: scaleY(.45); } to { transform: scaleY(1.25); } }
.p-voice-txt { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 860px) {
  .p-kb-layout { grid-template-columns: 1fr; }
  .p-kb-side { order: -1; }
  .p-voice { min-width: 150px; }
}


/* ================= 第 14 批：交互收敛 · 时间线筛选 · 子阶段 · 门户提醒 ================= */
/* 多选下拉：摘要一行，展开后才铺勾选项 */
.ms-pick { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ms-pick > summary { cursor: pointer; padding: 7px 10px; list-style: none; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ms-pick > summary::-webkit-details-marker { display: none; }
.ms-pick[open] > summary { border-bottom: 1px solid var(--line); }
.ms-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.ms-list { max-height: 190px; overflow: auto; padding: 6px 10px; }
.ms-list .chk { display: flex; margin: 0 0 3px; font-size: 13px; }
.owner-pick { max-height: 0; padding: 0; border: 0; overflow: hidden; }

/* 时间线快捷筛选 */
.tl-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.tl-filter .chipx { cursor: pointer; }
.tl-filter .chipx.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tl-filter .select { padding: 4px 6px; font-size: 12px; }
.tl-focus { background: rgba(196,35,43,.07); outline: 2px solid var(--brand); border-radius: 8px; }
.tl-item.is-ticket .tl-dot { border-color: #B26A00; color: #B26A00; }
.tl-item.is-deal .tl-dot { border-color: #2B5797; color: #2B5797; }
.tl-item.is-project .tl-dot { border-color: #6B4E9B; color: #6B4E9B; }
.tl-item.is-receivable .tl-dot { border-color: #1F8A70; color: #1F8A70; }

/* 子阶段：挂在母阶段下方，多级序号一眼看清 */
.ss-row td { background: #fafafa; font-size: 12px; padding: 4px 6px; }
.ss-row.ss-l2 td { background: #f5f6f7; color: var(--ink-2); }
.ss-mother td { background: #f0f1f2; font-weight: 600; }
.ss-inline { padding: 8px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; }
.ss-inline-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
.ss-inline .grid { font-size: 12px; }

/* 内部资源：一条压成两行 */
.ir-item { padding: 6px 8px; margin-bottom: 4px; }
.ir-item .t { margin-bottom: 0; font-size: 13px; }
.ir-item .c { font-size: 12px; max-height: 32px; overflow: hidden; line-height: 1.35; }
.ir-item .m { display: none; }
.ir-item .row { margin-top: 3px !important; gap: 4px !important; }
.ir-item .btn { padding: 2px 6px; font-size: 12px; }
.link-chip { font-size: 12px; }

/* 门户：未读红点 + 顶部提示条 */
.p-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #C4232B; margin-left: 5px; vertical-align: middle; box-shadow: 0 0 0 2px rgba(196,35,43,.18); }
#ptab button { position: relative; }
#ptab button .p-dot { position: absolute; top: 4px; right: 22%; margin: 0; }
.p-alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid #C4232B; border-left: 4px solid #C4232B; border-radius: 8px;
  background: #fff5f5; box-shadow: 0 2px 8px rgba(196,35,43,.08); }
.p-alert-ico { font-size: 22px; line-height: 1; }
.p-alert-txt { flex: 1; min-width: 0; }
.p-alert-txt b { color: #C4232B; }
.msg.msg-staff { background: #f3f7fb; border-color: #d6e3f0; }
.p-kb-pos .kv { grid-template-columns: 130px minmax(0,1fr); }
.p-kb-jump { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; }
@media (max-width: 760px) {
  .p-kb-layout { display: flex; flex-direction: column; }
  .p-kb-main { order: 1; width: 100%; }
  .p-kb-side { order: 2; width: 100%; }
  .p-kb-pos .kv { grid-template-columns: 1fr; }
  .p-alert { flex-wrap: wrap; }
  .p-alert .btn { width: 100%; }
  .tl-filter .chipx { font-size: 12px; }
}


/* ==================== 第 15 批：平台配置 / 紧凑 UI / 手机端 / 全局组件 ==================== */
.v15-filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.v15-filter-row .select { flex: 1 1 120px; min-width: 110px; max-width: 190px; }
.v15-filter-card .card-title { margin-bottom: 6px; }
.v15-kw { flex: 1 1 200px; }
.v15-search-toggle { flex: 0 0 auto; }
.v15-q-more { flex: 1 1 100%; }
.v15-q-more summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.v15-cfg { grid-template-columns: 190px 1fr; }
.v15-cfg .input, .v15-cfg .select { width: 100%; max-width: 520px; }
.v15-map { width: 100%; height: 320px; border: 1px solid var(--line); border-radius: 8px; background: #f4f4f4; overflow: hidden; }
.v15-cust-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow: auto; }
.v15-policy-img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.v15-ann-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.v15-ann-col { min-height: 1px; }
.v15-kb-search { border: 2px solid #C4232B !important; background: #fff7f7 !important; font-size: 15px !important; }
.v15-mask { position: fixed; inset: 0; background: rgba(35,31,32,.55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 12px; }
.v15-modal { background: #fff; border-radius: 12px; width: 100%; max-width: 720px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 18px 60px rgba(0,0,0,.28); }
.v15-modal > header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: #231F20; }
.v15-modal > header .spacer, .v15-modal > footer .spacer { flex: 1; }
.v15-modal .v15-body { padding: 14px 16px; overflow: auto; }
.v15-modal > footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
.v15-modal .field { margin-bottom: 10px; }
.v15-sign-box { border: 1px dashed #C4232B; border-radius: 8px; background: #fff; touch-action: none; }
.v15-sign-canvas { display: block; width: 100%; cursor: crosshair; }
.v15-file-tools { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 6px; }
.v15-picked { max-width: 190px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.v15-tel { display: inline-block; max-width: 5.6em; word-break: break-all; line-height: 1.35; }
.v15-cf-view { max-height: 40vh; overflow: auto; }
.p-file-meta { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  /* 内 18：手机端紧凑 —— 状态一项一行、附件名截断、手机号四位数一行共三行 */
  .v15-filter-row .select { flex: 1 1 45%; }
  .v15-ann-cols { grid-template-columns: 1fr; }
  .p-proj { flex-wrap: wrap; }
  .p-proj > * { display: block; width: 100%; }
  .timeline .tl-row, .timeline .tl-item { display: block; width: 100%; }
  .v15-tel { max-width: 4.2em; }
  .v15-modal { max-width: 100%; }
  .v15-map { height: 260px; }
  .p-file-meta { max-width: 150px; }
  .p-team-role { word-break: break-all; }
}


/* ============================================================
   第 17 批：手机端空间紧凑一次性合并（N-01/03/06/07/10/13/15/18/19）
   同时承载 N-02 阶段树、N-04 确认单预览、N-09 语音气泡、N-17 周报汇总
   ============================================================ */

/* N-02 阶段树：颜色落在整行底色（绿 / 黄 / 浅灰），多级序号清晰 */
.pst-project { margin: 6px 0; }
.pst-body { padding: 4px 0; }
.pst-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 4px; margin: 3px 0; }
.pst-no { flex: 0 0 auto; min-width: 2.4em; font-variant-numeric: tabular-nums; color: #555; }
.pst-name { flex: 1; min-width: 0; word-break: break-word; }
.pst-state { flex: 0 0 auto; font-size: 12px; color: #555; }
.pst-done { background: #E3F2E6; }
.pst-doing { background: #FFF2CC; }
.pst-todo { background: #F4F4F4; }
.pst-d1 { margin-left: 18px; padding: 4px 10px; }
.pst-d2 { margin-left: 36px; padding: 3px 10px; }

/* N-09：微信式语音气泡（内部与门户共用一套，播放失败有下载兜底） */
.p-voice { display: inline-flex; align-items: center; gap: 8px; background: #F3F3F3;
  border: 1px solid #E3E3E3; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.p-voice-wave { display: inline-flex; gap: 2px; align-items: center; height: 14px; }
.p-voice-wave i { display: block; width: 3px; height: 12px; background: #C4232B; border-radius: 2px; }
.p-voice.playing .p-voice-wave i { animation: v17wave .8s infinite; }
@keyframes v17wave { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

/* N-03：上传区两行（文件选择独占整行，录音机 + 发送按钮在下一行） */
.v15-up-row { flex-wrap: wrap; }
.v15-up-row > input[type="file"] { flex: 0 0 100% !important; width: 100%; min-width: 0; }
.v15-up-row > .v15-file-tools, .v15-up-row > button { flex: 0 0 auto !important; }

/* 第 18 批真机反馈：录音机与「上传&发送 / 提交」同尺寸、次级突出（白底红边，不是主按钮红底） */
.v15-rec-btn { min-height: 44px; padding: 0 16px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 8px;
  white-space: nowrap; line-height: 1.2; }
.v15-rec-btn:hover, .v15-rec-btn:active { background: var(--brand-soft); }
/* 所有上传区统一两行，不与文件框 / 说明文字挤在一起 */
.v15-up-row { flex-wrap: wrap; align-items: center; gap: 8px; }
.v15-up-row > input[type="file"] { flex: 0 0 100% !important; width: 100%;
  min-width: 0; box-sizing: border-box; }
.v15-up-row > .v15-file-tools { display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; margin-left: 0; min-width: 0; }
.v15-up-row > .v15-file-tools > .v15-picked,
.v15-up-row > .v15-file-tools > .v15-compress-tip { flex: 0 0 100%; }
.field.v15-up-row > input[type="file"] { display: block; width: 100%; }
.field.v15-up-row > .v15-file-tools { display: flex; margin: 8px 0 0 0; flex-wrap: wrap; gap: 8px; }

/* N-01：卡片手机号完整单行；表格窄列 3-4-4 断行；中文不再被拆碎 */
.v15-tel { max-width: none !important; white-space: nowrap; word-break: normal !important; }
.v15-tel-cell { display: inline-block; word-break: break-word; line-height: 1.35; }
.p-team-role, .p-file-meta, .p-link small { word-break: break-word !important; }

/* N-15：工时分布两行 + .bar-row 进度条（去掉 ▋ 堆叠） */
.v15-hours { flex-wrap: wrap; }
.v15-hours .bl { width: auto; flex: 0 0 auto; }
.v15-hours .bar { flex: 1 1 100%; order: 2; min-width: 0; }
.v15-hours b { flex: 0 0 auto; order: 1; margin-left: auto; font-size: 12px;
  font-weight: 600; white-space: nowrap; }

/* N-18：知识库（PC 表格 / 手机卡片，先只改知识库） */
.v15-kb-cards { display: none; }
.v15-kb-card { margin: 8px 0; }
.v15-kb-title { font-size: 15px; word-break: break-word; }
.v15-kb-sum { margin: 4px 0; word-break: break-word; }
.v15-kb-meta { font-size: 12px; color: var(--muted); margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* N-17：周报汇总清单（同类合并 + ×N 计数） */
.v15-wb-sum-row { display: flex; justify-content: space-between; gap: 8px;
  padding: 5px 8px; border-bottom: 1px solid #F0F0F0; }
.v15-wb-sum-row b { color: #C4232B; white-space: nowrap; }

/* A7：紧凑区按钮不换行 */
#quickbar .line { flex-wrap: wrap; }
#quickbar .btn, .row[style*="gap:6px"] > .btn { white-space: nowrap; flex: 0 0 auto !important; }

@media (max-width: 760px) {
  /* A5：客户列按需折行（约 2 字列宽，不强制每 2 字换行）；PC 完整单行 */
  .cust-col, .cust-col-th { width: 2.4em; max-width: 2.4em; word-break: break-word; line-height: 1.25; }
  .cust-col a { display: inline-block; max-width: 100%; word-break: break-word; }

  /* A4：宽表方案 C —— 只显关键列 + 展开详情（不做横滚 / 冻结首列） */
  table.grid th.v17-extra, table.grid td.v17-extra { display: none; }
  .v17-expand-row td { padding: 0 6px 6px; }
  .v17-expand-btn { font-size: 12px; }
  .v17-extra-body { display: none; padding: 6px 8px; background: #FAFAFA;
    border-radius: 4px; margin-top: 4px; }
  .v17-extra-body > div { padding: 3px 0; word-break: break-word; }

  /* N-07：折叠框与「＋附件」并排、去边框成一行纯文字「▸ 更多」 */
  .v15-q-more { flex: 0 0 auto !important; border: 0 !important; margin: 0 !important;
    background: transparent !important; }
  .v15-q-more > summary { padding: 2px 6px !important; font-size: 12px;
    list-style: none; color: var(--muted); }
  .v15-q-more > summary::-webkit-details-marker { display: none; }
  .quickbar { padding: 6px 8px !important; margin-bottom: 8px !important; }
  .quickbar .line { margin-top: 2px !important; }
  .quickbar .q-err:empty { min-height: 0 !important; display: none; }
  .fold-body { padding: 4px 8px 8px !important; }

  /* N-18：知识库手机端卡片化（次要字段纵向小字行） */
  .v15-kb-cards { display: block; }
  .v15-kb-table { display: none; }

  /* N-03：上传区文件选择独占整行 */
  .v15-up-row > input[type="file"] { flex: 0 0 100% !important; width: 100%; }
  .v15-rec-btn { min-height: 44px; font-size: 14px; }
  .v15-up-row > .v15-file-tools { flex: 0 0 auto !important; }

  /* N-01：卡片手机号完整单行、不被 max-width 挤断 */
  .v15-tel { max-width: none !important; white-space: nowrap; word-break: normal !important; }
}


/* ===== 第 19 批：上传&发送 与 录音机 等高，主按钮靠最右 ===== */
.v15-up-row > button, .v15-rec-btn {
  height: 44px; min-height: 44px; box-sizing: border-box;
  padding: 0 16px; font-size: 14px; line-height: 1;
}
.v15-up-row > button:last-of-type { margin-left: auto; }
.v15-up-row > .v15-file-tools { margin-left: 0; }
.v15-rec-btn.recording { background: var(--brand); color: #fff; border-color: var(--brand); }
.v15-rec-state { margin-left: 6px; }


/* ===== 第 20 批：地图搜索 / 收藏地点（PC + 手机紧凑） ===== */
.v15-map-tools { display: flex; gap: 6px; margin-bottom: 6px; }
.v15-map-tools > .input { flex: 1; min-width: 0; }
.v15-map-tools > .btn { flex: 0 0 auto; }
.v15-map-res { max-height: 132px; overflow: auto; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.v15-map-res .v15-poi { max-width: 100%; white-space: normal; text-align: left; font-size: 12px; }
.v15-fav-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; align-items: center; }
.v15-fav-row > .select { flex: 1 1 160px; min-width: 0; }
.v15-fav-row > .input { flex: 1 1 130px; min-width: 0; }
.v15-fav-row > .btn { flex: 0 0 auto; }
.v15-fav-item { display: inline-flex; align-items: center; gap: 2px; }
@media (max-width: 760px) {
  .v15-map-tools, .v15-fav-row { gap: 4px; }
  .v15-fav-row > .select, .v15-fav-row > .input { flex: 1 1 100%; }
  .v15-map-res { max-height: 108px; }
}


/* ===== 第 20 批续：搜索→确认→打点流程 + 去导航 ===== */
.v15-flow { font-size: 12px; color: var(--ink-2); margin: 2px 0 6px; }
.v15-poi-row { display: flex; align-items: center; gap: 4px; width: 100%; }
.v15-poi-row > .v15-poi { flex: 1; min-width: 0; }
.v15-poi.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.v15-nav { flex: 0 0 auto; text-decoration: none; white-space: nowrap; }


/* ===== 第 20 批续二：📍 定位按钮（手机端工具行两行排布，不挤压） ===== */
.v15-map-tools > #v15MapLocBtn { flex: 0 0 auto; }
@media (max-width: 760px) {
  .v15-map-tools > .input { flex: 1 1 100%; }
  .v15-map-tools > .btn { flex: 1 1 auto; }
}


/* ===== 第 21 批：语音播放失败时的原生播放器兜底 ===== */
.p-voice-native { margin-top: 6px; }
.p-voice-native audio { width: 100%; max-width: 320px; height: 36px; }


/* ===== 第 21 批终修：语音气泡自带可见的原生播放器（手机无声根治） ===== */
.p-voice-shell { margin-top: 6px; }
.p-voice-shell audio { display: block; width: 100%; max-width: 320px; height: 34px; }
.p-voice-shell.v15-show audio { outline: 1px solid var(--brand); border-radius: 6px; }


/* ===== 第 22 批：前端构建号角标（一眼确认手机加载的是新代码） ===== */
.build-no { font-size: 10px; color: var(--muted); opacity: .78; white-space: nowrap; letter-spacing: .3px; }
.topbar .who .build-no { margin-right: 6px; }
.login-page .build-no { position: fixed; right: 10px; bottom: 8px; }
.signin-page .build-no { text-align: center; margin-top: 12px; }

/* ===== 第 22 批：客户新回复全局横幅（内部平台反向通知） ===== */
.staff-alert { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; background: #FFF4F4; border-bottom: 1px solid var(--brand);
  color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer; }
.staff-alert:hover { background: #FDE9E9; }
.staff-alert .sa-dot { animation: sa-blink 1.2s infinite; }
.staff-alert .sa-go { margin-left: auto; font-weight: 400; text-decoration: underline; }
@keyframes sa-blink { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

/* ===== 第 22 批：右下角回顶部（>300px 才显示，手机端不遮挡底部栏） ===== */
.to-top { position: fixed; right: 150px; bottom: 24px; z-index: 60; border: 1px solid var(--line);
  background: #fff; color: var(--ink); border-radius: 22px; padding: 8px 14px; font-size: 13px;
  box-shadow: 0 4px 14px rgba(35,31,32,.18); cursor: pointer; }
.to-top:hover { border-color: var(--brand); color: var(--brand); }
@media (max-width: 760px) {
  .to-top { right: 128px; bottom: 76px; padding: 7px 12px; font-size: 12px; }
}

/* ===== 第 22 批：语音气泡「音频状态」折叠诊断行 ===== */
.v15-audio-diag { margin-top: 6px; font-size: 11px; color: var(--muted); }
.v15-audio-diag > summary { cursor: pointer; list-style: none; padding: 2px 0; }
.v15-audio-diag > summary::-webkit-details-marker { display: none; }
.v15-audio-diag > summary::before { content: '▸ '; }
.v15-audio-diag[open] > summary::before { content: '▾ '; }
.v15-audio-diag-body { background: #F7F5F5; border-radius: 6px; padding: 6px 8px;
  margin-top: 4px; line-height: 1.6; word-break: break-all; font-family: monospace; }

/* ===== 第 22 批：客户台账排序 / 每页条数工具行 ===== */
.v15-list-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; margin: 2px 0 6px; }
.v15-list-tools .select { min-width: 92px; width: auto; }
.v15-list-tools .cust-meta { white-space: nowrap; }
@media (max-width: 760px) { .v15-list-tools .select { flex: 1 1 auto; min-width: 84px; } }

/* ===== 第 22 批：quickbar「客户 + 本次跟进方式」单独一行（way 位于客户字段正下方） ===== */
.q-cust-way { align-items: center; border-bottom: 1px dashed var(--line); padding-bottom: 6px; margin-bottom: 4px; }
.q-cust-way .cust-meta { white-space: nowrap; }

/* ===== 第 22 批：免登录扫码签到页 ===== */
.signin-page { min-height: 100vh; background: #F4F1F1; padding: 24px 12px; }
.signin-wrap { width: 100%; max-width: 460px; margin: 0 auto; }
.signin-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px;
  box-shadow: 0 6px 24px rgba(35,31,32,.08); }
.signin-card .logo { height: 34px; margin-bottom: 10px; }
.signin-card h1 { font-size: 20px; margin: 0 0 4px; color: var(--ink); }
.signin-card .sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.signin-alert { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.signin-submit { width: 100%; min-height: 44px; margin-top: 6px; }
.signin-done { color: var(--brand); font-size: 16px; text-align: center; padding: 20px 0; }
.sg-qr #sgQrBox svg { max-width: 260px; height: auto; }
.sg-qr-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }


/* ==================== 第 23 批 ==================== */
/* 手机端弹窗绝不超出视口：联系人「门户」弹窗、二维码弹窗、许可证页都适用 */
@media (max-width: 760px) {
  .mask { padding: 10px; align-items: flex-start; overflow-y: auto; }
  .modal { max-width: 100%; max-height: calc(100vh - 20px); border-radius: 10px; }
  .modal .content { padding: 12px 14px; }
  .modal header, .modal footer { padding-left: 14px; padding-right: 14px; }
}
/* 许可证横幅 / 提示 / 未配置公网地址的醒目提示 */
.license-banner { background: #FFF6E5; border-bottom: 1px solid #E8C87A; color: #6B4E00;
  padding: 8px 14px; font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.license-banner.lb-readonly { background: #FBE9E9; border-bottom-color: #C4232B; color: #8A141B; }
.license-banner .lb-txt { flex: 1 1 240px; }
.lic-info { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.lic-info.lic-warn { color: #C4232B; }
.lic-warn-box { background: #FBE9E9; border: 1px solid #C4232B; color: #8A141B;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; line-height: 1.6; }
/* 报名·签到：记录按分类分组，默认折叠、可展开 */
.sg-cat-group { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.sg-cat-group > summary { cursor: pointer; padding: 9px 12px; font-weight: 600;
  background: #FAF8F8; list-style: none; }
.sg-cat-group > summary::-webkit-details-marker { display: none; }
.sg-cat-group > summary::before { content: '\25B8  '; color: var(--brand); }
.sg-cat-group[open] > summary::before { content: '\25BE  '; }
/* 工单沟通记录下方醒目「↩ 回复」主按钮 */
.tk-reply-bar { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tk-reply-bar .btn { min-height: 40px; }


/* ============ 第 24 批：进销存 / 消息中心 / 项目总结 / 健康检查 / PWA / AI ============ */
.top-msg { position: relative; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 8px; padding: 4px 9px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.top-msg:hover { border-color: var(--brand); color: var(--brand); }
.msg-dot { display: inline-block; margin-left: 4px; min-width: 16px; padding: 0 3px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.v24-kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.v24-kpi { flex: 1 1 130px; min-width: 110px; background: #FBF9F9; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; }
.v24-kpi b { display: block; font-size: 22px; color: var(--brand); font-variant-numeric: tabular-nums; }
.v24-kpi span { font-size: 12px; color: var(--muted); }
.v24-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.v24-steps > span { flex: 1 1 auto; min-width: 88px; text-align: center; font-size: 12px;
  padding: 5px 6px; border-radius: 6px; background: #F1EFEF; color: var(--muted); }
.v24-steps > span.on { background: var(--brand); color: #fff; font-weight: 600; }
.v24-steps > span.done { background: var(--success-soft); color: var(--success); }
.v24-stat { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.v24-stat > div { flex: 1 1 90px; min-width: 80px; background: #FBF9F9; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; text-align: center; }
.v24-stat b { display: block; font-size: 16px; color: var(--brand); word-break: break-all; }
.v24-stat span { font-size: 11px; color: var(--muted); }
.v24-health { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0;
  border-bottom: 1px solid var(--line); }
.v24-health > .tag { flex: 0 0 auto; margin-top: 2px; }
.v24-health b { font-size: 13px; }
.v24-fix { color: var(--warn) !important; }
.v24-msg { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; background: #fff; }
.v24-msg.is-fail { border-color: #F3C9C9; background: #FFF9F9; }
.v24-msg-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.v24-msg-top .spacer { flex: 1; }
.v24-msg-body { font-size: 13px; color: var(--ink-2); margin: 6px 0; word-break: break-word; }
.v24-msg-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.v24-msg-foot .cust-meta { flex: 1 1 140px; }
.v24-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 120;
  background: var(--bg); box-shadow: -8px 0 28px rgba(35,31,32,.22); display: flex; flex-direction: column; }
.v24-drawer-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  background: #fff; border-bottom: 1px solid var(--line); }
.v24-drawer-head .spacer { flex: 1; }
.v24-drawer-body { overflow-y: auto; padding: 12px; }
.v24-report { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 10px;
  background: #fff; max-height: 420px; overflow-y: auto; }
.v24-rp-h { font-weight: 600; color: var(--brand); margin: 8px 0 4px; font-size: 14px; }
.v24-rp-p { color: var(--ink-2); font-size: 13px; padding-left: 10px; }
.v24-rp-gap { height: 4px; }
.v24-pre { white-space: pre-wrap; word-break: break-word; }
.v24-reuse { border: 1px dashed var(--brand); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; background: #FFF9F9; }
.v24-guide { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; text-align: center; }
.v24-guide-t { font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.v24-cfg-group { grid-column: 1 / -1; font-weight: 600; color: var(--brand); font-size: 13px;
  border-bottom: 1px solid var(--line); padding: 10px 0 4px; margin-top: 6px; }
.v24-pwa-foot { margin: 14px 0 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.login-pwa-tip { position: fixed; left: 12px; bottom: 8px; right: 12px; text-align: center; font-size: 11px; }

/* AI 助手（仅内部平台，登录后才挂载） */
.ai-fab { position: fixed; right: 18px; bottom: 24px; z-index: 70; border: 0; border-radius: 24px;
  padding: 10px 16px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(196,35,43,.32); cursor: pointer; }
.ai-fab:hover { background: var(--brand-dark); }
.ai-panel { position: fixed; right: 18px; bottom: 76px; width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 160px)); z-index: 71; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 10px 32px rgba(35,31,32,.22); display: flex; flex-direction: column; }
.ai-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ai-head .spacer { flex: 1; }
.ai-model { font-size: 11px; color: var(--muted); }
.ai-go { font-size: 11px; }
.ai-list { flex: 1; overflow-y: auto; padding: 10px 12px; }
.ai-welcome { color: var(--muted); font-size: 12px; }
.ai-msg { margin-bottom: 10px; }
.ai-role { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.ai-text { display: inline-block; max-width: 100%; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; word-break: break-word; background: #F6F5F5; }
.ai-user .ai-text { background: var(--brand-soft); color: var(--ink); }
.ai-tip { margin-top: 6px; font-size: 12px; color: var(--warn); }
.ai-input { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ai-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 8px; font-size: 13px; }
.ai-input .btn { flex: 0 0 auto; }

/* 第 32 批：AI 助手 —— 写入权限角标 / 语音与图片入口 / 待发图片 / 写入回执 */
.ai-wr { font-size: 10px; line-height: 16px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--line); white-space: nowrap; }
.ai-wr.off { color: var(--muted); background: #F6F5F5; }
.ai-wr.on { color: #fff; background: #1F7A4D; border-color: #1F7A4D; }
.ai-input .ai-ico { flex: 0 0 auto; width: 30px; height: 30px; align-self: flex-end; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.ai-input .ai-ico:hover { background: var(--brand-soft); }
.ai-input .ai-ico.on { background: #FDECEC; border-color: var(--brand); animation: aiMicPulse 1.1s ease-in-out infinite; }
@keyframes aiMicPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(196,35,43,.35); } 50% { box-shadow: 0 0 0 5px rgba(196,35,43,0); } }
.ai-atc { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; }
.ai-atc-item { position: relative; width: 46px; height: 46px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.ai-atc-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-atc-x { position: absolute; top: 0; right: 0; border: 0; background: rgba(35,31,32,.62); color: #fff;
  width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0; cursor: pointer; border-radius: 0 0 0 6px; }
.ai-thumbs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.ai-thumb { display: block; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-act { margin-top: 6px; font-size: 12px; padding: 5px 8px; border-radius: 6px; }
.ai-act.ok { color: #14663F; background: #E8F5EE; border: 1px solid #BFE3CE; }
.ai-act.err { color: #9A2A20; background: #FDEDEA; border: 1px solid #F3C9C3; }

/* 手机端 390×844：不遮挡底部操作栏；表格沿用第 23 批 A4「关键列 + 展开详情」 */
@media (max-width: 860px) {
  .v24-drawer { width: 100vw; }
  .ai-fab { right: 12px; bottom: 76px; padding: 9px 13px; font-size: 12px; }
  .ai-panel { right: 8px; left: 8px; width: auto; bottom: 128px; height: min(460px, calc(100vh - 210px)); }
  /* 第 32 批：手机端输入区要塞下 🎤 / 📷 / 输入框 / 发送 四个元素 */
  .ai-input { padding: 8px; gap: 5px; }
  .ai-input .ai-ico { width: 28px; height: 28px; font-size: 14px; }
  .ai-input .btn { padding: 5px 9px; }
  .v24-kpi { min-width: 44%; }
  .v24-report { max-height: 320px; }
  .top-msg { padding: 4px 7px; font-size: 12px; }
  #ptab button { flex: 1 1 0; min-width: 0; padding: 4px 2px; font-size: 11px; }
  #ptab button .ico { font-size: 16px; }
  .login-pwa-tip { position: static; margin-top: 10px; }
}


/* 第 24 批收口：390×844 顶栏多一个「消息」按钮，隐藏姓名给按钮让位，避免横向溢出 */
@media (max-width: 860px) {
  .topbar .who #whoName { display: none; }
  .topbar .who .top-msg { padding: 4px 6px; font-size: 12px; }
  .topbar .who .top-search { padding: 4px 6px; }
  .topbar .who { gap: 4px; }
  .topbar nav a { padding: 6px 7px; }
}

/* 第 26 批：AI 入口更醒目，确保右下角一眼可见 */
.ai-fab { box-shadow: 0 6px 18px rgba(35,31,32,.24); font-weight: 700; letter-spacing: .3px; }


/* ===== 第 28 批 A 组：手机端附件可见 + 公海筛选两列栅格 ===== */
input.v17-file-input { display: none; }
@media (max-width:760px) {
  /* 手机 WebView 里 hidden 的 file input 用 .click() 常常唤不起选择器，改为可见原生控件 */
  input.v17-file-input { display: block; width: 100%; font-size: 13px; margin: 6px 0; }
  #qFiles { display: block; width: 100%; color: #C4232B; font-weight: 600; }
  /* C12：公海筛选控件较多，两列栅格保证手机端全部可见，不再被挤成一长串 */
  .pool-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .pool-toolbar > * { min-width: 0; }
  .pool-toolbar .grow { grid-column: 1 / -1; }
}


/* ===== 第 28 批 B 组：logo / 按钮错开 / 跟进筛选同行 ===== */
.brand-logo { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; margin-right: 8px; }
.brand-logo-right { width: 30px; height: 30px; margin: 0 0 0 8px; }
.topbar .brand-logo-right { border-radius: 4px; }
.login-card, .signin-card { position: relative; }
.login-card .brand-logo-right, .signin-card .brand-logo-right {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; margin: 0;
}
@media (max-width:760px) {
  .brand-logo { width: 24px; height: 24px; margin-right: 5px; }
  .brand-logo-right { width: 24px; height: 24px; }
  .login-card .brand-logo-right, .signin-card .brand-logo-right { width: 30px; height: 30px; top: 10px; right: 10px; }
}
.follow-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0 0 12px; }
.follow-row .field { flex: 0 1 190px; margin: 0; }
.follow-row .field:first-child { flex: 0 1 140px; }
.follow-row .ms-pick { max-width: 230px; }
.follow-row > .btn { flex: 0 0 auto; margin-left: auto; }
@media (max-width:760px) {
  .follow-row { display: grid; grid-template-columns: 1fr 1fr; }
  .follow-row .field { max-width: none; }
  .follow-row > .btn { grid-column: 1 / -1; width: 100%; }
}

/* ---------- 第 31 批：消息已读/未读分区 ---------- */
.v24-msg-group{font-weight:700;font-size:12.5px;color:#231F20;margin:12px 0 6px;
  padding-left:8px;border-left:3px solid #C4232B}
.v24-msg.is-unread{border-left:3px solid #C4232B;background:#FFF7F7}
.v24-msg.is-read{opacity:.72}
.v24-msg.is-read .v24-msg-body{color:#6B7280}
.topbar .who #btnPortalMsg{white-space:nowrap}
/* 右上角重复 Logo 已下线，以下规则保留仅为兼容历史配置，不再有元素命中 */

/* ---------- 第 31 批：门户手机端铃铛（顶栏右侧会被横向 nav 挤出视口） ---------- */
.portal-msg-mobile{display:none;margin-left:auto;flex:0 0 auto;border-color:#C4232B;color:#C4232B;font-weight:700}
@media (max-width:640px){
  .portal-msg-mobile{display:inline-flex}
  .topbar .who #btnPortalMsg{display:none}
  .portal-id{display:flex;align-items:center;gap:8px}
}

/* ---------- 第 34 批：页签自动收纳 ---------- */
.nav-more{padding:6px 11px;font-size:15px;line-height:1;font-weight:700}
#navOverflow a{display:block;padding:8px 10px;border-radius:7px;font-size:13.5px;color:var(--ink-2)}
#navOverflow a:hover{background:#F1EFEF}
#navOverflow a.active{color:var(--brand);background:var(--brand-soft);font-weight:600}
/* 手机端顶栏不再横向滚动：放不下的自动进「更多」 */
@media (max-width:860px){ .topbar nav{overflow:visible} }

/* ---------- 第 34 批：界面协调性统一 ---------- */
.sec-title{margin:0 0 8px;font-size:14px;font-weight:700;color:#231F20;
  border-left:3px solid #C4232B;padding-left:8px;line-height:1.3}
.card.v34-quick{padding:8px 10px;margin-bottom:10px}
.quick-row{display:flex;flex-wrap:wrap;gap:6px}
.quick-row .btn{white-space:nowrap}
.v34-fold{margin-bottom:10px}
.v34-folded,.v34-fold-hidden{display:none}
.empty.empty-mini{min-height:8px;height:8px;padding:0;margin:2px 0;border:0;background:transparent;font-size:0}
.v34-more{margin:6px 0 10px}
@media (max-width:760px){
  /* 宽表改卡片式：字段横排、标签固定宽，杜绝中文竖排与列宽忽宽忽窄 */
  table.grid[data-v17wide]{display:block;width:100%}
  table.grid[data-v17wide] thead{display:none}
  table.grid[data-v17wide] tbody{display:block}
  table.grid[data-v17wide] tbody tr:not(.v17-expand-row){display:block;border:1px solid #E5E7EB;
    border-radius:9px;background:#fff;margin:0 0 8px;padding:8px 10px}
  table.grid[data-v17wide] tbody tr:not(.v17-expand-row) td{display:block;border:0;padding:2px 0;
    font-size:12.5px;line-height:1.5;white-space:normal;word-break:break-word;width:auto!important}
  table.grid[data-v17wide] tbody tr:not(.v17-expand-row) td.v17-extra{display:none}
  table.grid[data-v17wide] tbody tr:not(.v17-expand-row) td[data-v17-label]::before{
    content:attr(data-v17-label) "：";color:#9CA3AF;font-size:11px;display:inline-block;min-width:52px}
  table.grid[data-v17wide] tbody tr:not(.v17-expand-row) td:first-child{font-weight:700;font-size:13.5px}
  table.grid[data-v17wide] tbody tr:not(.v17-expand-row) td:first-child::before{display:none}
  table.grid[data-v17wide] tbody tr.v17-expand-row{display:block;border:0;background:transparent;margin:-6px 0 10px;padding:0}
  table.grid[data-v17wide] tbody tr.v17-expand-row td{display:block;border:0;padding:0}
  .v17-extra-body>div{padding:3px 0;font-size:12.5px}
  .quick-row .btn{font-size:12px;padding:5px 9px}
}

/* 第 35 批：客户 Logo / 安装原因提示 */
.portal-cust-logo{width:30px;height:30px;object-fit:contain;margin-right:6px;border:1px solid var(--line);border-radius:4px;background:#fff;vertical-align:middle}
.portal-cust-logo-m{width:24px;height:24px;margin-right:2px}
.pwa-reason{margin-left:8px;font-size:12px;color:#C4232B;max-width:560px;vertical-align:middle}
.v24-pwa-foot{margin:14px 0 2px;text-align:right}
.v35-cust-logo{width:64px;height:64px;object-fit:contain;border:1px solid var(--line);border-radius:6px;background:#fff}
@media (max-width:640px){.portal-cust-logo{width:24px;height:24px;margin-right:4px}.pwa-reason{display:block;margin:6px 0 0;text-align:left;max-width:100%}}
