/* ===== 海南亚虹医药展台调查问卷 · 样式 ===== */
:root {
  --bg: #eef4f6;
  --bg-2: #e3eef1;
  --card: #ffffff;
  --primary: #0f8a8f;
  --primary-dark: #0a6b70;
  --primary-light: #e3f5f5;
  --accent: #2ec4b6;
  --text: #14313a;
  --text-2: #3d5a63;
  --muted: #7794a0;
  --border: #dde9ec;
  --border-strong: #c6dade;
  --danger: #d9534f;
  --danger-light: #fdeceb;
  --ok: #1f9d6b;
  --shadow-sm: 0 1px 2px rgba(16, 60, 70, .06), 0 2px 8px rgba(16, 60, 70, .05);
  --shadow-md: 0 6px 24px rgba(12, 70, 80, .10);
  --shadow-lg: 0 18px 50px rgba(9, 55, 65, .18);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

[v-cloak] { display: none !important; }

body {
  background:
    radial-gradient(1100px 520px at 12% -8%, #d5ecef 0%, rgba(213, 236, 239, 0) 62%),
    radial-gradient(900px 480px at 96% 4%, #e6f6f2 0%, rgba(230, 246, 242, 0) 58%),
    var(--bg);
  min-height: 100vh;
}

/* ---------- 顶部 Banner ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(122deg, #0a6b70 0%, #0f8a8f 46%, #17a8a0 100%);
  color: #fff;
  padding: 30px 20px 68px;
}
.hero::after {
  content: "";
  position: absolute;
  right: -90px; top: -120px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.hero::before {
  content: "";
  position: absolute;
  right: 90px; bottom: -150px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: #fff;
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
  flex: 0 0 auto;
}
.brand-text { line-height: 1.35; }
.brand-text strong { display: block; font-size: 15px; letter-spacing: .5px; }
.brand-text span { font-size: 12px; opacity: .82; }

.hero h1 {
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: .3px;
}
.hero-sub {
  margin: 0 0 16px;
  font-size: 14px;
  opacity: .92;
  line-height: 1.55;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-meta .tag {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(4px);
}

/* ---------- 主体 ---------- */
.wrap {
  max-width: 760px;
  margin: -46px auto 0;
  padding: 0 20px 64px;
  position: relative;
  z-index: 3;
}

/* ---------- 进度卡 ---------- */
.progress-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 16px 20px 15px;
  margin-bottom: 18px;
}
.progress-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 13px; color: var(--text-2); margin-bottom: 10px;
}
.progress-num { font-size: 15px; font-weight: 700; color: var(--primary); }
.progress-track {
  height: 8px; border-radius: 99px;
  background: #e8f0f2; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #17a8a0, #2ec4b6);
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.progress-hint { margin: 9px 0 0; font-size: 12px; color: var(--muted); }
.progress-hint.ok { color: var(--ok); font-weight: 600; }

/* ---------- 题目卡 ---------- */
.q-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  padding: 22px 22px 18px;
  margin-bottom: 14px;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.q-card:hover { box-shadow: var(--shadow-md); }
.q-card.invalid { border-color: #f0bdba; background: #fffbfb; }

.q-head { display: flex; gap: 13px; margin-bottom: 15px; }
.q-no {
  flex: 0 0 27px; height: 27px;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.q-card.invalid .q-no { background: var(--danger-light); color: var(--danger); }

.q-body { flex: 1; min-width: 0; }
.q-title {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--text);
}
.q-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.q-type {
  font-size: 11px; padding: 2.5px 9px; border-radius: 999px;
  background: #eef6f7; color: var(--primary-dark); border: 1px solid #d6e9ea;
}
.q-req { font-size: 11px; padding: 2.5px 9px; border-radius: 999px; background: #fff2ef; color: #c1553f; border: 1px solid #fadfd8; }
.q-max { font-size: 11px; color: var(--muted); align-self: center; }

/* ---------- 选项 ---------- */
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.option {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fcfefe;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .12s;
  user-select: none;
}
.option:hover { border-color: var(--accent); background: #f6fdfd; }
.option:active { transform: scale(.995); }
.option.checked { border-color: var(--primary); background: var(--primary-light); }
.option.disabled { opacity: .48; cursor: not-allowed; }
.option.disabled:hover { border-color: var(--border); background: #fcfefe; }

.checkbox {
  flex: 0 0 19px; width: 19px; height: 19px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  margin-top: 2px;
  position: relative;
  transition: all .16s;
}
.option.checked .checkbox { background: var(--primary); border-color: var(--primary); }
.option.checked .checkbox::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.opt-label { font-size: 14px; line-height: 1.62; color: var(--text-2); flex: 1; }
.option.checked .opt-label { color: var(--primary-dark); font-weight: 500; }

.opt-input {
  margin-top: 9px;
  width: 100%;
  font-size: 13.5px;
  padding: 9px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.opt-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 138, 143, .12); }
.option-inner { flex: 1; min-width: 0; }

/* ---------- 填空题 ---------- */
.text-input {
  width: 100%;
  font-size: 14.5px;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fcfefe;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.text-input::placeholder { color: #a8bcc4; }
.text-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(15, 138, 143, .12); }
.q-card.invalid .text-input { border-color: #f0bdba; }

/* ---------- 错误提示 ---------- */
.err {
  margin: 9px 0 0;
  font-size: 12.5px;
  color: var(--danger);
  display: flex; align-items: center; gap: 5px;
}
.err::before {
  content: "!";
  flex: 0 0 14px; height: 14px;
  border-radius: 50%;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 底部操作 ---------- */
.actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn {
  flex: 1;
  border: none;
  border-radius: 13px;
  padding: 15px 20px;
  font-size: 15.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .14s, box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.985); }
.btn-primary {
  background: linear-gradient(120deg, #0f8a8f, #17a8a0);
  color: #fff;
  box-shadow: 0 8px 22px rgba(15, 138, 143, .32);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(15, 138, 143, .42); }
.btn-ghost {
  flex: 0 0 auto;
  background: #fff;
  color: var(--text-2);
  border: 1.5px solid var(--border-strong);
  padding: 15px 22px;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.foot-note { text-align: center; font-size: 12px; color: var(--muted); margin: 20px 0 0; line-height: 1.7; }

/* ---------- 结果弹层 ---------- */
.mask {
  position: fixed; inset: 0;
  background: rgba(11, 46, 54, .48);
  backdrop-filter: blur(3px);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-head {
  padding: 24px 24px 18px;
  background: linear-gradient(122deg, #0a6b70, #17a8a0);
  color: #fff;
  text-align: center;
}
.modal-icon {
  width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  border: 2px solid rgba(255, 255, 255, .5);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.modal-head h2 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.modal-head p { margin: 0; font-size: 13px; opacity: .9; }
.modal-body { padding: 18px 24px; overflow-y: auto; flex: 1; }
.result-item { padding: 13px 0; border-bottom: 1px dashed var(--border); }
.result-item:last-child { border-bottom: none; }
.result-q { font-size: 13.5px; font-weight: 600; color: var(--text); margin: 0 0 7px; line-height: 1.55; }
.result-q .rn { color: var(--primary); margin-right: 5px; }
.result-a { font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.result-a .chip {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12.5px;
  line-height: 1.5;
}
.result-a.empty { color: var(--muted); font-style: normal; }
.modal-foot { padding: 14px 24px 20px; display: flex; gap: 10px; border-top: 1px solid var(--border); }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%; top: 26px;
  transform: translateX(-50%);
  background: #14313a;
  color: #fff;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  white-space: nowrap;
}

/* ---------- 过渡动画 ---------- */
.fade-enter-active, .fade-leave-active { transition: opacity .22s ease; }
.fade-enter, .fade-leave-to { opacity: 0; }
.pop-enter-active { transition: opacity .2s ease, transform .24s cubic-bezier(.3, 1.3, .6, 1); }
.pop-leave-active { transition: opacity .18s ease, transform .18s ease; }
.pop-enter, .pop-leave-to { opacity: 0; }
.pop-enter .modal, .pop-leave-to .modal { transform: scale(.94); }
.modal { transition: transform .24s cubic-bezier(.3, 1.3, .6, 1); }
.toast-in-enter-active, .toast-in-leave-active { transition: opacity .25s, transform .25s; }
.toast-in-enter, .toast-in-leave-to { opacity: 0; transform: translate(-50%, -10px); }

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
  .hero { padding: 22px 16px 60px; }
  .hero h1 { font-size: 21px; }
  .brand-logo { width: 40px; height: 40px; border-radius: 11px; font-size: 13px; }
  .wrap { padding: 0 14px 52px; margin-top: -42px; }
  .q-card { padding: 17px 15px 14px; border-radius: 14px; }
  .q-title { font-size: 14.5px; }
  .opt-label { font-size: 13.5px; }
  .option { padding: 11px 12px; gap: 10px; }
  .btn { padding: 14px 16px; font-size: 15px; }
  .modal-body { padding: 14px 16px; }
  .modal-head { padding: 20px 16px 15px; }
  .modal-foot { padding: 12px 16px 16px; }
  .actions { flex-direction: column-reverse; }
  .btn-ghost { width: 100%; }
}

/* ---------- 顶部提示条（已提交 / 离线暂存） ---------- */
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #eef7ff;
  border: 1px solid #cfe4f5;
  color: #245b7a;
  border-radius: 13px;
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.notice span { flex: 1; min-width: 180px; }
.notice.warn { background: #fff8e9; border-color: #f5e2b8; color: #8a6520; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex: 0 0 auto;
}
.notice.warn .link-btn { color: #a8791f; }
.link-btn:hover { opacity: .75; }

/* ---------- 提交按钮禁用态 ---------- */
.btn:disabled {
  opacity: .68;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* ---------- 工作人员入口 ---------- */
.foot-admin {
  text-align: center;
  margin: 14px 0 0;
  font-size: 12px;
}
.foot-admin a {
  color: #9db2b8;
  text-decoration: none;
  border-bottom: 1px dashed #cfdde1;
  padding-bottom: 1px;
}
.foot-admin a:hover { color: var(--primary); border-color: var(--primary); }
