/* 安联后台 — Ant Design 蓝（覆盖一维青绿） */
:root {
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-light: #e6f4ff;
  --primary-active: #0958d9;
  --primary-border: #91caff;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #303133;
  --text-secondary: #606266;
  --muted: #909399;
  --border: #dcdfe6;
  --border-light: #ebeef5;
  --table-head-bg: #fafafa;
  --sidebar-bg: #ffffff;
  --sidebar-width: 200px;
  --sidebar-collapsed: 58px;
  --header-height: 50px;
  --tags-height: 34px;
  --group-width: 240px;
  --success: #67c23a;
  --danger: #f56c6c;
  --warning: #e6a23c;
  --radius: 6px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

body.yiwei-theme {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: var(--text);
  line-height: 1.5715;
  font-size: 14px;
}

body.legacy-theme .app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边栏 ===== */
body.legacy-theme .sidebar-container {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: width 0.2s;
}

.app-wrapper.sidebar-collapsed .sidebar-container {
  width: var(--sidebar-collapsed);
}

.app-wrapper.sidebar-collapsed .logo-text,
.app-wrapper.sidebar-collapsed .nav-group-toggle,
.app-wrapper.sidebar-collapsed .nav-group-body,
.app-wrapper.sidebar-collapsed .sidebar-footer {
  display: none;
}

.app-wrapper.sidebar-collapsed .sidebar-nav {
  padding-top: 4px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--border-light);
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-text strong {
  font-size: 15px;
  color: var(--text);
  line-height: 1.2;
}

.logo-text span {
  font-size: 11px;
  color: var(--muted);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 12px;
}

.nav-group {
  margin-bottom: 2px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 12px);
  margin: 2px 6px 0;
  padding: 0 12px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-group-toggle:hover {
  color: var(--primary);
  background: rgba(0, 187, 153, 0.06);
}

.nav-group.has-active > .nav-group-toggle {
  color: var(--primary);
}

.nav-group-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-arrow {
  width: 8px;
  height: 8px;
  margin-left: 8px;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  opacity: 0.55;
}

.nav-group.expanded > .nav-group-toggle .nav-group-arrow {
  transform: rotate(45deg);
  margin-top: -4px;
}

.nav-group-body {
  display: none;
  padding: 2px 0 4px;
}

.nav-group.expanded > .nav-group-body {
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  width: calc(100% - 12px);
  margin: 1px 6px;
  padding: 0 12px 0 28px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  border-radius: var(--radius);
  transition: all 0.2s;
  position: relative;
}

.nav-item:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 500;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border-light);
}

.sidebar-token-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.sidebar-token-row {
  display: flex;
  gap: 4px;
}

.sidebar-token-row input {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  height: 28px;
}

/* ===== 主区域 ===== */
body.legacy-theme .main-container {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s;
}

body.legacy-theme .app-wrapper.sidebar-collapsed .main-container {
  margin-left: var(--sidebar-collapsed);
}

.fixed-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--card);
  box-shadow: var(--shadow);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--border-light);
}

.hamburger {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px;
  color: var(--text);
}

.hamburger:hover {
  background: var(--bg);
}

.navbar-breadcrumb {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.navbar-breadcrumb #pageTitle {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

.navbar-breadcrumb .page-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.corp-selector select {
  height: 32px;
  min-width: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.corp-selector select:focus {
  outline: none;
  border-color: var(--primary);
}

/* 标签页导航 */
.tags-view {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--tags-height);
  padding: 0 12px;
  background: var(--card);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
}

.tags-view-item {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.tags-view-item:hover {
  color: var(--primary);
}

.tags-view-item.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

body.legacy-theme .app-main {
  flex: 1;
  padding: 12px 16px 20px;
  min-height: calc(100vh - var(--header-height) - var(--tags-height));
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.app-scrollbar > .panel {
  padding: 20px 24px;
  width: 100%;
}

.app-scrollbar > .panel.panel-yiwei {
  padding: 0;
}

/* 工具栏 */
.page-toolbar,
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right,
.action-bar-left,
.action-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stats {
  color: var(--text-secondary);
  font-size: 13px;
}

.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.inline-label select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 32px;
}

.stat-num {
  color: var(--primary);
  font-weight: 600;
}

.page-hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-default {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.btn-default:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  background: var(--primary-light);
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--primary);
  padding: 0 4px;
  height: auto;
}

.btn-sm {
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-icon {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius);
}

.btn-icon:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.action-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
}

.action-link.delete-corp {
  color: #f56c6c;
}

.action-link.delete-corp:hover {
  color: #dd3a3a;
}

.search-input {
  width: 200px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* SCRM 分栏布局（客户列表同款） */
.content-layout,
.scrm-split {
  display: flex;
  min-height: calc(100vh - 180px);
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.group-panel,
.scrm-staff-panel {
  width: var(--group-width);
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  background: #fafbfc;
}

.group-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
}

.group-search {
  padding: 10px 12px;
}

.group-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

.group-search input:focus {
  outline: none;
  border-color: var(--primary);
}

.group-list,
.staff-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 12px;
  max-height: none;
}

.hidden-panel-legacy { display: none !important; }

.auto-threshold-rows .auto-threshold-row { margin-top: 8px; }

.group-panel-foot.hidden-select {
  display: none;
}

.content-main,
.scrm-main-panel {
  flex: 1;
  min-width: 0;
  padding: 16px;
  background: var(--card);
  overflow-y: auto;
}

.filter-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.filter-card-title {
  padding: 12px 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

.filter-card .form-grid {
  padding: 16px;
}

/* 员工列表项 */
.staff-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: var(--radius);
  cursor: pointer;
}

.staff-list label:hover {
  background: var(--primary-light);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 500;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-id-hint {
  display: block;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrm-customer-main {
  padding: 12px 16px 16px;
}

.customer-filter-bar {
  background: #fafbfc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-input {
  width: 180px;
}

.filter-select {
  min-width: 160px;
  max-width: 220px;
  height: 80px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
}

.tag-filter-btn em {
  font-style: normal;
  color: var(--primary);
  margin-left: 4px;
}

.filter-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.scrm-customer-page {
  padding: 0;
}

.yiwei-customer-page {
  background: var(--card);
}

.yiwei-input {
  width: 100%;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
}

.yiwei-input:focus {
  outline: none;
  border-color: var(--primary);
}

.yiwei-select {
  appearance: auto;
  cursor: pointer;
}

.customer-filter-card {
  background: var(--card);
  border: none;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  padding: 16px 20px 14px;
  margin-bottom: 0;
}

.filter-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.filter-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  color: var(--primary-hover);
}

.link-btn-muted {
  color: var(--muted);
  margin-left: 4px;
}

.link-btn-muted:hover {
  color: var(--primary);
}

.filter-grid.yiwei-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 24px;
}

.filter-field label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-range input {
  flex: 1;
  min-width: 0;
}

.range-sep {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
}

.yiwei-tag-select {
  display: flex;
  align-items: center;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 11px;
  background: #fff;
  gap: 12px;
}

.yiwei-tag-value {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yiwei-tag-value.active {
  color: var(--primary);
}

.yiwei-tag-link {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.yiwei-tag-link:hover {
  color: var(--primary-hover);
}

.filter-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.customer-list-summary {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.customer-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border-light);
}

.btn-batch {
  min-width: 100px;
  height: 32px;
  font-size: 14px;
}

.btn-batch .caret {
  font-size: 10px;
  margin-left: 2px;
}

.sync-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.sync-link-btn:hover {
  color: var(--primary-hover);
}

.icon-sync {
  flex-shrink: 0;
}

.customer-table-section {
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: var(--card);
}

.yiwei-table thead th {
  background: var(--table-head-bg);
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.yiwei-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}

.yiwei-table tbody tr:hover {
  background: #fafcff;
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar.yiwei-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}

.customer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.customer-name-stack {
  min-width: 0;
  line-height: 1.4;
}

.customer-remark {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.customer-nickname {
  display: block;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
  margin-top: 2px;
}

.copyable-customer-text {
  position: relative;
  display: inline-block;
  max-width: 100%;
  cursor: pointer;
}

.copyable-customer-text:hover {
  color: #1677ff;
}

.customer-copy-tooltip {
  position: fixed;
  z-index: 5000;
  max-width: 520px;
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.customer-copy-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(17, 24, 39, 0.92);
}

.customer-copy-success {
  position: fixed;
  z-index: 5002;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.9);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  animation: customer-copy-success-fade 1.2s ease forwards;
}

@keyframes customer-copy-success-fade {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  15%,
  75% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  line-height: 20px;
  border-radius: 2px;
  font-size: 12px;
}

.status-badge.normal {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
}

.tag-status-success {
  color: #23c378 !important;
  border: 1px solid #aff0b5 !important;
  background-color: #e8ffea !important;
  border-radius: 2px !important;
  height: 20px !important;
  line-height: 20px !important;
  padding: 0 8px !important;
}

.tag-status-warning {
  color: #ff7d00 !important;
  border: 1px solid #ffe4ba !important;
  border-radius: 2px !important;
  background-color: #fff7e8 !important;
  height: 20px !important;
  line-height: 20px !important;
  padding: 0 8px !important;
}

.tag-status-danger {
  color: #f76560 !important;
  border: 1px solid #fdcdc5 !important;
  border-radius: 2px !important;
  background-color: #ffece8 !important;
  height: 20px !important;
  line-height: 20px !important;
  padding: 0 8px !important;
}

.tag-chip.outline {
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0 8px;
  line-height: 22px;
  font-size: 12px;
  border-radius: 2px;
}

.col-actions {
  width: 72px;
}

.action-links-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.action-links-stack .action-link {
  display: block;
  padding: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--primary);
}

.action-links-stack .action-link:hover {
  color: var(--primary-hover);
}

.row-more-menu {
  position: fixed;
  z-index: 2000;
  min-width: 120px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  padding: 4px 0;
}

.row-more-menu button {
  display: block;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.row-more-menu button:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.filter-tag-mode-row {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.radio-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.yiwei-pagination {
  padding: 12px 20px;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-light);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pagination-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.page-total {
  font-size: 14px;
  color: var(--text-secondary);
}

.page-size-select {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  padding: 0 8px;
  color: var(--text-secondary);
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-num {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.page-num:hover:not(:disabled):not(.active) {
  color: var(--primary);
  border-color: var(--primary);
}

.page-num.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-num:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--muted);
  padding: 0 4px;
}

.pagination-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.page-jump-input {
  width: 50px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 14px;
}

.textarea-block {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 11px;
  font-size: 14px;
  resize: vertical;
}

.custom-filter-body .form-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.custom-filter-dialog {
  width: min(640px, 94vw);
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
}

.custom-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 20px;
  border-bottom: 1px solid #e5eaf0;
}

.custom-filter-layout {
  display: grid;
  grid-template-columns: 1fr 190px;
  min-height: 310px;
}

.custom-filter-left {
  padding: 18px 20px;
}

.custom-filter-right {
  padding: 18px 18px;
  border-left: 1px solid #e5eaf0;
}

.custom-filter-section-title {
  margin-bottom: 10px;
  color: #444a59;
  font-size: 13px;
  line-height: 20px;
}

.custom-filter-main-title {
  margin-bottom: 12px;
  color: #112233;
  font-size: 13px;
  line-height: 20px;
}

.custom-filter-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 12px;
  column-gap: 12px;
}

.custom-filter-field-grid-one {
  grid-template-columns: 1fr;
}

.custom-filter-check-item.el-checkbox {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: auto;
  margin-right: 0;
  color: #112233;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  white-space: normal;
}

.custom-filter-check-item .el-checkbox__label {
  padding-left: 6px;
  font-size: 13px;
  line-height: 20px;
  color: #112233;
}

.custom-filter-check-item.is-checked .el-checkbox__label,
.custom-filter-check-item .el-checkbox__input.is-checked + .el-checkbox__label {
  color: var(--el-color-primary, #409eff);
  font-weight: 500;
}

.custom-filter-selected-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-filter-selected-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #112233;
  font-size: 13px;
  line-height: 20px;
}

.custom-filter-drag {
  color: #a4afbe;
  letter-spacing: -2px;
  cursor: grab;
}

.custom-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid #e5eaf0;
}

.custom-filter-apply-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #112233;
  font-size: 13px;
}

.customer-list-table th.el-table__cell,
.el-table__inner-wrapper th.el-table__cell,
.table-wrapper th.el-table__cell {
  position: relative;
}

#panel-batch-tag .customer-list-table .el-table__header-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#panel-batch-tag .customer-list-table .el-table__header-wrapper::-webkit-scrollbar {
  height: 0;
  display: none;
}

#panel-batch-tag .customer-list-table .el-table__body-wrapper {
  overflow: auto !important;
}

#panel-batch-tag .customer-list-table .el-table__header,
#panel-batch-tag .customer-list-table .el-table__body {
  table-layout: fixed;
}

#panel-batch-tag .customer-list-table .customer-fixed-left,
#panel-batch-tag .customer-list-table .customer-fixed-right,
#panel-batch-tag .customer-list-table .el-table-fixed-column--left,
#panel-batch-tag .customer-list-table .el-table-fixed-column--right {
  position: sticky !important;
  z-index: 3;
  background: #fff;
}

#panel-batch-tag .customer-list-table th.customer-fixed-left,
#panel-batch-tag .customer-list-table th.customer-fixed-right,
#panel-batch-tag .customer-list-table th.el-table-fixed-column--left,
#panel-batch-tag .customer-list-table th.el-table-fixed-column--right {
  z-index: 5;
  background: rgb(242, 245, 249) !important;
}

#panel-batch-tag .customer-list-table .customer-fixed-left-0,
#panel-batch-tag .customer-list-table .el-table-fixed-column--left.is-first-column.customer-fixed-left-0 {
  left: 0;
}

#panel-batch-tag .customer-list-table .customer-fixed-left-1,
#panel-batch-tag .customer-list-table .el-table-fixed-column--left.customer-fixed-left-1 {
  left: var(--customer-fixed-left-1, 55px);
}

#panel-batch-tag .customer-list-table .customer-fixed-left-2,
#panel-batch-tag .customer-list-table .el-table-fixed-column--left.is-last-column.customer-fixed-left-2 {
  left: var(--customer-fixed-left-2, 295px);
  box-shadow: 6px 0 10px -8px rgba(0, 0, 0, 0.28);
}

#panel-batch-tag .customer-list-table .customer-fixed-right,
#panel-batch-tag .customer-list-table .el-table-fixed-column--right {
  right: 0 !important;
  width: var(--customer-col-actions-width, 126px);
  min-width: var(--customer-col-actions-width, 126px);
  max-width: var(--customer-col-actions-width, 126px);
  box-shadow: -6px 0 10px -8px rgba(0, 0, 0, 0.28);
}

/* 客户列表：筛选变高时表格吃剩余高度，底部分页始终可见 */
.main-container:has(#panel-batch-tag.active) {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-container:has(#panel-batch-tag.active) .app-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-container:has(#panel-batch-tag.active) .app-scrollbar {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#panel-batch-tag.panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#panel-batch-tag .customer-list.app-container-grow {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#panel-batch-tag .customer-list .yw-header {
  flex-shrink: 0;
}

#panel-batch-tag .customer-list .yw-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#panel-batch-tag .customer-list .search-content {
  flex: 0 1 auto;
  max-height: 42vh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* 客户列表单元格排版（对齐一维助手 pointsDialog 样式，scoped 规则在此补全） */
#panel-batch-tag .customer-list-table {
  flex: 1 1 0%;
  min-height: 0;
  height: calc(100vh - 280px);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#panel-batch-tag .customer-list-table .table-box {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#panel-batch-tag .customer-list-table .mar-bt12,
