/* ==========================================================================
   ماژول استایل پنل‌های اجتماعی (پروفایل من، دوستان، حاضرین، درخواست‌ها، DM)
   متناظر با packages/web/public/ui/socialPanels.js
   ========================================================================== */

/* ---------- اعلان شناور دریافت درخواست دوستی ---------- */
.friend-req-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 26, 19, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(244, 201, 93, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 16px rgba(244, 201, 93, 0.2);
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1100;
  animation: slideDown .3s var(--ease-spring) both;
  max-width: 92vw;
}
@keyframes slideDown {
  0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.frt-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.frt-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #f1f5f9;
}
.frt-desc {
  font-size: 11.5px;
  color: #94a3b8;
}
.frt-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 4px;
}
.frt-btn {
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 6px 12px;
}
.frt-btn.accept {
  background: #10b981;
  color: #062316;
}
.frt-btn.accept:hover {
  background: #34d399;
}
.frt-btn.reject {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}
.frt-btn.reject:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

/* ---------- دکمه‌های وضعیت دوستی در کارت پروفایل ---------- */
.pc-action-btn.is-friend {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.pc-action-btn.is-friend:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}
.pc-action-btn.pending {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  cursor: default;
}
.pc-action-btn.accept-highlight {
  background: #10b981;
  color: #041a10;
  font-weight: 800;
  border: none;
}
.pc-action-btn.accept-highlight:hover {
  background: #34d399;
}

/* ---------- درخواست‌ها و دکمه‌های دعوت در پنل دوستان ---------- */
.fp-requests-wrap {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fp-sec-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
}
.fp-req-item {
  background: rgba(244, 201, 93, 0.06);
  border: 1px solid rgba(244, 201, 93, 0.2);
  border-radius: 10px;
  padding: 6px 8px;
}
.fp-req-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.fp-accept-btn {
  background: #10b981;
  color: #052215;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  cursor: pointer;
}
.fp-reject-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: none;
  font-family: inherit;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 8px;
  cursor: pointer;
}
.fp-inroom-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 8px;
}
.fp-invite-btn.highlight {
  background: rgba(91, 140, 255, 0.2);
  border: 1px solid rgba(91, 140, 255, 0.45);
  color: #93c5fd;
  font-weight: 700;
}
.fp-invite-btn.highlight:hover {
  background: #3b82f6;
  color: #fff;
}

