/* ================================================
   参与通 Deal Connect - Bloomberg Terminal Fintech Theme V19
   2026年3月 - Deep Teal Dark Mode + Financial Terminal Aesthetics
   Powered by Micro Connect Group
   ================================================ */

/* ========== 1. 设计令牌系统 — 深色金融终端 ========== */
:root {
  /* 核心品牌色 — 深青绿终端色系 */
  --color-primary: #2EC4B6;
  --color-primary-light: #3DD8CA;
  --color-primary-dark: #1F9E92;
  --color-accent: #28A696;
  --color-accent-cyan: #06b6d4;
  --color-accent-emerald: #10b981;
  --color-accent-amber: #f59e0b;
  --color-accent-rose: #ef4444;
  
  /* 深色表面层级系统 — Bloomberg/Wind 风格 */
  --surface-bg: #0B1E1C;
  --surface-0: #0D2422;
  --surface-1: #0F2E2B;
  --surface-2: #123832;
  --surface-3: #15443D;
  --surface-4: #1A5048;
  --surface-elevated: #183D38;
  --surface-card: rgba(15, 46, 43, 0.85);
  --surface-card-hover: rgba(26, 80, 72, 0.65);
  
  /* 文字层级 */
  --text-primary: #E8F5F3;
  --text-secondary: #8EBDB5;
  --text-tertiary: #5A9A90;
  --text-muted: #3D7A70;
  
  /* 渐变系统 — 深色终端渐变 */
  --gradient-primary: linear-gradient(135deg, #2EC4B6 0%, #1F9E92 100%);
  --gradient-cyber: linear-gradient(135deg, #0B1E1C 0%, #0F2E2B 50%, #15443D 100%);
  --gradient-neon: linear-gradient(135deg, #06b6d4 0%, #2EC4B6 40%, #28A696 70%, #1F9E92 100%);
  --gradient-aurora: linear-gradient(135deg, #0B1E1C 0%, #0D2422 25%, #0F2E2B 50%, #123832 75%, #15443D 100%);
  --gradient-glass: linear-gradient(135deg, rgba(46,196,182,0.08) 0%, rgba(46,196,182,0.02) 100%);
  --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --gradient-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --gradient-danger: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  --gradient-info: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
  --gradient-surface: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-0) 100%);
  --gradient-mesh: radial-gradient(at 20% 20%, rgba(46, 196, 182, 0.06) 0%, transparent 50%),
                   radial-gradient(at 80% 80%, rgba(40, 166, 150, 0.04) 0%, transparent 50%),
                   radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
  
  /* 玻璃态 — 深色毛玻璃 */
  --glass-bg: rgba(15, 46, 43, 0.72);
  --glass-bg-solid: rgba(13, 36, 34, 0.95);
  --glass-bg-dark: rgba(11, 30, 28, 0.92);
  --glass-border: rgba(46, 196, 182, 0.12);
  --glass-border-light: rgba(46, 196, 182, 0.08);
  --glass-blur: blur(24px) saturate(180%);
  
  /* 终端风格阴影 */
  --shadow-neon-primary: 0 0 20px rgba(46, 196, 182, 0.15), 0 0 40px rgba(46, 196, 182, 0.05);
  --shadow-neon-cyan: 0 0 20px rgba(6, 182, 212, 0.15), 0 0 40px rgba(6, 182, 212, 0.05);
  --shadow-neon-purple: 0 0 20px rgba(139, 92, 246, 0.15), 0 0 40px rgba(139, 92, 246, 0.05);
  --shadow-neon-emerald: 0 0 20px rgba(16, 185, 129, 0.15), 0 0 40px rgba(16, 185, 129, 0.05);
  
  /* 深色阴影系统 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.2), 0 16px 40px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.25), 0 24px 56px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 16px 32px rgba(0, 0, 0, 0.3), 0 32px 72px rgba(0, 0, 0, 0.2);
  --shadow-inner: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-card-hover: 0 4px 8px rgba(0, 0, 0, 0.2), 0 16px 48px rgba(46, 196, 182, 0.08);
  
  /* 圆角 — 终端风格略微收紧 */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 22px;
  --radius-3xl: 28px;
  --radius-full: 9999px;
  
  /* 动画系统 - Apple风顺滑 */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-apple: cubic-bezier(0.28, 0.11, 0.32, 1);
  --duration-fast: 180ms;
  --duration-normal: 280ms;
  --duration-slow: 420ms;
}

/* ========== 2. 全局基础样式 ========== */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

/* ========== 3. 科技感背景系统 ========== */
.cyber-bg {
  position: relative;
  background: var(--gradient-aurora);
}

.cyber-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(93, 196, 179, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(73, 168, 154, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(50, 173, 230, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

/* 网格背景效果 — 终端矩阵网格 */
.grid-bg {
  background-color: var(--surface-bg);
  background-image: 
    var(--gradient-mesh),
    linear-gradient(rgba(46, 196, 182, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 196, 182, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* 粒子背景（纯CSS） - 更精致的光点 */
.particles-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(93, 196, 179, 0.5) 0, transparent 2px),
    radial-gradient(circle at 40% 70%, rgba(73, 168, 154, 0.4) 0, transparent 2px),
    radial-gradient(circle at 60% 20%, rgba(50, 173, 230, 0.35) 0, transparent 2px),
    radial-gradient(circle at 80% 60%, rgba(52, 199, 89, 0.3) 0, transparent 2px),
    radial-gradient(circle at 10% 80%, rgba(255, 55, 95, 0.25) 0, transparent 2px),
    radial-gradient(circle at 90% 40%, rgba(93, 196, 179, 0.35) 0, transparent 2px),
    radial-gradient(circle at 55% 45%, rgba(73, 168, 154, 0.2) 0, transparent 3px),
    radial-gradient(circle at 75% 35%, rgba(50, 173, 230, 0.25) 0, transparent 2px);
  pointer-events: none;
  animation: particleFloat 30s linear infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-16px); opacity: 0.85; }
}

/* ========== 4. 导航栏 — 深色终端顶栏 ========== */
nav, .navbar {
  background: var(--glass-bg-dark);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(46, 196, 182, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all var(--duration-normal) var(--ease-apple);
}

nav:hover, .navbar:hover {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-brand {
  font-weight: 800;
  font-size: 1.2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.025em;
}

/* ========== 5. 按钮系统 - Apple精致风 ========== */
.btn, button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-apple);
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.btn:hover::before {
  opacity: 1;
}

/* 主要按钮 - 精致渐变 */
.btn-primary, .btn-indigo {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 
    0 1px 1px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(93, 196, 179, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover, .btn-indigo:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(93, 196, 179, 0.35);
  filter: brightness(1.06);
}

.btn-primary:active, .btn-indigo:active {
  transform: translateY(0) scale(0.98);
  filter: brightness(0.96);
}

/* 次要按钮 — 深色终端 */
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid rgba(46, 196, 182, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  border-color: rgba(46, 196, 182, 0.4);
  color: var(--color-primary);
  background: var(--surface-3);
  box-shadow: 0 2px 8px rgba(46, 196, 182, 0.15);
}

/* 成功按钮 */
.btn-success, .btn-emerald {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.28);
}

.btn-success:hover, .btn-emerald:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.35);
  filter: brightness(1.06);
}

/* 危险按钮 */
.btn-danger, .btn-red {
  background: var(--gradient-danger);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 55, 95, 0.28);
}

.btn-danger:hover, .btn-red:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 55, 95, 0.35);
  filter: brightness(1.06);
}

/* 幽灵按钮 — 深色终端 */
.btn-ghost {
  background: transparent;
  color: var(--text-tertiary);
}

.btn-ghost:hover {
  background: rgba(46, 196, 182, 0.08);
  color: var(--color-primary);
}

