/* ═══ Profile Page — Skora Duolingo-Style (v2: compact header, purple CTAs) ═══ */

.profile-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 64px;
  background: #fff;
}

/* ─── Compact Header (replaces banner) ─── */
.profile-header-compact {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0;
}

.profile-avatar-medium {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  border: 3px solid #E5E5E5;
}

.profile-header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-fullname {
  font-size: 1.5rem;
  font-weight: 800;
  color: #3C3C3C;
  margin: 0;
  line-height: 1.2;
}

.profile-username {
  font-size: 0.92rem;
  color: #AFAFAF;
  margin: 0;
  font-weight: 500;
}

.profile-join-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: #AFAFAF;
  margin: 4px 0 8px;
}
.profile-join-date .material-symbols-outlined { font-size: 16px; }

.profile-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}
.profile-plan-badge--premium {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
}
.profile-plan-badge--free {
  background: #F0F0F0;
  color: #AFAFAF;
  border: 1px solid #E5E5E5;
}

/* ─── Two-Column Layout ─── */
.profile-page .profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  align-items: flex-start;
  padding-top: 28px;
}

@media (max-width: 860px) {
  .profile-page .profile-layout {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }
}

.profile-page .profile-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.profile-page .profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  align-self: flex-start;
}

/* ─── Card ─── */
.profile-card {
  background: #fff;
  border: 2px solid #E5E5E5;
  border-radius: 16px;
  padding: 22px;
  opacity: 0;
  animation: profileCardIn 0.35s cubic-bezier(0.23,1,0.32,1) both;
}
.profile-card:nth-child(1) { animation-delay: 80ms; }
.profile-card:nth-child(2) { animation-delay: 140ms; }
.profile-card:nth-child(3) { animation-delay: 200ms; }

/* Compact variant for sidebar */
.profile-card--compact {
  padding: 16px 18px;
}
.profile-card--compact .profile-card-title {
  font-size: 1rem;
  margin-bottom: 10px;
}

@keyframes profileCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .profile-card { animation: none; opacity: 1; }
}

.profile-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #3C3C3C;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Stats Grid 2×2 ─── */
.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-stat-card {
  border: 2px solid #E5E5E5;
  border-radius: 14px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  opacity: 0;
  animation: profileCardIn 0.3s cubic-bezier(0.23,1,0.32,1) both;
  animation-delay: calc(var(--stagger, 0) * 60ms + 150ms);
}

.profile-stat-icon { font-size: 24px; margin-bottom: 4px; }
.profile-stat-icon--streak { color: #FF9600; }
.profile-stat-icon--quizzes { color: #CE82FF; }
.profile-stat-icon--modules { color: #1CB0F6; }
.profile-stat-icon--days { color: #FF4B4B; }

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #3C3C3C;
  line-height: 1;
}

.profile-stat-label {
  font-size: 0.78rem;
  color: #AFAFAF;
  font-weight: 600;
}

/* ─── Subject Progress ─── */
.profile-subjects-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #AFAFAF;
  font-size: 0.85rem;
  padding: 8px 0;
}

.spin-icon {
  animation: spin 1s linear infinite;
  font-size: 20px;
}

.profile-subject-row {
  padding: 14px 0;
  border-bottom: 1px solid #F0F0F0;
  opacity: 0;
  animation: profileCardIn 0.3s cubic-bezier(0.23,1,0.32,1) both;
}
.profile-subject-row:last-child { border-bottom: none; }

.profile-subject-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.profile-subject-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-subject-name {
  flex: 1;
  font-weight: 700;
  font-size: 0.9rem;
  color: #3C3C3C;
}

.profile-subject-pct {
  font-weight: 800;
  font-size: 0.85rem;
}

.profile-subject-bar-track {
  height: 10px;
  background: #E5E5E5;
  border-radius: 999px;
  overflow: hidden;
}

.profile-subject-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.23,1,0.32,1);
}

.profile-subject-meta {
  font-size: 0.75rem;
  color: #AFAFAF;
  margin-top: 6px;
}

/* ─── Achievements ─── */
.profile-card-header-row .profile-card-title {
  margin-bottom: 0;
}

.profile-see-all {
  color: #7c3aed;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.profile-see-all:hover {
  text-decoration: underline;
}

.profile-achievements,
.achievements-list {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

.achievement-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid #F0F0F0;
  opacity: 0;
  animation: profileCardIn 0.3s cubic-bezier(0.23,1,0.32,1) both;
  animation-delay: var(--achievement-delay, 0ms);
}

.achievement-row:last-child {
  border-bottom: none;
}

