/* Member dashboard & profile area */
.rs-member-page {
  background: #f3f4f6;
  min-height: calc(100vh - 64px);
  padding: 24px 16px 32px;
}

.rs-member-wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

.rs-member-wrap-single {
  grid-template-columns: 1fr;
  gap: 20px;
}

.rs-member-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.rs-member-summary .rs-member-profile {
  text-align: left;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
}

.rs-member-summary .rs-member-avatar-wrap {
  margin: 0;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.rs-member-summary .rs-member-avatar {
  width: 88px;
  height: 88px;
  border-radius: 14px;
}

.rs-member-summary .rs-member-name {
  font-size: 16px;
  text-align: left;
}

.rs-member-summary .rs-member-id,
.rs-member-summary .rs-member-meta {
  text-align: left;
}

.rs-member-summary .rs-member-quick {
  display: none;
}

/* Horizontal top nav below header */
.rs-member-topnav {
  position: sticky;
  top: 78px;
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.rs-member-topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

.rs-member-topnav-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 58px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 2px;
  box-sizing: border-box;
}

.rs-member-topnav-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.rs-member-topnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  height: 42px;
  border-radius: 10px;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.rs-member-topnav-link i,
.rs-member-topnav-link .fa-solid {
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  color: #51071B;
  font-size: 16px;
  line-height: 1 !important;
  opacity: 0.95;
  flex: none;
  overflow: visible;
  speak: none;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

.rs-member-topnav-link i::before,
.rs-member-topnav-link .fa-solid::before {
  display: block;
  line-height: 1;
}

.rs-member-topnav-link:hover {
  background: #fdf2f4;
  color: #51071B;
  border-color: #f3d0d8;
}

.rs-member-topnav-link:hover i {
  color: #51071B;
  opacity: 1;
}

.rs-member-topnav-link.is-active {
  background: #fdf2f4;
  color: #51071B;
  border-color: #d4b0ba;
  box-shadow: inset 0 -2px 0 #51071B;
}

.rs-member-topnav-link.is-active i {
  color: #51071B;
  opacity: 1;
}

.rs-member-topnav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #51071B;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  line-height: 1;
}

.rs-member-topnav-link.is-logout {
  color: #dc2626;
  margin-left: 4px;
}

.rs-member-topnav-link.is-logout i {
  color: #dc2626;
}

.rs-member-topnav-link.is-logout:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* Stat cards */
.rs-dash-stats {
  max-width: 1200px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.rs-dash-stat {
  display: block;
  text-decoration: none;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  transition: transform 0.15s, box-shadow 0.15s;
}

.rs-dash-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(81, 7, 27, 0.1);
  border-color: #d4b0ba;
}

.rs-dash-stat-label {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 8px;
}

.rs-dash-stat-num {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.rs-stat-yellow .rs-dash-stat-label { background: #f59e0b; }
.rs-stat-purple .rs-dash-stat-label { background: #6d28d9; }
.rs-stat-maroon .rs-dash-stat-label { background: #51071B; }
.rs-stat-blue .rs-dash-stat-label { background: #0ea5e9; }
.rs-stat-green .rs-dash-stat-label { background: #10b981; }

/* Sidebar */
.rs-member-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rs-member-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.rs-member-profile {
  padding: 24px 20px 20px;
  text-align: center;
}

.rs-member-avatar-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 14px;
}

.rs-member-avatar {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  background: #f9fafb;
}

.rs-member-avatar.is-placeholder {
  object-fit: contain;
  padding: 12px;
}

.rs-member-avatar-edit {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #51071B;
  color: #fff;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(81, 7, 27, 0.35);
}

.rs-member-avatar-edit:hover {
  background: #3d0514;
  color: #fff;
}

.rs-member-crown {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff7e6;
  border: 2px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  font-size: 13px;
}

.rs-member-name {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 4px;
}

.rs-member-id {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 4px;
}

.rs-member-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}

.rs-member-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #f3f4f6;
}

.rs-member-quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 10px;
  text-decoration: none;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.15s;
}

.rs-member-quick a:hover {
  background: #fdf2f4;
  color: #51071B;
}

.rs-member-quick a i {
  font-size: 16px;
  color: #51071B;
}

/* Progress */
.rs-member-progress {
  padding: 16px 18px;
}

.rs-member-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.rs-member-progress-title {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
}

.rs-member-badge {
  background: #059669;
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.rs-member-progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.rs-member-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #51071B, #e11d48);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.rs-member-progress-pct {
  text-align: right;
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
  font-weight: 600;
}

.rs-member-progress-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.rs-member-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter 0.15s;
}

.rs-member-btn-primary {
  background: #51071B;
  color: #fff;
}

.rs-member-btn-primary:hover {
  filter: brightness(1.08);
  color: #fff;
}

.rs-member-btn-outline {
  background: #fff;
  color: #51071B;
  border: 1.5px solid #d4b0ba;
}

.rs-member-btn-outline:hover {
  background: #fdf2f4;
  color: #51071B;
}

/* Plan card */
.rs-member-plan {
  padding: 16px 18px;
}

.rs-member-plan-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  color: #111827;
  margin-bottom: 12px;
}

.rs-member-plan-badge {
  background: #f59e0b;
  color: #fff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
}

.rs-member-plan-row {
  margin-bottom: 8px;
}

.rs-member-plan-label {
  font-size: 12px;
  color: #6b7280;
}

.rs-member-plan-value {
  font-weight: 800;
  color: #111827;
  font-size: 16px;
}

.rs-member-plan-link {
  display: block;
  text-align: center;
  background: #059669;
  color: #fff;
  text-decoration: none;
  padding: 10px;
  border-radius: 10px;
  margin-top: 12px;
  font-weight: 700;
  font-size: 13px;
}

.rs-member-plan-link:hover {
  filter: brightness(0.97);
  color: #fff;
}

/* Nav menu */
.rs-member-nav {
  padding: 6px 0;
}

.rs-member-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s;
}

