/* ========================================
   组件样式 — 按钮 / 表单 / 卡片 / 模态框
   ======================================== */

/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--ink-800);
  background: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

::selection { background: var(--forest-200); color: var(--forest-800); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--r-full);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur-norm) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--forest-600);
  color: var(--white);
  box-shadow: var(--sh-sm);
}
.btn-primary:hover {
  background: var(--forest-700);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

.btn-gold {
  background: var(--grad-gold);
  color: var(--forest-900);
  box-shadow: var(--sh-gold);
  font-weight: 800;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(232,168,21,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--forest-600);
  border: 2px solid var(--forest-300);
}
.btn-outline:hover {
  background: var(--forest-50);
  border-color: var(--forest-500);
}

.btn-ghost {
  background: transparent;
  color: var(--forest-600);
  border: none;
  padding: 10px 20px;
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: all var(--dur-fast);
}
.btn-ghost:hover { color: var(--forest-800); }

/* ===== 表单 ===== */
.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  color: var(--ink-800);
  background: var(--white);
  transition: all var(--dur-fast) var(--ease-out);
}

.input-field:focus {
  outline: none;
  border-color: var(--forest-500);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.12);
}

.input-field::placeholder { color: var(--ink-400); }

.input-field:disabled {
  background: var(--ink-50);
  color: var(--ink-400);
  cursor: not-allowed;
}

.form-group { margin-bottom: var(--sp-4); }
.form-row { display: flex; gap: var(--sp-3); }
.form-row .form-group { flex: 1; }

.form-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  margin-bottom: var(--sp-1);
  color: var(--ink-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upload-area {
  border: 2px dashed var(--ink-300);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  text-align: center;
  transition: all var(--dur-norm);
  background: var(--mist);
}
.upload-area:hover {
  border-color: var(--forest-400);
  background: var(--forest-50);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink-500);
  cursor: pointer;
  padding: var(--sp-3);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--ink-700);
  cursor: pointer;
}
.checkbox-label input { margin-top: 3px; }

.step-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  position: relative;
}
.step-progress::before {
  content: '';
  position: absolute;
  top: 14px; left: 0; right: 0;
  height: 2px;
  background: var(--ink-200);
}
.step-item { position: relative; z-index: 1; text-align: center; }
.step-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--ink-300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink-500);
  transition: all var(--dur-norm);
}
.step-circle.active { border-color: var(--forest-500); color: var(--forest-600); }
.step-circle.done { background: var(--forest-500); border-color: var(--forest-500); color: var(--white); }
.step-label { font-size: var(--fs-xs); color: var(--ink-500); margin-top: var(--sp-1); }

.error-text {
  color: #E5484D;
  font-size: var(--fs-sm);
  margin-top: var(--sp-2);
}

/* ===== 卡片 ===== */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--sh-sm);
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,31,23,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--sp-5);
}

.modal-content {
  background: var(--white);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sh-xl);
}

.modal-header {
  padding: var(--sp-5) var(--sp-6) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink-100);
}
.modal-header h2 { font-size: var(--fs-xl); font-weight: 800; color: var(--ink-900); }

.modal-close {
  width: 36px; height: 36px;
  border: none;
  background: var(--ink-50);
  border-radius: 50%;
  font-size: 20px;
  color: var(--ink-500);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.modal-close:hover { background: var(--ink-100); color: var(--ink-800); }

.modal-body { padding: var(--sp-5) var(--sp-6); }
.modal-footer {
  padding: var(--sp-4) var(--sp-6) var(--sp-6);
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,31,23,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: var(--sp-5);
}

.confirm-modal-content {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--sh-xl);
}

.confirm-modal-title { font-size: var(--fs-lg); font-weight: 800; margin-bottom: var(--sp-2); }
.confirm-modal-desc { font-size: var(--fs-sm); color: var(--ink-600); margin-bottom: var(--sp-5); }
.confirm-modal-actions { display: flex; gap: var(--sp-3); justify-content: center; }
