/* ============================================================
   劳助助互助在线 — 劳助助争议助手
   设计语言：专业信赖 · 清晰现代 · 操作流畅
   ============================================================ */

/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
:root {
  --blue: #1a56db;
  --blue-dark: #1242b3;
  --blue-light: #3b82f6;
  --blue-soft: #dbeafe;
  --blue-bg: #eff6ff;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --amber: #f59e0b;
  --amber-soft: #fef3c7;

  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #1a56db;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ===== LOGIN OVERLAY ===== */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eff6ff 0%, #f8fafc 50%, #f0f9ff 100%);
  padding: 20px;
}
.icloud-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  width: 100%; max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.icloud-logo {
  width: 64px; height: 64px;
  background: var(--blue-bg);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
}
.icloud-title {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 6px;
  color: var(--text);
}
.icloud-subtitle {
  font-size: 14px; color: var(--text-secondary);
  margin-bottom: 28px; line-height: 1.5;
}
.icloud-form {
  display: flex; flex-direction: column; gap: 22px;
  width: 100%;
}
.icloud-input {
  box-sizing: border-box; width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 15px;
  font-family: inherit; color: var(--text);
  background: #f8fafc; outline: none;
  transition: all 0.15s;
}
.icloud-input:focus {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.icloud-btn {
  width: 100%; padding: 12px;
  background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
  margin-top: 4px;
}
.icloud-btn:hover { background: var(--blue-dark); }
.icloud-btn:active { transform: scale(0.98); }
.icloud-switch {
  margin-top: 16px; font-size: 14px;
  color: var(--text-secondary);
}
.icloud-switch a {
  color: var(--blue); text-decoration: none;
  font-weight: 600;
}
.icloud-switch a:hover { text-decoration: underline; }
.icloud-link-btn {
  white-space: nowrap; padding: 10px 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: var(--blue);
  font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.icloud-link-btn:hover { border-color: var(--blue); background: var(--blue-bg); }
.auth-error {
  color: var(--red); font-size: 13px;
  min-height: 18px; text-align: left;
}

/* ===== HEADER ===== */
#mainApp header { padding: 28px 0 16px; }
.header-top {
  display: flex; align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo .icon { font-size: 32px; }
.logo h1 {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
}
.subtitle {
  color: var(--text-secondary); font-size: 14px;
  margin-top: 4px;
}
.user-menu {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-secondary);
}
.user-menu a, .user-menu button {
  text-decoration: none; color: var(--blue);
  font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  background: var(--blue-bg); border: none;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.user-menu a:hover, .user-menu button:hover {
  background: var(--blue-soft);
}
.admin-link { color: var(--amber) !important; background: var(--amber-soft) !important; }

/* ===== STEPS ===== */
.steps {
  display: flex; justify-content: center; gap: 8px;
  margin: 20px 0 24px; flex-wrap: wrap;
}
.step {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 24px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}
.step .num {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center;
  justify-content: center;
  font-weight: 700; font-size: 12px;
  background: var(--bg); color: var(--text-secondary);
  transition: all 0.2s;
}
.step.active {
  background: var(--blue); color: #fff;
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(26,86,219,0.3);
}
.step.active .num { background: rgba(255,255,255,0.25); color: #fff; }
.step.done {
  background: var(--green-soft); color: var(--green);
  border-color: var(--green);
}
.step.done .num { background: var(--green); color: #fff; }

/* ===== FORM SECTIONS ===== */
.form-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.form-section:hover { box-shadow: var(--shadow); }
.form-section h2 {
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em; margin-bottom: 6px;
  color: var(--text);
}
.form-section > p { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.form-grid { display: flex; flex-direction: column; gap: 22px; }

/* ===== FIELDS ===== */
.field { display: flex; flex-direction: column; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field label.required::after {
  content: " *"; color: var(--red); font-weight: 700;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px; font-family: inherit;
  color: var(--text); background: #f8fafc;
  outline: none; transition: all 0.15s;
  -webkit-appearance: none; appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.field textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.field select {
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 36px; cursor: pointer;
}

/* ===== DATE PICKER ===== */
.date-picker {
  display: flex; gap: 4px; align-items: center;
}
.date-picker select {
  flex: 1; min-width: 0;
}
.date-sep {
  font-size: 12px; color: var(--text-light);
  flex-shrink: 0; font-weight: 500;
}

/* ===== STEPPER ===== */
.stepper {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  background: #f8fafc;
}
.stepper input {
  width: 72px; text-align: center;
  border: none !important; border-radius: 0 !important;
  border-left: 1.5px solid var(--border) !important;
  border-right: 1.5px solid var(--border) !important;
  font-size: 18px !important; font-weight: 700;
  padding: 12px 4px !important; box-shadow: none !important;
  background: #fff !important; outline: none;
}
.stepper-btn {
  width: 44px; height: 48px; display: flex;
  align-items: center; justify-content: center;
  font-size: 22px; font-weight: 500; color: var(--blue);
  background: transparent; border: none;
  cursor: pointer; transition: all 0.1s;
  -webkit-user-select: none; user-select: none;
  font-family: inherit;
}
.stepper-btn:hover { background: var(--blue-bg); }
.stepper-btn:active { background: var(--blue-soft); }

/* ===== BUTTONS ===== */
.form-section > .btn:last-child { margin-top: 24px; }
.btn-group { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
  padding: 11px 24px; font-size: 14px;
  font-weight: 600; border-radius: var(--radius);
  cursor: pointer; border: none; font-family: inherit;
  transition: all 0.15s; letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(26,86,219,0.2);
}
.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,86,219,0.3);
}
.btn-primary:active { transform: scale(0.98); }
.btn-outline {
  background: #fff; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-bg);
}

/* ===== RADIO & CHECKBOX CARDS ===== */
.radio-group, #evidenceCheckboxes {
  display: flex; flex-direction: column; gap: 8px;
}
.radio-card, .checkbox-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  font-size: 15px; background: #fff;
  transition: all 0.15s;
}
.radio-card:hover, .checkbox-card:hover {
  border-color: var(--blue-light);
  background: #f8fafc;
}
.radio-card:has(input:checked), .checkbox-card:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-bg);
}
.radio-card input[type="radio"],
.radio-card input[type="checkbox"],
.checkbox-card input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

/* ===== EVIDENCE GRID (2-column) ===== */
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ===== DISPUTE QUESTIONS ===== */
.question-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.question-item label {
  display: block; font-size: 14px;
  font-weight: 600; margin-bottom: 8px;
  color: var(--text);
}
.question-item select,
.question-item input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  color: var(--text); background: #fff;
  outline: none;
  transition: all 0.15s;
}
.question-item select:focus,
.question-item input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

/* ===== LOADING ===== */
.loading {
  text-align: center; padding: 48px 20px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--text-secondary); font-size: 14px; }
