/* ============================================================
   厦门电信宽带预约 · 前台样式（极简版：仅登记表）
   无外部依赖、移动端优先
   ============================================================ */

:root {
  --blue-900: #0c2aa8;
  --blue: #1a3fd0;
  --blue-2: #2f6bff;
  --red: #e60012;
  --ink: #101a33;
  --ink-2: #39456b;
  --muted: #6d7897;
  --line: #e3e9f6;
  --bg: #f4f7ff;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------ 顶部 ------------------------------ */
.hdr { background: #fff; border-bottom: 1px solid #eef2fa; }
.hdr-in { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 46px; height: 30px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt b { font-size: 20px; letter-spacing: 1px; color: #12307f; }
.brand-txt i { font-size: 9px; font-style: normal; letter-spacing: .6px; color: #7b87a8; }
.brand-5g {
  font-size: 15px; font-weight: 900; font-style: italic; letter-spacing: -.5px;
  background: linear-gradient(135deg, #2f6bff, #e60012);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-left: 2px;
}
.hdr-right { display: flex; align-items: center; gap: 8px; }
.hdr-label { font-size: 12px; color: var(--muted); }
.hdr-tel {
  font-size: 20px; font-weight: 800; color: #12307f; letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------ 主体 ------------------------------ */
.main { padding: 28px 0 34px; }
.form-card {
  background: #fff; border-radius: 16px; padding: 26px 28px 24px;
  box-shadow: 0 14px 40px rgba(21, 48, 130, .10); border: 1px solid #eef2fb;
}
.form-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 22px; }
.form-head h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: .5px; }
.form-head p { margin: 0; font-size: 13px; color: var(--muted); }

.fg { border: 0; padding: 0; margin: 0 0 20px; }
.fg legend {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--ink-2);
  padding: 0; margin-bottom: 12px;
}
.fg legend::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-2), #4fd8ff);
}
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.field { min-width: 0; }
.w-full { grid-column: span 6; }
.w-half { grid-column: span 3; }
.w-third { grid-column: span 2; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field .req { color: var(--red); font-style: normal; margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; font-size: 15px; color: var(--ink);
  background: #fbfcff; border: 1px solid #d9e1f2; border-radius: 9px;
  font-family: inherit; transition: border-color .16s, box-shadow .16s, background .16s;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236d7897' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-2); background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .13);
}
.field input:invalid:not(:placeholder-shown) { border-color: #f0a7ad; }
.field .help { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }

/* 单选组（宽带套餐）：卡片式，兼容不支持 :has 的旧内核 */
.field .f-label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.pk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.field .pk { position: relative; display: block; margin: 0; font-weight: 400; cursor: pointer; }
.field .pk input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
  opacity: 0; border: 0; pointer-events: none;
}
.pk-box {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border: 1px solid #d9e1f2; border-radius: 10px;
  background: #fbfcff; font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
  transition: border-color .16s, background .16s, box-shadow .16s, color .16s;
}
.pk-dot {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #c3cee6; background: #fff;
  transition: border-color .16s, border-width .16s;
}
.pk-txt { min-width: 0; word-break: break-word; }
.pk:hover .pk-box { border-color: #b9c8ea; background: #fff; }
.field .pk input:checked + .pk-box {
  border-color: var(--blue-2); background: #f2f7ff;
  color: var(--blue-900); font-weight: 600;
  box-shadow: 0 0 0 2px rgba(47, 107, 255, .12);
}
.field .pk input:checked + .pk-box .pk-dot { border-color: var(--blue); border-width: 5px; }
.field .pk input:focus-visible + .pk-box { box-shadow: 0 0 0 3px rgba(47, 107, 255, .22); }
.fixed-val {
  padding: 11px 13px; border-radius: 9px; font-size: 15px; color: var(--ink-2);
  background: #eef2fb; border: 1px solid #e3e9f6;
}
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 9px;
  padding: 12px 22px; font-size: 15px; font-weight: 600;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; }

.form-actions { margin-top: 4px; }
.btn-submit {
  width: 100%; padding: 15px; font-size: 17px; font-weight: 700; letter-spacing: 2px;
  color: #fff; border-radius: 10px;
  background: linear-gradient(135deg, #2f6bff, #1a3fd0);
  box-shadow: 0 10px 26px rgba(26, 63, 208, .3);
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(26, 63, 208, .38); }
.btn-submit:disabled { opacity: .7; transform: none; cursor: not-allowed; }
.btn-submit.loading span::after {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%;
  vertical-align: -2px; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-err {
  margin: 0 0 14px; padding: 11px 14px; border-radius: 9px;
  background: #fff1f2; border: 1px solid #ffd4d7; color: #c0242f;
  font-size: 14px; line-height: 1.5; animation: fadeUp .25s ease;
}
.form-note {
  display: flex; gap: 6px; align-items: flex-start;
  margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6;
}
.form-note svg { width: 14px; height: 14px; flex: none; margin-top: 3px; color: #9aa6c4; }

/* 成功态 */
.success { text-align: center; padding: 18px 6px 8px; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.success-icon {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #22c55e, #0ea05a);
  box-shadow: 0 12px 30px rgba(16, 160, 90, .3);
}
.success-icon svg { width: 30px; height: 30px; }
.success h3 { margin: 0 0 8px; font-size: 20px; }
.success p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.success-code {
  display: inline-block; padding: 8px 16px; border-radius: 8px;
  background: #eef4ff; color: var(--blue); font-size: 14px; margin-bottom: 20px;
}
.success-code b { font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.success-act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-line { border-color: var(--blue-2); color: var(--blue-2); background: #fff; }
.btn-line:hover { background: #eef4ff; }
.btn-ghost { border-color: #dbe4f7; color: var(--ink-2); background: #fff; }
.btn-ghost:hover { background: #f6f9ff; }

.page-note { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* 页脚 */
.ftr { padding: 18px 0 26px; }
.ftr-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; font-size: 12px; color: var(--muted); text-align: center;
}
.ftr-in a { color: #3d5bab; }
.ftr-in a:hover { text-decoration: underline; }
.ftr-in .dot { color: #c3ccdf; }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 720px) {
  body { font-size: 14px; }
  .wrap { padding: 0 14px; }
  .hdr-in { height: 56px; }
  .brand-logo { width: 38px; height: 25px; }
  .brand-txt b { font-size: 17px; }
  .brand-txt i { font-size: 8px; }
  .hdr-label { display: none; }
  .hdr-tel { font-size: 17px; }
  .main { padding: 16px 0 26px; }
  .form-card { padding: 20px 16px 18px; border-radius: 14px; }
  .form-head h1 { font-size: 19px; }
  .form-head { padding-bottom: 12px; margin-bottom: 16px; }
  .grid { gap: 12px; }
  .w-half, .w-third { grid-column: span 6; }
  .field input, .field select, .field textarea { font-size: 16px; padding: 12px; }
  .btn-submit { padding: 14px; font-size: 16px; }
  .form-note { font-size: 11px; }
}

@media (max-width: 620px) {
  .pk-grid { grid-template-columns: 1fr; }
  .pk-box { padding: 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
