﻿:root {
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-viewed: #f0fdf4;
  --bg-viewed-border: #bbf7d0;
  --bg-active: #eff6ff;
  --bg-active-border: #3b82f6;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --purple: #8b5cf6;
  --purple-bg: #f5f3ff;
  --gold: #f59e0b;

  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 30px -10px rgb(0 0 0 / 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Top Navigation
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
}

.brand-info h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.brand-badge {
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-top: 2px;
}

.nav-search {
  position: relative;
  max-width: 520px;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-subtle);
  pointer-events: none;
}

.nav-search input {
  width: 100%;
  padding: 9px 36px 9px 38px;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.nav-search input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
}

.clear-btn:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: #fff;
  color: var(--text-main);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: #cbd5e1;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.btn-light {
  background: #f8fafc;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-light:hover {
  background: #edf2f7;
}

.btn-icon {
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-md);
}

.btn-icon:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Stat Metric Cards
   ========================================================================== */
.stat-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  padding: 20px 28px 10px 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-total {
  border-top: 3px solid var(--primary);
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

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

.stat-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.tag-total { background: #eff6ff; color: #1d4ed8; }
.tag-gold { background: #fef3c7; color: #b45309; }
.tag-green { background: #dcfce7; color: #15803d; }
.tag-purple { background: #f3e8ff; color: #6b21a8; }
.tag-orange { background: #ffedd5; color: #c2410c; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }

.stat-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 11px;
  color: var(--text-subtle);
}

/* ==========================================================================
   Toolbar & Filters
   ========================================================================== */
.toolbar-section {
  padding: 10px 28px;
}

.tabs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.tab-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.filters-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--bg-card);
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.select-input {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.select-input:focus {
  border-color: var(--primary);
  background: #fff;
}

.select-input-sm {
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

.filter-checkboxes {
  display: flex;
  align-items: center;
  gap: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

/* ==========================================================================
   Batch Action Bar
   ========================================================================== */
.batch-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translate(-50%, 40px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.batch-left {
  font-size: 12px;
  font-weight: 600;
  color: #93c5fd;
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Main Table Card
   ========================================================================== */
.main-content {
  padding: 10px 28px 40px 28px;
}

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  background: #fafbfc;
}

.table-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.count-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

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

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  vertical-align: middle;
  transition: background 0.15s ease;
}

/* Table Row Interactive States (变色与反馈) */
.data-table tbody tr {
  cursor: pointer;
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background-color: var(--bg-hover);
}

/* 已点击/已查阅 行状态 (柔和薄荷淡绿底色) */
.data-table tbody tr.row-viewed {
  background-color: var(--bg-viewed);
}

.data-table tbody tr.row-viewed:hover {
  background-color: #e2fbe8;
}

/* 当前被选中的活跃行 (左侧高亮细条与柔和蓝底色) */
.data-table tbody tr.row-active {
  background-color: var(--bg-active) !important;
  outline: 1px solid rgba(59, 130, 246, 0.4);
}

/* Cell content components */
.view-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.view-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-tag.viewed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.view-tag.unviewed {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.comp-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comp-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.3;
}

.comp-snippet {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.country-pill {
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  white-space: nowrap;
}

.session-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.session-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.star-rating {
  color: #f59e0b;
  font-size: 12px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.star-score {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.contact-icons-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.c-icon {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.c-icon.active {
  background: #dbeafe;
  color: #1d4ed8;
}

.c-icon.inactive {
  background: #f1f5f9;
  color: #cbd5e1;
}

.contact-text-snippet {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  white-space: nowrap;
}

.status-未跟进 { background: #f1f5f9; color: #64748b; }
.status-重点关注 { background: #fee2e2; color: #b91c1c; }
.status-意向强烈 { background: #ffedd5; color: #c2410c; }
.status-跟进中 { background: #dbeafe; color: #1d4ed8; }
.status-待报价 { background: #f3e8ff; color: #6b21a8; }
.status-已成交 { background: #dcfce7; color: #15803d; }
.status-暂无需求 { background: #f3f4f6; color: #4b5563; }
.status-无效联系 { background: #18181b; color: #a1a1aa; }

.plan-snippet {
  font-size: 11px;
  color: var(--text-main);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-date-badge {
  font-size: 10px;
  font-weight: 600;
  color: #ea580c;
  background: #ffedd5;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

.btn-open-card {
  padding: 4px 8px;
  font-size: 11px;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-open-card:hover {
  background: var(--primary);
  color: #fff;
}

.loading-cell {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Table Footer & Pagination
   ========================================================================== */
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: #fafbfc;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

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

.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 10px;
}

.page-jump-input {
  width: 48px;
  padding: 3px 6px;
  font-size: 12px;
  text-align: center;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}

.page-jump-input:focus {
  border-color: #2563eb;
}

.page-jump-btn {
  padding: 3px 8px !important;
  font-size: 12px !important;
  cursor: pointer;
}

.page-numbers {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  padding: 0 6px;
}

/* ==========================================================================
   Slide-out Drawer (右侧跟进管理抽屉)
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.customer-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 580px;
  max-width: 95vw;
  background: #fff;
  z-index: 100;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.customer-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #fafbfc;
}

.drawer-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.star-pill {
  font-size: 11px;
  font-weight: 700;
  background: #fef3c7;
  color: #b45309;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.session-pill {
  font-size: 11px;
  font-weight: 700;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.viewed-pill {
  font-size: 11px;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.drawer-title-group h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.drawer-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 0 4px;
}

.drawer-close-btn:hover {
  color: var(--text-main);
}

.quick-contact-bar {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
  overflow-x: auto;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.quick-action-btn:hover {
  background: var(--bg-hover);
  border-color: #cbd5e1;
}

.quick-action-btn svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

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

.drawer-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.highlight-card {
  border-color: #bfdbfe;
  background: #fbfdff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.section-heading svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

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

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

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

.info-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.info-value {
  font-size: 13px;
  color: var(--text-main);
  word-break: break-all;
}

/* CRM Status Pill Selector */
.status-pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 14px;
}

.status-option input {
  display: none;
}

.status-option .pill {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.status-option input:checked + .pill {
  outline: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  font-weight: 700;
}

.pill-default { background: #f1f5f9; color: #475569; }
.pill-red { background: #fee2e2; color: #b91c1c; }
.pill-orange { background: #ffedd5; color: #c2410c; }
.pill-blue { background: #dbeafe; color: #1d4ed8; }
.pill-purple { background: #f3e8ff; color: #6b21a8; }
.pill-green { background: #dcfce7; color: #15803d; }
.pill-grey { background: #f3f4f6; color: #4b5563; }
.pill-black { background: #27272a; color: #e4e4e7; }

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

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

.form-input, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  background: #fff;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-action-row {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid #e2e8f0;
}

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

.timeline-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
}

.timeline-content {
  font-size: 12px;
  color: var(--text-main);
  margin-top: 2px;
}

.timeline-empty {
  font-size: 12px;
  color: var(--text-subtle);
  text-align: center;
  padding: 10px 0;
}

/* Session History Items */
.session-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session-history-item {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-badge-sm {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.session-file-src {
  font-size: 10px;
  color: var(--text-subtle);
}

.session-inquiry {
  font-size: 12px;
  color: var(--text-main);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: var(--transition);
  z-index: 120;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
  .stat-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .stat-container {
    grid-template-columns: 1fr;
  }
  .customer-drawer {
    width: 100vw;
  }
  .top-nav {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   Custom Multi-Field Filter Panel (多字段精准筛选面板)
   ========================================================================== */
.custom-filter-section {
  padding: 10px 28px;
}

.custom-filter-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  transition: var(--transition);
}

.custom-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.custom-filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.custom-filter-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.custom-filter-badge {
  font-size: 11px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.panel-toggle-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.chevron-icon.collapsed {
  transform: rotate(180deg);
}

/* Quick Category Row */
.quick-category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 10px 0;
  border-bottom: 1px dashed var(--border);
  flex-wrap: wrap;
}

.quick-cat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.quick-cat-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.cat-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

.cat-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
}

/* Field Inputs Grid */
.field-inputs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 16px;
  padding-top: 14px;
}

@media (max-width: 1400px) {
  .field-inputs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .field-inputs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.field-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-box-checkboxes {
  grid-column: span 2;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.field-hint {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-subtle);
}

.field-input, .field-select {
  width: 100%;
  padding: 7px 11px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  transition: var(--transition);
}

.field-input:focus, .field-select:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.contact-chk-group {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 5px;
  flex-wrap: wrap;
}

.contact-chk-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.custom-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.btn-lg {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
}

/* ==========================================================================
   Dedicated Result Workspace Banner (专属结果工作台横幅)
   ========================================================================== */
.dedicated-workspace-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #334155;
  animation: fadeIn 0.3s ease;
}

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

.workspace-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.workspace-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-tag-icon {
  font-size: 26px;
}

.workspace-heading {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.workspace-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 1px;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toggle-hide-viewed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.15);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.toggle-hide-viewed input {
  cursor: pointer;
}

.active-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.filter-chip-remove {
  cursor: pointer;
  color: #cbd5e1;
  font-weight: bold;
}

.filter-chip-remove:hover {
  color: #ef4444;
}

.workspace-progress-box {
  margin-top: 14px;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.progress-text-label {
  color: #6ee7b7;
}

.progress-remaining {
  color: #cbd5e1;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Drawer Navigation Buttons */
.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.drawer-nav-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.drawer-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
  border-color: #93c5fd;
}

/* ==========================================================================
   WhatsApp Features & Outreach Styling
   ========================================================================== */

/* Stat Card WhatsApp */
.stat-whatsapp {
  border-top: 3px solid #10b981;
}
.stat-whatsapp:hover {
  border-color: #059669;
}
.tag-wa {
  background: #dcfce7;
  color: #15803d;
}
.text-wa {
  color: #059669;
}

/* Toolbar WhatsApp Tabs */
.tab-wa-valid.active {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
}

/* Table Row: WhatsApp Confirmed Active (整行翡翠绿高亮变色) */
.data-table tbody tr.row-wa-valid {
  background-color: #ecfdf5 !important;
  border-left: 4px solid #10b981 !important;
}

.data-table tbody tr.row-wa-valid:hover {
  background-color: #d1fae5 !important;
}

.data-table tbody tr.row-wa-valid td {
  border-bottom-color: #a7f3d0 !important;
}

/* Country Dial Code Badge */
.country-dial-code {
  color: #059669;
  font-weight: 700;
  font-size: 10px;
  background: #dcfce7;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 3px;
}

/* Table Cell: WhatsApp & Phone block */
.wa-cell-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wa-cell-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wa-phone-text {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.2px;
}

.wa-status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: var(--radius-full);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.wa-status-pill.valid {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.35);
}

.wa-status-pill.invalid {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.wa-status-pill.untested {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.wa-status-pill.none {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: default;
}

.wa-status-pill:not(.none):hover {
  transform: scale(1.06);
}

.wa-actions-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.btn-wa-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2.5px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  outline: none;
}

.btn-wa-launch {
  background: #dcfce7;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.btn-wa-launch:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

.btn-wa-copy {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.btn-wa-copy:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.wa-cell-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-top: 1px;
}

.sub-link {
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}

.sub-link:hover {
  text-decoration: underline;
}

.sub-raw {
  color: var(--text-subtle);
}

.wa-no-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* Quick Contact Bar - WhatsApp Brand button */
.btn-wa-brand {
  background: #dcfce7 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

.btn-wa-brand:hover {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

/* ==========================================================================
   Drawer WhatsApp Fast Outreach Card
   ========================================================================== */
.wa-drawer-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
  border: 1.5px solid #a7f3d0 !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 16px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08) !important;
}

.wa-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.wa-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #065f46;
}

.wa-brand-icon {
  font-size: 16px;
}

.wa-status-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-wa-toggle {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-wa-toggle.valid {
  background: #dcfce7;
  color: #047857;
  border-color: #a7f3d0;
}
.btn-wa-toggle.valid:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-wa-toggle.invalid {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.btn-wa-toggle.invalid:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-wa-toggle.untested {
  background: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}
.btn-wa-toggle.untested:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.wa-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-field-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wa-field-label {
  font-size: 11px;
  font-weight: 600;
  color: #065f46;
}

.wa-input-with-action {
  display: flex;
  gap: 6px;
  align-items: center;
}

.wa-input {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #0f172a;
  outline: none;
}

.wa-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.wa-code-tip {
  font-size: 11px;
  color: #047857;
  margin-top: 2px;
}

.wa-msg-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wa-msg-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 11.5px;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  resize: vertical;
  line-height: 1.4;
}

.wa-msg-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.wa-btn-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.btn-wa-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  font-size: 11.5px;
  padding: 9px 12px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.35);
  transition: var(--transition);
}

.btn-wa-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-wa-secondary {
  background: #ffffff;
  color: #065f46;
  font-weight: 700;
  font-size: 11.5px;
  padding: 9px 12px;
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-wa-secondary:hover {
  background: #dcfce7;
  border-color: #6ee7b7;
  transform: translateY(-1px);
}

/* ==========================================================================
   Company Deep Research & Intelligence Dossier (企业背景智能调研与采购情报)
   ========================================================================== */

.research-drawer-card {
  border: 1.5px solid #e0e7ff;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  position: relative;
  overflow: hidden;
}

.research-drawer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
}

.research-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.research-badge-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.research-badge-pill.badge-saved {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.btn-research-action {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #4f46e5;
  border: 1.5px solid #c7d2fe;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-research-action:hover {
  background: #eef2ff;
  border-color: #818cf8;
  transform: translateY(-1px);
}

/* External Toolbox */
.research-toolbox-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.toolbox-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}

.toolbox-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.toolbox-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.15);
}

.toolbox-btn.btn-google:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
}

.toolbox-btn.btn-customs:hover {
  background: #f0fdf4;
  border-color: #10b981;
  color: #047857;
}

.toolbox-btn.btn-linkedin:hover {
  background: #eff6ff;
  border-color: #0284c7;
  color: #0369a1;
}

/* Dossier Grid & Sections */
.dossier-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dossier-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: var(--transition);
}

.dossier-block:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.dossier-block-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.dossier-block-title .icon {
  font-size: 15px;
}

.dossier-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 6px;
  font-size: 12.5px;
  line-height: 1.5;
}

.dossier-row:last-child {
  margin-bottom: 0;
}

.dossier-key {
  width: 95px;
  flex-shrink: 0;
  color: #64748b;
  font-weight: 600;
}

.dossier-val {
  flex: 1;
  color: #0f172a;
}

.dossier-val strong {
  color: #1e293b;
}

/* Tag Pills */
.dossier-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.dossier-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.dossier-tag.tag-primary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.dossier-tag.tag-success {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.dossier-tag.tag-amber {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

/* Sourcing Strategy & Tips Highlight */
.dossier-strategy-box {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.dossier-strategy-box .strategy-item {
  margin-bottom: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #4c1d95;
}

.dossier-strategy-box .strategy-item:last-child {
  margin-bottom: 0;
}

.strategy-item strong {
  color: #581c87;
}

/* Ready Pitch Box */
.dossier-pitch-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 10px;
}

.dossier-pitch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.dossier-pitch-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.btn-copy-pitch {
  font-size: 11px;
  font-weight: 600;
  color: #2563eb;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy-pitch:hover {
  background: #dbeafe;
}

.dossier-pitch-text {
  font-size: 12px;
  line-height: 1.6;
  color: #1e293b;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-sans);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   Real-time Background Research Daemon Banner
   ========================================================================== */
.daemon-banner {
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  color: #f8fafc;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 10;
}

.daemon-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}

.daemon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 9999px;
  font-weight: 700;
  font-size: 11px;
  color: #4ade80;
  white-space: nowrap;
}

.daemon-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: daemonPulse 1.8s infinite;
}

@keyframes daemonPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.daemon-text {
  color: #cbd5e1;
  white-space: nowrap;
}

.daemon-counter {
  font-weight: 700;
  color: #38bdf8;
}

.daemon-progress-track {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.daemon-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 9999px;
  width: 0%;
  transition: width 0.4s ease;
}

.daemon-current {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daemon-comp-tag {
  color: #f1f5f9;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
}

.daemon-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.daemon-metric {
  color: #94a3b8;
  font-size: 11px;
}

.daemon-metric strong {
  color: #f8fafc;
}

.daemon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.daemon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Clickable Daemon Counter Link */
.daemon-link {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.daemon-link:hover {
  background: rgba(56, 189, 248, 0.15);
}

.daemon-click-tip {
  font-size: 10px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: 4px;
}

/* Tab Researched Badge */
.tab-researched {
  color: #4338ca !important;
  font-weight: 700 !important;
}

.tab-btn.tab-researched.active {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
  color: #ffffff !important;
}

/* Table Row Company Research Badges */
.comp-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.badge-research-ready {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #3730a3;
  border: 1px solid #a5b4fc;
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.badge-research-ready:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.badge-research-quick {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #f8fafc;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  padding: 1px 6px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  opacity: 0.75;
}

.badge-research-quick:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
  border-style: solid;
  opacity: 1;
}

/* ==========================================================================
   Floating Batch Selection Bar
   ========================================================================== */
.batch-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  color: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15);
  padding: 8px 16px 8px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  animation: batchBarPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes batchBarPop {
  0% {
    opacity: 0;
    transform: translate(-50%, 25px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.batch-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.batch-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.batch-count {
  color: #f8fafc;
  letter-spacing: 0.2px;
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.btn-batch-export {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 7px 15px !important;
  border-radius: 9999px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
  transition: all 0.2s ease;
}

.btn-batch-export:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5) !important;
}

.btn-batch-action {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 6px 12px !important;
  border-radius: 9999px !important;
  cursor: pointer;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-batch-action:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.btn-batch-cancel {
  background: transparent !important;
  color: #94a3b8 !important;
  border: none !important;
  padding: 6px 10px !important;
  border-radius: 9999px !important;
  cursor: pointer;
  font-size: 12px !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-batch-cancel:hover {
  color: #f8fafc !important;
}

/* ==========================================================================
   Excel Export Center Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  animation: fadeInModal 0.2s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.export-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 880px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.06);
  z-index: 1001;
  padding: 28px 32px;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.export-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.export-modal-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.export-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  flex-shrink: 0;
}

.export-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.export-modal-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.export-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.22s ease;
  cursor: pointer;
  position: relative;
}

.export-card:hover {
  border-color: #3b82f6;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.15);
}

.export-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.export-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 9999px;
  letter-spacing: 0.2px;
}

.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }
.badge-wa { background: #dcfce7; color: #166534; }
.badge-gold { background: #fef3c7; color: #b45309; }
.badge-gray { background: #f1f5f9; color: #475569; }

.export-card-icon {
  font-size: 22px;
}

.export-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.export-card-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.export-card-footer {
  margin-top: auto;
}

.btn-export-action {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-export-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.btn-export-blue:hover { background: #2563eb; color: #ffffff; border-color: #2563eb; }

.btn-export-green { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.btn-export-green:hover { background: #059669; color: #ffffff; border-color: #059669; }

.btn-export-purple { background: #faf5ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.btn-export-purple:hover { background: #7c3aed; color: #ffffff; border-color: #7c3aed; }

.btn-export-wa { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.btn-export-wa:hover { background: #16a34a; color: #ffffff; border-color: #16a34a; }

.btn-export-gold { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.btn-export-gold:hover { background: #d97706; color: #ffffff; border-color: #d97706; }

.btn-export-gray { background: #f8fafc; color: #334155; border: 1px solid #cbd5e1; }
.btn-export-gray:hover { background: #334155; color: #ffffff; border-color: #334155; }

/* ==========================================================================
   AI Deep Research Showcase & Intelligence UI Enhancements
   ========================================================================== */

/* Stat Card: AI Researched */
.stat-card.stat-ai-researched {
  border-left: 4px solid #8b5cf6;
  background: linear-gradient(145deg, #ffffff 0%, #faf5ff 100%);
  border-color: #e9d5ff;
}

.stat-card.stat-ai-researched:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.25);
  border-color: #c084fc;
}

.text-purple {
  color: #7c3aed !important;
}

.tag-purple {
  background: #f3e8ff !important;
  color: #7e22ce !important;
  border: 1px solid #d8b4fe !important;
}

/* Triumph Banner State: 100% Complete */
.daemon-banner.completed {
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 55%, #064e3b 100%);
  border-bottom: 2px solid #10b981;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.22);
}

.daemon-banner.completed .daemon-badge {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.daemon-banner.completed .daemon-btn {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 4px 12px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.daemon-banner.completed .daemon-btn:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-1px);
}

/* Table Row: Micro Intelligence Action Bar */
.comp-intel-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.badge-entity-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #4338ca;
  background: #e0e7ff;
  padding: 1.5px 7px;
  border-radius: 9999px;
  white-space: nowrap;
  border: 1px solid #c7d2fe;
  cursor: pointer;
  transition: all 0.2s ease;
}

.badge-entity-tag:hover {
  background: #c7d2fe;
  color: #312e81;
  transform: translateY(-1px);
}

.badge-probe-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-probe-tag.online {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.badge-probe-tag.offline {
  background: #f1f5f9;
  color: #64748b;
  border: 1px dashed #cbd5e1;
}

.btn-micro-pitch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2.5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
}

/* ==========================================================================
   Multi-User, Reading Bookmark, Admin Panel & Custom-Field Exporter Styles
   ========================================================================== */

/* User Nav & Dropdown */
.nav-bookmark-btn {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: bookmarkPulse 3s infinite ease-in-out;
}

.nav-bookmark-btn:hover {
  background: #fde68a;
  color: #78350f;
  transform: translateY(-1px);
}

@keyframes bookmarkPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.15); }
}

.admin-nav-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.admin-nav-btn:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-1px);
}

.user-nav-dropdown {
  position: relative;
}

.user-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 5px 12px 5px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

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

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.user-realname {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 10px;
  color: #2563eb;
  font-weight: 600;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 170px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 100;
  animation: fadeIn 0.15s ease;
}

.user-menu-item {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-menu-item:hover {
  background: var(--bg-hover);
}

.user-menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* Reading Bookmark Notification Banner ("看到哪里") */
.bookmark-banner {
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border-bottom: 1px solid #fde68a;
  padding: 8px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  animation: slideDown 0.3s ease;
}

.bookmark-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #78350f;
}

.bookmark-badge {
  background: #f59e0b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.bm-comp-name {
  color: #b45309;
}

.bm-page-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}

.bookmark-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-bookmark-jump {
  background: #d97706;
  color: #ffffff;
  border: none;
  font-weight: 600;
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-bookmark-jump:hover {
  background: #b45309;
}

.btn-bookmark-dismiss {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #92400e;
  cursor: pointer;
  padding: 0 4px;
}

/* Tab Additions */
.tab-my-viewed {
  color: #0d9488 !important;
}
.tab-my-viewed.active {
  background: #0d9488 !important;
  color: #ffffff !important;
}

.tab-my-starred {
  color: #b45309 !important;
}
.tab-my-starred.active {
  background: #f59e0b !important;
  color: #ffffff !important;
}

/* Customer Drawer Personal Bar */
.drawer-personal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin: 12px 24px;
}

.btn-personal-star {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: var(--transition);
}

.btn-personal-star:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.btn-personal-star.starred {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.btn-personal-star.starred #drawer-star-icon {
  color: #f59e0b;
  font-weight: 900;
}

.personal-tag-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.tag-label-prefix {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.personal-tags-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-main);
  background: #ffffff;
}

.personal-tags-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Personal tag badge on table row */
.personal-tag-pill {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  margin-top: 3px;
}

.star-personal-badge {
  color: #f59e0b;
  font-size: 14px;
  margin-right: 4px;
  display: inline-block;
  vertical-align: middle;
}

/* Upgraded Excel Export Modal Styles */
.export-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 960px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 1010;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.export-modal-header {
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.export-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.export-modal-icon {
  font-size: 28px;
}

.export-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

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

.export-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.export-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.section-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.selected-fields-badge {
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* Scope Radio Cards */
.export-scope-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 800px) {
  .export-scope-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.scope-radio-card {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition);
  display: block;
}

.scope-radio-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.scope-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.scope-radio-card.active {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.scope-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.scope-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.scope-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Preset Chips */
.preset-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

.preset-chip {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover {
  background: #e2e8f0;
}

.preset-chip.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* Field Groups Grid */
.field-groups-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  .field-groups-container {
    grid-template-columns: 1fr;
  }
}

.field-group-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.field-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.group-select-all {
  font-size: 11px;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.group-select-all:hover {
  text-decoration: underline;
}

.field-checks-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  user-select: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.field-check-item:hover {
  background: #f1f5f9;
}

.field-check-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.export-modal-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.export-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Login Modal */
.login-overlay {
  z-index: 2000;
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.7);
}

.login-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 440px;
  z-index: 2010;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  padding: 36px 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.login-brand-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.login-brand-icon svg {
  width: 28px;
  height: 28px;
}

.login-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

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

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.login-tips-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 14px 0 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Admin Management Modal */
.admin-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 1040px;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  z-index: 1010;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-header {
  padding: 16px 24px;
  background: #1e293b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-title h2 {
  font-size: 17px;
  font-weight: 700;
}

.admin-header-title p {
  font-size: 12px;
  color: #94a3b8;
}

.admin-tabs-nav {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.admin-tab-btn {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.admin-tab-btn:hover {
  color: var(--text-main);
}

.admin-tab-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: #ffffff;
}

.admin-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.admin-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-action-bar h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

/* Add user inline box */
.add-user-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease;
}

.add-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.add-user-header h4 {
  font-size: 14px;
  font-weight: 700;
}

.btn-text-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #94a3b8;
}

.add-user-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 800px) {
  .add-user-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.add-user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* Admin Table */
.admin-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.admin-table th {
  background: #f8fafc;
  padding: 10px 14px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
}

.admin-table tr:hover {
  background: #f8fafc;
}

.badge-role-admin {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.badge-role-sales {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.badge-active {
  background: #ecfdf5;
  color: #059669;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.badge-disabled {
  background: #fef2f2;
  color: #dc2626;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Simple Password Modal */
.password-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  z-index: 1020;
  padding: 24px;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header-simple h3 {
  font-size: 16px;
  font-weight: 700;
}
lor: #7c3aed;
  }
  30% {
    box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.4);
    border-color: #6d28d9;
  }
  70% {
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
    border-color: #8b5cf6;
  }
  100% {
    box-shadow: none;
  }
}

/* Backup Management Styles */
.backup-management-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.backup-status-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.b-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.b-card-label {
  font-size: 12px;
  color: var(--text-muted);
}
.b-card-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
}
.backup-download-box {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.backup-download-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 6px;
}
.backup-download-info p {
  font-size: 13px;
  color: #047857;
  line-height: 1.5;
  margin: 0;
}
.backup-download-info code {
  background: #d1fae5;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.backup-server-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
}
.server-backup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.server-backup-header h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.server-backup-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.backup-safety-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.notice-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.notice-text {
  font-size: 12px;
  color: #92400e;
  line-height: 1.6;
}

/* ==========================================================================
   vCard Mobile Contact Saver Buttons & Styling
   ========================================================================== */
.btn-vcard-brand {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.btn-vcard-brand:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  transform: translateY(-1px);
}

.btn-vcard-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 8px 14px !important;
  border-radius: var(--radius-md) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: var(--transition) !important;
}

.btn-vcard-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.btn-wa-action.btn-wa-vcard {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.btn-wa-action.btn-wa-vcard:hover {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Optimizations (手机端完美自适应)
   ========================================================================== */

@media (max-width: 768px) {
  html, body {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  #app {
    padding: 8px 6px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* 1. Mobile Top Navigation */
  .top-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 10px;
  }

  .nav-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .brand-info h1 {
    font-size: 15px;
    line-height: 1.2;
  }

  .brand-info p {
    display: none;
  }

  .nav-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .bookmark-btn, .admin-btn, .user-profile-btn {
    font-size: 11.5px;
    padding: 5px 9px;
  }

  /* 2. Reading Bookmark & Autonomous Daemon Banners */
  .reading-bookmark-banner, .daemon-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 8px;
  }

  .bookmark-btn-resume {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
  }

  .daemon-progress-wrap {
    width: 100%;
  }

  /* 3. Stat Cards on Mobile (2 columns) */
  .stat-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    margin-bottom: 12px;
  }

  .stat-card {
    padding: 8px 10px;
  }

  .stat-val {
    font-size: 18px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat-desc {
    font-size: 10px;
  }

  /* 4. Filter Panel & Category Chips */
  .custom-filter-card {
    padding: 10px 12px;
  }

  .field-inputs-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .quick-category-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .quick-cat-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .quick-cat-pills::-webkit-scrollbar {
    display: none;
  }

  .cat-pill {
    flex-shrink: 0;
    font-size: 11px;
    padding: 4px 10px;
  }

  /* 5. Main Filter Toolbar & Tabs */
  .tabs-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs-row::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 6px 12px;
    min-height: 36px;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .filter-group {
    width: 100%;
  }

  .select-input, .text-input {
    width: 100%;
    font-size: 16px !important;
    padding: 8px 10px;
    box-sizing: border-box;
  }

  /* 6. Main Data Table on Mobile */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 8px;
  }

  .data-table {
    min-width: 850px;
  }

  .data-table th, .data-table td {
    padding: 8px 8px;
    font-size: 12px;
  }

  .btn-wa-action {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 32px;
  }

  /* 7. Full-screen Mobile Customer Drawer */
  .customer-drawer {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding-bottom: env(safe-area-inset-bottom, 24px) !important;
    z-index: 1050 !important;
  }

  .drawer-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 20;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
  }

  .drawer-title-group h2 {
    font-size: 17px;
  }

  .btn-close-drawer {
    width: 38px;
    height: 38px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
  }

  .quick-contact-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 10px 14px !important;
  }

  .quick-action-btn {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    font-size: 12px !important;
  }

  .wa-btn-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .wa-btn-actions .btn {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
  }

  /* 8. Modals Mobile Sizing */
  .admin-modal, .export-modal {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    padding: 16px !important;
    border-radius: 12px !important;
  }

  .admin-tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-tab-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 12px;
  }

  .backup-status-cards {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .backup-download-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 12px;
  }

  .backup-download-box button {
    width: 100%;
    min-height: 46px;
  }

  /* Prevent inputs zooming on iOS Safari */
  input[type="text"], input[type="password"], select, textarea {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   Phone Number Click Action Modal & Mobile Bottom Sheet
   ========================================================================== */
.phone-action-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  max-width: 92vw;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1100;
  padding: 20px;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.phone-contact-preview {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.preview-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

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

.preview-phone {
  font-size: 14px;
  font-weight: 700;
  color: #0284c7;
  font-family: monospace;
  margin-top: 4px;
}

.preview-email {
  font-size: 12px;
  color: #64748b;
}

.phone-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-phone-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.btn-phone-action:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-phone-action .btn-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.btn-phone-action .btn-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-phone-action .btn-text-wrap strong {
  font-size: 13.5px;
  color: #0f172a;
}

.btn-phone-action .btn-text-wrap span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.btn-phone-action.btn-save-vcard {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}

.btn-phone-action.btn-save-vcard:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.btn-phone-action.btn-save-vcard strong {
  color: #0369a1;
}

.btn-phone-action.btn-dial-phone {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.btn-phone-action.btn-dial-phone strong {
  color: #15803d;
}

.btn-phone-action.btn-open-wa {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.btn-phone-action.btn-open-wa strong {
  color: #047857;
}

@media (max-width: 768px) {
  .phone-action-modal {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100vw !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 16px)) 16px !important;
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

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

  .btn-phone-action {
    padding: 12px 12px;
    min-height: 48px;
  }
}



/* ============================================================
   手机端卡片式布局 (<=480px) - 每行变成一张卡片
   ============================================================ */
@media (max-width: 480px) {

  html, body {
    overflow-x: hidden;
  }

  /* 隐藏原表格 thead */
  .data-table thead {
    display: none !important;
  }

  /* table/tbody/tr/td 全部变 block */
  .data-table,
  .data-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .data-table tbody tr {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
    padding: 10px 12px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .data-table tbody tr td {
    display: block !important;
    border: none !important;
    padding: 0 !important;
  }

  /* 列1: 复选框 - 左上角小 */
  .data-table tbody tr td:nth-child(1) {
    order: 1 !important;
    width: 28px !important;
    flex-shrink: 0 !important;
    padding-top: 2px !important;
  }

  /* 列3: 星级 - 右上角 */
  .data-table tbody tr td:nth-child(3) {
    order: 2 !important;
    flex: 1 !important;
    text-align: right !important;
  }

  /* 列4: 公司名 - 占满整行 */
  .data-table tbody tr td:nth-child(4) {
    order: 3 !important;
    width: 100% !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
  }

  /* 列5: 国家 - 单独一行小标签 */
  .data-table tbody tr td:nth-child(5) {
    order: 4 !important;
    width: 100% !important;
    font-size: 12px !important;
    color: #64748b !important;
  }

  /* 列7: 电话/WA - 占满一行 */
  .data-table tbody tr td:nth-child(7) {
    order: 5 !important;
    width: 100% !important;
  }

  /* 列8: 跟进状态 - 占满一行 */
  .data-table tbody tr td:nth-child(8) {
    order: 6 !important;
    width: 100% !important;
    font-size: 12px !important;
  }

  /* 列10: 操作按钮 */
  .data-table tbody tr td:nth-child(10) {
    order: 7 !important;
    width: 100% !important;
    text-align: right !important;
  }

  /* 隐藏: 已查阅(2)、参会届历(6)、下一步计划(9) */
  .data-table tbody tr td:nth-child(2),
  .data-table tbody tr td:nth-child(6),
  .data-table tbody tr td:nth-child(9) {
    display: none !important;
  }

  /* WA区域内按钮不换行 */
  .wa-phone-block {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
  }

  .btn-wa-action {
    font-size: 12px !important;
    padding: 5px 10px !important;
    min-height: 30px !important;
  }

  /* table-responsive 不横向滚动 */
  .table-responsive {
    overflow-x: unset !important;
  }

  /* 导航栏紧凑 */
  .brand-info h1 {
    font-size: 14px !important;
  }

  .brand-info p {
    display: none !important;
  }

  /* 分页紧凑 */
  .page-btn {
    padding: 5px 9px !important;
    font-size: 12px !important;
  }
}