:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --success: #16a34a;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  --purple: #9333ea;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

/* ================= 独立登录页 ================= */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.login-card {
  background: #ffffff;
  width: 100%;
  max-width: 380px;
  border-radius: 24px;
  padding: 40px 28px 36px 28px;
  box-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.35);
  animation: appCardSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes appCardSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-badge {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.login-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.input-group input {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 44px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-group input::placeholder {
  color: #94a3b8;
  font-size: 14px;
}

.btn-app-login {
  margin-top: 10px;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 26px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px -4px rgba(37, 99, 235, 0.5);
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-app-login:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px -2px rgba(37, 99, 235, 0.4);
}

/* ================= 业务主界面结构 ================= */
.app-layout {
  min-height: 100vh;
}

/* 默认移动端：隐藏 PC 左侧侧边栏 */
.app-sidebar {
  display: none;
}

.app-main-wrapper {
  width: 100%;
  padding-bottom: 80px; /* 留出手机底栏空间 */
}

/* 顶部 Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo-badge {
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 6px;
  border-radius: 6px;
}

.app-title {
  font-size: 16px;
  font-weight: 700;
}

.current-role-badge {
  font-size: 11px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

/* 需求 1：确保头部右侧区域始终牢牢靠在右上角 */
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border-radius: 18px;
  padding: 4px 12px 4px 5px;
}

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

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.btn-header-action {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-header-action:active {
  background: #e2e8f0;
}

.btn-logout {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

/* 顶部移动端设置图标与下拉菜单 */
.mobile-settings-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-settings-btn:active {
  background: #e2e8f0;
  transform: scale(0.95);
}

.mobile-settings-btn svg {
  width: 20px;
  height: 20px;
}

/* 设置下拉菜单 */
.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  padding: 6px;
  z-index: 1000;
  transform: scale(0.95) translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.settings-dropdown.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.dropdown-item.user-info-item {
  cursor: default;
  background: #f8fafc;
  padding: 10px 12px;
  margin-bottom: 4px;
}

.dropdown-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.dropdown-text {
  flex: 1;
  min-width: 0;
}

.dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-role {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
}

.dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 0;
}

.dropdown-item.action-btn:hover,
.dropdown-item.action-btn:active {
  background: #f1f5f9;
  color: #0f172a;
}

.dropdown-item.action-btn.danger {
  color: #dc2626;
}

.dropdown-item.action-btn.danger:hover,
.dropdown-item.action-btn.danger:active {
  background: #fef2f2;
}

/* 移动端专属响应规则：左侧隐藏标题文字，仅保留 CRM 徽标；右侧隐藏 PC 胶囊 */
@media (max-width: 767px) {
  .app-header .header-titles {
    display: none !important;
  }

  .app-header .pc-only {
    display: none !important;
  }
}

/* 主内容容器 */
.app-content {
  padding: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= 统一页面头部与操作栏规范 ================= */
.view-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}

.view-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.view-main-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.2;
}

.view-sub-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.view-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 10px;
  border-radius: 9999px;
  white-space: nowrap;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  flex-shrink: 0;
}

