/* === 基础重置 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", -apple-system, sans-serif;
  font-size: 14px;
  color: #333;
  background: #f2f4f7;
  line-height: 1.6;
}

/* === Demo 声明条 === */
.demo-banner {
  background: #fff3cd; color: #856404; text-align: center;
  padding: 0.5rem 1rem; font-size: 0.85rem;
  border-bottom: 1px solid #ffc107;
}

/* === 产品介绍 === */
.intro-section {
  max-width: 900px; margin: 2rem auto 0; padding: 0 1rem;
}
.intro-title {
  font-size: 1.6rem; color: #1a3a5c; text-align: center; margin-bottom: 1rem;
}
.intro-desc {
  color: #555; font-size: 0.95rem; line-height: 1.8; margin-bottom: 1.5rem;
}
.intro-features {
  display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.5rem;
}
.intro-feature {
  display: flex; gap: 1rem; align-items: flex-start;
  background: #fff; border: 1px solid #e0e4e8; border-radius: 6px; padding: 1rem;
}
.intro-feature .feature-num {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: #1a3a5c; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: bold;
}
.intro-feature strong {
  color: #1a3a5c; font-size: 0.95rem;
}
.intro-feature p {
  color: #666; font-size: 0.88rem; margin-top: 0.3rem; line-height: 1.6;
}
.intro-footer {
  text-align: center; color: #888; font-size: 0.9rem;
  padding-bottom: 1rem; border-bottom: 2px solid #e0e4e8;
}

/* === 步骤条 === */
.step-bar {
  position: sticky; top: 0; z-index: 100;
  background: #1a3a5c;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.step-bar-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 0.8rem 1rem;
}
.step-item {
  display: flex; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,.45);
  font-size: 0.9rem;
}
.step-item .step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: bold;
}
.step-item.active { color: #fff; }
.step-item.active .step-num { background: #4caf50; }
.step-item.done { color: #fff; }
.step-item.done .step-num { background: #4caf50; }
.step-item.done .step-num::after { content: "✓"; }
.step-divider {
  width: 40px; height: 2px;
  background: rgba(255,255,255,.2);
  margin: 0 0.5rem;
}

/* === 内容区 === */
.content {
  max-width: 900px; margin: 2rem auto; padding: 0 1rem;
}
.step-panel { display: none; }
.step-panel.active { display: block; }

h2 { font-size: 1.3rem; color: #1a3a5c; margin-bottom: 0.5rem; }
.desc { color: #888; margin-bottom: 1.5rem; }
.required { color: #e74c3c; }

/* === 表单 === */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; color: #555; }
.form-group input[type="text"] {
  width: 100%; max-width: 400px; padding: 0.5rem 0.8rem;
  border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem;
  transition: border-color .2s;
}
.form-group input:focus { outline: none; border-color: #1a3a5c; }
.field-hint { display: block; color: #e74c3c; font-size: 0.8rem; margin-top: 0.2rem; min-height: 1.2em; }

/* === 按钮 === */
.btn-row { display: flex; gap: 0.8rem; margin-top: 1.5rem; align-items: center; }
.btn {
  display: inline-block; padding: 0.55rem 1.5rem;
  border: none; border-radius: 4px; cursor: pointer;
  font-size: 0.9rem; text-decoration: none;
  transition: opacity .2s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: #1a3a5c; color: #fff; }
.btn-outline { background: #fff; color: #1a3a5c; border: 1px solid #1a3a5c; }
.btn-warning { background: #f0ad4e; color: #fff; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* === 上传 === */
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 768px) { .upload-grid { grid-template-columns: 1fr; } }
.upload-card {
  border: 1px solid #e0e4e8; border-radius: 6px; padding: 1rem; background: #fff;
}
.upload-card-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem;
}
.upload-card-title { font-weight: 600; color: #1a3a5c; }
.upload-zone {
  display: block; border: 2px dashed #ccc; border-radius: 6px; padding: 1.5rem;
  text-align: center; cursor: pointer; transition: border-color .2s;
}
.upload-zone:hover { border-color: #1a3a5c; }
.upload-zone input[type="file"] { display: none; }
.upload-placeholder { color: #aaa; }
.upload-icon { font-size: 2rem; display: block; margin-bottom: 0.3rem; }
.upload-info { margin-top: 0.6rem; font-size: 0.85rem; color: #555; display: flex; gap: 0.8rem; align-items: center; }
.file-status { padding: 0.15rem 0.5rem; border-radius: 3px; font-size: 0.75rem; }
.status-pending { background: #fff3cd; color: #856404; }
.status-ok { background: #d4edda; color: #155724; }
.status-error { background: #f8d7da; color: #721c24; }

/* === 进度条 === */
.progress-bar {
  margin-top: 1rem; height: 4px; background: #e0e4e8; border-radius: 2px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0; background: #1a3a5c;
  transition: width .3s ease;
}

/* === 校验结果 === */
.validation-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.validation-table th, .validation-table td {
  border: 1px solid #e0e4e8; padding: 0.6rem 0.8rem; text-align: left;
}
.validation-table th { background: #e8edf3; color: #1a3a5c; font-weight: 600; font-size: 0.85rem; }
.result-pass { color: #155724; font-weight: bold; }
.result-fail { color: #721c24; font-weight: bold; }
.reasons-list { font-size: 0.8rem; color: #888; margin: 0.3rem 0 0 1rem; padding: 0; }
.reasons-list li { margin-bottom: 0.1rem; }
.warn-box {
  background: #fff3cd; color: #856404; padding: 0.8rem 1rem; border-radius: 4px;
  margin-top: 1rem; font-size: 0.9rem;
}

/* === 指标卡片 === */
.indicator-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 1rem 0;
}
@media (max-width: 768px) { .indicator-grid { grid-template-columns: repeat(2, 1fr); } }
.indicator-card {
  border: 1px solid #e0e4e8; border-radius: 4px; padding: 0.8rem; text-align: center; background: #fff;
}
.indicator-card .card-name { font-size: 0.75rem; color: #888; }
.indicator-card .card-value { font-size: 1.2rem; color: #1a3a5c; font-weight: bold; margin: 0.2rem 0; }
.indicator-card .card-formula { font-size: 0.7rem; color: #aaa; }

/* === 杜邦转换 === */
.dupont-formula-box {
  background: #e8edf3; padding: 0.8rem 1rem; border-radius: 4px;
  text-align: center; font-weight: 600; color: #1a3a5c; margin-bottom: 1rem;
}

/* === 历史报告列表 === */
.history-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e0e4e8;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.history-table th, .history-table td {
  border: 1px solid #e0e4e8;
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.history-table th {
  background: #e8edf3;
  color: #1a3a5c;
  font-weight: 600;
  font-size: 0.85rem;
}
.history-table tr:hover td {
  background: #f8f9fb;
}
.empty-hint {
  text-align: center;
  color: #aaa;
  padding: 1.5rem;
}