.rs-member-nav a:hover {
  background: #fdf2f4;
  color: #51071B;
}

.rs-member-nav a.is-active {
  background: #fdf2f4;
  color: #51071B;
  border-left-color: #51071B;
}

.rs-member-nav a i {
  width: 18px;
  text-align: center;
  color: #9ca3af;
  font-size: 15px;
}

.rs-member-nav a.is-active i,
.rs-member-nav a:hover i {
  color: #51071B;
}

.rs-member-nav-count {
  margin-left: auto;
  background: #51071B;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}

.rs-member-nav-logout {
  color: #dc2626 !important;
  border-top: 1px solid #f3f4f6;
  margin-top: 4px;
}

.rs-member-nav-logout i {
  color: #dc2626 !important;
}

/* Main content */
.rs-member-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rs-dash-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  padding: 24px;
}

.rs-dash-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.rs-dash-panel-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 4px;
}

.rs-dash-panel-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.rs-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rs-dash-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid #e5e7eb;
  color: #374151;
  background: #fff;
  transition: all 0.15s;
}

.rs-dash-action-btn:hover {
  border-color: #51071B;
  color: #51071B;
  background: #fdf2f4;
}

.rs-dash-action-btn.is-primary {
  background: #51071B;
  border-color: #51071B;
  color: #fff;
}

.rs-dash-action-btn.is-primary:hover {
  filter: brightness(1.08);
  color: #fff;
}

/* Quick links grid */
.rs-dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.rs-dash-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: 14px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: all 0.15s;
}

.rs-dash-quick-item:hover {
  background: #fdf2f4;
  border-color: #d4b0ba;
  color: #51071B;
  transform: translateY(-2px);
}

.rs-dash-quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}

.rs-dash-quick-icon.c1 { background: linear-gradient(135deg, #51071B, #9f1239); }
.rs-dash-quick-icon.c2 { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.rs-dash-quick-icon.c3 { background: linear-gradient(135deg, #059669, #047857); }
.rs-dash-quick-icon.c4 { background: linear-gradient(135deg, #d97706, #b45309); }
.rs-dash-quick-icon.c5 { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.rs-dash-quick-icon.c6 { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.rs-dash-quick-icon.c7 { background: linear-gradient(135deg, #e11d48, #be123c); }
.rs-dash-quick-icon.c8 { background: linear-gradient(135deg, #4b5563, #374151); }

/* Details grid */
.rs-dash-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.rs-dash-detail {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}

.rs-dash-detail-label {
  min-width: 130px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.rs-dash-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.rs-dash-detail.is-empty .rs-dash-detail-value {
  color: #9ca3af;
  font-style: italic;
  font-weight: 500;
}

.rs-dash-about {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #fdf2f4;
  border: 1px solid #f3d0d8;
}

.rs-dash-about h3 {
  font-size: 14px;
  font-weight: 800;
  color: #51071B;
  margin: 0 0 8px;
}

.rs-dash-about p {
  margin: 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}

/* Public profile view */
.rs-profile-hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.rs-profile-hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: #f3f4f6;
}

.rs-profile-hero-photo.is-placeholder {
  object-fit: contain;
  padding: 20px;
}

.rs-profile-hero-name {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 6px;
}

.rs-profile-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.rs-profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.rs-profile-tag.is-premium {
  background: #fff7e6;
  color: #b45309;
}

.rs-profile-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
  .rs-dash-quick-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .rs-member-wrap { grid-template-columns: 1fr; }
  .rs-member-summary { grid-template-columns: 1fr; }
  .rs-member-summary .rs-member-profile { flex-direction: column; text-align: center; }
  .rs-member-summary .rs-member-name,
  .rs-member-summary .rs-member-id,
  .rs-member-summary .rs-member-meta { text-align: center; }
  .rs-dash-stats { display: none !important; }
  .rs-dash-details { grid-template-columns: 1fr; }
  .rs-profile-hero { grid-template-columns: 1fr; text-align: center; }
  .rs-profile-hero-photo { margin: 0 auto; }
  .rs-profile-hero-tags,
  .rs-profile-cta { justify-content: center; }
}

@media (max-width: 560px) {
  .rs-member-topnav {
    top: 58px;
  }

  .rs-member-topnav-inner {
    padding: 0 10px;
  }

  .rs-member-topnav-scroll {
    height: 64px;
    gap: 10px;
    padding: 0;
  }

  .rs-member-topnav-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .rs-member-topnav-link {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    background: #f9fafb;
    border-color: #e5e7eb;
  }

  .rs-member-topnav-link i,
  .rs-member-topnav-link .fa-solid {
    font-size: 18px !important;
    width: auto !important;
    height: auto !important;
  }

  .rs-member-topnav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    font-size: 9px;
    pointer-events: none;
    z-index: 1;
  }

  .rs-member-topnav-link.is-active {
    background: #fdf2f4;
    border-color: #d4b0ba;
    box-shadow: none;
  }

  .rs-dash-stats { display: none !important; }
  .rs-dash-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .rs-dash-panel { padding: 18px; }
  .rs-dash-panel-head { flex-direction: column; }
  .rs-member-progress-actions { flex-direction: column; }
}
