/* ============================================================
   RÁDIO NAVEGANTE — Community Dashboard v5.0
   Design System: Light mode, brand colors
   Primary: #fe6400 (Orange) | Navy: #002042 | Bg: #FFF6EA
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --rn-primary:       #fe6400;
  --rn-primary-dark:  #d95500;
  --rn-primary-light: #fff3eb;
  --rn-navy:          #002042;
  --rn-navy-mid:      #003060;
  --rn-navy-light:    #004488;
  --rn-bg:            #FFF6EA;
  --rn-surface:       #FFFFFF;
  --rn-surface-2:     #F8F9FA;
  --rn-border:        #E8EAED;
  --rn-text:          #0d1117;
  --rn-text-2:        #374151;
  --rn-text-muted:    #6B7280;
  --rn-text-light:    #9CA3AF;
  --rn-success:       #10B981;
  --rn-warning:       #F59E0B;
  --rn-danger:        #EF4444;
  --rn-gold:          #F59E0B;
  --rn-shadow-sm:     0 1px 2px rgba(0,32,66,0.06);
  --rn-shadow:        0 2px 8px rgba(0,32,66,0.09), 0 1px 3px rgba(0,32,66,0.05);
  --rn-shadow-md:     0 4px 16px rgba(0,32,66,0.10), 0 2px 6px rgba(0,32,66,0.06);
  --rn-shadow-lg:     0 8px 32px rgba(0,32,66,0.12), 0 4px 12px rgba(0,32,66,0.07);
  --rn-sidebar-w:     264px;
  --rn-radius:        14px;
  --rn-radius-sm:     8px;
  --rn-radius-lg:     20px;
  --rn-radius-full:   9999px;
  --rn-transition:    180ms cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset for dashboard ────────────────────────────────────── */
.uwp_account_page #masthead { position: relative !important; }
.uwp_account_page .site-content,
.uwp_account_page #content { padding: 0 !important; }
.uwp_account_page .ast-container { max-width: 100% !important; padding: 0 !important; }
.uwp_account_page .entry-content { margin: 0 !important; padding: 0 !important; }
.uwp_account_page .ast-article-single { padding: 0 !important; }
.uwp_account_page #primary { padding: 0 !important; }
.uwp_account_page .site-main { padding: 0 !important; }

/* ── Dashboard wrapper ──────────────────────────────────────── */
.rn-dashboard {
  display: flex;
  min-height: calc(100vh - 72px);
  background: var(--rn-bg);
  font-family: 'Open Sans', sans-serif;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.rn-sidebar {
  width: var(--rn-sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #002042 0%, #001530 100%);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  z-index: 100;
}

.rn-sidebar::-webkit-scrollbar { width: 4px; }
.rn-sidebar::-webkit-scrollbar-track { background: transparent; }
.rn-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* Sidebar brand */
.rn-sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.rn-sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.rn-sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.rn-sidebar-brand-title {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.rn-sidebar-brand-sub {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Sidebar user block */
.rn-sidebar-user {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.rn-sidebar-user-avatar {
  position: relative;
  flex-shrink: 0;
}

.rn-sidebar-user-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--rn-primary);
  object-fit: cover;
}

.rn-online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background: var(--rn-success);
  border-radius: 50%;
  border: 2px solid #002042;
}

.rn-sidebar-user-info { flex: 1; min-width: 0; }

.rn-sidebar-user-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.rn-sidebar-user-level {
  color: var(--rn-primary);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* XP mini bar in sidebar */
.rn-sidebar-xp {
  padding: 0 20px 16px;
}

.rn-sidebar-xp-bar {
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  overflow: hidden;
}

.rn-sidebar-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rn-primary), #ff9f40);
  border-radius: 4px;
  transition: width 0.8s ease;
}

.rn-sidebar-xp-label {
  color: rgba(255,255,255,0.35);
  font-size: 10px;
  margin-top: 4px;
  text-align: right;
}

/* Sidebar navigation */
.rn-sidebar-nav {
  flex: 1;
  padding: 8px 12px;
}

.rn-nav-section {
  margin-bottom: 4px;
}

.rn-nav-section-label {
  color: rgba(255,255,255,0.25);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 14px 8px 6px;
}

.rn-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--rn-transition);
  margin-bottom: 2px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
}

.rn-nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
}

.rn-nav-item.active {
  background: rgba(254,100,0,0.15);
  color: #fff;
  font-weight: 600;
}

