/* ==========================================================================
   UI/UX Pro Max Design System - EbikeBuyer Dashboard
   Style: Swiss Minimalism & Clean Enterprise White Mode
   Typography: Plus Jakarta Sans / Inter + Fira Code (Tabular Monospace)
   Color Palette: Pure White (#FFFFFF) + Slate Neutral (#F8FAFC, #0F172A) + Cyber Emerald (#059669)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Surface & Background (Crisp Light Multi-layer) */
  --bg-base: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(15, 23, 42, 0.035);
  --bg-glass-active: rgba(15, 23, 42, 0.07);

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-card-hover: #10b981;
  --border-focus: #059669;

  /* Accent & Status Colors (Optimized for High Contrast on White) */
  --accent-emerald: #059669;
  --accent-emerald-light: #047857;
  --accent-emerald-dark: #065f46;
  --accent-emerald-tint: rgba(5, 150, 105, 0.08);
  --accent-emerald-glow: rgba(5, 150, 105, 0.2);

  --accent-cyan: #0284c7;
  --accent-cyan-light: #0369a1;
  --accent-cyan-tint: rgba(2, 132, 199, 0.08);

  --accent-amber: #d97706;
  --accent-amber-light: #b45309;
  --accent-amber-tint: rgba(217, 119, 6, 0.08);

  --accent-purple: #7c3aed;
  --accent-purple-tint: rgba(124, 58, 237, 0.08);

  --accent-red: #dc2626;
  --accent-red-tint: rgba(220, 38, 38, 0.08);

  /* Text & Foreground (WCAG AAA Compliant) */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverted: #ffffff;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Sizing & Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows (Subtle, Layered & Natural) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-emerald: 0 4px 14px rgba(5, 150, 105, 0.25);
  --shadow-glow: 0 0 16px -2px rgba(5, 150, 105, 0.25);

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-base: 220ms;
}

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