/* ========== 6. 卡片系统 — 深色终端卡片 ========== */
.card, .project-card, .module-card, .stat-card {
  position: relative;
  background: var(--surface-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(46, 196, 182, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-apple);
  overflow: hidden;
}

.card::before, .project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-neon);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.card:hover, .project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(46, 196, 182, 0.2);
}

.card:hover::before, .project-card:hover::before {
  opacity: 1;
}

/* 统计卡片 — Bloomberg Terminal数据面板 */
.stat-card {
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid rgba(46, 196, 182, 0.08);
  border-radius: var(--radius-sm) !important;
  border-top: 2px solid rgba(46, 196, 182, 0.15);
  position: relative;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(46,196,182,0.012) 3px,
    rgba(46,196,182,0.012) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(46, 196, 182, 0.18);
  border-top-color: var(--color-primary);
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* 模块卡片变更状态 */
.module-card.has-changes {
  border-color: rgba(52, 199, 89, 0.25);
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.06) 0%, var(--surface-1) 100%);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(52, 199, 89, 0.1);
}

.module-card.has-changes::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--color-accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

/* ========== 7. 模态框系统 - 支持滚动 ========== */
/*
 * Z-Index 层级体系:
 * 10  - 页面内浮动元素
 * 50  - 导航栏 (sticky nav)
 * 100 - 下拉菜单/popover
 * 200 - 普通弹窗/模态框
 * 300 - 引导教程弹窗
 * 400 - AI聊天窗口
 * 500 - AI悬浮按钮
 * 900 - Toast通知
 * 9999 - Loading遮罩
 */
.modal-overlay, .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn var(--duration-fast) var(--ease-apple);
}

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

.modal-card, .modal-content, .modal-dialog {
  position: relative;
  background: var(--surface-1);
  border-radius: var(--radius-2xl);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(46, 196, 182, 0.1);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp var(--duration-normal) var(--ease-apple);
  overflow: hidden;
  isolation: isolate;
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(46, 196, 182, 0.1);
  flex-shrink: 0;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto; /* 关键：支持滚动 */
  flex: 1;
  min-height: 0; /* 关键：允许flex子元素收缩 */
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(46, 196, 182, 0.1);
  background: var(--surface-0);
  flex-shrink: 0;
}

/* ========== 8. 表单元素 — 终端输入框 ========== */
input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid rgba(46, 196, 182, 0.15);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  color: var(--text-primary);
  transition: all var(--duration-fast) var(--ease-apple);
}

/* 排除 checkbox 和 radio 的全局输入样式 */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
  cursor: pointer;
}

input:hover, textarea:hover, select:hover {
  border-color: rgba(46, 196, 182, 0.3);
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: transparent;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 
    0 0 0 3px rgba(93, 196, 179, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.04);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  box-shadow: none;
  border-color: transparent;
  transform: none;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

/* 搜索框特殊样式 — 深色终端 */
.search-input {
  padding-left: 44px;
  background: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235A9A90'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat 14px center / 18px,
    var(--surface-0);
}

/* ========== 9. 徽章系统 ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-primary {
  background: linear-gradient(135deg, rgba(93, 196, 179, 0.15) 0%, rgba(73, 168, 154, 0.15) 100%);
  color: var(--color-primary);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

/* 状态徽章 - 带发光效果 */
.badge-glow {
  box-shadow: 0 2px 8px currentColor;
}

/* ========== 10. AI助手悬浮按钮 ========== */
.ai-assistant-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 
    0 4px 16px rgba(93, 196, 179, 0.35),
    0 0 0 1px rgba(93, 196, 179, 0.1);
  cursor: pointer;
  z-index: 500;
  transition: all var(--duration-normal) var(--ease-apple);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.ai-assistant-fab::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--gradient-neon);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--duration-normal);
  animation: rotateGlow 4s linear infinite;
}

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

.ai-assistant-fab:hover {
  transform: scale(1.08);
  box-shadow: 
    0 8px 28px rgba(93, 196, 179, 0.4),
    0 0 0 1px rgba(93, 196, 179, 0.15);
}

.ai-assistant-fab:hover::before {
  opacity: 0.5;
}

.ai-assistant-fab i {
  font-size: 24px;
  color: white;
  animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* AI聊天窗口 — 深色终端 */
.ai-chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: var(--surface-0);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  z-index: 400;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: chatWindowOpen var(--duration-normal) var(--ease-spring);
}

@keyframes chatWindowOpen {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ai-chat-window.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.ai-chat-header {
  background: var(--gradient-primary);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: linear-gradient(180deg, var(--surface-bg) 0%, var(--surface-0) 100%);
  max-height: 340px;
}

.ai-message {
  display: flex;
  margin-bottom: 12px;
  animation: messageSlide var(--duration-fast) var(--ease-smooth);
}

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

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.ai-message.assistant .ai-message-avatar {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(93, 196, 179, 0.3);
}

.ai-message.user .ai-message-avatar {
  background: linear-gradient(135deg, var(--surface-3) 0%, var(--surface-4) 100%);
  color: var(--color-primary);
}

.ai-message-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 10px;
}

.ai-message.assistant .ai-message-content {
  background: var(--surface-2);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.ai-message.user .ai-message-content {
  background: var(--gradient-primary);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(93, 196, 179, 0.3);
}

.ai-chat-input {
  padding: 16px;
  border-top: 1px solid rgba(46, 196, 182, 0.1);
  background: var(--surface-1);
  flex-shrink: 0;
}

/* ========== 11. 协商面板样式 — 深色终端 ========== */
.negotiation-panel {
  background: linear-gradient(180deg, var(--surface-0) 0%, var(--surface-bg) 100%);
  border-right: 1px solid rgba(46, 196, 182, 0.08);
}

.negotiation-input-area {
  padding: 16px;
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-0) 100%);
  border-bottom: 1px solid rgba(46, 196, 182, 0.08);
}

.negotiation-item {
  padding: 14px 16px;
  margin: 8px 12px;
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  border: 1px solid rgba(46, 196, 182, 0.08);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.negotiation-item:hover {
  border-color: rgba(93, 196, 179, 0.2);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.negotiation-item.investor {
  border-left: 3px solid var(--color-primary);
  background: linear-gradient(90deg, rgba(46, 196, 182, 0.06) 0%, var(--surface-1) 100%);
}

.negotiation-item.borrower {
  border-left: 3px solid var(--color-accent-amber);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.06) 0%, var(--surface-1) 100%);
}

/* 快捷输入按钮 — 深色终端 */
.quick-input-btn {
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid rgba(46, 196, 182, 0.12);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-input-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(93, 196, 179, 0.05);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ========== 12. 模板选择卡片 — 深色终端 ========== */
.template-card {
  padding: 16px;
  border: 2px solid rgba(46, 196, 182, 0.1);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
  background: var(--surface-1);
}

.template-card:hover {
  border-color: rgba(46, 196, 182, 0.3);
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.06) 0%, var(--surface-2) 100%);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.template-card.selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(93, 196, 179, 0.05) 0%, rgba(73, 168, 154, 0.05) 100%);
  box-shadow: 
    0 0 0 3px rgba(93, 196, 179, 0.15),
    var(--shadow-md);
}

.template-card.selected::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--gradient-primary);
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(93, 196, 179, 0.4);
}

/* ========== 13. 签署流程进度 ========== */
.sign-progress-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
}

.sign-progress-step.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-neon-primary);
}

.sign-progress-step.completed {
  background: var(--gradient-success);
  color: white;
  box-shadow: var(--shadow-neon-emerald);
}

.sign-progress-step.completed::after {
  content: '✓';
}

/* ========== 14. 空状态 ========== */
.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, rgba(93, 196, 179, 0.08) 0%, rgba(73, 168, 154, 0.08) 100%);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.empty-state-icon::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-2xl);
  background: var(--gradient-neon);
  opacity: 0.15;
  z-index: -1;
}

.empty-state-icon i {
  font-size: 38px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-action-btn {
  padding: 22px;
  background: rgba(15, 46, 43, 0.6);
  border: 1.5px dashed rgba(46, 196, 182, 0.25);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-apple);
}

