/* 乐天心晴企业EAP心灵关爱卡 · 员工端 — 重设计版（taste-skill 审计后）
   设计语言：Apple-y 高级感
   - 浅灰底 #f5f5f7，顶部仅保留一层极淡的粉紫“洗色”，无漂移光晕
   - 单一强调色：苹果蓝 #0071e3（全局锁定）
   - 白卡只用于承载真实内容（查询表单 / 员工卡），服务区去卡片化
   - 对比度达标：标签/占位符加深至 AA */

:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --field: #f5f5f7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --danger: #ff3b30;
  --grad: linear-gradient(120deg, #f2a3b5, #0071e3);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* hidden 属性强制生效 */
[hidden] { display: none !important; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---- 顶部洗色（静态、极淡，去掉了漂移光晕） ---- */
.topwash {
  position: fixed; left: 0; right: 0; top: 0; height: 46vh;
  z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #f3dfe6 0%, #ebedfa 46%, rgba(245, 245, 247, 0) 100%);
}

/* ---- 页面骨架 ---- */
.page {
  position: relative; z-index: 2;
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: 52px 20px 44px;
}

.hero { text-align: center; max-width: 680px; margin-bottom: 40px; }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 26px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-logo { height: 38px; width: auto; object-fit: contain; border-radius: inherit; display: block; }
.brand-mark.has-logo { background: none; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: 0.1em; color: var(--ink); }
.brand-sep {
  width: 1px; height: 14px;
  background: rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.eyebrow {
  font-size: 12px; letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--muted);
}

.title {
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  white-space: nowrap;
  color: var(--ink);
}
/* 企业名较长时自动缩小字号，保持一行 */
.title-md { font-size: clamp(24px, 6vw, 38px); }
.title-sm { font-size: clamp(18px, 4.6vw, 30px); }

.subtitle {
  margin-top: 12px;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ---- 入场动画（仅 transform + opacity） ---- */
.reveal { opacity: 0; transform: translateY(12px); animation: rise 0.6s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.14s; }
.d3 { animation-delay: 0.26s; }
.d4 { animation-delay: 0.38s; }

/* ---- 查询卡片：唯一的输入表面 ---- */
.stage { width: 100%; max-width: 560px; }

.shell {
  background: var(--panel);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06);
}
.core {
  padding: 30px 28px 26px;
}

.company-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); color: var(--ink);
  border-radius: 999px; padding: 8px 16px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 22px;
}
.company-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
.company-chip .chip-sub { font-weight: 400; color: var(--faint); font-size: 12px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0 0 8px 6px;
}