.loading .hint { font-size: 12px; color: var(--text-light); margin-top: 8px; }

/* ===== ANALYSIS RESULT ===== */
#analysisResult { padding: 8px 0 0; }
#analysisResult h2 { font-size: 22px; margin-bottom: 20px; }
#analysisContent {
  font-size: 15px; line-height: 1.7;
}
.analysis-section {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.analysis-section h3 {
  font-size: 16px; font-weight: 700;
  color: var(--blue); margin-bottom: 8px;
}
.analysis-section p { color: var(--text-secondary); font-size: 14px; }
.analysis-section li {
  color: var(--text-secondary); font-size: 14px;
  margin-left: 20px; margin-bottom: 4px;
}

/* ===== DOC CARDS ===== */
.doc-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.doc-card {
  padding: 24px 20px; border-radius: var(--radius-lg);
  border: 2px solid var(--border); cursor: pointer;
  text-align: center; background: #fff;
  transition: all 0.2s;
}
.doc-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.doc-card .doc-icon {
  font-size: 36px; margin-bottom: 12px;
}
.doc-card h3 {
  font-size: 16px; font-weight: 700;
  margin-bottom: 6px; color: var(--text);
}
.doc-card p {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.5;
}
.doc-preview {
  background: #fafafa; padding: 20px;
  border-radius: var(--radius); border: 1px solid var(--border);
  margin: 16px 0; font-size: 14px; line-height: 1.7;
  max-height: 500px; overflow-y: auto;
  white-space: pre-wrap; font-family: inherit;
}

/* ===== v20260531-3: Formal Document Styling ===== */
.doc-formal {
  white-space: pre-wrap;
  font-family: SimSun, "宋体", serif;
  font-size: 15px;
  line-height: 2.2;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}
.doc-missing-field {
  color: #ef4444;
  font-weight: 600;
  background: #fef2f2;
  padding: 1px 4px;
  border-radius: 4px;
}
#docFieldEditor {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
#docFieldEditor .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 768px) {
  #docFieldEditor .form-grid { grid-template-columns: 1fr; }
}
#docFieldEditor .field label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 4px; display: block; }
#docFieldEditor .field label.required::after { content: ' *'; color: #ef4444; }
#docFieldEditor .field input, #docFieldEditor .field textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #d1d5db;
  border-radius: 6px; font-size: 14px; box-sizing: border-box;
}

