/* ═══════════════════════════════════════════════════════════
   نظام النادي الصيفي - تنسيقات برنامج التنافس بين المجموعات
   ═══════════════════════════════════════════════════════════ */

/* أيقونة الشريط الجانبي */
.sidebar-item-competition i { color: #FFB703; }

/* بطاقة هوية البرنامج في لوحة الإدارة */
.comp-admin-hero {
  background: linear-gradient(135deg, rgba(255,183,3,0.10), rgba(58,134,255,0.08));
  border: 1px solid rgba(255,183,3,0.25);
}
.comp-admin-icon {
  width: 64px; height: 64px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: #fff;
  background: linear-gradient(135deg, #FFB703, #FB5607);
  box-shadow: 0 8px 20px rgba(251,86,7,0.30);
  flex-shrink: 0;
}

/* لافتة المشرف */
.comp-hero-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; margin-bottom: 20px;
  border-radius: var(--radius-lg, 16px); color: #fff;
  background: linear-gradient(135deg, #3A86FF, #8338EC);
  box-shadow: 0 10px 24px rgba(58,134,255,0.28);
}
.comp-hero-icon {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; background: rgba(255,255,255,0.18);
}

/* لوحة الصدارة المصغّرة (حسب المرحلة) */
.comp-stage-board { margin-bottom: 18px; }
.comp-stage-board:last-child { margin-bottom: 0; }
.comp-stage-title {
  font-weight: 800; font-size: 0.95rem; margin-bottom: 8px;
  color: var(--color-primary, #0077B6);
  padding-bottom: 6px; border-bottom: 2px dashed var(--border-color, #e2e8f0);
}
.comp-stage-title i { margin-left: 6px; }
.comp-board-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; margin-bottom: 6px;
  background: var(--bg-secondary, #f8fafc);
}
.comp-board-rank { width: 28px; text-align: center; font-weight: 800; }
.comp-board-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.comp-board-name { flex: 1; font-weight: 600; }
.comp-board-pts {
  font-weight: 800; color: var(--orange, #FB5607);
  background: rgba(251,86,7,0.10); padding: 2px 10px; border-radius: 20px;
}

/* الصدارة التفصيلية */
.comp-detailed-stage { margin-bottom: 22px; }
.comp-detailed-stage:last-child { margin-bottom: 0; }
.comp-detailed-stage-title {
  font-weight: 800; margin: 0 0 10px;
  color: var(--color-primary, #0077B6);
}
.comp-detailed-stage-title i { margin-left: 6px; }

/* نافذة الرصد */
.comp-score-panel { padding: 2px; }
.comp-score-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 14px; margin-bottom: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--g-color, #0077B6) 14%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--g-color, #0077B6) 30%, transparent);
}
.comp-score-badge {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem;
}
.comp-score-head-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.comp-score-head-info strong { font-size: 1.1rem; }
.comp-score-stage { font-size: 0.82rem; color: var(--text-secondary, #64748b); }
.comp-score-stage i { margin-left: 4px; }
.comp-score-total { text-align: center; }
.comp-score-total span { display: block; font-size: 1.6rem; font-weight: 900; color: var(--orange, #FB5607); }
.comp-score-total small { font-size: 0.72rem; color: var(--text-secondary, #64748b); }

.comp-act-section {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.comp-act-title {
  font-weight: 800; font-size: 0.9rem; margin-bottom: 8px;
  color: var(--act-color, #333);
}
.comp-act-title i { margin-left: 6px; }
.comp-item-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.comp-item-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 8px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--border-color, #e2e8f0); background: var(--bg-secondary, #f8fafc);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  font-family: inherit; text-align: center;
}
.comp-item-btn i { font-size: 1.1rem; }
.comp-item-btn .comp-item-label { font-size: 0.8rem; font-weight: 600; line-height: 1.3; }
.comp-item-btn .comp-item-pts { font-weight: 800; font-size: 0.85rem; }
.comp-item-btn.bonus { color: #047857; }
.comp-item-btn.bonus:hover { border-color: #10b981; box-shadow: 0 6px 14px rgba(16,185,129,0.18); transform: translateY(-2px); }
.comp-item-btn.deduct { color: #b91c1c; }
.comp-item-btn.deduct:hover { border-color: #ef4444; box-shadow: 0 6px 14px rgba(239,68,68,0.18); transform: translateY(-2px); }
.comp-item-btn.scored { opacity: 0.55; transform: scale(0.96); }
.comp-item-btn:disabled { cursor: default; }

.comp-score-feed { margin-top: 6px; }
.comp-toast-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; margin-bottom: 6px;
  font-size: 0.88rem; font-weight: 600; animation: fadeIn .2s ease;
}
.comp-toast-row.pos { background: rgba(16,185,129,0.12); color: #047857; }
.comp-toast-row.neg { background: rgba(239,68,68,0.12); color: #b91c1c; }
.comp-toast-row strong { margin-right: auto; }

@media (max-width: 640px) {
  .comp-item-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
