:root {
  /* iOS 系统色板 */
  --bg: #eeedf3;
  --text: #1d1d1f;
  --text-sub: #86868b;
  --text-tertiary: #a1a1a6;
  --primary: #d85570;
  --primary-deep: #c23c58;
  --primary-soft: rgba(216, 85, 112, .10);
  --system-red: #ff453a;
  --system-green: #34c759;

  /* 液态玻璃 */
  --glass: rgba(255, 255, 255, .66);
  --glass-solid: rgba(255, 255, 255, .88);
  --glass-border: rgba(255, 255, 255, .78);
  --hairline: rgba(60, 60, 67, .09);
  --fill: rgba(118, 118, 128, .10);

  --radius: 22px;
  --radius-sm: 13px;
  --shadow: 0 10px 34px rgba(38, 30, 60, .06), 0 2px 8px rgba(38, 30, 60, .04);
  --shadow-lift: 0 18px 44px rgba(38, 30, 60, .11), 0 3px 10px rgba(38, 30, 60, .05);
  --blur: blur(22px) saturate(170%);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  position: relative;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* 背景柔和光斑（iOS 壁纸氛围） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px 420px at 12% -6%, rgba(255, 167, 190, .42), transparent 68%),
    radial-gradient(480px 480px at 92% 10%, rgba(178, 168, 255, .34), transparent 66%),
    radial-gradient(520px 520px at 78% 92%, rgba(150, 205, 255, .30), transparent 68%),
    radial-gradient(400px 400px at 4% 78%, rgba(255, 205, 160, .28), transparent 66%);
}
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px 48px; }

/* ============ 顶部头图 ============ */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 54px 20px 40px;
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(42px); pointer-events: none; }
.hero::before { top: -40px; left: 8%; width: 150px; height: 150px; background: rgba(255, 150, 180, .5); }
.hero::after { top: 20px; right: 6%; width: 130px; height: 130px; background: rgba(160, 170, 255, .42); }
/* 头图保持纯净渐变，不使用星形/发光点装饰 */
.hero h1 {
  position: relative; margin: 0 0 8px;
  font-size: 34px; font-weight: 750; letter-spacing: -.6px;
  color: var(--text);
}
.hero p {
  position: relative; margin: 0;
  font-size: 14px; letter-spacing: .2px; color: var(--text-sub);
}

