/* ============================================================
   UniMate Profile V2 — Complete Redesign
   Modern · Glassmorphism · Functional · Light+Dark
   ============================================================ */

/* ── Page variables ── */
.profile-page {
  --pf-bg: var(--bg, #f6f7fb);
  --pf-surface: var(--surface, #ffffff);
  --pf-text: var(--text, #0f172a);
  --pf-muted: var(--muted, #64748b);
  --pf-dim: #94a3b8;
  --pf-border: var(--border, #e2e8f0);
  --pf-accent: #0ea5e9;
  --pf-accent2: #06b6d4;
  --pf-accent-soft: rgba(14,165,233,0.08);
  --pf-accent-glow: rgba(14,165,233,0.18);
  --pf-soft: rgba(2,6,23,0.03);
  --pf-soft-hover: rgba(2,6,23,0.06);
  --pf-radius: 20px;
  --pf-radius-md: 16px;
  --pf-radius-sm: 12px;
  --pf-radius-xs: 8px;
  --pf-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.06);
  --pf-shadow-hover: 0 2px 8px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.10);
  --pf-shadow-heavy: 0 8px 40px rgba(0,0,0,0.12);
  --pf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pf-gap: 20px;
  background: var(--pf-bg);
  min-height: 100vh;
}
.profile-page .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Dark theme */
.theme-dark .profile-page {
  --pf-soft: rgba(255,255,255,0.03);
  --pf-soft-hover: rgba(255,255,255,0.06);
  --pf-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 6px 24px rgba(0,0,0,0.3);
  --pf-shadow-hover: 0 2px 8px rgba(0,0,0,0.25), 0 12px 32px rgba(0,0,0,0.4);
  --pf-shadow-heavy: 0 8px 40px rgba(0,0,0,0.4);
  --pf-accent-soft: rgba(56,189,248,0.1);
  --pf-accent-glow: rgba(56,189,248,0.2);
}

/* ═══════════════════════════════════════
   SKELETON
   ═══════════════════════════════════════ */
.profile-skeleton { animation: pfFadeIn .3s ease; }
.skeleton-pulse {
  background: linear-gradient(90deg, var(--pf-soft) 25%, var(--pf-soft-hover) 50%, var(--pf-soft) 75%);
  background-size: 200% 100%;
  animation: pfShimmer 1.5s ease infinite;
  border-radius: var(--pf-radius-sm);
}
.skeleton-line { display: block; background: var(--pf-soft); }
@keyframes pfShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes pfFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════
   NOT FOUND
   ═══════════════════════════════════════ */
.profile-not-found { display: none; align-items: center; justify-content: center; min-height: 50vh; }
.profile-not-found-inner { text-align: center; padding: 48px 32px; }
.profile-not-found-icon { font-size: 72px; color: var(--pf-dim); opacity: 0.3; margin-bottom: 20px; }
.profile-not-found-inner h2 { font-size: 24px; font-weight: 800; color: var(--pf-text); margin: 0 0 8px; letter-spacing: -0.02em; }
.profile-not-found-inner p { color: var(--pf-muted); margin: 0 0 24px; font-size: 15px; }

/* ═══════════════════════════════════════
   HEADER CARD (Cover + Avatar + Identity)
   ═══════════════════════════════════════ */
.profile-header {
  background: var(--pf-surface);
  border-radius: var(--pf-radius);
  overflow: hidden;
  border: 1px solid var(--pf-border);
  box-shadow: var(--pf-shadow);
  margin-bottom: var(--pf-gap);
  transition: box-shadow .3s;
}
.profile-header:hover { box-shadow: var(--pf-shadow-hover); }

.profile-cover {
  height: 240px;
  background: linear-gradient(135deg, #0369a1, #0ea5e9 40%, #38bdf8 70%, #22d3ee);
  background-size: cover;
  background-position: center;
  position: relative;
}
.profile-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.2));
  pointer-events: none;
}
.profile-cover-edit {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border-radius: var(--pf-radius-xs);
  padding: 7px 12px; cursor: pointer;
  transition: all .2s;
  font-size: 13px; font-weight: 600; color: #334155;
  display: inline-flex; align-items: center; gap: 6px;
}
.profile-cover-edit:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
.theme-dark .profile-cover-edit { background: rgba(15,23,42,0.75); border-color: rgba(148,163,184,0.2); color: #e2e8f0; }
.theme-dark .profile-cover-edit:hover { background: rgba(15,23,42,0.9); }

.profile-info-section { padding: 0 28px 24px; position: relative; }

/* Avatar */
.profile-avatar-wrapper { margin-top: -64px; margin-bottom: 14px; position: relative; display: inline-block; z-index: 2; }
.profile-avatar {
  width: 136px; height: 136px; border-radius: 50%;
  border: 4px solid var(--pf-surface);
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 800; color: var(--pf-muted);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transition: transform .3s, box-shadow .3s;
}
.profile-avatar:hover { transform: scale(1.03); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar.avatar-frame-gold { border-color: transparent; box-shadow: 0 0 0 3px #fbbf24, 0 0 0 5px rgba(251,191,36,0.25), 0 8px 32px rgba(0,0,0,0.12); }
.profile-avatar.avatar-frame-neon { border-color: transparent; box-shadow: 0 0 0 3px #22c55e, 0 0 20px rgba(34,197,94,0.35), 0 8px 32px rgba(0,0,0,0.12); }
.theme-dark .profile-avatar { background: linear-gradient(135deg, #1e293b, #334155); }

.profile-avatar-edit {
  position: absolute; bottom: 4px; right: 4px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--pf-accent);
  border: 3px solid var(--pf-surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 4px 12px rgba(14,165,233,0.4);
  color: #fff; font-size: 13px;
}
.profile-avatar-edit:hover { background: #0284c7; transform: scale(1.1); }

/* Name area */
.profile-main-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.profile-name-section { flex: 1; min-width: 0; }
.profile-name {
  font-size: 28px; font-weight: 800; color: var(--pf-text);
  margin: 0 0 4px; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; letter-spacing: -0.03em; line-height: 1.3;
}
.profile-username { font-size: 15px; color: var(--pf-muted); margin: 0 0 3px; font-weight: 500; }
.profile-online-status { font-size: 12px; font-weight: 600; margin: 0 0 8px; display: none; }
.profile-online-status.online {
  display: flex; align-items: center; gap: 5px; color: #22c55e;
}
.profile-online-status.online::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.5); flex-shrink: 0;
}
.profile-online-status.offline { display: block; color: var(--pf-muted); }
.profile-bio { font-size: 14px; color: var(--pf-muted); line-height: 1.6; margin: 0; }

/* Nickname effects */
.nickname-rainbow {
  background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #3b82f6, #8b5cf6, #ec4899);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pfRainbow 3s linear infinite;
}
@keyframes pfRainbow { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }

/* Badges */
.profile-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, #fef3c7, #fde68a); border: 1px solid #fbbf24; color: #92400e;
  white-space: nowrap;
}
.profile-badge.role-leader { background: linear-gradient(135deg, #e0f2fe, #bae6fd); border-color: #0ea5e9; color: #075985; }
.profile-badge.badge-supporter { background: linear-gradient(135deg, #fce7f3, #fbcfe8); border-color: #ec4899; color: #9d174d; }
.profile-badge.badge-diamond { background: linear-gradient(135deg, #e0f2fe, #a5f3fc); border-color: #06b6d4; color: #155e75; }
.theme-dark .profile-badge { background: linear-gradient(135deg, #78350f, #451a03); border-color: #92400e; color: #fcd34d; }
.theme-dark .profile-badge.role-leader { background: linear-gradient(135deg, #0c4a6e, #075985); border-color: #0284c7; color: #7dd3fc; }
.theme-dark .profile-badge.badge-supporter { background: linear-gradient(135deg, #831843, #9d174d); border-color: #ec4899; color: #fbcfe8; }
.theme-dark .profile-badge.badge-diamond { background: linear-gradient(135deg, #164e63, #155e75); border-color: #06b6d4; color: #a5f3fc; }

/* Actions */
.profile-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex-shrink: 0; }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.profile-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--pf-radius-xs);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s; border: none; text-decoration: none;
  white-space: nowrap; line-height: 1.4; font-family: inherit;
}
.profile-btn-primary {
  background: linear-gradient(135deg, var(--pf-accent), #0284c7); color: #fff;
  box-shadow: 0 2px 8px var(--pf-accent-glow);
}
.profile-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--pf-accent-glow); }
.profile-btn-primary:active { transform: translateY(0); }
.profile-btn-outline {
  background: var(--pf-surface); color: var(--pf-text); border: 1.5px solid var(--pf-border);
}
.profile-btn-outline:hover { background: var(--pf-soft); border-color: var(--pf-accent); color: var(--pf-accent); }
.profile-btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,0.25); }
.profile-btn-danger:hover { transform: translateY(-1px); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.profile-friend-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(34,197,94,0.08); color: #16a34a; border: 1px solid rgba(34,197,94,0.20);
}
.profile-form-hint { font-size: 13px; color: var(--pf-muted); }

/* ═══════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════ */
.profile-stats-bar {
  display: flex; align-items: stretch; gap: 0;
  padding: 0; background: var(--pf-surface);
  border: 1px solid var(--pf-border); border-radius: var(--pf-radius);
  margin-bottom: var(--pf-gap); box-shadow: var(--pf-shadow);
  overflow-x: auto; scrollbar-width: none;
}
.profile-stats-bar::-webkit-scrollbar { display: none; }

.profile-stat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; flex: 1; min-width: 0;
  transition: background .15s; position: relative;
}
.profile-stat-item:hover { background: var(--pf-soft); }

.profile-stat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.profile-stat-item:nth-child(2)  .profile-stat-icon { background: rgba(14,165,233,0.08); color: #0ea5e9; }
.profile-stat-item:nth-child(4)  .profile-stat-icon { background: rgba(139,92,246,0.08); color: #8b5cf6; }
.profile-stat-item:nth-child(6)  .profile-stat-icon { background: rgba(16,185,129,0.08); color: #10b981; }
.profile-stat-item:nth-child(8)  .profile-stat-icon { background: rgba(245,158,11,0.08); color: #f59e0b; }
.profile-stat-item:nth-child(10) .profile-stat-icon { background: rgba(236,72,153,0.08); color: #ec4899; }
.profile-stat-item:nth-child(12) .profile-stat-icon { background: rgba(99,102,241,0.08); color: #6366f1; }
.profile-stat-item:nth-child(14) .profile-stat-icon { background: rgba(20,184,166,0.08); color: #14b8a6; }

.profile-stat-data { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.profile-stat-value { font-size: 18px; font-weight: 800; color: var(--pf-text); line-height: 1.2; font-variant-numeric: tabular-nums; }
.profile-stat-label { font-size: 10px; font-weight: 700; color: var(--pf-muted); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.4px; overflow: hidden; text-overflow: ellipsis; }
.profile-stat-divider { width: 1px; align-self: stretch; margin: 10px 0; background: var(--pf-border); flex-shrink: 0; }

/* ═══════════════════════════════════════
   CONTENT GRID
   ═══════════════════════════════════════ */
.profile-content {
  display: grid; grid-template-columns: 340px minmax(0, 1fr);
  gap: var(--pf-gap); align-items: start;
}
.profile-content-left, .profile-content-right {
  display: flex; flex-direction: column; gap: var(--pf-gap);
}

/* ═══════════════════════════════════════
   CARD
   ═══════════════════════════════════════ */
.profile-card {
  background: var(--pf-surface); border-radius: var(--pf-radius);
  padding: 20px; border: 1px solid var(--pf-border);
  box-shadow: var(--pf-shadow); transition: box-shadow .25s;
}
.profile-card:hover { box-shadow: var(--pf-shadow-hover); }
.profile-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--pf-border); gap: 10px;
}
.profile-card-title {
  font-size: 15px; font-weight: 700; color: var(--pf-text);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.profile-card-title i.fa-duotone { --fa-primary-color: var(--pf-accent); --fa-secondary-color: #7dd3fc; --fa-secondary-opacity: 0.5; }
.profile-count {
  font-size: 12px; font-weight: 700; color: var(--pf-muted);
  background: var(--pf-soft); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--pf-border);
}

/* ═══════════════════════════════════════
   INFO LIST
   ═══════════════════════════════════════ */
.profile-info-list { display: flex; flex-direction: column; gap: 6px; }
.profile-info-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--pf-soft);
  border-radius: var(--pf-radius-sm); border: 1px solid transparent;
  transition: all .15s;
}
.profile-info-item:hover { border-color: var(--pf-border); background: var(--pf-soft-hover); }
.profile-info-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--pf-accent-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-info-icon i.fa-duotone { --fa-primary-color: var(--pf-accent); --fa-secondary-color: #7dd3fc; --fa-secondary-opacity: 0.5; font-size: 14px; }
.profile-info-content { flex: 1; min-width: 0; }
.profile-info-label { font-size: 10px; color: var(--pf-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; margin-bottom: 1px; }
.profile-info-value { font-size: 13px; font-weight: 600; color: var(--pf-text); word-break: break-word; }
.profile-info-value a { color: var(--pf-accent); text-decoration: none; font-weight: 700; }
.profile-info-value a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   FRIENDS GRID
   ═══════════════════════════════════════ */
.profile-friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.profile-friend-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border-radius: var(--pf-radius-sm);
  border: 1px solid var(--pf-border); background: var(--pf-surface);
  text-decoration: none; transition: all .15s; text-align: center;
}
.profile-friend-card:hover { border-color: rgba(14,165,233,0.3); box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-2px); }
.profile-friend-avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--pf-muted); flex-shrink: 0;
}
.theme-dark .profile-friend-avatar { background: linear-gradient(135deg, #1e293b, #334155); }
.profile-friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-friend-info { min-width: 0; width: 100%; }
.profile-friend-name { font-size: 12px; font-weight: 700; color: var(--pf-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-friend-nick { font-size: 10px; color: var(--pf-muted); font-weight: 500; }
.profile-empty-mini {
  grid-column: 1 / -1; text-align: center; padding: 20px 16px;
  color: var(--pf-muted); font-size: 13px;
  border: 1px dashed var(--pf-border); border-radius: var(--pf-radius-sm);
}

/* ═══════════════════════════════════════
   WALL
   ═══════════════════════════════════════ */
.profile-card--wall { position: relative; }
.wall-composer { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.wall-composer-top { display: flex; gap: 10px; }

.profile-form-input {
  padding: 10px 14px; border: 1.5px solid var(--pf-border);
  border-radius: var(--pf-radius-xs); font-size: 14px;
  color: var(--pf-text); background: var(--pf-surface);
  transition: all .15s; width: 100%; box-sizing: border-box;
  font-family: inherit; resize: vertical;
}
.profile-form-input:focus { outline: none; border-color: var(--pf-accent); box-shadow: 0 0 0 3px var(--pf-accent-soft); }
.theme-dark .profile-form-input { background: rgba(255,255,255,0.04); }

.profile-form-select {
  padding: 8px 12px; border: 1.5px solid var(--pf-border);
  border-radius: var(--pf-radius-xs); font-size: 13px; font-weight: 600;
  color: var(--pf-text); background: var(--pf-surface);
  font-family: inherit; cursor: pointer;
}

.wall-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wall-visibility-wrap { flex-shrink: 0; }

.profile-section-divider { height: 1px; background: var(--pf-border); margin: 12px 0; }
.wall-feed { display: flex; flex-direction: column; gap: 12px; }

.wall-post {
  border: 1px solid var(--pf-border); border-radius: var(--pf-radius-sm);
  background: var(--pf-surface); padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s;
}
.wall-post:hover { border-color: rgba(14,165,233,0.15); }

.wall-post-header { display: flex; align-items: center; gap: 10px; position: relative; }
.wall-post-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: var(--pf-muted);
  overflow: hidden; flex-shrink: 0; text-decoration: none;
}
.theme-dark .wall-post-avatar { background: linear-gradient(135deg, #1e293b, #334155); }
.wall-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wall-post-info { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; color: var(--pf-muted); }
.wall-post-author { font-weight: 700; color: var(--pf-text); text-decoration: none; font-size: 13px; }
.wall-post-author:hover { color: var(--pf-accent); }
.wall-post-nick { font-weight: 600; color: var(--pf-muted); font-size: 12px; }
.wall-post-time { color: var(--pf-dim); font-size: 11px; }
.wall-post-text { font-size: 14px; color: var(--pf-text); line-height: 1.6; }

.wall-repost-card {
  border: 1px dashed var(--pf-border); border-radius: var(--pf-radius-sm);
  padding: 12px; background: var(--pf-soft);
  display: flex; flex-direction: column; gap: 8px;
}
.wall-repost-header { display: flex; align-items: center; gap: 10px; }
.wall-repost-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; overflow: hidden; flex-shrink: 0;
  text-decoration: none; font-size: 13px; color: var(--pf-muted);
}
.theme-dark .wall-repost-avatar { background: linear-gradient(135deg, #1e293b, #334155); }
.wall-repost-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wall-repost-info { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; color: var(--pf-muted); }
.wall-repost-author { font-weight: 700; color: var(--pf-text); text-decoration: none; }
.wall-repost-nick { font-weight: 600; color: var(--pf-muted); }
.wall-repost-text { font-size: 13px; color: var(--pf-text); line-height: 1.5; }

.wall-post-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.wall-action {
  border: 1px solid var(--pf-border); background: var(--pf-soft);
  color: var(--pf-muted); border-radius: 999px;
  padding: 5px 12px; display: inline-flex; align-items: center; gap: 5px;
  font-weight: 600; font-size: 12px; cursor: pointer;
  transition: all .12s; font-family: inherit;
}
.wall-action:hover { transform: translateY(-1px); border-color: var(--pf-accent); color: var(--pf-accent); background: var(--pf-accent-soft); }
.wall-action.is-active { color: #ef4444; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
.wall-action-count { font-size: 11px; }

.wall-repost-form { display: none; flex-direction: column; gap: 8px; }
.wall-repost-form.is-open { display: flex; }
.wall-repost-actions { display: flex; gap: 8px; justify-content: flex-end; }

.wall-comments { display: none; border-top: 1px solid var(--pf-border); padding-top: 10px; gap: 8px; }
.wall-comments.is-open { display: flex; flex-direction: column; }
.wall-comments-list { display: flex; flex-direction: column; gap: 6px; }
.wall-comments-empty { color: var(--pf-muted); font-size: 13px; padding: 8px 0; }
.wall-comment { padding: 8px 10px; border-radius: var(--pf-radius-xs); background: var(--pf-soft); border: 1px solid var(--pf-border); }
.wall-comment-header { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--pf-muted); margin-bottom: 3px; }
.wall-comment-author { font-weight: 700; color: var(--pf-text); }
.wall-comment-nick { color: var(--pf-muted); }
.wall-comment-time { color: var(--pf-dim); }
.wall-comment-text { font-size: 13px; color: var(--pf-text); line-height: 1.5; }
.wall-comment-replies { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; padding-left: 12px; border-left: 2px solid var(--pf-border); }
.wall-comment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

/* Menu */
.wall-post-menu { position: relative; margin-left: auto; flex-shrink: 0; }
.wall-post-menu-btn {
  width: 30px; height: 30px; border: none; border-radius: 8px;
  background: transparent; color: var(--pf-muted); font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.wall-post-menu-btn:hover { background: var(--pf-soft); color: var(--pf-text); }
.wall-post-menu-dropdown {
  display: none; position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 140px; background: var(--pf-surface);
  border: 1px solid var(--pf-border); border-radius: var(--pf-radius-sm);
  box-shadow: var(--pf-shadow-heavy); z-index: 50; overflow: hidden;
  animation: pfMenuIn .12s ease;
}
@keyframes pfMenuIn { from { opacity: 0; transform: translateY(-4px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.wall-post-menu.is-open .wall-post-menu-dropdown { display: block; }
.wall-post-menu-item {
  width: 100%; padding: 8px 14px; border: none; background: transparent;
  color: var(--pf-text); font-size: 13px; font-weight: 500; text-align: left;
  cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .1s;
}
.wall-post-menu-item:hover { background: var(--pf-soft); }
.wall-post-menu-item.wall-post-delete-btn { color: #ef4444; }
.wall-post-menu-item.wall-post-delete-btn:hover { background: rgba(239,68,68,0.06); }
.wall-post-menu-item i { width: 14px; text-align: center; font-size: 12px; }
.theme-dark .wall-post-menu-dropdown { box-shadow: 0 8px 24px rgba(0,0,0,0.5); }

/* Inline edit */
.wall-post-edit-form {
  display: none; flex-direction: column; gap: 8px;
  padding: 10px 0 2px; border-top: 1px solid var(--pf-border); margin-top: 8px;
}
.wall-post-edit-form.is-open { display: flex; }
.wall-post-edit-input { resize: vertical; min-height: 60px; }
.wall-post-edit-actions { display: flex; gap: 8px; }

/* Empty */
.profile-empty { text-align: center; padding: 36px 20px; color: var(--pf-muted); }
.profile-empty-icon { font-size: 42px; margin-bottom: 10px; opacity: 0.3; }
.profile-empty h3 { margin: 0 0 4px; font-size: 15px; color: var(--pf-muted); font-weight: 700; }
.profile-empty p { margin: 0; font-size: 13px; }

/* ═══════════════════════════════════════
   NICE SELECT — Profile-scoped
   ═══════════════════════════════════════ */
.profile-page .nice-select { min-width: 140px; }
.profile-page .nice-select .ns-control {
  padding: 7px 12px;
  border: 1.5px solid var(--pf-border);
  border-radius: var(--pf-radius-xs);
  background: var(--pf-surface);
  color: var(--pf-text);
  font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: all .15s;
}
.profile-page .nice-select .ns-control:hover { border-color: rgba(14,165,233,0.3); }
.profile-page .nice-select.open .ns-control,
.profile-page .nice-select .ns-control:focus {
  border-color: var(--pf-accent); box-shadow: 0 0 0 3px var(--pf-accent-soft);
}
.profile-page .nice-select .ns-arrow { font-size: 10px; color: var(--pf-dim); transition: transform .2s; }
.profile-page .nice-select.open .ns-arrow { transform: rotate(180deg); }
.profile-page .nice-select .ns-dropdown {
  border: 1px solid var(--pf-border); border-radius: var(--pf-radius-sm);
  background: var(--pf-surface); box-shadow: var(--pf-shadow-heavy); z-index: 60;
}
.profile-page .nice-select .ns-option {
  padding: 8px 14px; font-size: 13px; font-weight: 500;
  color: var(--pf-text); cursor: pointer; transition: background .1s;
}
.profile-page .nice-select .ns-option:hover { background: var(--pf-accent-soft); color: var(--pf-accent); }
.profile-page .nice-select .ns-option.selected { background: var(--pf-accent-soft); color: var(--pf-accent); font-weight: 700; }
.profile-page .nice-select .ns-search {
  padding: 8px 12px; border: none; border-bottom: 1px solid var(--pf-border);
  font-size: 13px; color: var(--pf-text); background: transparent; width: 100%;
}
.profile-page .nice-select .ns-search:focus { outline: none; }

/* ═══════════════════════════════════════
   NOTIFICATION TOAST
   ═══════════════════════════════════════ */
.profile-notification {
  position: fixed; top: 18px; right: 18px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: var(--pf-radius-sm);
  border: 1px solid var(--pf-border); background: var(--pf-surface);
  color: var(--pf-text); box-shadow: var(--pf-shadow-heavy);
  opacity: 0; transform: translateY(-10px);
  transition: opacity .2s, transform .2s;
  font-size: 13px; font-weight: 600; backdrop-filter: blur(12px);
}
.profile-notification.show { opacity: 1; transform: translateY(0); }
.profile-notification.success { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.06); }
.profile-notification.danger, .profile-notification.error { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .profile-content { grid-template-columns: 1fr; }
  .profile-content-left { order: 2; }
  .profile-content-right { order: 1; }
}
@media (max-width: 640px) {
  .profile-page .container { padding: 0 12px 40px; }
  .profile-cover { height: 180px; }
  .profile-info-section { padding: 0 16px 20px; }
  .profile-avatar-wrapper { margin-top: -48px; }
  .profile-avatar { width: 100px; height: 100px; font-size: 36px; border-width: 3px; }
  .profile-name { font-size: 22px; }
  .profile-main-info { flex-direction: column; gap: 12px; }
  .profile-stats-bar { flex-wrap: nowrap; }
  .profile-stat-item { padding: 10px 12px; }
  .profile-stat-value { font-size: 15px; }
  .profile-stat-label { font-size: 9px; }
  .profile-card { padding: 16px; }
  .profile-friends-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
@media print {
  .profile-page { background: #fff; }
  .profile-card, .profile-header { box-shadow: none; border: 1px solid #ddd; }
  .profile-actions, .wall-composer, .wall-post-actions, .wall-post-menu { display: none !important; }
}

/* Animations */
@keyframes pfCardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
#profile-content .profile-header { animation: pfCardIn .4s var(--pf-ease) both; }
#profile-content .profile-stats-bar { animation: pfCardIn .4s var(--pf-ease) .05s both; }
#profile-content .profile-content { animation: pfCardIn .4s var(--pf-ease) .1s both; }

/* Hidden native select when NiceSelect active */
.ns-hidden-select { position: absolute !important; opacity: 0 !important; height: 0 !important; width: 0 !important; overflow: hidden !important; pointer-events: none !important; }


/* ═══════════════════════════════════════
   SETTINGS SHARED (account-settings.php)
   ═══════════════════════════════════════ */
.profile-settings-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; border-radius: var(--pf-radius-sm); border: 1px solid var(--pf-border); background: var(--pf-soft); margin-bottom: 20px; }
.profile-settings-tab { border: none; background: transparent; color: var(--pf-muted); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: var(--pf-radius-xs); cursor: pointer; transition: all .15s; }
.profile-settings-tab:hover { color: var(--pf-text); background: var(--pf-surface); }
.profile-settings-tab.active { color: var(--pf-text); background: var(--pf-surface); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.profile-settings-panel { display: none; }
.profile-settings-panel.active { display: block; }
.profile-settings-form { display: flex; flex-direction: column; gap: 24px; }
.profile-form-group { display: flex; flex-direction: column; gap: 8px; }
.profile-form-label { font-size: 14px; font-weight: 600; color: var(--pf-text); display: flex; align-items: center; gap: 8px; }
.profile-form-label i.fa-duotone { --fa-primary-color: var(--pf-accent); --fa-secondary-color: #7dd3fc; --fa-secondary-opacity: 0.5; }
.profile-inline-form { display: flex; gap: 8px; align-items: center; }
.profile-inline-form .profile-form-input { flex: 1; }
.profile-password-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-password-form .profile-form-input:first-child { grid-column: 1 / -1; }
.profile-password-form button { grid-column: 1 / -1; }

.account-settings-content { margin-top: 8px; display: flex; flex-direction: column; gap: 22px; }
.account-settings-content .profile-card { margin: 0; }
.account-settings-content .profile-card-header { margin-bottom: 16px; padding-bottom: 12px; }
.account-settings-content .profile-card-title { font-size: 18px; }
.account-settings-content .profile-card-title i.fa-duotone { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--pf-accent-soft); border: 1px solid rgba(14,165,233,0.2); }
.account-settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.settings-column { display: flex; flex-direction: column; gap: 20px; }
.settings-group { display: flex; flex-direction: column; gap: 14px; }
.settings-group-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--pf-muted); padding-left: 4px; }
.account-settings-grid { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-panel { display: flex; flex-direction: column; gap: 16px; }
.settings-form { display: flex; flex-direction: column; gap: 14px; }
.settings-grid { display: grid; gap: 12px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--pf-text); }
.account-settings-content .settings-row { padding: 0; border-radius: 0; border: none; background: transparent; }
.account-settings-content .settings-row span { font-weight: 600; }
.account-settings-content .settings-actions { margin-top: 10px; }
.settings-grid small { display: block; margin-top: 4px; font-size: 12px; color: var(--pf-muted); }
.account-settings-content .settings-block { gap: 0; border: 1px solid var(--pf-border); border-radius: 16px; padding: 6px 16px; background: var(--pf-soft); }
.account-settings-content .settings-block > div { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; }
.account-settings-content .settings-block > div + div { border-top: 1px solid var(--pf-border); }
.settings-actions { display: flex; align-items: center; gap: 12px; }
.quiet-hours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.notif-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(148,163,184,0.2); color: #475569; font-size: 12px; font-weight: 600; }
.notif-status:empty { display: none; }
.notif-status.success { background: rgba(16,185,129,0.16); color: #065f46; }
.notif-status.error { background: rgba(239,68,68,0.16); color: #991b1b; }
.notifications-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.account-settings-content .notifications-toolbar { padding: 12px 14px; border-radius: var(--pf-radius-sm); border: 1px solid var(--pf-border); background: var(--pf-soft); }
.settings-subgrid { gap: 10px; }
.settings-card { border: 1px solid var(--pf-border); border-radius: 16px; padding: 14px; background: var(--pf-soft); display: flex; flex-direction: column; gap: 12px; }
.settings-card-title { font-size: 14px; font-weight: 700; color: var(--pf-text); }
.filter-toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--pf-muted); }
.settings-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; border-radius: var(--pf-radius-sm); border: 1px dashed var(--pf-border); background: var(--pf-soft); color: var(--pf-muted); text-align: center; }
.notification-list { display: flex; flex-direction: column; gap: 12px; }
.notification-card { border: 1px solid var(--pf-border); border-radius: var(--pf-radius-sm); padding: 14px; background: var(--pf-surface); display: flex; flex-direction: column; gap: 10px; transition: all .12s; }
.notification-card.read { opacity: 0.7; }
.notification-card:hover { transform: translateY(-1px); border-color: rgba(14,165,233,0.4); box-shadow: 0 8px 18px rgba(14,165,233,0.12); }
.notification-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notification-title { font-weight: 700; color: var(--pf-text); font-size: 15px; }
.notification-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.notification-body { font-size: 14px; color: var(--pf-text); line-height: 1.4; }
.notification-actions { display: flex; align-items: center; gap: 8px; }
.session-list { display: flex; flex-direction: column; gap: 12px; }
.session-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--pf-border); border-radius: var(--pf-radius-sm); background: var(--pf-soft); }
.session-main { flex: 1; }
.session-title { font-size: 15px; font-weight: 700; color: var(--pf-text); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--pf-muted); }
.session-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e0f2fe; color: #0369a1; }
.session-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.session-empty { color: var(--pf-muted); font-size: 14px; }
.export-block { display: flex; flex-direction: column; gap: 14px; }
.export-description { margin: 0; color: var(--pf-muted); font-size: 14px; }
.danger-zone { display: flex; flex-direction: column; gap: 14px; }
.danger-note { margin: 0; color: var(--pf-muted); font-size: 14px; line-height: 1.5; }
.danger-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.account-compact .profile-card { padding: 18px; }
.account-compact .profile-card-header { margin-bottom: 14px; padding-bottom: 12px; }
.account-compact .session-item { padding: 12px; }
.account-compact .settings-grid { gap: 10px; }
.account-compact .notifications-toolbar { gap: 10px; }
.account-compact .profile-btn { padding: 8px 12px; font-size: 13px; }
.reduce-motion .profile-card, .reduce-motion .profile-btn, .reduce-motion .session-item, .reduce-motion .notification-card { transition: none; }
.avatar-message { display: none; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--pf-border); background: var(--pf-soft); color: var(--pf-text); font-weight: 600; font-size: 13px; }
.avatar-message.success { border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.12); }
.avatar-message.error { border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.12); }
.profile-cover-preview { min-height: 160px; border-radius: 16px; background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 35%, #38bdf8 65%, #22d3ee 100%); background-size: cover; background-position: center; display: flex; align-items: flex-start; justify-content: flex-end; padding: 12px; border: 1px solid var(--pf-border); }
.profile-avatar-settings { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile-avatar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-statistics { margin-top: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--pf-radius-sm); border: 1px solid var(--pf-border); background: var(--pf-soft); transition: all .12s; }
.stat-card:hover { transform: translateY(-1px); background: var(--pf-soft-hover); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.stat-icon { width: 46px; height: 46px; border-radius: var(--pf-radius-sm); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(148,163,184,0.25); background: rgba(148,163,184,0.12); flex-shrink: 0; font-size: 18px; }
.stat-icon-blue { background: rgba(14,165,233,0.14); border-color: rgba(14,165,233,0.25); color: #0284c7; }
.stat-icon-purple { background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.25); color: #7c3aed; }
.stat-icon-orange { background: rgba(249,115,22,0.14); border-color: rgba(249,115,22,0.25); color: #ea580c; }
.stat-icon-green { background: rgba(34,197,94,0.14); border-color: rgba(34,197,94,0.25); color: #16a34a; }
.stat-icon-teal { background: rgba(20,184,166,0.14); border-color: rgba(20,184,166,0.25); color: #0d9488; }
.stat-icon-pink { background: rgba(236,72,153,0.14); border-color: rgba(236,72,153,0.25); color: #db2777; }
.stat-content { flex: 1; min-width: 0; }
.stat-value { font-size: 18px; font-weight: 800; color: var(--pf-text); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--pf-muted); line-height: 1.35; }
.profile-premium-card { background: linear-gradient(135deg, #fef3c7, #fde68a); border: 2px solid #fbbf24; }
.profile-premium-info { display: flex; flex-direction: column; gap: 12px; }
.profile-premium-badge { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(255,255,255,0.8); border-radius: var(--pf-radius-xs); font-weight: 600; color: #92400e; }
.profile-premium-badge i.fa-duotone { --fa-primary-color: #f59e0b; --fa-secondary-color: #fbbf24; --fa-secondary-opacity: 0.6; font-size: 20px; }
.profile-premium-expires { font-size: 13px; color: #78350f; text-align: center; }
.theme-dark .profile-premium-card { background: linear-gradient(135deg, #78350f, #451a03); border-color: #92400e; }
.theme-dark .profile-premium-badge { background: rgba(2,6,23,0.35); color: #fcd34d; }
.theme-dark .profile-premium-expires { color: #fde68a; }
.profile-balance { color: var(--pf-text); font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--pf-soft); border: 1px solid var(--pf-border); font-size: 13px; }
#birthday-display-section { display: flex; align-items: center; gap: 12px; }
#birthday-display { font-size: 15px; font-weight: 600; color: var(--pf-text); }