#panel-batch-tag .customer-list-table .customer-sync-progress,
#panel-batch-tag .customer-list-table .distribute-active-bar,
#panel-batch-tag .customer-list-table .bottom-pag {
  flex-shrink: 0;
}

#panel-batch-tag .customer-list-table .table-wrapper {
  min-height: 0;
  overflow: hidden;
}

#panel-batch-tag .customer-list-table .table-wrapper .my-table {
  inset: 0;
  width: 100%;
  height: 100% !important;
}

#panel-batch-tag .customer-list-table .pagination-block {
  height: auto;
  min-height: 48px;
}

#panel-batch-tag .customer-list-table .bottom-pag .el-pagination__rightwrapper {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 8px;
}

#panel-batch-tag .customer-list-table .el-table__body td.el-table__cell {
  padding: 0;
  height: 54px;
  z-index: unset;
}

#panel-batch-tag .customer-list-table .el-table__body-wrapper tr td.el-table-fixed-column--left {
  z-index: calc(var(--el-table-index, 0) + 1);
}

#panel-batch-tag .customer-list-table .table-edit-col .cell {
  padding: 0 !important;
}

#panel-batch-tag .customer-list-table .table-edit-item {
  height: 54px;
  padding-left: 12px;
}

#panel-batch-tag .customer-list-table .table-edit-item-noborder {
  height: 100%;
}

#panel-batch-tag .customer-list-table .front-icon {
  width: 32px;
  height: 32px;
  background-color: var(--el-brand-color-6, #1677ff);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  flex-shrink: 0;
}

#panel-batch-tag .customer-list-table .cus-name {
  height: 18px;
  line-height: 18px;
  text-align: left;
}

#panel-batch-tag .customer-list-table .cus-name-tips {
  margin-top: 4px;
  height: 18px;
  line-height: 18px;
  font-size: 12px;
  text-align: left;
  color: #737b89;
  display: flex;
}

/* 「添加员工」姓名标签：自适应吃满整列，超长名字顶到列右边界再省略（短名字保持紧凑） */
#panel-batch-tag .customer-list-table [data-col="staff"] .cell > .flex {
  min-width: 0;
  max-width: 100%;
}
#panel-batch-tag .customer-list-table [data-col="staff"] .el-tag {
  min-width: 0;
}
#panel-batch-tag .customer-list-table [data-col="staff"] .el-tag__content {
  min-width: 0;
  max-width: 100%;
}
#panel-batch-tag .customer-list-table [data-col="staff"] .el-tag__content > .flex {
  min-width: 0;
  max-width: 100%;
}
#panel-batch-tag .customer-list-table .add-name {
  color: var(--el-text-color-7, #444a59);
  margin-left: 5px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

#panel-batch-tag .customer-list-table [data-col="name"] .cell {
  overflow: hidden;
}

#panel-batch-tag .customer-list-table [data-col="name"] .table-edit-item-noborder > .mar-lf10 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

#panel-batch-tag .customer-list-table .el-table__row:hover .customer-fixed-left,
#panel-batch-tag .customer-list-table .el-table__row:hover .customer-fixed-right,
#panel-batch-tag .customer-list-table .el-table__row:hover .el-table-fixed-column--left,
#panel-batch-tag .customer-list-table .el-table__row:hover .el-table-fixed-column--right {
  background: #f5f7fa;
}

#panel-batch-tag .customer-list .search-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  border-bottom: 1px solid var(--el-border-color-light, #ebeef5);
}

#panel-batch-tag .customer-list .search-content .search-item {
  display: flex;
  align-items: center;
  padding-right: 12px;
  padding-bottom: 12px;
  box-sizing: border-box;
}

#panel-batch-tag .customer-list .search-content .search-item.hidden {
  display: none !important;
}

#panel-batch-tag .customer-list .search-content .search-label {
  width: 84px;
  flex-shrink: 0;
  font-size: 14px;
  text-align: end;
  color: var(--el-text-color-6, #737b89);
}

#panel-batch-tag .customer-list .search-content .search-value {
  width: 272px;
  margin-left: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
}

#panel-batch-tag .customer-list .search-content .search-value .el-input__inner,
#panel-batch-tag .customer-list .search-content .search-value select,
#panel-batch-tag .customer-list .search-content .search-value input:not(.el-range-input) {
  width: 100%;
  box-sizing: border-box;
}

/* 组内多标签：与「客户标签」同款并排，单行不换行 */
#panel-batch-tag .customer-list .search-content .search-item[data-filter-field="group_multi_tags"] {
  flex-wrap: nowrap;
  align-items: center;
}

/* 标签组 / 比较方式已改为 el-select（宽度给外壳，高度/边框由 .el-select__wrapper 提供，和上面筛选一致） */
#panel-batch-tag .customer-list .search-content .search-item[data-filter-field="group_multi_tags"] .group-multi-tag-group {
  width: 174px;
  margin-left: 8px;
  flex-shrink: 0;
}

#panel-batch-tag .customer-list .search-content .search-item[data-filter-field="group_multi_tags"] .group-multi-tag-op {
  width: 92px;
  margin-left: 8px;
  flex-shrink: 0;
}

#panel-batch-tag .customer-list .search-content .search-item[data-filter-field="group_multi_tags"] .group-multi-tag-min {
  width: 64px;
  height: 32px;
  margin-left: 8px;
  padding: 0 6px;
  box-sizing: border-box;
  text-align: center;
  flex-shrink: 0;
}

#panel-batch-tag .customer-list .search-content .search-item[data-filter-field="group_multi_tags"] .group-multi-tag-unit {
  margin-left: 6px;
  font-size: 13px;
  color: var(--el-text-color-6, #737b89);
  line-height: 32px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 群列表 / 群成员：与客户列表同款筛选区布局 */
#panel-group-list .customer-group-list .search-content,
#panel-group-member .group-member .search-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  border-bottom: 1px solid var(--el-border-color-light, #ebeef5);
}

#panel-group-list .customer-group-list .search-content .search-item,
#panel-group-member .group-member .search-content .search-item {
  display: flex;
  align-items: center;
  padding-right: 12px;
  padding-bottom: 12px;
  box-sizing: border-box;
}

#panel-group-list .customer-group-list .search-content .search-label,
#panel-group-member .group-member .search-content .search-label {
  width: 84px;
  flex-shrink: 0;
  font-size: 14px;
  text-align: end;
  color: var(--el-text-color-6, #737b89);
}

#panel-group-list .customer-group-list .search-content .search-value,
#panel-group-member .group-member .search-content .search-value {
  width: 272px;
  margin-left: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
}

#panel-group-list .customer-group-list .search-content .search-value .el-input__inner,
#panel-group-list .customer-group-list .search-content .search-value input:not(.el-range-input),
#panel-group-member .group-member .search-content .search-value .el-input__inner,
#panel-group-member .group-member .search-content .search-value input:not(.el-range-input) {
  width: 100%;
  box-sizing: border-box;
}

#panel-group-member .group-member .search-content .search-item-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  padding-bottom: 12px;
  align-items: center;
}

#panel-group-list .customer-group-list .search-content .search-value-narrow {
  width: 90px;
  margin-left: 0;
}

#panel-group-list .customer-group-list .search-content .search-item-split {
  display: flex;
  align-items: center;
  gap: 8px;
}

#panel-group-list .group-list-body {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  min-height: 0;
}

#panel-group-list .group-list-content {
  display: flex;
  flex: 1;
  min-height: 0;
  margin-top: 4px;
}

#panel-group-list .yw-group-label-tree {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid #e5eaf0;
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#panel-group-list .yw-group-label-tree .field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px;
  font-size: 14px;
  font-weight: 500;
  color: #112233;
}

#panel-group-list .yw-group-label-tree .field-input {
  padding: 0 16px 8px;
}

#panel-group-list .yw-group-label-tree .field-input .el-input__inner {
  width: 100%;
  box-sizing: border-box;
}

#panel-group-list .gl-tag-tree {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow: auto;
  flex: 1;
}

#panel-group-list .gl-tag-tree li {
  padding: 8px 16px 8px 24px;
  font-size: 13px;
  color: #112233;
  cursor: pointer;
  position: relative;
}

#panel-group-list .gl-tag-tree li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #c0c4cc;
  transform: translateY(-50%);
}

#panel-group-list .gl-tag-tree li.is-current {
  color: #1677ff;
  background: #eef3ff;
}

#panel-group-list .group-list-table-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  min-height: 0;
}

#panel-group-list .group-list-table-area .customer-list-table {
  flex: 1;
  min-height: 0;
}

#panel-group-list .gl-tag-tree li.gl-tag-group {
  font-weight: 500;
  color: #737b89;
  cursor: default;
  padding-left: 12px;
  font-size: 12px;
  margin-top: 8px;
}

#panel-group-list .gl-tag-tree li.gl-tag-item {
  padding-left: 24px;
}

#panel-group-list .gl-tag-tree li.gl-tag-group::before {
  display: none;
}

#panel-group-list .tag-status-success .el-tag__content {
  color: #23c378;
}

.yw-select-popper-top {
  overflow: visible;
}

.yw-select-popper-top::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
  border-right: 1px solid #dcdfe6;
  border-bottom: 1px solid #dcdfe6;
}

.yw-select-popper-top .el-select-dropdown {
  position: relative;
  z-index: 1;
}

@media (max-width: 1100px) {
  .filter-grid.yiwei-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.scrm-customer-page .customer-filter-bar {
  margin-bottom: 12px;
}

.filter-staff {
  min-width: 160px;
}

.customer-toolbar {
  margin-bottom: 12px;
}

.customer-table-section .table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pagination-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-select-list .staff-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 2px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.staff-select-list .staff-item:hover,
.staff-select-list .staff-item.active {
  background: var(--primary-light);
}

.staff-select-list .staff-item.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.staff-cell strong {
  display: block;
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-avatar.sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-chip {
  display: inline-block;
  padding: 0 6px;
  font-size: 11px;
  line-height: 20px;
  border-radius: 3px;
  background: var(--primary-light);
  color: var(--primary-active);
  border: 1px solid #c8efe6;
}

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-box {
  position: relative;
  width: min(560px, 92vw);
  max-height: 80vh;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.modal-box.modal-sm {
  width: min(420px, 92vw);
}

.modal-box.modal-lg {
  width: min(720px, 94vw);
}

.modal-box.license-modal-box {
  width: min(860px, 96vw);
  max-height: 90vh;
}

.modal-box.license-modal-box .modal-body {
  flex: 1;
  min-height: 0;
}

.license-buyer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.license-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 12px;
  background: #f7f9fb;
  border-radius: 8px;
  font-size: 13px;
}

.license-staff-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-height: 180px;
  overflow: auto;
}

.modal-detail {
  margin: 0;
  max-height: 50vh;
  overflow: auto;
}

/* 客户详情抽屉 */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 2500;
}

.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 92vw);
  background: var(--card);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.drawer-name {
  font-size: 16px;
}

.customer-avatar.lg,
.user-avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.customer-cell.lg {
  gap: 12px;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  padding: 0 8px;
}

.drawer-tab {
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.drawer-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 500;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.drawer-panel.hidden {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.detail-item label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-item span {
  font-size: 14px;
  word-break: break-all;
}

.drawer-panel.group-drawer-panel {
  width: 640px;
  max-width: 92vw;
}

.group-drawer-members {
  overflow: auto;
  max-height: calc(100vh - 180px);
}

.group-drawer-members .cell {
  padding: 8px 12px;
  font-size: 13px;
}

/* ===== 群详情全页 ===== */
#panel-group-detail .customer-detail {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 48px);
  background: #fff;
}

#panel-group-detail .group-detail-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-bottom: 1px solid #e5eaf0;
  flex-shrink: 0;
}

#panel-group-detail .group-detail-back-wrap {
  position: absolute;
  left: 20px;
}

#panel-group-detail .title-n {
  font-size: 16px;
  font-weight: 500;
  color: #112233;
}

#panel-group-detail .detail-content {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#panel-group-detail .content-left {
  flex: 1;
  min-width: 0;
  padding: 20px 24px;
  overflow: auto;
}

#panel-group-detail .content-right {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid #e5eaf0;
  background: #f7f9fb;
  overflow: auto;
}

#panel-group-detail .content-info {
  display: flex;
  align-items: flex-start;
}

#panel-group-detail .group-detail-icon {
  flex-shrink: 0;
}

#panel-group-detail .content-info .name {
  font-size: 18px;
  font-weight: 500;
  color: #112233;
}

#panel-group-detail .group-detail-meta-row {
  font-size: 13px;
  color: #737b89;
}

#panel-group-detail .title-border {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: #d8dde6;
  vertical-align: middle;
}

#panel-group-detail .content-info-details {
  padding-left: 64px;
}

#panel-group-detail .info-label-name {
  width: 72px;
  flex-shrink: 0;
  font-size: 13px;
  color: #737b89;
  line-height: 30px;
}

#panel-group-detail .info-label-value {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #112233;
}

#panel-group-detail .info-details {
  margin-top: 12px;
  width: 100%;
}

#panel-group-detail .info-details-title {
  font-size: 13px;
  color: #737b89;
  margin-bottom: 4px;
}

#panel-group-detail .info-details-conetnt {
  font-size: 13px;
  color: #112233;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

#panel-group-detail .group-detail-notice {
  max-height: 200px;
  overflow: auto;
}

#panel-group-detail .divider {
  height: 1px;
  background: #e5eaf0;
}

#panel-group-detail .form-base {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

#panel-group-detail .form-base-border {
  width: 3px;
  height: 14px;
  background: #1677ff;
  border-radius: 2px;
}

#panel-group-detail .form-base-text {
  font-size: 14px;
  font-weight: 500;
  color: #112233;
}

#panel-group-detail .group-detail-member-bar {
  align-items: center;
}

#panel-group-detail .group-detail-member-filters {
  gap: 12px;
}

#panel-group-detail .group-detail-type-select {
  width: 120px;
}

#panel-group-detail .group-detail-member-summary {
  color: #737b89;
}

#panel-group-detail .gd-th {
  background: #f2f5f9 !important;
  font-size: 13px;
  color: #737b89;
}

#panel-group-detail .group-activity {
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#panel-group-detail .group-activity-actions {
  display: flex;
  gap: 8px;
}

#panel-group-detail .record-tabs {
  margin-top: 12px;
}

#panel-group-detail .group-activity-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #a8abb2;
  padding: 40px 0;
}

#panel-group-detail .empty-illustration {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

#panel-group-detail .empty-text {
  font-size: 14px;
}

#panel-group-detail [data-copy-chat-id] {
  cursor: pointer;
}

#panel-group-detail [data-copy-chat-id]:hover {
  color: #1677ff;
}

/* ===== 客户详情全页 ===== */
#panel-customer-detail .group-detail-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-bottom: 1px solid #e5eaf0;
  flex-shrink: 0;
}

#panel-customer-detail .group-detail-back-wrap {
  position: absolute;
  left: 20px;
}

#panel-customer-detail .title-n {
  font-size: 16px;
  font-weight: 500;
  color: #112233;
}

#panel-customer-detail .form-base {
  display: flex;
  align-items: center;
}

#panel-customer-detail .form-base-border {
  width: 3px;
  height: 14px;
  background: #1677ff;
  border-radius: 2px;
}

#panel-customer-detail .form-base-text {
  font-size: 14px;
  font-weight: 500;
  color: #112233;
}

#panel-customer-detail .title-border {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: #e5eaf0;
  vertical-align: middle;
}

#panel-customer-detail .group-activity {
  padding: 16px;
}

#panel-customer-detail .group-activity-actions {
  display: flex;
  gap: 8px;
}

#panel-customer-detail .record-tabs {
  margin-top: 12px;
}

#panel-customer-detail .record-tabs .el-tabs__item {
  cursor: pointer;
}