.achievement-row-icon {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  background: var(--achievement-tile);
  color: var(--achievement-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 76px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.achievement-row-symbol {
  font-size: 34px;
  font-variation-settings: 'FILL' 1, 'wght' 700;
}

.achievement-row-level {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 4px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  background: rgba(0, 0, 0, 0.18);
}

.achievement-row-body {
  flex: 1;
  min-width: 0;
}

.achievement-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.achievement-row-name {
  margin: 0;
  color: #3C3C3C;
  font-size: 1rem;
  font-weight: 800;
}

.achievement-row-progress {
  flex-shrink: 0;
  color: #AFAFAF;
  font-size: 0.82rem;
  font-weight: 800;
}

.achievement-row-bar {
  height: 10px;
  background: #E5E5E5;
  border-radius: 999px;
  overflow: hidden;
}

.achievement-row-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--achievement-gold, #ffc800);
  transition: width 0.8s cubic-bezier(0.23,1,0.32,1);
}

.achievement-row-description {
  margin: 10px 0 0;
  color: #777777;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
}

.achievement-row--locked .achievement-row-icon {
  filter: grayscale(1);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.06);
}

.achievement-row--locked .achievement-row-level {
  background: rgba(175, 175, 175, 0.65);
}

.achievement-row--locked .achievement-row-bar-fill {
  width: 0 !important;
}

.achievements-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.achievements-page-title {
  margin: 0 0 16px;
  color: #3C3C3C;
  font-size: 1.5rem;
  font-weight: 800;
}

.achievements-list-card {
  background: #fff;
  border: 2px solid #E5E5E5;
  border-radius: 16px;
  overflow: hidden;
}

.achievements-list {
  margin-top: 0;
}

.achievements-list .achievement-row {
  padding: 20px;
}

