/* ==================================================================
 *  会员系统界面（登录弹层 / 会员中心 / 状态胶囊 / 锁态）
 *  复用 TradingView 配色令牌，与主界面保持一致
 * ================================================================== */

.mmask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(6, 8, 12, .68);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}

.mcard {
  width: 380px; max-width: calc(100vw - 28px);
  max-height: calc(100vh - 60px); overflow: auto;
  background: #1b1f2a;
  border: 1px solid #2f3542; border-radius: 10px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .72);
  color: var(--tv-text);
}
.mcard.center { width: 460px; }
.mcard.small { width: 360px; }

.mhead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
}
.mhead b { font-size: 15px; font-weight: 600; color: #e6e9ef; }
.mx {
  font-style: normal; font-size: 20px; line-height: 1;
  color: #8c8f9b; cursor: pointer; padding: 2px 4px; border-radius: 4px;
}
.mx:hover { background: #262b36; color: #dfe3ea; }

.mtabs { display: flex; gap: 4px; padding: 0 16px 10px; }
.mtabs button {
  flex: 1; height: 30px; border-radius: 6px; font-size: 13px;
  color: #a7abb6; background: #20252f;
}
.mtabs button.on { background: #2962ff; color: #fff; font-weight: 600; }

.mbody { padding: 4px 16px 16px; }

.mpane { display: block; }
.mseg {
  display: flex; gap: 4px; background: #20252f; border-radius: 6px;
  padding: 3px; margin-bottom: 12px;
}
.mseg button { flex: 1; height: 26px; border-radius: 4px; font-size: 12.5px; color: #a7abb6; }
.mseg button.on { background: #2f3542; color: #e6e9ef; }

.mfield { display: block; margin-bottom: 10px; }
.mfield > span { display: block; font-size: 11.5px; color: #8c909c; margin-bottom: 5px; }
.mfield input {
  width: 100%; height: 34px; padding: 0 10px;
  background: #12161d; border: 1px solid #323847; border-radius: 6px;
  color: #e2e5eb; font: inherit; font-size: 13px; outline: none;
  user-select: text;
}
.mfield input:focus { border-color: #2962ff; }
.mfield input::placeholder { color: #5f6470; }

.mcode { display: flex; gap: 8px; }
.mcode input { flex: 1; min-width: 0; }
.mcode .mbtn { flex-shrink: 0; width: 104px; }

.mbtn {
  height: 36px; border-radius: 6px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; transition: background .12s, opacity .12s;
}
.mbtn.primary { background: #2962ff; color: #fff; }
.mbtn.primary:hover { background: #1e53e0; }
.mbtn.ghost { background: #262b36; color: #c6cad3; border-color: #363d4d; }
.mbtn.ghost:hover { background: #2f3542; }
.mbtn.wechat { background: #07c160; color: #fff; width: 100%; }
.mbtn.wechat:hover { background: #06ad56; }
.mbtn.slim { height: 30px; font-size: 12.5px; }
.mbtn:disabled { opacity: .55; cursor: default; }
.mbody > .mbtn, .mpane > .mbtn, [data-epane] > .mbtn { width: 100%; margin-top: 4px; }
.mpane .mcode .mbtn { width: 104px; margin-top: 0; }

.mrow { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12px; }
.mrow.end { justify-content: flex-end; gap: 8px; margin-top: 14px; }
.mlink { color: #5b8dff; cursor: pointer; font-size: 12px; }
.mlink:hover { text-decoration: underline; }
.mhint { font-size: 11.5px; color: #767b87; line-height: 1.55; margin-top: 10px; }

.mmsg {
  margin: 0 16px 14px; padding: 0; font-size: 12px; line-height: 1.5;
  min-height: 0; display: none;
}
.mmsg.show { display: block; padding: 8px 10px; border-radius: 6px; }
.mmsg.show.err { background: rgba(239, 83, 80, .14); color: #ff8b88; }
.mmsg.show.ok { background: rgba(38, 166, 154, .14); color: #4fd0be; }
.mmsg.show.info { background: rgba(41, 98, 255, .14); color: #7ea6ff; }

.merr { font-size: 11.5px; color: #ff8b88; min-height: 16px; }

.mtext { font-size: 13px; line-height: 1.65; color: #c6cad3; }

.mwx {
  width: 64px; height: 64px; margin: 6px auto 16px; border-radius: 16px;
  background: #07c160; color: #fff; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 会员中心 ---------- */
.msec {
  font-size: 11px; color: #767b87; letter-spacing: .06em;
  margin: 16px 0 8px; text-transform: uppercase;
}
.mstat {
  background: #20252f; border: 1px solid #2d3341; border-radius: 8px;
  padding: 12px 14px;
}
.mstat-row { display: flex; align-items: center; gap: 8px; }
.mstat-who { font-size: 12px; color: #8c909c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mstat-line { font-size: 12.5px; color: #b8bcc6; margin-top: 8px; line-height: 1.6; }
.mstat-line b { color: #e6e9ef; }

.mpill {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; line-height: 17px;
}
.mpill.ok { background: rgba(38, 166, 154, .18); color: #4fd0be; }
.mpill.trial { background: rgba(245, 185, 66, .18); color: #f5c25c; }
.mpill.bad { background: rgba(239, 83, 80, .18); color: #ff8b88; }
.mpill.muted { background: #2b303c; color: #9aa0ac; }

.mplans { display: flex; gap: 8px; }
.mplan {
  position: relative; flex: 1; min-width: 0;
  background: #20252f; border: 1px solid #2d3341; border-radius: 8px;
  padding: 12px 10px; text-align: center;
}
.mplan:hover { border-color: #3a4152; }
.mpbadge {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  background: #2962ff; color: #fff; font-style: normal; font-size: 10px;
  padding: 1px 7px; border-radius: 8px; white-space: nowrap;
}
.mp-name { font-size: 12.5px; color: #b8bcc6; }
.mp-price { margin: 6px 0 2px; font-size: 12px; color: #8c909c; }
.mp-price b { font-size: 22px; color: #e6e9ef; font-weight: 700; margin-left: 1px; }
.mp-days { font-size: 11px; color: #767b87; margin-bottom: 10px; }
.mplan .mbtn { width: 100%; }

.mdevs { display: flex; flex-direction: column; gap: 6px; }
.mdev {
  display: flex; align-items: center; gap: 8px;
  background: #20252f; border: 1px solid #2d3341; border-radius: 7px;
  padding: 9px 11px;
}
.mdev-main { flex: 1; min-width: 0; }
.mdev-main b { display: block; font-size: 12.5px; font-weight: 500; color: #d3d7de; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdev-main span { display: block; font-size: 11px; color: #767b87; margin-top: 2px; }
.mtag { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 8px; }
.mtag.cur { background: rgba(41, 98, 255, .2); color: #7ea6ff; }
.mtag.on { background: rgba(38, 166, 154, .18); color: #4fd0be; }
.mtag.off { background: #2b303c; color: #8c909c; }

/* ---------- 底部状态胶囊 ---------- */
.m-pill {
  display: inline-block; margin-right: 10px; padding: 1px 9px; border-radius: 20px;
  font-size: 11.5px; line-height: 18px; cursor: pointer; white-space: nowrap;
  background: #262b36; color: #b2b5be;
}
.m-pill:hover { background: #2f3542; }
.m-pill.ok { background: rgba(38, 166, 154, .16); color: #4fd0be; }
.m-pill.trial { background: rgba(245, 185, 66, .16); color: #f5c25c; }
.m-pill.bad { background: rgba(239, 83, 80, .16); color: #ff8b88; }

/* 头像徽标配色 */
.tb-avatar i.ok { background: #26a69a; }
.tb-avatar i.trial { background: #f5b942; color: #20180a; }
.tb-avatar i.muted { background: #4a4f5c; }
.tb-avatar { cursor: pointer; }
.tb-avatar:hover { filter: brightness(1.08); }

/* ---------- 锁态 ---------- */
body.m-locked #indMenu label[data-locked] { opacity: .45; }
