/* ============================================================
   服务商管理系统 · 视觉层
   组件体系：Arco Design（Button / Input / Select / Table / Tag / Modal / Message / Menu / Tabs）
   主色 arcoblue-6 #165DFF / 小圆角 2px、中圆角 4px / 4px 栅格
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* 关闭移动端字体自动放大，避免字号被撑大后行高不够导致文字重叠 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

:root {
  /* 主色：Arco Design arcoblue-6 = rgb(22,93,255) */
  --primary:        #165DFF;
  --primary-hover:  #4080FF;
  --primary-active: #0E42D2;
  --primary-bg:     #E8F3FF;
  --primary-border: #BEDAFF;

  /* 文字层级 */
  --text-1: #1D2129;
  --text-2: #4E5969;
  --text-3: #86909C;
  --text-4: #C9CDD4;

  /* 描边与填充 */
  --border:       #E5E6EB;
  --border-2:     #C9CDD4;
  --border-light: #F2F3F5;
  --fill:         #F7F8FA;
  --fill-2:       #F2F3F5;
  --surface:      #FFFFFF;
  --bg:           #F7F8FA;

  /* 状态色 */
  --success:    #00B42A;
  --success-bg: #E8FFEA;
  --warning:    #FF7D00;
  --warning-bg: #FFF7E8;
  --danger:     #F53F3F;
  --danger-bg:  #FFECE8;

  /* 圆角：对齐 Arco（small 2 / medium 4 / large 8） */
  --r-sm: 2px;
  --r:    4px;
  --r-md: 8px;
  --r-lg: 8px;

  /* 阴影：对齐 Arco 浮层规范 */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-2: 0 4px 10px rgba(0, 0, 0, .10);
  --shadow-3: 0 4px 10px rgba(0, 0, 0, .10);

  /* 兼容旧变量名 */
  --text: var(--text-1);
  --line: var(--border);
  --line-2: var(--border-2);
  --primary-soft: var(--primary-bg);
  --gray-soft: var(--fill);
  --green: var(--success);
  --green-soft: var(--success-bg);
  --amber: var(--warning);
  --amber-soft: var(--warning-bg);
  --red: var(--danger);
  --red-soft: var(--danger-bg);
  --radius: var(--r);
  --radius-lg: var(--r-md);
}

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5715;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
a { color: var(--primary); text-decoration: none; }
.ic { display: inline-block; vertical-align: -0.16em; flex: none; }

/* ============ 登录 ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.login-card {
  width: 100%;
  max-width: 396px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-1);
}
.login-brand { margin-bottom: 24px; }
.login-brand-logo {
  display: block; width: 188px; height: auto;
  margin-bottom: 20px;
}
.login-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.logo-mark {
  width: 28px; height: 28px; border-radius: var(--r);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.logo-mark .ic { vertical-align: 0; }
.login-brand h1 {
  font-size: 18px; font-weight: 600; margin: 0 0 6px;
  letter-spacing: -0.2px; color: var(--text-1);
}
.login-brand p { margin: 0; color: var(--text-3); font-size: 13px; }

.seg {
  display: flex; background: var(--fill-2); border-radius: var(--r);
  padding: 3px; margin-bottom: 22px; gap: 2px;
}
.seg button {
  flex: 1; border: 0; background: transparent; height: 30px;
  border-radius: var(--r-sm); color: var(--text-2); cursor: pointer; font-size: 13px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button:hover { color: var(--text-1); }
.seg button.active {
  background: var(--surface); color: var(--text-1); font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

/* ============ 表单控件 ============ */
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block; font-size: 13px; color: var(--text-2);
  margin-bottom: 7px; font-weight: 400;
}
.form-row label .req { color: var(--danger); margin-left: 3px; font-weight: 400; }

.input, .select, .textarea {
  width: 100%; height: 32px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text-1);
  font-size: 14px; outline: none;
  transition: border-color .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-2); }
/* Arco 的聚焦态只换边框色，没有外发光，别加 box-shadow */
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.input:disabled, .select:disabled {
  background: var(--fill-2); color: var(--text-3); cursor: not-allowed;
  border-color: var(--border);
}
.textarea {
  height: auto; min-height: 92px; padding: 7px 11px;
  resize: vertical; line-height: 1.65;
}
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386909C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5 12 15.5 18 9.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 12px;
}
.select-sm { width: auto; min-width: 124px; }
.field-mini label {
  display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px;
}

/* ============ 按钮（Arco Button） ============ */
/* default: 白底灰边黑字，hover 只变浅灰底，不变蓝 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 15px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text-1);
  cursor: pointer; font-size: 14px; font-weight: 400; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--fill-2); border-color: var(--border); color: var(--text-1); }
.btn:active { background: var(--border-light); }
.btn-primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover); border-color: var(--primary-hover); color: #fff;
}
.btn-primary:active { background: var(--primary-active); border-color: var(--primary-active); color: #fff; }
/* Arco small: 28 高 / 左右 11px */
.btn-sm { height: 28px; padding: 0 11px; font-size: 14px; border-radius: var(--r-sm); }
.btn-block { width: 100%; height: 36px; font-size: 14px; padding: 0 19px; }
.btn:disabled, .btn:disabled:hover {
  background: var(--fill-2); border-color: var(--border); color: var(--text-4);
  cursor: not-allowed;
}
.btn-primary:disabled, .btn-primary:disabled:hover {
  background: #94BFFF; border-color: #94BFFF; color: #fff;
}

.login-hint {
  margin-top: 22px; padding: 11px 13px;
  background: var(--fill); border-radius: var(--r);
  font-size: 12.5px; color: var(--text-2); line-height: 1.8;
}
.login-hint b { font-weight: 500; color: var(--text-1); }
.login-error {
  background: var(--danger-bg); color: var(--danger);
  font-size: 13px; padding: 8px 12px;
  border-radius: var(--r); margin-bottom: 14px;
}

/* ============ 应用框架 ============ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px; flex: 0 0 220px;
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}
.side-brand {
  height: 60px; flex: none;
  display: flex; align-items: center; gap: 9px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-light);
}
.side-logo { height: 23px; width: auto; flex: none; }
.side-brand .logo-mark { width: 26px; height: 26px; border-radius: var(--r); }
.side-brand span.t {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  letter-spacing: -0.1px; white-space: nowrap;
}

.nav { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.nav-label {
  font-size: 12px; color: var(--text-3); letter-spacing: .4px;
  padding: 16px 12px 6px; font-weight: 500;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px;
  border-radius: var(--r-sm); color: var(--text-2);
  cursor: pointer; margin: 2px 0;
  font-size: 14px;
  transition: background .13s, color .13s;
}
.nav-item:hover { background: var(--fill); color: var(--text-1); }
.nav-item.active {
  background: var(--primary-bg); color: var(--primary); font-weight: 500;
}
.nav-item .ico {
  display: inline-flex; align-items: center;
  width: 16px; height: 16px; opacity: .72;
}
.nav-item:hover .ico { opacity: .9; }
.nav-item.active .ico { opacity: 1; }

.side-foot { padding: 10px; border-top: 1px solid var(--border-light); }
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--r); cursor: pointer;
  transition: background .13s;
}
.side-user:hover { background: var(--fill); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 500; flex: 0 0 30px;
}
.side-user-meta { min-width: 0; }
.side-user-meta .n {
  font-size: 13px; font-weight: 500; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-user-meta .r {
  font-size: 11.5px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 56px; flex: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-3);
}
.breadcrumb .bc-sep { display: inline-flex; color: var(--text-4); }
.breadcrumb .bc-cur { color: var(--text-1); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; }
.topbar-logo { display: none; height: 20px; width: auto; }

/* 内容区全宽铺满，保证与顶栏面包屑共享同一条左边线 */
.content {
  padding: 20px 24px 48px;
  width: 100%;
}