/* ─── Plan Status (compact) ─── */
.plan-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.plan-status-label { font-weight: 700; font-size: 0.88rem; color: #3C3C3C; }
.plan-status-value { font-size: 0.8rem; font-weight: 600; }
.plan-status-value--active { color: #7c3aed; }
.plan-status-value--urgent { color: #FF4B4B; }
.plan-status-value--free { color: #AFAFAF; }

.plan-days-left { font-size: 0.75rem; color: #AFAFAF; margin-top: 2px; }

.plan-bar-track {
  height: 8px;
  background: #E5E5E5;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.plan-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  transition: width 600ms cubic-bezier(0.23,1,0.32,1);
}
.plan-bar-fill--urgent { background: linear-gradient(90deg, #FF4B4B, #FF9600); }
.plan-bar-fill--full { background: linear-gradient(90deg, #7c3aed, #a855f7); }

.plan-upgrade-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  border-bottom: 3px solid #6025c0;
  transition: transform 150ms ease-out, filter 150ms ease-out;
}
.plan-upgrade-cta:hover { filter: brightness(1.1); }
.plan-upgrade-cta:active { transform: scale(0.97); border-bottom-width: 2px; margin-top: 13px; }
.plan-upgrade-cta .material-symbols-outlined { font-size: 16px; }

/* ─── Referrals (compact) ─── */
.profile-referral-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-referral-count {
  font-size: 1.75rem;
  font-weight: 800;
  color: #3C3C3C;
  line-height: 1;
}

.profile-referral-label {
  font-size: 0.85rem;
  color: #AFAFAF;
  font-weight: 600;
}

.profile-referral-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 3px solid #6025c0;
  transition: transform 150ms ease-out, filter 150ms ease-out;
}
.profile-referral-btn:hover { filter: brightness(1.1); }
.profile-referral-btn:active { transform: scale(0.97); border-bottom-width: 2px; }
.profile-referral-btn .material-symbols-outlined { font-size: 16px; }

/* ─── Grouped List Card (Duolingo-style) ─── */
.profile-card--list {
  padding: 0;
  overflow: hidden;
}

.profile-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: default;
  transition: background 150ms ease-out;
  border-bottom: 1px solid #F0F0F0;
}
.profile-list-item:last-child { border-bottom: none; }
.profile-list-item:hover { background: #FAFAFA; }

.profile-list-icon {
  font-size: 24px;
  color: #D1D5DB;
  flex-shrink: 0;
}

.profile-list-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.profile-list-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #3C3C3C;
}

.profile-list-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: #AFAFAF;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.profile-list-chevron {
  font-size: 20px;
  color: #D1D5DB;
  flex-shrink: 0;
}

/* ─── Empty State ─── */
.profile-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  color: #AFAFAF;
  text-align: center;
}
.profile-empty-state .material-symbols-outlined { font-size: 32px; opacity: 0.4; }
.profile-empty-state p { margin: 0; font-size: 0.85rem; }

/* ─── Dark mode ─── */
[data-theme="dark"] .profile-page { background: var(--bg-primary); }
[data-theme="dark"] .profile-fullname,
[data-theme="dark"] .profile-stat-number,
[data-theme="dark"] .profile-card-title,
[data-theme="dark"] .profile-subject-name,
[data-theme="dark"] .achievement-row-name,
[data-theme="dark"] .achievements-page-title,
[data-theme="dark"] .plan-status-label,
[data-theme="dark"] .profile-list-title,
[data-theme="dark"] .profile-referral-count { color: var(--text-primary); }

[data-theme="dark"] .profile-username,
[data-theme="dark"] .profile-join-date,
[data-theme="dark"] .profile-stat-label,
[data-theme="dark"] .profile-subject-meta,
[data-theme="dark"] .achievement-row-description,
[data-theme="dark"] .achievement-row-progress,
[data-theme="dark"] .plan-days-left,
[data-theme="dark"] .plan-status-value--free,
[data-theme="dark"] .profile-referral-label,
[data-theme="dark"] .profile-list-sub { color: var(--text-secondary); }

[data-theme="dark"] .profile-card,
[data-theme="dark"] .profile-stat-card,
[data-theme="dark"] .achievements-list-card { background: var(--bg-secondary); border-color: var(--border); }

[data-theme="dark"] .profile-avatar-medium { border-color: var(--border); }

[data-theme="dark"] .profile-plan-badge--free {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .profile-subject-bar-track,
[data-theme="dark"] .achievement-row-bar,
[data-theme="dark"] .plan-bar-track { background: var(--border); }

[data-theme="dark"] .profile-subject-row,
[data-theme="dark"] .achievement-row,
[data-theme="dark"] .profile-list-item { border-color: var(--border); }

[data-theme="dark"] .profile-list-item:hover { background: var(--bg-primary); }
[data-theme="dark"] .profile-list-icon,
[data-theme="dark"] .profile-list-chevron { color: var(--text-secondary); }

/* ─── Sidebar Legal Footer ─── */
.profile-sidebar-footer {
  text-align: center;
  margin-top: 24px;
  padding: 0 8px;
  font-size: 0.72rem;
  color: #9CA3AF;
  line-height: 1.6;
}

.profile-sidebar-footer a {
  color: #9CA3AF;
  text-decoration: none;
  transition: color 150ms ease;
}

.profile-sidebar-footer a:hover {
  color: #6B7280;
  text-decoration: underline;
}

.profile-sidebar-footer span {
  margin: 0 4px;
}

[data-theme="dark"] .profile-sidebar-footer,
[data-theme="dark"] .profile-sidebar-footer a {
  color: var(--text-secondary);
}

[data-theme="dark"] .profile-sidebar-footer a:hover {
  color: var(--text-primary);
}

/* ─── Mobile ─── */
@media (max-width: 860px) {
  .profile-page { padding: 0 12px 48px; }
  .profile-header-compact { gap: 14px; }
  .profile-avatar-medium { width: 72px; height: 72px; font-size: 1.6rem; }
  .profile-fullname { font-size: 1.25rem; }
  .profile-card { padding: 18px; }
  .profile-card--compact { padding: 14px 16px; }
  .achievement-row { gap: 14px; padding: 16px 0; }
  .achievement-row-icon { width: 64px; height: 64px; flex-basis: 64px; }
  .achievement-row-symbol { font-size: 28px; }
  .achievement-row-name { font-size: 0.94rem; }
  .achievements-page { padding: 20px 12px 48px; }
  .achievements-list .achievement-row { padding: 16px; }
}


/* ══════════════════════════════════════════════════════════════════════
   LEGACY PROFILE STYLES
   Extraído de learning.css en Round 4.2.
   Layout previo (V2): .profile-layout, .profile-main, .profile-sidebar,
   .profile-hero, .profile-stats-grid, .profile-stat-card, .profile-section-*,
   .profile-achievement-*, .profile-social-*, .profile-upgrade-card, etc.

   NOTA: Esta sección coexiste con la V3 (header compacto) que está al
   inicio del archivo. Algunas clases pueden estar deprecadas.
   ══════════════════════════════════════════════════════════════════════ */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-xl);
  align-items: start;
}

.profile-main {
  min-width: 0;
}

.profile-sidebar {
  min-width: 0;
}

/* Section heading (Estadísticas, etc.) */
.profile-section-heading {
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-md);
}

/* Hero Banner */
.profile-hero {
  background: linear-gradient(135deg, #2D1B69 0%, #1A0A3E 100%);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl) var(--sp-xl);
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xl);
  position: relative;
  overflow: hidden;
  color: #fff;
}

.profile-hero-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(108, 43, 255, 0.35), transparent 70%);
  pointer-events: none;
}