.status-indicator-dot.success {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.status-indicator-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.status-indicator-dot.info {
  background: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1e40af;
  box-shadow: 0 2px 4px 0 rgba(37, 99, 235, 0.2);
}

.btn-primary:active {
  transform: scale(0.98);
  background: #1e40af;
}

.btn-primary .btn-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

/* 统一过滤与搜索工具栏 */
.view-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.search-box-flex {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  height: 38px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.search-box-flex:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-box-flex .search-svg {
  width: 15px;
  height: 15px;
  color: #94a3b8;
  margin-right: 8px;
  flex-shrink: 0;
}

.search-box-flex input {
  border: none;
  outline: none;
  width: 100%;
  height: 100%;
  font-size: 13px;
  color: #0f172a;
  background: transparent;
}

.search-box-flex input::placeholder {
  color: #94a3b8;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-select {
  appearance: none;
  -webkit-appearance: none;
  height: 38px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  padding: 0 28px 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  outline: none;
  transition: all 0.15s;
}

.toolbar-select:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

.toolbar-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-mobile-filter {
  display: none;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  position: relative;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-mobile-filter:active {
  background: #f1f5f9;
}

.btn-mobile-filter svg {
  width: 14px;
  height: 14px;
  color: #475569;
}

.filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  position: absolute;
  top: 6px;
  right: 6px;
}

/* 现代卡片列表规范 */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.1px;
}

/* 现代化状态标签：柔和背景 + 6px 实体圆点 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.2;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-pool { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.status-following { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-visited { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-signed { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.status-lost { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

.card-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.phone-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* 导航地址点击高亮样式 */
.address-link {
  color: #0369a1;
  text-decoration: none;
  border-bottom: 1px dashed #7dd3fc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.address-link:active {
  background: #f0f9ff;
}

.card-notes {
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #475569;
  border-left: 3px solid #cbd5e1;
}

/* 拜访摸排时间专属区域 */
.visit-highlight-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.visit-highlight-box.unvisited {
  background: #fffbeb;
  border-color: #fde68a;
}

.visit-time-text {
  font-size: 13px;
  font-weight: 700;
  color: #15803d;
  display: flex;
  align-items: center;
  gap: 6px;
}

.visit-highlight-box.unvisited .visit-time-text {
  color: #b45309;
}

.visit-summary-snippet {
  font-size: 12px;
  color: #334155;
}

/* 卡片操作按钮行 */
.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
  margin-top: 4px;
}

/* 需求 2：认领按钮样式（精简利落） */
.btn-claim {
  background: #2563eb;
  color: white;
  border: none;
  padding: 9px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  letter-spacing: 1px;
  transition: background 0.15s;
}