/* ============ 页面标题 ============ */
.page-head { margin-bottom: 18px; }
.page-head h1 {
  font-size: 20px; font-weight: 600; color: var(--text-1);
  margin: 0 0 6px; letter-spacing: -0.2px; line-height: 1.4;
}
.page-head p { margin: 0; color: var(--text-3); font-size: 13px; }

/* ============ 卡片 ============ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px;
}
.card + .card { margin-top: 16px; }
/* 网格与分栏内的卡片由 gap 统一控制间距，禁止叠加外边距 */
.grid > .card + .card,
.split > .card + .card { margin-top: 0; }
.card-title {
  font-size: 15px; font-weight: 600; color: var(--text-1);
  margin: 0 0 4px; letter-spacing: -0.1px;
}
.card-sub { font-size: 12.5px; color: var(--text-3); margin: 0 0 16px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 统计卡：数字与单位严格基线对齐 */
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px 18px;
  position: relative;
}
.stat .k { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.stat .v {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 28px; font-weight: 600; color: var(--text-1);
  letter-spacing: -0.5px; line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.stat .v small {
  font-size: 13px; font-weight: 400; color: var(--text-3);
  margin-left: 0; letter-spacing: 0;
}

/* 统计卡：可点击跳转时给出明确的可点信号 */
.stat-link { cursor: pointer; }
.stat-link .k { transition: color .18s; }
.stat-link:hover .k { color: var(--text-2); }
.stat-go {
  position: absolute; top: 15px; right: 15px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); opacity: 0; transform: translateX(-3px);
  transition: opacity .18s, transform .18s, color .18s;
}
.stat-link:hover .stat-go,
.stat-link:focus-visible .stat-go { opacity: 1; transform: translateX(0); color: var(--primary); }
.stat-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 功能入口卡 */
.entry {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.entry:hover { border-color: var(--primary-border); box-shadow: 0 2px 8px rgba(22, 93, 255, .08); }
.entry-ico {
  width: 36px; height: 36px; border-radius: var(--r);
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex: 0 0 36px;
}
.entry-body { flex: 1; min-width: 0; }
.entry-title { font-size: 14px; font-weight: 500; color: var(--text-1); }
.entry-desc { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.entry-arrow {
  color: var(--text-4); display: inline-flex;
  transition: color .15s, transform .15s;
}
.entry:hover .entry-arrow { color: var(--primary); transform: translateX(2px); }

/* ============ 标签 ============ */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 12px; line-height: 1; font-weight: 400;
  background: var(--fill-2); color: var(--text-2);
  white-space: nowrap;
}
.tag-green { background: var(--success-bg); color: var(--success); }
.tag-amber { background: var(--warning-bg); color: var(--warning); }
.tag-red   { background: var(--danger-bg);  color: var(--danger); }
.tag-blue  { background: var(--primary-bg); color: var(--primary); }
.tag-gray  { background: var(--fill-2);     color: var(--text-3); }

/* ============ 工具栏与搜索 ============ */
.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .grow { flex: 1; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search .input { padding-left: 32px; }
.search::before {
  content: ""; position: absolute; left: 10px; top: 50%;
  width: 14px; height: 14px; transform: translateY(-50%);
  background: no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386909C' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.7-3.7'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ============ 表格 ============ */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden; background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-weight: 500; color: var(--text-1);
  background: var(--fill); font-size: 13px;
  padding: 11px 16px; height: 46px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle; color: var(--text-1);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--fill); }
td .tag { vertical-align: middle; }
.td-main { font-weight: 500; }
.td-sub { color: var(--text-3); font-size: 12px; margin-top: 3px; }
.hh-num { display: inline-flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.hh-num .td-sub { margin-top: 0; }

/* 卡片内表格：铺满卡片宽度，首尾单元格与卡片内边距对齐 */
.card > .table-wrap {
  border: 0; border-radius: 0;
  margin: 0 -20px -20px;
  border-top: 1px solid var(--border-light);
}
.card > .table-wrap thead th:first-child,
.card > .table-wrap tbody td:first-child { padding-left: 20px; }
.card > .table-wrap thead th:last-child,
.card > .table-wrap tbody td:last-child { padding-right: 20px; }

/* 列表卡片：工具栏与表格同处一卡，表格铺满 */
.card-flush { padding: 0; overflow: hidden; }
.card-flush .table-toolbar { padding: 16px 20px 14px; }
.card-flush > .table-wrap { border: 0; border-radius: 0; margin: 0; }

.table-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.table-toolbar .grow { flex: 1; }
.table-toolbar .search { max-width: 280px; }

/* 操作列统一宽度与右对齐 */
.table-wrap th.th-op,
.table-wrap td.td-op { width: 64px; text-align: right; color: var(--text-4); }

/* ============ 各表列宽（避免短内容列被拉宽） ============ */
.tbl-recent th:nth-child(1) { width: 22%; }
.tbl-recent th:nth-child(2) { width: 36%; }
.tbl-recent th:nth-child(3) { width: 26%; }
.tbl-recent th:nth-child(4) { width: 16%; }

.tbl-subprov th:nth-child(1) { width: 30%; }
.tbl-subprov th:nth-child(2) { width: 14%; }
.tbl-subprov th:nth-child(3) { width: 20%; }
.tbl-subprov th:nth-child(4) { width: 16%; }

.tbl-communities th:nth-child(1) { width: 22%; }
.tbl-communities th:nth-child(2) { width: 11%; }
.tbl-communities th:nth-child(3) { width: 32%; }
.tbl-communities th:nth-child(4) { width: 9%; }
.tbl-communities th:nth-child(5) { width: 12%; }
.tbl-communities th:nth-child(6) { width: 14%; }

.tbl-apps { table-layout: fixed; }
.tbl-apps th:nth-child(1) { width: 23%; }
.tbl-apps th:nth-child(2) { width: 33%; }
.tbl-apps th:nth-child(3) { width: 17%; }
.tbl-apps th:nth-child(4) { width: 9%; }
.tbl-apps th:nth-child(5) { width: 140px; }
.tbl-apps tbody td { overflow: hidden; }
.tbl-apps tbody td:nth-child(3),
.tbl-apps tbody td:nth-child(4) { white-space: nowrap; }
.tbl-apps tbody td:nth-child(2) { line-height: 1.6; }
.tbl-apps .td-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tbl-providers th:nth-child(1) { width: 22%; }
.tbl-providers th:nth-child(2) { width: 10%; }
.tbl-providers th:nth-child(3) { width: 15%; }
.tbl-providers th:nth-child(4) { width: 11%; }
.tbl-providers th:nth-child(5) { width: 9%; }
.tbl-providers th:nth-child(6) { width: 15%; }

.tbl-subcomm th:nth-child(1) { width: 18%; }
.tbl-subcomm th:nth-child(2) { width: 10%; }
.tbl-subcomm th:nth-child(3) { width: 16%; }
.tbl-subcomm th:nth-child(4) { width: 32%; }
.tbl-subcomm th:nth-child(5) { width: 11%; }
.tbl-subcomm th:nth-child(6) { width: 13%; }

/* 管理员端表格 */
.tbl-review th:nth-child(1) { width: 19%; }
.tbl-review th:nth-child(2) { width: 12%; }
.tbl-review th:nth-child(3) { width: 20%; }
.tbl-review th:nth-child(4) { width: 15%; }
.tbl-review th:nth-child(5) { width: 15%; }
.tbl-review th:nth-child(6) { width: 8%; }
.tbl-review th:nth-child(7) { width: 11%; }
.tbl-review td:nth-child(5),
.tbl-admin-dash td:nth-child(5),
.tbl-manage td:nth-child(4),
.tbl-communities td:nth-child(6),
.tbl-providers td:nth-child(6),
.tbl-subcomm td:nth-child(6) { white-space: nowrap; }

.tbl-admin-dash th:nth-child(1) { width: 22%; }
.tbl-admin-dash th:nth-child(2) { width: 13%; }
.tbl-admin-dash th:nth-child(3) { width: 26%; }
.tbl-admin-dash th:nth-child(4) { width: 15%; }
.tbl-admin-dash th:nth-child(5) { width: 16%; }
.tbl-admin-dash th:nth-child(6) { width: 8%; }

.tbl-manage th:nth-child(1) { width: 20%; }
.tbl-manage th:nth-child(2) { width: 8%; }
.tbl-manage th:nth-child(3) { width: 10%; }
.tbl-manage th:nth-child(4) { width: 13%; }
.tbl-manage th:nth-child(5) { width: 16%; }
.tbl-manage th:nth-child(6) { width: 9%; }
.tbl-manage th:nth-child(7) { width: 8%; }
.tbl-manage th:nth-child(8) { width: 10%; }

.tbl-comlib th:nth-child(1) { width: 18%; }
.tbl-comlib th:nth-child(2) { width: 10%; }
.tbl-comlib th:nth-child(3) { width: 15%; }
.tbl-comlib th:nth-child(4) { width: 30%; }
.tbl-comlib th:nth-child(5) { width: 8%; }
.tbl-comlib th:nth-child(6) { width: 19%; }

/* 六列表格启用固定布局，让列宽严格生效 */
.tbl-communities,
.tbl-subcomm,
.tbl-review,
.tbl-admin-dash,
.tbl-manage,
.tbl-comlib { table-layout: fixed; }
.tbl-communities td,
.tbl-subcomm td {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============ 空态 ============ */
.empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 52px 20px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
}
.empty .e-ico { color: var(--text-4); margin-bottom: 14px; line-height: 0; }
.empty p { margin: 0 0 16px; font-size: 13px; }

/* ============ 信息栅格 ============ */
.info-grid {
  display: grid; grid-template-columns: 92px 1fr;
  gap: 14px 16px; font-size: 13.5px; margin: 0;
}
.info-grid dt { color: var(--text-3); }
.info-grid dd { margin: 0; color: var(--text-1); line-height: 1.65; }

/* ============ 权益卡 ============ */
.benefit-card {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 18px; background: var(--surface); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.benefit-card:hover {
  border-color: var(--primary-border);
  box-shadow: 0 2px 8px rgba(22, 93, 255, .08);
}
.benefit-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.benefit-name { font-weight: 500; font-size: 14px; color: var(--text-1); }
.benefit-val {
  font-size: 22px; font-weight: 600; color: var(--text-1);
  margin: 10px 0 4px; letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.benefit-meta { font-size: 12px; color: var(--text-3); }

/* ============ 权益政策列表（固定内容） ============ */
.policy-list { margin: 0; }
.policy-item { padding: 17px 0; border-bottom: 1px solid var(--border-light); }
.policy-item:first-child { padding-top: 2px; }
.policy-item:last-child { border-bottom: none; padding-bottom: 2px; }
.policy-row { display: flex; align-items: baseline; gap: 14px; }
.policy-no {
  flex: none; min-width: 18px;
  font-size: 12px; color: var(--text-3);
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.policy-name { flex: none; font-size: 14px; font-weight: 500; color: var(--text-1); }
.policy-val {
  margin-left: auto; text-align: right;
  font-size: 13.5px; color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.policy-note {
  margin: 7px 0 0 32px;
  font-size: 12.5px; color: var(--text-2); line-height: 1.7;
}

/* ============ 小区选择 ============ */
.picker-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface); cursor: pointer;
  font-size: 13px; color: var(--text-2);
  transition: border-color .13s, color .13s, background .13s;
}
.chip:hover { border-color: var(--primary-border); color: var(--primary); }
.chip.active {
  background: var(--primary-bg);
  border-color: var(--primary-border);
  color: var(--primary); font-weight: 500;
}

.cascade {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin-bottom: 14px;
}

.picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px; max-height: 348px; overflow-y: auto;
  /* 用负外边距抵消滚动缓冲，保证卡片与上方控件左边缘严格对齐 */
  padding: 2px; margin: -2px;
}
.pick-item {
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 10px 12px; cursor: pointer; background: var(--surface);
  position: relative;
  transition: border-color .13s, background .13s;
}
.pick-item:hover { border-color: var(--primary-border); background: #FAFCFF; }
.pick-item.selected { border-color: var(--primary); background: var(--primary-bg); }
.pick-item .nm {
  font-size: 13.5px; font-weight: 500; color: var(--text-1);
  padding-right: 20px;
}
.pick-item .ad {
  font-size: 11.5px; color: var(--text-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pick-check {
  position: absolute; top: 10px; right: 10px;
  width: 14px; height: 14px;
  border: 1px solid var(--border-2); border-radius: 3px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: background .13s, border-color .13s;
}
.pick-check .ic { width: 10px; height: 10px; stroke-width: 3; }
.pick-item.selected .pick-check {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

.selected-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 13px; background: var(--fill);
  border-radius: var(--r); font-size: 13px; margin-bottom: 14px;
  color: var(--text-2);
}
.selected-bar b { color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============ 弹窗（Arco Modal） ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(29, 33, 41, .5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal {
  background: var(--surface); border-radius: var(--r);
  width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto;
  box-shadow: var(--shadow-2);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0; border-bottom: 0;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 500; color: var(--text-1); line-height: 1.5; }
.modal-close {
  border: 0; background: transparent; cursor: pointer;
  width: 24px; height: 24px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); padding: 0;
  transition: background .13s, color .13s;
}
.modal-close:hover { background: var(--fill-2); color: var(--text-1); }
.modal-body { padding: 16px 24px 24px; }
.modal-foot {
  padding: 0 24px 20px; border-top: 0;
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ============ 轻提示（Arco Message：顶部居中滑入） ============ */
.toast {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-100%);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); color: var(--text-1);
  padding: 10px 16px; border-radius: var(--r);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-2);
  font-size: 14px; line-height: 1.5715; max-width: min(560px, calc(100vw - 32px));
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ico { display: inline-flex; flex: none; }
.toast-success .toast-ico { color: var(--success); }
.toast-error .toast-ico { color: var(--danger); }
.toast-warn .toast-ico { color: var(--warning); }

.hint-line { font-size: 12.5px; color: var(--text-3); margin-top: 8px; line-height: 1.7; }
.section-gap { margin-top: 16px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px; align-items: start;
}

/* 已锁定 / 已运营：用底色与文字层级区分，不用整体透明度，避免状态标签看不清 */
.pick-item.taken {
  cursor: not-allowed; background: var(--fill-2); border-color: var(--border-light);
}
.pick-item.taken:hover { border-color: var(--border-light); background: var(--fill-2); }
.pick-item.taken .nm { color: var(--text-2); font-weight: 500; }
.pick-item.taken .ad { color: var(--text-4); }
.pick-item.taken .pick-check { background: var(--fill); border-color: var(--border-light); }
.pick-item.taken .pick-check svg { opacity: 0; }
/* 小区卡片上的状态标签 */
.pick-tag {
  font-size: 11px; height: 18px; line-height: 18px; padding: 0 6px;
  font-weight: 500; vertical-align: 1px; letter-spacing: 0; margin-left: 2px;
}
.card[data-nav] { transition: border-color .15s, box-shadow .15s; }
.card[data-nav]:hover { border-color: var(--primary-border); box-shadow: 0 2px 8px rgba(22, 93, 255, .08); }

.overlay { display: none; }

/* ============ 响应式 ============ */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh;
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 4px 0 16px rgba(0, 0, 0, .06);
  }
  .sidebar.open { transform: translateX(0); }
  .overlay.show {
    display: block; position: fixed; inset: 0;
    background: rgba(0, 0, 0, .35); z-index: 35;
  }
  .hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border: 1px solid var(--border);
    background: var(--surface); border-radius: var(--r); cursor: pointer;
    color: var(--text-2); padding: 0;
  }
  .hamburger:hover { border-color: var(--primary); color: var(--primary); }
  .topbar { padding: 0 16px; }
  .content { padding: 16px 16px 40px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .cascade { grid-template-columns: 1fr; }
}

/* ---------- 手机端（≤760px）：顶栏精简 + 列表表格改卡片 ---------- */
@media (max-width: 760px) {
  .topbar { padding: 0 12px; }
  .topbar-left { gap: 10px; }
  .topbar-logo { display: block; }
  .breadcrumb { display: none; }
  .top-actions .tag { display: none; }
  .login-brand-logo { width: 168px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }
  /* 管理端宽表：给足列宽，宁可横向滑动也不挤压 */
  .tbl-review, .tbl-manage, .tbl-comlib, .tbl-logs { min-width: 820px; }

  .table-toolbar { flex-wrap: wrap; }
  .table-toolbar .search { flex: 1 1 100%; max-width: none; }
  .table-toolbar .grow { display: none; }

  .tbl-apps, .tbl-communities, .tbl-recent { display: block; table-layout: auto; min-width: 0; }
  .tbl-apps thead, .tbl-communities thead, .tbl-recent thead { display: none; }
  .tbl-apps tbody, .tbl-communities tbody, .tbl-recent tbody { display: block; }
  .tbl-apps tbody tr, .tbl-communities tbody tr, .tbl-recent tbody tr {
    display: block; padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
  }
  .tbl-apps tbody tr:last-child,
  .tbl-communities tbody tr:last-child,
  .tbl-recent tbody tr:last-child { border-bottom: 0; }
  .tbl-apps tbody td, .tbl-communities tbody td, .tbl-recent tbody td {
    display: grid; grid-template-columns: 58px minmax(0, 1fr);
    column-gap: 10px; align-items: start;
    width: auto !important; padding: 2px 0; border: 0;
    white-space: normal; overflow: visible;
    font-size: 13.5px; line-height: 1.7;
  }
  .tbl-apps tbody td::before,
  .tbl-communities tbody td::before,
  .tbl-recent tbody td::before {
    content: attr(data-l);
    grid-column: 1; grid-row: 1; flex: 0 0 58px;
    color: var(--text-3); font-size: 12px; line-height: 1.9;
  }
  .tbl-apps tbody td[colspan]::before,
  .tbl-communities tbody td[colspan]::before,
  .tbl-recent tbody td[colspan]::before { display: none; }
  .tbl-apps tbody td > *,
  .tbl-communities tbody td > *,
  .tbl-recent tbody td > * { grid-column: 2; min-width: 0; justify-self: start; }
  .tbl-apps .td-sub, .tbl-communities .td-sub { white-space: normal; }
  .tbl-apps tbody td.td-op {
    display: flex; align-items: center;
    justify-content: flex-start; text-align: left;
    padding-top: 10px;
  }
  .tbl-apps tbody td.td-op .btn + .btn { margin-left: 6px; }

  /* 客户池 / 辖区小区 / 社区服务商 / 申请初审：手机端卡片化，避免横向截断 */
  .tbl-manage.tbl-prospect,
  .tbl-comlib.tbl-areacom,
  .tbl-manage.tbl-aprov,
  .tbl-manage.tbl-arev { display: block; table-layout: auto; min-width: 0; }
  .tbl-prospect thead, .tbl-areacom thead, .tbl-aprov thead, .tbl-arev thead { display: none; }
  .tbl-prospect tbody, .tbl-areacom tbody, .tbl-aprov tbody, .tbl-arev tbody { display: block; }
  .tbl-prospect tbody tr, .tbl-areacom tbody tr,
  .tbl-aprov tbody tr, .tbl-arev tbody tr {
    display: block; padding: 12px 16px; position: relative;
    border-bottom: 1px solid var(--border-light);
  }
  .tbl-prospect tbody tr:last-child, .tbl-areacom tbody tr:last-child,
  .tbl-aprov tbody tr:last-child, .tbl-arev tbody tr:last-child { border-bottom: 0; }
  .tbl-prospect tbody td, .tbl-areacom tbody td,
  .tbl-aprov tbody td, .tbl-arev tbody td {
    display: grid; grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 10px; align-items: start;
    width: auto !important; max-width: none; padding: 2px 0; border: 0;
    white-space: normal; overflow: visible;
    font-size: 13.5px; line-height: 1.7;
  }
  .tbl-prospect tbody td::before, .tbl-areacom tbody td::before,
  .tbl-aprov tbody td::before, .tbl-arev tbody td::before {
    content: attr(data-l); grid-column: 1; grid-row: 1;
    color: var(--text-3); font-size: 12px; line-height: 1.9;
  }
  .tbl-prospect tbody td[colspan]::before, .tbl-areacom tbody td[colspan]::before,
  .tbl-aprov tbody td[colspan]::before, .tbl-arev tbody td[colspan]::before { display: none; }
  .tbl-prospect tbody td > *, .tbl-areacom tbody td > *,
  .tbl-aprov tbody td > *, .tbl-arev tbody td > * { grid-column: 2; min-width: 0; justify-self: start; }
  .tbl-prospect .td-clip, .tbl-areacom .td-clip, .tbl-aprov .td-clip, .tbl-arev .td-clip {
    white-space: normal; max-width: none;
  }
  /* 首列作为卡片标题：不显示标签，加粗，给右侧勾选框留位 */
  .tbl-prospect .td-main, .tbl-areacom .td-main,
  .tbl-aprov .td-main, .tbl-arev .td-main {
    display: block; padding-right: 30px; padding-bottom: 4px;
    font-weight: 500; font-size: 14px;
  }
  .tbl-prospect .td-main::before, .tbl-areacom .td-main::before,
  .tbl-aprov .td-main::before, .tbl-arev .td-main::before { display: none; }
  /* 勾选列浮到右上角 */
  .tbl-areacom tbody td.td-check {
    display: block; position: absolute; top: 12px; right: 14px;
    width: auto !important; padding: 0;
  }
  .tbl-prospect tbody td.td-op, .tbl-areacom tbody td.td-op,
  .tbl-aprov tbody td.td-op, .tbl-arev tbody td.td-op {
    display: flex; flex-wrap: wrap; gap: 6px;
    justify-content: flex-start; padding-top: 8px;
  }
}

@media (max-width: 560px) {
  /* 统计卡手机端保持两列，避免单列堆成一条长柱 */
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .k { font-size: 12px; margin-bottom: 6px; }
  .stat-go { opacity: .5; transform: none; }
  .login-card { padding: 28px 22px 24px; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 600px; }
  .stat .v { font-size: 22px; }
  /* 触屏无 hover，常显跳转箭头提示可点 */
  .stat-link .stat-go { opacity: .5; transform: none; }
}

/* ============================================================
   运营中心
   ============================================================ */

/* 勾选列 */
.table-wrap th.th-check,
.table-wrap td.td-check {
  width: 44px; padding-left: 20px; padding-right: 0;
  text-align: left; vertical-align: middle;
}
.chk {
  width: 16px; height: 16px; margin: 0; cursor: pointer;
  accent-color: var(--primary); vertical-align: -2px;
}
.chk-ph { display: inline-block; width: 15px; height: 15px; }
tbody tr:hover .chk { accent-color: var(--primary-active); }

/* 批量操作条 */
.bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 20px;
  background: var(--primary-bg);
  border-top: 1px solid var(--primary-border);
  border-bottom: 1px solid var(--primary-border);
}
.bulkbar[hidden] { display: none; }
.bulk-text { font-size: 13px; color: var(--text-2); }
.bulk-text b {
  color: var(--primary); font-weight: 600;
  font-variant-numeric: tabular-nums; margin: 0 2px;
}

/* 无边框文字按钮 */
.btn-text {
  border-color: transparent; background: transparent; color: var(--text-3);
}
.btn-text:hover {
  border-color: transparent; background: var(--danger-bg); color: var(--danger);
}
.btn-text:disabled:hover { background: transparent; color: var(--text-3); }

/* 操作列加宽 */
.table-wrap td.td-op.td-op-wide {
  width: 140px; white-space: nowrap; text-align: right;
}
.td-op.td-op-wide .btn + .btn { margin-left: 6px; }

/* 单元格省略 */
td.td-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.td-mono {
  font-variant-numeric: tabular-nums; color: var(--text-2);
  white-space: nowrap; font-size: 13px;
}

/* 固定布局表格：超长内容一律省略，避免溢出压到相邻列 */
.tbl-review tbody td,
.tbl-manage tbody td,
.tbl-comlib tbody td,
.tbl-logs tbody td,
.tbl-admin-dash tbody td {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tbl-review tbody td.td-main,
.tbl-manage tbody td.td-main { white-space: normal; }

/* 进度条与条形统计 */
.prog {
  height: 6px; background: var(--fill-2); border-radius: 3px;
  overflow: hidden; min-width: 0;
}
.prog > span {
  display: block; height: 100%; background: var(--primary);
  border-radius: 3px; transition: width .3s ease;
}
.bar-list { display: block; }
.bar-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 58px;
  align-items: center; gap: 12px;
  padding: 7px 0;
}
.bar-name {
  font-size: 13px; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-num {
  font-size: 12.5px; color: var(--text-3); text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rail-empty {
  font-size: 13px; color: var(--text-3);
  padding: 14px 0; text-align: center;
}

/* 待办列表 */
.todo-list { display: block; }
.todo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.todo-row:last-child { border-bottom: 0; padding-bottom: 0; }
.todo-row:hover .todo-label { color: var(--primary); }
.todo-row:hover .todo-arrow { color: var(--primary); }
.todo-main { flex: 1; min-width: 0; }
.todo-label { font-size: 13.5px; color: var(--text-1); transition: color .13s; }
.todo-desc { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.todo-num {
  font-size: 19px; font-weight: 600; color: var(--text-1);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.todo-num.hot { color: var(--warning); }
.todo-arrow { color: var(--text-4); display: inline-flex; }

/* 最近操作 */
.log-list { display: block; }
.log-row {
  display: grid;
  grid-template-columns: 78px 92px 66px minmax(0, 1fr);
  gap: 10px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border-light);
  font-size: 12.5px;
}
.log-row:last-child { border-bottom: 0; }
.log-time { color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-actor { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-act { color: var(--primary); white-space: nowrap; }
.log-target { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; margin-top: 14px;
}
.link-more:hover { color: var(--primary-hover); }

/* 导入结果 */
.import-result {
  margin-top: 12px; padding: 12px 14px;
  background: var(--fill); border-radius: var(--r);
  font-size: 13px; line-height: 1.8;
}
.import-sum { color: var(--text-1); }
.import-fail {
  color: var(--danger); font-size: 12.5px;
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--border);
}

/* ---------- 运营相关表格列宽（覆盖旧定义） ---------- */
.tbl-review th:nth-child(1) { width: 44px; }
.tbl-review th:nth-child(2) { width: 16%; }
.tbl-review th:nth-child(3) { width: 11%; }
.tbl-review th:nth-child(4) { width: 15%; }
.tbl-review th:nth-child(5) { width: 15%; }
.tbl-review th:nth-child(6) { width: 14%; }
.tbl-review th:nth-child(7) { width: 9%; }
.tbl-review th:nth-child(8) { width: 132px; }
.tbl-review td:nth-child(6) { white-space: nowrap; }

.tbl-comlib th:nth-child(1) { width: 44px; }
.tbl-comlib th:nth-child(2) { width: 16%; }
.tbl-comlib th:nth-child(3) { width: 8%; }
.tbl-comlib th:nth-child(4) { width: 11%; }
.tbl-comlib th:nth-child(5) { width: 18%; }
.tbl-comlib th:nth-child(6) { width: 6%; }
.tbl-comlib th:nth-child(7) { width: 15%; }
.tbl-comlib th:nth-child(8) { width: 11%; }
.tbl-comlib th:nth-child(9) { width: 140px; }
.tbl-comlib td:nth-child(8) { white-space: nowrap; }

.tbl-manage th:nth-child(1) { width: 20%; }
.tbl-manage th:nth-child(2) { width: 8%; }
.tbl-manage th:nth-child(3) { width: 10%; }
.tbl-manage th:nth-child(4) { width: 12%; }
.tbl-manage th:nth-child(5) { width: 15%; }
.tbl-manage th:nth-child(6) { width: 9%; }
.tbl-manage th:nth-child(7) { width: 8%; }
.tbl-manage th:nth-child(8) { width: 140px; }

/* 操作人列要容得下「南阳唐河区域服务商」这类全称，不能给角色/动作列那么多余量 */
.tbl-logs th:nth-child(1) { width: 14%; }
.tbl-logs th:nth-child(2) { width: 17%; }
.tbl-logs th:nth-child(3) { width: 11%; }
.tbl-logs th:nth-child(4) { width: 10%; }
.tbl-logs th:nth-child(5) { width: 22%; }
.tbl-logs th:nth-child(6) { width: 26%; }

.tbl-logs { table-layout: fixed; }
.tbl-comlib td.td-check,
.tbl-review td.td-check,
.tbl-logs td.td-check { width: 44px; }

/* ============ 确认弹窗 ============ */
.confirm { display: flex; gap: 12px; align-items: flex-start; }
.confirm-ico {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  animation: iconPop .3s cubic-bezier(.2, .8, .3, 1) both;
}
.confirm-ico.danger { background: var(--danger-bg); color: var(--danger); }
.confirm-main { flex: 1; min-width: 0; }
.confirm-text {
  margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-1);
}
.confirm-detail {
  margin-top: 12px; padding: 10px 12px;
  background: var(--fill); border-radius: var(--r);
  display: flex; flex-direction: column; gap: 7px;
}
.cf-row { display: flex; gap: 10px; font-size: 13px; line-height: 1.5; min-width: 0; }
.cf-row > span { flex: 0 0 74px; color: var(--text-3); }
.cf-row > b {
  flex: 1; min-width: 0; font-weight: 500; color: var(--text-1);
  word-break: break-word;
}
.confirm-tip {
  margin: 10px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.7;
}

/* 危险按钮（描边红） */
.btn-danger { color: var(--danger); border-color: #F0C0C4; }
.btn-danger:hover {
  color: var(--danger); border-color: var(--danger); background: var(--danger-bg);
}

/* ============ 交互动效 ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes maskOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes iconPop {
  0%   { opacity: 0; transform: scale(.72); }
  60%  { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 页面切换 */
#view.view-enter > * { animation: fadeUp .3s cubic-bezier(.2, .7, .3, 1) both; }
#view.view-enter > *:nth-child(2) { animation-delay: .04s; }
#view.view-enter > *:nth-child(3) { animation-delay: .08s; }
#view.view-enter > *:nth-child(4) { animation-delay: .12s; }
#view.view-enter > *:nth-child(n+5) { animation-delay: .15s; }

/* 表格行渐入 */
tbody tr { transition: background .13s; }
tbody tr { animation: fadeIn .22s ease both; }
tbody tr:nth-child(2) { animation-delay: .02s; }
tbody tr:nth-child(3) { animation-delay: .04s; }
tbody tr:nth-child(4) { animation-delay: .06s; }
tbody tr:nth-child(5) { animation-delay: .08s; }
tbody tr:nth-child(n+6) { animation-delay: .1s; }

/* 弹窗动效 */
.modal-mask { animation: maskIn .16s ease both; }
.modal-mask .modal { animation: modalIn .24s cubic-bezier(.2, .8, .3, 1) both; }
.modal-mask.closing { animation: maskOut .13s ease both; }
.modal-mask.closing .modal {
  opacity: 0; transform: translateY(6px) scale(.985);
  transition: opacity .13s ease, transform .13s ease;
}

/* 卡片与统计卡悬停 */
.card { transition: border-color .18s, box-shadow .18s; }
.stat {
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.stat:hover {
  border-color: var(--primary-border);
  box-shadow: 0 4px 14px rgba(22, 93, 255, .07);
  transform: translateY(-1px);
}

/* 按钮按压与加载态 */
.btn {
  transition: border-color .15s, color .15s, background .15s,
              transform .12s ease, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary:hover { box-shadow: 0 2px 8px rgba(22, 93, 255, .22); }
.btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.is-loading::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 2px solid rgba(22, 93, 255, .28);
  border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}

/* 侧栏选中：Arco Menu 用整块浅蓝底 + 蓝字，没有左侧竖条 */
.nav-item { position: relative; }

/* 小区选择卡 */
.pick-item {
  transition: border-color .15s, background .15s, box-shadow .15s, transform .12s;
}
.pick-item:hover:not(.taken) { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 0, 0, .05); }
.pick-item.selected .pick-check { animation: iconPop .22s ease both; }

/* 提示条 */
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 15px 10px 12px;
  transition: opacity .22s ease, transform .24s cubic-bezier(.2, .8, .3, 1);
}
.toast.show { animation: toastIn .24s cubic-bezier(.2, .8, .3, 1); }
.toast-ico {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.toast-success .toast-ico { background: var(--success-bg); color: var(--success); }
.toast-error .toast-ico { background: var(--danger-bg); color: var(--danger); }
.toast-error { border-color: #F2C4C8; }
.toast-msg { line-height: 1.5; }

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

.pick-note { font-size: 12.5px; color: var(--text-3); }
.pick-item.taken .pick-check { opacity: .55; }
.pick-check.locked {
  background: var(--border); border-color: var(--border); color: #fff;
}

/* ============ 骨架屏 ============ */
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton {
  position: relative; overflow: hidden;
  background: var(--fill-2); border-radius: var(--r-sm);
}
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: shimmer 1.15s ease-in-out infinite;
}
.sk-page { display: flex; flex-direction: column; gap: 16px; animation: fadeIn .18s ease both; }
.sk-title { width: 180px; height: 24px; }
.sk-sub { width: 320px; height: 14px; margin-top: -6px; }
.sk-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sk-card { height: 88px; border-radius: var(--r-md); }
.sk-block { height: 300px; border-radius: var(--r-md); }
@media (max-width: 1000px) { .sk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 运营总览内的行级渐入 */
.todo-row, .log-row, .area-row { animation: fadeIn .24s ease both; }
.todo-row:nth-child(n+2), .log-row:nth-child(n+2), .area-row:nth-child(n+2) { animation-delay: .04s; }
.todo-row:nth-child(n+3), .log-row:nth-child(n+3), .area-row:nth-child(n+3) { animation-delay: .08s; }
.todo-row:nth-child(n+4), .log-row:nth-child(n+4), .area-row:nth-child(n+4) { animation-delay: .12s; }

/* ============ 管理后台独立入口 ============ */
.portal-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; margin: -4px 0 20px;
  background: var(--primary-bg); color: var(--primary);
  border-radius: var(--r); font-size: 12.5px; line-height: 1.4;
}
.login-page.portal-admin .logo-mark { background: var(--text-1); }
.portal-switch {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border-light);
  text-align: center; font-size: 12.5px; color: var(--text-3); line-height: 1.7;
}
.portal-switch a { color: var(--primary); text-decoration: none; }
.portal-switch a:hover { text-decoration: underline; }

/* 信息行内的可点击链接（如「所属上级」） */
.info-link {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 0; border: 0; background: none;
  font: inherit; color: var(--primary); cursor: pointer;
  transition: color .15s;
}
.info-link:hover { color: var(--primary-hover); }
.info-link svg { transition: transform .15s; }
.info-link:hover svg { transform: translateX(2px); }

/* ============ 账号固定身份卡（服务商端申请页） ============ */
.id-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 10px;
  background: var(--fill); border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.id-card .id-ico {
  flex: none; width: 32px; height: 32px; border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-bg); color: var(--primary);
}
.id-card .id-body { min-width: 0; flex: 1; }
.id-card .id-name {
  font-size: 14.5px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.id-card .id-code {
  margin-top: 3px; font-size: 12.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.id-card .id-tag {
  flex: none; padding: 2px 8px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-3); line-height: 1.7;
}

/* ============ 小区选择：分页加载与骨架 ============ */
.picker-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; min-height: 0;
}
.picker-foot:empty { display: none; }
.picker-foot .pf-tip { font-size: 12.5px; color: var(--text-3); }
.picker-foot .pf-end { font-size: 12.5px; color: var(--text-4); margin-left: auto; }
.picker-foot .btn { margin-left: auto; }
.pick-item.pick-skeleton {
  height: 62px; border-color: var(--border-light); cursor: default;
}
.pick-item.pick-skeleton:hover { border-color: var(--border-light); background: var(--fill-2); }

/* ============================================================
   v30 新增：区域工作台 / 周边配套 / 户数热力 / 客户池
   ============================================================ */

/* 提示条 */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: var(--r-md); margin-bottom: 16px; font-size: 13px; line-height: 1.65; }
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice-amber { background: var(--warning-bg); color: #A95600; border: 1px solid #FFE1BB; }
.notice-green { background: var(--success-bg); color: #0A7A20; border: 1px solid #C7F0CF; }

.entry-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 1000px) { .entry-list { grid-template-columns: 1fr; } }

.td-loading, .td-empty { text-align: center; padding: 26px; color: var(--text-3); }
.td-error { text-align: center; padding: 26px; color: var(--danger); }

/* 分段控件 */
.seg-group { display: inline-flex; background: var(--fill-2); border-radius: var(--r-sm);
  padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg-group > .seg { display: inline-block; margin: 0; border: 0; background: transparent;
  padding: 5px 12px; border-radius: var(--r-sm); flex: 0 0 auto; height: auto; line-height: 18px;
  font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg-group > .seg:hover { color: var(--text-1); }
/* Arco Tabs capsule：选中项白底深字，不用蓝字 */
.seg-group > .seg.active { background: var(--surface); color: var(--text-1); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }

/* 消费能力指数标签 */
.cci { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 500; background: var(--fill-2); color: var(--text-2); white-space: nowrap; }
.cci-none { color: var(--text-3); }
.cci-low { background: #F2F3F5; color: #6B7280; }
.cci-mid-low { background: var(--primary-bg); color: #0E42D2; }
.cci-mid { background: var(--success-bg); color: #0A7A20; }
.cci-mid-high { background: var(--warning-bg); color: #A95600; }
.cci-high { background: var(--danger-bg); color: #C4291F; }

/* 热力画布 */
.heat-wrap { position: relative; margin-top: 14px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: linear-gradient(180deg, #FBFCFE, #F3F7FD);
  padding: 6px; overflow: hidden; }
.heat-canvas { display: block; width: 100%; cursor: crosshair; }
.heat-legend { position: absolute; right: 14px; bottom: 34px; display: flex; align-items: center;
  gap: 6px; font-size: 11px; color: var(--text-3); background: rgba(255, 255, 255, .92);
  padding: 4px 9px; border-radius: 20px; box-shadow: var(--shadow-1); }
.heat-grad { display: inline-block; width: 78px; height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, #FFF3C4, #FFDF6E, #FFAE1F, #F2542D, #DE2D26); }
/* 消费热度整体压深一档，和户数的明黄区分开 */
.heat-grad.warm { background: linear-gradient(90deg, #FFF7DE, #FFC94A, #FF8A00, #F4501E, #D62828); }
.heat-tip { font-size: 12px; color: var(--text-3); padding: 2px 6px 4px; }

/* 高德底图：容器必须显式高度，否则 Map 初始化会得到 0 高度 */
.heat-ammap { width: 100%; height: 460px; border-radius: var(--r-sm); overflow: hidden; background: #EEF2F8; }
.heat-ammap[hidden], .heat-canvas[hidden] { display: none !important; }
.amap-dot {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  background: #B6BDCC; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
.amap-dot.on {
  width: 12px; height: 12px; background: #165DFF;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(26, 79, 191, .22);
}

.kpi-list { display: flex; flex-direction: column; }
.kpi-row { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--text-2); padding: 9px 0; border-bottom: 1px dashed var(--border-light); }
.kpi-row:last-child { border-bottom: 0; }
.kpi-row b { color: var(--text-1); font-size: 15px; }
.kpi-row b.danger { color: var(--danger); }

/* 小区详情弹窗 */
.cd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.cd-name { font-size: 16px; font-weight: 600; color: var(--text-1); }
.cd-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px;
  overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 9px 14px; font-size: 14px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text-1); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.cd-body { min-height: 160px; }

.pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.mini-title { font-size: 13px; font-weight: 600; color: var(--text-1); margin: 18px 0 6px; }

/* 周边分类卡 */
.near-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.near-cat { display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
  padding: 8px 10px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-md); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.near-cat:hover { border-color: var(--primary-border); }
.near-cat.active { border-color: var(--primary-border); background: var(--primary-bg); }
.nc-name { font-size: 12px; color: var(--text-2); }
.nc-num { font-size: 16px; font-weight: 600; color: var(--text-1); line-height: 1.3; }

.near-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.near-toolbar .search { width: 170px; }
.near-summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 10px; background: var(--fill); border-radius: var(--r); margin-bottom: 8px; font-size: 12px; }
.near-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-size: 12px; color: var(--text-2); padding: 4px 2px 10px; }
.near-list { max-height: 400px; overflow: auto; }
.near-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px;
  border-bottom: 1px solid var(--border-light); }
.near-row:hover { background: var(--fill); }
.near-main { min-width: 0; flex: 1; }
.near-name { font-size: 13px; font-weight: 500; color: var(--text-1);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.near-meta { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.near-addr { font-size: 12px; color: var(--text-3); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-op { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* 户数录入 */
.hh-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.hh-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 8px; align-items: end; }
.hh-f label { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.hh-row .hh-del { padding: 6px 8px; }
.hh-calc { padding: 10px 12px; background: var(--primary-bg); border: 1px solid var(--primary-border);
  border-radius: var(--r); font-size: 13px; color: var(--text-2); margin-top: 10px; line-height: 1.7; }
.hh-calc b { color: var(--primary); font-size: 16px; }

/* 跟进时间线 */
.timeline { display: flex; flex-direction: column; max-height: 220px; overflow: auto; }
.tl-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px;
  padding: 8px 0; border-bottom: 1px dashed var(--border-light); }
.tl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); margin-top: 6px; }
.tl-title { font-size: 12px; color: var(--text-1); }
.tl-detail { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tl-time { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* 辖区选择 */
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scope-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow: auto;
  padding: 8px; border: 1px solid var(--border); border-radius: var(--r); }
.scope-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  padding: 4px 9px; border: 1px solid var(--border); border-radius: 20px; cursor: pointer; }
.scope-item.on { border-color: var(--primary-border); background: var(--primary-bg); color: var(--primary-active); }
.scope-chosen { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; padding-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 3px 9px; border-radius: 20px; background: var(--fill-2); color: var(--text-2); }
.chip-x { border: 0; background: none; cursor: pointer; color: var(--text-3);
  font-size: 13px; line-height: 1; padding: 0 0 0 2px; }
.chip-x:hover { color: var(--danger); }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-text.danger { color: var(--danger); }
.btn-text.danger:hover { background: var(--danger-bg); color: var(--danger); }

/* 网格内小区清单 */
.hc-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-light); }
.hc-main { flex: 1; min-width: 0; }
.hc-name { font-size: 13px; font-weight: 500; color: var(--text-1); }
.hc-num { font-size: 12px; color: var(--text-2); white-space: nowrap; }

@media (max-width: 760px) {
  .near-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .near-row { flex-direction: column; gap: 8px; }
  .near-op { justify-content: flex-start; }
  .near-list { max-height: none; }
  .near-toolbar .search { width: 100%; }
  .hh-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hh-row .hh-del { grid-column: 2; justify-self: start; }
  .form-grid2 { grid-template-columns: 1fr; }
  .tab { padding: 8px 9px; }
  .cd-head { flex-direction: column; gap: 8px; }
  .cd-tags { justify-content: flex-start; }
  /* 图例改为静态右对齐，避免浮在说明文字上把它截断 */
  .heat-legend { position: static; justify-content: flex-end; margin: 8px 4px 0;
    background: transparent; box-shadow: none; padding: 0; }
  .heat-grad { width: 64px; }
  .heat-tip { font-size: 11px; padding: 4px 4px 2px; }
  .heat-ammap { height: 340px; }
}

/* 区域 / 客户池表格：列多，单独定宽度，避免操作列被挤压 */
.tbl-areacom, .tbl-aprov, .tbl-arev, .tbl-prospect { table-layout: fixed; }
.tbl-areacom th:nth-child(1) { width: 40px; }
.tbl-areacom th:nth-child(2) { width: 27%; }
.tbl-areacom th:nth-child(3) { width: 9%; }
.tbl-areacom th:nth-child(4) { width: 11%; }
.tbl-areacom th:nth-child(5) { width: 19%; }
.tbl-areacom th:nth-child(6) { width: 11%; }
.tbl-areacom th:nth-child(7),
.tbl-areacom td.td-op.td-op-wide { width: 196px; }

.tbl-aprov th:nth-child(1) { width: 25%; }
.tbl-aprov th:nth-child(2) { width: 10%; }
.tbl-aprov th:nth-child(3) { width: 13%; }
.tbl-aprov th:nth-child(4) { width: 10%; }
.tbl-aprov th:nth-child(5) { width: 12%; }
.tbl-aprov th:nth-child(6) { width: 9%; }
.tbl-aprov th:nth-child(7),
.tbl-aprov td.td-op.td-op-wide { width: 188px; }

/* 详情入口移到「申请单号」链接上，操作列只留通过/驳回，其他列才放得下 */
.tbl-arev th:nth-child(1) { width: 18%; }
.tbl-arev th:nth-child(2) { width: 17%; }
.tbl-arev th:nth-child(3) { width: 24%; }
.tbl-arev th:nth-child(4) { width: 16%; }
.tbl-arev th:nth-child(5) { width: 10%; }
.tbl-arev th:nth-child(6),
.tbl-arev td.td-op { width: 120px; }
.tbl-arev td.td-op .btn { padding-left: 10px; padding-right: 10px; }

/* 列宽按内容实测分配：电话/服务商/跟进都必须是完整可见的短字段，地址可截断（有 title 提示） */
.tbl-prospect th:nth-child(1) { width: 17%; }
.tbl-prospect th:nth-child(2) { width: 7%; }
.tbl-prospect th:nth-child(3) { width: 13%; }
.tbl-prospect th:nth-child(4) { width: 15%; }
.tbl-prospect th:nth-child(5) { width: 15%; }
.tbl-prospect th:nth-child(6) { width: 11%; }
.tbl-prospect th:nth-child(7) { width: 11%; }
.tbl-prospect th:nth-child(8) { width: 80px; }
.tbl-prospect td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-prospect td.td-main { white-space: normal; }
/* 这三列是短字段，宁可略显紧凑也不能出现省略号 */
.tbl-prospect td:nth-child(3),
.tbl-prospect td:nth-child(7) { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tbl-prospect td:nth-child(5) { font-size: 12.5px; }

/* 列多时允许横向滚动，而不是挤压内容 */
.card-flush > .table-wrap { overflow-x: auto; }

.tbl-heat td, .tbl-heat th { white-space: nowrap; }