.profile-hero-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: var(--fw-extra);
  color: #fff;
  flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 24px rgba(108, 43, 255, 0.4);
  letter-spacing: 1px;
}

.profile-hero-info {
  flex: 1;
  z-index: 1;
}

.profile-hero-name {
  font-size: 1.5rem;
  font-weight: var(--fw-extra);
  margin-bottom: 2px;
}

.profile-hero-username {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.profile-hero-since {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--sp-sm);
}

.profile-hero-badges {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-top: var(--sp-xs);
}

.profile-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
}

.profile-hero-badge--premium {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.25), rgba(255, 152, 0, 0.25));
  color: #FFD54F;
}

/* Stats 2×2 Grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

.profile-stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.profile-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-violet-sm);
}

.profile-stat-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 4px;
}

.profile-stat-value {
  font-size: 1.4rem;
  font-weight: var(--fw-extra);
  color: var(--text-primary);
  line-height: 1.2;
}

.profile-stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Section header with "VER TODOS" link */
.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
}

.profile-see-all {
  font-size: 0.78rem;
  font-weight: var(--fw-bold);
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.profile-see-all:hover {
  text-decoration: underline;
}

/* Profile sections */
.profile-section-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-lg);
  transition: box-shadow 0.25s var(--ease);
}

.profile-section-card:hover {
  box-shadow: var(--shadow-violet-sm);
}

.profile-section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-lg);
}

.profile-section-title .material-symbols-outlined {
  color: var(--violet);
  font-size: 20px;
}

/* Achievements Grid */
.profile-achievements-grid {
  display: flex;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.profile-achievement {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 80px;
  text-align: center;
}

.profile-achievement-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  box-shadow: 0 3px 12px rgba(108, 43, 255, 0.3);
  transition: transform 0.2s var(--ease);
}

.profile-achievement-circle:hover {
  transform: scale(1.1);
}

.profile-achievement--locked .profile-achievement-circle {
  background: var(--bg-alt);
  box-shadow: none;
  opacity: 0.45;
  filter: grayscale(0.6);
}

.profile-achievement-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.2;
  font-weight: var(--fw-medium);
}

.profile-achievement--locked .profile-achievement-label {
  opacity: 0.5;
}

/* Preferences form */
.profile-prefs-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

/* Social Card */
.profile-social-card {
  padding: 0 !important;
  overflow: hidden;
}

.profile-social-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.profile-social-tab {
  flex: 1;
  padding: var(--sp-md);
  font-size: 0.78rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  border-bottom: 2px solid transparent;
}

.profile-social-tab.active {
  color: var(--violet);
  border-bottom-color: var(--violet);
}

.profile-social-empty {
  padding: var(--sp-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
}

.profile-social-empty p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 220px;
  line-height: 1.5;
}

/* Upgrade CTA Card */
.profile-upgrade-card {
  background: linear-gradient(135deg, #2D1B69 0%, #6C2BFF 100%);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-upgrade-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
}

.profile-upgrade-card h4 {
  font-size: 1.1rem;
  font-weight: var(--fw-bold);
  margin: var(--sp-sm) 0;
  position: relative;
  z-index: 1;
}

.profile-upgrade-card p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--sp-md);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.profile-upgrade-card .btn {
  position: relative;
  z-index: 1;
  background: #fff;
  color: var(--violet);
  font-weight: var(--fw-bold);
  border: none;
}

.profile-upgrade-card .btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* ── Dark Mode overrides for Profile ─────────────────────────────────── */
body.dark-mode .profile-section-heading {
  color: #e0e0e0;
}

body.dark-mode .profile-stat-card {
  background: var(--bg-secondary);
  border-color: var(--border);
}

body.dark-mode .profile-stat-value {
  color: #e0e0e0;
}

body.dark-mode .profile-stat-label {
  color: #9CA3AF;
}

body.dark-mode .profile-section-card {
  background: var(--bg-secondary);
  border-color: var(--border);
}

body.dark-mode .profile-section-title {
  color: #e0e0e0;
}

body.dark-mode .profile-social-tabs {
  border-bottom-color: var(--border);
}

body.dark-mode .profile-social-tab {
  color: #9CA3AF;
}

body.dark-mode .profile-social-tab.active {
  color: var(--violet);
}

body.dark-mode .profile-social-empty p {
  color: #9CA3AF;
}

body.dark-mode .profile-achievement--locked .profile-achievement-circle {
  background: var(--bg-primary);
}

