/* 新生舞会 H5 · 全局样式（移动端优先，深蓝紫 × 香槟金主题） */
:root {
  --navy: #1f2d5c;
  --violet: #4a3f8a;
  --purple: #7a4d9e;
  --gold: #d4af37;
  --gold-light: #e8c368;
  --ink: #2b2f3a;
  --ink-2: #5b6070;
  --ink-3: #9aa0ae;
  --bg: #f4f3f9;
  --card: #ffffff;
  --line: #e8e6f2;
  --danger: #e5484d;
  --success: #2e9e5b;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(42, 32, 96, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

body { min-height: 100vh; }

.page {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 48px;
}

/* ---------- 顶部渐变条（细横幅） ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 12px 20px;
  color: #fff;
  background: linear-gradient(135deg, #1b2a5e 0%, #3a3377 45%, #6a3f96 100%);
}
.hero::before {
  content: '';
  position: absolute;
  width: 110px; height: 110px;
  top: -55px; right: -35px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 195, 104, 0.30) 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-title { font-size: 18px; font-weight: 700; letter-spacing: 1px; line-height: 1.3; }
.hero-title em { font-style: normal; color: var(--gold-light); }
.hero-desc { display: none; }

/* ---------- 布局 ---------- */
.container { padding: 18px 16px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 24px;
}
.card-title {
  font-size: 16px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(180deg, var(--gold), var(--purple)); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 14px;
  font-size: 16px; font-weight: 600;
  padding: 14px 18px;
  cursor: pointer;
  width: 100%;
  transition: transform 0.12s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #3a3377 0%, #6a3f96 100%);
  box-shadow: 0 8px 20px rgba(74, 63, 138, 0.32);
}
.btn-primary.gold { background: linear-gradient(135deg, #b8912b, #d9b64d); box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #d13b40, #ef5f63); box-shadow: 0 8px 20px rgba(229, 72, 77, 0.3); }
.btn-ghost { color: var(--ink-2); background: #f1f0f7; }
.btn-outline { color: var(--violet); background: #fff; border: 1.5px solid var(--violet); }
.btn-sm { padding: 9px 12px; font-size: 13px; width: auto; border-radius: 10px; }
.btn-block { margin-top: 12px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field-label .req { color: var(--danger); }
.input, .select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  background: #faf9fd;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:focus, .select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(106, 79, 163, 0.12); background: #fff; }
textarea { resize: vertical; min-height: 72px; }
.field-tip { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.radio-group { display: flex; gap: 10px; }
.radio-option {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  background: #faf9fd;
  transition: all 0.18s ease;
}
.radio-option.active { border-color: var(--violet); background: rgba(106, 79, 163, 0.08); box-shadow: 0 4px 14px rgba(74, 63, 138, 0.14); }
.radio-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.radio-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ---------- 资料卡 ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; }
.avatar-wrap { position: relative; flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--violet), var(--purple)); }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 700;
}
.avatar-wrap.sm { width: 38px; height: 38px; }
.avatar-wrap.sm .avatar-fallback { font-size: 15px; }
.avatar-wrap.lg { width: 84px; height: 84px; }
.avatar-wrap.lg .avatar-fallback { font-size: 32px; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 17px; font-weight: 700; }
.profile-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ---------- 信息行 ---------- */
.info-item { display: flex; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.info-item:last-child { border-bottom: none; }
.info-label { width: 88px; flex-shrink: 0; color: var(--ink-3); font-size: 14px; }
.info-value { flex: 1; font-size: 14px; color: var(--ink); word-break: break-all; }
.info-value.highlight { color: var(--danger); font-weight: 700; }

/* ---------- 状态徽标 ---------- */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.status-open { background: rgba(46, 158, 91, 0.12); color: var(--success); }
.status-closed { background: rgba(229, 72, 77, 0.1); color: var(--danger); }
.status-pending { background: rgba(212, 175, 55, 0.16); color: #a37e14; }
.status-matched { background: rgba(74, 63, 138, 0.1); color: var(--violet); }

/* ---------- 步骤 ---------- */
.step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14px; }
.step .num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--purple));
  color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.step p { flex: 1; color: var(--ink-2); }
.tip-item { display: flex; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding: 6px 0; }
.tip-item::before { content: '✦'; color: var(--gold); flex-shrink: 0; }

/* ---------- 匹配结果卡 ---------- */
.matched-box {
  text-align: center;
  background: linear-gradient(160deg, rgba(106, 79, 163, 0.10), rgba(212, 175, 55, 0.12));
  border: 1.5px solid rgba(106, 79, 163, 0.2);
  border-radius: 16px;
  padding: 22px 16px;
}
.matched-box .avatar-wrap { width: 76px; height: 76px; margin: 0 auto 12px; }
.matched-name { font-size: 20px; font-weight: 800; }
.matched-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.matched-info { margin-top: 14px; text-align: left; display: inline-block; }
.matched-info .line { font-size: 14px; padding: 4px 0; color: var(--ink-2); }
.matched-info .line b { color: var(--ink); font-weight: 600; }

.placeholder-box {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-3);
}
.placeholder-icon { font-size: 40px; margin-bottom: 8px; }
.placeholder-title { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.placeholder-sub { font-size: 13px; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 16, 46, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dialog {
  width: 100%; max-width: 380px;
  background: #fff; border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(20, 16, 46, 0.35);
  animation: popIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dialog-title { font-size: 18px; font-weight: 800; text-align: center; }
.dialog-body { margin: 14px 0 20px; font-size: 14px; color: var(--ink-2); max-height: 52vh; overflow-y: auto; line-height: 1.7; white-space: pre-wrap; }
.dialog-actions { display: flex; gap: 10px; }
.dialog-actions .btn { flex: 1; }

/* ---------- toast ---------- */
.toast {
  position: fixed; top: 12%; left: 50%; transform: translate(-50%, -20px);
  background: rgba(27, 30, 44, 0.92); color: #fff;
  padding: 11px 18px; border-radius: 999px;
  font-size: 14px; z-index: 999;
  opacity: 0; pointer-events: none;
  transition: all 0.25s ease;
  max-width: 82vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: rgba(46, 158, 91, 0.94); }
.toast.error { background: rgba(229, 72, 77, 0.94); }

/* ---------- 登录弹窗 ---------- */
.login-card { padding: 0; overflow: hidden; }
.login-head {
  background: linear-gradient(135deg, #1b2a5e 0%, #3a3377 45%, #6a3f96 100%);
  color: #fff; text-align: center;
  padding: 26px 20px 22px;
}
.login-logo {
  width: 52px; height: 52px; margin: 0 auto 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(232,195,104,0.9), rgba(212,175,55,0.55));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.login-title { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.login-sub { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.login-tabs {
  display: flex; margin: 16px 20px 0;
  background: #f1f0f7; border-radius: 12px; padding: 4px;
}
.login-tab {
  flex: 1; text-align: center; padding: 9px 0;
  font-size: 14px; font-weight: 700; color: var(--ink-2);
  border-radius: 9px; cursor: pointer;
  transition: all 0.18s ease;
}
.login-tab.active { background: linear-gradient(135deg, #3a3377, #6a3f96); color: #fff; box-shadow: 0 4px 12px rgba(74,63,138,0.28); }
.login-body { padding: 16px 20px 6px; }
.login-input-wrap { position: relative; }
.login-input-wrap .ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 15px; opacity: 0.6; pointer-events: none;
}
.login-input-wrap .input { padding-left: 36px; }
.login-actions { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- 页脚 ---------- */
.footer { text-align: center; color: var(--ink-3); font-size: 12px; padding: 24px 16px 8px; }
.footer a { color: var(--ink-3); text-decoration: underline; margin: 0 6px; }

/* ---------- 加载 ---------- */
.loading {
  text-align: center; color: var(--ink-3); font-size: 13px;
  padding: 40px 0;
}
.loading::before {
  content: ''; display: block; width: 28px; height: 28px;
  margin: 0 auto 10px;
  border: 3px solid var(--line); border-top-color: var(--violet);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 空态 ---------- */
.empty { text-align: center; color: var(--ink-3); font-size: 13px; padding: 28px 0; }

/* ---------- 管理端 ---------- */
.tabs {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 4px 2px 12px; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: 8px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: #fff; color: var(--ink-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab.active { background: linear-gradient(135deg, #3a3377, #6a3f96); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(74, 63, 138, 0.28); }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.stat-box {
  background: #fff; border-radius: 14px; text-align: center; padding: 12px 4px;
  box-shadow: var(--shadow);
}
.stat-num { font-size: 20px; font-weight: 800; color: var(--navy); }
.stat-num.warn { color: var(--danger); }
.stat-label { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  background: #f1f0f7; color: var(--ink-2); cursor: pointer;
  border: 1px solid transparent;
}
.chip.active { background: var(--navy); color: #fff; }

.reg-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; margin-bottom: 10px;
  background: #fff;
}
.reg-main { flex: 1; min-width: 0; }
.reg-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reg-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; word-break: break-all; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.tag-team { background: rgba(212, 175, 55, 0.16); color: #a37e14; }
.tag-single { background: rgba(74, 63, 138, 0.1); color: var(--violet); }
.tag-matched { background: rgba(46, 158, 91, 0.12); color: var(--success); }
.tag-pending { background: rgba(229, 72, 77, 0.1); color: var(--danger); }
.reg-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row .input { flex: 1; }

.pair-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid var(--line);
  border-radius: 14px; margin-bottom: 10px; cursor: pointer;
  background: #fff; transition: all 0.15s ease;
}
.pair-item.pair-selected { border-color: var(--violet); background: rgba(106, 79, 163, 0.07); box-shadow: 0 4px 14px rgba(74, 63, 138, 0.12); }
.pair-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.pair-check.checked { background: var(--violet); border-color: var(--violet); }
.pair-info { flex: 1; min-width: 0; }
.pair-actions { flex-shrink: 0; }

.health-item { padding: 6px 0; font-size: 13.5px; }
.health-issue { color: var(--danger); }
.health-ok { color: var(--success); }
.health-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.health-name { color: var(--ink-2); }

.admin-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; word-break: break-all; }
.admin-item:last-child { border-bottom: none; }

.help-block { margin-bottom: 16px; }
.help-title { font-size: 14px; font-weight: 700; color: var(--violet); margin-bottom: 6px; }
.help-line { font-size: 13px; color: var(--ink-2); padding: 2.5px 0; }

.load-more { text-align: center; color: var(--violet); font-size: 13px; padding: 12px; cursor: pointer; }

/* ---------- 协议页 ---------- */
.agreement-card h1 { font-size: 20px; text-align: center; margin: 8px 0 18px; color: var(--navy); }
.agreement-card h2 { font-size: 15px; color: var(--violet); margin: 18px 0 8px; }
.agreement-card p { font-size: 14px; color: var(--ink-2); margin: 5px 0; }

/* 移动端安全区 */
@media (max-width: 520px) {
  .hero { border-radius: 0 0 26px 26px; }
}
