/* DeepCFO 全局样式 */
:root {
  --primary: #6c3ce0;
  --primary-dark: #5429c4;
  --primary-light: #8b5cf6;
  --accent: #f59e0b;
  --bg-dark: #0f0a1a;
  --bg-card: #1a1128;
  --bg-card-hover: #241640;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  --border: #2d2145;
  --success: #10b981;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #6c3ce0, #8b5cf6);
  --gradient-accent: linear-gradient(135deg, #f59e0b, #f97316);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--accent); }

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 10, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 0 2rem;
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar .logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}
.navbar .logo span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  text-align: center;
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 60, 224, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 60, 224, 0.5);
  color: white;
}
.btn-accent {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  color: white;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-light);
  color: var(--primary-light);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(108, 60, 224, 0.15) 0%, transparent 70%);
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.hero h1 .highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero .price-tag {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 0.5rem 1.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 30px;
  color: var(--accent);
  font-size: 1rem;
}
.hero .price-tag .original {
  text-decoration: line-through;
  color: var(--text-muted);
  margin-right: 0.5rem;
}
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* 通用区块 */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s;
}
.card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(108, 60, 224, 0.15);
}
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}
.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}
.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.card ul {
  list-style: none;
  margin-top: 1rem;
}
.card ul li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  padding-left: 1.5rem;
  position: relative;
}
.card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

/* 产品卡片 */
.product-card {
  position: relative;
  overflow: hidden;
}
.product-card .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-accent);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.product-card .price {
  margin-top: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}
.product-card .price .original {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.product-card .price .current {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

/* 痛点卡片 */
.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.pain-card h4 {
  color: var(--primary-light);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}
.pain-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* 价值区 */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.value-item {
  padding: 2rem 1rem;
}
.value-item .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.value-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.value-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* AI展示区 */
.ai-section {
  background: linear-gradient(135deg, rgba(108, 60, 224, 0.1), rgba(139, 92, 246, 0.05));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem;
  margin: 2rem auto;
  max-width: 1200px;
}
.ai-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.ai-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.ai-feature .icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.ai-feature h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.ai-feature p { color: var(--text-secondary); font-size: 0.85rem; }

/* CTA区 */
.cta-section {
  text-align: center;
  padding: 5rem 2rem;
  background: radial-gradient(ellipse at 50% 100%, rgba(108, 60, 224, 0.15) 0%, transparent 70%);
}
.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== 登录页 ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
}
.auth-left {
  flex: 1;
  background: var(--gradient);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 50%);
}
.auth-left h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
}
.auth-left p {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  line-height: 1.8;
}
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-dark);
}
.auth-form {
  width: 100%;
  max-width: 420px;
}
.auth-form h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.auth-form .subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}
.auth-tabs button {
  flex: 1;
  padding: 0.8rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.auth-tabs button.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
}

/* 表单 */
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg-card); }

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none;
}
.form-message {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}
.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  display: block;
}
.form-message.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  display: block;
}

/* ===== Dashboard ===== */
.dashboard {
  padding-top: 80px;
  min-height: 100vh;
}
.dashboard-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dashboard-header h1 { font-size: 1.5rem; }
.dashboard-header .user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dashboard-header .user-info span { color: var(--text-secondary); }

.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* 产品选择 */
.product-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.product-select-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s;
}
.product-select-card:hover,
.product-select-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(108, 60, 224, 0.2);
}
.product-select-card h3 { margin-bottom: 0.5rem; }
.product-select-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* 订单表单 */
.order-form-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-top: 2rem;
  display: none;
}
.order-form-container.active { display: block; }
.order-form-container h2 { margin-bottom: 1.5rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* 订单历史 */
.order-history {
  margin-top: 3rem;
}
.order-history h2 { margin-bottom: 1.5rem; }
.order-table {
  width: 100%;
  border-collapse: collapse;
}
.order-table th,
.order-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.order-table th {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}
.order-table td { font-size: 0.9rem; }
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-pending { background: rgba(245, 158, 11, 0.15); color: var(--accent); }
.status-processing { background: rgba(108, 60, 224, 0.15); color: var(--primary-light); }
.status-completed { background: rgba(16, 185, 129, 0.15); color: var(--success); }

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  display: none;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  max-width: 500px;
  text-align: center;
}
.modal .icon { font-size: 3rem; margin-bottom: 1rem; }
.modal h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.modal p { color: var(--text-secondary); margin-bottom: 2rem; line-height: 1.8; }

/* Checkbox group */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: auto;
  accent-color: var(--primary);
}

/* 表单分区标题 */
.form-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-light);
  margin: 1.8rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.form-section-title:first-of-type { margin-top: 0; }

/* 动态行 */
.dynamic-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.dynamic-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 0.5rem;
  align-items: center;
}
.dynamic-input-sm {
  flex: 1;
  min-width: 0;
  width: auto !important;
  padding: 0.6rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.dynamic-input-sm:focus { outline: none; border-color: var(--primary-light); }
.btn-row-remove {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.btn-row-remove:hover { background: rgba(239, 68, 68, 0.15); color: var(--danger); border-color: var(--danger); }
.btn-add-row {
  margin-top: 0.5rem;
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--primary-light);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add-row:hover { border-color: var(--primary-light); background: rgba(108, 60, 224, 0.08); }

/* 文件上传 */
.file-upload-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.file-upload-area:hover { border-color: var(--primary-light); background: rgba(108, 60, 224, 0.05); }
.file-upload-area input[type="file"] {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.file-list { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.5rem; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(108, 60, 224, 0.08);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.file-item .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.file-item .file-size { color: var(--text-muted); font-size: 0.75rem; margin-left: 0.5rem; }
.file-item .file-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.3rem;
  transition: color 0.2s;
}
.file-item .file-remove:hover { color: var(--danger); }

/* 尽调子场景 Tab */
.sub-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}
.sub-tab {
  padding: 0.7rem 1.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
}
.sub-tab:hover { color: var(--text-secondary); }
.sub-tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
  font-weight: 600;
}
.dd-sub-form { display: none; }
.dd-sub-form.active { display: block; }

/* 上传进度弹窗 */
.progress-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.progress-step .step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  border: 2px solid var(--border);
  color: var(--text-muted);
}
.progress-step.done { color: var(--success); }
.progress-step.done .step-icon {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.progress-step.active { color: var(--primary-light); font-weight: 600; }
.progress-step.active .step-icon {
  border-color: var(--primary-light);
  color: var(--primary-light);
  animation: pulse-step 1.2s infinite;
}
@keyframes pulse-step {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
}
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.6rem;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  border-radius: 4px;
  transition: width 0.2s;
}

/* 响应式 */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .auth-page { flex-direction: column; }
  .auth-left { padding: 2rem; min-height: auto; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .product-select-grid { grid-template-columns: 1fr; }
  .checkbox-group { grid-template-columns: 1fr; }
}
