/* ============================================================
   睡愈力 · 个人中心页 — 月夜暖金（沿用主站深色系）
   ============================================================ */
:root {
  --bg-deep: #0b0d13; --bg-surface: #181b23; --bg-elevated: #1e212b;
  --gold: #c4a265; --gold-hover: #d4b87a; --gold-dim: #8a7040; --gold-pale: #e8d5b0;
  --gold-glow: rgba(196,162,101,0.18);
  --text: #e6e3db; --text-muted: #96938b; --text-dim: #5c5a53;
  --border: #252830; --border-light: #2e313b;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body); background: var(--bg-deep); color: var(--text);
  line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: rgba(196,162,101,0.3); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* 顶栏 */
.p-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 60px;
  display: flex; align-items: center; padding: 0 20px;
  background: rgba(11,13,19,0.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.p-topbar a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-muted); transition: color .2s; }
.p-topbar a:hover { color: var(--text); }
.p-topbar__brand { margin-left: auto; font-family: var(--font-display); letter-spacing: .18em; color: var(--gold); font-size: 14px; opacity: .7; }

/* 容器 */
.p-wrap { max-width: 720px; margin: 0 auto; padding: 92px 20px 64px; }

/* 卡片 */
.p-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 20px;
}
.p-card__title {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  color: var(--gold-pale); margin-bottom: 20px; letter-spacing: .04em;
}

/* 会员卡 */
.p-member {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border-color: var(--border-light);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.p-member__plan { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--gold); }
.p-member__sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.p-member__badge {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .1em;
  padding: 3px 10px; border-radius: 9999px; margin-left: 10px; vertical-align: middle;
}
.p-member__badge--on { background: var(--gold-glow); color: var(--gold); border: 1px solid rgba(196,162,101,.25); }
.p-member__badge--off { background: rgba(255,255,255,.04); color: var(--text-dim); border: 1px solid var(--border); }

/* 表单 */
.p-field { margin-bottom: 18px; }
.p-field__label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.p-input, .p-textarea, .p-select {
  width: 100%; background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 14px; font-size: 14px; color: var(--text);
  transition: border-color .2s;
}
.p-input:focus, .p-textarea:focus, .p-select:focus { outline: none; border-color: var(--gold-dim); }
.p-textarea { resize: vertical; min-height: 72px; }
.p-input--readonly { background: rgba(255,255,255,.02); color: var(--text-muted); }
.p-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 头像预览 */
.p-avatar-row { display: flex; align-items: center; gap: 16px; }
.p-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--gold-glow); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 22px; color: var(--gold);
}

/* 按钮 */
.p-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px;
  border-radius: 9999px; font-size: 14px; font-weight: 600; transition: all .2s;
}
.p-btn--gold { background: linear-gradient(135deg, var(--gold) 0%, #b8924e 100%); color: #1a1814; box-shadow: 0 4px 16px var(--gold-glow); }
.p-btn--gold:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--gold-glow); }
.p-btn--outline { border: 1px solid var(--border-light); color: var(--text-muted); }
.p-btn--outline:hover { border-color: var(--gold-dim); color: var(--text); }
.p-btn--block { width: 100%; justify-content: center; }
.p-btn--danger { color: #d98a8a; border: 1px solid rgba(217,138,138,.25); }
.p-btn--danger:hover { background: rgba(217,138,138,.08); }

.p-actions { display: flex; gap: 12px; margin-top: 24px; align-items: center; }
.p-logout { margin-left: auto; }

/* 提示 */
.p-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--bg-elevated); border: 1px solid var(--border-light);
  color: var(--text); padding: 11px 22px; border-radius: 9999px; font-size: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4); opacity: 0; transition: opacity .25s, transform .25s;
  z-index: 200; pointer-events: none;
}
.p-toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.p-toast--ok { border-color: rgba(196,162,101,.3); }
.p-toast--err { border-color: rgba(217,138,138,.3); }

.p-loading { text-align: center; padding: 80px 0; color: var(--text-muted); font-size: 14px; }

@media (max-width: 640px) {
  .p-wrap { padding: 80px 16px 48px; }
  .p-card { padding: 22px 18px; }
  .p-row { grid-template-columns: 1fr; }
}
