/* ============================================================
 * member.css —— 我的 / 会员中心
 * ============================================================ */
.member-svc-title { margin-top: 26px; }

/* ---------- 未登录引导 ---------- */
.m-guest { position: relative; overflow: hidden; border-radius: 18px; padding: 28px 22px;
  background: linear-gradient(135deg, rgba(30,41,82,.92), rgba(18,24,52,.92));
  border: 1px solid rgba(120,150,255,.18); text-align: center; }
.m-guest-ico { width: 60px; height: 60px; margin: 0 auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  background: linear-gradient(135deg, #4f7cff, #6a5cff); }
.m-guest h3 { font-size: 18px; color: #eaf0ff; margin: 12px 0 6px; }
.m-guest p { font-size: 13px; color: #9aa6d0; line-height: 1.7; margin: 0 auto 18px; max-width: 320px; }
.m-guest-btns { display: flex; gap: 12px; justify-content: center; }
.m-btn { padding: 10px 24px; border-radius: 11px; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; }
.m-btn--primary { background: linear-gradient(135deg, #4f7cff, #6a5cff); color: #fff; }
.m-btn--ghost { background: rgba(255,255,255,.06); color: #cfd8ff; border-color: rgba(150,170,255,.25); }

/* ---------- 登录会员卡 ---------- */
.m-card { border-radius: 18px; padding: 20px;
  background: linear-gradient(135deg, rgba(30,41,82,.92), rgba(18,24,52,.94));
  border: 1px solid rgba(120,150,255,.18); }
.m-card-top { display: flex; gap: 16px; align-items: center; }
.m-avatar { position: relative; width: 68px; height: 68px; flex: 0 0 68px; }
.m-avatar > img, .m-avatar > .m-avatar-fallback { width: 68px; height: 68px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(150,170,255,.3); display: flex;
  align-items: center; justify-content: center; font-size: 24px;
  background: linear-gradient(135deg, #4f7cff, #6a5cff); color: #fff; }
.m-frame { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px);
  pointer-events: none; border-radius: 50%; }
.m-frame img { width: 100%; height: 100%; object-fit: contain; }
.m-frame--frame_newstar { border: 2px solid #4fd6ff;
  box-shadow: 0 0 12px rgba(79,214,255,.7), inset 0 0 8px rgba(79,214,255,.5);
  animation: mBreath 2.4s ease-in-out infinite; }
.m-frame--frame_gold { border: 2px solid #ffcf5c;
  box-shadow: 0 0 14px rgba(255,207,92,.8), inset 0 0 8px rgba(255,207,92,.5); }
@keyframes mBreath { 0%,100% { opacity:.65; transform: scale(1); } 50% { opacity:1; transform: scale(1.05); } }

.m-id { flex: 1; min-width: 0; }
.m-id-name { font-size: 17px; font-weight: 700; color: #eaf0ff; display: flex;
  align-items: center; gap: 8px; flex-wrap: wrap; }
.m-lv { font-size: 11px; padding: 2px 9px; border-radius: 20px;
  background: linear-gradient(135deg, #ffb648, #ff7e48); color: #3a1c00; font-weight: 700; }
.m-id-acc { font-size: 12px; color: #8b96c2; margin-top: 4px; }
.m-progress { margin-top: 10px; }
.m-progress-bar { height: 7px; border-radius: 10px; background: rgba(255,255,255,.08); overflow: hidden; }
.m-progress-bar i { display: block; height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, #5b8cff, #8a6bff); transition: width .5s; }
.m-progress-tx { font-size: 11px; color: #8b96c2; margin-top: 5px;
  display: flex; justify-content: space-between; }

.m-stats { display: flex; gap: 10px; margin-top: 16px; }
.m-stat { flex: 1; background: rgba(255,255,255,.045); border: 1px solid rgba(150,170,255,.12);
  border-radius: 12px; padding: 10px 4px; text-align: center; }
.m-stat b { display: block; font-size: 17px; color: #eaf0ff; }
.m-stat span { font-size: 11px; color: #8b96c2; }

.m-card-actions { display: flex; gap: 10px; margin-top: 15px; }
.m-checkin { flex: 1; padding: 11px; border-radius: 11px; font-weight: 600; font-size: 14px;
  cursor: pointer; background: linear-gradient(135deg, #ffb648, #ff7e48); color: #3a1c00; border: 0; }
.m-checkin.is-done { background: rgba(255,255,255,.08); color: #8b96c2; cursor: default; }

/* ---------- 功能入口 ---------- */
.m-menu { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 14px; }
.m-menu-item { background: rgba(255,255,255,.04); border: 1px solid rgba(150,170,255,.12);
  border-radius: 13px; padding: 14px 4px 12px; text-align: center; cursor: pointer; position: relative; }
.m-menu-item:hover { background: rgba(120,140,255,.12); }
.m-menu-ico { font-size: 21px; line-height: 1; }
.m-menu-item > span { display: block; font-size: 11px; color: #b7c0e6; margin-top: 7px; }
.m-menu-badge { position: absolute; top: 6px; right: 8px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 9px; background: #ff5470; color: #fff; font-size: 10px; line-height: 16px; }

/* ---------- 通用弹窗 ---------- */
.mm { position: fixed; inset: 0; z-index: 1000; display: none; }
.mm.show { display: block; }
.mm-backdrop { position: absolute; inset: 0; background: rgba(5,8,20,.68); backdrop-filter: blur(4px); }
.mm-panel { position: relative; width: min(440px, 92vw); max-height: 86vh; overflow-y: auto;
  margin: 6vh auto 0; border-radius: 18px; background: linear-gradient(160deg, #1a2350, #121838);
  border: 1px solid rgba(120,150,255,.2); padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.mm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mm-head strong { font-size: 16px; color: #eaf0ff; }
.mm-close { background: none; border: 0; color: #9aa6d0; font-size: 16px; cursor: pointer; padding: 4px; }
.mm label { display: block; font-size: 12px; color: #aeb8e0; margin: 12px 0 6px; }
.mm input, .mm textarea, .mm select { width: 100%; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(150,170,255,.2);
  color: #eaf0ff; box-sizing: border-box; font-family: inherit; }
.mm textarea { resize: vertical; min-height: 64px; }
.mm-submit { width: 100%; margin-top: 18px; padding: 12px; border-radius: 11px; border: 0;
  font-size: 15px; font-weight: 600; background: linear-gradient(135deg, #4f7cff, #6a5cff);
  color: #fff; cursor: pointer; }
.mm-tabs { display: flex; gap: 6px; background: rgba(255,255,255,.05); border-radius: 11px;
  padding: 4px; margin-bottom: 8px; }
.mm-tab { flex: 1; text-align: center; padding: 8px; border-radius: 8px; font-size: 13px;
  color: #aeb8e0; cursor: pointer; }
.mm-tab.is-active { background: linear-gradient(135deg, #4f7cff, #6a5cff); color: #fff; }
.mm-cap { display: flex; gap: 8px; align-items: center; }
.mm-cap canvas { height: 40px; border-radius: 8px; background: #fff; }
.mm-capbtn { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(150,170,255,.2); color: #cfd8ff; cursor: pointer; font-size: 14px; }
.mm-link { font-size: 12px; color: #7fa0ff; cursor: pointer; }
.mm-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.mm-hint { font-size: 11px; color: #8b96c2; margin-top: 8px; line-height: 1.6; }

/* ---------- 徽章 ---------- */
.m-badge-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.m-badge { text-align: center; padding: 12px 6px; border-radius: 13px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(150,170,255,.1); }
.m-badge.is-locked { opacity: .45; filter: grayscale(.6); }
.m-badge-ico { width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; background: linear-gradient(135deg, #ffb648, #ff7e48);
  overflow: hidden; }
.m-badge-ico img { width: 100%; height: 100%; object-fit: contain; }
.m-badge-ico span { font-size: 22px; }
.m-badge-name { font-size: 12px; color: #dfe6ff; margin-top: 7px; }
.m-badge-desc { font-size: 10px; color: #8b96c2; margin-top: 3px; line-height: 1.4; }

/* ---------- 头像框 ---------- */
.m-frame-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.m-frame-opt { text-align: center; padding: 12px 6px; border-radius: 13px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid rgba(150,170,255,.12); }
.m-frame-opt.is-active { border-color: #6a8bff; background: rgba(106,139,255,.16); }
.m-frame-opt.is-locked { opacity: .45; cursor: not-allowed; }
.m-frame-opt .m-avatar { margin: 0 auto; width: 54px; height: 54px; flex: 0 0 54px; }
.m-frame-opt .m-avatar > img, .m-frame-opt .m-avatar > .m-avatar-fallback { width: 54px; height: 54px; font-size: 19px; }
.m-frame-opt > span { display: block; font-size: 11px; color: #dfe6ff; margin-top: 9px; }

/* ---------- 消息 ---------- */
.m-msg { display: flex; gap: 10px; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,.04); margin-bottom: 8px; cursor: pointer; }
.m-msg.is-unread { background: rgba(106,139,255,.12); border-left: 3px solid #6a8bff; }
.m-msg-dot { width: 8px; height: 8px; border-radius: 50%; background: #6a8bff;
  margin-top: 6px; flex: 0 0 8px; }
.m-msg.is-read .m-msg-dot { background: transparent; }
.m-msg-title { font-size: 13px; color: #eaf0ff; font-weight: 600; }
.m-msg-content { font-size: 12px; color: #aeb8e0; margin-top: 3px; line-height: 1.5; }
.m-msg-time { font-size: 10px; color: #7a84ac; margin-top: 4px; }
.m-msg-empty { text-align: center; color: #8b96c2; padding: 30px 10px; font-size: 13px; }
.m-msg-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.m-msg-actions button { background: none; border: 0; color: #7fa0ff; font-size: 12px; cursor: pointer; }

/* ---------- 资料编辑头像预览 ---------- */
.m-ava-edit { display: flex; gap: 12px; align-items: center; }
.m-ava-edit .m-avatar { width: 60px; height: 60px; flex: 0 0 60px; }
.m-ava-edit .m-avatar img, .m-ava-edit .m-avatar .m-avatar-fallback { width: 60px; height: 60px; }
.m-ava-upload { flex: 1; }

/* ===================== 浅色覆盖 ===================== */
body.theme-light .m-guest,
body.theme-light .m-card { background: linear-gradient(135deg, #ffffff, #f3f6ff); border-color: rgba(60,90,180,.15); }
body.theme-light .m-guest h3, body.theme-light .m-id-name { color: #1a2350; }
body.theme-light .m-guest p, body.theme-light .m-id-acc, body.theme-light .m-progress-tx,
body.theme-light .m-stat span, body.theme-light .m-menu-item > span, body.theme-light .m-badge-desc,
body.theme-light .m-msg-content, body.theme-light .m-msg-empty { color: #6b76a0; }
body.theme-light .m-stat, body.theme-light .m-menu-item, body.theme-light .m-badge,
body.theme-light .m-frame-opt, body.theme-light .m-msg { background: #f4f6fe; border-color: rgba(60,90,180,.1); }
body.theme-light .m-menu-item:hover { background: #e8edff; }
body.theme-light .m-msg.is-unread { background: #e8edff; }
body.theme-light .m-msg-title { color: #1a2350; }
body.theme-light .mm-panel { background: linear-gradient(160deg, #ffffff, #f2f5ff); border-color: rgba(60,90,180,.15); }
body.theme-light .mm-head strong { color: #1a2350; }
body.theme-light .mm label { color: #5a6490; }
body.theme-light .mm input, body.theme-light .mm textarea, body.theme-light .mm select {
  background: #f4f6fe; border-color: rgba(60,90,180,.18); color: #1a2350; }
body.theme-light .mm-tabs { background: #eef1fb; }
body.theme-light .mm-tab { color: #5a6490; }
body.theme-light .m-checkin.is-done { background: #eef1fb; color: #8b96c2; }
body.theme-light .m-progress-bar { background: #e6eaf8; }