.btn-claim:active {
  background: #1d4ed8;
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-action-primary {
  background: var(--success);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-transfer {
  background: #2563eb;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-transfer:hover {
  background: #1d4ed8;
}

.btn-release {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-release:hover {
  background: #fef2f2;
  border-color: #f87171;
}

/* 认领者归属提示横条 */
.claimed-owner-banner {
  background: #f0f7ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.owner-pill {
  color: #0369a1;
}

.claim-time {
  color: #64748b;
  font-size: 11px;
}

/* 模块标题与顶栏 */
.section-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.section-heading p {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.admin-user-selector-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  background: #ffffff;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-user-selector-wrap select {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  cursor: pointer;
}

/* 团队业务员成员网格 */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.member-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.member-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.member-card-info {
  flex: 1;
  min-width: 0;
}

.member-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.member-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}

.member-role-tag {
  background: #eff6ff;
  color: #2563eb;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
}

.member-card-time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

/* 筛选条 */
.admin-filter-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.admin-filter-bar select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-tab {
  background: #f1f5f9;
  border: none;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.filter-tab.active {
  background: var(--primary);
  color: #ffffff;
}

/* 统计看板 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

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

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.highlight-blue { color: var(--primary); }
.highlight-green { color: var(--success); }
.highlight-purple { color: var(--purple); }

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

.section-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.sales-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.sales-row:last-child {
  border-bottom: none;
}

.sales-user {
  font-weight: 600;
}

.sales-tags {
  display: flex;
  gap: 8px;
}

.sales-tag {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
}

.stream-item {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.stream-item:last-child {
  border-bottom: none;
}

.stream-top {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 4px;
}

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

.stream-summary {
  font-size: 12px;
  color: #475569;
}

/* 底部导航栏（移动端） */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: #64748b;
  position: relative;
  flex: 1;
}

.nav-item.active {
  color: var(--primary);
}

.nav-svg {
  width: 20px;
  height: 20px;
}

.nav-text {
  font-size: 11px;
  font-weight: 600;
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: 28%;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  display: none;
}

/* 弹窗遮罩与主体 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: #fff;
  width: 100%;
  max-width: 550px;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.form-group {
  margin-bottom: 14px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

.required {
  color: #ef4444;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
}

.readonly-text {
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
  font-size: 13px;
}

.checkbox-label input {
  width: auto;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit {
  flex: 2;
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.full-width {
  width: 100%;
}

/* 时间轴 */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.timeline-item {
  border-left: 2px solid var(--primary);
  padding-left: 12px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

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

.timeline-summary {
  font-size: 13px;
  color: #1e293b;
  margin-top: 2px;
}

.timeline-next {
  font-size: 12px;
  color: #0369a1;
  background: #f0f9ff;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 4px;
  display: inline-block;
}

/* 地图导航 Action Sheet */
.map-modal-body {
  padding: 8px 0;
}

.map-target-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.map-target-addr {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.map-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.map-btn:active {
  background: #f1f5f9;
}

.map-btn span:first-child {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.map-btn-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.map-btn-amap:active {
  border-color: #2563eb;
  background: #eff6ff;
}

.map-btn-baidu:active {
  border-color: #ef4444;
  background: #fef2f2;
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  background: rgba(15, 23, 42, 0.9);
  color: white;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 14px;
}



/* 移动端左侧滑出抽屉组件 */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel.drawer-left {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: #ffffff;
  box-shadow: 6px 0 28px rgba(0, 0, 0, 0.18);
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.drawer-overlay.active .drawer-panel.drawer-left {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.drawer-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-chip {
  background: #f1f5f9;
  border: 1px solid transparent;
  color: #475569;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.drawer-chip:active {
  transform: scale(0.97);
}

.drawer-chip.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #2563eb;
  font-weight: 700;
}

.drawer-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.btn-drawer-reset {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn-drawer-confirm {
  flex: 1.5;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* 移动端筛选栏与头部规则 */
@media (max-width: 767px) {
  .view-header-bar {
    margin-bottom: 12px;
  }

  .view-main-title {
    font-size: 16px;
  }

  .view-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }

  .toolbar-filters.pc-only-filters {
    display: none !important;
  }

  .btn-mobile-filter {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 12px;
    height: 38px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    position: relative;
    transition: all 0.15s;
  }

  .btn-mobile-filter:active {
    background: #f1f5f9;
  }

  .btn-mobile-filter svg {
    width: 14px;
    height: 14px;
    color: #475569;
  }

  .filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    position: absolute;
    top: 6px;
    right: 6px;
  }

  .search-box-flex {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 38px;
  }
}

/* 公海线索与我的客户：自适应切换容器 */
.pool-leads-container,
.my-leads-container {
  display: block;
  width: 100%;
}

.crm-cards-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crm-table-view {
  display: none;
}

/* ========================================================
   【PC / 桌面端双模响应式适配】(>= 768px 屏幕生效)
   ======================================================== */
@media (min-width: 768px) {
  .app-layout {
    display: flex;
    min-height: 100vh;
  }

  /* 1. 展现左侧菜单侧边栏（收窄宽度至 200px） */
  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: 200px;
    min-width: 200px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 18px 12px;
    z-index: 50;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
  }

  .sidebar-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  }

  .brand-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
  }

  .brand-sub {
    font-size: 11px;
    color: #64748b;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }

  .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    position: relative;
  }

  .sidebar-nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
  }

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

  .sidebar-nav-item .nav-svg {
    width: 17px;
    height: 17px;
  }

  .sidebar-nav-item .nav-badge {
    position: static;
    margin-left: auto;
    display: none;
  }

  .sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  .sidebar-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    background: #ffffff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
  }

  .sidebar-action-btn:hover {
    background: #f8fafc;
    color: #0f172a;
  }

  .sidebar-action-btn.logout:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
  }

  /* 2. 隐藏移动端底栏 */
  .bottom-nav {
    display: none !important;
  }

  /* 3. 优化 PC 端右侧主界面排版 */
  .app-main-wrapper {
    flex: 1;
    min-width: 0;
    padding-bottom: 30px;
  }

  .app-header .header-left {
    display: none; /* PC 侧边栏已有品牌展示 */
  }

  /* 需求 1：PC 端顶部 Header 自动靠最右对齐，且只保留业务员芯片，修改密码与退出保留在左下角 */
  .app-header {
    justify-content: flex-end;
    padding: 14px 32px;
  }

  .mobile-settings-wrap {
    display: none !important;
  }

  .app-header .pc-only {
    display: flex !important;
  }

  .app-header .btn-header-action,
  .app-header .btn-logout {
    display: none !important;
  }

  .app-content {
    max-width: 1280px;
    padding: 24px 32px;
    margin: 0;
  }

  /* 4. PC 端客户卡片自适应多列网格 */
  .card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
  }

  /* 需求 2 & 3：公海线索池与我的客户在电脑端显示列表表格，不显示卡片 */
  .pool-leads-container,
  .my-leads-container {
    display: block !important;
    width: 100%;
  }

  .crm-cards-view {
    display: none !important;
  }

  .crm-table-view {
    display: block !important;
    width: 100%;
  }

  /* 需求 1：PC 端筛选栏比例优化：左侧放置筛选项，搜索框右对齐定宽 260px，不再反客为主撑满 */
  .view-filter-bar {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
  }

  .toolbar-filters.pc-only-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
  }

  .btn-mobile-filter {
    display: none !important;
  }

  .drawer-overlay {
    display: none !important;
  }

  .search-box-flex {
    width: 260px;
    min-width: 240px;
    max-width: 280px;
    flex-shrink: 0;
    margin-left: auto;
  }

  .crm-table-wrapper {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    overflow-x: auto;
  }

  .crm-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
    white-space: nowrap;
  }

  .crm-data-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #e2e8f0;
    letter-spacing: 0.5px;
  }

  .crm-data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
  }

  .crm-data-table tbody tr {
    transition: background-color 0.15s ease;
  }

  .crm-data-table tbody tr:hover {
    background-color: #f8fafc;
  }

  .crm-data-table tbody tr:last-child td {
    border-bottom: none;
  }

  .table-client-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
  }

  .table-client-notes {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .table-address-link {
    color: #2563eb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
  }

  .table-address-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
  }

  .table-address-link .nav-hint {
    font-size: 11px;
    color: #0284c7;
    background: #e0f2fe;
    padding: 1px 4px;
    border-radius: 4px;
  }

  .table-visit-time {
    font-size: 12px;
    color: #334155;
  }

  .table-unvisited-badge {
    display: inline-block;
    font-size: 11px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
  }

  .table-visit-count {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
  }

  .table-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }

  .btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    transition: all 0.15s;
  }

  .btn-table-action:hover {
    background: #f1f5f9;
    color: #0f172a;
  }

  .btn-table-action.primary {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
  }

  .btn-table-action.primary:hover {
    background: #15803d;
  }

  .btn-table-action.danger {
    color: #dc2626;
    border-color: #fecaca;
  }

  .btn-table-action.danger:hover {
    background: #fef2f2;
    border-color: #f87171;
  }

  .btn-table-action.claim {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    font-weight: 700;
    padding: 5px 16px;
    letter-spacing: 0.5px;
  }

  .btn-table-action.claim:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
  }

  /* 5. 统计大盘四列并排 */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
  }

  /* 6. PC 端弹窗居中显示 */
  .modal {
    align-items: center;
  }

  .modal-content {
    border-radius: 16px;
    max-height: 90vh;
    animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }
}