/* ===== FOOTER ===== */
#mainApp > footer {
  text-align: center; padding: 32px 0;
  color: var(--text-light); font-size: 13px;
  max-width: 500px; margin: 0 auto;
}

/* =================================================================
   MOBILE STYLES (combined base + mobile)
   ================================================================= */
@media (max-width: 768px) {
  .container { padding: 0 12px; }
  #mainApp header { padding: 20px 0 10px; }
  .header-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .user-menu { font-size: 12px; flex-wrap: wrap; }
  .logo h1 { font-size: 20px; }
  .logo .icon { font-size: 28px; }

  .steps { gap: 4px; margin: 16px 0 20px; }
  .step { font-size: 11px; padding: 6px 12px; gap: 4px; }
  .step .num { width: 20px; height: 20px; font-size: 10px; }

  .form-section { padding: 20px 16px; border-radius: var(--radius); }
  .form-section h2 { font-size: 18px; }
  .form-grid { gap: 12px; }

  .evidence-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .checkbox-card { padding: 10px 12px; }
  .checkbox-card span { font-size: 13px; }

  .doc-options { grid-template-columns: 1fr; gap: 10px; }
  .doc-card { padding: 20px; }

.form-section > .btn:last-child { margin-top: 24px; }
  .btn-group { flex-direction: column; gap: 8px; }
  .btn { width: 100%; padding: 13px 20px; font-size: 15px; }

  .icloud-card { padding: 32px 20px 28px; margin: 10px; border-radius: var(--radius); }
  .icloud-logo { width: 56px; height: 56px; font-size: 28px; }
  .icloud-title { font-size: 20px; }

  .date-picker { gap: 2px; flex-wrap: nowrap; }
  .date-picker select { font-size: 14px; padding: 10px 8px; }
  .date-sep { font-size: 11px; }

  .stepper input { width: 64px; font-size: 16px !important; padding: 10px 4px !important; }
  .stepper-btn { width: 40px; height: 44px; }
}

@media (max-width: 480px) {
  .evidence-grid { grid-template-columns: 1fr; }
  .form-section { padding: 16px 12px; }
  .step { font-size: 10px; padding: 5px 10px; }
  .step .num { width: 18px; height: 18px; font-size: 9px; }
  .logo h1 { font-size: 18px; }
  .radio-card, .checkbox-card { font-size: 14px; padding: 12px 14px; }
}