#panel-customer-detail .group-activity-empty {
  padding: 48px 0;
  text-align: center;
  color: #c9cdd4;
}

#panel-customer-detail .customer-detail-page,
#panel-customer-detail .customer-detail-page .detail-content {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 48px);
  background: #fff;
}

#panel-customer-detail .customer-detail-staff-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid #e5eaf0;
  min-height: 48px;
  flex-shrink: 0;
}

#panel-customer-detail .customer-detail-staff-count {
  font-size: 14px;
  color: #112233;
  white-space: nowrap;
}

#panel-customer-detail .customer-detail-staff-tabs {
  flex: 1;
  min-width: 0;
}

#panel-customer-detail .customer-detail-staff-tabs .el-tabs__item {
  cursor: pointer;
  max-width: 140px;
}

#panel-customer-detail .customer-detail-content {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#panel-customer-detail .content-left {
  flex: 1;
  min-width: 0;
  padding: 20px 24px;
  overflow: auto;
}

#panel-customer-detail .content-right {
  width: 360px;
  flex-shrink: 0;
  border-left: 1px solid #e5eaf0;
  background: #f7f9fb;
  overflow: auto;
}

#panel-customer-detail .content-info {
  display: flex;
  align-items: flex-start;
}

#panel-customer-detail .customer-detail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: cover;
}

#panel-customer-detail .content-info .name {
  font-size: 16px;
  font-weight: 500;
  color: #112233;
}

#panel-customer-detail .customer-detail-meta-row {
  font-size: 13px;
  color: #737b89;
}

#panel-customer-detail .customer-detail-tags-block {
  margin-top: 20px;
}

#panel-customer-detail .customer-detail-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

#panel-customer-detail .customer-detail-tag {
  margin: 0;
}

#panel-customer-detail .customer-detail-add-tag {
  height: 28px;
}

#panel-customer-detail .customer-detail-remarks {
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid #e5eaf0;
}

#panel-customer-detail .customer-detail-remark-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 24px;
}

#panel-customer-detail .customer-detail-remark-item {
  font-size: 13px;
}

#panel-customer-detail .remark-label {
  display: block;
  color: #737b89;
  margin-bottom: 4px;
}

#panel-customer-detail .remark-value {
  color: #112233;
  word-break: break-all;
}

#panel-customer-detail .customer-detail-subtabs {
  margin-top: 16px;
}

#panel-customer-detail .customer-detail-subtabs .el-tabs__item {
  cursor: pointer;
  padding: 0 16px;
  height: 40px;
  line-height: 40px;
}

#panel-customer-detail .customer-detail-panel {
  margin-top: 8px;
}

#panel-customer-detail .customer-detail-custom-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

#panel-customer-detail .customer-detail-field {
  width: 180px;
}

#panel-customer-detail .customer-detail-field-label {
  font-size: 13px;
  color: #737b89;
  margin-bottom: 4px;
}

#panel-customer-detail .customer-detail-field-value {
  font-size: 13px;
  color: #112233;
}

#panel-customer-detail .cd-th {
  background: #f2f5f9 !important;
  font-size: 13px;
  color: #737b89;
}

#panel-customer-detail .customer-detail-empty-table {
  padding: 32px 0;
  text-align: center;
  color: #c9cdd4;
}

#panel-customer-detail .customer-detail-group-link {
  border: none;
  background: none;
  color: #1677ff;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}

#panel-customer-detail .customer-detail-activity.records {
  padding: 8px 0 16px;
}

#panel-customer-detail .record-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #e5eaf0;
}

#panel-customer-detail .record-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1677ff;
  margin-top: 6px;
  flex-shrink: 0;
}

#panel-customer-detail .record-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #112233;
}

#panel-customer-detail .record-item-time {
  font-size: 12px;
  color: #737b89;
  white-space: nowrap;
}

#panel-customer-detail .record-item-row {
  margin-top: 6px;
  font-size: 13px;
}

#panel-customer-detail .content-name {
  width: 72px;
  flex-shrink: 0;
  color: #737b89;
}

#panel-customer-detail .content-value-text {
  color: #112233;
  word-break: break-all;
}

#panel-customer-detail .record-load-more {
  text-align: center;
  padding: 16px 0 8px;
  font-size: 12px;
  color: #c9cdd4;
}

#panel-customer-detail .customer-detail-copy-id:hover {
  color: #1677ff;
}

.detail-item-full {
  grid-column: 1 / -1;
}

.drawer-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

.tag-chips.lg {
  gap: 8px;
}

.follow-record-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.follow-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

/* 批量操作下拉 */
.batch-dropdown {
  position: relative;
}

.batch-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 50;
  padding: 4px 0;
}

.batch-dropdown-menu button {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}

.batch-dropdown-menu button:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.batch-submenu {
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
  padding-top: 4px;
}
.batch-submenu-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}
.batch-submenu-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.batch-submenu-body button {
  font-size: 13px;
  padding: 6px 14px 6px 22px;
}

.stat-range-group {
  display: inline-flex;
}
.stat-range-group .el-radio-button__inner {
  display: inline-block;
  padding: 0 12px;
  height: 32px;
  line-height: 30px;
  border: 1px solid #dcdfe6;
  font-size: 13px;
  color: #112233;
  cursor: pointer;
  user-select: none;
}
.stat-range-group .el-radio-button:first-child .el-radio-button__inner {
  border-radius: 2px 0 0 2px;
}
.stat-range-group .el-radio-button:last-child .el-radio-button__inner {
  border-radius: 0 2px 2px 0;
  border-left: none;
}
.stat-range-group .el-radio-button.is-active .el-radio-button__inner {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}
.stat-range-group .el-radio-button__original-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.advanced-filter {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

.filter-select-sm {
  min-width: 120px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 8px;
}

.customer-table tbody tr.customer-row:hover {
  background: #fafbfc;
}

.col-actions {
  width: 72px;
}

.hidden-col {
  display: none !important;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.checkbox-inline {
  font-size: 13px;
  gap: 4px;
}

.cell-ellipsis {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dashboard-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shortcut-btn {
  min-width: 120px;
}

.tag-lib-groups {
  display: grid;
  gap: 12px;
}

.tag-lib-group {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.tag-lib-group h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.filter-select-inline {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.qr-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--border-light);
  border-radius: 4px;
}

@media (max-width: 960px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* 卡片 */
.content-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.card-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.card-body {
  padding: 16px;
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hint {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-full {
  grid-column: 1 / -1;
}

.form-row label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.form-row input,
.form-row select {
  height: 32px;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row textarea {
  padding: 8px 11px;
  resize: vertical;
}

.checkbox-row label,
.inline-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.radio-group {
  display: flex;
  gap: 16px;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-inline .form-row {
  min-width: 200px;
}

/* 表格 */
.table-section {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.table-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.table-section-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.table-wrap {
  overflow-x: auto;
}

/* 一维 .yw-container 默认 100vh，叠在顶栏下会被 app-main 裁掉底部。
   客户列表自己锁内表滚动，其余页按内容在 app-scrollbar 里滚到底。 */
.main-container:has(.panel-yiwei.active:not(#panel-batch-tag)) {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-container:has(.panel-yiwei.active:not(#panel-batch-tag)) .antd-topbar {
  flex-shrink: 0;
}

.main-container:has(.panel-yiwei.active:not(#panel-batch-tag)) .app-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.main-container:has(.panel-yiwei.active:not(#panel-batch-tag)) .app-scrollbar {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.panel-yiwei.active:not(#panel-batch-tag) {
  flex: 0 0 auto;
  overflow: visible;
}

/* 长列表/表单页：按内容滚，最后一行和分页能露出来 */
.panel-yiwei:not(#panel-batch-tag):not(#panel-group-detail):not(#panel-customer-detail) .yw-container {
  height: auto;
  max-height: none;
  flex-grow: 0;
  overflow: visible;
  padding-bottom: 48px;
}

/* yw-container 改成 height:auto 之后，Element 表默认
   inner-wrapper=height:100% + body-wrapper=flex:1/overflow:hidden
   会把数据行高度算成 0：表头还在，打标记录/修改记录等整表空白。
   只套没写死内部滚动的 table-box；群列表/活码那种 height:100% / flex:1 要自己滚。
   min-height 不算内部滚动，仍要放出行高，否则动态表也会被裁成空表。 */
.panel-yiwei:not(#panel-batch-tag):not(#panel-group-detail):not(#panel-customer-detail)
  .table-box:not([style*="height:100%"]):not([style*="flex:1"])
  .el-table__inner-wrapper {
  height: auto;
}
.panel-yiwei:not(#panel-batch-tag):not(#panel-group-detail):not(#panel-customer-detail)
  .table-box:not([style*="height:100%"]):not([style*="flex:1"])
  .el-table__body-wrapper {
  flex: none;
  height: auto;
  overflow: visible;
}

/* 跟进记录 / 标签统计用的是 .stat-table，同样会被裁成空表。
   客户统计（height:calc）和群统计（.group-stat-table 自己定高）要内部滚。
   :not(#id) 会抬高优先级，必须把 .group-stat-table 排除，否则会盖掉 #panel-group-stat 的规则。 */
.panel-yiwei:not(#panel-batch-tag):not(#panel-group-detail):not(#panel-customer-detail)
  .stat-table:not([style*="height:calc"]):not(.group-stat-table)
  .el-table__inner-wrapper {
  height: auto;
}
.panel-yiwei:not(#panel-batch-tag):not(#panel-group-detail):not(#panel-customer-detail)
  .stat-table:not([style*="height:calc"]):not(.group-stat-table)
  .el-table__body-wrapper {
  flex: none;
  height: auto;
  overflow: visible;
}

/* 群/客户详情：容器就是 .yw-container，收成顶栏下剩余高度，左右栏继续自己滚 */
#panel-group-detail .yw-container,
#panel-customer-detail .yw-container {
  height: calc(100vh - var(--antd-header-h, 56px) - 16px);
  max-height: calc(100vh - var(--antd-header-h, 56px) - 16px);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#panel-customer-detail .customer-detail-page .detail-content {
  min-height: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: #f5f7fa;
  font-weight: 500;
  color: var(--text-secondary);
}

.data-table tbody tr:hover {
  background: #fafafa;
}

.corp-expire-kind {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.corp-expire-count {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  white-space: nowrap;
}

.corp-expire-count.ok {
  color: var(--success);
}

.corp-expire-count.warn {
  color: var(--warning);
}

.corp-expire-count.expired {
  color: var(--danger);
  font-weight: 500;
}

.corp-expire-count.muted {
  color: var(--muted);
}

.col-check {
  width: 48px;
}

.table-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

/* 标签选择 */
.tag-check-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: var(--radius);
}

.tag-check-list label:hover {
  background: #f5f7fa;
}

.tag-grid {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2px;
}

.tag-check-list .group-name {
  color: var(--muted);
  font-size: 12px;
}

/* 筛选标签弹窗：按标签组分组 + 组头整组全选 */
.filter-tag-grouped {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 8px;
}
.filter-tag-grouped .filter-tag-group + .filter-tag-group {
  margin-top: 6px;
}
.filter-tag-grouped .filter-tag-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  cursor: pointer;
  border-radius: var(--radius);
  background: #eef2f7;
  font-weight: 600;
  color: #303133;
  position: sticky;
  top: -8px;
  z-index: 1;
}
.filter-tag-grouped .filter-tag-group-head:hover {
  background: #e4eaf2;
}
.filter-tag-grouped .filter-tag-group-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.filter-tag-grouped .filter-tag-group-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 2px;
  padding: 4px 0 6px 20px;
}
.filter-tag-grouped .filter-tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  cursor: pointer;
  border-radius: var(--radius);
  min-width: 0;
}
.filter-tag-grouped .filter-tag-item:hover {
  background: #f5f7fa;
}
.filter-tag-grouped .filter-tag-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-modal-skip-box {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f7f8fa;
  border-radius: 6px;
}

.tag-modal-skip-title {
  font-size: 12px;
  color: #737b89;
  margin-bottom: 8px;
}

.tag-modal-skip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.tag-modal-skip-options .checkbox-inline {
  margin: 0;
  font-size: 13px;
  color: #303133;
}

/* 提示 */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 13px;
}

.alert.error {
  background: #fef0f0;
  color: var(--danger);
  border: 1px solid #fde2e2;
}

.alert.info {
  background: #ecf5ff;
  color: #409eff;
  border: 1px solid #d9ecff;
}

.alert.success {
  background: #f0f9eb;
  color: var(--success);
  border: 1px solid #e1f3d8;
}

.hidden {
  display: none !important;
}

.result-box,
.detail-pre {
  background: #fafafa;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 12px;
  overflow: auto;
}

.detail-pre {
  max-height: 360px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  background: rgba(48, 49, 51, 0.92);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 420px;
  line-height: 1.5;
  white-space: normal;
}

.toast.toast-error {
  background: #f56c6c;
}

.toast .toast-link {
  color: #fff;
  text-decoration: underline;
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 20px;
}

.badge-ok {
  background: #f0f9eb;
  color: var(--success);
}

.badge-fail {
  background: #fef0f0;
  color: var(--danger);
}

/* 接入进度 */
.auto-refresh-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.onboarding-progress {
  margin-bottom: 16px;
}

.progress-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width 0.3s;
}

.onboarding-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.onboarding-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fafbfc;
}

.onboarding-item.status-done {
  border-left: 3px solid var(--success);
}

.onboarding-item.status-pending {
  border-left: 3px solid var(--warning);
}

.onboarding-item.status-blocked {
  border-left: 3px solid var(--danger);
}

.onboarding-item.status-manual {
  border-left: 3px solid var(--primary);
}

.onboarding-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.onboarding-badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border-light);
}

.onboarding-auto-tag {
  font-size: 11px;
  color: var(--success);
}

.onboarding-detail,
.onboarding-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.setup-list {
  margin: 0;
  padding-left: 20px;
}

.setup-path {
  color: var(--text-secondary);
  font-size: 13px;
}

.env-pre {
  margin: 0;
  background: #fafafa;
  border: 1px solid var(--border-light);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 12px;
  overflow-x: auto;
}

.doc-links a {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  text-decoration: none;
}

.doc-links a:hover {
  text-decoration: underline;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #dadde1;
}

::-webkit-scrollbar-thumb:hover {
  background: #c6c8cc;
}

@media (max-width: 960px) {
  .content-layout,
  .scrm-split {
    flex-direction: column;
  }

  .group-panel {
    width: 100%;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

.lc-main-layout { display: flex; gap: 12px; flex: 1; min-height: 0; }
.lc-group-sidebar { width: 200px; flex-shrink: 0; border: 1px solid #e5eaf0; border-radius: 4px; background: #fff; padding: 8px 0; }
.lc-group-head { padding: 0 12px 8px; font-size: 13px; font-weight: 500; color: #112233; border-bottom: 1px solid #e5eaf0; margin-bottom: 8px; }
.lc-group-search { padding: 0 8px 8px; }
.lc-group-search .el-input__inner { width: 100%; height: 28px; font-size: 12px; border: 1px solid #dcdfe6; border-radius: 2px; padding: 0 8px; }
.lc-group-list { list-style: none; margin: 0; padding: 0; }
.lc-group-list li { padding: 8px 16px; font-size: 13px; color: #112233; cursor: pointer; }
.lc-group-list li.is-active { color: #1677ff; background: #eef3ff; }
.lc-table-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lc-toolbar .el-button.is-text { font-size: 13px; }
.lc-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; }
.lc-modal.lc-modal-stack { z-index: 3100; }
.lc-modal.hidden { display: none; }
body.modal-open { overflow: hidden; }
.lc-modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
/* 打标任务详情表：避免 el-table .cell nowrap 导致员工/客户 ID 叠字 */
.tag-task-detail-dialog {
  max-width: min(860px, 94vw);
}
.tag-task-detail-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e5eaf0;
  border-radius: 4px;
  background: #fff;
}
.tag-task-detail-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  color: #112233;
}
.tag-task-detail-table th,
.tag-task-detail-table td {
  padding: 10px 12px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid #f0f2f5;
  /* fixed 布局下强制列宽生效，避免长 external_userid 撑破/叠字 */
  max-width: 0;
  overflow: hidden;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.45;
}
.tag-task-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f5f9;
  color: #737b89;
  font-weight: 500;
  border-bottom: 1px solid #e5eaf0;
}
.tag-task-detail-table tbody tr:last-child td {
  border-bottom: none;
}
.tag-task-id-cell {
  min-width: 0;
}
.tag-task-id-name {
  font-weight: 600;
  color: #112233;
  margin-bottom: 2px;
}
.tag-task-id-sub {
  font-size: 12px;
  color: #8f9bb3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.4;
}
.tag-task-tag-name {
  color: #112233;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.4;
}
.tag-task-tip-cell {
  color: #444a59;
}
.tag-task-summary-box {
  background: #f7f9fb;
  color: #444a59;
  padding: 10px 12px;
  border-radius: 4px;
  line-height: 1.5;
}
.tag-task-muted {
  color: #8f9bb3;
}
.tag-task-empty {
  text-align: center;
  color: #c9cdd4;
  padding: 16px !important;
}
.lc-modal-body {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 20px;
  color: #112233;
}
.lc-inner-tabs .el-tabs__content { flex: 1; min-height: 0; }
.panel-yiwei.active .channel-code .yw-body,
.panel-yiwei.active .group-code .yw-body { min-height: calc(100vh - 120px); }

.layout-logo-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.layout-logo-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: auto;
  padding: 0;
  user-select: none;
}
.layout-logo-mark {
  flex-shrink: 0;
  display: block;
  width: 28px;
  height: 28px;
}
.layout-logo-brand-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1677ff;
  line-height: 1.2;
  text-align: center;
}
/* 底部：访问令牌 + 企业选择器。
   原方案：菜单区固定高(calc(100vh-198px)) + 底部框 position:absolute 贴底浮在菜单上。
   菜单变长或底部框变高时，最后一个菜单项会被底部框盖住点不到。
   改为竖向 flex：Logo 固定高 → 菜单区自适应并内部滚动 → 底部框按内容高度贴底，二者永不重叠。 */
.has-logo.sidebar-container {
  display: flex;
  flex-direction: column;
}
.has-logo.sidebar-container > .layout-logo-container {
  flex: 0 0 auto;
}
.has-logo.sidebar-container > .el-scrollbar {
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
}
.layout-task-container {
  position: static !important;
  flex: 0 0 auto;
  height: auto !important;
  overflow: visible;
}
.sidebar-token-box {
  padding: 8px 12px 6px;
  border-top: none;
}
.layout-task-container .company {
  flex-shrink: 0;
  margin-bottom: 4px;
}
.layout-task-container .company .company-text {
  flex: 1;
  min-width: 0;
}
.sidebar-token-label {
  font-size: 12px;
  color: #737b89;
  margin-bottom: 6px;
}
.sidebar-token-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-token-row input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #dcdfe6;
  border-radius: 2px;
  font-size: 12px;
  background: #fff;
}
.sidebar-token-row input:focus {
  outline: none;
  border-color: #1677ff;
}
.sidebar-token-row button {
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 2px;
  background: #1677ff;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.sidebar-token-row button:hover {
  background: #4080ff;
}

.sidebar-menu-manage-btn {
  width: 100%;
  height: 28px;
  margin-top: 8px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  color: #444a59;
  font-size: 12px;
  cursor: pointer;
}

.sidebar-menu-manage-btn:hover {
  border-color: #1677ff;
  color: #1677ff;
  background: #ecf5ff;
}

/* 重复粉丝分析页 */
.duplicate-fans-page .duplicate-fans-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #737b89;
  line-height: 1.5;
}

.duplicate-fans-filter {
  margin-bottom: 16px;
}

.duplicate-fans-filter-body {
  padding: 16px 20px;
}

.duplicate-fans-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 20px;
}

.duplicate-fans-filter-staff {
  flex: 1 1 280px;
  min-width: 240px;
}

.duplicate-fans-filter-keyword {
  flex: 0 1 220px;
}

.duplicate-fans-filter-keyword .search-value {
  width: 100%;
  min-width: 180px;
}

.duplicate-fans-filter-actions {
  flex: 0 0 auto;
  padding-bottom: 1px;
}

.duplicate-fans-staff-btn {
  width: 100%;
  min-width: 0;
  max-width: 420px;
  height: 36px;
  justify-content: flex-start;
  text-align: left;
  gap: 8px;
  padding: 0 12px;
  border-color: #dcdfe6;
  background: #fff;
}

.duplicate-fans-staff-btn:hover {
  border-color: #1677ff;
  color: #1677ff;
  background: #ecf5ff;
}

.duplicate-fans-staff-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #737b89;
}

.duplicate-fans-staff-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-fans-cards {
  display: flex;
  width: 100%;
  border-radius: 4px;
  border: 1px solid #f2f5f9;
}

  .duplicate-fans-cards .large-card {
    flex: 1;
    background-color: #fafbfd;
    padding: 20px 0 20px 24px;
    min-height: 96px;
    box-sizing: border-box;
    min-width: 0;
  }

.duplicate-fans-cards .large-card .card-label {
  color: #737b89;
  font-size: 14px;
  padding-bottom: 10px;
}

.duplicate-fans-cards .large-card .card-value {
  color: #000;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.duplicate-fans-cards .large-card .card-border {
  border-right: 1px solid #e5eaf0;
}

.duplicate-fans-cards .duplicate-fans-accent {
  color: #1677ff;
}

.duplicate-fans-staff-summary {
  background: #fff;
  border: 1px solid #e5eaf0;
  border-radius: 4px;
  padding: 16px 20px;
}

.duplicate-fans-staff-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.duplicate-fans-staff-summary-title {
  font-size: 14px;
  font-weight: 500;
  color: #112233;
}

.duplicate-fans-staff-summary-tip {
  font-size: 12px;
  color: #737b89;
}

.duplicate-fans-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.duplicate-fans-staff-stat {
  padding: 10px 12px;
  background: #f7f9fb;
  border: 1px solid #eef2f6;
  border-radius: 4px;
}

.duplicate-fans-staff-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.duplicate-fans-staff-stat-name {
  font-size: 13px;
  font-weight: 500;
  color: #112233;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-fans-staff-stat-count {
  font-size: 13px;
  font-weight: 600;
  color: #1677ff;
  flex-shrink: 0;
}

.duplicate-fans-staff-stat-bar {
  height: 4px;
  border-radius: 2px;
  background: #e5eaf0;
  overflow: hidden;
}

.duplicate-fans-staff-stat-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #507afe, #1677ff);
}

.duplicate-fans-result-head {
  padding: 0 2px;
}

.duplicate-fans-result-hint {
  font-size: 13px;
  color: #737b89;
}

.duplicate-fans-table-box {
  min-height: calc(100vh - 480px);
  border: 1px solid #e5eaf0;
  border-radius: 4px;
  overflow: hidden;
}

.duplicate-fans-table .duplicate-fans-col-customer {
  width: 240px;
  min-width: 200px;
}

.duplicate-fans-table .duplicate-fans-col-count {
  width: 88px;
  min-width: 72px;
}

.duplicate-fans-table .duplicate-fans-col-staffs {
  width: 180px;
  min-width: 140px;
}

.duplicate-fans-table .duplicate-fans-col-details {
  min-width: 320px;
}

.duplicate-fans-table .el-table__body td {
  vertical-align: top;
  padding-top: 14px;
  padding-bottom: 14px;
}

.duplicate-fans-customer-id {
  margin-top: 2px;
  font-size: 12px;
  color: #8f9bb3;
  word-break: break-all;
}

.duplicate-fans-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: #ecf5ff;
  color: #1677ff;
  font-size: 14px;
  font-weight: 600;
}

.duplicate-fans-staff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.duplicate-fans-involved-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 12px;
  background: #f2f5f9;
  border: 1px solid #e5eaf0;
  font-size: 12px;
  color: #444a59;
  line-height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-fans-staff-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.duplicate-fans-staff-card {
  padding: 10px 12px;
  background: #fafbfd;
  border: 1px solid #eef2f6;
  border-radius: 4px;
}

.duplicate-fans-staff-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.duplicate-fans-staff-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1677ff;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.duplicate-fans-staff-name {
  font-size: 13px;
  font-weight: 500;
  color: #112233;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-fans-staff-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #8f9bb3;
  line-height: 1.45;
}

.duplicate-fans-staff-meta-row {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .duplicate-fans-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .duplicate-fans-staff-btn {
    max-width: none;
  }

  .duplicate-fans-cards {
    flex-wrap: wrap;
  }

  .duplicate-fans-cards .large-card {
    flex: 1 1 calc(33.33% - 1px);
    min-width: calc(33.33% - 1px);
  }

  .duplicate-fans-staff-details {
    grid-template-columns: 1fr;
  }
}

/* 重复粉丝 - 调整数据弹窗 */
.duplicate-fans-adjust-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #1677ff;
  background: #e8f3ff;
  border-radius: 10px;
}

