/* ============================================================
   人人匹配 v2.0 — 品牌样式（完全复刻 v1.0 Streamlit 外观）
   ============================================================ */

/* ── 品牌变量 ─────────────────────────── */
:root {
  --primary: #2563eb;
  --primary2: #0ea5e9;
  --text: #0f172a;
  --muted: #64748b;
  --card: rgba(255,255,255,.88);
  --border: rgba(37,99,235,.18);
}

/* ── 全局背景（与v1.0完全一致）────────── */
html, body {
  background:
    radial-gradient(circle at 12% 8%, rgba(186,230,253,.92), transparent 32%),
    radial-gradient(circle at 90% 4%, rgba(254,249,195,.75), transparent 32%),
    linear-gradient(135deg, #eef9ff 0%, #f8fbff 48%, #fffdf0 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  min-height: 100vh;
}

/* ── Hero 标题（与v1.0完全一致）───────── */
.hero-title {
  text-align: center;
  font-size: 4rem;
  font-weight: 950;
  letter-spacing: .12em;
  margin: .2rem 0 .2rem 0;
  color: #020617;
}

.hero-sub {
  text-align: center;
  color: #475569;
  font-size: 1.08rem;
  margin-bottom: .6rem;
}

/* ── 握手 SVG ─────────────────────────── */
.handshake-wrap {
  display: flex;
  justify-content: center;
  margin: .4rem 0 1rem 0;
}

.handshake-svg {
  width: 280px;
  max-width: 70%;
}

/* ── 服务说明（首页握手图标与表单之间）────── */
.service-notice {
  width: min(900px, 96%);
  margin: 0 auto 1.4rem auto;
  padding: 1.1rem 1.4rem;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(15,23,42,.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #334155;
  font-size: 1rem;
  line-height: 1.85;
}

.service-notice-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #1e3a5f;
  letter-spacing: .02em;
  margin-bottom: .5rem;
}

.service-notice p {
  margin: 0 0 .35rem 0;
}

.service-notice p:last-child {
  margin-bottom: 0;
}

/* ── 主卡片（与v1.0完全一致）───────────── */
.main-card {
  width: min(760px, 96%);
  margin: 0 auto 1.2rem auto;
  padding: 2rem 2.3rem;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(15,23,42,.13), inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ── 结果卡片（透明）────────── */
.result-card {
  background: transparent;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 24px;
  padding: 1.35rem 1.5rem;
  margin: 1rem 0;
  box-shadow: none;
}

/* ── 章节标题（与v1.0完全一致）────────── */
.section-title {
  font-size: 1.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .9rem;
}

/* ── 软盒（透明）────────────── */
.soft-box {
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 18px;
  padding: 1rem 1.15rem;
  min-height: 64px;
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 1.15rem;
}

/* ── 大数值（与v1.0完全一致）──────────── */
.big-value {
  font-size: 2.5rem;
  font-weight: 950;
  color: #1d4ed8;
}

/* ── 徽章（与v1.0完全一致）────────────── */
.badge {
  display: inline-block;
  padding: .32rem .72rem;
  border-radius: 999px;
  color: white;
  font-weight: 850;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  margin: .15rem .25rem .15rem 0;
}

/* ── 按钮主样式（与v1.0完全一致）──────── */
.btn-action {
  border-radius: 16px !important;
  min-height: 3rem;
  font-weight: 900 !important;
  border: 0 !important;
  color: white !important;
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  box-shadow: 0 12px 28px rgba(37,99,235,.28);
  font-size: 16px;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(37,99,235,.34);
}

/* ── 按钮次要样式 ─────────────────────── */
.btn-outline-primary {
  background: white !important;
  color: var(--primary) !important;
  border: 2px solid var(--primary) !important;
  box-shadow: none;
}

.btn-outline-primary:hover {
  background: #f0f6ff !important;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  box-shadow: 0 12px 28px rgba(34,197,94,.28);
}

.btn-success:hover {
  box-shadow: 0 16px 34px rgba(34,197,94,.34);
}

.btn-secondary {
  background: linear-gradient(135deg, #94a3b8, #64748b) !important;
  box-shadow: 0 8px 20px rgba(100,116,139,.2);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 8px 20px rgba(239,68,68,.25);
  color: white !important;
}

.btn-danger:hover {
  box-shadow: 0 12px 26px rgba(239,68,68,.35);
}

.btn-secondary:hover {
  box-shadow: 0 12px 26px rgba(100,116,139,.3);
}

/* ── 表单玻璃态 ────────────────────────── */
.form-glass {
  display: block;
  width: 100%;
  min-height: 3rem;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  border: none !important;
  border-bottom: 1px solid rgba(15,23,42,.12) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: .5rem .2rem;
  outline: none;
  transition: border-color .2s;
  box-shadow: none !important;
}

.form-glass:focus {
  border-bottom-color: var(--primary) !important;
  border-bottom-width: 2px;
  box-shadow: none !important;
  outline: none;
  background: transparent !important;
}

.form-glass::placeholder {
  color: #94a3b8;
  font-weight: 300;
}

.form-label {
  font-size: 16px;
  font-weight: 600;
  color: #475569;
  margin-bottom: .25rem;
}

/* date input 透明 */
input[type="date"].form-glass {
  color-scheme: light;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"].form-glass::-webkit-calendar-picker-indicator {
  opacity: .55;
  cursor: pointer;
}

/* ── Bootstrap 表单兼容 ────────────────── */
.form-control {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(15,23,42,.12);
  background: transparent;
  padding: .5rem .2rem;
}

.form-control:focus {
  border-bottom-color: var(--primary);
  border-bottom-width: 2px;
  box-shadow: none;
  outline: none;
}

/* ── 首页透明表单样式 ─────────────────── */
.index-form {
  width: min(900px, 96%);
  margin: 0 auto;
}

.form-label-dark {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: .5rem;
  letter-spacing: .02em;
}

.form-dark {
  display: block;
  width: 100%;
  min-height: 3.8rem;
  font-size: 1.5rem;
  color: #1e3a5f;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(37,99,235,.25);
  border-radius: 0;
  padding: .6rem 0;
  outline: none;
  transition: border-color .3s;
}

.form-dark:focus {
  border-bottom-color: var(--primary);
  border-bottom-width: 2px;
}

.form-dark::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 1.3rem;
}

.form-dark[type="date"] {
  color-scheme: light;
  -webkit-appearance: none;
  appearance: none;
}

.form-dark[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .6;
  cursor: pointer;
  width: 28px;
  height: 28px;
}

/* ── 进度条（与v1.0完全一致）──────────── */
.progress {
  height: 24px;
  border-radius: 12px;
  background: rgba(15,23,42,.08);
}

.progress-bar {
  font-size: 14px;
  font-weight: 600;
}

/* ── 答题网格 ──────────────────────────── */
.grid-dot {
  transition: transform 0.15s;
}

.grid-dot:hover {
  transform: scale(1.2);
  cursor: pointer;
}

/* ── 答题区（与v1.0完全一致）──────────── */
.question-block {
  padding: .6rem 0;
}

.question-num {
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: .35rem;
  color: var(--text);
}

.option-line {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: .15rem;
}

.option-line:hover {
  background: rgba(37,99,235,.06);
}

.option-skip {
  opacity: .7;
}

.option-text {
  font-size: 1.15rem;
  color: var(--text);
}

.option-skip .option-text {
  color: #94a3b8;
  font-size: 1.05rem;
}

/* ── 分割线（与v1.0完全一致）──────────── */
hr {
  border: none;
  border-top: 1px solid rgba(15,23,42,.09);
  margin: 1rem 0;
}

/* ── 报告内主卡片标题 ─────────────────── */
.main-card h2 {
  font-size: 1.5rem;
  font-weight: 900;
}

.main-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.main-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

/* ── 颜色文字（与v1.0完全一致）────────── */
.muted {
  color: #64748b;
  font-size: .94rem;
}

/* ── 支付金额 ──────────────────────────── */
.price-display {
  font-size: 64px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 职业测评透明表单 ─────────────────── */
.career-form {
  width: min(900px, 96%);
  margin: 0 auto;
  padding: 2rem 0;
}

.career-form .section-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1e3a5f;
  margin-bottom: 1rem;
}

.career-form .muted {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

/* 说明文字样式 */
.career-form .career-instructions {
  font-size: 1.2rem;
  line-height: 2.2;
  color: #1e3a5f;
  padding-left: 1.5rem;
}

.career-form .career-instructions li {
  margin-bottom: .5rem;
}

/* 题目样式 */
.career-form .question-block {
  padding: 1rem 0;
}

.career-form .question-num {
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: .8rem;
  color: #1e3a5f;
}

/* 选项样式 */
.career-form .option-line {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: .3rem;
}

.career-form .option-line:hover {
  background: rgba(37,99,235,.08);
}

.career-form .option-text {
  font-size: 1.3rem;
  color: #1e3a5f;
  line-height: 1.5;
}

.career-form .option-skip {
  opacity: .7;
}

.career-form .option-skip .option-text {
  color: #94a3b8;
  font-size: 1.2rem;
}

/* ── Admin 65岁友好样式 ──────────────────── */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-card {
  background: rgba(255,255,255,.91);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
}

.stat-label {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: .2rem;
}

.stat-sub {
  font-size: .9rem;
  color: var(--muted);
}

.nav-card {
  display: block;
  background: rgba(255,255,255,.91);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, box-shadow .15s;
  min-height: 120px;
}

.nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(37,99,235,.12);
}

.nav-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.nav-card p {
  font-size: .95rem;
  color: var(--muted);
  margin: 0;
}

.pagination-wrap {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.pagination-wrap .btn {
  min-width: 44px;
}

.pagination-wrap .btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ── 表单提示文字（公历提示等）────────────── */
.form-hint {
  font-size: .95rem;
  color: var(--muted);
  margin-top: .35rem;
  line-height: 1.5;
}

/* ── 移动端生日选择器（date-picker.js）─────── */
body.dp-open { overflow: hidden; }

.dp-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 1080;
  opacity: 0;
  /* 遮罩节点收起后仍留在 DOM 里（date-picker.js 只在 dp-show 上做增删），
     opacity: 0 并不退出命中测试，不声明 pointer-events 会把整页点击吃掉 */
  pointer-events: none;
  transition: opacity .22s ease;
}
.dp-mask.dp-show { opacity: 1; pointer-events: auto; }

.dp-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 560px;
  z-index: 1081;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 34px rgba(15, 23, 42, .18);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform .26s ease;
}
.dp-sheet.dp-show { transform: translateY(0); }

.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .9rem;
  border-bottom: 1px solid rgba(37, 99, 235, .12);
}
.dp-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a5f;
}
.dp-btn {
  min-height: 48px;
  padding: .4rem 1.1rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}
