.member-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.46);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.member-panel-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.member-panel {
  position: relative;
  width: min(520px, 100%);
  height: 100%;
  overflow-y: auto;
  background: #f7f8fb;
  box-shadow: -18px 0 50px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.member-panel-backdrop.is-open .member-panel {
  transform: translateX(0);
}

.member-panel-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  color: #fff;
  background: linear-gradient(135deg, #1478ff, #6657e8);
}

.member-panel-title {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
}

.member-panel-subtitle {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.member-panel-close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.member-panel-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.member-panel-body {
  padding: 24px;
}

.member-panel-card {
  padding: 22px;
  border: 1px solid #e7eaf0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 35, 60, 0.05);
}

.member-panel-card + .member-panel-card {
  margin-top: 16px;
}

.member-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
  padding: 5px;
  border-radius: 12px;
  background: #f1f4f9;
}

.member-tab {
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #647184;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

.member-tab.is-active {
  color: #176ee8;
  background: #fff;
  box-shadow: 0 3px 10px rgba(35, 76, 125, 0.1);
  font-weight: 600;
}

.member-tab-content {
  display: none;
}

.member-tab-content.is-active {
  display: block;
}

.member-field {
  margin-bottom: 16px;
}

.member-field label {
  display: block;
  margin-bottom: 7px;
  color: #303b4a;
  font-size: 14px;
  font-weight: 600;
}

.member-input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #dce1e9;
  border-radius: 10px;
  outline: none;
  color: #1f2937;
  background: #fff;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-input:focus {
  border-color: #4388ed;
  box-shadow: 0 0 0 3px rgba(41, 122, 235, 0.12);
}

.member-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  width: 100%;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1478ff, #6657e8);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.member-button:hover {
  filter: brightness(1.04);
}

.member-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.4);
  opacity: 0.62;
}

.member-button.is-secondary {
  border: 1px solid #dfe4eb;
  color: #475569;
  background: #fff;
}

.member-button.is-danger {
  color: #c43d4b;
  background: #fff2f3;
}

.member-hint {
  margin: 14px 0 0;
  color: #758195;
  font-size: 13px;
  line-height: 1.7;
}

.member-message {
  display: none;
  margin-bottom: 16px;
  padding: 11px 13px;
  border-radius: 9px;
  color: #245a3c;
  background: #eaf8f0;
  font-size: 13px;
  line-height: 1.6;
}

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

.member-message.is-error {
  color: #a92f3b;
  background: #fff0f1;
}

.member-qrcode-box {
  display: flex;
  min-height: 238px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cad2dd;
  border-radius: 14px;
  color: #8490a3;
  background: #fafbfd;
}

.member-qrcode-box img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.member-qrcode-status {
  margin: 14px 0 0;
  color: #536176;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}

.member-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-avatar {
  display: flex;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #1478ff, #7654dc);
  font-size: 22px;
  font-weight: 700;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-profile-name {
  margin: 0 0 5px;
  color: #202a38;
  font-size: 19px;
  font-weight: 650;
}

.member-profile-meta {
  margin: 0;
  color: #7a8699;
  font-size: 13px;
}

.member-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.member-stat {
  padding: 17px;
  border-radius: 13px;
  background: linear-gradient(145deg, #f5f8ff, #f7f4ff);
}

.member-stat-value {
  color: #2f67cf;
  font-size: 24px;
  font-weight: 700;
}

.member-stat-label {
  margin-top: 5px;
  color: #7a8699;
  font-size: 12px;
}

.member-section-title {
  margin: 0 0 6px;
  color: #273241;
  font-size: 17px;
}

.member-section-desc {
  margin: 0 0 18px;
  color: #7a8699;
  font-size: 13px;
  line-height: 1.65;
}

.member-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: member-spin 0.75s linear infinite;
}

@keyframes member-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 600px) {
  .member-panel-header {
    padding: 18px 19px;
  }

  .member-panel-body {
    padding: 16px;
  }

  .member-panel-card {
    padding: 18px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .member-panel,
  .member-panel-backdrop {
    transition: none;
  }
}