.rn-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: var(--rn-primary);
  border-radius: 0 3px 3px 0;
}

.rn-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.75;
}

.rn-nav-item.active .rn-nav-icon,
.rn-nav-item:hover .rn-nav-icon { opacity: 1; }

.rn-nav-badge {
  margin-left: auto;
  background: var(--rn-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.rn-nav-badge.orange { background: var(--rn-primary); }

/* Sidebar footer */
.rn-sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.rn-sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  transition: all var(--rn-transition);
}

.rn-sidebar-footer a:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.05);
}

/* ── Main content area ──────────────────────────────────────── */
.rn-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rn-topbar {
  background: var(--rn-surface);
  border-bottom: 1px solid var(--rn-border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--rn-shadow-sm);
}

.rn-topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--rn-navy);
  flex: 1;
}

.rn-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rn-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--rn-border);
  background: var(--rn-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--rn-transition);
  color: var(--rn-text-muted);
  text-decoration: none;
}

.rn-icon-btn:hover {
  background: var(--rn-surface-2);
  border-color: var(--rn-border);
  color: var(--rn-navy);
}

.rn-icon-btn .rn-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--rn-danger);
  border-radius: 50%;
  border: 2px solid white;
}

.rn-content {
  flex: 1;
  padding: 28px;
  max-width: 1200px;
  width: 100%;
}

/* ── Tab panels ─────────────────────────────────────────────── */
.rn-tab-panel { display: none; }
.rn-tab-panel.active { display: block; }

/* ── Welcome banner ─────────────────────────────────────────── */
.rn-welcome-banner {
  background: linear-gradient(135deg, #002042 0%, #003870 50%, #004fa0 100%);
  border-radius: var(--rn-radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.rn-welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -5%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(254,100,0,0.2) 0%, transparent 65%);
  pointer-events: none;
}

.rn-welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: 30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.rn-welcome-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(254,100,0,0.6);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 6px rgba(254,100,0,0.12);
}

.rn-welcome-text { flex: 1; z-index: 1; }

.rn-welcome-greeting {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 4px;
}

.rn-welcome-name {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px;
}

.rn-welcome-sub {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  margin: 0;
}

.rn-welcome-right {
  z-index: 1;
  text-align: right;
  flex-shrink: 0;
}