body.dark-mode .profile-achievement-label {
  color: #9CA3AF;
}

/* ─── Legacy profile mobile (from responsive.css 594-646) ───────────── */
@media (max-width: 768px) {
  /* ── Profile Page ── */
  .profile-layout {
    grid-template-columns: 1fr !important;
    gap: var(--m-gap-lg) !important;
  }

  .profile-hero {
    border-radius: var(--m-card-r) !important;
    padding: var(--m-gap-xl) var(--m-card-pad) !important;
    flex-direction: column !important;
    text-align: center !important;
  }

  .profile-hero-avatar {
    width: 72px !important;
    height: 72px !important;
    font-size: 1.8rem !important;
  }

  .profile-hero-since {
    justify-content: center;
  }

  .profile-hero-badges {
    justify-content: center;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--m-gap-md) !important;
  }

  .profile-stat-value {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
  }

  .profile-stat-label {
    font-size: 0.75rem !important;
  }

  .profile-achievements-grid {
    justify-content: center;
  }

  .profile-section-card {
    border-radius: var(--m-card-r) !important;
    padding: var(--m-card-pad) !important;
  }

  .profile-upgrade-card {
    border-radius: var(--m-card-r) !important;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   PROFILE V2 WIDGETS (sidebar)
   Extraído de pages.css en Round 8.3.

   Layout V2 con sidebar (super-banner, super-active card, sidebar-widget
   con weak topics).
   ══════════════════════════════════════════════════════════════════════ */

/* Ã¢â€â‚¬Ã¢â€â‚¬ Profile / Settings (V2) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */

.profile-v2-container {
  display: flex;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
  align-items: flex-start;
  min-height: 100vh;
}

.profile-v2-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.profile-v2-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 900px) {
  .profile-v2-container {
    flex-direction: column;
  }
  .profile-v2-sidebar {
    width: 100%;
  }
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Legacy Profile v2 removed Ã¢â€â‚¬Ã¢â€â‚¬ see Profile v3 at end of file Ã¢â€â‚¬Ã¢â€â‚¬ */

/* SIDEBAR */
.super-banner {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease-out forwards;
}

.super-banner-logo {
  max-width: 110px;
  margin-bottom: 12px;
}

.super-banner-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
  padding-right: 72px;
}

.super-banner-subtitle {
  font-size: 0.82rem;
  color: #6B7280;
  margin: 0 0 16px 0;
  padding-right: 72px;
  line-height: 1.4;
}

.btn-super-get {
  background: #7B2FBE;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 12px 20px;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
}

.btn-super-get:hover {
  background: #6D28D9;
  transform: translateY(-1px);
}

.super-banner-zorro {
  position: absolute;
  right: -8px;
  top: 12px;
  height: 80px;
  width: auto;
  pointer-events: none;
  z-index: 1;
}

.empty-activity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 0;
  color: #6B7280;
}

.empty-activity i {
  color: #9CA3AF;
  width: 32px;
  height: 32px;
}

.empty-activity span {
  font-size: 0.9rem;
  font-weight: 500;
}

.super-active-card {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.super-active-icon {
  color: #10B981;
  font-size: 32px;
}

.super-active-texts h4 {
  color: #065F46;
  font-weight: 800;
  margin: 0 0 2px 0;
  font-size: 0.95rem;
}

.super-active-texts p {
  color: #047857;
  font-size: 0.8rem;
  margin: 0;
}

.sidebar-widget {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  animation: fadeInUp 0.7s ease-out forwards;
}

.widget-tabs {
  display: flex;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 16px;
}

.w-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 0;
  font-size: 0.8rem;
  color: #6B7280;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.w-tab.active {
  color: #111827;
  font-weight: 800;
  border-bottom-color: #7B2FBE;
}

.empty-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0;
}

.social-image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-height: 90px;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.social-image-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #FFFFFF);
}

.social-hero-img {
  width: 80px;
  opacity: 0.8;
  object-fit: cover;
  object-position: top;
}

.empty-social p {
  color: #6B7280;
  font-size: 0.85rem;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.btn-find-friends {
  background: #7B2FBE;
  border: none;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-find-friends:hover {
  background: #7B2FBE;
  opacity: 0.9;
}

.widget-header {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 16px 0;
}

.weak-topics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weak-topic-pill {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #991B1B;
  font-size: 0.85rem;
  font-weight: 600;
}

.weak-topic-pill .material-symbols-outlined {
  font-size: 18px;
  color: #EF4444;
}

.no-weak-topics {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #047857;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px;
}
.no-weak-topics .material-symbols-outlined {
  color: #10B981;
}
