/* 一见钟情 · 会员中心（移动端 H5） */
:root {
  --primary: #e64340;
  --primary-light: #ff7875;
  --primary-bg: #fff1f0;
  --text: #303133;
  --text-sub: #909399;
  --text-light: #c0c4cc;
  --border: #ebeef5;
  --bg: #f5f6f8;
  --card: #fff;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #f5222d;
  --gold: #d4a017;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[v-cloak] { display: none !important; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
input, textarea, select, button { font-family: inherit; font-size: 14px; color: inherit; outline: none; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; }

/* ==================== 登录 ==================== */
.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #e64340 0%, #ff7875 60%, #ffb199 100%);
}
.login-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 16px;
  padding: 30px 24px 24px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.brand { text-align: center; margin-bottom: 26px; }
.brand-logo { font-size: 24px; font-weight: 700; color: var(--primary); letter-spacing: 2px; }
.brand-sub { font-size: 13px; color: var(--text-sub); margin-top: 6px; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--text-sub); line-height: 1.7; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.btn-code {
  flex-shrink: 0; padding: 0 14px; border-radius: 8px;
  background: var(--primary-bg); color: var(--primary); font-size: 13px; font-weight: 500;
  border: 1px solid #ffd6d5;
}
.btn-code:disabled { opacity: .55; }

