.member-page-active {
  margin: 0;
  background: #f4f6fb;
}

.member-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #1677ff;
  box-shadow: 0 14px 32px rgba(22, 119, 255, .28);
  font: 700 14px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.member-center {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  color: #1f2937;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.member-side {
  min-height: 100vh;
  padding: 24px 16px;
  background: #172033;
  color: #fff;
}

.member-side h1 {
  margin: 0 8px 22px;
  font-size: 22px;
}

.member-side-link {
  width: 100%;
  height: 42px;
  margin-bottom: 8px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.member-side-link.is-active,
.member-side-link:hover {
  background: #2563eb;
  color: #fff;
}

.member-main {
  padding: 24px;
}

.member-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.member-topbar h2 {
  margin: 0;
  font-size: 22px;
}

.member-topbar p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.member-ghost,
.member-primary,
.member-link-box button,
.member-login button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.member-ghost {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #334155;
}

.member-primary,
.member-link-box button,
.member-login button {
  background: #1677ff;
  color: #fff;
}

.member-toast {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eaf3ff;
  color: #175cd3;
  font-size: 13px;
}

.member-toast.is-visible {
  display: block;
}

.member-center-login {
  max-width: 520px;
}

.member-login {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.member-login h2 {
  margin: 0 0 6px;
}

.member-login input,
.member-link-box input {
  height: 40px;
  min-width: 0;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #1f2937;
}

.member-content-stack {
  display: grid;
  gap: 16px;
}

.member-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.member-stat,
.member-box,
.member-vip-card,
.member-promo-hero,
.member-link-box,
.member-table-card {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.member-stat {
  padding: 16px;
}

.member-stat span {
  display: block;
  color: #64748b;
  font-size: 13px;
}

.member-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.member-vip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  background: linear-gradient(135deg, #182033, #243b73);
  color: #fff;
}

.member-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #facc15;
  font-weight: 900;
}

.member-vip-card h2 {
  margin: 12px 0 8px;
  font-size: 28px;
}

.member-vip-card p {
  margin: 0;
  color: #dbeafe;
}

.member-price-block {
  min-width: 170px;
  text-align: right;
}

.member-price-block strong {
  display: block;
  font-size: 36px;
}

.member-price-block small {
  display: block;
  margin-bottom: 12px;
  color: #bfdbfe;
}

.member-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.member-box {
  padding: 18px;
}

.member-box h3 {
  margin: 0 0 8px;
}

.member-box p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.member-promo-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.member-promo-hero h2 {
  margin: 0 0 8px;
}

.member-promo-hero p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.member-code {
  min-width: 180px;
  padding: 16px;
  border-radius: 8px;
  background: #f1f5ff;
  text-align: center;
}

.member-code span {
  display: block;
  color: #64748b;
  font-size: 13px;
}

.member-code strong {
  display: block;
  margin-top: 6px;
  color: #1677ff;
  font-size: 24px;
  letter-spacing: 1px;
}

.member-link-box {
  padding: 18px;
}

.member-link-box label {
  display: block;
  margin-bottom: 8px;
  color: #475569;
  font-weight: 800;
}

.member-link-box div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.member-table-card {
  overflow: hidden;
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.member-table th,
.member-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

.member-table th {
  background: #f8fafc;
  color: #475569;
}

.member-empty {
  color: #94a3b8;
  text-align: center;
}

.gated-resource-card {
  position: relative;
}

.resource-access-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  background: #f97316;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(249, 115, 22, .22);
  pointer-events: none;
}

.is-member-resource .resource-access-badge {
  background: #f97316;
}

.is-member-resource::after {
  content: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(249, 115, 22, .42);
  pointer-events: none;
}

.resource-lock-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .58);
}

.resource-lock-panel {
  position: relative;
  width: min(420px, 100%);
  border-radius: 8px;
  padding: 26px;
  background: #fff;
  color: #172033;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.resource-lock-panel strong {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #f97316;
  font-size: 13px;
}

.resource-lock-panel h3 {
  margin: 14px 0 10px;
  font-size: 20px;
}

.resource-lock-panel p {
  margin: 0 0 18px;
  color: #64748b;
  line-height: 1.7;
}

.resource-lock-primary,
.resource-lock-close {
  border: 0;
  cursor: pointer;
}

.resource-lock-primary {
  height: 40px;
  border-radius: 8px;
  padding: 0 16px;
  background: #1677ff;
  color: #fff;
  font-weight: 900;
}

.resource-lock-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 20px;
}

@media (max-width: 820px) {
  .member-center {
    grid-template-columns: 1fr;
  }

  .member-side {
    min-height: auto;
  }

  .member-main {
    padding: 14px;
  }

  .member-stat-grid,
  .member-feature-grid {
    grid-template-columns: 1fr;
  }

  .member-vip-card,
  .member-promo-hero,
  .member-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .member-price-block {
    text-align: left;
  }

  .member-link-box div {
    grid-template-columns: 1fr;
  }
}
