/* RN Student V3 Exact Layout — matches reference image
   RTL hero: [Student] | [Score stack] | [QR + actions]
   Score stack order: grade → total → donut → status → notes
*/

html.rn-student-result-v3 #studentResultCard.rn-student-result-v3,
html.rn-student-result-v3 #studentResultCard.rn-student-result-v45{
  direction:rtl!important;
  max-width:1280px!important;
  width:calc(100% - 32px)!important;
  margin:34px auto!important;
}

html.rn-student-result-v3 #studentResultCard .rn-v228-student-tools,
html.rn-student-result-v3 #studentResultCard .rn226-student-tools{
  display:none!important;
}

/* إلغاء قواعد index القديمة التي تخفي QR والأزرار */
html.rn-student-result-v3 #studentResultCard .rn-sr-verify-card{
  display:grid!important;
}
html.rn-student-result-v3 #studentResultCard .rn-sr-verify-box--scan,
html.rn-student-result-v3 #studentResultCard .rn-sr-scan-card{
  display:flex!important;
}
html.rn-student-result-v3 #studentResultCard .rn-sr-verify-actions{
  display:grid!important;
}

@media(min-width:768px){
  html.rn-student-result-v3 #studentResultCard .rn-sr-top-actions{
    display:flex!important;
    justify-content:flex-start!important;
    margin:0 0 16px!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-hero{
    display:grid!important;
    grid-template-columns:1.12fr .72fr .52fr!important;
    grid-template-areas:"student score verify"!important;
    gap:18px!important;
    align-items:center!important;
    padding:30px!important;
    border-radius:30px!important;
    background:linear-gradient(180deg,#ffffff,#fbfdff)!important;
    border:1px solid #e6edf7!important;
    box-shadow:0 26px 70px rgba(15,23,42,.08)!important;
    overflow:hidden!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-hero:before{
    content:""!important;
    position:absolute!important;
    inset:0 0 auto 0!important;
    height:8px!important;
    background:linear-gradient(90deg,#10b981,#2563eb,#4f46e5)!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-hero{
    position:relative!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-hero-student{
    grid-area:student!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    gap:24px!important;
    order:unset!important;
    min-width:0!important;
  }

  /* عمود الدرجات: درجة → مجموع → دائرة → حالة → ملاحظات */
  html.rn-student-result-v3 #studentResultCard .rn-sr-score-card{
    grid-area:score!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:14px!important;
    order:unset!important;
    padding:10px 24px!important;
    border-right:1px solid #e6edf7!important;
    border-left:1px solid #e6edf7!important;
    border-top:0!important;
    border-bottom:0!important;
    background:transparent!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-score-main{
    order:1!important;
    text-align:center!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-score-main strong{
    display:block!important;
    font-size:64px!important;
    line-height:1!important;
    font-weight:900!important;
    color:#0f172a!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-score-main small{
    display:block!important;
    margin-top:8px!important;
    color:#94a3b8!important;
    font-weight:900!important;
    font-size:16px!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-progress-ring{
    order:2!important;
    width:120px!important;
    height:120px!important;
    margin:0!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-progress-ring:before{
    width:90px!important;
    height:90px!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-status{
    order:3!important;
    min-width:210px!important;
    text-align:center!important;
    padding:12px 16px!important;
    border-radius:12px!important;
    font-size:20px!important;
    font-weight:900!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-score-notes{
    order:4!important;
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:center!important;
    gap:8px!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-score-notes span{
    padding:7px 12px!important;
    border-radius:999px!important;
    background:#f8fafc!important;
    border:1px solid #e6edf7!important;
    color:#64748b!important;
    font-size:12px!important;
    font-weight:900!important;
  }

  /* QR + أزرار بجانب عمود الدرجات */
  html.rn-student-result-v3 #studentResultCard .rn-sr-verify-card{
    grid-area:verify!important;
    display:grid!important;
    justify-items:center!important;
    align-content:start!important;
    gap:16px!important;
    order:unset!important;
    width:auto!important;
    min-height:0!important;
    padding:0!important;
    border:0!important;
    box-shadow:none!important;
    background:transparent!important;
    grid-template-columns:none!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-verify-box--scan,
  html.rn-student-result-v3 #studentResultCard .rn-sr-scan-card{
    display:flex!important;
    width:205px!important;
    min-height:250px!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-verify-actions{
    display:grid!important;
    width:205px!important;
    gap:10px!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-verify-actions button{
    width:100%!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-tags a,
  html.rn-student-result-v3 #studentResultCard .rn-sr-tags span{
    display:inline-flex!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-quick-links{
    display:flex!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-legend{
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:center!important;
    gap:10px!important;
    margin:18px 0 0!important;
  }
}

@media(max-width:767px){
  html.rn-student-result-v3 #studentResultCard .rn-sr-hero{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    padding:18px 14px!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-score-card{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:12px!important;
    border:1px solid #e6edf7!important;
    border-radius:18px!important;
    padding:16px!important;
    background:#f8fbff!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-verify-card{
    display:grid!important;
    justify-items:center!important;
    gap:12px!important;
  }

  html.rn-student-result-v3 #studentResultCard .rn-sr-verify-box--scan,
  html.rn-student-result-v3 #studentResultCard .rn-sr-scan-card{
    display:flex!important;
  }
}