html {
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(5, 150, 105, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(2, 132, 199, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 95%, rgba(124, 58, 237, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== SVG Vector Icon System ==================== */
.svg-icon {
  width: 1.15em;
  height: 1.15em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-icon-sm {
  width: 0.95em;
  height: 0.95em;
}

.svg-icon-lg {
  width: 1.5em;
  height: 1.5em;
}

.rotating {
  animation: spin 1.2s linear infinite;
}

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

/* ==================== 顶部导航栏 (Navbar) ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: border-color var(--duration-base) ease;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12) 0%, rgba(2, 132, 199, 0.1) 100%);
  border: 1px solid rgba(5, 150, 105, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.15);
}

.brand-text-box {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-tint);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: var(--accent-emerald);
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  outline: none;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
  display: flex;
  align-items: center;
  gap: 7px;
  user-select: none;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.7);
}

.nav-tab:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: 2px;
}

.nav-tab.active {
  background: #ffffff;
  color: var(--text-primary);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  position: relative;
}

.pulse-dot.online {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.pulse-dot.online::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-emerald);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0.9; }
  80%, 100% { transform: scale(2.3); opacity: 0; }
}

/* ==================== 页面主体布局 ==================== */
.main-content {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 1.8rem 2.2rem 3rem 2.2rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s var(--ease-spring);
}

.tab-pane.active {
  display: block;
}

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

/* ==================== 顶部 Bento 统计指标 ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.6rem;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform var(--duration-fast) ease, border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
  position: relative;
  overflow: hidden;
}

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

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 4px;
  letter-spacing: -0.03em;
}

.stat-value.emerald {
  color: var(--accent-emerald);
}

.stat-value.cyan {
  color: var(--accent-cyan);
}

.stat-value.amber {
  color: var(--accent-amber);
}

.stat-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

.stat-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}

.stat-card:hover .stat-icon-wrapper {
  color: var(--accent-emerald);
  border-color: rgba(5, 150, 105, 0.3);
  background: var(--accent-emerald-tint);
}

/* ==================== 监控控制栏 (Control Bar) ==================== */
.control-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.6rem;
  margin-bottom: 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  box-shadow: var(--shadow-card);
}

.control-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.control-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.control-meta {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 状态标签徽章 (Pills) */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.tag-pill.fuzhou {
  background: var(--accent-cyan-tint);
  border-color: rgba(2, 132, 199, 0.3);
  color: var(--accent-cyan);
}

.tag-pill.ninebot {
  background: var(--accent-emerald-tint);
  border-color: rgba(5, 150, 105, 0.3);
  color: var(--accent-emerald);
}

.tag-pill.scheduler {
  background: var(--accent-purple-tint);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--accent-purple);
}

.control-actions {
  display: flex;
  gap: 10px;
}

/* ==================== 现代按钮体系 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
  border: 1px solid transparent;
  outline: none;
  font-family: var(--font-sans);
  text-decoration: none;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
}

.btn-glass {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-glass:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--text-primary);
}

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

.btn-copy {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 7px 16px;
  font-size: 0.84rem;
}

.btn-copy:hover {
  background: #d1fae5;
  border-color: #34d399;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.15);
  transform: translateY(-1px);
}

/* ==================== 实时车源信息流 (Lead Cards) ==================== */
.leads-container {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-base) var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.lead-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-emerald) 0%, var(--accent-cyan) 100%);
}

.lead-card:hover {
  transform: translateY(-2px);
  border-color: #a7f3d0;
  box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.lead-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lead-title-box {
  flex: 1;
}

.lead-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.lead-meta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-model {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: var(--radius-xs);
  letter-spacing: -0.01em;
}

.badge-heat {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* 收车价格对比矩阵 (Bento Matrix) */
.price-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 1.1rem 0;
}

.price-item {
  display: flex;
  flex-direction: column;
}

.price-item-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.price-item-val {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.price-item-val.asking {
  color: var(--accent-amber-light);
}

.price-item-val.market {
  color: var(--accent-cyan-light);
}

.price-item-val.suggested {
  color: var(--accent-emerald-light);
  font-size: 1.45rem;
}

.price-item-val.profit {
  color: #059669;
}

/* 规格细节与画像信息流 */
.lead-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  font-size: 0.86rem;
  margin: 1.1rem 0;
  background: #f8fafc;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid #f1f5f9;
}

.detail-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.detail-label {
  color: var(--text-muted);
  min-width: 96px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-val {
  color: var(--text-secondary);
  flex: 1;
}

.detail-val b {
  color: var(--text-primary);
}

.detail-val.highlight {
  color: var(--accent-cyan-light);
  font-weight: 600;
}

/* 私聊话术与动作栏 */
.lead-speech-box {
  background: #ecfdf5;
  border: 1px dashed #6ee7b7;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.1rem;
}

.speech-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 10px;
}

.speech-actions {
  display: flex;
  gap: 10px;
}

/* ==================== 手动极速估价计算器 ==================== */
.evaluator-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.eval-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.9rem;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all var(--duration-fast) ease;
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: #ffffff;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.preset-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.preset-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.eval-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.9rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eval-empty-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1.5rem;
}

.eval-empty-icon {
  margin-bottom: 14px;
}

/* ==================== 官方数据库大盘 ==================== */
.data-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}

.data-nav-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--text-secondary);
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.data-nav-btn:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.data-nav-btn.active {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.search-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.search-input-wrapper {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.brand-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--duration-fast) ease;
}

.brand-pill:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.brand-pill.active {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #0369a1;
  font-weight: 700;
}

/* 数据表格 */
.data-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

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

.data-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.data-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-secondary);
  vertical-align: middle;
}

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

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==================== 浮动 Toast 消息组件 ==================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--accent-emerald);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.25s var(--ease-spring);
  transition: all var(--duration-fast) ease;
}

.toast.warning {
  border-left-color: var(--accent-amber);
}

.toast.error {
  border-left-color: var(--accent-red);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==================== 无障碍与动效偏好 ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================== 响应式微调 ==================== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .evaluator-wrapper {
    grid-template-columns: 1fr;
  }
  .price-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 12px;
    padding: 1rem;
  }
  .nav-tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .price-matrix {
    grid-template-columns: 1fr 1fr;
  }
  .copywriter-layout {
    grid-template-columns: 1fr !important;
  }
}

/* ==================== 闲鱼文案工作台专属微交互 ==================== */
.cp-tab-btn {
  transition: all 0.2s ease;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.cp-tab-btn:hover {
  color: var(--text-primary);
  border-color: rgba(192, 132, 252, 0.4);
}

.cp-tab-btn.active {
  background: rgba(147, 51, 234, 0.2) !important;
  color: #c084fc !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.2);
}

#cp-input-text:focus {
  border-color: #c084fc !important;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.15);
}