/* ---------- پنل حاضرین ---------- */
.occupants-panel {
  position: fixed; top: 56px; right: 14px; width: 200px;
  background: rgba(10,18,14,.95); border: 1px solid var(--line);
  border-radius: 14px; z-index: 22; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  max-height: 0; opacity: 0; transition: max-height .25s ease, opacity .2s;
}
.occupants-panel.open { max-height: 360px; opacity: 1; }
.occ-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: rgba(255,255,255,.06);
  font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--line);
}
.occ-close { background: transparent; border: none; color: #9fb0c4; font-size: 14px; cursor: pointer; padding: 0; }
.occ-close:hover { color: #eaf2ec; }
.occ-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.occ-item.turn { background: rgba(244,201,93,.1); }
.occ-item.me { background: rgba(91,140,255,.1); }
.occ-item.watching { color: #7a8b8e; }
.occ-pos { color: #7a8b8e; font-size: 11px; min-width: 32px; }
.occ-name { flex: 1; }
.occ-badge { font-size: 10px; background: var(--gold); color: #2a1d00; border-radius: 8px; padding: 1px 6px; font-weight: 700; }

/* ---------- منوی سریعِ آواتار/نام: مشاهده پروفایل + پیام خصوصی ---------- */
.avatar-menu {
  background: rgba(10,18,14,.97); border: 1px solid var(--line);
  border-radius: 12px; padding: 5px;
  z-index: 60; box-shadow: 0 10px 32px rgba(0,0,0,.55);
  min-width: 160px;
  backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 2px;
}
.avatar-menu-item {
  display: block; width: 100%; text-align: right; padding: 8px 10px;
  background: transparent; border: none; border-radius: 8px;
  color: #e7efe9; font-size: 13px; font-family: inherit;
  cursor: pointer; transition: background .12s;
}
.avatar-menu-item:hover { background: rgba(91,140,255,.22); }

/* ---------- کارت پروفایل سریع ---------- */
.profile-card {
  background: linear-gradient(160deg,#101e18,#0c1812); border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px; padding: 16px; z-index: 40;
  box-shadow: 0 12px 36px rgba(0,0,0,.6);
  width: min(320px, 90vw);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column; gap: 12px;
  text-align: right;
}
/* هدر افقی: آواتار سمت راست + اطلاعات سمت چپ */
.pc-header {
  display: flex; align-items: flex-start; gap: 12px; direction: rtl;
}
.pc-header .seat-avatar { flex: none; width: 72px; height: 72px; font-size: 32px; }
.pc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.pc-user-meta { font-size: 11.5px; color: rgba(207,238,207,.65); }
.pc-close {
  position: absolute; top: 8px; left: 10px;
  background: transparent; border: none; color: #7a8b8e;
  font-size: 14px; cursor: pointer; line-height: 1;
}
.pc-close:hover { color: #eaf2ec; }
.profile-card { position: fixed; z-index: 9999; }
.pc-backdrop { position: fixed; inset: 0; background: rgba(4,10,7,.55); backdrop-filter: blur(2px); z-index: 9998; }

/* ═══ پیام خصوصی ═══ */
.dm-backdrop { position: fixed; inset: 0; background: rgba(4,10,7,.6); backdrop-filter: blur(3px); z-index: 600; }
.dm-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 60px));
  display: flex; flex-direction: column; z-index: 601;
  background: linear-gradient(180deg, #17241d, #101a14); border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; overflow: hidden; box-shadow: 0 26px 64px rgba(0,0,0,.6);
}
.dm-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.04);
}
.dm-peer { font-weight: 800; font-size: 14px; }
.dm-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.dm-msg { max-width: 82%; align-self: flex-start; margin-right: auto; margin-left: 0; }        /* دیگران سمتِ چپ */
.dm-msg.me { align-self: flex-end; margin-left: auto; margin-right: 0; }                    /* خودم سمتِ راست */
.dm-bub { display: inline-block; background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 12px; padding: 6px 11px; font-size: 13px; line-height: 1.55; color: #e7efe9; word-break: break-word; text-align: right; border-bottom-left-radius: 3px; }
.dm-msg.me .dm-bub { background: rgba(91,140,255,.18); border-color: rgba(91,140,255,.35); border-bottom-right-radius: 3px; border-bottom-left-radius: 12px; }
.dm-compose { flex: none; display: flex; gap: 7px; padding: 9px 11px; border-top: 1px solid var(--line); background: rgba(10,18,14,.96); }
.dm-compose .dm-input { flex: 1; min-width: 0; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 16px; padding: 8px 13px; font: inherit; font-size: 13px; color: #eaf2ec; }
.dm-compose .dm-input:focus { outline: none; border-color: rgba(91,140,255,.5); }

.fp-dm-btn { flex: none; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 9px; width: 30px; height: 28px; font-size: 14px; cursor: pointer; }
.fp-dm-btn:hover { background: rgba(91,140,255,.2); }
.pc-action-btn.dm-open-btn { background: rgba(91,140,255,.12); border-color: rgba(91,140,255,.35); }
/* نشانِ پیامِ نخوانده روی آیکونِ دوستان */
.tb-ic .dm-badge { background: #ff5a5a; color: #fff; }
.pc-name { font-weight: 700; font-size: 17px; margin: 0 0 2px; line-height: 1.25; }
.pc-grade { display: flex; align-items: center; gap: 5px; font-size: 12px; margin-bottom: 3px; flex-wrap: wrap; }
.pc-rank { color: var(--gold); font-weight: 700; }
.pc-stats2 { margin-top: 2px; font-size: 12px; }
.pc-grade-label { font-weight: 700; }
.pc-elo-num { color: rgba(207,238,207,.55); }
.pc-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 13px; color: #b9c6bd; margin-bottom: 2px; }
.pc-sep { opacity: .4; }
.pc-bio { font-size: 12px; color: #9fb0c4; font-style: italic; margin: 0; border-top: 1px solid var(--line); padding-top: 8px; }
/* ردیف دکمه‌های اکشن */
.pc-actions { display: flex; gap: 6px; }
.pc-action-btn {
  background: rgba(255,255,255,.08); border: 1px solid var(--line);
  color: #eaf2ec; border-radius: 10px; padding: 7px 10px;
  font-size: 12px; cursor: pointer; font-family: inherit;
  flex: 1; min-width: 0; text-align: center;
  transition: background .12s;
}
.pc-action-btn:hover { background: rgba(91,140,255,.28); }
.pc-action-btn.primary-sm {
  background: rgba(91,140,255,.2); border-color: rgba(91,140,255,.5); color: #8ab4ff;
}
.pc-action-btn.primary-sm:hover { background: rgba(91,140,255,.35); }

/* ---------- پنل پروفایل من ---------- */
.my-profile-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(340px, calc(100vw - 28px));
  max-height: calc(100dvh - 60px); display: flex; flex-direction: column;
  background: #151926; border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px; overflow: hidden; z-index: 501;
  box-shadow: 0 24px 64px rgba(0,0,0,.75);
}
.mp-backdrop { position: fixed; inset: 0; background: rgba(4,6,15,.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 500; }
.mp-body { overflow-y: auto; flex: 1; padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.mp-av-wrap { position: relative; cursor: pointer; border-radius: 50%; }
.mp-av-wrap .seat-avatar { width: 72px; height: 72px; font-size: 32px; transition: opacity .15s; }
.mp-av-wrap:hover .seat-avatar { opacity: .75; }
.mp-av-hint { position: absolute; bottom: 0; right: 0; background: linear-gradient(135deg, #f9dd8a, #f4c542); color: #1a1200; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.mp-username { font-weight: 800; font-size: 16px; color: #f2f3f6; }
.mp-grade-row { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.mp-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
.mp-stat { display: flex; flex-direction: column; align-items: center; background: rgba(0,0,0,.28); border-radius: 10px; padding: 8px 4px; }
.mp-stat b { font-size: 17px; font-weight: 800; color: #f2f3f6; }
.mp-stat span { font-size: 10px; color: #8b90a0; margin-top: 2px; }
.mp-stat.win b { color: #34d399; }
.mp-stat.loss b { color: #f87171; }
.mp-divider { width: 100%; border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 4px 0; }
.mp-label { font-size: 12px; color: #8b90a0; align-self: flex-start; font-weight: 700; }
.mp-bio-input { width: 100%; background: #1c2030; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; color: #f2f3f6; padding: 9px 12px; font: inherit; font-size: 13px; resize: none; box-sizing: border-box; }
.mp-bio-input:focus { outline: none; border-color: rgba(244,197,66,.5); }
.mp-save-btn {
  width: 100% !important;
  margin-top: 10px !important;
  background: linear-gradient(135deg, #f9dd8a, #f4c542 60%, #b8862a) !important;
  color: #1a1200 !important;
  font-weight: 800 !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
  box-shadow: 0 4px 14px rgba(244, 197, 66, 0.25) !important;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mp-save-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.mp-fields-box { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.mp-field-row { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.mp-field-row-split { display: flex; gap: 8px; width: 100%; }
.mp-field-col { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mp-field-label { font-size: 11.5px; color: #8b90a0; font-weight: 600; text-align: right; }
.mp-field-input {
  width: 100%; background: #1c2030; border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px; color: #f2f3f6; padding: 7px 10px; font: inherit;
  font-size: 12.5px; box-sizing: border-box;
}
.mp-field-input:focus { outline: none; border-color: rgba(244,197,66,.5); }
.mp-field-select {
  cursor: pointer;
  background-color: #1c2030;
}
.mp-field-select option {
  background: #151926;
  color: #f2f3f6;
}
.pc-user-meta {
  font-size: 11px;
  color: #8b90a0;
  margin-top: -2px;
  margin-bottom: 3px;
  font-weight: 500;
}

/* ---------- پنل دوستان — شیت یکپارچه و مدرن در مرکز صفحه (UX 2026 لوکس) ---------- */
.friends-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.friends-modal-overlay.hidden,
.friends-modal-overlay[hidden] {
  display: none !important;
}

.friends-panel {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  background: #151926;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(244, 201, 93, 0.1);
  overflow: hidden;
  position: relative;
  color: #f2f3f6;
  animation: modalPop 0.25s var(--ease-spring);
}

.fp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px 14px;
  background: linear-gradient(180deg, rgba(244, 201, 93, 0.06), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.fp-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fp-title-group h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #f2f3f6;
}
.fp-head-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(244, 201, 93, 0.4));
}
.fp-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a8adbd;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
}
.fp-close-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  transform: scale(1.05);
}

.fp-search-wrap {
  padding: 12px 18px;
  background: #12151f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.fp-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1c2030;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 7px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fp-search-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(244, 201, 93, 0.2);
}
.fp-search-box input {
  background: transparent;
  border: none;
  color: #f2f3f6;
  font-size: 13.5px;
  outline: none;
  width: 100%;
  font-family: inherit;
}
.fp-search-box input::placeholder {
  color: #717789;
}
.fp-search-ic {
  font-size: 14px;
  color: #8b90a0;
  flex-shrink: 0;
}
.fp-search-hint {
  font-size: 11.5px;
  color: var(--gold);
  padding: 2px 4px;
}
.fp-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.fp-requests-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(234, 179, 8, 0.06);
  border-bottom: 1px solid rgba(234, 179, 8, 0.18);
  flex-shrink: 0;
}
.fp-sec-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #f6d97a;
}
.fp-req-item {
  background: #1c2030 !important;
  border-color: rgba(234, 179, 8, 0.25) !important;
}
.fp-req-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}
.fp-accept-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.fp-accept-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.fp-reject-btn {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.fp-reject-btn:hover {
  background: rgba(239, 68, 68, 0.28);
}

.fp-list {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #1c2030;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  transition: all 0.16s ease;
}
.fp-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(244, 201, 93, 0.25);
  transform: translateY(-1px);
}
.fp-item.online {
  border-inline-start: 3px solid #10b981;
}
.fp-name-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.fp-name {
  font-size: 14px;
  font-weight: 700;
  color: #f2f3f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-name-link {
  cursor: pointer;
}
.fp-name-link:hover {
  color: var(--gold);
  text-decoration: underline;
}
.fp-status-text {
  font-size: 11px;
  color: #8b90a0;
}
.fp-item.online .fp-status-text {
  color: #34d399;
  font-weight: 600;
}
.fp-req-sub {
  font-size: 11px;
  color: #f6d97a;
}
.fp-dm-btn {
  background: rgba(244, 201, 93, 0.12);
  border: 1px solid rgba(244, 201, 93, 0.35);
  color: #f4c542;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
  font-family: inherit;
  margin-inline-start: auto;
}
.fp-dm-btn:hover {
  background: linear-gradient(135deg, #f4c542, #d4af37);
  color: #1a1200;
  box-shadow: 0 0 12px rgba(244, 201, 93, 0.4);
  transform: translateY(-1px);
}
.fp-invite-btn {
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.2), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(91, 140, 255, 0.4);
  color: #93c5fd;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: all 0.16s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fp-invite-btn:hover {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}
.fp-invite-btn.done {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  cursor: default;
}
.fp-invite-btn.pending {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  cursor: default;
}
.fp-invite-btn.highlight {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
}
.fp-inroom-tag {
  font-size: 11px;
  color: #8b90a0;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 6px;
}
.fr-av-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.fr-av-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #e53e3e;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 700;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid #142018;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  z-index: 4;
  pointer-events: none;
}
.fr-av-badge.sm {
  top: -2px;
  inset-inline-end: -2px;
  min-width: 11px;
  height: 11px;
  font-size: 7.5px;
  padding: 0 2px;
  border-width: 1px;
}
.fr-av-badge.hidden,
.fr-av-badge[hidden] {
  display: none !important;
}

/* ─── ویوِ پروفایلِ موبایل (فقط نمایش) + منوی کارتیِ ۳تایی ────────────────── */
.pf-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px 18px;
  background: #151926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.pf-edit {
  position: absolute; top: 12px; left: 12px;
  background: #1c2030; color: #e7e9f0;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px;
  padding: 6px 12px; font: 700 12px 'Vazirmatn', Tahoma, sans-serif; cursor: pointer;
  transition: all 0.15s;
}
.pf-edit:hover {
  background: #252b40;
  color: #fff;
}
.pf-av { display: flex; justify-content: center; }
.pf-av .seat-avatar { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); border: 2px solid rgba(244, 197, 66, 0.6); }
.pf-name { margin: 12px 0 4px; font: 700 18px 'Vazirmatn', Tahoma, sans-serif; color: #f2f3f6; }
.pf-grade { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 700; }
.pf-bio { margin: 8px 0 0; font-size: 12.5px; color: #8b90a0; line-height: 1.7; max-width: 34ch; }
.pf-sec {
  align-self: stretch; text-align: start;
  margin: 16px 2px 8px; font-size: 12px; font-weight: 700; color: #8b90a0;
}
.pf-grid { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pf-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 10px 4px 8px;
  background: #12151f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}
/* عدد با Vazirmatn (ارقامِ فارسیِ درست) — درشت و رنگی بر اساسِ معنا */
.pf-stat b {
  font: 800 22px/1.15 'Vazirmatn', Tahoma, sans-serif;
  font-variant-numeric: tabular-nums;
  color: #f2f3f6;
}
.pf-stat span { font-size: 10.5px; color: #8b90a0; }
.pf-stat.gold b { color: #f4c542; }
.pf-stat.win  b { color: #5eeab0; }
.pf-stat.loss b { color: #f87171; }
.pf-stat.warn b { color: #fbbf24; }

.pf-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pf-menu-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 78px; padding: 10px 4px;
  background: #1c2030;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px;
  color: #f2f3f6; text-decoration: none; cursor: pointer;
  font: 700 12px 'Vazirmatn', Tahoma, sans-serif;
  transition: all 0.15s ease;
}
.pf-menu-item svg { width: 24px; height: 24px; color: #f4c542; }
.pf-menu-item:hover, .pf-menu-item:active { background: #252b40; border-color: rgba(255, 255, 255, 0.18); }
.pf-menu-item.danger, .pf-menu-item.danger svg { color: #f27272; }
.pf-menu-badge {
  position: absolute; top: 6px; left: 8px;
  background: #ff4757; color: #fff; font-size: 10px; font-weight: 800;
  border-radius: 10px; padding: 1px 5px;
}

/* پنلِ ویرایش: آواتارِ مربعی وسط‌چین + راهنما */
.mp-av-caption { text-align: center; font-size: 11px; color: #8ea598; margin: 4px 0 12px; }
.mp-av-wrap { border-radius: 20px; margin: 6px auto 0; width: fit-content; }
.mp-av-wrap .seat-avatar { width: 78px; height: 78px; }
