
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');
:root{
  --gold:#F6A400; --blue:#0057A8; --red:#E73535; --text:#132033;
}
*{box-sizing:border-box}
body{
  margin:0;font-family:'Tajawal',Arial,sans-serif;color:var(--text);
  background:radial-gradient(circle at 20% 15%,rgba(214,179,90,.28),transparent 26%),
  radial-gradient(circle at 85% 10%,rgba(37,99,235,.24),transparent 25%),
  linear-gradient(135deg,#01264a,#003f78);min-height:100vh;
}
.app-shell{width:min(1100px,94vw);margin:auto;padding:28px 0 50px}
.hero{text-align:center;color:white;padding:30px 16px}
.brand{display:inline-block;color:var(--gold);font-weight:900;border:1px solid rgba(214,179,90,.6);padding:8px 18px;border-radius:999px;margin-bottom:12px}
.hero h1{font-size:clamp(34px,5vw,58px);margin:0;font-weight:900}
.hero p{color:rgba(255,255,255,.78);font-size:20px}
.main-nav{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  width:min(760px,100%);
  margin:20px auto 0;
  direction:rtl;
}
.main-nav .nav-btn{
  width:100%;
  margin:0;
  min-height:54px;
  padding:10px 8px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:16px;
  line-height:1.2;
  background:rgba(255,255,255,.12);
  color:#fff;
  border:1px solid rgba(214,179,90,.45);
  box-shadow:0 12px 28px rgba(0,0,0,.18);
  backdrop-filter:blur(8px);
}
.main-nav .nav-btn:hover{
  background:linear-gradient(135deg,var(--gold),#b98b24);
  color:#111;
  transform:translateY(-1px);
}
.main-nav .nav-icon{
  width:28px;
  height:28px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  background:rgba(255,255,255,.18);
  font-size:17px;
  flex:0 0 auto;
}
@media(max-width:480px){
  .main-nav{grid-template-columns:repeat(2, minmax(0, 1fr));gap:7px;margin-top:16px}
  .main-nav .nav-btn{
    min-height:50px;
    padding:9px 4px;
    font-size:13px;
    border-radius:14px;
    gap:4px;
  }
  .main-nav .nav-icon{
    width:24px;
    height:24px;
    font-size:15px;
  }
}

.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.card{background:rgba(255,255,255,.96);border-radius:24px;padding:24px;box-shadow:0 24px 70px rgba(0,0,0,.28);margin-bottom:20px}
.full-card{margin-top:20px}
label{display:block;margin-top:14px;font-weight:800}
input{width:100%;padding:13px 14px;border:1px solid #d1d5db;border-radius:14px;font-size:18px;margin-top:7px;font-family:inherit}
button{width:100%;margin-top:18px;padding:14px 18px;border:none;border-radius:16px;font-family:inherit;font-size:18px;font-weight:900;background:linear-gradient(135deg,var(--gold),#b98b24);color:#111;cursor:pointer}
button:disabled{background:#9ca3af;color:#fff;cursor:not-allowed}
.match-card{background:#fff;border:1px solid rgba(214,179,90,.45);border-radius:20px;padding:20px;text-align:center;margin-bottom:18px}
.round{color:var(--blue);font-weight:900;font-size:18px}
.teams{font-size:30px;font-weight:900;margin:10px 0}
.teams span{color:var(--gold)}
.meta{color:#6b7280}
.timer{display:inline-block;margin-top:12px;padding:10px 16px;border-radius:999px;background:rgba(214,179,90,.18);border:1px solid rgba(214,179,90,.55);font-weight:900}
.timer.started{font-size:24px;background:#dcfce7;color:#166534;border-color:#86efac}
.timer.finished{font-size:24px;background:#fee2e2;color:#991b1b;border-color:#fca5a5;animation:none}
.result{margin-top:14px;padding:14px;border-radius:16px;background:#eff6ff;border:1px solid #bfdbfe;color:#1d4ed8;font-size:20px;font-weight:900}
.score-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.message,.notice{padding:14px 16px;border-radius:14px;margin-top:12px;text-align:center;font-weight:700;font-size:14px;animation:fadeInMsg .3s ease}
@keyframes fadeInMsg{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
.ok,.good{background:#f0fdf4;color:#166534;border:1.5px solid #bbf7d0}
.bad{background:#fff1f2;color:#991b1b;border:1.5px solid #fecdd3}
.notice{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.rank-box{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;padding:16px;border-radius:16px;line-height:2}
.table-wrap{overflow-x:auto;margin-top:12px}
table{width:100%;border-collapse:collapse}
th,td{border-bottom:1px solid #e5e7eb;padding:10px;text-align:right}
.badges{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.badge-card{padding:14px;border-radius:16px;background:linear-gradient(135deg,rgba(214,179,90,.22),rgba(37,99,235,.08));border:1px solid rgba(214,179,90,.45);font-weight:900}
.badge-card span{display:block;margin-top:6px;color:#4b5563;font-size:13px}
footer{text-align:center;color:rgba(255,255,255,.78);font-weight:800;margin-top:28px;padding:18px}
@media(max-width:820px){.grid{grid-template-columns:1fr}.teams{font-size:26px}}


.team-with-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  vertical-align: middle;
}

.team-with-flag img {
  width: 32px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 7px rgba(0,0,0,.18);
}

.result .team-with-flag {
  margin: 0 6px;
}

td .team-with-flag {
  justify-content: flex-start;
}


.badge-card {
  position: relative;
  text-align: center;
  min-height: 138px;
}

.badge-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(135deg, #fff7d6, #d6b35a);
  box-shadow: 0 10px 24px rgba(214,179,90,.25);
  border: 1px solid rgba(214,179,90,.65);
}

.badge-card.locked {
  opacity: .78;
  background: #f9fafb;
  border-color: #e5e7eb;
}

.badge-card.locked .badge-icon {
  background: linear-gradient(135deg, #f3f4f6, #d1d5db);
  box-shadow: none;
}

.badge-card small {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}


/* تحسين حجم أسماء المنتخبات والأعلام للجوال والآيباد والكمبيوتر */
.teams {
  font-size: clamp(18px, 3.2vw, 26px) !important;
  line-height: 1.5;
  gap: 8px;
}

.team-with-flag {
  gap: 6px !important;
}

.team-with-flag img {
  width: clamp(24px, 4vw, 32px) !important;
  height: auto !important;
  max-height: 22px;
}

.score-row input {
  font-size: clamp(15px, 3.5vw, 18px);
}

.match-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(0,0,0,.16);
}

.timer.started {
  animation: kickoffPulse 1.4s ease-in-out infinite;
}

@keyframes kickoffPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 0 rgba(22,101,52,0); }
  50% { transform: scale(1.03); box-shadow: 0 0 22px rgba(22,101,52,.25); }
}

.progress-card {
  margin-bottom: 20px;
}

.progress-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.progress-bar {
  height: 14px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-bar div {
  height: 100%;
  background: linear-gradient(135deg, var(--gold), #b98b24);
  border-radius: 999px;
  transition: width .3s ease;
}

.crowd-stats {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat-card {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.stat-card span {
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .match-card {
    padding: 16px;
  }

  .teams {
    font-size: 18px !important;
    flex-direction: column;
  }

  .teams > span:not(.team-with-flag) {
    font-size: 22px;
  }

  .team-with-flag img {
    width: 24px !important;
  }

  .score-row {
    gap: 10px;
  }

  .score-row input {
    padding: 12px 10px;
  }

  .crowd-stats {
    font-size: 13px;
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  .teams {
    font-size: 22px !important;
  }

  .team-with-flag img {
    width: 28px !important;
  }
}


.logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 14px;
}

.worldcup-logo {
  width: min(145px, 34vw);
  height: auto;
  display: block;
  border-radius: 18px;
  filter: drop-shadow(0 18px 32px rgba(0,0,0,.42));
}

@media (max-width: 820px) {
  .worldcup-logo {
    width: min(118px, 38vw);
  }
}


.crowd-title {
  font-weight: 900;
  color: #111827;
  margin-bottom: 10px;
}

.percent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 14px;
}

.percent-row strong {
  color: #1d4ed8;
  font-size: 15px;
}

.mini-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 5px;
}

.mini-bar div {
  height: 100%;
  background: linear-gradient(135deg, #d6b35a, #b98b24);
  border-radius: 999px;
}

.mini-bar.draw div {
  background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.mini-bar.team-b div {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.popular-score {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
}


/* سجل توقعاتي: بدون أعلام وبحالات ملونة */
.plain-team-name {
  font-weight: 800;
  color: #111827;
}

.status-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}

.status-not-started {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-live {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.status-ended {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-half-time {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-muted {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

@media (max-width: 820px) {
  #dashboard table {
    font-size: 12px;
  }

  #dashboard th,
  #dashboard td {
    padding: 8px 6px;
  }

  .status-pill {
    font-size: 12px;
    padding: 5px 9px;
  }

  .plain-team-name {
    font-size: 12px;
  }
}


.admin-match-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
  margin-top: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.admin-match-card strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: #111827;
}

.admin-match-card small {
  display: block;
  color: #6b7280;
  margin-top: 4px;
}

.suggested-result {
  margin-top: 10px;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1d4ed8;
  font-weight: 800;
}


.app-toast-message {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(30px);
  z-index: 99999;
  max-width: min(92vw, 420px);
  padding: 14px 18px;
  border-radius: 18px;
  text-align: center;
  font-weight: 900;
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}

.app-toast-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast-message.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.app-toast-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (max-width: 820px) {
  .app-toast-message {
    bottom: 22px;
    font-size: 15px;
    padding: 13px 16px;
  }
}


/* بطاقتي المطورة */
#myCard {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.mycard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(214,179,90,.22), rgba(37,99,235,.12));
  border-radius: 18px;
}

.mycard-welcome {
  font-size: 20px;
  font-weight: 900;
  color: #111827;
}

.mycard-sub {
  color: #4b5563;
  font-weight: 700;
  margin-top: 3px;
}

.mycard-rank {
  min-width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), #b98b24);
  color: #111;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(214,179,90,.28);
}

.mycard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  align-items: stretch;
}

.mycard-stat-item {
  min-width: 0;
  min-height: 128px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe5f0;
  border-radius: 16px;
  padding: 14px 8px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 8px 20px rgba(15, 52, 96, .07);
}

.mycard-stat-number {
  display: block;
  width: 100%;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
  color: #075ea8;
  font-weight: 900;
  text-align: center;
  direction: ltr;
  unicode-bidi: isolate;
}

.mycard-stat-title {
  display: block;
  width: 100%;
  margin-top: 10px;
  color: #26364a;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
  text-align: center;
}

.mycard-stat-description {
  display: block;
  width: 100%;
  min-height: 18px;
  margin-top: 5px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}


.mycard-movement {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 900;
}

.mycard-movement small {
  display: block;
  margin-top: 5px;
  font-weight: 800;
  opacity: .8;
}

.move-up {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.move-down {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.move-same {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.mycard-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mycard-badges span {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 900;
}

.mycard-next {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  color: #374151;
  font-weight: 800;
}

.mycard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.mycard-actions button {
  margin-top: 0;
  padding: 11px 12px;
  font-size: 14px;
}

@media (max-width: 820px) {
  .mycard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mycard-stat-item {
    min-height: 122px;
    padding: 13px 8px 11px;
  }

  .mycard-stat-number {
    font-size: 30px;
  }

  .mycard-stat-title {
    font-size: 13px;
  }

  .mycard-welcome {
    font-size: 18px;
  }

  .mycard-rank {
    min-width: 58px;
    height: 58px;
    font-size: 21px;
  }
}


.top-three-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.top-three-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}

.top-three-card .medal {
  font-size: 30px;
}

.top-three-card strong {
  display: block;
  font-weight: 900;
}

.top-three-card span {
  color: #6b7280;
  font-weight: 800;
  font-size: 13px;
}

.top-three-card small {
  margin-inline-start: auto;
  font-weight: 900;
  color: #1d4ed8;
}

.report-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.report-actions button {
  margin-top: 0;
}

.certificate {
  margin-top: 16px;
  background: linear-gradient(135deg, #fff7d6, #ffffff);
  border: 3px solid #d6b35a;
  border-radius: 28px;
  padding: 28px;
  text-align: center;
  color: #111827;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

.cert-logo {
  font-size: 54px;
}

.certificate h2 {
  color: #b98b24;
  font-size: 34px;
}

.certificate h1 {
  font-size: 42px;
  margin: 10px 0;
}

.cert-footer {
  margin-top: 22px;
  color: #6b7280;
  font-weight: 800;
}

@media print {
  body * { visibility: hidden; }
  .certificate, .certificate * { visibility: visible; }
  .certificate { position: fixed; inset: 0; margin: auto; box-shadow: none; }
  .certificate button { display: none; }
}

@media (max-width: 820px) {
  .top-three-box {
    grid-template-columns: 1fr;
  }
}








/* FINAL CLEAN CERTIFICATE CSS */
.certificate-actions {
  margin-top: 18px;
}

.cert-bg-wrap {
  position: relative;
  width: 1120px;
  max-width: 100%;
  margin: 20px auto;
  direction: rtl;
  text-align: center;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  background: #fff;
}

.cert-bg-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* الاسم: تم إنزاله قليلًا وتصغير الخط درجتين */
.cert-name-overlay {
  position: absolute;
  top: 45.8%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52%;
  text-align: center;
  font-size: clamp(18px, 2.45vw, 34px);
  line-height: 1.1;
  font-weight: 900;
  color: #061b3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 0 rgba(255,255,255,.42);
  z-index: 5;
}

/* المركز: رفع كلمة الأول قليلًا لتتوسط داخل الشريط الذهبي */
.cert-rank-word-overlay {
  position: absolute;
  top: 62.90%;
  left: 42.7%;
  transform: translate(-50%, -50%);
  width: 20%;
  text-align: center;
  font-size: clamp(17px, 2.35vw, 32px);
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 3px 8px rgba(0,0,0,.32);
  z-index: 5;
}

/* إخفاء أي عناصر قديمة من الإصدارات السابقة */
.cert-rank-overlay,
.cert-phrase-overlay {
  display: none !important;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 5mm;
  }

  html, body {
    width: 297mm;
    height: 210mm;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  body * {
    visibility: hidden !important;
  }

  #winnerCertificate,
  #winnerCertificate * {
    visibility: visible !important;
  }

  #winnerCertificate {
    position: fixed !important;
    left: 5mm !important;
    top: 5mm !important;
    right: auto !important;
    bottom: auto !important;
    width: 287mm !important;
    max-width: 287mm !important;
    max-height: 200mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #winnerCertificate .cert-bg-img {
    width: 100% !important;
    height: auto !important;
    max-height: 200mm !important;
    object-fit: contain !important;
  }

  .no-print,
  .certificate-actions {
    display: none !important;
  }
}


/* Fixed date display readability */
.match-date,
.date-text,
.prediction-date {
  direction: ltr;
  unicode-bidi: plaintext;
  white-space: nowrap;
}


/* Keep percentage numbers in the correct left-to-right order inside Arabic RTL text */
.percent-value{
  direction:ltr;
  unicode-bidi:isolate;
  display:inline-block;
  white-space:nowrap;
}


/* Patch: clearer prediction/result display and leaderboard badges */
.score-team-line{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  direction:ltr;
  min-width:220px;
}
.score-team-line strong{
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
  border-radius:999px;
  padding:4px 10px;
  font-weight:900;
  white-space:nowrap;
}
.muted-text{color:#6b7280;font-size:13px}
.leaderboard-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  background:linear-gradient(135deg,rgba(214,179,90,.22),rgba(37,99,235,.08));
  border:1px solid rgba(214,179,90,.45);
  border-radius:999px;
  padding:5px 8px;
  font-size:12px;
  font-weight:800;
  margin:2px;
  white-space:nowrap;
}
.manual-match-info{margin:10px 0}
.manual-preview .suggested-result{line-height:1.8}
@media(max-width:600px){
  .score-team-line{min-width:180px;font-size:12px}
  .score-team-line strong{padding:3px 8px}
  .leaderboard-badge{font-size:11px;padding:4px 6px}
}


.participant-greeting{
  width:min(760px,100%);
  margin:0 auto 18px;
  padding:16px 18px;
  border-radius:22px;
  background:linear-gradient(135deg,rgba(25,113,229,.16),rgba(214,169,53,.16));
  border:1px solid rgba(214,169,53,.38);
  color:#fff;
  font-size:19px;
  font-weight:900;
  text-align:center;
  box-shadow:0 18px 45px rgba(0,0,0,.18);
}
.terms-card{
  max-width:820px;
  margin:0 auto 20px;
  text-align:right;
}
.terms-welcome{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 16px;
  border-radius:999px;
  background:#1971E5;
  color:#fff;
  border:1px solid #D6A935;
  font-weight:900;
  margin-bottom:12px;
}
.terms-card h2{
  margin-top:0;
  font-size:32px;
  color:#0f172a;
}
.terms-intro{
  margin:0 0 18px;
  font-size:18px;
  line-height:1.9;
  color:#334155;
  font-weight:700;
}
.terms-list{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:14px;
}
.term-item{
  padding:15px 16px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #dbeafe;
}
.term-item strong{
  display:block;
  color:#1971E5;
  font-size:17px;
  margin-bottom:5px;
}
.term-item span{
  display:block;
  color:#334155;
  line-height:1.8;
  font-weight:700;
}
.start-prediction-btn{
  margin-top:24px;
  min-height:62px;
  font-size:22px;
  border-radius:22px;
  background:linear-gradient(135deg,#1971E5,#0F5FA8);
  color:#fff;
  border:1px solid #D6A935;
  box-shadow:0 18px 40px rgba(25,113,229,.24);
}
@media(max-width:600px){
  .participant-greeting{font-size:16px;padding:13px 12px;border-radius:18px}
  .terms-card{padding:20px}
  .terms-card h2{font-size:26px}
  .terms-intro{font-size:16px}
  .start-prediction-btn{font-size:20px;min-height:58px}
}


/* Points badge style for home leaderboard */
.points-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:56px;
  padding:9px 16px;
  border-radius:999px;
  background:#1971E5;
  border:1px solid #D6A935;
  color:#fff;
  box-shadow:0 8px 18px rgba(25,113,229,.18);
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}
.points-pill b{
  font-size:19px;
  font-weight:900;
  color:#fff;
  letter-spacing:.2px;
  text-shadow:none;
}
.top-three-card .points-pill{
  margin-top:7px;
}
.leaderboard-points{
  margin:auto 0;
}
@media(max-width:600px){
  .points-pill{min-width:50px;padding:8px 13px}
  .points-pill b{font-size:17px}
}


/* My predictions compact vertical score layout */
.my-predictions-table th,
.my-predictions-table td{
  vertical-align:middle;
}
.vertical-score-block{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:160px;
  direction:ltr;
}
.vertical-score-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:6px 8px;
}
.vertical-score-row span{
  font-weight:700;
  color:#0f172a;
  text-align:left;
}
.vertical-score-row strong{
  min-width:28px;
  text-align:center;
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
  border-radius:8px;
  padding:3px 8px;
  font-weight:900;
}
@media (max-width:600px){
  .my-predictions-table{font-size:12px}
  .vertical-score-block{min-width:130px}
  .vertical-score-row{gap:6px;padding:5px 6px}
  .vertical-score-row strong{min-width:24px;padding:2px 6px}
}

/* My predictions two-row table layout */
.predictions-two-row-table{
  width:100%;
  border-collapse:collapse;
}
.predictions-two-row-table th{
  text-align:center;
  white-space:nowrap;
}
.predictions-two-row-table td{
  text-align:center;
  vertical-align:middle;
}
.prediction-date-row td{
  background:#f8fafc;
  color:#475569;
  font-weight:800;
  text-align:right;
  border-top:2px solid #e2e8f0;
  padding:10px 12px;
}
.prediction-team-row td{
  padding:8px 10px;
}
.prediction-second-row td{
  border-bottom:1px solid #e2e8f0;
}
.team-name-cell{
  font-weight:900;
  color:#0f172a;
  text-align:right !important;
  min-width:150px;
}
.score-cell{
  font-weight:900;
  color:#1d4ed8;
  font-size:18px;
}
.status-cell,
.points-cell{
  border-bottom:1px solid #e2e8f0;
}
.points-cell{
  font-weight:900;
  color:#0f172a;
  font-size:18px;
}
.total-points-row td{
  background:#fff7ed;
  color:#7c2d12;
  font-weight:900;
  border-top:2px solid #f59e0b;
  padding:10px 12px;
}
.total-points-row td:last-child{
  font-size:18px;
}
@media(max-width:600px){
  .predictions-two-row-table{font-size:12px}
  .team-name-cell{min-width:105px;font-size:12px;padding-right:6px !important}
  .score-cell,.points-cell{font-size:15px}
  .prediction-date-row td{font-size:12px;padding:8px}
  .prediction-team-row td{padding:7px 5px}
  .status-pill{font-size:11px;padding:5px 7px}
}


/* تحديث سجل توقعاتي: توسيط العنوان وتلوين التوقع والنتيجة */
.my-predictions-title{
  text-align:center;
  margin:22px 0 14px;
  font-weight:900;
}
.prediction-score-cell{
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
  border-radius:10px;
  box-shadow:inset 0 0 0 1px rgba(29,78,216,.04);
}
.result-score-cell{
  background:#ecfdf5;
  color:#047857;
  border:1px solid #a7f3d0;
  border-radius:10px;
  box-shadow:inset 0 0 0 1px rgba(4,120,87,.04);
}
.predictions-two-row-table .prediction-score-cell,
.predictions-two-row-table .result-score-cell{
  display:table-cell;
}


/* === Department PDF-style Table === */
.dept-pdf-wrap{overflow-x:auto;margin-top:12px}
.dept-pdf-table{width:100%;border-collapse:collapse;font-size:13px;direction:ltr}
.dept-pdf-table thead tr{background:#003b75;color:#fff}
.dept-pdf-table th{padding:10px 12px;text-align:center;font-weight:700;font-size:12px;white-space:nowrap}
.dept-pdf-table td{padding:9px 12px;text-align:center;border-bottom:1px solid #e2e8f0}
.dept-pdf-table td:nth-child(2){text-align:left;font-weight:600;color:#0b2345}
.dept-pdf-table td:nth-child(5) strong{color:#0057A8;font-size:15px}
.dept-pdf-table td:first-child strong{color:#475569}
.dept-pdf-row-even{background:#eef7ff}
.dept-pdf-row-odd{background:#fff}
.dept-pdf-table tbody tr:hover{background:#dbeafe}
@media(max-width:600px){
  .dept-pdf-table{font-size:11px}
  .dept-pdf-table th,.dept-pdf-table td{padding:7px 6px}
}
.yansab-logo{max-height:96px;object-fit:contain;background:#fff;border-radius:18px;padding:10px 18px;box-shadow:0 16px 38px rgba(0,0,0,.22)}
.logo-wrap{margin-bottom:12px}.worldcup-logo.yansab-logo{width:min(420px,90vw);height:auto}
.brand{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(246,164,0,.75)}
.hero h1{color:#fff}.hero p{color:rgba(255,255,255,.86)}
.card{border:1px solid rgba(0,87,168,.10)}
select{width:100%;padding:13px 14px;border:1px solid #d1d5db;border-radius:14px;font-size:18px;margin-top:7px;font-family:inherit;background:#fff;color:var(--text)}
.leaderboard-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.leaderboard-tabs button{margin:0;background:linear-gradient(135deg,#0057A8,#0072CE);color:#fff;font-size:15px;padding:12px;transition:all .2s;border:2px solid transparent}
.leaderboard-tabs button.tab-active{background:#fff;color:#003b75;font-weight:900;border:2px solid #0057A8;box-shadow:0 4px 12px rgba(0,87,168,.2),0 2px 0 #0057A8;transform:translateY(-2px)}
.leaderboard-explain{margin:12px 0;padding:12px 14px;border-radius:14px;background:#eef7ff;color:#003f78;border:1px solid #b8ddff;font-weight:800;text-align:center}
.leaders-subtitle{margin:14px 0 8px;color:#003f78;text-align:center;font-size:16px}.top-three-box{display:grid;gap:10px}
.top-three-card{border:1px solid rgba(0,87,168,.16)}
.points-pill,.leaderboard-points,.top-three-points{background:linear-gradient(135deg,#0057A8,#0b75c9)!important;color:#fff!important}
button{background:linear-gradient(135deg,#F6A400,#D48700);color:#111827}
.main-nav .nav-btn:hover{background:linear-gradient(135deg,#F6A400,#D48700)}
.rank-box,.result{background:#eef7ff;color:#0057A8;border-color:#b8ddff}.notice{background:#fff7e6;color:#9a5b00;border-color:#ffd893}
.term-item{border-color:rgba(0,87,168,.10)}
@media(max-width:700px){.leaderboard-tabs{grid-template-columns:1fr}.leaderboard-tabs button{font-size:13px}.worldcup-logo.yansab-logo{width:min(320px,90vw)}}


/* SWA support card */
.support-card .support-box{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding:16px;
  border:1px solid rgba(13,89,162,.18);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(255,246,227,.78));
  text-align:right;
}
.support-card .support-icon{
  width:52px;
  height:52px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  background:linear-gradient(135deg,#25D366,#128C7E);
  color:#fff;
  box-shadow:0 12px 28px rgba(37,211,102,.18);
}
.support-card strong{display:block;color:#0b2345;font-weight:900;margin-bottom:4px}
.support-phone{
  display:inline-block;
  direction:ltr;
  font-size:20px;
  font-weight:900;
  color:#0d59a2;
  text-decoration:none;
  margin-left:8px;
}
.support-note{display:inline-block;color:#128C7E;font-weight:900}
@media(max-width:650px){
  .support-card .support-box{align-items:flex-start;justify-content:flex-start}
  .support-phone{font-size:18px}
}

/* === Updated SWA identity assets === */
.yansab-logo{
  max-height:82px !important;
  object-fit:contain;
  background:#fff;
  border-radius:18px;
  padding:10px 18px;
  box-shadow:0 16px 38px rgba(0,0,0,.20);
}
.worldcup-logo.yansab-logo{
  width:min(330px,86vw) !important;
  height:auto;
}
.event-logo-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:10px auto 16px;
}
.yansab-event-poster{
  display:block;
  width:auto;
  max-width:min(300px,78vw);
  max-height:440px;
  object-fit:contain;
  border-radius:24px;
  background:#fff;
  padding:10px;
  box-shadow:0 20px 48px rgba(0,0,0,.22);
  border:1px solid rgba(0,87,168,.12);
}
@media(max-width:700px){
  .worldcup-logo.yansab-logo{width:min(280px,84vw) !important;max-height:72px !important;padding:8px 14px}
  .yansab-event-poster{max-width:min(240px,76vw);max-height:360px;border-radius:20px;padding:8px}
  .event-logo-wrap{margin:8px auto 12px}
}


/* === Final logo placement: remove old SWA logo and keep only the event logo === */
.logo-wrap:has(.yansab-logo),
.yansab-logo{
  display:none !important;
}
.event-logo-wrap{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  margin:0 auto 16px !important;
}
.yansab-event-poster{
  display:block !important;
  width:auto !important;
  max-width:min(260px,72vw) !important;
  max-height:360px !important;
  object-fit:contain !important;
  border-radius:24px !important;
  background:#fff !important;
  padding:10px !important;
  box-shadow:0 20px 48px rgba(0,0,0,.20) !important;
  border:1px solid rgba(0,87,168,.12) !important;
}
.admin-event-logo-wrap{
  margin:0 auto 12px !important;
}
.admin-event-poster{
  max-width:min(180px,60vw) !important;
  max-height:260px !important;
  border-radius:20px !important;
  padding:8px !important;
}
@media(max-width:700px){
  .yansab-event-poster{
    max-width:min(220px,72vw) !important;
    max-height:310px !important;
    border-radius:20px !important;
    padding:8px !important;
  }
  .admin-event-poster{
    max-width:min(160px,62vw) !important;
    max-height:230px !important;
  }
  .event-logo-wrap{margin:0 auto 12px !important;}
}

.support-admin-link{display:inline-block;margin-top:10px;padding:9px 14px;border-radius:12px;background:linear-gradient(135deg,#0d59a2,#003b75);color:#fff!important;text-decoration:none;font-weight:900;box-shadow:0 8px 18px rgba(13,89,162,.18)}
.support-admin-link:hover{transform:translateY(-1px)}


/* === Final SWA logo placement and support button bottom === */
.hero{
  position:relative;
  overflow:hidden;
}
.hero-logo-right{
  width:100%;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  margin:0 0 14px;
  direction:rtl;
}
.header-yansab-logo{
  display:block;
  width:min(210px,46vw);
  max-height:88px;
  object-fit:contain;
  filter:drop-shadow(0 12px 18px rgba(0,0,0,.18));
}
.main-poster-wrap{
  margin:6px auto 18px !important;
}
.main-yansab-poster,
.yansab-event-poster.main-yansab-poster{
  max-width:min(300px,72vw) !important;
  max-height:455px !important;
  border-radius:26px !important;
  padding:8px !important;
  background:#fff !important;
  box-shadow:0 22px 50px rgba(0,0,0,.22) !important;
  border:1px solid rgba(0,87,168,.10) !important;
}
.support-card{
  margin-top:22px;
  margin-bottom:0;
}
.support-card .support-box{
  justify-content:center;
}
@media(max-width:700px){
  .hero-logo-right{justify-content:flex-start;margin-bottom:10px;}
  .header-yansab-logo{width:min(180px,58vw);max-height:78px;}
  .main-yansab-poster,
  .yansab-event-poster.main-yansab-poster{
    max-width:min(250px,78vw) !important;
    max-height:385px !important;
    border-radius:22px !important;
  }
}


/* WhatsApp support logo - compact mobile friendly */
.support-wa-logo-link{
  width:42px;
  height:42px;
  min-width:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#25D366;
  box-shadow:0 10px 22px rgba(37,211,102,.20);
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease;
}
.support-wa-logo-link:hover{transform:translateY(-1px);box-shadow:0 12px 26px rgba(37,211,102,.26)}
.support-wa-logo{
  width:42px;
  height:42px;
  display:block;
  object-fit:contain;
  border-radius:50%;
}
@media(max-width:650px){
  .support-card .support-box{gap:10px;padding:13px 12px;align-items:center;}
  .support-wa-logo-link,.support-wa-logo{width:36px;height:36px;min-width:36px;}
}


/* === Clean technical support card: compact mobile-first redesign === */
.support-card-clean{
  margin-top:22px !important;
  padding:18px !important;
  background:linear-gradient(135deg,#ffffff,#f7fbff) !important;
  border:1px solid rgba(0,87,168,.16) !important;
  box-shadow:0 18px 45px rgba(0,30,70,.10) !important;
}
.support-card-clean .support-clean-content{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:18px !important;
  direction:rtl !important;
}
.support-card-clean .support-clean-text{
  text-align:right !important;
  flex:1 1 auto !important;
}
.support-card-clean h2{
  margin:0 0 5px !important;
  color:#0b2345 !important;
  font-size:22px !important;
  font-weight:900 !important;
}
.support-card-clean p{
  margin:0 !important;
  color:#526174 !important;
  font-size:15px !important;
  line-height:1.8 !important;
  font-weight:700 !important;
}
.support-card-clean .support-clean-actions{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
}
.support-whatsapp-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:9px !important;
  min-height:42px !important;
  padding:10px 16px !important;
  border-radius:999px !important;
  background:#128C7E !important;
  color:#fff !important;
  text-decoration:none !important;
  font-weight:900 !important;
  box-shadow:0 10px 22px rgba(18,140,126,.18) !important;
  border:1px solid rgba(255,255,255,.22) !important;
  line-height:1 !important;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}
.support-whatsapp-btn:hover{
  transform:translateY(-1px) !important;
  filter:brightness(1.04) !important;
  box-shadow:0 14px 30px rgba(18,140,126,.24) !important;
}
.support-whatsapp-btn .wa-word{
  font-size:14px !important;
  font-weight:900 !important;
  opacity:.95 !important;
}
.support-whatsapp-btn .support-wa-number{
  direction:ltr !important;
  unicode-bidi:embed !important;
  font-size:17px !important;
  letter-spacing:.3px !important;
  color:#fff !important;
  font-weight:900 !important;
}
.support-admin-link-clean{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:40px !important;
  padding:9px 14px !important;
  border-radius:999px !important;
  background:#eef6ff !important;
  color:#0057a8 !important;
  border:1px solid rgba(0,87,168,.18) !important;
  text-decoration:none !important;
  font-weight:900 !important;
  box-shadow:none !important;
}
.support-wa-logo-link,.support-wa-logo{
  display:none !important;
}
@media(max-width:700px){
  .support-card-clean{
    padding:15px !important;
    border-radius:20px !important;
  }
  .support-card-clean .support-clean-content{
    flex-direction:column !important;
    align-items:stretch !important;
    gap:12px !important;
  }
  .support-card-clean h2{
    font-size:20px !important;
    text-align:center !important;
  }
  .support-card-clean p{
    font-size:14px !important;
    text-align:center !important;
  }
  .support-card-clean .support-clean-actions{
    flex-direction:column !important;
    align-items:stretch !important;
    gap:9px !important;
  }
  .support-whatsapp-btn,.support-admin-link-clean{
    width:100% !important;
    min-height:44px !important;
    box-sizing:border-box !important;
  }
  .support-whatsapp-btn .support-wa-number{
    font-size:16px !important;
  }
}

/* === SWA hero logo: approved combined artwork, centered and responsive === */
.hero .hero-logo-center-placement{
  width:100% !important;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  direction:rtl !important;
  box-sizing:border-box !important;
  padding-inline:clamp(0px,2.2vw,24px) !important;
  margin:0 0 14px !important;
}
.hero .hero-logo-center-placement .main-yansab-poster{
  display:block !important;
  width:clamp(145px,16vw,185px) !important;
  max-width:185px !important;
  height:auto !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:center !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:18px !important;
  background:#fff !important;
  border:1px solid rgba(255,255,255,.34) !important;
  box-shadow:0 16px 38px rgba(0,0,0,.22) !important;
}
@media(max-width:700px){
  .hero .hero-logo-center-placement{
    padding-inline:2px !important;
    margin-bottom:10px !important;
  }
  .hero .hero-logo-center-placement .main-yansab-poster{
    width:clamp(118px,35vw,145px) !important;
    max-width:145px !important;
    border-radius:15px !important;
    box-shadow:0 12px 28px rgba(0,0,0,.20) !important;
  }
}

/* Participant name policy note - 2026-06-12 */
.field-note {
  display: block;
  margin: -4px 0 10px;
  font-size: 0.82rem;
  line-height: 1.6;
  opacity: 0.78;
}

/* === FAQ: leaderboard and scoring explanation === */
.main-nav{
  grid-template-columns:repeat(5, minmax(0, 1fr));
  width:min(980px,100%);
}
.leaderboard-faq-btn{
  margin-top:10px;
  background:linear-gradient(135deg,#0057A8,#0072CE);
  color:#fff;
  border:1px solid rgba(255,255,255,.25);
}
.faq-card{max-width:900px;margin-inline:auto}
.faq-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:999px;
  background:#eef7ff;
  color:#0057A8;
  border:1px solid #b8ddff;
  font-weight:900;
  margin-bottom:10px;
}
.faq-card h2{margin:0;color:#0f172a;font-size:32px}
.faq-intro{font-size:18px;line-height:1.9;color:#475569;font-weight:700;margin:10px 0 20px}
.faq-list{display:grid;gap:12px}
.faq-item{
  border:1px solid #dbeafe;
  border-radius:18px;
  background:#f8fafc;
  overflow:hidden;
}
.faq-item summary{
  list-style:none;
  cursor:pointer;
  padding:16px 52px 16px 18px;
  color:#003f78;
  font-size:18px;
  font-weight:900;
  position:relative;
}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::before{
  content:'+';
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  width:26px;
  height:26px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#0057A8;
  color:#fff;
  font-size:20px;
  line-height:1;
}
.faq-item[open] summary::before{content:'−'}
.faq-item[open] summary{background:#eef7ff}
.faq-answer{
  padding:15px 18px 18px;
  color:#334155;
  font-weight:700;
  line-height:1.9;
  border-top:1px solid #dbeafe;
}
.faq-answer p{margin:5px 0}
.faq-back-btn{
  margin-top:22px;
  background:linear-gradient(135deg,#F6A400,#D48700);
  color:#111827;
}
@media(max-width:800px){
  .main-nav{grid-template-columns:repeat(3,minmax(0,1fr));width:min(720px,100%)}
}
@media(max-width:480px){
  .main-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  .faq-card{padding:20px}
  .faq-card h2{font-size:27px}
  .faq-intro{font-size:16px}
  .faq-item summary{font-size:16px;padding:14px 46px 14px 14px}
  .faq-item summary::before{right:14px}
  .faq-answer{font-size:15px;padding:13px 14px 16px}
}

/* === ترتيب قسم المتصدرين في الصفحة الرئيسية === */
.top-three-box{
  display:block;
}

.leaders-group{
  position:relative;
  padding:20px 18px 18px;
  border:1px solid rgba(0,87,168,.20);
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
  box-shadow:0 10px 28px rgba(0,63,120,.08), inset 0 0 0 1px rgba(255,255,255,.75);
}

.leaders-subtitle{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:0 0 20px;
  color:#003f78;
  text-align:center;
  font-size:18px;
  font-weight:900;
  line-height:1.5;
}

.leaders-subtitle::before,
.leaders-subtitle::after{
  content:"";
  flex:1 1 90px;
  max-width:180px;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(0,87,168,.48));
}

.leaders-subtitle::after{
  background:linear-gradient(90deg,rgba(0,87,168,.48),transparent);
}

.leaders-subtitle span{
  display:inline-block;
  padding:5px 16px;
  border:1px solid rgba(0,87,168,.16);
  border-radius:999px;
  background:#eef7ff;
  box-shadow:0 5px 14px rgba(0,87,168,.07);
}

.leaders-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.leaders-grid .top-three-card{
  min-width:0;
  border:1px solid rgba(0,87,168,.18);
  box-shadow:0 8px 22px rgba(0,63,120,.08);
}

.leaders-section-spacer{
  height:24px;
}

.leaders-group-note{
  margin:14px 0 0;
  padding-top:12px;
  border-top:1px dashed rgba(0,87,168,.22);
  color:#54708c;
  text-align:center;
  font-size:13px;
  font-weight:800;
}

.leaders-empty-notice{
  grid-column:1/-1;
  margin:0;
}

@media(max-width:820px){
  .leaders-group{
    padding:17px 12px 14px;
    border-radius:17px;
  }

  .leaders-subtitle{
    gap:8px;
    margin-bottom:16px;
    font-size:16px;
  }

  .leaders-subtitle span{
    padding:4px 12px;
  }

  .leaders-subtitle::before,
  .leaders-subtitle::after{
    min-width:18px;
  }

  .leaders-grid{
    grid-template-columns:1fr;
    gap:10px;
  }

  .leaders-section-spacer{
    height:20px;
  }
}

/* === دليل الأوسمة === */
.badge-legend{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:16px;margin-top:16px}
.badge-legend h4{margin:0 0 12px;color:#0b2345;font-size:15px;font-weight:900}
.badge-legend-grid{display:flex;flex-direction:column;gap:10px}
.badge-legend-item{display:flex;align-items:flex-start;gap:12px;background:#fff;border-radius:12px;padding:10px 14px;border:1px solid #e2e8f0}
.badge-legend-icon{font-size:24px;min-width:32px;text-align:center;line-height:1.4}
.badge-legend-item strong{display:block;font-size:14px;color:#0b2345;margin-bottom:2px}
.badge-legend-item p{margin:0;font-size:12px;color:#64748b;line-height:1.4}

/* v9: restore V5 leaderboard colors; only the selected tab is white with a blue border */
.leaderboard-tabs button{
  background:linear-gradient(135deg,#0057A8,#0072CE) !important;
  color:#fff !important;
  border:2px solid transparent !important;
  box-shadow:none;
  transform:none;
}
.leaderboard-tabs button.tab-active{
  background:#fff !important;
  color:#003b75 !important;
  border:2px solid #0057A8 !important;
  box-shadow:0 4px 12px rgba(0,87,168,.20),0 2px 0 #0057A8 !important;
  transform:translateY(-2px);
  font-weight:900;
}


/* v10: unified active-tab appearance across the public site */
.main-nav .nav-btn.tab-active,
.leaderboard-tabs button.tab-active{
  background:#fff !important;
  color:#003b75 !important;
  border:2px solid #1971E5 !important;
  box-shadow:0 5px 14px rgba(25,113,229,.24),0 2px 0 #1971E5 !important;
  transform:translateY(-2px) !important;
  font-weight:900 !important;
}
.main-nav .nav-btn.tab-active .nav-icon{
  background:#EEF7FF !important;
  color:#003EB1 !important;
}