.empty-action-btn:hover {
  border-color: var(--color-primary);
  border-style: solid;
  background: var(--surface-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ========== 15. 视角切换 ========== */
.perspective-badge {
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--duration-normal) var(--ease-smooth);
  cursor: pointer;
}

.perspective-badge.perspective-investor {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(93, 196, 179, 0.35);
}

.perspective-badge.perspective-borrower {
  background: var(--gradient-warning);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* ========== 16. 滚动条美化 ========== */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(46, 196, 182, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(46, 196, 182, 0.25);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 196, 182, 0.15) transparent;
}

/* ========== 17. Loading动画 ========== */
#app-loading {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0B1E1C 0%, #0D2422 25%, #0F2E2B 50%, #123832 75%, #15443D 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#app-loading.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ========== 17.5 全局弹窗辅助 ========== */
/* 弹窗打开时禁止body滚动 */
body.modal-open {
  overflow: hidden;
  /* 防止iOS Safari滚动穿透 */
  position: fixed;
  width: 100%;
  /* touch-action 防止触摸滚动 */
  touch-action: none;
}

/* 弹窗关闭动画 */
.modal-closing {
  animation: fadeOut var(--duration-fast) var(--ease-smooth) forwards;
}

.modal-closing .modal-card,
.modal-closing .modal-content,
.modal-closing .modal-dialog,
.modal-closing .onboarding-card {
  animation: modalSlideDown var(--duration-fast) var(--ease-smooth) forwards;
}

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

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

#app-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(46, 196, 182, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(40, 166, 150, 0.2) 0%, transparent 50%);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 2.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.7s linear infinite;
}

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

.loading-text {
  color: white;
  font-size: 20px;
  font-weight: 700;
  margin-top: 24px;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.loading-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

/* ========== 18. 引导教程弹窗 ========== */
.onboarding-modal {
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  background: rgba(0, 0, 0, 0.4);
  z-index: 300 !important;
  overscroll-behavior: contain;
}

.onboarding-card {
  box-shadow: 
    0 24px 72px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  position: relative;
  z-index: 1;
}

.onboarding-content {
  overflow-y: auto;
  flex: 1;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
}

.step-dot.active {
  background: white;
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ========== 19. 智能联动修改面板 ========== */
#smartChangePanel {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#smartChangePanel > div {
  animation: smartPanelOpen var(--duration-normal) var(--ease-spring);
  max-height: 85vh;
  overflow-y: auto;
}

@keyframes smartPanelOpen {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.smart-change-item {
  transition: all var(--duration-fast) var(--ease-smooth);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 8px 0;
  background: var(--surface-0);
  border: 1px solid rgba(46, 196, 182, 0.08);
}

.smart-change-item:hover {
  transform: translateX(4px);
  background: var(--surface-2);
  border-color: rgba(46, 196, 182, 0.2);
  box-shadow: var(--shadow-sm);
}

/* ========== 20. Agent并行处理 ========== */
.agent-card {
  transition: all var(--duration-normal) var(--ease-smooth);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--surface-1);
  border: 1px solid rgba(46, 196, 182, 0.08);
}

.agent-card.processing {
  animation: agentProcess 1.5s ease-in-out infinite;
  border-color: rgba(93, 196, 179, 0.3);
}

@keyframes agentProcess {
  0%, 100% { box-shadow: 0 0 0 0 rgba(93, 196, 179, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(93, 196, 179, 0); }
}

.agent-card.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--surface-1) 100%);
  animation: agentComplete 0.5s var(--ease-spring);
}

@keyframes agentComplete {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* 路由流动动画 */
.route-flow {
  background: linear-gradient(90deg, 
    var(--color-primary), 
    var(--color-accent), 
    #3D8F83, 
    var(--color-primary)
  );
  background-size: 300% 300%;
  animation: routeFlowAnim 2s ease infinite;
}

@keyframes routeFlowAnim {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========== 21. 工具提示 ========== */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  padding: 8px 14px;
  background: #1e293b;
  color: white;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-fast) var(--ease-smooth);
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1e293b;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-fast) var(--ease-smooth);
  z-index: 100;
}

.tooltip:hover::after,
.tooltip:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

/* ========== 22. 响应式设计 ========== */
@media (max-width: 1024px) {
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
  
  .ai-chat-window {
    width: 340px;
  }
}

@media (max-width: 768px) {
  nav, .navbar {
    padding: 12px 16px;
  }
  
  .ai-chat-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 90px;
    max-height: 70vh;
  }
  
  .ai-assistant-fab {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 20px;
  }
  
  .modal-card, .modal-dialog {
    margin: 12px;
    max-height: 90vh;
    border-radius: var(--radius-xl);
  }
  
  .onboarding-card {
    margin: 12px;
    max-height: 90vh;
    border-radius: var(--radius-xl);
  }
  
  /* 移动端弹窗overlay增强 */
  .modal-overlay, .modal-backdrop, .onboarding-modal {
    padding: 12px;
    align-items: flex-end; /* 移动端底部弹出更自然 */
  }
  
  .onboarding-modal {
    align-items: center; /* 引导弹窗保持居中 */
  }
}

@media (max-width: 480px) {
  .modal-card, .modal-dialog {
    margin: 8px;
    border-radius: var(--radius-lg);
  }
  
  .onboarding-card {
    margin: 8px;
    border-radius: var(--radius-lg);
  }
  
  /* 移动端引导弹窗顶部渐变区域缩小 */
  .onboarding-card .h-48 {
    height: 8rem;
  }
  
  .stat-card {
    padding: 14px;
  }
  
  .stat-card .stat-value {
    font-size: 1.25rem;
  }
}

/* ========== 23. 动画工具类 ========== */
.animate-fade-in {
  animation: fadeIn var(--duration-normal) var(--ease-smooth);
}

.animate-slide-up {
  animation: slideUp var(--duration-normal) var(--ease-smooth);
}

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

.animate-scale-in {
  animation: scaleIn var(--duration-normal) var(--ease-spring);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* 延迟类 */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ========== 24. 特殊效果 ========== */
/* 霓虹文字 */
.text-neon {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 渐变文字 */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 玻璃态卡片 */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* Shimmer 加载效果 — 深色终端 */
.shimmer {
  background: linear-gradient(90deg, var(--surface-1) 0%, var(--surface-3) 50%, var(--surface-1) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ========== 25. 图标容器系统 ========== */
.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.icon-container-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.icon-container-md {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
}

.icon-container-lg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
}

.icon-gradient-primary {
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px rgba(93, 196, 179, 0.25);
}

.icon-gradient-success {
  background: var(--gradient-success);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.25);
}

.icon-gradient-warning {
  background: var(--gradient-warning);
  box-shadow: 0 4px 12px rgba(255, 159, 10, 0.25);
}

.icon-gradient-danger {
  background: var(--gradient-danger);
  box-shadow: 0 4px 12px rgba(255, 55, 95, 0.25);
}

.icon-gradient-info {
  background: var(--gradient-info);
  box-shadow: 0 4px 12px rgba(50, 173, 230, 0.25);
}

/* ========== 26. 项目卡片增强 — Bloomberg Terminal Style ========== */
.project-card {
  padding: 14px;
  cursor: pointer;
  border-radius: var(--radius-sm) !important;
  border-left: 2px solid transparent;
  border-top: 1px solid rgba(46,196,182,0.12);
  transition: all 0.2s ease;
  position: relative;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46,196,182,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover {
  border-left-color: var(--color-primary);
  transform: translateY(-1px) !important;
  background: rgba(15,46,43,0.95) !important;
}
.project-card:hover::before {
  opacity: 1;
}
/* Bloomberg-style MCN monospace tag */
.project-card .font-mono {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  letter-spacing: 0.05em;
}

/* Terminal data grid cells */
.project-card .grid .text-center {
  position: relative;
}
.project-card .grid .text-center::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46,196,182,0.1), transparent);
}