.rn-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(254,100,0,0.2);
  border: 1px solid rgba(254,100,0,0.35);
  color: #ffb380;
  padding: 6px 14px;
  border-radius: var(--rn-radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.rn-welcome-date {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
}

/* ── Stats grid ─────────────────────────────────────────────── */
.rn-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.rn-stat-card {
  background: var(--rn-surface);
  border-radius: var(--rn-radius);
  padding: 20px;
  box-shadow: var(--rn-shadow);
  border: 1px solid var(--rn-border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--rn-transition);
  text-decoration: none;
}

.rn-stat-card:hover { box-shadow: var(--rn-shadow-md); }

.rn-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.rn-stat-icon.orange { background: #fff3eb; }
.rn-stat-icon.gold   { background: #fffbeb; }
.rn-stat-icon.blue   { background: #eff6ff; }
.rn-stat-icon.green  { background: #ecfdf5; }
.rn-stat-icon.red    { background: #fff5f5; }

.rn-stat-body {}

.rn-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--rn-navy);
  line-height: 1;
  margin-bottom: 4px;
}

.rn-stat-label {
  color: var(--rn-text-muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── Two-column layout ──────────────────────────────────────── */
.rn-two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  margin-bottom: 24px;
}

/* ── Cards ──────────────────────────────────────────────────── */
.rn-card {
  background: var(--rn-surface);
  border-radius: var(--rn-radius);
  border: 1px solid var(--rn-border);
  box-shadow: var(--rn-shadow);
  overflow: hidden;
}

.rn-card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--rn-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rn-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--rn-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rn-card-title-icon {
  font-size: 18px;
}

.rn-card-action {
  color: var(--rn-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--rn-transition);
}

.rn-card-action:hover { color: var(--rn-primary-dark); }

.rn-card-body { padding: 20px; }

/* ── Progress card ──────────────────────────────────────────── */
.rn-progress-wrap { margin-bottom: 20px; }

.rn-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.rn-progress-level-from,
.rn-progress-level-to {
  font-size: 12px;
  font-weight: 600;
  color: var(--rn-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.rn-progress-pct {
  font-size: 22px;
  font-weight: 700;
  color: var(--rn-primary);
}

.rn-progress-bar-track {
  height: 10px;
  background: #F3F4F6;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.rn-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rn-primary) 0%, #ff9f40 100%);
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

.rn-progress-xp-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--rn-text-muted);
}

.rn-progress-xp-info strong { color: var(--rn-text-2); }

/* XP milestones */
.rn-xp-milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.rn-xp-milestone {
  background: var(--rn-surface-2);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--rn-border);
}

.rn-xp-milestone .xp-icon { font-size: 20px; margin-bottom: 4px; }
.rn-xp-milestone .xp-label { font-size: 11px; color: var(--rn-text-muted); font-weight: 500; }
.rn-xp-milestone .xp-val { font-size: 16px; font-weight: 700; color: var(--rn-navy); }

/* ── Activity timeline ──────────────────────────────────────── */
.rn-activity-list { padding: 8px 20px 20px; }

.rn-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rn-border);
  position: relative;
}

.rn-activity-item:last-child { border-bottom: none; }

.rn-activity-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-top: 2px;
}

.rn-activity-dot.chat    { background: #eff6ff; }
.rn-activity-dot.xp      { background: #fffbeb; }
.rn-activity-dot.achiev  { background: #ecfdf5; }
.rn-activity-dot.level   { background: #fff3eb; }

.rn-activity-body { flex: 1; }

.rn-activity-text {
  font-size: 14px;
  color: var(--rn-text-2);
  line-height: 1.4;
  margin-bottom: 3px;
}

.rn-activity-text strong { color: var(--rn-navy); }

.rn-activity-time {
  font-size: 12px;
  color: var(--rn-text-light);
}

.rn-activity-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--rn-text-muted);
}

.rn-activity-empty-icon { font-size: 40px; margin-bottom: 8px; }
.rn-activity-empty p { font-size: 14px; }

/* ── Achievements ───────────────────────────────────────────── */
.rn-achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 20px 20px;
}

.rn-achiev-card {
  background: var(--rn-surface-2);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid var(--rn-border);
  transition: all var(--rn-transition);
}

.rn-achiev-card.unlocked {
  background: linear-gradient(135deg, #fffbeb, #fff7e6);
  border-color: #fed7aa;
  box-shadow: 0 2px 8px rgba(254,100,0,0.08);
}

.rn-achiev-card:hover { transform: translateY(-2px); box-shadow: var(--rn-shadow-md); }

.rn-achiev-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 10px;
  background: var(--rn-border);
}

.rn-achiev-card.unlocked .rn-achiev-icon {
  background: linear-gradient(135deg, #fe6400, #ff9f40);
  box-shadow: 0 4px 12px rgba(254,100,0,0.3);
}

.rn-achiev-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--rn-text-2);
  margin-bottom: 4px;
  line-height: 1.3;
}

.rn-achiev-card.unlocked .rn-achiev-name { color: var(--rn-navy); }

.rn-achiev-desc {
  font-size: 11px;
  color: var(--rn-text-light);
  line-height: 1.3;
}

.rn-achiev-card.locked {
  opacity: 0.55;
  filter: grayscale(0.6);
}

/* ── Ranking table ──────────────────────────────────────────── */
.rn-ranking-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--rn-border);
}

.rn-rtab {
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--rn-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: all var(--rn-transition);
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}

.rn-rtab.active {
  color: var(--rn-primary);
  border-bottom-color: var(--rn-primary);
  font-weight: 600;
}

.rn-rtab:hover { color: var(--rn-text-2); background: var(--rn-surface-2); }

.rn-ranking-list { padding: 8px 20px 16px; }

.rn-rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rn-border);
  transition: background var(--rn-transition);
}

.rn-rank-item:last-child { border-bottom: none; }

.rn-rank-item.is-me {
  background: var(--rn-primary-light);
  margin: 0 -20px;
  padding: 12px 20px;
  border-radius: 8px;
}

.rn-rank-pos {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--rn-text-muted);
  background: var(--rn-surface-2);
  flex-shrink: 0;
}