.dup-fans-adjust-dialog {
  width: min(520px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dup-fans-adjust-body {
  padding: 0 20px 16px;
  overflow: auto;
}

.dup-fans-adjust-settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.dup-fans-adjust-uplift-input,
.dup-fans-adjust-rate-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dup-fans-adjust-uplift-input .el-input__inner {
  width: 90px;
}

.dup-fans-adjust-unit {
  color: #737b89;
  font-size: 13px;
}

.dup-fans-adjust-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4e5969;
  cursor: pointer;
  padding-bottom: 6px;
}

.dup-fans-adjust-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.dup-fans-adjust-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #8f9bb3;
}

.dup-fans-adjust-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  overflow: hidden;
}

.dup-fans-adjust-table th,
.dup-fans-adjust-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ebeef5;
  font-size: 13px;
  text-align: left;
}

.dup-fans-adjust-table th {
  background: #f2f5f9;
  color: #737b89;
  font-weight: 500;
}

.dup-fans-adjust-table tr:last-child td {
  border-bottom: none;
}

.dup-fans-adjust-actual {
  color: #606266;
  font-variant-numeric: tabular-nums;
}

.dup-fans-adjust-edit {
  width: 120px;
  max-width: 100%;
}

.dup-fans-adjust-edit-accent {
  border-color: #409eff;
  font-weight: 600;
}

.dup-fans-adjust-readonly {
  background: #f5f7fa;
  color: #909399;
  cursor: not-allowed;
}

.dup-fans-adjust-highlight td:first-child {
  font-weight: 500;
}

.dup-fans-adjust-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid #ebeef5;
}

@media (max-width: 768px) {
  .dup-fans-adjust-inline-actions {
    margin-left: 0;
    width: 100%;
  }
}

/* 群重复粉丝 - 群选择弹窗 */
.gm-dup-fans-group-picker-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gm-dup-fans-group-picker-dialog .distribute-tags-head {
  flex-shrink: 0;
  background: #fff;
}

.gm-dup-fans-group-picker-dialog .dup-fans-adjust-footer {
  flex-shrink: 0;
  background: #fff;
}

.gm-dup-fans-picker-body {
  flex: 1;
  min-height: 0;
  padding: 0 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gm-dup-fans-picker-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  padding: 8px 10px;
  background: #f7f9fc;
  border: 1px solid #e8edf3;
  border-radius: 4px;
}

.gm-dup-fans-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 8px 2px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d6e4ff;
  font-size: 12px;
  color: #334155;
  line-height: 22px;
}

.gm-dup-fans-chip-remove {
  border: none;
  background: transparent;
  color: #8f9bb3;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

.gm-dup-fans-chip-remove:hover {
  color: #1677ff;
}

.gm-dup-fans-picker-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gm-dup-fans-picker-list {
  flex: 1;
  min-height: 240px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e8edf3;
  border-radius: 4px;
  background: #fff;
}

.gm-dup-fans-picker-row {
  display: grid;
  grid-template-columns: 20px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f3f7;
  cursor: pointer;
  background: #fff;
}

.gm-dup-fans-picker-check {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #1677ff;
  cursor: pointer;
}

.gm-dup-fans-picker-row:last-child {
  border-bottom: none;
}

.gm-dup-fans-picker-row:hover {
  background: #f7faff;
}

.gm-dup-fans-picker-name {
  font-size: 13px;
  color: #112233;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gm-dup-fans-picker-owner {
  font-size: 12px;
  color: #8f9bb3;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gm-dup-fans-picker-count {
  font-size: 12px;
  color: #5c6b7a;
  white-space: nowrap;
}

.gm-dup-fans-picker-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: #8f9bb3;
}

/* 客户同步进度条 */
.customer-sync-progress {
  margin: 12px 0 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f7faff 0%, #fff 100%);
  border: 1px solid #d6e4ff;
  border-radius: 4px;
}

.customer-sync-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.customer-sync-progress-title-wrap {
  min-width: 0;
  flex: 1;
}

.customer-sync-progress-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #112233;
}

.customer-sync-progress-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #737b89;
  line-height: 1.5;
}

.customer-sync-progress-pct {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1677ff;
  line-height: 1;
}

.customer-sync-progress-bar {
  height: 8px;
  border-radius: 4px;
  background: #e5eaf0;
  overflow: hidden;
}

.customer-sync-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #507afe, #1677ff);
  transition: width 0.35s ease;
}

.customer-sync-progress-detail {
  margin-top: 8px;
  font-size: 12px;
  color: #8f9bb3;
  line-height: 1.5;
}

.customer-sync-progress.is-estimating .customer-sync-progress-fill {
  width: 30% !important;
  animation: customer-sync-indeterminate 1.2s ease-in-out infinite alternate;
}

#waMatchProgress.is-fail {
  border-color: #fbc4c4;
  background: linear-gradient(180deg, #fff7f7 0%, #fff 100%);
}

#waMatchProgress.is-fail .customer-sync-progress-fill {
  background: linear-gradient(90deg, #f56c6c, #e85a5a);
}

#waMatchProgress.is-ok .customer-sync-progress-fill {
  background: linear-gradient(90deg, #67c23a, #529b2e);
}

.distribute-active-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f5c2c7;
  background: #fff5f5;
  border-radius: 6px;
}

.distribute-active-bar.hidden {
  display: none;
}

.distribute-active-bar-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.distribute-active-bar-title {
  font-size: 13px;
  font-weight: 600;
  color: #c45656;
}

.distribute-active-bar-text {
  font-size: 12px;
  color: #8f9bb3;
  line-height: 1.4;
}

.distribute-active-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.distribute-global-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 4200;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid #f5c2c7;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(28, 39, 61, 0.16);
}

.distribute-global-float.hidden {
  display: none;
}

.distribute-global-float-main {
  min-width: 0;
  flex: 1;
}

.distribute-global-float-title {
  font-size: 13px;
  font-weight: 600;
  color: #c45656;
  margin-bottom: 2px;
}

.distribute-global-float-text {
  font-size: 12px;
  color: #8f9bb3;
  line-height: 1.4;
  word-break: break-all;
}

.distribute-global-float-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* 已停止/失败任务的持久提示：琥珀色，展示停止原因 */
.distribute-stopped-float {
  border-color: #f0c36d;
  align-items: flex-start;
}

.distribute-stopped-float .distribute-global-float-title {
  color: #b7791f;
}

.distribute-stopped-float .distribute-global-float-text {
  white-space: pre-line;
  color: #6b7280;
}