/* ==================== 表单 ==================== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fafbfc; appearance: none;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); background: #fff; }
.field-2 { display: flex; gap: 10px; }
.field-2 .field { flex: 1; margin-bottom: 16px; }
.btn-main {
  width: 100%; padding: 12px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 1px;
}
.btn-main:disabled { opacity: .6; }
.btn-main.ghost { background: #fff; color: var(--danger); border: 1px solid var(--border); }
.btn-mini {
  padding: 6px 14px; border-radius: 16px; font-size: 12px;
  background: var(--primary-bg); color: var(--primary); font-weight: 500;
}
.btn-mini.ghost { background: #f5f6f8; color: var(--text-sub); }

/* ==================== 布局 ==================== */
.app { min-height: 100vh; padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
.nav {
  position: sticky; top: 0; z-index: 20; height: 48px;
  display: flex; align-items: center; background: #fff;
  border-bottom: 1px solid var(--border); padding: 0 8px; padding-top: env(safe-area-inset-top);
}
.nav-left { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.nav-back { font-size: 26px; margin-top: -4px; }
.nav-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.nav-right { width: 44px; }
.body { padding: 10px 12px 20px; }

/* ==================== 卡片 ==================== */
.card { background: var(--card); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title-row .card-title { margin-bottom: 0; }
.more { font-size: 13px; color: var(--primary); }
.empty { text-align: center; color: var(--text-light); font-size: 13px; padding: 22px 0; }
.notice {
  margin-top: 10px; padding: 9px 11px; border-radius: 8px;
  background: var(--primary-bg); color: #b34a47; font-size: 12px; line-height: 1.6;
}
.alert {
  display: flex; align-items: center; gap: 10px;
  background: var(--primary-bg); border-radius: 10px; padding: 12px;
}
.alert.ok { background: #e8f8f0; }
.alert-t { font-size: 14px; font-weight: 600; flex: 1; }
.alert.ok .alert-t { color: #0b7a55; }
.alert-s { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.alert .btn-mini { flex-shrink: 0; }

/* ==================== 头部横幅 ==================== */
.hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 12px; padding: 16px; margin-bottom: 10px; color: #fff;
}
.hero-sm { padding: 16px; }
.hero-row { display: flex; align-items: center; }
.hero-avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: rgba(255, 255, 255, .25);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; margin-right: 12px; flex-shrink: 0;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-info { flex: 1; min-width: 0; }
.hero-name { font-size: 17px; font-weight: 600; }
.hero-sub { font-size: 12px; opacity: .88; margin-top: 3px; }
.hero-arrow { font-size: 12px; opacity: .9; flex-shrink: 0; }
.hero-stats { display: flex; margin-top: 16px; }
.hero-stats .hs { flex: 1; text-align: center; }
.hero-stats .hs b { display: block; font-size: 16px; font-weight: 700; }
.hero-stats .hs span { font-size: 11px; opacity: .85; }

/* ==================== 九宫格 / 入口 ==================== */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 0; }
.grid-item { text-align: center; padding: 8px 0; }
.gi-ico {
  width: 42px; height: 42px; margin: 0 auto 6px; border-radius: 12px;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.gi-txt { font-size: 12px; }
.entry {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.entry:last-child { border-bottom: none; }
.arrow { color: var(--text-light); font-size: 18px; }
.badge {
  display: inline-block; margin-left: 6px; padding: 0 6px; height: 17px; line-height: 17px;
  border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; font-style: normal;
}

/* ==================== 键值 / 标签 ==================== */
.kv { display: flex; padding: 8px 0; border-bottom: 1px solid #f7f8fa; font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { width: 92px; color: var(--text-sub); flex-shrink: 0; }
.kv .v { flex: 1; word-break: break-all; }
.tag { padding: 2px 7px; border-radius: 9px; font-size: 11px; background: #f0f1f3; color: var(--text-sub); flex-shrink: 0; }
.tag.ok { background: #e8f8f0; color: var(--ok); }
.tag.warn { background: #fff5e6; color: var(--warn); }
.tag.danger { background: var(--primary-bg); color: var(--primary); }

/* ==================== 红娘卡 ==================== */
.mk-row { display: flex; align-items: center; }
.mk-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; margin-right: 11px;
}
.mk-info { flex: 1; min-width: 0; }
.mk-name { font-size: 15px; font-weight: 600; }
.mk-sub { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.mk-intro { font-size: 12px; color: #5a5e66; margin-top: 5px; }

/* ==================== 活动 / 参与码 ==================== */
.act-item, .ap-item { padding: 11px 0; border-bottom: 1px solid var(--border); }
.act-item:last-child, .ap-item:last-child { border-bottom: none; }
.ai-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-title { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; }
.ai-sub { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.ai-desc { font-size: 12px; color: #5a5e66; margin-top: 5px; line-height: 1.6; }
.ai-time { font-size: 11px; color: var(--text-light); margin-top: 3px; }
.ai-ops { display: flex; gap: 8px; margin-top: 8px; }

.code-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.code-item:last-child { border-bottom: none; }
.ci-code { font-size: 17px; font-weight: 700; letter-spacing: 2px; color: var(--primary); }
.ci-sub { font-size: 11px; color: var(--text-sub); margin-top: 3px; }

/* ==================== 套餐 ==================== */
.pkg {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; margin-bottom: 12px; position: relative;
}
.pkg:last-child { margin-bottom: 0; }
.pkg-top { display: flex; align-items: baseline; justify-content: space-between; }
.pkg-name { font-size: 16px; font-weight: 700; color: var(--text); }
.pkg-price { font-size: 20px; font-weight: 700; color: var(--primary); }
.pkg-sub { font-size: 12px; color: var(--text-sub); margin-top: 3px; }
.pkg-benefits { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.pkg-benefits span {
  font-size: 11px; color: #8a5a00; background: #fff9e6;
  padding: 3px 8px; border-radius: 8px;
}

/* ==================== 权益 ==================== */
.quota { padding: 11px 0; border-bottom: 1px solid var(--border); }
.quota:last-child { border-bottom: none; }
.q-top { display: flex; align-items: center; justify-content: space-between; }
.q-name { font-size: 14px; font-weight: 600; }
.q-num { font-size: 13px; color: var(--primary); font-weight: 600; }
.q-sub { font-size: 11px; color: var(--text-light); margin-top: 5px; }
.bar { height: 6px; border-radius: 3px; background: #f0f1f3; margin-top: 8px; overflow: hidden; }
.bar-in { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-light)); }

/* ==================== 订单 ==================== */
.order { padding: 11px 0; border-bottom: 1px solid var(--border); position: relative; }
.order:last-child { border-bottom: none; }
.o-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.o-name { font-size: 14px; font-weight: 600; }
.o-sub { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.o-amount { font-size: 15px; font-weight: 700; color: var(--primary); margin-top: 6px; }

/* ==================== 通知 ==================== */
.nt-item { padding: 11px 0; border-bottom: 1px solid var(--border); }
.nt-item:last-child { border-bottom: none; }
.nt-item.unread .nt-title::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); margin-right: 6px; vertical-align: middle;
}
.nt-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nt-title { font-size: 14px; font-weight: 600; }
.nt-time { font-size: 11px; color: var(--text-light); flex-shrink: 0; }
.nt-content { font-size: 13px; color: #5a5e66; margin-top: 5px; line-height: 1.6; }

/* ==================== Tabs / 分页 ==================== */
.tabs { display: flex; background: #fff; border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.tab { flex: 1; text-align: center; padding: 8px 0; font-size: 13px; color: var(--text-sub); border-radius: 9px; }
.tab.on { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.chips { display: flex; gap: 8px; margin-bottom: 10px; overflow-x: auto; }
.chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 16px;
  background: #fff; color: var(--text-sub); font-size: 13px; border: 1px solid var(--border);
}
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 0; font-size: 13px; color: var(--text-sub); }
.pager button { padding: 6px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--border); }
.pager button:disabled { opacity: .45; }

/* ==================== 图文 ==================== */
.art-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.art-body { font-size: 14px; line-height: 1.85; color: #4a4e57; white-space: pre-wrap; word-break: break-word; }
.faq { padding: 11px 0; border-bottom: 1px solid var(--border); }
.faq:last-child { border-bottom: none; }
.faq-q { font-size: 14px; font-weight: 600; }
.faq-a { font-size: 13px; color: #5a5e66; margin-top: 6px; line-height: 1.7; white-space: pre-wrap; }

/* ==================== 底部 TabBar ==================== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: #fff; border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item { flex: 1; text-align: center; padding: 7px 0 6px; position: relative; color: var(--text-sub); }
.tab-item.on { color: var(--primary); }
.ti-ico { display: block; font-size: 19px; line-height: 1.1; }
.ti-txt { display: block; font-size: 10px; margin-top: 2px; }
.ti-badge {
  position: absolute; top: 3px; left: 50%; transform: translateX(9px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 10px; line-height: 16px;
}

/* ==================== 弹层 ==================== */
.mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .5);
  display: flex; align-items: flex-end;
}
.sheet {
  width: 100%; background: #fff; border-radius: 16px 16px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
}
.sheet-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.qr { width: 220px; height: 220px; object-fit: contain; border-radius: 10px; background: #f5f6f8; }
.sheet-tip { font-size: 12px; color: var(--text-sub); margin: 12px 0 16px; }

/* ==================== Toast ==================== */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: rgba(0, 0, 0, .8); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 13px;
  z-index: 999; max-width: 76vw; text-align: center; line-height: 1.5;
}