.rn-rank-pos.pos-1 { background: #fef3c7; color: #92400e; font-size: 16px; }
.rn-rank-pos.pos-2 { background: #f3f4f6; color: #374151; font-size: 16px; }
.rn-rank-pos.pos-3 { background: #fef2ec; color: #c05621; font-size: 16px; }

.rn-rank-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.rn-rank-info { flex: 1; min-width: 0; }

.rn-rank-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--rn-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rn-rank-role {
  font-size: 11px;
  color: var(--rn-text-muted);
}

.rn-rank-score {
  flex-shrink: 0;
  text-align: right;
}

.rn-rank-xp {
  font-size: 14px;
  font-weight: 700;
  color: var(--rn-primary);
}

.rn-rank-xp-label { font-size: 10px; color: var(--rn-text-light); }

/* ── Profile tab ────────────────────────────────────────────── */
.rn-profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.rn-profile-avatar-card {
  background: var(--rn-surface);
  border-radius: var(--rn-radius);
  border: 1px solid var(--rn-border);
  box-shadow: var(--rn-shadow);
  padding: 24px;
  text-align: center;
}

.rn-profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.rn-profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--rn-primary);
  box-shadow: 0 0 0 6px rgba(254,100,0,0.1);
}

.rn-profile-avatar-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  background: var(--rn-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  border: 2px solid white;
  transition: background var(--rn-transition);
}

.rn-profile-avatar-edit:hover { background: var(--rn-primary-dark); }

.rn-profile-display-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--rn-navy);
  margin-bottom: 6px;
}

.rn-profile-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.rn-badge-level {
  background: var(--rn-primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--rn-radius-full);
}

.rn-badge-role {
  background: var(--rn-surface-2);
  color: var(--rn-text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--rn-radius-full);
  border: 1px solid var(--rn-border);
}

.rn-profile-bio {
  font-size: 13px;
  color: var(--rn-text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  font-style: italic;
}

.rn-profile-stats-mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.rn-profile-stat-mini {
  background: var(--rn-surface-2);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  border: 1px solid var(--rn-border);
}

.rn-profile-stat-mini-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--rn-navy);
}

.rn-profile-stat-mini-lbl {
  font-size: 10px;
  color: var(--rn-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--rn-transition);
  text-decoration: none;
  line-height: 1;
}

.rn-btn-primary {
  background: var(--rn-primary);
  color: white;
  width: 100%;
  justify-content: center;
}

.rn-btn-primary:hover { background: var(--rn-primary-dark); box-shadow: 0 4px 12px rgba(254,100,0,0.3); }

.rn-btn-outline {
  background: transparent;
  color: var(--rn-navy);
  border: 1.5px solid var(--rn-border);
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.rn-btn-outline:hover { border-color: var(--rn-navy); background: var(--rn-surface-2); }

/* Profile form */
.rn-profile-form-card {
  background: var(--rn-surface);
  border-radius: var(--rn-radius);
  border: 1px solid var(--rn-border);
  box-shadow: var(--rn-shadow);
  overflow: hidden;
}

.rn-form-group { margin-bottom: 18px; }

.rn-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--rn-text-2);
  margin-bottom: 6px;
}

.rn-form-input,
.rn-form-textarea,
.rn-form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--rn-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--rn-text);
  background: var(--rn-surface);
  font-family: 'Open Sans', sans-serif;
  transition: border-color var(--rn-transition), box-shadow var(--rn-transition);
  box-sizing: border-box;
}

.rn-form-input:focus,
.rn-form-textarea:focus,
.rn-form-select:focus {
  outline: none;
  border-color: var(--rn-primary);
  box-shadow: 0 0 0 3px rgba(254,100,0,0.12);
}

.rn-form-textarea { resize: vertical; min-height: 90px; }
.rn-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rn-form-hint { font-size: 12px; color: var(--rn-text-muted); margin-top: 4px; }

/* ── Notifications panel ────────────────────────────────────── */
.rn-notif-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: var(--rn-surface);
  box-shadow: -8px 0 40px rgba(0,32,66,0.15);
  z-index: 9999;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rn-notif-panel.open { right: 0; }

.rn-notif-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--rn-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--rn-surface);
}

.rn-notif-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--rn-navy);
  margin: 0;
}

.rn-notif-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--rn-surface-2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rn-text-muted);
  font-size: 18px;
  transition: all var(--rn-transition);
}

.rn-notif-close:hover { background: var(--rn-border); color: var(--rn-text); }

.rn-notif-list { flex: 1; overflow-y: auto; padding: 8px; }

.rn-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--rn-transition);
  margin-bottom: 2px;
}