.distribute-stopped-float .distribute-global-float-actions {
  align-self: center;
}

@keyframes customer-sync-indeterminate {
  from { transform: translateX(-40%); opacity: 0.55; }
  to { transform: translateX(40%); opacity: 1; }
}

#syncCustomers.is-syncing {
  pointer-events: none;
  opacity: 0.65;
}

#syncCustomers.is-syncing .customer-sync-btn-icon {
  animation: customer-sync-spin 0.9s linear infinite;
}

@keyframes customer-sync-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 需高于一维 sidebar 内 [data-v-7d04bf3d] .el-menu-item { display:flex!important } */
#sidebarMenu .el-menu-item.sidebar-menu-hidden,
#sidebarMenu .nav-item.sidebar-menu-hidden,
#sidebarMenu > .el-sub-menu.sidebar-menu-hidden,
#sidebarMenu .el-sub-menu:not(.is-opened) > .el-menu--inline {
  display: none !important;
}

.sidebar-menu-manager-dialog {
  width: min(520px, 94vw);
  max-height: 86vh;
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
}

.sidebar-menu-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 20px;
  border-bottom: 1px solid #e5eaf0;
}

.sidebar-menu-manager-tip {
  margin: 16px 20px 0;
  padding: 8px 12px;
  border-radius: 4px;
  background: #ecf5ff;
  color: #444a59;
  font-size: 13px;
  line-height: 20px;
}

.sidebar-menu-manager-list {
  max-height: 52vh;
  margin: 12px 20px;
  padding-right: 4px;
  overflow-y: auto;
}

.sidebar-menu-manager-group {
  margin-bottom: 10px;
}

.sidebar-menu-manager-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #112233;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.sidebar-menu-manager-row.group {
  font-weight: 500;
}

.sidebar-menu-manager-row.child {
  padding-left: 24px;
  color: #444a59;
}

.sidebar-menu-manager-children {
  margin-top: 4px;
}

.sidebar-menu-manager-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid #e5eaf0;
}
.sidebar-token-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #00b42a;
}
.sidebar-token-hint.hidden {
  display: none;
}

.distribute-tags-dialog {
  width: min(480px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.customer-sync-dialog {
  width: min(440px, 94vw);
}

.customer-sync-scope-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.customer-sync-scope-row .form-label {
  padding-top: 6px;
  font-size: 14px;
  color: #737b89;
  text-align: right;
  line-height: 20px;
}

.customer-sync-scope-row .form-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.customer-sync-scope-option {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: #112233;
  cursor: pointer;
  user-select: none;
}

.customer-sync-scope-option input[type="radio"] {
  width: 14px !important;
  height: 14px !important;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: #409eff;
}
.distribute-tags-head {
  padding: 16px 20px;
  border-bottom: 1px solid #e5eaf0;
}
.distribute-close-btn {
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  min-height: auto;
}
.distribute-tags-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.distribute-tags-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e5eaf0;
}
.tags-by-num-dialog .dialog-desc {
  margin-bottom: 24px;
  color: #112233;
  font-size: 14px;
  line-height: 22px;
}
.distribute-staff-qty-panel {
  border: 1px solid #d6e4ff;
  border-radius: 4px;
  background: #f7faff;
  overflow: hidden;
}
.distribute-staff-qty-toolbar {
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5eaf0;
  background: #eef5ff;
}
.distribute-staff-qty-title {
  font-size: 12px;
  color: #1677ff;
  font-weight: 500;
}
.distribute-staff-qty-list {
  max-height: 240px;
  overflow: auto;
  background: #fff;
}
.distribute-staff-qty-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 13px;
  color: #112233;
}
.distribute-staff-qty-row:last-child {
  border-bottom: none;
}
.distribute-staff-qty-row .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.distribute-staff-qty-row .name small {
  display: block;
  color: #8f9bb3;
  font-size: 12px;
  font-weight: 400;
  margin-top: 2px;
}
.distribute-staff-qty-row .qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.distribute-staff-qty-row .qty-label,
.distribute-staff-qty-row .qty-unit {
  font-size: 12px;
  color: #737b89;
  white-space: nowrap;
}
.distribute-staff-qty-row input.distribute-staff-qty-input {
  width: 72px !important;
  min-width: 72px;
  height: 30px !important;
  text-align: center;
  border: 1px solid #c0c4cc;
  border-radius: 4px;
  background: #fff;
}
.tag-by-add-order-list {
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  max-height: 220px;
  overflow: auto;
  background: #fafbfc;
}
.tag-by-add-order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef0f4;
  font-size: 13px;
  color: #1d2129;
}
.tag-by-add-order-item:last-child {
  border-bottom: 0;
}
.tag-by-add-order-item .idx {
  width: 22px;
  color: #86909c;
  flex-shrink: 0;
}
.tag-by-add-order-item .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-by-add-order-item .ops {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}
.tag-by-add-order-item .ops button {
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  font-size: 12px;
}
.tag-by-add-order-empty {
  padding: 16px;
  text-align: center;
  color: #86909c;
  font-size: 13px;
}
.tag-by-add-preview {
  margin-top: 10px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #f7f8fa;
  padding: 12px 14px;
  font-size: 13px;
  color: #1d2129;
  line-height: 1.55;
  max-height: 260px;
  overflow: auto;
}
.tag-by-add-preview .ok {
  color: #00b42a;
  font-weight: 500;
}
.tag-by-add-preview .warn {
  color: #ff7d00;
  font-weight: 500;
}
.tag-by-add-preview .bad {
  color: #f53f3f;
  font-weight: 500;
}
.tag-by-add-preview .sec {
  margin-top: 8px;
}
.tag-by-add-preview .sec-title {
  color: #4e5969;
  margin-bottom: 2px;
}
.tag-by-add-preview .muted {
  color: #86909c;
}
.tag-by-add-preview ul {
  margin: 4px 0 0;
  padding-left: 18px;
}
.tags-by-num-dialog .doc-link {
  color: #3d6cff;
  cursor: pointer;
  margin-left: 4px;
}
.tags-by-num-dialog .doc-link:hover {
  text-decoration: underline;
}
.tags-by-num-dialog .form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}
.tags-by-num-dialog .form-label {
  width: 68px;
  padding-top: 6px;
  margin-right: 16px;
  color: #444a59;
  font-size: 13px;
  line-height: 20px;
  flex-shrink: 0;
}
.tags-by-num-dialog .form-content {
  flex: 1;
  min-width: 0;
}
.tags-by-num-dialog .form-tip {
  margin-top: 8px;
  color: #8f9bb3;
  font-size: 12px;
  line-height: 18px;
}
.distribute-staff-select .el-select__wrapper {
  width: 100%;
  min-height: 32px;
  box-sizing: border-box;
}
.distribute-tag-group-select,
.distribute-quantity-input {
  width: 100%;
  height: 32px;
  box-sizing: border-box;
}
.distribute-staff-picker-dialog {
  width: min(800px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.distribute-staff-picker-body.yw-partment {
  padding: 0 20px 20px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.yw-partment .staff-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 8px 16px;
  margin-bottom: 16px;
  border-radius: 4px;
  background: #ecf5ff;
  font-size: 14px;
  color: #737b89;
}
.yw-partment .staff-alert-link {
  color: #1677ff;
  white-space: nowrap;
  text-decoration: none;
}
.yw-partment .staff-alert-link:hover {
  text-decoration: underline;
}
.yw-partment-row {
  display: flex;
  gap: 0;
  min-height: 470px;
}
.yw-partment .staff-tree {
  flex: 1;
  min-width: 0;
  border-right: 1px solid #e5e6eb;
  padding-right: 16px;
}
.yw-partment .staff-tree-search {
  margin-bottom: 8px;
  padding-right: 4px;
}
.yw-partment .staff-tree .filter-tree {
  height: 470px;
  overflow-y: auto;
}
.yw-partment .distribute-tree-dept .el-tree-node__content > label.el-checkbox,
.yw-partment .distribute-tree-user .el-tree-node__content > label.el-checkbox {
  display: inline-flex;
}
.yw-partment .distribute-tree-dept .el-tree-node__content:hover {
  background: #f2f5f9;
}
.yw-partment .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: #1677ff;
  border-color: #1677ff;
}
.yw-partment .el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
  content: "";
  position: absolute;
  display: block;
  background-color: #fff;
  height: 2px;
  transform: scale(0.5);
  left: 0;
  right: 0;
  top: 5px;
}
.yw-partment .el-tree-node__content {
  display: flex;
  align-items: center;
  height: 32px;
  cursor: pointer;
}
.yw-partment .distribute-tree-user .el-tree-node__content:hover {
  background: #f2f5f9;
}
.yw-partment .el-tree-node__expand-icon {
  width: 16px;
  margin-right: 4px;
  color: #627189;
  transition: transform 0.2s;
}
.yw-partment .el-tree-node__expand-icon.expanded {
  transform: rotate(90deg);
}
.yw-partment .el-tree-node__expand-icon.is-leaf {
  visibility: hidden;
}
.yw-partment .custom-tree-node {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #112233;
}
.yw-partment .show-one-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yw-partment .check-staff {
  flex: 1;
  min-width: 0;
  margin-left: 20px;
}
.yw-partment .check-staff .check-title {
  height: 32px;
  line-height: 32px;
  color: #737b89;
  font-size: 13px;
}
.yw-partment .check-staff .check-scollbar {
  height: 470px;
  overflow-y: auto;
  color: #112233;
}
.yw-partment .check-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding-right: 8px;
  font-size: 13px;
}
.yw-partment .check-content .staff {
  display: flex;
  align-items: center;
  min-width: 0;
}
.yw-partment .distribute-staff-remove {
  border: none;
  background: transparent;
  color: #909399;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
}
.yw-partment .distribute-staff-remove:hover {
  color: #1677ff;
}

@media (max-width: 960px) {
  .lc-main-layout { flex-direction: column; }
  .lc-group-sidebar { width: 100%; }
}

/* 客户统计（对齐一维） */
.customer-stat .top-cards,
.group-stat .top-cards {
  display: flex;
  width: 100%;
  margin-top: 20px;
  border-radius: 4px;
  border: 1px solid #f2f5f9;
}
.customer-stat .top-cards .large-card,
.group-stat .top-cards .large-card {
  flex: 1;
  background-color: var(--el-fill-color-5, #fafbfd);
  padding: 24px 0 24px 24px;
  height: 100px;
  box-sizing: border-box;
}
.customer-stat .top-cards .large-card .card-label,
.group-stat .top-cards .large-card .card-label {
  color: #737b89;
  font-size: 14px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.customer-stat .top-cards .large-card .card-value,
.group-stat .top-cards .large-card .card-value {
  color: #000;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.customer-stat .top-cards .large-card .card-border,
.group-stat .top-cards .large-card .card-border {
  border-right: 1px solid var(--el-fill-color-4, #e5eaf0);
}
.stat-help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #c9cdd4;
  color: #737b89;
  font-size: 10px;
  cursor: help;
  line-height: 1;
}
.customer-stat .customer-stat-echarts .right-icon-blue {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: #507afe;
}
.customer-stat .customer-stat-echarts .right-icon-green {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: #0fdbaa;
}
.customer-stat .customer-stat-echarts .right-text {
  font-size: 12px;
  color: var(--el-text-color-6, #737b89);
}
.group-stat .group-stat-echarts .right-icon-blue {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: #507afe;
}
.group-stat .group-stat-echarts .right-icon-green {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: #0fdbaa;
}
.group-stat .group-stat-echarts .right-text {
  font-size: 12px;
  color: var(--el-text-color-6, #737b89);
}
#panel-group-stat .group-stat-table {
  margin-top: 16px;
  height: calc(100vh - 613px);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
#panel-group-stat .group-stat-table > .el-table {
  flex: 1;
  min-height: 0;
}
#panel-group-stat .group-stat-table .el-table__inner-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}
#panel-group-stat .group-stat-table .el-table__body-wrapper {
  flex: 1;
  overflow: auto;
}
#panel-group-stat .group-stat-table .el-table__body td.el-table__cell {
  padding: 0;
  height: 48px;
  font-size: 13px;
}
#panel-group-stat .group-stat-table .el-table__body .cell {
  padding: 0 12px;
}
#panel-group-stat .group-stat-pager {
  flex-shrink: 0;
}
.stat-tabs .el-tabs__item {
  background-color: #f2f5f9;
  background-clip: padding-box;
  color: #737b89 !important;
  font-size: 14px !important;
  padding: 0 20px;
  height: 39px;
  line-height: 39px;
}
.stat-tabs .el-tabs__item.is-active {
  background-color: var(--el-fill-color-6, #fff);
  color: var(--el-brand-color-6, #1677ff) !important;
}
.stat-tabs .el-tabs__nav-wrap {
  margin-bottom: -1px !important;
}
.statistics-item {
  margin-top: 5px;
}
.statistics-item .stat-table {
  margin-top: 16px;
}
.stat-date-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--el-border-color, #dcdfe6);
  border-radius: 4px;
  padding: 0 8px;
  height: 32px;
  background: #fff;
}
.stat-date-input {
  border: none !important;
  height: 28px !important;
  width: 118px !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.stat-date-sep {
  color: #737b89;
  font-size: 12px;
}
.stat-range-group .el-radio-button__inner {
  padding: 8px 15px;
  font-size: 13px;
}
.stat-range-group .el-radio-button.is-active .el-radio-button__inner {
  background: var(--el-brand-color-6, #1677ff);
  border-color: var(--el-brand-color-6, #1677ff);
  color: #fff;
}

/* 客户标签页（对齐一维） */
.label-manage {
  font-size: 14px;
  font-weight: 400;
}

.label-manage .tag-collapse {
  min-height: calc(100vh - 250px);
  margin-top: 16px;
}

.tag-collapse .el-collapse {
  border-top: 0;
}

.tag-collapse .el-collapse-item {
  border: 1px solid var(--border-light, #e5eaf0);
  border-radius: 4px;
  margin-bottom: 12px;
}

.tag-collapse .el-collapse-item__header {
  height: auto !important;
  min-height: 48px;
  margin: 12px 0 !important;
  padding: 0 16px;
  border: 0 !important;
  line-height: 1.4;
}

.tag-collapse .el-collapse-item__wrap {
  border: 0 !important;
}

.tag-collapse .el-collapse-item__content {
  padding-bottom: 12px;
}

.tag-collapse .el-tag.el-tag--info {
  --el-tag-text-color: #737b89;
}

.tag-lib-group-head-inner {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 8px;
  box-sizing: border-box;
}

.opt {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 14px;
}

.opt .content {
  margin-left: 6px;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opt .content-font {
  font-size: 16px;
  font-weight: 500;
  color: #112233;
}

.collapse-content {
  margin-left: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.collapse-content .button-new-tag {
  height: 28px;
  margin-bottom: 8px;
  margin-right: 12px;
  padding: 0 12px;
  border: 1px dashed #1677ff;
  color: #1677ff;
  background: #ecf5ff;
}

.collapse-content .tag-item {
  height: 28px;
  margin-bottom: 8px;
  margin-right: 12px;
  border-radius: 2px;
  border-color: #e5eaf0;
  background-color: #f7f9fb;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
}

.collapse-content .tag-item .font-14 {
  color: #737b89;
}

/* 「按成员看人数」：该成员用到的标签高亮，没用到的置灰 */
.collapse-content .tag-item.tag-item-staff-has {
  background-color: #e8f3ff;
  border-color: #bcdcff;
}
.collapse-content .tag-item.tag-item-staff-has .font-14 {
  color: #1677ff;
  font-weight: 600;
}
.collapse-content .tag-item.tag-item-staff-zero {
  opacity: 0.5;
}

/* 输入「标签人数」后：客户数≠目标值的标签高亮为橙色告警（优先级高于成员高亮/置灰） */
.collapse-content .tag-item.tag-item-count-mismatch {
  background-color: #fff3e8 !important;
  border-color: #ff9a52 !important;
  opacity: 1 !important;
}
.collapse-content .tag-item.tag-item-count-mismatch .font-14 {
  color: #e8730c !important;
  font-weight: 600;
}

.tag-lib-manage-staff-summary {
  margin: 6px 0 12px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #eef4ff;
  border: 1px solid #d6e4ff;
  border-left: 3px solid #4f8cff;
  color: #2b5cd6;
  font-size: 13px;
  line-height: 1.5;
}
.tag-lib-manage-staff-summary.hidden {
  display: none;
}

/* 同步中：图标转起来，让「同步数据」按钮点下去有明显反馈 */
#syncTagLib.tag-lib-syncing {
  opacity: 0.7;
}
#syncTagLib.tag-lib-syncing .default-icon-style {
  animation: tagLibSpin 0.9s linear infinite;
  transform-origin: center;
}
@keyframes tagLibSpin {
  to {
    transform: rotate(360deg);
  }
}

.tag-lib-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-right: 12px;
  white-space: nowrap;
}

.tag-lib-edit-group,
.tag-lib-delete-group {
  flex-shrink: 0;
  height: 28px;
  line-height: 28px;
  width: auto !important;
  min-width: auto;
  padding: 0 8px;
  font-size: 13px;
}

.tag-lib-delete-group,
.tag-lib-delete-group span {
  color: #f56c6c !important;
  font-weight: 500;
}

.tag-lib-delete-group:hover,
.tag-lib-delete-group:hover span {
  color: #f78989 !important;
}

.tag-lib-group-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tag-lib-group-dialog {
  width: min(620px, 94vw);
  max-height: min(498px, 88vh);
}

.tag-lib-tag-dialog {
  width: min(520px, 94vw);
}

.tag-lib-tag-dialog .distribute-tags-body {
  padding: 20px 24px;
}

.tag-lib-tag-textarea-lg {
  min-height: 168px;
  resize: vertical;
}

.tag-lib-group-dialog .distribute-tags-body {
  padding: 20px 24px;
}

.tag-lib-form-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tag-lib-form-item:last-child {
  margin-bottom: 0;
}

.tag-lib-form-label {
  width: 84px;
  flex-shrink: 0;
  padding-top: 5px;
  margin-right: 12px;
  text-align: right;
  color: #444a59;
  font-size: 14px;
  line-height: 22px;
}

.tag-lib-form-content {
  flex: 1;
  min-width: 0;
}

.tag-lib-edit-group-name,
.tag-lib-tag-textarea {
  width: 460px;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5eaf0;
  border-radius: 4px;
  background: #f7f9fb;
  font-size: 14px;
  color: #112233;
}

.tag-lib-edit-group-name {
  height: 32px;
  padding: 5px 12px;
}

.tag-lib-edit-group-name:focus,
.tag-lib-tag-textarea:focus {
  outline: none;
  border-color: #1677ff;
  background: #fff;
}

.tag-lib-tag-textarea {
  min-height: 120px;
  padding: 8px 12px;
  resize: vertical;
  line-height: 22px;
}

.tag-lib-group-modal-foot-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.tag-lib-edit-tags-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.tag-lib-edit-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid #e5eaf0;
  background: #f7f9fb;
}

.tag-lib-edit-tag-name {
  flex: 1;
  font-size: 14px;
  color: #112233;
}

.tag-lib-inline-edit,
.tag-lib-inline-del {
  border: none;
  background: transparent;
  color: #737b89;
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1;
}

.tag-lib-inline-edit:hover,
.tag-lib-inline-del:hover {
  color: #1677ff;
}

.tag-lib-edit-tags-empty {
  font-size: 13px;
  color: #737b89;
  padding: 8px 0;
}

.tag-lib-date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.tag-lib-date-range.hidden {
  display: none;
}

.tag-lib-date-input {
  width: 140px;
  height: 32px;
}

.tag-lib-date-sep {
  font-size: 13px;
  color: #737b89;
}

.tag-lib-th-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border-radius: 50%;
  border: 1px solid #c9cdd4;
  font-size: 10px;
  color: #737b89;
  cursor: help;
  vertical-align: middle;
}

/* 标签客户 Tab（对齐一维 label-customer tag-stat） */
#panel-tag-lib .label-customer , #panel-group-tag-lib .label-customer {
  font-size: 14px;
  font-weight: 400;
}

#panel-tag-lib .label-customer .tag-table , #panel-group-tag-lib .label-customer .tag-table {
  margin-bottom: 12px;
  color: var(--el-text-color-6, #444a59);
}

#panel-tag-lib .label-customer .tag-select , #panel-group-tag-lib .label-customer .tag-select {
  width: 220px;
  margin-left: 12px;
}