/* ================= 需求 1 & 2 & 3 新增规范样式 ================= */

/* 可点击的跟进记录数字徽标 */
.visit-count-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.visit-count-link:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
}

.visit-count-link:active {
  transform: translateY(0);
}

.visit-count-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.visit-count-chip:active {
  background: #e2e8f0;
}

.visit-count-chip strong {
  color: #2563eb;
}

/* 跟进历史弹窗顶部工具栏 */
.history-modal-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* 客户全貌详情弹窗主体样式 */
.client-detail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 2px;
}

.detail-header-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.detail-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.detail-owner-info {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.detail-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.detail-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-item.full-width {
  grid-column: span 2;
}

.detail-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.detail-value {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  word-break: break-all;
}

.detail-value.highlight-date {
  color: #2563eb;
}

.address-nav-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-micro-nav {
  background: #e0f2fe;
  color: #0284c7;
  border: none;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-micro-nav:hover {
  background: #bae6fd;
}

.detail-notes-box {
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
  white-space: pre-wrap;
}

.detail-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* 合同到期倒计时状态徽标 */
.due-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.due-badge.normal {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.due-badge.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.due-badge.expired {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}

/* 按钮微小调整 */
.btn-table-action.success {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.btn-table-action.success:hover {
  background: #15803d;
}

.signed-leads-container {
  display: block;
  width: 100%;
}

/* ==================== 客户等级与场景类型徽章 ==================== */
.client-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.3;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.client-level-badge.level-a {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.client-level-badge.level-b {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.client-level-badge.level-c {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.client-level-badge.level-d {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.scene-type-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1px 7px;
  border-radius: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

/* ==================== 客户意向与报价标签 ==================== */
.intention-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.3;
}

.intention-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.intention-badge.strong {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  color: #c2410c;
}

.intention-badge.good {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #15803d;
}

.intention-badge.normal {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
}

.intention-badge.weak {
  background: #fefce8;
  border: 1px solid #fef9c3;
  color: #a16207;
}

.intention-badge.none {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
}

.quote-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #92400e;
}

.quote-stage-text {
  font-size: 11px;
  color: #b45309;
  font-weight: 600;
}

.quote-amount-pill {
  font-size: 13px;
  font-weight: 800;
  color: #d97706;
}

.btn-micro-edit {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-micro-edit:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.feature-intro-box {
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  border-left: 2px solid #94a3b8;
  padding: 4px 8px;
  border-radius: 0 4px 4px 0;
  margin-top: 4px;
  line-height: 1.4;
}

/* ==================== 团队管理门户控制台（需求 2） ==================== */
.team-portal-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.portal-nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.portal-nav-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.portal-nav-card:active {
  transform: scale(0.99);
  background: #f8fafc;
}

.portal-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-card-icon svg {
  width: 24px;
  height: 24px;
}

.portal-card-icon.icon-claimed {
  background: #fef3c7;
  color: #b45309;
}

.portal-card-icon.icon-stats {
  background: #ecfdf5;
  color: #059669;
}

.portal-card-icon.icon-members {
  background: #eff6ff;
  color: #2563eb;
}

.portal-card-content {
  flex: 1;
  min-width: 0;
}

.portal-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.portal-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.portal-card-badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.portal-card-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-arrow-svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
}

/* 移动端专属子页面面包屑返回条 */
.team-subview-back-bar {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
}

.team-subview-back-bar svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 767px) {
  .team-subview-back-bar.mobile-only-flex {
    display: inline-flex;
  }
}

/* ==================== 业务员列表表格与移动端卡片（需求 1） ==================== */
.members-container {
  width: 100%;
}

.members-table-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
}

.btn-member-action {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}

.btn-member-action:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-member-action.edit {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.btn-member-action.edit:hover {
  background: #dbeafe;
}

.btn-member-action.pwd {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}

.btn-member-action.pwd:hover {
  background: #fef3c7;
}

.btn-member-action.delete {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.btn-member-action.delete:hover {
  background: #fee2e2;
}

/* 移动端业务员卡片优化 */
.mobile-member-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.mobile-member-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mobile-member-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.mobile-member-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.mobile-member-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.mobile-member-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px dashed #f1f5f9;
  padding-top: 10px;
}