/* Touch target optimization */
@media (hover: none) and (pointer: coarse) {
  .btn, .btn-primary, .btn-outline {
    min-height: 46px; cursor: default;
  }
  .stepper-btn { min-width: 44px; min-height: 44px; }
  .radio-card, .checkbox-card, .doc-card { cursor: default; }
  .radio-card:active, .checkbox-card:active {
    transform: scale(0.98);
  }
  input, select, textarea { font-size: 16px !important; }
}

/* Per-evidence upload */
.evidence-item { margin-bottom: 4px; }
.evidence-type-upload { padding: 6px 0 2px 28px; }
.evidence-upload-btn {
  display: inline-block; padding: 5px 14px; font-size: 12px; color: #1a56db;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; cursor: pointer;
  transition: all 0.15s;
}
.evidence-upload-btn:hover { background: #dbeafe; }
.evidence-upload-btn:disabled { color: #9ca3af; background: #f3f4f6; border-color: #e5e7eb; cursor: not-allowed; }
.evidence-type-files { padding: 0 0 6px 28px; }

/* 分析进度条 */
.progress-bar {
  width: 100%; height: 6px;
  background: #e5e7eb; border-radius: 3px;
  overflow: hidden; margin: 16px 0;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #2563eb, #1a56db);
  border-radius: 3px;
  transition: width 0.6s ease;
  animation: progressPulse 2s infinite;
}
@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 法律/案例关联标签 */
.law-tag {
  display: inline-block;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 4px;
  margin: 0 2px;
  white-space: nowrap;
}

/* ====== v20260528-1: 多路由页面样式 ====== */

/* 入口页 */
.home-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 0;
}
.home-hero {
  text-align: center;
  margin-bottom: 32px;
}
.service-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.service-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.service-card:hover {
  border-color: #1a56db;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.12);
  transform: translateY(-2px);
}
.service-card .service-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.service-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #111827;
}
.service-card p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}
.service-card .service-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #9ca3af;
  transition: color 0.2s;
}
.service-card:hover .service-arrow {
  color: #1a56db;
}
.home-links {
  text-align: center;
  margin-top: 32px;
}
.home-links a {
  color: #1a56db;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.home-links a:hover {
  text-decoration: underline;
}

/* 质证流程 */
.exchange-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 0;
}
.exchange-steps-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}
.exchange-steps-bar::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}
.exchange-steps-bar .step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  flex: 1;
}
.exchange-steps-bar .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  transition: all 0.2s;
}
.exchange-steps-bar .step-label {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}
.exchange-steps-bar .step-item.active .step-num {
  background: #1a56db;
  color: #fff;
}
.exchange-steps-bar .step-item.active .step-label {
  color: #1a56db;
  font-weight: 600;
}
.exchange-steps-bar .step-item.completed .step-num {
  background: #10b981;
  color: #fff;
}
.exchange-steps-bar .step-item.completed .step-label {
  color: #10b981;
}
.exchange-content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  min-height: 300px;
}
.exchange-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

/* 分析报告选择卡片 */
.analysis-select-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.analysis-select-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.analysis-select-card:hover {
  border-color: #93c5fd;
}
.analysis-select-card.selected {
  border-color: #1a56db;
  background: #eff6ff;
}

/* 历史报告列表 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.history-card-info {
  flex: 1;
  min-width: 0;
}

/* 加载动画 */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #1a56db;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
  .home-page { padding: 16px 0; }
  .service-card { padding: 20px; }
  .service-card .service-arrow { right: 16px; }
  .exchange-container { padding: 16px 0; }
  .exchange-content { padding: 16px; }
  .exchange-steps-bar .step-label { font-size: 11px; }
  .exchange-steps-bar .step-num { width: 28px; height: 28px; font-size: 12px; }
  .history-card { flex-direction: column; align-items: flex-start; }
  .history-card .btn { align-self: flex-end; }
}
#registerForm.icloud-form { gap: 32px; }

/* v20260605-home-button */
.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.back-home-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}
@media (max-width: 640px) {
  .back-home-btn {
    font-size: 12px;
    padding: 5px 10px;
  }
}