/* ============ 提示条（液态玻璃） ============ */
.top-tip {
  position: relative; z-index: 2;
  display: flex; gap: 11px; align-items: flex-start;
  margin: -6px 2px 18px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 12.5px; line-height: 1.7; color: #5c5761;
  box-shadow: var(--shadow);
}
.tip-icon {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff;
  background: linear-gradient(135deg, #e8788c, #d85570);
  box-shadow: 0 3px 8px rgba(216, 85, 112, .28);
}
.top-tip b { color: var(--primary) !important; font-weight: 700; }

/* ============ 卡片（液态玻璃） ============ */
.card {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 22px 20px 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.card-no {
  flex: none; width: 30px; height: 30px; border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  border: 1px solid rgba(216, 85, 112, .14);
}
.card-head-text { display: flex; flex-direction: column; }
.card-title { font-size: 17.5px; font-weight: 700; letter-spacing: -.2px; color: var(--text); }
.card-sub { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

/* ============ 字段 ============ */
.field { margin-bottom: 18px; }
.label { font-size: 13px; font-weight: 600; margin-bottom: 9px; display: block; color: #3a3a3e; }
/* 必填标记：克制的小圆点，取代突兀的红色米字星 */
.req {
  display: inline-block; vertical-align: middle;
  width: 6px; height: 6px; border-radius: 50%;
  margin-right: 8px; margin-top: -2px;
  background: rgba(216, 85, 112, .55);
  font-size: 0; line-height: 0; color: transparent;
  overflow: hidden;
}
.hint { font-size: 11.5px; color: var(--text-tertiary); margin-top: 7px; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 15px; color: var(--text);
  background: var(--glass-solid);
  outline: none;
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.02);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder, .textarea::placeholder {
  color: #b9b9be; font-size: 13px; letter-spacing: .1px;
}
.select option[value=""] { color: #9a9aa0; }
/* 未选择时的「请选择」与输入框 placeholder 保持同样的轻量感 */
.select:has(option[value=""]:checked) { font-size: 13px; color: #9a9aa0; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(216, 85, 112, .5);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.textarea { min-height: 94px; resize: vertical; line-height: 1.65; }
.input-sub { margin-top: 9px; }

/* select 自定义箭头（iOS 灰） */
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.2l3.5 3.5 3.5-3.5' stroke='%2386868b' stroke-width='1.7' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

/* ============ 选项 chips ============ */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  padding: 9px 17px; border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass-solid);
  font-size: 13.5px; color: #48474c;
  cursor: pointer; user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.02);
  transition: transform .16s, background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.chip:active { transform: scale(.95); }
.chip-on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff; font-weight: 600;
  box-shadow: 0 5px 14px rgba(216, 85, 112, .28);
}

/* ============ 日期 ============ */
.pickers { display: flex; gap: 9px; }
.pickers .select { flex: 1 1 0; min-width: 0; width: auto; padding: 12px 8px; padding-right: 24px; text-align: center; background-position: right 6px center; }

/* ============ 照片 ============ */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.photo-item, .photo-add {
  position: relative; aspect-ratio: 1; border-radius: 15px; overflow: hidden;
  border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center;
  background: var(--glass-solid);
}
.photo-img { width: 100%; height: 100%; object-fit: cover; }
.photo-del {
  position: absolute; top: 5px; right: 5px; width: 23px; height: 23px;
  border-radius: 50%; background: rgba(29,29,31,.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; cursor: pointer;
}
.photo-add {
  flex-direction: column; cursor: pointer; color: var(--primary);
  border: 1.5px dashed rgba(216, 85, 112, .45);
  background: var(--primary-soft);
  transition: transform .16s, background .18s;
}
.photo-add:active { transform: scale(.96); }
.photo-plus { font-size: 30px; line-height: 1; font-weight: 300; }
.photo-count { font-size: 11px; color: var(--text-sub); margin-top: 4px; }

/* ============ 同意声明 ============ */
.agree { display: flex; gap: 11px; align-items: flex-start; margin: 22px 4px; cursor: pointer; }
.checkbox {
  flex: none; width: 21px; height: 21px; border-radius: 7px;
  border: 1.5px solid rgba(60,60,67,.22);
  margin-top: 2px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff; background: var(--glass-solid);
  transition: all .18s;
}
.checkbox-on {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 3px 9px rgba(216, 85, 112, .3);
}
.agree-text { font-size: 11.5px; color: var(--text-sub); line-height: 1.7; }
.agree-text a { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ============ 提交按钮 ============ */
.submit-btn {
  position: relative;
  width: 100%; border: none; border-radius: 16px; padding: 16px;
  background: linear-gradient(135deg, #e8788c, #d85570 60%, #c94a66);
  color: #fff; font-size: 16px; font-weight: 650; letter-spacing: .5px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(216, 85, 112, .3), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .16s, box-shadow .16s, opacity .2s;
}
.submit-btn:active { transform: scale(.985); box-shadow: 0 5px 14px rgba(216, 85, 112, .28); }
.submit-btn:disabled { opacity: .55; cursor: default; transform: none; }
.bottom-note { text-align: center; font-size: 12px; color: var(--text-tertiary); margin-top: 16px; }

.error-bar {
  background: rgba(255, 69, 58, .09);
  border: 1px solid rgba(255, 69, 58, .22);
  color: #c02a20;
  border-radius: 14px; padding: 12px 15px; font-size: 13px; margin-bottom: 14px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* ============ 成功页 ============ */
.result-card { text-align: center; padding: 54px 22px; }
.result-icon {
  width: 82px; height: 82px; border-radius: 50%; margin: 0 auto 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(232,120,140,.16));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 300;
  box-shadow: 0 10px 28px rgba(216, 85, 112, .18);
}
.result-card h2 { margin: 0 0 9px; font-size: 23px; font-weight: 750; letter-spacing: -.3px; }
.result-card p { color: var(--text-sub); font-size: 14px; margin: 0 0 30px; }

/* ============ 后台 ============ */
.admin-login { max-width: 380px; margin: 64px auto; padding: 0 16px; }
.admin-login .card { padding: 30px 24px 26px; }
.admin-login h2 { margin: 0 0 5px; font-size: 21px; font-weight: 750; text-align: center; }
.admin-login .sub { text-align: center; color: var(--text-sub); font-size: 13px; margin: 0 0 24px; }
.admin-header {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  color: var(--text);
  padding: 20px 20px; display: flex; justify-content: space-between; align-items: center;
}
.admin-header h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.admin-header a { color: var(--primary); font-size: 13px; text-decoration: none; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 18px 0; }
.stat {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 17px; padding: 16px 8px; text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { font-size: 27px; font-weight: 750; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11.5px; color: var(--text-sub); margin-top: 2px; }

/* iOS 分段控件 */
.tabs {
  display: flex; gap: 2px; margin-bottom: 16px; padding: 3px;
  background: var(--fill);
  border-radius: 12px;
}
.tab {
  flex: 1; text-align: center;
  padding: 8px 6px; border-radius: 9px;
  font-size: 12.5px; cursor: pointer; color: var(--text-sub);
  transition: all .2s;
}
.tab-on {
  background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.1), 0 0 0 .5px rgba(0,0,0,.02);
}

.p-item {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 18px; padding: 15px; margin-bottom: 11px;
  box-shadow: var(--shadow); display: flex; gap: 13px; align-items: center; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.p-item:active { transform: scale(.99); }
.avatar {
  flex: none; width: 50px; height: 50px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 650;
  border: 1px solid rgba(255,255,255,.5);
}
.avatar-f { background: linear-gradient(135deg, #f4a0b4, #e06784); }
.avatar-m { background: linear-gradient(135deg, #9dbcff, #6a8ff0); }
.p-main { flex: 1; min-width: 0; }
.p-name { font-weight: 650; font-size: 15px; }
.p-meta { font-size: 12px; color: var(--text-sub); margin-top: 3px; }
.badge {
  display: inline-block; font-size: 10.5px; padding: 2px 9px; border-radius: 999px; margin-left: 6px;
  background: var(--primary-soft); color: var(--primary-deep); font-weight: 600;
  vertical-align: middle;
}
.badge-contacted { background: rgba(52,199,89,.14); color: #1e9e48; }
.badge-no { background: var(--fill); color: var(--text-sub); }

/* ============ 详情弹层 ============ */
.mask {
  position: fixed; inset: 0; background: rgba(29,29,31,.38);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 50; display: flex; align-items: flex-end; justify-content: center;
}
.detail {
  background: rgba(250,250,252,.94);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
  border-radius: 26px 26px 0 0; padding: 22px 20px 32px;
  border-top: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 -12px 40px rgba(0,0,0,.1);
  animation: slideUp .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.detail-head h2 { margin: 0; font-size: 20px; font-weight: 750; }
.close-btn {
  border: none; background: var(--fill); border-radius: 50%; width: 32px; height: 32px;
  font-size: 19px; cursor: pointer; color: var(--text-sub); line-height: 1;
}
.photo-strip { display: flex; gap: 9px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.photo-strip img { width: 96px; height: 96px; border-radius: 13px; object-fit: cover; flex: none; box-shadow: var(--shadow); }
.drow { display: flex; padding: 11px 2px; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.dkey { flex: none; width: 100px; color: var(--text-sub); }
.dval { flex: 1; word-break: break-all; color: var(--text); }
.status-actions { display: flex; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.status-btn {
  flex: 1; min-width: 90px; padding: 11px; border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--glass-solid); cursor: pointer; font-size: 13.5px; color: #48474c;
  transition: all .18s;
}
.status-btn.s-on { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 5px 14px rgba(216,85,112,.26); }
.delete-btn {
  width: 100%; margin-top: 11px; padding: 12px; border-radius: 12px;
  border: 1px solid rgba(255, 69, 58, .22);
  background: rgba(255, 69, 58, .08); color: #c02a20; cursor: pointer; font-size: 14px; font-weight: 500;
}
.empty { text-align: center; color: var(--text-sub); padding: 54px 0; font-size: 14px; }
.foot-link { display: block; text-align: center; margin-top: 26px; font-size: 12.5px; color: var(--text-sub); text-decoration: none; }

/* 大屏优化 */
@media (min-width: 640px) {
  .hero { padding-top: 62px; }
  .mask { align-items: center; }
  .detail { border-radius: 26px; max-height: 86vh; }
}

/* ============ 后台工具栏：搜索 + 一键导出 ============ */
.admin-tools { display: flex; gap: 9px; align-items: center; margin: 13px 0 16px; }
.admin-tools .input {
  flex: 1 1 0; min-width: 0; width: auto;
  padding: 11px 13px; font-size: 14px;
}
.export-btn {
  flex: none; border: none; border-radius: 13px; padding: 12px 16px;
  font-size: 13.5px; font-weight: 650; color: #fff; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  background: linear-gradient(135deg, #e2728a, #c9405d);
  box-shadow: 0 6px 16px rgba(201, 64, 93, .24);
  transition: transform .15s, opacity .15s;
}
.export-btn:active { transform: scale(.98); }
.export-btn:disabled { opacity: .55; cursor: default; transform: none; }
@media (max-width: 430px) {
  .admin-tools { flex-direction: column; align-items: stretch; }
  .admin-tools .input, .export-btn { width: 100%; }
}

/* ============ 后台仪表盘 ============ */
.dash-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 2px 11px; }
.dash-h1 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; color: var(--text); }
.dash-note { font-size: 11.5px; color: var(--text-sub); }
.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 11px; }
.kpi {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 14px 6px; text-align: center; box-shadow: var(--shadow);
}
.kpi-num { font-size: 24px; font-weight: 750; color: var(--primary); font-variant-numeric: tabular-nums; line-height: 1.25; }
.kpi-label { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 14px; }
.dash-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 18px; padding: 15px 16px; box-shadow: var(--shadow); min-width: 0;
}
.dash-title { font-size: 12.5px; font-weight: 650; color: var(--text); margin-bottom: 12px; }
.dash-empty { font-size: 12px; color: var(--text-tertiary); padding: 8px 0; }
.gender-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--fill); }
.gender-m { background: linear-gradient(90deg, #8fb0ff, #6a8ff0); }
.gender-f { background: linear-gradient(90deg, #f2a2b6, #e06784); }
.gender-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--text-sub); }
.trend-chart { display: flex; gap: 7px; align-items: flex-end; }
.trend-col { flex: 1; min-width: 0; text-align: center; }
.trend-slot { height: 76px; display: flex; align-items: flex-end; }
.trend-bar {
  width: 100%; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #e8788c, #d85570); opacity: .88;
}
.trend-label { font-size: 9.5px; color: var(--text-tertiary); margin-top: 6px; white-space: nowrap; }
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { flex: none; width: 76px; font-size: 11.5px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; min-width: 0; height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #eda1b0, #d85570); }
.bar-num { flex: none; width: 20px; text-align: right; font-size: 11.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.search-hint { font-size: 11.5px; color: var(--text-sub); margin: -6px 3px 12px; }
.p-no {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .3px; vertical-align: middle;
  background: var(--primary-soft); color: var(--primary-deep);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
.ok-bar { background: var(--primary-soft); color: var(--primary-deep); font-size: 12.5px; padding: 9px 12px; border-radius: 10px; margin-bottom: 12px; line-height: 1.5; }