/* ========== 27. 徽章系统 — Terminal Status Indicators ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.badge-primary {
  background: rgba(93, 196, 179, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(93, 196, 179, 0.2);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background: rgba(244, 63, 94, 0.1);
  color: var(--color-accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.badge-info {
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-glow {
  box-shadow: 0 0 12px currentColor;
}

/* ========== 28. 空状态增强 ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(93, 196, 179, 0.08) 0%, rgba(73, 168, 154, 0.08) 100%);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

.empty-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(93, 196, 179, 0.28);
  transition: all var(--duration-normal) var(--ease-apple);
}

.empty-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(93, 196, 179, 0.35);
}

/* ========== 29. 搜索输入框 — 深色终端 ========== */
.search-input {
  padding: 8px 16px;
  padding-left: 36px;
  background: var(--surface-0);
  border: 1.5px solid rgba(46, 196, 182, 0.12);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  transition: all var(--duration-normal) var(--ease-smooth);
}

.search-input:focus {
  background: var(--surface-1);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(93, 196, 179, 0.15);
}

/* ========== 30. 快速输入按钮 ========== */
.quick-input-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(93, 196, 179, 0.06);
  border: 1px solid rgba(93, 196, 179, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--color-primary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.quick-input-btn:hover {
  background: rgba(93, 196, 179, 0.12);
  border-color: rgba(93, 196, 179, 0.3);
  transform: translateY(-1px);
}

/* ========== 31. 协商面板 — 深色终端 ========== */
.negotiation-panel {
  background: var(--surface-1);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(46, 196, 182, 0.08);
  box-shadow: var(--shadow-sm);
}

.negotiation-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(46, 196, 182, 0.06);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.negotiation-item:hover {
  background: rgba(93, 196, 179, 0.03);
}

.negotiation-item.investor {
  border-left: 3px solid var(--color-primary);
}

.negotiation-item.borrower {
  border-left: 3px solid var(--color-accent-amber);
}

.negotiation-input-area {
  background: var(--surface-1);
  border-top: 1px solid rgba(46, 196, 182, 0.08);
  padding: 16px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ========== 32. 签署进度 ========== */
.sign-progress-step {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.sign-progress-step.active {
  background: rgba(93, 196, 179, 0.08);
  border: 1px solid rgba(93, 196, 179, 0.2);
}

.sign-progress-step.completed {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.sign-progress-step.completed::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--color-accent-emerald);
  margin-right: 8px;
}

/* ========== 33. 模板卡片增强 ========== */
.template-card {
  padding: 16px;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  background: var(--surface-1);
}

.template-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.template-card.selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(93, 196, 179, 0.05) 0%, rgba(73, 168, 154, 0.05) 100%);
  box-shadow: 0 0 0 3px rgba(93, 196, 179, 0.15);
}

.template-card.selected::after {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--color-primary);
  font-size: 1.1rem;
}

/* ========== 34. 应用页面基础样式 ========== */
/* 页面切换动画现在在 section 35 定义 */

.change-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
}

.value-changed {
  background: linear-gradient(120deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.value-old {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.9em;
}

.contract-section { scroll-margin-top: 80px; }
.contract-section.has-changes {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, transparent 100%);
  border-left: 4px solid #10b981;
}

.clause-param {
  background: linear-gradient(120deg, #5DC4B3 0%, #49A89A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.clause-param-changed {
  background: linear-gradient(120deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.feature-coming { opacity: 0.7; }
.feature-coming:hover { opacity: 1; }

.version-item { transition: all 0.2s; }
.version-item:hover { background: var(--surface-2); }
.version-item.current { background: rgba(46, 196, 182, 0.08); border-left: 3px solid var(--color-primary); }

/* 引导教程补充样式 */
.onboarding-step { transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.onboarding-step.active { opacity: 1; transform: translateX(0); }
.onboarding-step.prev { opacity: 0; transform: translateX(-100%); position: absolute; }
.onboarding-step.next { opacity: 0; transform: translateX(100%); position: absolute; }
.feature-icon { transition: all 0.3s; }
.feature-icon:hover { transform: scale(1.1); }

/* SVG 背景图案 */
.pattern-bg {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ========== 协商输入框 - Genspark风格大输入区 ========== */
/* 输入框容器 focus 状态 */
.nego-input-wrapper:focus-within {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), 0 4px 16px rgba(0,0,0,0.06) !important;
  transform: translateY(-1px);
}
.nego-input-wrapper {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* textarea placeholder 美化 */
#negotiationInput::placeholder {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.8;
}
#negotiationInput:focus::placeholder {
  color: #cbd5e1;
}
#negotiationInput {
  transition: min-height 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
#negotiationInput:focus {
  min-height: 160px;
}

/* 发送按钮 hover */
#btnSubmit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}
#btnSubmit:active {
  transform: translateY(0) scale(0.97);
}

/* 协商记录滚动条 */
#negotiationHistory::-webkit-scrollbar {
  width: 4px;
}
#negotiationHistory::-webkit-scrollbar-track {
  background: transparent;
}
#negotiationHistory::-webkit-scrollbar-thumb {
  background: rgba(46, 196, 182, 0.15);
  border-radius: 4px;
}
#negotiationHistory::-webkit-scrollbar-thumb:hover {
  background: rgba(46, 196, 182, 0.25);
}

/* 快捷输入提示 */
@keyframes quickHint { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 2px rgba(93,196,179,0.3); } }
.quick-hint { animation: quickHint 2s ease-in-out 3; }

/* 返回按钮样式 */
.back-btn { transition: all 0.2s; }
.back-btn:hover { transform: translateX(-4px); background: rgba(46, 196, 182, 0.08); }

/* 智能联动面板补充 */
.smart-change-item input[type="checkbox"] { transition: all 0.2s; }
.smart-change-item input[type="checkbox"]:checked { transform: scale(1.1); }

.confidence-high {
  animation: confidencePulse 2s ease-in-out infinite;
}
@keyframes confidencePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

.inferred-highlight {
  animation: inferredBlink 1.5s ease-in-out 2;
}
@keyframes inferredBlink {
  0%, 100% { background-color: rgba(251, 191, 36, 0.1); }
  50% { background-color: rgba(251, 191, 36, 0.3); }
}

/* Agent 成功动画 */
.agent-success-animation { animation: agentSuccess 0.5s ease-out; }
@keyframes agentSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

#multiAgentPanel > div { animation: slideInFromBottom 0.3s ease-out; }
@keyframes slideInFromBottom {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.agent-card:nth-child(6) { animation-delay: 0.5s; }
.agent-card:nth-child(7) { animation-delay: 0.6s; }
.agent-card:nth-child(8) { animation-delay: 0.7s; }

/* 路由动画 */
@keyframes routeFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.route-animation {
  background: linear-gradient(90deg, #5DC4B3, #49A89A, #3D8F83, #5DC4B3);
  background-size: 300% 300%;
  animation: routeFlow 2s ease infinite;
}

/* AI 聊天输入区 — 深色终端 */
.ai-chat-input-area {
  padding: 12px 16px;
  background: var(--surface-1);
  border-top: 1px solid rgba(46, 196, 182, 0.1);
}

.ai-chat-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--surface-0);
  border-radius: 24px;
  padding: 4px 4px 4px 16px;
}

.ai-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  padding: 8px 0;
}

.ai-chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5DC4B3 0%, #49A89A 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.ai-chat-send-btn:hover { transform: scale(1.05); }
.ai-chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* AI 打字动画 — 深色终端 */
.ai-typing-indicator {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin: 0 10px;
}

.ai-typing-dot {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  margin: 0 2px;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}
.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* AI 快捷问题 — 深色终端 */
.ai-quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 12px;
  background: var(--surface-1);
}