.dp-cancel { color: var(--muted); }
.dp-ok {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
}
.dp-ok:active { opacity: .85; }

.dp-units {
  display: flex;
  padding-top: .4rem;
  color: #94a3b8;
  font-size: .85rem;
}
.dp-unit {
  flex: 1;
  text-align: center;
}

.dp-cols {
  position: relative;
  display: flex;
  height: 220px;   /* VISIBLE(5) × ITEM_H(44) */
}
.dp-cols::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 88px;       /* PAD = (5-1)/2 × 44 */
  height: 44px;
  border-radius: 10px;
  background: rgba(37, 99, 235, .07);
  pointer-events: none;
}

.dp-col {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dp-col::-webkit-scrollbar { display: none; }

.dp-item {
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 1.15rem;
  color: #475569;
  scroll-snap-align: center;
  transition: color .15s, font-size .15s;
}
.dp-item-active {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.3rem;
}

/* ── 备案页脚（公网页 + 企业端）────────── */
.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  padding: 2.5rem 1rem 1.5rem;
  font-size: .875rem;
  color: var(--muted);
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.site-footer img { width: 18px; height: 20px; }

/* ── 响应式 ────────────────────────────── */
@media (max-width: 576px) {
  .hero-title { font-size: 2.5rem; }
  /* 11 字标题（【人人匹配|职场搭档】）：11 个全角字形 + .12em 字距 ≈ 12.3em 宽，
     7.4vw 让各种手机宽度下都恰好排满一行而不折行。 */
  .hero-title-fit { font-size: min(2.5rem, 7.4vw); }
  .main-card { padding: 1.5rem 1.2rem; border-radius: 20px; }
  .big-value { font-size: 1.5rem; }
  .price-display { font-size: 42px; }
}