#panel-tag-lib .label-customer .tag-select .el-select , #panel-group-tag-lib .label-customer .tag-select .el-select {
  width: 100%;
}

#panel-tag-lib .label-customer .tag-select .el-select__wrapper , #panel-group-tag-lib .label-customer .tag-select .el-select__wrapper {
  width: 100%;
  min-height: 32px;
}

#panel-tag-lib .tag-lib-tab-toolbar .tag-select , #panel-group-tag-lib .tag-lib-tab-toolbar .tag-select {
  width: 220px;
}

#panel-tag-lib .tag-lib-tab-toolbar .tag-select .el-select , #panel-group-tag-lib .tag-lib-tab-toolbar .tag-select .el-select {
  width: 100%;
}

#panel-tag-lib .tag-lib-tab-toolbar .tag-select .el-select__wrapper , #panel-group-tag-lib .tag-lib-tab-toolbar .tag-select .el-select__wrapper {
  width: 100%;
  min-height: 32px;
}

#panel-tag-lib .label-customer .tag-select .el-input__inner , #panel-group-tag-lib .label-customer .tag-select .el-input__inner {
  width: 100%;
  height: 32px;
}

#panel-tag-lib .label-customer .table-wrapper , #panel-group-tag-lib .label-customer .table-wrapper {
  height: calc(100vh - 220px);
  font-size: 13px;
}

#panel-tag-lib .tag-lib-customer-table-wrap {
  overflow: hidden;
}

#panel-tag-lib .tag-lib-customer-table-wrap .el-table__header-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#panel-tag-lib .tag-lib-customer-table-wrap .el-table__header-wrapper::-webkit-scrollbar {
  height: 0;
  display: none;
}

#panel-tag-lib .tag-lib-customer-table-wrap .el-table__body-wrapper {
  overflow: auto !important;
  max-height: calc(100vh - 280px);
}

#panel-tag-lib .tag-lib-customer-table-wrap .el-table__header,
#panel-tag-lib .tag-lib-customer-table-wrap .el-table__body {
  table-layout: fixed;
  width: 1801px !important;
  min-width: 1801px !important;
}

#panel-tag-lib .label-customer .el-table__body td.el-table__cell , #panel-group-tag-lib .label-customer .el-table__body td.el-table__cell {
  padding: 0;
  height: 54px;
}

#panel-tag-lib .label-customer .el-table__body .cell , #panel-group-tag-lib .label-customer .el-table__body .cell {
  padding: 0 12px;
}

#panel-tag-lib .label-customer .front-icon , #panel-group-tag-lib .label-customer .front-icon {
  width: 32px;
  height: 32px;
  background-color: var(--el-brand-color-6, #1677ff);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  flex-shrink: 0;
}

#panel-tag-lib .label-customer .cus-name , #panel-group-tag-lib .label-customer .cus-name {
  height: 18px;
  line-height: 18px;
  text-align: left;
  color: var(--el-text-color-7, #112233);
}

#panel-tag-lib .label-customer .cus-name-tips , #panel-group-tag-lib .label-customer .cus-name-tips {
  margin-top: 4px;
  height: 18px;
  line-height: 18px;
  font-size: 12px;
  text-align: left;
  color: #737b89;
}

#panel-tag-lib .label-customer .show-one-line , #panel-group-tag-lib .label-customer .show-one-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panel-tag-lib .label-customer .tag-lib-pagination , #panel-group-tag-lib .label-customer .tag-lib-pagination {
  padding-top: 4px;
}

/* 标签客户 Tab：表格样式对齐客户列表 */
#panel-tag-lib .tag-stat.customer-list-table , #panel-group-tag-lib .tag-stat.customer-list-table {
  color: var(--el-text-color-6, #444a59);
}

#panel-tag-lib .tag-stat.customer-list-table .table-wrapper , #panel-group-tag-lib .tag-stat.customer-list-table .table-wrapper {
  font-size: 13px;
}

#panel-tag-lib .tag-stat.customer-list-table .el-table__body td.el-table__cell , #panel-group-tag-lib .tag-stat.customer-list-table .el-table__body td.el-table__cell {
  padding: 0;
  height: 54px;
}

#panel-tag-lib .tag-stat.customer-list-table .el-table__body .cell , #panel-group-tag-lib .tag-stat.customer-list-table .el-table__body .cell {
  padding: 0 12px;
}

#panel-tag-lib .tag-stat.customer-list-table .front-icon , #panel-group-tag-lib .tag-stat.customer-list-table .front-icon {
  width: 32px;
  height: 32px;
  background-color: var(--el-brand-color-6, #1677ff);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  flex-shrink: 0;
}

#panel-tag-lib .tag-stat.customer-list-table .cus-name , #panel-group-tag-lib .tag-stat.customer-list-table .cus-name {
  height: 18px;
  line-height: 18px;
  text-align: left;
  color: var(--el-text-color-7, #112233);
}

#panel-tag-lib .tag-stat.customer-list-table .cus-name-tips , #panel-group-tag-lib .tag-stat.customer-list-table .cus-name-tips {
  margin-top: 4px;
  height: 18px;
  line-height: 18px;
  font-size: 12px;
  text-align: left;
  color: #737b89;
}

#panel-tag-lib .tag-stat.customer-list-table .table-edit-item-noborder , #panel-group-tag-lib .tag-stat.customer-list-table .table-edit-item-noborder {
  height: 100%;
}

#panel-tag-lib .tag-stat.customer-list-table .show-one-line , #panel-group-tag-lib .tag-stat.customer-list-table .show-one-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panel-tag-lib .stat-table .el-table__body td.el-table__cell , #panel-group-tag-lib .stat-table .el-table__body td.el-table__cell {
  padding: 0;
  height: 48px;
  font-size: 13px;
}

#panel-tag-lib .stat-table .el-table__body .cell , #panel-group-tag-lib .stat-table .el-table__body .cell {
  padding: 0 12px;
}

.tag-lib-daily-stat {
  padding: 0;
  height: auto;
  color: #1677ff;
}

.import-tag-layout {
  display: flex;
  gap: 16px;
  min-height: calc(100vh - 220px);
}

.import-tag-sidebar {
  width: 200px;
  flex-shrink: 0;
  border: 1px solid #e5eaf0;
  border-radius: 4px;
  background: #fff;
}

.import-tag-group-title {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #112233;
  border-bottom: 1px solid #e5eaf0;
}

.import-tag-group-tree {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.import-tag-group-tree li {
  padding: 8px 16px;
  font-size: 14px;
  color: #444a59;
  cursor: pointer;
}

.import-tag-group-tree li:hover {
  background: #f2f5f9;
}

.import-tag-group-tree li.is-active {
  color: #1677ff;
  background: #ecf5ff;
}

.import-tag-main {
  flex: 1;
  min-width: 0;
}

.tag-lib-personal-help {
  position: absolute;
  right: 0;
  top: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: #1677ff;
  line-height: 22px;
}

.tag-lib-tab-toolbar {
  min-height: 32px;
}

.tag-lib-filter-row {
  gap: 8px;
}

.tag-lib-filter-label {
  font-size: 14px;
  color: #737b89;
  white-space: nowrap;
}

/* 标签管理工具栏：成员筛选 + 标签人数比对 */
.tag-lib-filter-divider {
  display: inline-block;
  width: 1px;
  height: 18px;
  margin: 0 14px 0 16px;
  background: #e4e7ed;
  vertical-align: middle;
}
.tag-lib-count-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tag-lib-count-input {
  width: 92px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 14px;
  color: #303133;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.tag-lib-count-input:hover {
  border-color: #c0c4cc;
}
.tag-lib-count-input:focus {
  border-color: #409eff;
}
.tag-lib-count-input::-webkit-outer-spin-button,
.tag-lib-count-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.tag-lib-count-tip {
  font-size: 12px;
  line-height: 1.4;
  padding: 3px 9px;
  border-radius: 11px;
  white-space: nowrap;
}
.tag-lib-count-tip-warn {
  color: #e8730c;
  background: #fff3e8;
}
.tag-lib-count-tip-ok {
  color: #1f9d55;
  background: #e7f7ee;
}
.tag-lib-clear-filters {
  height: 32px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #909399;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.tag-lib-clear-filters:hover {
  color: #f56c6c;
  background: #fef0f0;
}

.tag-lib-select-sm {
  width: 120px;
  height: 32px;
}

.tag-lib-select-md {
  width: 180px;
  height: 32px;
}

.tag-lib-hint {
  font-size: 13px;
  color: #737b89;
}

.tag-lib-sort-th.is-sort-asc .cell::after,
.tag-lib-sort-th.is-sort-desc .cell::after {
  content: "";
  display: inline-block;
  margin-left: 4px;
  border: 4px solid transparent;
}

.tag-lib-sort-th.is-sort-asc .cell::after {
  border-bottom-color: #1677ff;
  transform: translateY(-2px);
}

.tag-lib-sort-th.is-sort-desc .cell::after {
  border-top-color: #1677ff;
  transform: translateY(2px);
}

.tag-import-alert {
  padding: 8px 16px;
  border-radius: 4px;
  background: #ecf5ff;
  font-size: 14px;
  color: #444a59;
}

.tag-import-link {
  color: #1677ff;
  cursor: pointer;
  white-space: nowrap;
}

.tag-import-link:hover {
  text-decoration: underline;
}

.import-tag-tab {
  min-height: 400px;
}

/* ===== 微信客服 ===== */
.kf-account-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  color: #333;
  max-width: 220px;
}

.kf-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 260px);
  min-height: 420px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.kf-conv-list {
  width: 280px;
  flex: none;
  overflow-y: auto;
  border-right: 1px solid #e4e7ed;
  background: #fafbfc;
}

.kf-conv-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f2f5;
  align-items: center;
}

.kf-conv-item:hover {
  background: #f0f4fa;
}

.kf-conv-item.active {
  background: #e8f0fe;
}

.kf-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
}

.kf-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1677ff;
  color: #fff;
  font-size: 15px;
}

.kf-conv-main {
  flex: 1;
  min-width: 0;
}

.kf-conv-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.kf-conv-name {
  font-size: 13px;
  font-weight: 500;
  color: #223;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kf-conv-time {
  font-size: 11px;
  color: #98a2b3;
  flex: none;
}

.kf-conv-preview {
  font-size: 12px;
  color: #737b89;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kf-chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kf-chat-header {
  padding: 10px 16px;
  border-bottom: 1px solid #e4e7ed;
  font-size: 14px;
  font-weight: 500;
  color: #223;
  background: #fff;
}

.kf-msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f5f6f8;
}

.kf-msg-row {
  display: flex;
  margin-bottom: 12px;
}

.kf-msg-row.mine {
  justify-content: flex-end;
}