.ai-quick-btn {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid rgba(46, 196, 182, 0.12);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.ai-quick-btn:hover {
  background: var(--surface-3);
  border-color: rgba(46, 196, 182, 0.3);
  color: var(--color-primary);
}

/* 基础动画 */
@keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: slideIn 0.3s ease-out; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.pulse { animation: pulse 2s infinite; }
.float-animation { animation: float 3s ease-in-out infinite; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }

/* ========== 35. 页面切换动画 ========== */
.page {
  display: none;
  opacity: 0;
}

.page.active {
  display: flex;
  animation: pageEnter 0.35s var(--ease-smooth) forwards;
}

.page.page-exit {
  animation: pageExit 0.2s var(--ease-smooth) forwards;
}

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

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

/* ========== 36. Toast 通知系统 ========== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(15, 46, 43, 0.96);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  min-width: 300px;
  max-width: 440px;
  animation: toastSlideIn 0.4s var(--ease-apple);
  pointer-events: auto;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast.toast-success::before { background: var(--gradient-success); }
.toast.toast-error::before { background: var(--gradient-danger); }
.toast.toast-warning::before { background: var(--gradient-warning); }
.toast.toast-info::before { background: var(--gradient-primary); }

.toast.toast-exit {
  animation: toastSlideOut 0.3s var(--ease-smooth) forwards;
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.toast-success .toast-icon { background: rgba(16, 185, 129, 0.12); color: #059669; }
.toast-error .toast-icon { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.toast-warning .toast-icon { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.toast-info .toast-icon { background: rgba(93, 196, 179, 0.12); color: #49A89A; }

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.toast-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  padding: 0;
  background: transparent;
  border: none;
}

.toast-close:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 0 0 0 var(--radius-lg);
  animation: toastProgress linear forwards;
}

.toast-success .toast-progress { background: var(--gradient-success); }
.toast-error .toast-progress { background: var(--gradient-danger); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(60px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(60px) scale(0.96); }
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* ========== 37. 用户下拉菜单 — 深色 ========== */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: rgba(13, 36, 34, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(46,196,182,0.1);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: all 0.2s var(--ease-apple);
  overflow: hidden;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-dropdown-header {
  padding: 16px;
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.08) 0%, rgba(40, 166, 150, 0.06) 100%);
  border-bottom: 1px solid rgba(46, 196, 182, 0.1);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.user-dropdown-item:hover {
  background: rgba(46, 196, 182, 0.1);
  color: var(--color-primary);
}

.user-dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(46, 196, 182, 0.08);
  margin: 4px 0;
}

.user-dropdown-item.danger {
  color: #ef4444;
}

.user-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ========== 38. 按钮Ripple效果 ========== */
.btn-primary, .btn-secondary, .btn-success, .btn-danger {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  to { transform: scale(4); opacity: 0; }
}

/* ========== 39. 美化确认对话框 ========== */
.confirm-dialog {
  text-align: center;
  padding: 32px 24px 24px;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
}

.confirm-icon.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.confirm-icon.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.confirm-icon.info {
  background: rgba(93, 196, 179, 0.12);
  color: #5DC4B3;
}

.confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions button {
  min-width: 100px;
  padding: 10px 24px;
}

/* ========== 40. 密码可见/隐藏切换 ========== */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  border: none;
  padding: 0;
}

.password-toggle:hover {
  color: var(--text-primary);
  background: var(--surface-3);
}

/* ========== 41. 表单增强 ========== */
.form-group {
  position: relative;
}

.form-error {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  color: #dc2626;
  font-size: 13px;
  animation: shakeX 0.4s ease-in-out;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ========== 42. 按钮Loading状态 ========== */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.7s linear infinite;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -10px;
}

.btn-secondary.btn-loading::after {
  border-color: rgba(93, 196, 179, 0.2);
  border-top-color: var(--color-primary);
}

/* ========== 43. 消息气泡动画 ========== */
.negotiation-msg-enter {
  animation: msgBubbleIn 0.35s var(--ease-spring);
}

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

/* ========== 44. 移动端增强 ========== */

/* 导航栏移动端自适应 */
@media (max-width: 768px) {
  /* 主页导航栏 - 按钮收紧 */
  #pageProjects nav .flex.items-center.space-x-2 {
    gap: 2px;
  }
  
  #pageProjects nav .flex.items-center.space-x-2 > button,
  #pageProjects nav .flex.items-center.space-x-2 > div {
    flex-shrink: 0;
  }
  
  /* 移动端：帮助/模板按钮只显示图标，隐藏文字 */
  #pageProjects nav .tooltip[data-tip="新手引导"] span,
  #pageProjects nav .tooltip[data-tip="查看和管理合同模板"] span {
    display: none;
  }
  
  #pageProjects nav .tooltip[data-tip="新手引导"],
  #pageProjects nav .tooltip[data-tip="查看和管理合同模板"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* 统计卡片2列 */
  .stat-card-grid-mobile {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* 协商界面tab切换布局 */
  .negotiation-tabs {
    display: flex;
    border-bottom: 2px solid rgba(46, 196, 182, 0.1);
    background: var(--surface-0);
    overflow-x: auto;
  }
  
  .negotiation-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
  }
  
  .negotiation-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
  }
  
  /* 导航栏紧凑 */
  .nav-compact .nav-text {
    display: none;
  }
  
  .toast-container {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 20px;
  }
  
  .toast {
    min-width: unset;
    width: 100%;
  }
  
  /* 协商页面导航栏收紧 */
  #pageNegotiation nav {
    padding: 8px 12px;
  }
  
  #pageNegotiation nav .flex.items-center.space-x-1\.5 {
    gap: 2px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  /* 协商页面隐藏次要按钮的文字 */
  #pageNegotiation nav .btn-secondary span,
  #pageNegotiation nav .btn-primary span {
    display: none;
  }
  
  /* 视角切换更紧凑 */
  #pageNegotiation .perspective-badge,
  #pageNegotiation [onclick^="switchPerspective"] {
    font-size: 11px;
    padding: 4px 8px;
  }
}

@media (max-width: 640px) {
  /* 协商页面全屏处理 */
  #pageNegotiation .flex.flex-1.overflow-hidden {
    flex-direction: column;
  }
  
  #pageNegotiation .w-2\\/5,
  #pageNegotiation .w-3\\/5 {
    width: 100%;
  }
  
  /* 协商页导航按钮进一步简化 */
  #pageNegotiation nav .tooltip[data-tip="邀请协作"],
  #pageNegotiation nav .tooltip[data-tip="版本历史"] {
    display: none;
  }
  
  /* 在小屏幕隐藏分隔线 */
  #pageNegotiation nav .w-px {
    display: none;
  }
  
  /* 项目页标题区域 */
  .nav-brand {
    font-size: 13px;
  }
  
  /* 新建项目按钮只保留图标 */
  #pageProjects nav .btn-primary {
    padding: 8px 10px;
    font-size: 0;
  }
  #pageProjects nav .btn-primary i {
    font-size: 14px;
    margin: 0;
  }
  
  /* 加入按钮只保留图标 */
  #pageProjects nav [data-tip="邀请码加入"] span {
    display: none;
  }
}

@media (max-width: 420px) {
  /* 极小屏幕额外优化 */
  .stat-card {
    padding: 12px;
  }
  
  .stat-card .stat-value {
    font-size: 1.1rem;
  }
  
  /* 导航栏品牌隐藏副标题 */
  .nav-brand + p {
    display: none;
  }
}

/* ========== 45. Skeleton 加载占位 ========== */
.skeleton {
  background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-3) 50%, var(--surface-1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  border-radius: 6px;
}

.skeleton-title {
  height: 20px;
  width: 60%;
  border-radius: 6px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
}

/* ========== 46. 输入框focus增强动效 ========== */
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 
    0 0 0 3px rgba(93, 196, 179, 0.12),
    var(--shadow-sm);
  transform: translateY(-1px);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  box-shadow: none;
  transform: none;
}

input, textarea, select {
  transition: all 0.2s var(--ease-smooth);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  flex-shrink: 0;
}