.rn-notif-item:hover { background: var(--rn-surface-2); }
.rn-notif-item.unread { background: var(--rn-primary-light); }
.rn-notif-item.unread:hover { background: #ffe8d5; }

.rn-notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--rn-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.rn-notif-body { flex: 1; }

.rn-notif-text {
  font-size: 13px;
  color: var(--rn-text-2);
  line-height: 1.4;
  margin-bottom: 3px;
}

.rn-notif-text strong { color: var(--rn-navy); }

.rn-notif-time { font-size: 11px; color: var(--rn-text-light); }

/* ── Alert/success messages ─────────────────────────────────── */
.rn-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rn-alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.rn-alert-error   { background: #fff5f5; color: #991b1b; border: 1px solid #fecaca; }
.rn-alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Streak card ────────────────────────────────────────────── */
.rn-streak-widget {
  background: linear-gradient(135deg, #fff7ed, #fff3eb);
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.rn-streak-icon { font-size: 32px; flex-shrink: 0; }

.rn-streak-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--rn-primary);
  line-height: 1;
}

.rn-streak-label {
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
}

/* ── Empty states ────────────────────────────────────────────── */
.rn-empty {
  text-align: center;
  padding: 40px 20px;
}

.rn-empty-icon { font-size: 48px; margin-bottom: 12px; }

.rn-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--rn-text-2);
  margin-bottom: 6px;
}

.rn-empty-desc {
  font-size: 14px;
  color: var(--rn-text-muted);
  margin-bottom: 16px;
}

/* ── Loading spinner ─────────────────────────────────────────── */
.rn-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--rn-border);
  border-top-color: var(--rn-primary);
  border-radius: 50%;
  animation: rn-spin 0.7s linear infinite;
  margin: 0 auto;
}

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

.rn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

/* ── Toast notifications ─────────────────────────────────────── */
.rn-toast-wrap {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rn-toast {
  background: var(--rn-navy);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--rn-shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  animation: rn-toast-in 0.3s ease;
}

.rn-toast.success { background: var(--rn-success); }
.rn-toast.error   { background: var(--rn-danger); }
.rn-toast.info    { background: var(--rn-navy); }

@keyframes rn-toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Settings ──────────────────────────────────────────────── */
.rn-settings-grid {
  display: grid;
  gap: 16px;
}

.rn-settings-section {
  background: var(--rn-surface);
  border-radius: var(--rn-radius);
  border: 1px solid var(--rn-border);
  overflow: hidden;
}

.rn-settings-section-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rn-border);
  background: var(--rn-surface-2);
}

.rn-settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--rn-navy);
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .rn-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .rn-two-col { grid-template-columns: 1fr; }
  .rn-profile-grid { grid-template-columns: 1fr; }
  .rn-achievements-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .rn-sidebar {
    position: fixed;
    left: -264px;
    top: 0;
    height: 100vh;
    transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 200;
  }
  .rn-sidebar.open { left: 0; }
  .rn-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    display: none;
  }
  .rn-sidebar-overlay.show { display: block; }
  .rn-content { padding: 16px; }
  .rn-topbar { padding: 0 16px; }
  .rn-welcome-banner { flex-direction: column; text-align: center; padding: 24px 20px; }
  .rn-welcome-right { text-align: center; }
  .rn-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rn-achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .rn-xp-milestones { grid-template-columns: repeat(3, 1fr); }
  .rn-form-row { grid-template-columns: 1fr; }
  .rn-notif-panel { width: 100%; right: -100%; }
  .rn-notif-panel.open { right: 0; }
}

@media (max-width: 480px) {
  .rn-stats-grid { grid-template-columns: 1fr 1fr; }
  .rn-welcome-name { font-size: 20px; }
}

/* ── UWP overrides (ensure UserWP forms look good) ──────────── */
.uwp_account_page .uwp-form-group { margin-bottom: 16px !important; }
.uwp_account_page .uwp-form-group label { font-size: 13px !important; font-weight: 600 !important; color: var(--rn-text-2) !important; margin-bottom: 6px !important; }
.uwp_account_page .uwp-form-group input,
.uwp_account_page .uwp-form-group textarea,
.uwp_account_page .uwp-form-group select {
  border: 1.5px solid var(--rn-border) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  color: var(--rn-text) !important;
  background: white !important;
  width: 100% !important;
}
.uwp_account_page .uwp-form-group input:focus,
.uwp_account_page .uwp-form-group textarea:focus {
  outline: none !important;
  border-color: var(--rn-primary) !important;
  box-shadow: 0 0 0 3px rgba(254,100,0,0.12) !important;
}
