/* ============================================
   KCRZ 科创融资诊断平台 · 设计系统 v1.0
   ============================================ */

/* ---- Design Tokens ---- */
:root {
  /* 品牌色 */
  --brand-900: #0A1628;
  --brand-800: #0F2440;
  --brand-700: #1A3A6E;
  --brand-600: #2563BE;
  --brand-500: #3B82F6;
  --brand-400: #60A5FA;
  --brand-300: #93C5FD;
  --brand-200: #DBEAFE;
  --brand-100: #EFF6FF;

  /* 强调色 - 金色 */
  --gold-600: #B8860B;
  --gold-500: #D4A017;
  --gold-400: #E8B931;
  --gold-300: #F5D76E;
  --gold-200: #FCEC9F;
  --gold-100: #FEF9E7;

  /* 五维诊断色系 */
  --dim-finance:     #E8B931;  /* 维度一 · 融资能力 */
  --dim-growth:      #3B82F6;  /* 维度二 · 营收增长 */
  --dim-qualification: #10B981;  /* 维度三 · 资质资产 */
  --dim-compliance:   #EF4444;  /* 维度四 · 信用合规 */
  --dim-bankfit:    #F59E0B;  /* 维度五 · 银行适配 */

  /* 语义色 */
  --green-500: #10B981;
  --green-400: #34D399;
  --green-100: #D1FAE5;
  --yellow-500: #F59E0B;
  --yellow-400: #FBBF24;
  --yellow-100: #FEF3C7;
  --red-500: #EF4444;
  --red-400: #F87171;
  --red-100: #FEE2E2;
  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50: #F9FAFB;

  /* 文字 */
  --text-primary:   #111827;
  --text-secondary: #6B7280;
  --text-tertiary:  #9CA3AF;
  --text-on-dark:   #F9FAFB;
  --text-on-brand:  #FFFFFF;

  /* 背景 */
  --bg-page:     #F3F4F6;
  --bg-card:     #FFFFFF;
  --bg-section:   #F9FAFB;
  --bg-dark:     #0A1628;

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.16);

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* 过渡 */
  --ease-fast: 150ms ease;
  --ease-norm: 300ms ease;
  --ease-slow: 500ms ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---- Typography ---- */
.h1 { font-size: 40px; font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; }
.h2 { font-size: 28px; font-weight: 700; line-height: 1.3; }
.h3 { font-size: 20px; font-weight: 600; line-height: 1.4; }
.h4 { font-size: 16px; font-weight: 600; line-height: 1.5; }
.body-lg { font-size: 18px; line-height: 1.6; color: var(--text-secondary); }
.body-md { font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.body-sm { font-size: 13px; line-height: 1.5; color: var(--text-tertiary); }
.caption { font-size: 12px; line-height: 1.4; color: var(--text-tertiary); }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.section { padding: var(--sp-16) 0; }
.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  transition: all var(--ease-norm);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--brand-900);
  box-shadow: 0 4px 16px rgba(212,160,23,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212,160,23,0.4);
}
.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline {
  background: transparent;
  color: var(--brand-600);
  border: 1.5px solid var(--brand-300);
}
.btn-outline:hover {
  background: var(--brand-100);
}
.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}
.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: var(--sp-6);
  transition: all var(--ease-norm);
}
.card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}
.card-elevated {
  box-shadow: var(--shadow-sm);
}
.card-elevated:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-gold {
  background: var(--gold-100);
  color: var(--gold-600);
}
.badge-blue {
  background: var(--brand-200);
  color: var(--brand-700);
}
.badge-green {
  background: var(--green-100);
  color: #065F46;
}
.badge-red {
  background: var(--red-100);
  color: #991B1B;
}

  /* ---- 维度图标系统（纯色块+文字，无五行字眼） ---- */
  .dim-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
  }
  .dim-icon-0 { background: var(--dim-finance); }
  .dim-icon-1 { background: var(--dim-growth); }
  .dim-icon-2 { background: var(--dim-qualification); }
  .dim-icon-3 { background: var(--dim-compliance); }
  .dim-icon-4 { background: var(--dim-bankfit); }

  /* 小型维度标签 */
  .dim-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
  }
  .dim-tag-0 { background: rgba(232,185,49,0.12); color: #9A6B00; }
  .dim-tag-1 { background: rgba(59,130,246,0.12); color: #1E40AF; }
  .dim-tag-2 { background: rgba(16,185,129,0.12); color: #065F46; }
  .dim-tag-3 { background: rgba(239,68,68,0.12);  color: #991B1B; }
  .dim-tag-4 { background: rgba(245,158,11,0.12);  color: #92400E; }

/* ---- 进度指示器 ---- */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  padding: var(--sp-4) 0;
}
.step-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  transition: all var(--ease-norm);
}
.step-item.active {
  color: var(--brand-700);
  background: var(--brand-200);
}
.step-item.completed {
  color: var(--green-500);
}
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--gray-200);
  color: var(--gray-500);
  flex-shrink: 0;
  transition: all var(--ease-norm);
}
.step-item.active .step-dot {
  background: var(--brand-600);
  color: #fff;
}
.step-item.completed .step-dot {
  background: var(--green-500);
  color: #fff;
}
.step-connector {
  width: 24px;
  height: 2px;
  background: var(--gray-200);
  flex-shrink: 0;
}
.step-connector.active {
  background: var(--brand-300);
}

/* ---- 评分圆环 ---- */
.score-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.score-ring::before {
  content: '';
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-dark);
}
.score-ring .score-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--gold-400);
  position: relative;
  z-index: 1;
  line-height: 1;
}
.score-ring .score-grade {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-400);
  position: relative;
  z-index: 1;
}

/* ---- 分数色阶 ---- */
.score-high   { color: var(--green-500) !important; }
.score-mid    { color: var(--yellow-500) !important; }
.score-low    { color: var(--red-500) !important; }
.bg-high { background: var(--green-500) !important; }
.bg-mid  { background: var(--yellow-500) !important; }
.bg-low  { background: var(--red-500) !important; }

/* ---- 导航栏 ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 var(--sp-6);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-900);
}
.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.navbar-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--ease-fast);
}
.navbar-links a:hover {
  color: var(--brand-700);
}

/* ---- 表单元素 ---- */
.form-group { margin-bottom: var(--sp-5); }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: all var(--ease-fast);
  outline: none;
}
.form-input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.form-input::placeholder {
  color: var(--gray-400);
}

/* 选项卡片 */
.option-card {
  padding: 16px 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--ease-norm);
  background: var(--bg-card);
}
.option-card:hover {
  border-color: var(--brand-300);
  background: var(--brand-100);
}
.option-card.selected {
  border-color: var(--brand-600);
  background: var(--brand-100);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.option-card .opt-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-700);
  margin-bottom: 4px;
}
.option-card .opt-label {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- 页脚 ---- */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.5);
  padding: var(--sp-10) 0 var(--sp-6);
  font-size: 13px;
}
.footer a { color: rgba(255,255,255,0.6); }
.footer a:hover { color: var(--gold-400); }

/* ---- 工具类 ---- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-10 { margin-top: var(--sp-10); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .h1 { font-size: 28px; }
  .h2 { font-size: 22px; }
  .section { padding: var(--sp-10) 0; }
  .container { padding: 0 var(--sp-4); }
  .navbar { padding: 0 var(--sp-4); }
  .stepper { overflow-x: auto; }
}