/* ========== 47. 空状态动画增强 ========== */
.empty-state-container {
  animation: emptyFadeIn 0.5s var(--ease-smooth);
}

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

/* ========== 48. 打印样式 ========== */
@media print {
  nav, .navbar, .ai-assistant-fab, .ai-chat-window, .toast-container {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .card, .project-card, .module-card {
    box-shadow: none;
    border: 1px solid rgba(46, 196, 182, 0.12);
  }
}

/* =================================================================
   49. 微交互增强系统 V18 - Polished Micro-Interactions
   2026年2月 - 全局交互感受优化
   ================================================================= */

/* ---------- 49.1 统计卡片 hover 增强 ---------- */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(93,196,179,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-apple);
  pointer-events: none;
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-card:hover .icon-container {
  transform: scale(1.12) rotate(-4deg);
  transition: transform 0.4s var(--ease-bounce);
}

.stat-card:hover .stat-value {
  transform: scale(1.05);
  transition: transform 0.35s var(--ease-bounce);
}

.stat-card .stat-value,
.stat-card .icon-container {
  transition: transform 0.3s var(--ease-apple);
}

/* 统计卡片悬浮时label 微妙上移 */
.stat-card:hover .stat-label {
  transform: translateY(-1px);
  color: var(--text-secondary);
  transition: all 0.3s var(--ease-apple);
}

.stat-card .stat-label {
  transition: all 0.3s var(--ease-apple);
}

/* ---------- 49.2 项目卡片 hover 高级效果 ---------- */
.project-card {
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(93,196,179,0.04) 0%, transparent 40%, transparent 60%, rgba(93,196,179,0.02) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-apple);
  pointer-events: none;
  z-index: 1;
}

.project-card:hover::after {
  opacity: 1;
}

/* 项目卡片图标容器动效 */
.project-card:hover .rounded-xl:first-child {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.project-card .rounded-xl:first-child {
  transition: all 0.35s var(--ease-bounce);
}

/* 项目卡片底部分割线展开 */
.project-card .border-t {
  position: relative;
}

.project-card .border-t::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  right: 50%;
  height: 1px;
  background: var(--gradient-primary);
  transition: all 0.4s var(--ease-spring);
  opacity: 0;
}

.project-card:hover .border-t::before {
  left: 0;
  right: 0;
  opacity: 1;
}

/* ---------- 49.3 导航按钮微交互 ---------- */
/* 导航栏中的圆形按钮（帮助、模板等） */
nav button[class*="rounded-full"],
nav button[class*="rounded-lg"] {
  position: relative;
  transition: all 0.25s var(--ease-apple);
}

nav button[class*="rounded-full"]:hover,
nav button[class*="rounded-lg"]:hover {
  transform: translateY(-1px);
}

nav button[class*="rounded-full"]:active,
nav button[class*="rounded-lg"]:active {
  transform: translateY(0) scale(0.95);
  transition-duration: 0.1s;
}

/* 导航栏图标 hover 旋转 */
nav button:hover > i.fa-question-circle,
nav button:hover > i.fa-th-large,
nav button:hover > i.fa-cog {
  animation: iconWiggle 0.5s var(--ease-bounce);
}

@keyframes iconWiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
  75% { transform: rotate(-4deg); }
  100% { transform: rotate(0deg); }
}

/* 返回按钮箭头动画增强 */
.back-btn:hover > i.fa-arrow-left {
  animation: arrowSlide 0.4s var(--ease-apple);
}

@keyframes arrowSlide {
  0% { transform: translateX(0); }
  40% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* ---------- 49.4 视角切换按钮动效 ---------- */
.perspective-badge {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.perspective-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 0;
}

.perspective-badge:hover::before {
  opacity: 1;
}

.perspective-badge:active {
  transform: scale(0.96);
  transition-duration: 0.1s;
}

/* ---------- 49.5 表单输入框聚焦涟漪 ---------- */
.form-group, .password-wrapper {
  position: relative;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 
    0 0 0 3px rgba(93, 196, 179, 0.12),
    var(--shadow-sm);
  animation: inputFocusPulse 0.5s var(--ease-apple);
}

@keyframes inputFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(93,196,179,0.2); }
  50% { box-shadow: 0 0 0 5px rgba(93,196,179,0.08), var(--shadow-sm); }
  100% { box-shadow: 0 0 0 3px rgba(93,196,179,0.12), var(--shadow-sm); }
}

/* ---------- 49.6 模态框进出动画增强 ---------- */
.modal-overlay, .modal-backdrop {
  transition: backdrop-filter 0.3s var(--ease-apple);
}

.modal-card, .modal-content, .modal-dialog {
  animation: modalEnterV18 0.4s var(--ease-spring);
}

@keyframes modalEnterV18 {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
    filter: blur(4px);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.modal-closing .modal-card,
.modal-closing .modal-content,
.modal-closing .modal-dialog {
  animation: modalExitV18 0.25s var(--ease-smooth) forwards;
}

@keyframes modalExitV18 {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
    filter: blur(3px);
  }
}

/* ---------- 49.7 模块卡片悬浮揭示效果 ---------- */
.module-card {
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(93,196,179,0.04), transparent);
  transition: left 0.6s var(--ease-apple);
  pointer-events: none;
  z-index: 0;
}

.module-card:hover::before {
  left: 100%;
}

.module-card:hover {
  border-color: rgba(93,196,179,0.2);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(93,196,179,0.06);
}

/* ---------- 49.8 协商消息气泡交互增强 ---------- */
.negotiation-item {
  position: relative;
  overflow: hidden;
}

.negotiation-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--gradient-primary);
  opacity: 0.08;
  transition: width 0.4s var(--ease-apple);
  pointer-events: none;
}

.negotiation-item:hover::after {
  width: 100%;
}

.negotiation-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

/* 协商消息时间戳悬浮显示增强 */
.negotiation-item .text-xs.text-gray-400 {
  transition: all 0.25s var(--ease-apple);
}

.negotiation-item:hover .text-xs.text-gray-400 {
  color: var(--text-secondary);
}

/* ---------- 49.9 快捷按钮弹性动效 ---------- */
.quick-input-btn, .ai-quick-btn {
  transform-origin: center;
}

.quick-input-btn:hover, .ai-quick-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 12px rgba(93,196,179,0.12);
}

.quick-input-btn:active, .ai-quick-btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.08s;
}

/* ---------- 49.10 模板卡片选择动效 ---------- */
.template-card {
  position: relative;
  overflow: hidden;
}

.template-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(93,196,179,0.06) 0%, transparent 50%);
  transform: scale(0);
  transition: transform 0.5s var(--ease-spring);
  pointer-events: none;
}

.template-card:hover::before {
  transform: scale(1);
}

.template-card:hover .rounded-lg,
.template-card:hover .rounded-xl {
  transform: scale(1.1) rotate(-3deg);
  transition: transform 0.4s var(--ease-bounce);
}

/* 模板卡片选中时弹跳 */
.template-card.selected {
  animation: templateSelect 0.45s var(--ease-bounce);
}