.kf-msg-bubble {
  max-width: 70%;
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.kf-msg-row.mine .kf-msg-bubble {
  background: #d8e7ff;
}

.kf-msg-meta {
  font-size: 11px;
  color: #98a2b3;
  margin-bottom: 4px;
}

.kf-msg-body {
  font-size: 13px;
  color: #223;
  word-break: break-word;
  line-height: 1.5;
}

.kf-msg-image {
  max-width: 220px;
  max-height: 220px;
  border-radius: 6px;
  display: block;
}

.kf-msg-image-btn {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 6px;
  line-height: 0;
}

.kf-msg-image-btn:hover .kf-msg-image {
  opacity: 0.92;
}

.kf-img-modal {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.kf-img-modal.hidden {
  display: none;
}

.kf-img-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.kf-img-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kf-img-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #ebeef5;
  flex-wrap: wrap;
}

.kf-img-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: #303133;
}

.kf-img-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kf-img-modal-body {
  padding: 16px;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 16px;
}

.kf-img-modal-img {
  width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  background: #f5f7fa;
  border-radius: 8px;
}

.kf-img-ocr-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kf-img-ocr-label {
  font-size: 12px;
  color: #737b89;
  margin-bottom: 8px;
}

.kf-img-ocr-text {
  flex: 1;
  min-height: 180px;
  width: 100%;
  resize: vertical;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  font-family: inherit;
  box-sizing: border-box;
}

.kf-img-ocr-status {
  margin-top: 8px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .kf-img-modal-body {
    grid-template-columns: 1fr;
  }
}

.kf-msg-system {
  text-align: center;
  font-size: 11px;
  color: #98a2b3;
  margin: 10px 0;
}

.kf-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e4e7ed;
  background: #fff;
  align-items: flex-end;
}

.kf-input-row .kf-image-btn {
  flex-shrink: 0;
  min-width: 52px;
}

.kf-input-row textarea {
  flex: 1;
  resize: none;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.kf-input-row textarea:focus {
  border-color: #1677ff;
}

.kf-empty {
  text-align: center;
  color: #737b89;
  font-size: 13px;
  padding: 40px 12px;
  line-height: 1.8;
}

/* 微信客服独立页：全屏布局，企业切换与主后台隔离 */
.kf-standalone-body {
  margin: 0;
  background: #f5f7fa;
  min-height: 100vh;
}
.kf-standalone-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-sizing: border-box;
}
.kf-standalone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e4e7ed;
}
.kf-standalone-brand {
  min-width: 160px;
}
.kf-standalone-title {
  font-size: 16px;
  font-weight: 600;
  color: #303133;
}
.kf-standalone-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #909399;
}
.kf-standalone-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.kf-standalone-corp-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.kf-standalone-corp-label {
  font-size: 13px;
  color: #737b89;
  white-space: nowrap;
}
.kf-corp-select {
  max-width: 220px;
  min-width: 140px;
}
.kf-layout-standalone {
  flex: 1;
  height: auto;
  min-height: 0;
  margin: 0 16px 16px;
  border-radius: 8px;
}

.kf-conv-item.has-unread .kf-conv-name {
  font-weight: 600;
  color: #1677ff;
}
.kf-conv-preview {
  position: relative;
  padding-right: 28px;
}
.kf-conv-unread {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #f56c6c;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.kf-notify-stack {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.kf-notify-card {
  pointer-events: auto;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-left: 3px solid #1677ff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 12px 14px;
  cursor: pointer;
  animation: kfNotifyIn 0.2s ease-out;
}
.kf-notify-card:hover {
  background: #f5f9ff;
}
.kf-notify-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 4px;
}
.kf-notify-card-body {
  font-size: 13px;
  color: #606266;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kf-notify-card-foot {
  margin-top: 6px;
  font-size: 12px;
  color: #1677ff;
}
.kf-notify-card-out {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.25s, transform 0.25s;
}
.kf-notify-tip {
  font-size: 12px;
  color: #737b89;
  max-width: 260px;
  line-height: 1.35;
}
.kf-notify-tip.kf-notify-tip-pulse,
.kf-notify-btn-pulse {
  animation: kfNotifyPulse 1.1s ease-in-out 3;
}
.kf-notify-tip.kf-notify-tip-pulse {
  color: #b45309;
}
@keyframes kfNotifyPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes kfNotifyIn {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== 离职继承 ===== */
.resign-stats {
  margin-top: 6px;
  font-size: 12px;
  color: #737b89;
  line-height: 1.4;
}
.resign-unassigned-table .resign-col-check {
  width: 44px;
}
.resign-unassigned-table .resign-col-count {
  width: 110px;
}
.resign-unassigned-table .resign-col-time {
  width: 160px;
}
.resign-unassigned-table .resign-col-action {
  width: 148px;
}
.resign-unassigned-table .resign-col-count .cell {
  overflow: hidden;
}
.resign-count-link {
  color: #409eff;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}
.resign-count-link:hover {
  text-decoration: underline;
}
.resign-customers-modal .modal-body {
  padding-bottom: 8px;
}
.resign-customers-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
}
.resign-customers-toolbar .el-input__inner {
  flex: 1;
  height: 32px;
  line-height: 32px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  box-sizing: border-box;
}
.resign-customers-body-wrap {
  max-height: min(52vh, 420px);
  overflow: auto;
}
.resign-customers-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: #606266;
}
.resign-customer-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resign-customer-id {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #909399;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resign-unassigned-table .resign-col-member .cell {
  overflow: hidden;
}
.resign-unassigned-table .staff-cell {
  min-width: 0;
}
.resign-unassigned-table .staff-cell strong,
.resign-unassigned-table .user-id-hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resign-assign-list {
  max-height: 200px;
  overflow: auto;
  margin: 0 0 14px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  background: #fafbfc;
}
.resign-assign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f4;
  font-size: 13px;
}
.resign-assign-item:last-child {
  border-bottom: 0;
}
.resign-assign-item .staff-cell {
  min-width: 0;
  flex: 1;
}
.resign-assign-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecf5ff;
  color: #409eff;
  font-size: 12px;
  font-weight: 600;
}
.resign-ext-id {
  font-size: 12px;
  color: #606266;
}
.transfer-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f7f9fb;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  font-size: 13px;
  color: #606266;
}
.transfer-status-summary .tss-item em {
  font-style: normal;
  font-weight: 600;
  margin-right: 2px;
}
.transfer-status-summary .tss-done em { color: #67c23a; }
.transfer-status-summary .tss-wait em { color: #e6a23c; }
.transfer-status-summary .tss-reject em,
.transfer-status-summary .tss-limit em { color: #f56c6c; }
.transfer-status-summary .tss-total em { color: #409eff; }
.transfer-task-detail-card {
  border: 1px solid #ebeef5;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}
.transfer-task-detail-body {
  max-height: 420px;
  overflow: auto;
}
.resign-assign-modal .resign-takeover-select {
  width: 100%;
}
.resign-assign-modal .resign-takeover-select .el-select__wrapper {
  min-height: 34px;
}
.resign-assign-modal {
  width: min(520px, 94vw);
}
.panel-subdesc {
  margin-top: 4px;
  max-width: 640px;
  font-size: 12px;
  line-height: 1.5;
  color: #737b89;
}
.xfer-modal-lead {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #303133;
}
.xfer-modal-tips {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, #f7f9fc 0%, #f3f6fa 100%);
  border: 1px solid #e8edf3;
  border-radius: 8px;
}
.xfer-modal-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #606266;
}
.xfer-modal-tip-n {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: #409eff;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.xfer-modal-progress {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f7fa;
  border: 1px solid #ebeef5;
  color: #606266;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow: auto;
}
.xfer-retry-scope-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}
.xfer-retry-scope-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #606266;
  cursor: pointer;
  line-height: 1.4;
}
.xfer-retry-scope-opt input[type="radio"] {
  margin: 0;
  accent-color: #409eff;
}
.xfer-retry-max {
  width: 72px !important;
  height: 28px;
  padding: 0 8px;
  flex: 0 0 auto;
  border-radius: 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.xfer-retry-max:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f5f7fa;
}

/* ===== 授权配置体检 ===== */
.corp-check-card {
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #fff;
}

.corp-check-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.corp-check-name {
  font-size: 14px;
  font-weight: 600;
  color: #223;
}

.corp-check-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

.corp-check-badge.all-ok {
  background: #e7f6ec;
  color: #1a9c4b;
}

.corp-check-badge.has-fail {
  background: #fdecec;
  color: #d9363e;
}

.corp-check-time {
  font-size: 12px;
  color: #98a2b3;
}

.corp-check-head .el-button {
  margin-left: auto;
  padding: 4px 12px;
  font-size: 12px;
}

.corp-check-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.corp-check-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.corp-check-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
  align-self: center;
}

.corp-check-light.ok {
  background: #1a9c4b;
}

.corp-check-light.fail {
  background: #d9363e;
}

.corp-check-label {
  color: #223;
  font-weight: 500;
  min-width: 60px;
}

.corp-check-detail {
  color: #737b89;
  font-size: 12px;
}

.corp-check-error {
  color: #d9363e;
}

.corp-check-fix {
  flex-basis: 100%;
  font-size: 12px;
  color: #b25e09;
  background: #fff8ec;
  border-radius: 6px;
  padding: 4px 10px;
  margin-left: 16px;
}

/* ========== 全局运行状态：侧边栏徽章 + 右侧抽屉 ========== */
.running-status-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 24px);
  margin: 2px 12px 8px;
  padding: 7px 10px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.running-status-entry:hover {
  background: #f2f4f7;
  border-color: var(--border);
}
.running-status-entry.is-running {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary-active);
}
.rs-entry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.rs-entry-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.running-status-entry.is-running .rs-entry-dot {
  background: var(--primary);
  animation: rsPulse 1.4s ease-out infinite;
}
@keyframes rsPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 181, 150, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(0, 181, 150, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 181, 150, 0); }
}
.rs-entry-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.rs-entry-count {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.app-wrapper.sidebar-collapsed .rs-entry-text,
.app-wrapper.sidebar-collapsed .rs-entry-count {
  display: none;
}
.app-wrapper.sidebar-collapsed .running-status-entry {
  justify-content: center;
  width: calc(100% - 12px);
  margin: 2px 6px 8px;
  padding: 7px 0;
}

.rs-drawer {
  position: fixed;
  inset: 0;
  z-index: 3000;
}
.rs-drawer.hidden { display: none; }
.rs-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  animation: rsFade 0.18s ease;
}
@keyframes rsFade { from { opacity: 0; } to { opacity: 1; } }
.rs-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 92vw;
  background: var(--card);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  animation: rsSlideIn 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes rsSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.rs-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-light);
}
.rs-drawer-title { display: flex; flex-direction: column; gap: 3px; }
.rs-drawer-title-main { font-size: 16px; font-weight: 600; color: var(--text); }
.rs-drawer-title-sub { font-size: 12px; color: var(--muted); }
.rs-drawer-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
}
.rs-drawer-close:hover { color: var(--text); }
.rs-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}
.rs-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
}
.rs-foot-hint { font-size: 12px; color: var(--muted); }

.rs-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 48px 16px;
}

.rs-corp {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 12px 8px;
  margin-bottom: 12px;
  background: #fff;
}
.rs-corp.is-current {
  border-color: var(--primary-border);
  box-shadow: 0 0 0 2px var(--primary-light) inset;
}
.rs-corp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.rs-corp-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rs-corp-current-tag {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--primary-active);
  background: var(--primary-light);
  border-radius: 4px;
  padding: 1px 6px;
}
.rs-switch-btn {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary-border);
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
}
.rs-switch-btn:hover { background: var(--primary-light); }

.rs-task { margin-bottom: 10px; }
.rs-task:last-child { margin-bottom: 2px; }
.rs-task-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.rs-task-label {
  font-size: 12px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rs-task-chip {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.rs-task-chip.type-distribute_tags { background: var(--warning); }
.rs-task-chip.type-group_chat_sync { background: #409eff; }
.rs-task-chip.type-group_member_sync { background: #9b7cf6; }
.rs-task-pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rs-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border-light);
  overflow: hidden;
}
.rs-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
  transition: width 0.4s ease;
}
.rs-task-detail {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.rs-task-eta { white-space: nowrap; color: var(--text-secondary); }

/* ========== 顶部企业切换器（搜索 + 状态） ========== */
.corp-switcher-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}
.corp-switcher-current {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.corp-switcher-caret {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.18s ease;
}
.corp-switcher-trigger[aria-expanded="true"] .corp-switcher-caret {
  transform: rotate(180deg);
}

.corp-switcher-panel {
  position: fixed;
  z-index: 2500;
  width: 240px;
  max-width: 92vw;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  padding: 8px;
  display: flex;
  flex-direction: column;
  animation: csPop 0.16s ease;
}
.corp-switcher-panel.hidden { display: none; }
@keyframes csPop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.corp-switcher-search input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: #fff;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.corp-switcher-search input:focus {
  border-color: var(--primary);
}
.corp-switcher-list {
  margin-top: 6px;
  max-height: 300px;
  overflow-y: auto;
}
.corp-switcher-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.corp-switcher-item:hover {
  background: var(--bg);
}
.corp-switcher-item.is-current {
  background: var(--primary-light);
}
.cs-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cs-item-name {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.corp-switcher-item.is-current .cs-item-name {
  color: var(--primary-active);
  font-weight: 600;
}
.cs-item-id {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-item-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--primary-active);
  background: var(--primary-light);
  border-radius: 10px;
  padding: 1px 7px 1px 5px;
}
.cs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: rsPulse 1.4s ease-out infinite;
}
.cs-item-check {
  flex-shrink: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
}
.corp-switcher-empty {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0;
}

