:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1c2434;
  --muted: #6b7688;
  --line: #e3e9f2;
  --primary: #3457d5;
  --primary-dark: #2542ad;
  --primary-soft: #eef2ff;
  --danger: #d93f4c;
  --success: #12855b;
  --shadow: 0 18px 50px rgba(38, 55, 90, .1);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .45;
  pointer-events: none;
  z-index: 0;
}
.bg-shape-a { width: 420px; height: 420px; background: #cddcff; top: -190px; left: -150px; }
.bg-shape-b { width: 380px; height: 380px; background: #d9f2ea; bottom: -200px; right: -140px; }

.page {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 20px 48px;
}

.hero { text-align: center; margin-bottom: 30px; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 11px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}
.hero-tag svg { width: 15px; height: 15px; fill: currentColor; }

.hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(26px, 5vw, 34px);
  letter-spacing: -.5px;
  line-height: 1.3;
}

.hero p { margin: 0; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid rgba(220, 228, 240, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field { margin-bottom: 20px; }

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.req { color: var(--danger); margin-left: 2px; }
.opt { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }

input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea { resize: vertical; min-height: 118px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #a7b0c0; }
input:focus, textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(52, 87, 213, .12);
}
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }

.counter { text-align: right; margin-top: 4px; font-size: 12px; color: var(--muted); }
.err { margin: 5px 0 0; color: var(--danger); font-size: 12.5px; min-height: 0; }
.err:empty { display: none; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding: 26px 18px;
  border: 1.5px dashed #b9c7de;
  border-radius: 14px;
  background: #f9fbff;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--primary); background: var(--primary-soft); outline: none; }
.dropzone.is-drag { border-color: var(--primary); background: #e8eeff; transform: scale(1.005); }
.dz-icon { width: 32px; height: 32px; fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.dz-title { margin: 0; font-size: 14px; font-weight: 600; color: #374151; }
.dz-hint { margin: 0; font-size: 12px; color: var(--muted); }

.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; margin-top: 14px; }
.previews:empty { display: none; }
.preview {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: #f7f9fc;
}
.preview img { width: 100%; height: 92px; object-fit: cover; display: block; }
.preview-meta { padding: 6px 8px; font-size: 11px; color: var(--muted); }
.preview-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-remove {
  position: absolute;
  top: 5px; right: 5px;
  width: 24px; height: 24px;
  border: 0; border-radius: 50%;
  background: rgba(17, 24, 39, .68);
  color: #fff;
  font-size: 15px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
}
.preview-remove:hover { background: var(--danger); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.progress-wrap { margin: 4px 0 16px; }
.progress-track { height: 7px; border-radius: 99px; background: #e8edf6; overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #4f76ec, #3457d5); transition: width .15s; }
.progress-text { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.form-alert {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff1f2;
  border: 1px solid #ffd7da;
  color: #a32733;
  font-size: 13.5px;
}

.actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.btn {
  min-width: 150px;
  padding: 12px 26px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .18s, transform .18s;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: not-allowed; }
.btn-ghost { background: var(--primary-soft); color: var(--primary-dark); }
.btn-ghost:hover { background: #dfe7ff; }
.tip { margin: 0; font-size: 12px; color: var(--muted); }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.success { text-align: center; padding: 36px 10px 24px; }
.success-icon {
  width: 62px; height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #e5f7ef;
  display: flex; align-items: center; justify-content: center;
}
.success-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--success); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.success h2 { margin: 0 0 8px; font-size: 24px; }
.success p { margin: 0 0 8px; color: var(--muted); }
.success .ticket { font-size: 13px; margin-bottom: 24px; }
.success .ticket span { color: var(--text); font-weight: 600; }

.footer { text-align: center; margin-top: 22px; color: #97a1b2; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (max-width: 620px) {
  .page { padding: 36px 14px 32px; }
  .card { padding: 22px 18px; border-radius: 14px; }
  .grid { grid-template-columns: 1fr; gap: 0; }
  .actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}