@keyframes templateSelect {
  0% { transform: scale(1); }
  30% { transform: scale(1.04); }
  60% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* ---------- 49.11 徽章悬浮效果 ---------- */
.badge {
  transition: all 0.25s var(--ease-apple);
  cursor: default;
}

.badge:hover {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 状态徽章闪光效果 */
.badge-success, .badge-warning, .badge-danger {
  position: relative;
  overflow: hidden;
}

.badge-success::after, .badge-warning::after, .badge-danger::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgeShine {
  0%, 80%, 100% { left: -100%; }
  40% { left: 150%; }
}

/* ---------- 49.12 空状态卡片互动增强 ---------- */
.empty-state .group {
  transition: all 0.35s var(--ease-apple);
}

.empty-state .group:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(93,196,179,0.1);
}

/* 空状态特性图标hover动画 */
.empty-state .text-center .rounded-xl {
  transition: all 0.35s var(--ease-bounce);
}

.empty-state .text-center:hover .rounded-xl {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 4px 16px rgba(93,196,179,0.15);
}

.empty-state .text-center:hover .font-medium {
  color: var(--color-primary-dark);
  transition: color 0.25s;
}

/* ---------- 49.13 用户头像 hover 光环 ---------- */
.user-dropdown-header .rounded-xl {
  transition: all 0.35s var(--ease-bounce);
}

.user-dropdown-header:hover .rounded-xl {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(93,196,179,0.2), 0 4px 12px rgba(93,196,179,0.3);
}

/* 下拉菜单项波纹效果 */
.user-dropdown-item {
  position: relative;
  overflow: hidden;
  transition: all 0.2s var(--ease-apple);
}

.user-dropdown-item::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  opacity: 0;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
  color: rgba(93,196,179,0.5);
  content: '\f054';
  transition: all 0.25s var(--ease-apple);
}

.user-dropdown-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.user-dropdown-item:hover {
  padding-left: 20px;
}

.user-dropdown-item.danger::after {
  color: rgba(220,38,38,0.4);
}

/* ---------- 49.14 签署进度步骤动效 ---------- */
.sign-progress-step {
  transition: all 0.35s var(--ease-apple);
}

.sign-progress-step:hover {
  transform: translateY(-2px);
}

.sign-progress-step.active {
  animation: stepActivePulse 2s ease-in-out infinite;
}

@keyframes stepActivePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(93,196,179,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(93,196,179,0); }
}

/* ---------- 49.15 Toast 通知悬停暂停 ---------- */
.toast {
  transition: transform 0.2s var(--ease-apple);
}

.toast:hover {
  transform: translateX(-4px);
}

.toast:hover .toast-progress {
  animation-play-state: paused;
}

/* ---------- 49.16 Agent卡片处理中增强 ---------- */
.agent-card {
  transition: all 0.35s var(--ease-apple);
}

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

.agent-card.processing {
  position: relative;
  overflow: hidden;
}

.agent-card.processing::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--gradient-neon);
  background-size: 200% 100%;
  animation: agentProgressBar 1.5s ease-in-out infinite;
  width: 100%;
}

@keyframes agentProgressBar {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ---------- 49.17 滚动揭示动画 (Intersection Observer 辅助) ---------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-apple), transform 0.6s var(--ease-apple);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 49.18 图标容器全局hover增强 ---------- */
.icon-container {
  transition: all 0.3s var(--ease-bounce);
}

.icon-container:hover,
*:hover > .icon-container {
  transform: scale(1.1) rotate(-4deg);
}

.icon-container i {
  transition: transform 0.3s var(--ease-bounce);
}

.icon-container:hover i {
  transform: scale(1.1);
}

/* ---------- 49.19 全局按钮按下反馈增强 ---------- */
.btn:active,
button:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

/* 按钮内图标悬浮微妙动画 */
.btn:hover i, button:hover i {
  transition: transform 0.3s var(--ease-bounce);
}

.btn-primary:hover i.fa-plus,
button:hover i.fa-plus {
  transform: rotate(90deg);
}

.btn-primary:hover i.fa-save,
button:hover i.fa-save {
  animation: saveWiggle 0.5s var(--ease-bounce);
}

@keyframes saveWiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.btn-primary:hover i.fa-download,
button:hover i.fa-download {
  animation: downloadBounce 0.5s var(--ease-bounce);
}

@keyframes downloadBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.btn-primary:hover i.fa-signature,
button:hover i.fa-signature {
  animation: signatureWrite 0.6s var(--ease-apple);
}

@keyframes signatureWrite {
  0% { transform: translateX(0) rotate(0); }
  30% { transform: translateX(2px) rotate(-3deg); }
  60% { transform: translateX(-1px) rotate(2deg); }
  100% { transform: translateX(0) rotate(0); }
}

/* ---------- 49.20 选择器/筛选器 hover ---------- */
select {
  transition: all 0.2s var(--ease-apple);
  cursor: pointer;
}

select:hover {
  border-color: rgba(93,196,179,0.4);
  box-shadow: 0 2px 8px rgba(93,196,179,0.06);
}

/* ---------- 49.21 智能联动面板条目滑入 ---------- */
.smart-change-item {
  position: relative;
  overflow: hidden;
}

.smart-change-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s var(--ease-spring);
}

.smart-change-item:hover::before {
  transform: scaleY(1);
}

/* ---------- 49.22 欢迎banner hover光效 ---------- */
.cyber-bg:hover::before {
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(93, 196, 179, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(73, 168, 154, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(50, 173, 230, 0.15) 0%, transparent 50%);
  transition: background 0.8s var(--ease-apple);
}

/* 欢迎banner按钮增强 */
.cyber-bg button {
  transition: all 0.3s var(--ease-apple);
}

.cyber-bg button:hover {
  transform: translateY(-2px);
}

.cyber-bg button:active {
  transform: translateY(0) scale(0.97);
}

/* ---------- 49.23 AI聊天窗口消息滑入增强 ---------- */
.ai-message {
  animation: aiMsgSlideIn 0.35s var(--ease-spring);
}

@keyframes aiMsgSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ai-message.user {
  animation: aiMsgSlideInUser 0.3s var(--ease-spring);
}

@keyframes aiMsgSlideInUser {
  from {
    opacity: 0;
    transform: translateX(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* AI消息头像hover */
.ai-message-avatar {
  transition: all 0.3s var(--ease-bounce);
}

.ai-message:hover .ai-message-avatar {
  transform: scale(1.12);
}

/* AI发送按钮发送动画 */
.ai-chat-send-btn:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(93,196,179,0.35);
}

.ai-chat-send-btn:active:not(:disabled) {
  transform: scale(0.92);
  transition-duration: 0.08s;
}

/* ---------- 49.24 链接/可点击文本 hover ---------- */
a, [onclick], [role="button"] {
  cursor: pointer;
}

/* 下划线链接滑入效果 */
.text-teal-500, .text-teal-600 {
  position: relative;
}

button.text-teal-500::after,
button.text-teal-600::after,
a.text-teal-500::after,
a.text-teal-600::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s var(--ease-apple);
}

button.text-teal-500:hover::after,
button.text-teal-600:hover::after,
a.text-teal-500:hover::after,
a.text-teal-600:hover::after {
  width: 100%;
}

/* ---------- 49.25 标签切换(Tab)增强 ---------- */
.ai-tab, .negotiation-tab, [id^="tab"] {
  position: relative;
  transition: all 0.25s var(--ease-apple);
}

.ai-tab:hover, .negotiation-tab:hover {
  color: var(--color-primary) !important;
}

.ai-tab::after, .negotiation-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: all 0.3s var(--ease-spring);
  transform: translateX(-50%);
}

.ai-tab:hover::after, .negotiation-tab:hover::after {
  width: 60%;
}

.ai-tab.active::after, .negotiation-tab.active::after {
  width: 100%;
}

/* ---------- 49.26 引导教程增强 ---------- */
.onboarding-card {
  animation: onboardEnter 0.5s var(--ease-spring);
}

@keyframes onboardEnter {
  0% {
    opacity: 0;
    transform: translateY(48px) scale(0.9);
    filter: blur(6px);
  }
  70% { filter: blur(0); }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.step-dot {
  transition: all 0.3s var(--ease-bounce);
}

.step-dot:hover {
  transform: scale(1.4);
  background: rgba(255, 255, 255, 0.6);
}

/* ---------- 49.27 确认对话框增强 ---------- */
.confirm-icon {
  transition: all 0.4s var(--ease-bounce);
}

.confirm-dialog:hover .confirm-icon {
  transform: scale(1.08);
}

.confirm-icon.warning {
  animation: warnPulse 2s ease-in-out infinite;
}

@keyframes warnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

.confirm-icon.danger {
  animation: dangerPulse 2s ease-in-out infinite;
}

@keyframes dangerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ---------- 49.28 拖拽提示和交互状态 ---------- */
.draggable, [draggable="true"] {
  cursor: grab;
  transition: all 0.25s var(--ease-apple);
}

.draggable:active, [draggable="true"]:active {
  cursor: grabbing;
  opacity: 0.85;
  transform: scale(1.02) rotate(1deg);
  box-shadow: var(--shadow-xl);
}

/* ---------- 49.29 焦点可见性(Accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(93,196,179,0.15);
}

/* ---------- 49.30 页面进入交错动画增强 ---------- */
.page.active .stat-card {
  animation: staggerFadeIn 0.45s var(--ease-apple) both;
}

.page.active .stat-card:nth-child(1) { animation-delay: 0.05s; }
.page.active .stat-card:nth-child(2) { animation-delay: 0.1s; }
.page.active .stat-card:nth-child(3) { animation-delay: 0.15s; }
.page.active .stat-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- 49.31 密码切换按钮微动效 ---------- */
.password-toggle:hover {
  transform: translateY(-50%) scale(1.1);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

/* ---------- 49.32 版本项目hover增强 ---------- */
.version-item {
  position: relative;
  overflow: hidden;
}

.version-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s var(--ease-spring);
}

.version-item:hover::before {
  transform: scaleY(1);
}

.version-item:hover {
  padding-left: calc(0.75rem + 3px);
}

/* ---------- 49.33 减弱动画 (prefers-reduced-motion) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .stat-card:hover .icon-container,
  .project-card:hover,
  .template-card:hover,
  .ai-assistant-fab:hover {
    transform: none !important;
  }
}

/* ---------- 49.34 键盘导航焦点增强 ---------- */
body:not(.keyboard-nav) :focus {
  outline: none;
}

body.keyboard-nav :focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(93,196,179,0.15);
}

/* ---------- 49.35 全局hover光标提示 ---------- */
.project-card, .template-card, .module-card, .agent-card,
.negotiation-item, .smart-change-item, .version-item {
  cursor: pointer;
}

/* ---------- 49.36 统计卡片筛选器交互 ---------- */
.stat-filter-card {
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

/* 可点击提示 - 底部小箭头 */
.stat-filter-card::before {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
  opacity: 0;
  transition: all 0.3s var(--ease-apple);
}

.stat-filter-card:hover::before {
  transform: translateX(-50%) scaleX(1);
  opacity: 0.4;
}

/* 激活态 - 选中的筛选卡片 */
.stat-filter-card.stat-filter-active {
  border-color: var(--color-primary);
  box-shadow: 
    var(--shadow-card-hover),
    0 0 0 2px rgba(46, 196, 182, 0.15);
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.08) 0%, var(--surface-2) 100%);
}