.input-pill {
  width: 100%;
  border: 1px solid transparent;
  background: var(--field);
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.input-pill::placeholder { color: #6e6e73; }
.input-pill:focus {
  border-color: rgba(0, 113, 227, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.13);
}

.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input-pill { flex: 1; min-width: 0; }
.captcha-img {
  height: 50px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; flex-shrink: 0;
}
.captcha-refresh {
  width: 50px; height: 50px; border-radius: 12px; flex-shrink: 0;
  border: none; background: var(--field);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.captcha-refresh:hover { background: #e8e8ed; }
.captcha-refresh:active { transform: scale(0.94); }
.captcha-refresh svg { width: 19px; height: 19px; }

.btn-primary {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: none; cursor: pointer;
  border-radius: 980px;
  padding: 14px 26px;
  background: var(--accent);
  color: #fff;
  font-family: inherit; font-size: 17px; font-weight: 500; letter-spacing: 0.02em;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ic {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease);
}
.btn-primary:hover .btn-ic { transform: translateX(2px); }
.btn-ic svg { width: 15px; height: 15px; }

.form-msg {
  margin-top: 12px; text-align: center;
  font-size: 13px; color: var(--danger);
}

/* 重名身份确认提示 */
.dup-note {
  background: rgba(255, 149, 0, 0.1);
  border: 1px solid rgba(255, 149, 0, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: #b25000;
  line-height: 1.8;
}
.dup-note b { font-weight: 700; }

/* ---- 板块标题（朴素、无装饰） ---- */
.sec-title {
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 28px 2px 14px;
}

/* ---- 结果卡片：承载员工卡内容（唯一白卡） ---- */
.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.r-shell {
  background: var(--panel);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.r-imgwrap { background: #fafafa; cursor: zoom-in; overflow: hidden; }
.r-imgwrap img {
  width: 100%; height: auto;
  display: block;
  transition: transform 0.5s var(--ease);
}
.r-imgwrap:hover img { transform: scale(1.02); }
.r-info {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.r-name { font-size: 15.5px; font-weight: 500; line-height: 1.6; color: var(--ink); }
.r-name-em { font-weight: 700; }
.r-phone { margin-top: 3px; font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.r-dl { margin-top: 14px; }
.r-dl .btn-primary { padding: 12px 22px; font-size: 15px; }
.r-tip {
  display: table;
  margin: 12px auto 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  color: var(--muted);
}

/* ---- 服务与预约（去卡片化，留白呈现） ---- */
.svc { text-align: center; }
.svc .svc-qr { margin-top: 2px; }
.svc .svc-qr img {
  width: 150px; height: 150px;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 28px rgba(0, 0, 0, 0.08);
}
.svc .svc-qr-tip { margin-top: 14px; font-size: 13.5px; color: var(--muted); letter-spacing: 0.02em; }

.re-result-actions { text-align: center; margin-top: 28px; }

/* ---- 空状态 ---- */
.state-card { text-align: center; padding: 10px 6px; }
.state-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--field); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.state-icon svg { width: 28px; height: 28px; }
.state-card h3 { font-size: 19px; font-weight: 700; color: var(--ink); }
.state-card p { margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.state-card .link-btn {
  display: inline-flex; margin-top: 18px;
  border: none; cursor: pointer; font-family: inherit;
  background: var(--field); color: var(--ink);
  border-radius: 980px; padding: 11px 24px; font-size: 14px; font-weight: 500;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.state-card .link-btn:hover { background: #e8e8ed; }
.state-card .link-btn:active { transform: scale(0.96); }

/* ---- 页脚（Apple 式居中细字） ---- */
.foot {
  margin-top: auto; padding-top: 40px;
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

/* ---- 灯箱（毛玻璃遮罩） ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  animation: fadein 0.3s var(--ease);
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.lb-box {
  position: relative;
  background: #fff; border-radius: 24px;
  max-width: min(92vw, 520px); width: 100%;
  padding: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  animation: popin 0.4s var(--ease);
}
@keyframes popin { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: none; } }
.lb-box img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 68vh;
  margin: 0 auto;
  border-radius: 14px;
  background: #fafafa;
}
.lb-close {
  position: absolute; top: -14px; right: -14px;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s var(--ease);
}
.lb-close:hover { transform: scale(1.06); }
.lb-close svg { width: 16px; height: 16px; }
.lb-actions { padding: 16px 6px 4px; }
.lb-actions .btn-primary { padding: 13px 22px; font-size: 15.5px; }
.lb-tip { margin-top: 12px; text-align: center; font-size: 12px; color: var(--faint); }

/* ---- 移动端 ---- */
@media (max-width: 768px) {
  .page { padding: 36px 16px 32px; }
  .hero { margin-bottom: 30px; }
  .brand { gap: 8px; }
  .brand-name { letter-spacing: 0.06em; }
  .eyebrow { letter-spacing: 0.08em; font-size: 11px; }
  .core { padding: 24px 20px 22px; }
  .shell { border-radius: 20px; }
  .result-grid { grid-template-columns: 1fr; }
  .foot { padding-top: 30px; }
}

/* 减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal, .lightbox, .lb-box { animation: none !important; opacity: 1; transform: none; }
}
