/**
 * پنل مدیر رشته ورزشی — ورود + تخته اینفوگراف برنامه توسعه ورزشکار
 */

/* ── ورود ── */
.sda-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at 20% 15%, rgba(124,58,237,.16), transparent 55%), #f5f3fb;
}
.sda-login-card {
  background: #fff; border-radius: 22px; padding: 34px 30px; width: min(380px, 100%);
  box-shadow: 0 20px 50px rgba(124,58,237,.14); text-align: center;
}
.sda-login-icon { font-size: 42px; margin-bottom: 6px; }
.sda-login-card h1 { font-size: 18px; margin: 0 0 8px; }
.sda-login-sub { font-size: 12.5px; color: #6e6088; margin: 0 0 20px; line-height: 1.8; }
.sda-login-card .spa-field { text-align: right; margin-bottom: 12px; }
.sda-login-btn { width: 100%; margin-top: 6px; }
.sda-logout-btn { font-size: 12px; }

/* ── تخته اینفوگراف ── */
.sda-board-overlay {
  position: fixed; inset: 0; background: rgba(20,10,40,.55);
  z-index: 980; display: none; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 24px 14px;
}
.sda-board-overlay.is-open { display: flex; }
.sda-board-loading { color: #fff; font-weight: 700; margin-top: 80px; }

.sda-board-box {
  background: #fff; border-radius: 20px; width: min(760px, 100%); padding: 26px 24px 30px;
  position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.sda-board-close {
  position: absolute; top: 14px; left: 16px; border: none; background: none;
  font-size: 22px; line-height: 1; cursor: pointer; color: #6e6088;
}
.sda-board-headline { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.sda-board-headline h2 { margin: 0; font-size: 17px; }
.sda-status-field { min-width: 160px; margin: 0; }

/* چرخ (hub-and-spoke) */
.sda-wheel {
  position: relative; width: min(560px, 100%); aspect-ratio: 1; margin: 0 auto 22px;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  grid-template-areas:
    "coach doctor nutritionist"
    "legal hub academy"
    "psychologist fitness extra";
  gap: 8px;
}
.sda-wheel__svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.sda-wheel__line { stroke: rgba(124,58,237,.22); stroke-width: 2; stroke-dasharray: 5 5; }
.sda-wheel__line.is-filled { stroke: rgba(124,58,237,.55); stroke-dasharray: none; stroke-width: 2.5; }

.sda-hub {
  grid-area: hub; z-index: 1; border-radius: 16px;
  background: linear-gradient(135deg, #7c3aed, #d946ef); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px; text-align: center; box-shadow: 0 8px 24px rgba(124,58,237,.35);
}
.sda-hub__avatar { font-size: 26px; }
.sda-hub__name { font-size: 12.5px; font-weight: 800; margin-top: 4px; }
.sda-hub__meta { font-size: 10.5px; opacity: .85; margin-top: 2px; }

.sda-slot {
  z-index: 1; border-radius: 14px; padding: 8px 6px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; transition: transform .15s ease;
}
.sda-slot--coach { grid-area: coach; }
.sda-slot--doctor { grid-area: doctor; }
.sda-slot--nutritionist { grid-area: nutritionist; }
.sda-slot--legal { grid-area: legal; }
.sda-slot--academy { grid-area: academy; }
.sda-slot--psychologist { grid-area: psychologist; }
.sda-slot--fitness { grid-area: fitness; }

.sda-slot--empty {
  background: #fff; border: 1.5px dashed rgba(124,58,237,.3); color: #6e6088;
}
.sda-slot--empty:hover { transform: scale(1.04); border-color: #7c3aed; color: #7c3aed; }
.sda-slot__emoji { font-size: 20px; }
.sda-slot__label { font-size: 11px; font-weight: 700; }
.sda-slot__add { font-size: 10px; font-weight: 800; color: #7c3aed; }

.sda-slot--filled {
  background: #f5f3fb; border: 1.5px solid rgba(124,58,237,.25); cursor: default;
}
.sda-slot__name { font-size: 10.5px; font-weight: 800; color: #2a1750; }
.sda-slot__stats { font-size: 9px; color: #6e6088; line-height: 1.5; }
.sda-slot__actions { display: flex; gap: 4px; margin-top: 3px; }
.sda-slot__btn {
  font-size: 9.5px; font-weight: 700; padding: 3px 7px; border-radius: 7px;
  border: 1px solid rgba(124,58,237,.3); background: #fff; color: #7c3aed; cursor: pointer;
}
.sda-slot__btn--danger { border-color: rgba(239,68,68,.35); color: #ef4444; }

.sda-notes-field { margin-top: 4px; }

/* مودال افزودن/ویرایش نیاز */
.sda-need-modal {
  position: fixed; inset: 0; background: rgba(20,10,40,.6);
  z-index: 990; display: none; align-items: center; justify-content: center; padding: 16px;
}
.sda-need-modal.is-open { display: flex; }
.sda-need-box {
  background: #fff; border-radius: 18px; width: min(420px, 100%); padding: 22px;
  position: relative; max-height: 90vh; overflow-y: auto;
}
.sda-need-box h3 { margin: 0 0 14px; font-size: 15px; }

@media (max-width: 640px) {
  .sda-wheel { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .sda-slot__stats { display: none; }
  .sda-hub__meta { display: none; }
}

/* ── نمای فقط‌خواندنی «برنامه توسعه من» (پروفایل ورزشکار) ── */
[data-hub-back][hidden] { display: none !important; }
.sda-slot--readonly { cursor: default; }
.sda-slot--readonly:hover { transform: none; border-color: rgba(124,58,237,.3); color: #6e6088; }
.vs-myprogram-status { font-size: 13px; font-weight: 700; color: #2a1750; margin-bottom: 14px; text-align: center; }
.vs-myprogram-notes { font-size: 12.5px; color: #6e6088; margin-top: 16px; line-height: 1.9; background: #f5f3fb; border-radius: 12px; padding: 10px 14px; }

/* ── حسابداری هوشمند ورزش ── */
.sda-acc-wrap { display: flex; flex-direction: column; gap: 20px; max-width: 720px; margin: 0 auto; }
.sda-acc-box { background: #fff; border: 1px solid rgba(124,58,237,.15); border-radius: 16px; padding: 18px 20px; }
.sda-acc-box h3 { margin: 0 0 8px; font-size: 15px; color: #2a1750; }
.sda-acc-hint { font-size: 12px; color: #6e6088; line-height: 1.8; margin: 0 0 12px; }
.sda-acc-box textarea { width: 100%; resize: vertical; font-family: inherit; }

.sda-acc-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: none; padding: 0; margin: 0 0 8px; cursor: pointer; text-align: right; font: inherit;
}
.sda-acc-toggle span:first-child { font-size: 15px; font-weight: 800; color: #2a1750; }
.sda-acc-toggle small { font-weight: 400; color: #6e6088; }
.sda-acc-toggle__chevron { font-size: 14px; color: #7c3aed; transition: transform .15s ease; }

.sda-acc-dim-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }

.sda-acc-draft { margin-top: 16px; border: 1.5px dashed rgba(124,58,237,.3); border-radius: 12px; padding: 14px 16px; background: #f9f7ff; }
.sda-acc-draft__head { font-weight: 800; font-size: 13.5px; color: #2a1750; display: flex; align-items: center; gap: 8px; }
.sda-acc-draft__note { font-size: 12px; color: #6e6088; margin: 6px 0 10px; }
.sda-acc-resolve { font-size: 11.5px; border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; line-height: 1.7; }
.sda-acc-resolve--ok { background: #dcfce7; color: #166534; }
.sda-acc-resolve--warn { background: #fef3c7; color: #92400e; }
.sda-acc-draft__actions { display: flex; gap: 8px; margin-top: 12px; }

.sda-acc-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
.sda-acc-table th { text-align: right; color: #6e6088; font-weight: 700; padding: 6px 8px; border-bottom: 1.5px solid rgba(124,58,237,.15); }
.sda-acc-table td { padding: 7px 8px; border-bottom: 1px solid rgba(124,58,237,.08); }
.sda-acc-num { font-family: monospace; font-weight: 700; color: #2a1750; }

.sda-acc-badge { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 8px; }
.sda-acc-badge--draft { background: #fef3c7; color: #92400e; }
.sda-acc-badge--ok    { background: #dcfce7; color: #166534; }
.sda-acc-badge--wait  { background: #e0f2fe; color: #075985; }
.sda-acc-badge--off   { background: #fee2e2; color: #991b1b; }

.sda-acc-list { display: flex; flex-direction: column; gap: 6px; }
.sda-acc-list[hidden] { display: none; }
.sda-acc-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: #f8fafc; font-size: 12.5px; cursor: pointer; transition: background .15s; }
.sda-acc-row:hover { background: #f0ebfd; }
.sda-acc-row__label { flex: 1 1 auto; font-weight: 600; color: #2a1750; }
.sda-acc-row__amount { font-family: monospace; color: #475569; }
.sda-acc-empty { text-align: center; color: #94a3b8; font-size: 12.5px; padding: 20px 0; }

/* ── مودال جزئیات سند ── */
.sda-acc-modal-overlay { position: fixed; inset: 0; background: rgba(20,10,40,.55); z-index: 995; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 14px; }
.sda-acc-modal { background: #fff; border-radius: 18px; width: min(560px, 100%); padding: 22px 24px 26px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.sda-acc-modal__close { position: absolute; top: 12px; left: 14px; border: none; background: none; font-size: 18px; color: #6e6088; cursor: pointer; }
.sda-acc-loading { text-align: center; color: #94a3b8; font-size: 12.5px; padding: 30px 0; }

.sda-acc-detail__head { font-weight: 800; font-size: 14.5px; color: #2a1750; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-left: 20px; }
.sda-acc-detail__section { margin-bottom: 16px; }
.sda-acc-detail__section > b { display: block; font-size: 12px; color: #7c3aed; margin-bottom: 6px; }
.sda-acc-quote { background: #f5f3fb; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #2a1750; line-height: 1.8; }
.sda-acc-hint { font-size: 12px; color: #6e6088; line-height: 1.8; margin-top: 4px; }
.sda-acc-detail__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11px; color: #94a3b8; border-top: 1px dashed rgba(124,58,237,.15); padding-top: 12px; }

/* ── چت تالار نخبگان (ادمین) ── */
.sda-elite-chat__thread { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #f8fafc; border-radius: 12px; margin: 10px 0; }
.sda-elite-chat__msg { max-width: 78%; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.7; }
.sda-elite-chat__msg--me { align-self: flex-start; background: #7c3aed; color: #fff; border-bottom-left-radius: 3px; }
.sda-elite-chat__msg--them { align-self: flex-end; background: #fff; border: 1px solid rgba(124,58,237,.15); color: #2a1750; border-bottom-right-radius: 3px; }
.sda-elite-chat__time { font-size: 9.5px; opacity: .65; margin-top: 3px; }
.sda-elite-chat__composer { display: flex; gap: 8px; }
.sda-elite-chat__composer input { flex: 1 1 auto; padding: 9px 12px; border-radius: 10px; border: 1.5px solid rgba(124,58,237,.2); font-family: inherit; }

/* ── ماژول کامل حسابداری ERP (mounted) ── */
.sda-acc-full { max-width: 1200px; margin: 28px auto 0; }
.sda-acc-full__title { font-size: 15px; color: #2a1750; margin: 0 0 6px; }
.sda-acc-full .bv-hdr { display: none !important; } /* هدر عمومی ماژول با تاپ‌بار پنل ورزش تکراری است */