.stat-filter-card.stat-filter-active::before {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
  width: 24px;
  height: 3px;
  bottom: 5px;
}

.stat-filter-card.stat-filter-active .stat-label {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.stat-filter-card:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* ---------- 49.36 数字变化闪烁高亮 ---------- */
.stat-value[data-animated="true"] {
  transition: color 0.3s;
}

/* ---------- 49.37 滚动条出现渐变 ---------- */
.modal-body::-webkit-scrollbar-thumb,
.ai-chat-messages::-webkit-scrollbar-thumb,
.onboarding-content::-webkit-scrollbar-thumb {
  transition: background 0.3s;
}

.modal-body:hover::-webkit-scrollbar-thumb,
.ai-chat-messages:hover::-webkit-scrollbar-thumb,
.onboarding-content:hover::-webkit-scrollbar-thumb {
  background: rgba(46, 196, 182, 0.2);
}

/* =================================================================
   50. Bloomberg Terminal Card & Data Panel Enhancements V2
   2026年3月 - Step 3 终端化数据面板
   ================================================================= */

/* ---------- 50.1 Terminal-style scan line overlay for cards ---------- */
.project-card,
.stat-card {
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(46,196,182,0.008) 2px,
      rgba(46,196,182,0.008) 3px
    );
  background-size: 100% 3px;
}

/* ---------- 50.2 Data grid cell hover glow ---------- */
.project-card .grid > div:hover {
  box-shadow: inset 0 0 12px rgba(46,196,182,0.06);
  transition: box-shadow 0.2s ease;
}

/* ---------- 50.3 Terminal cursor blink for active data ---------- */
@keyframes terminalBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ticker-value {
  animation: terminalBlink 1.5s ease-in-out infinite;
}

/* ---------- 50.4 Detail page panel headers ---------- */
#detailRight .bg-\[\#0F2E2B\],
#pdRight .bg-\[\#0F2E2B\] {
  border-radius: 6px !important;
}

/* ---------- 50.5 Radar dimension expand animation ---------- */
.radar-dim-item {
  transition: all 0.25s var(--ease-apple);
}
.radar-dim-item:hover {
  border-color: rgba(46,196,182,0.18) !important;
  background: rgba(11,30,28,0.8) !important;
}
.dim-arrow {
  transition: transform 0.25s var(--ease-apple);
}
.radar-dim-item.expanded .dim-arrow {
  transform: rotate(180deg);
}

/* ---------- 50.6 Portfolio category filter buttons ---------- */
.mp-filter-btn {
  background: var(--surface-1);
  color: var(--text-muted);
  border-color: rgba(46,196,182,0.1);
  cursor: pointer;
}
.mp-filter-btn:hover {
  background: rgba(46,196,182,0.06);
  color: var(--text-secondary);
  border-color: rgba(46,196,182,0.2);
}
.mp-filter-btn.active {
  background: rgba(139,92,246,0.08);
  color: #A78BFA;
  border-color: rgba(139,92,246,0.25);
}

/* ---------- 50.7 Match bar enhanced ---------- */
.match-bar {
  background: rgba(46,196,182,0.06) !important;
}
.match-bar-fill {
  position: relative;
}
.match-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: inherit;
  filter: brightness(1.4);
  border-radius: 0 2px 2px 0;
}

/* ---------- 50.8 Search input terminal style ---------- */
.search-input,
#dealSearch,
#mcSearchInput,
#abInput {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text-primary) !important;
}
.search-input::placeholder,
#dealSearch::placeholder,
#mcSearchInput::placeholder {
  color: var(--text-muted) !important;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.search-input:focus,
#dealSearch:focus,
#mcSearchInput:focus {
  border-color: rgba(46,196,182,0.3) !important;
  box-shadow: 0 0 0 2px rgba(46,196,182,0.08), inset 0 0 8px rgba(46,196,182,0.04);
  outline: none;
}

/* ---------- 50.9 Select dropdown terminal style ---------- */
#filterStatus,
#mcFilterIndustry,
#mcSortBy {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%235A9A90' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}
#filterStatus:focus,
#mcFilterIndustry:focus,
#mcSortBy:focus {
  border-color: rgba(46,196,182,0.3) !important;
  box-shadow: 0 0 0 2px rgba(46,196,182,0.08);
  outline: none;
}

/* ---------- 50.10 icon-container standardized ---------- */
.icon-container {
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s var(--ease-bounce);
}
.icon-container-sm {
  width: 36px;
  height: 36px;
}

/* ---------- 50.11 Revenue bar chart in detail page ---------- */
#detailRight .h-36 > div:hover .rounded-t-md,
#pdRight .h-32 > div:hover .rounded-t-md {
  filter: brightness(1.3);
  box-shadow: 0 -4px 12px rgba(93,196,179,0.2);
}

/* ---------- 50.12 Sieve/filter tag hover ---------- */
.source-tag:hover,
.sieve-tag:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* ---------- 50.13 Empty state terminal enhancement ---------- */
.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(46,196,182,0.06);
  border: 2px dashed rgba(46,196,182,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---------- 50.14 back-btn terminal style ---------- */
.back-btn {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}
.back-btn:hover {
  background: rgba(46,196,182,0.06);
}