/* ========== 在职顺序批量弹窗 ========== */
.onjob-seq-modal {
  width: min(760px, 94vw);
  max-height: min(88vh, 840px);
}
.onjob-seq-modal .modal-body {
  overflow: auto;
  padding-bottom: 16px;
}
.onjob-seq-tips {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f7f9fc 0%, #f3f6fa 100%);
  border: 1px solid #e8edf3;
  border-radius: 8px;
}
.onjob-seq-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #606266;
}
.onjob-seq-tip-n {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: #409eff;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.onjob-seq-msg {
  margin: 0 0 14px;
}
.onjob-seq-msg label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.onjob-seq-optional {
  font-size: 12px;
  font-weight: 400;
  color: #909399;
  background: #f0f2f5;
  border-radius: 4px;
  padding: 0 6px;
  line-height: 18px;
}
.onjob-seq-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.onjob-seq-summary {
  font-size: 13px;
  color: #606266;
  min-width: 0;
}
.onjob-seq-summary strong {
  color: #303133;
  font-weight: 600;
}
.onjob-seq-summary .is-warn {
  color: #e6a23c;
  font-weight: 600;
}
.onjob-seq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(48vh, 460px);
  overflow: auto;
  padding: 2px;
}
.onjob-seq-empty {
  padding: 36px 16px;
  text-align: center;
  color: #909399;
  font-size: 13px;
  border: 1px dashed #dcdfe6;
  border-radius: 8px;
  background: #fafbfc;
}
.onjob-seq-group {
  border: 1px solid #e4e7ed;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.onjob-seq-group-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #eef1f5;
}
.onjob-seq-group-meta {
  flex: 1;
  min-width: 0;
}
.onjob-seq-group-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #909399;
}
.onjob-seq-group-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: #303133;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.onjob-seq-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #fff;
  color: #303133;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.onjob-seq-pick:hover {
  border-color: #c0c4cc;
}
.onjob-seq-pick:focus {
  outline: none;
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.15);
}
.onjob-seq-pick.is-empty {
  color: #909399;
  border-style: dashed;
}
.onjob-seq-pick.is-need {
  border-color: #f5c78a;
  background: #fffaf3;
  color: #e6a23c;
}
.onjob-seq-pick-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.onjob-seq-pick-caret {
  flex-shrink: 0;
  color: #c0c4cc;
  font-size: 11px;
}
.onjob-seq-group-del {
  flex-shrink: 0;
  margin-top: 2px;
  border: none;
  background: transparent;
  color: #f56c6c;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.onjob-seq-group-del:hover {
  background: #fef0f0;
}
.onjob-seq-segs {
  display: flex;
  flex-direction: column;
}
.onjob-seq-seg {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid #f0f2f5;
}
.onjob-seq-seg:first-child {
  border-top: none;
}
.onjob-seq-seg-range {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.onjob-seq-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ecf5ff;
  color: #409eff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.onjob-seq-badge.is-rest {
  background: #f0f9eb;
  color: #67c23a;
}
.onjob-seq-badge.is-all {
  background: #f4f4f5;
  color: #606266;
}
.onjob-seq-seg-sub {
  font-size: 12px;
  color: #909399;
  padding-left: 2px;
}
.onjob-seq-progress {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f7fa;
  border: 1px solid #ebeef5;
  color: #606266;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow: auto;
}
@media (max-width: 640px) {
  .onjob-seq-seg {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .onjob-seq-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== 识客链接 ===== */
body.trk-standalone {
  margin: 0;
  background: #f0f2f5;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  font-size: 14px;
}
.trk-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.trk-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.trk-title { font-size: 18px; font-weight: 600; line-height: 1.4; }
.trk-sub, .trk-page .hint { color: #909399; font-size: 13px; margin: 4px 0 0; line-height: 1.5; }
.trk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trk-page .content-card { margin-bottom: 12px; }
.trk-create-card .card-body { padding: 16px 16px 14px; }
.trk-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.7fr) minmax(200px, 0.8fr) auto;
  gap: 12px 16px;
  align-items: end;
}
.trk-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.trk-field-url { grid-column: 1 / -1; }
.trk-field label {
  font-size: 13px;
  color: #606266;
  line-height: 1.2;
}
.trk-field .trk-req { color: #f56c6c; margin-right: 2px; }
.trk-field input,
.trk-field select {
  width: 100%;
  height: 32px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 11px;
  font-size: 13px;
  background: #fff;
  color: #303133;
}
.trk-field input:focus,
.trk-field select:focus {
  border-color: var(--primary);
  outline: none;
}
.trk-field-action .el-button {
  height: 32px;
  padding: 0 16px;
}
.trk-corp-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #606266;
}
.trk-create-hint { margin: 10px 0 0; }
.trk-table-wrap { overflow: auto; }
table.trk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
table.trk-table th,
table.trk-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #ebeef5;
}
table.trk-table th {
  color: #737b89;
  font-weight: 500;
  background: #f2f5f9;
  font-size: 13px;
  white-space: nowrap;
}
table.trk-table tbody tr:hover td { background: #fafbfc; }
.trk-table-links th:nth-child(1) { width: 26%; }
.trk-table-links th:nth-child(2) { width: 16%; }
.trk-table-links th:nth-child(3) { width: 28%; }
.trk-table-links th:nth-child(4) { width: 12%; }
.trk-table-links th:nth-child(5) { width: 12%; }
.trk-table-links th:nth-child(6) { width: 72px; }
.trk-table-visits th:nth-child(1) { width: 160px; }
.trk-table-visits th:nth-child(2) { width: 22%; }
.trk-table-visits th:nth-child(3) { width: 100px; }
.trk-table-visits th:nth-child(4) { width: 28%; }
.trk-table-visits th:nth-child(5) { width: 140px; }
.trk-short { display: flex; align-items: center; gap: 2px; min-width: 0; }
.trk-short code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #00a085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #606266;
}
.trk-meta { color: #303133; }
.trk-meta-sub { margin-top: 4px; }
.trk-nowrap { white-space: nowrap; }
.trk-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.trk-muted { color: #c0c4cc; }
.trk-stat { font-weight: 600; color: #303133; }
.trk-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 22px;
  background: #e6faf5;
  color: #00a085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-chip.is-muted { background: #f4f4f5; color: #909399; }
.trk-chip.is-warn { background: #fdf6ec; color: #e6a23c; }
.trk-chip.is-info { background: #f4f4f5; color: #909399; }
.trk-search {
  width: 240px;
  height: 32px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 11px;
  font-size: 13px;
}
.trk-search:focus { border-color: var(--primary); outline: none; }
.trk-select {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 13px;
  min-width: 200px;
  background: #fff;
  height: 32px;
}
.trk-empty { color: #909399; text-align: center; padding: 40px 12px; font-size: 13px; }
.trk-count { font-size: 13px; color: #909399; font-weight: 400; }
@media (max-width: 960px) {
  .trk-create-grid { grid-template-columns: 1fr 1fr; }
  .trk-field-url { grid-column: 1 / -1; }
  .trk-field-action { grid-column: 1 / -1; }
  table.trk-table { table-layout: auto; }
}

/* 管理后台对照：表头/表体是两张表，必须共用同一套列宽，否则 fixed 布局会对不齐 */
#panel-work-admin #waStaffSelect .el-select__wrapper {
  min-height: 32px;
  height: 32px;
}
#panel-work-admin #waStaffLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
#panel-work-admin .wa-cust-table-wrap {
  max-height: 420px;
  overflow: auto;
}
#panel-work-admin .wa-cust-table {
  width: 100%;
  min-width: 992px;
  table-layout: fixed;
}
#panel-work-admin .wa-cust-table col.wa-col-avatar { width: 56px; }
#panel-work-admin .wa-cust-table col.wa-col-name { width: 200px; }
#panel-work-admin .wa-cust-table col.wa-col-gender { width: 56px; }
#panel-work-admin .wa-cust-table col.wa-col-follow { width: 88px; }
#panel-work-admin .wa-cust-table col.wa-col-acct { width: 180px; }
#panel-work-admin .wa-cust-table col.wa-col-time { width: 168px; }
#panel-work-admin .wa-cust-table th.el-table__cell {
  background: rgb(242, 245, 249);
  font-size: 13px;
  color: rgb(115, 123, 137);
}
#panel-work-admin .wa-cust-table .cell {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 统一系统弹窗 / 原生控件对齐一维 ===== */
.sys-dialog {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sys-dialog.hidden { display: none; }
.sys-dialog-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.sys-dialog-box {
  position: relative;
  z-index: 1;
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.sys-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}
.sys-dialog-title {
  font-size: 16px;
  font-weight: 500;
  color: #112233;
}
.sys-dialog-close {
  min-width: 28px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: #909399;
}
.sys-dialog-body { padding: 12px 20px 8px; }
.sys-dialog-msg {
  font-size: 14px;
  color: #444a59;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.sys-dialog-msg.hidden { display: none; }
.sys-dialog-field { margin-top: 12px; }
.sys-dialog-field.hidden { display: none; }
.sys-dialog-input {
  width: 100%;
  height: 32px;
  padding: 0 11px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 14px;
}
.sys-dialog-input:focus {
  outline: none;
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.sys-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
}

.modal-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.modal-head h3 {
  font-size: 16px;
  font-weight: 500;
  color: #112233;
}
.modal-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid #f0f0f0;
}
.modal .btn,
.btn.btn-default,
.btn.btn-primary {
  height: 32px;
  padding: 0 15px;
  border-radius: 4px;
  font-size: 14px;
}
.btn.btn-primary {
  background: #1677ff;
  border-color: #1677ff;
}
.btn.btn-default {
  background: #fff;
  color: #112233;
  border-color: #dcdfe6;
}
.btn.btn-default:hover {
  color: #1677ff;
  border-color: #1677ff;
  background: #fff;
}

.data-table th {
  background: rgb(242, 245, 249);
  font-size: 13px;
  font-weight: 500;
  color: rgb(115, 123, 137);
  border-bottom: 1px solid #ebeef5;
}
.data-table td {
  color: #112233;
  border-bottom: 1px solid #ebeef5;
}

.form-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-row textarea,
.form-row select,
select.el-input__inner,
select.kf-account-select,
select.trk-antd-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  color: #112233;
}
.form-row select,
select.el-input__inner,
select.kf-account-select,
select.trk-antd-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'><path fill='%23909399' d='M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 28px;
}
.form-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.form-row input[type="checkbox"],
.form-row input[type="radio"],
.checkbox-inline input[type="checkbox"],
.checkbox-row input[type="checkbox"],
.auto-refresh-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1677ff;
  flex: none;
}

.sys-check-select {
  min-height: 96px;
  max-height: 160px;
  overflow: auto;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  padding: 6px 8px;
}
.sys-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  font-size: 13px;
  color: #112233;
  cursor: pointer;
}
.sys-check-item input {
  width: 16px;
  height: 16px;
  accent-color: #1677ff;
  flex: none;
}
.sys-check-empty {
  font-size: 13px;
  color: #909399;
  padding: 12px 4px;
}

.sys-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sys-file-name {
  font-size: 13px;
  color: #737b89;
}

.kf-account-select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background-color: #fff;
  font-size: 13px;
  color: #112233;
  max-width: 220px;
}
.kf-input-row textarea {
  flex: 1;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}
.kf-input-row textarea:focus {
  outline: none;
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

#saveTokenBtn {
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 4px;
  background: #1677ff;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
#adminToken {
  border-radius: 4px;
}

.shortcut-btn.el-button {
  margin: 0 8px 8px 0;
}

.filter-select[multiple] {
  display: none;
}

/* ===== 手机适配 ===== */
@media (max-width: 960px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.mobile-sidebar-open {
    overflow: hidden;
  }

  .app-wrapper,
  .main-container,
  .app-main,
  .app-scrollbar,
  .yw-container,
  .yw-body {
    max-width: 100%;
    min-width: 0;
  }

  .yw-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 8px !important;
  }

  .app-scrollbar > .panel {
    padding: 12px;
  }

  .page-toolbar,
  .action-bar,
  .customer-table-toolbar,
  .card-head-row,
  .flex-bet,
  .lc-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .toolbar-left,
  .toolbar-right,
  .action-bar-left,
  .action-bar-right {
    width: 100%;
  }

  .filter-grid.yiwei-filter {
    grid-template-columns: 1fr;
  }

  .dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .shortcut-btn,
  .shortcut-btn.el-button {
    min-width: 0;
    width: 100%;
    margin: 0 !important;
  }

  .table-wrap,
  .table-wrapper,
  .stat-table,
  .el-table__inner-wrapper,
  .tag-lib-customer-table-wrap,
  .tag-task-detail-table-wrap,
  .wa-cust-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .el-pagination,
  .el-pagination__rightwrapper,
  .bottom-pag,
  .pagination-btns,
  .customer-table-section .table-footer {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 8px;
  }

  #panel-batch-tag .customer-list .search-content {
    max-height: 34vh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #panel-batch-tag .customer-list .customer-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  #panel-batch-tag .customer-list .customer-list-header .list-batch-search {
    position: static;
  }

  #panel-batch-tag .customer-list-table {
    height: auto;
  }

  #panel-batch-tag .customer-list .search-content .search-item,
  #panel-group-list .customer-group-list .search-content .search-item,
  #panel-group-member .group-member .search-content .search-item {
    width: 100%;
    flex-wrap: wrap;
    padding-right: 0;
  }

  #panel-batch-tag .customer-list .search-content .search-label,
  #panel-group-list .customer-group-list .search-content .search-label,
  #panel-group-member .group-member .search-content .search-label {
    width: 100%;
    text-align: left;
    margin-bottom: 6px;
  }

  #panel-batch-tag .customer-list .search-content .search-value,
  #panel-group-list .customer-group-list .search-content .search-value,
  #panel-group-member .group-member .search-content .search-value {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    flex-shrink: 1;
    min-width: 0;
  }

  #panel-batch-tag .customer-list .search-content .el-range-editor,
  #panel-group-list .customer-group-list .search-content .el-range-editor,
  #panel-group-member .group-member .search-content .el-range-editor {
    width: 100% !important;
    max-width: 100%;
  }

  #panel-batch-tag .customer-list .search-content .search-item[data-filter-field="group_multi_tags"] {
    flex-wrap: wrap;
  }

  #panel-group-list .customer-group-list .search-content .search-item-split {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
  }

  #panel-group-list .group-list-body {
    height: auto;
    min-height: 0;
  }

  #panel-group-list .group-list-content {
    flex-direction: column;
  }

  #panel-group-list .yw-group-label-tree {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #e5eaf0;
  }

  #panel-customer-stats .top-cards,
  #panel-group-stat .top-cards {
    flex-wrap: wrap;
  }

  #panel-customer-stats .top-cards .large-card,
  #panel-group-stat .top-cards .large-card {
    flex: 1 1 50%;
    min-width: 50%;
    max-width: 50%;
    height: auto;
    padding: 16px 12px 16px 16px;
    box-sizing: border-box;
  }

  #panel-tag-lib .tag-lib-customer-table-wrap,
  #panel-group-tag-lib .tag-lib-customer-table-wrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  #panel-tag-lib .yw-header,
  #panel-group-tag-lib .yw-header {
    display: flex;
    flex-direction: column;
  }

  #panel-tag-lib .tag-lib-personal-help {
    position: static;
    order: -1;
    margin: 0 0 8px;
    white-space: normal;
    line-height: 1.4;
  }

  #panel-tag-lib .el-tabs__nav-wrap,
  #panel-group-tag-lib .el-tabs__nav-wrap {
    overflow: hidden;
  }

  #panel-tag-lib .tag-lib-staff-select {
    min-width: 0 !important;
  }

  .main-container:has(#panel-batch-tag.active),
  .main-container:has(.panel-yiwei.active:not(#panel-batch-tag)) {
    height: 100dvh;
  }

  #panel-batch-tag .customer-list .search-content .search-item[data-filter-field="tags"] .el-select,
  #panel-batch-tag .customer-list .search-content .search-item[data-filter-field="group_multi_tags"] .group-multi-tag-group {
    width: 100% !important;
    margin-left: 0 !important;
  }

  #panel-batch-tag .customer-list-table .table-wrapper {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  #panel-group-detail .detail-content,
  #panel-customer-detail .customer-detail-page .detail-content {
    flex-direction: column;
    overflow: auto;
  }

  #panel-group-detail .content-right,
  #panel-customer-detail .content-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e5eaf0;
  }

  #panel-group-detail .yw-container,
  #panel-customer-detail .yw-container {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .lc-main-layout {
    flex-direction: column;
  }

  .lc-group-sidebar {
    width: 100%;
    max-height: 220px;
    overflow: auto;
  }

  .el-dialog,
  .el-overlay-dialog .el-dialog {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin: 8px auto !important;
  }

  .lc-modal-body,
  .modal-box,
  .sys-dialog-box,
  .distribute-tags-dialog,
  .gm-dup-fans-group-picker-dialog {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px);
  }

  .el-tabs__nav-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  input.el-input__inner,
  textarea.el-input__inner,
  .el-select__wrapper,
  select,
  input[type="text"],
  input[type="search"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="url"] {
    font-size: 16px;
  }

  .kf-layout,
  .kf-layout-standalone {
    flex-direction: column;
    min-height: 0;
    height: auto;
    flex: 1;
  }

  .kf-standalone-body,
  .kf-standalone-shell {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .kf-standalone-toolbar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .kf-standalone-toolbar .ant-btn,
  .kf-standalone-toolbar select,
  .kf-standalone-toolbar .kf-account-select {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .kf-conv-list {
    width: 100%;
    max-height: 30vh;
    border-right: none;
    border-bottom: 1px solid #e4e7ed;
  }

  .kf-chat-panel {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .kf-input-row {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .kf-input-row textarea {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    order: -1;
  }

  .corp-switcher-panel {
    width: min(320px, calc(100vw - 16px)) !important;
    left: 8px !important;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .dashboard-cards {
    grid-template-columns: 1fr 1fr;
  }

  .duplicate-fans-cards .large-card {
    flex: 1 1 100%;
    min-width: 100%;
  }
}
