/* RN_EDADI_RESULT_RING_V4 — natega4dk.net */
#rnEdadiReferenceV3,#rnEdadiReferenceV3 *{box-sizing:border-box;}

    :root {
      /* natega4dk.net */
      --blue: #087fd0;
      --blue-dark: #0758bd;
      --blue-light: #0763c8;
      --blue-soft: #eaf5ff;
      --gold: #e8b808;
      --gold-soft: #fff5e8;
      --green: #07945a;
      --green-bright: #07945a;
      --green-soft: #effbf5;
      --orange: #f77822;
      --orange-deep: #e36b13;
      --orange-soft: #fff5e8;
      --text: #111827;
      --muted: #68758c;
      --line: #dce4ee;
      --bg: #f4f7fb;
      --card: #ffffff;
      --radius: 14px;
      --shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.03);
      --accent: #087fd0;
      --label: #111827;
      --section: #68758c;
      --link-rank: #075fc2;
      --link-school: #087f50;
      --link-top: #d75d09;
      --link-edara: #f77822;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    #rnEdadiReferenceV3 {
      font-family: "Alexandria", Tahoma, Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.55;
      -webkit-font-smoothing: antialiased;
    }

    a { color: var(--blue-light); text-decoration: none; }
    a:hover { text-decoration: underline; }

    #rnEdadiReferenceV3 .rn-edadi-v4-wrap { max-width: 1180px; margin: 0 auto; padding: 16px 15px; }

    .top-actions { display: flex; gap: 10px; margin-bottom: 16px; }
    .btn {
      flex: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 11px 16px;
      border-radius: 10px;
      font-family: inherit;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      border: none;
    }
    .btn-outline {
      background: var(--card);
      color: var(--blue-light);
      border: 2px solid #1475dc;
      font-weight: 800;
    }
    .btn-ghost { background: var(--card); color: var(--muted); border: 1.5px solid var(--line); }
    @media (min-width: 560px) { .top-actions .btn { flex: 0 0 auto; } }

    .hero-row {
      display: grid;
      grid-template-columns: 1fr 270px;
      grid-template-areas:
        "head ring"
        "meta ring";
      gap: 14px;
      align-items: stretch;
      margin-bottom: 14px;
    }

    .student-head-card { grid-area: head; }
    .student-meta-card { grid-area: meta; }
    .side-card { grid-area: ring; }

    .card {
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .student-head-card,
    .student-meta-card {
      padding: 20px;
      overflow: hidden;
    }

    .student-head-card {
      padding-bottom: 16px;
    }

    .student-meta-card {
      padding-top: 0;
    }

    /* ── header: name + QR (mobile) / name + avatar (desktop) ── */
    .student-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--line);
    }

    .student-head-main { flex: 1; min-width: 0; }

    .student-title-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      flex-wrap: wrap;
    }

    .student-cap {
      display: block;
      width: 44px;
      height: 34px;
      flex: 0 0 auto;
    }

    .student-name {
      font-size: clamp(17px, 4.5vw, 22px);
      font-weight: 900;
      color: var(--blue-dark);
      line-height: 1.4;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    /* شريط تجربة الاسم — للمعاينة فقط */
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      margin-bottom: 14px;
      padding: 10px 12px;
      border: 1px dashed var(--line);
      border-radius: 10px;
      background: #fff;
      font-size: 12px;
    }

      font-weight: 800;
      color: var(--section);
    }

      font-family: inherit;
      font-size: 11px;
      font-weight: 700;
      padding: 6px 10px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--bg);
      color: var(--text);
      cursor: pointer;
    }

      background: var(--blue-soft);
      border-color: #afd1f5;
      color: var(--link-rank);
    }

    .badge-new {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      margin-top: 6px;
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--green-soft);
      color: var(--green);
      font-size: 11px;
      font-weight: 800;
    }
    .badge-new i { font-size: 10px; }

    .avatar {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: var(--blue);
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 20px;
      font-weight: 800;
      flex-shrink: 0;
    }

    @media (min-width: 721px) {
      .avatar { display: grid; }
    }
    @media (max-width: 720px) {
      .avatar { display: none; }
    }

    /* ── meta with icons ── */
    .meta-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
    }

    .meta-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #fff;
      border: 1px solid #eef2f6;
    }
    .meta-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      font-size: 14px;
      flex-shrink: 0;
    }
    .meta-icon.blue { background: var(--blue-soft); color: #0870cf; }
    .meta-icon.gold { background: var(--gold-soft); color: var(--orange-deep); }
    .meta-icon.green { background: var(--green-soft); color: var(--green); }
    .meta-icon.orange { background: var(--orange-soft); color: var(--orange); }

    .meta-#rnEdadiReferenceV3 { flex: 1; min-width: 0; }
    /* ثابت = تسمية · متغير = قيمة */
    .lbl-core,
    .meta-body .lbl {
      display: block;
      font-size: 11px;
      font-weight: 800;
      color: var(--label);
      margin-bottom: 4px;
      letter-spacing: 0.01em;
    }
    .meta-body .val {
      display: block;
      font-size: 15px;
      font-weight: 700;
      color: var(--accent);
      word-break: break-word;
      line-height: 1.45;
    }
    .meta-body .val a {
      color: var(--accent);
      font-weight: 700;
    }
    .meta-body .val.gold { color: var(--orange); font-weight: 800; }
    .meta-body .val.green { color: var(--green-bright); font-weight: 800; }
    .meta-body .val.warn { color: #d92d20; font-weight: 800; }

    @media (min-width: 640px) {
      .meta-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
      }
    }

    /* ── sidebar desktop ── */
    .side-card {
      padding: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      height: 100%;
      overflow: hidden;
    }

    /* ── حلقة النجاح (بديل QR + الشهادة/الطباعة) ── */
    .pass-ring-wrap {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 10px;
      padding: 4px 0 2px;
    }

    .side-stack {
      flex: 1;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      gap: 0;
      padding: 18px 18px 20px;
    }

    .side-pass-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      align-self: flex-start;
      margin: 0 0 14px;
      padding: 6px 12px;
      border-radius: 999px;
      background: var(--green-soft);
      color: var(--green-bright);
      font-size: 12px;
      font-weight: 800;
    }

    .side-pass-badge i { font-size: 11px; }

    .side-ring-block {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: -2px 0 14px;
    }

    .side-congrats {
      margin-top: 12px;
      font-size: 14px;
      font-weight: 800;
      color: var(--result-color, var(--text));
    }

    .side-score-divider {
      width: 100%;
      height: 1px;
      background: var(--line);
      margin: 4px 0 14px;
    }

    .side-score-block {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      margin-bottom: 16px;
    }

    .side-tools-block {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      margin-top: auto;
      padding-top: 4px;
    }

    .side-qr {
      padding: 6px;
      border: 1.5px solid #afd1f5;
      border-radius: 10px;
      background: #fff;
      line-height: 0;
    }

    .side-qr img {
      display: block;
      width: 100px;
      height: 100px;
    }

    .side-qr-caption {
      font-size: 11px;
      font-weight: 800;
      color: var(--section);
      text-align: center;
      margin-top: 2px;
    }

    .side-cert {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: auto;
      font-family: inherit;
      font-size: 12px;
      font-weight: 800;
      padding: 6px 14px;
      border-radius: 8px;
      text-align: center;
      cursor: pointer;
      border: 1px solid #afd1f5;
      background: var(--blue-soft);
      color: var(--link-rank);
      text-decoration: none;
      margin-top: 4px;
    }

    .side-cert:hover { opacity: 0.9; }

    .side-card .pass-ring-wrap {
      gap: 0;
      padding: 0;
    }

    .pass-ring {
      --ring-size: 168px;
      --ring-inset: 12px;
      --ring-track: #e7eaee;
      --ring-color: var(--green);
      --pct: 0;
      position: relative;
      width: var(--ring-size);
      height: var(--ring-size);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: conic-gradient(
        from -90deg,
        var(--ring-color) 0deg,
        var(--ring-color) calc(var(--pct) * 3.6deg),
        var(--ring-track) calc(var(--pct) * 3.6deg),
        var(--ring-track) 360deg
      );
      box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    }

    .pass-ring::before {
      content: "";
      position: absolute;
      inset: var(--ring-inset);
      border-radius: 50%;
      background: #fff;
      box-shadow: inset 0 2px 10px rgba(15, 23, 42, 0.04);
    }

    .pass-ring-core {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
      padding-top: 2px;
    }

    .pass-ring-pct {
      font-size: 28px;
      font-weight: 900;
      color: var(--ring-color);
      line-height: 1;
    }

    .pass-ring-sub {
      font-size: 11px;
      font-weight: 700;
      color: var(--section);
    }

    .pass-ring-grade-tag {
      margin-top: 4px;
      padding: 3px 10px;
      border-radius: 999px;
      background: color-mix(in srgb, var(--ring-color) 12%, #fff);
      color: var(--ring-color);
      font-size: 11px;
      font-weight: 800;
    }

    /* ألوان التقدير — حسب نسبة الوزارة */
    .pass-ring.is-excellent,
    .side-pass-badge.is-excellent { --ring-color: #07945a; --ring-track: #effbf5; }
    .pass-ring.is-very-good,
    .side-pass-badge.is-very-good { --ring-color: #087fd0; --ring-track: #eaf5ff; }
    .pass-ring.is-good,
    .side-pass-badge.is-good { --ring-color: #2563eb; --ring-track: #eff6ff; }
    .pass-ring.is-pass,
    .side-pass-badge.is-pass { --ring-color: #f77822; --ring-track: #fff5e8; }
    .pass-ring.is-fail,
    .side-pass-badge.is-fail { --ring-color: #d92d20; --ring-track: #fff5f5; }

    .side-pass-badge.is-excellent { background: #effbf5; color: #07945a; }
    .side-pass-badge.is-very-good { background: #eaf5ff; color: #087fd0; }
    .side-pass-badge.is-good { background: #eff6ff; color: #2563eb; }
    .side-pass-badge.is-pass { background: #fff5e8; color: #f77822; }
    .side-pass-badge.is-fail { background: #fff5f5; color: #d92d20; }

    .pass-ring-total {
      direction: ltr;
      unicode-bidi: isolate;
      font-size: 16px;
      font-weight: 600;
      color: var(--muted);
    }

    .pass-ring-total .big {
      font-size: 28px;
      font-weight: 900;
      color: var(--result-color, var(--link-rank));
      font-variant-numeric: tabular-nums;
      letter-spacing: -0.02em;
    }

    .pass-ring-total .slash {
      margin: 0 3px;
      color: #98a3b3;
      font-weight: 700;
    }

    .pass-ring-total .max {
      font-size: 15px;
      font-weight: 700;
      color: #566578;
      font-variant-numeric: tabular-nums;
    }

    .pass-ring-label {
      font-size: 11px;
      font-weight: 800;
      color: var(--section);
    }

    /* ── links ── */
    .link-list { width: 100%; list-style: none; }
    .link-list li { border-bottom: 1px solid var(--line); }
    .link-list li:last-child { border-bottom: none; }
    .link-list a {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 11px 4px;
      font-size: 13px;
      font-weight: 800;
      color: var(--link-rank);
      text-decoration: none;
    }
    .link-list a.is-school { color: var(--link-school); }
    .link-list a.is-top { color: var(--link-top); }
    .link-list a.is-edara { color: var(--link-edara); }
    .link-list a:hover { opacity: 0.88; }
    .link-list a i { color: #a2adbd; font-size: 12px; opacity: .9; }

    @media (max-width: 720px) {
      .hero-row {
        grid-template-columns: 1fr;
        grid-template-areas:
          "ring"
          "head"
          "meta";
        gap: 12px;
        margin-bottom: 16px;
      }

      /* الاسم + البيانات كتلة واحدة تحت النتيجة */
      .hero-row { gap: 0; }
      .side-card { margin-bottom: 12px; }
      .student-head-card {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-bottom: none;
        box-shadow: none;
      }
      .student-meta-card {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top: none;
        padding-top: 0;
        margin-bottom: 16px;
      }

      #rnEdadiReferenceV3 .rn-edadi-v4-wrap { padding: 14px 16px 20px; }
      .top-actions { gap: 12px; margin-bottom: 18px; }
      .btn { padding: 13px 18px; font-size: 15px; }

      .student-head-card,
      .student-meta-card { padding: 20px 18px; }
      .student-head-card { padding-bottom: 18px; }
      .student-meta-card { padding-top: 4px; }

      .student-head {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
      }

      .student-head-main { text-align: center; }
      .student-title-row { justify-content: center; }
      .student-cap { width: 44px; height: 34px; }
      .student-name { font-size: 21px; }
      .badge-new { display: none; }

      .side-stack {
        padding: 22px 18px 20px;
        justify-content: flex-start;
      }

      .side-pass-badge {
        align-self: center;
        margin-bottom: 16px;
        padding: 7px 14px;
        font-size: 13px;
      }

      .side-ring-block { margin-bottom: 16px; }

      .side-ring-block { margin-top: -4px; }

      .pass-ring {
        --ring-size: 142px;
        --ring-inset: 10px;
      }

      .pass-ring-pct { font-size: 25px; }
      .pass-ring-sub { font-size: 11px; }
      .pass-ring-grade-tag { font-size: 10px; padding: 2px 8px; }
      .side-congrats { font-size: 14px; margin-top: 10px; }
      .side-score-divider { margin: 4px 0 12px; }
      .pass-ring-total .big { font-size: 24px; }
      .side-score-block { margin-bottom: 14px; }

      .side-tools-block { gap: 5px; }

      .side-qr-caption { font-size: 11px; margin-top: 2px; }

      .side-qr img { width: 96px; height: 96px; }

      .side-cert {
        margin-top: 4px;
        padding: 5px 12px;
        font-size: 11px;
      }

      .score-strip { display: none; }

      .meta-list { gap: 10px; }
      .meta-item { padding: 13px 14px; gap: 12px; }
      .meta-icon { width: 40px; height: 40px; font-size: 15px; }
      .meta-body .lbl { font-size: 12px; margin-bottom: 3px; }
      .meta-body .val { font-size: 15px; }

      .result-#rnEdadiReferenceV3 { gap: 16px; }
      .score-cell { padding: 20px 12px; }
      .score-cell .l.lbl-core { font-size: 13px; margin-top: 6px; }

      .quick-services { padding: 8px 18px 16px; }
      .quick-services-title { font-size: 14px; margin-bottom: 10px; gap: 12px; }
      .link-list a { padding: 14px 6px; font-size: 14px; }

      .info-box { padding: 18px 20px; }
      .info-row { padding: 9px 0; font-size: 14px; }

      .grades-banner { padding: 16px 16px 12px; }
      .grades-banner-title { font-size: 14px; gap: 12px; }
      .grades-table { font-size: 14px; }
      .grades-table thead th,
      .grades-table tbody td { padding: 13px 14px; }
      .subj-icon { width: 38px; height: 38px; font-size: 15px; }
    }

    @media (min-width: 721px) {
      #rnEdadiReferenceV3 .rn-edadi-v4-wrap { max-width: 1180px; padding: 24px 15px 32px; }
      .top-actions { gap: 12px; margin-bottom: 20px; }
      .btn { padding: 12px 20px; font-size: 15px; }

      .hero-row {
        grid-template-columns: 1fr 300px;
        grid-template-areas:
          "head ring"
          "meta ring";
        gap: 16px 24px;
        margin-bottom: 20px;
        align-items: stretch;
      }

      .hero-row { row-gap: 0; }

      .student-head-card {
        padding: 26px 28px 20px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-bottom: 1px solid var(--line);
      }

      .student-meta-card {
        padding: 18px 28px 26px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top: none;
        box-shadow: var(--shadow);
      }

      .student-head {
        gap: 16px;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
      }
      .student-cap { width: 52px; height: 40px; }
      .student-name { font-size: 24px; }
      .avatar { width: 58px; height: 58px; font-size: 22px; }

      .meta-list { gap: 11px; }
      .meta-item { padding: 14px 16px; gap: 12px; border-radius: 12px; }
      .meta-icon { width: 42px; height: 42px; font-size: 15px; border-radius: 11px; }
      .meta-body .lbl { font-size: 12px; margin-bottom: 3px; }
      .meta-body .val { font-size: 15px; }
      .side-stack { padding: 22px 20px 22px; }
      .side-qr img { width: 108px; height: 108px; }
      .side-cert { padding: 6px 14px; font-size: 12px; }
      .pass-ring { --ring-size: 172px; --ring-inset: 12px; }
      .pass-ring-pct { font-size: 30px; }
      .pass-ring-total { font-size: 17px; }
      .pass-ring-total .big { font-size: 34px; }
      .pass-ring-total .max { font-size: 17px; font-weight: 700; color: #566578; }
      .pass-ring-total .slash { font-size: 16px; }
      .side-congrats { font-size: 15px; }

      .result-#rnEdadiReferenceV3 { gap: 18px; }
      .score-cell { padding: 24px 18px; }
      .score-cell .v { font-size: 26px; }
      .score-cell:nth-child(2) .v.ok { font-size: 30px; }
      .score-cell .v.total-mark .big { font-size: 34px; }
      .score-cell .v.total-mark .max { font-size: 17px; font-weight: 700; color: #566578; }
      .score-cell .v.total-mark .slash { font-size: 16px; }
      .score-cell .l.lbl-core { font-size: 13px; margin-top: 6px; }

      .quick-services { padding: 10px 22px 18px; }
      .quick-services-title { font-size: 14px; margin-bottom: 10px; gap: 16px; }
      .link-list a { padding: 13px 8px; font-size: 14px; }

      .info-box { padding: 20px 22px; }
      .info-box h3 { font-size: 14px; margin-bottom: 14px; }
      .info-row { padding: 9px 0; font-size: 14px; }

      .grades-banner { padding: 18px 22px 14px; }
      .grades-table { font-size: 15px; }
      .grades-table thead th,
      .grades-table tbody td { padding: 16px 18px; }
      .subj-icon { width: 38px; height: 38px; font-size: 15px; }
      .grades-table .mark .big { font-size: 24px; }
      .grades-table .mark .max { font-size: 16px; }
      .grades-table .mark .slash { font-size: 16px; }
      .grades-table .pct { font-size: 17px; }
      .grades-table .grd { font-size: 16px; }
      .meta-body .val { font-size: 16px; }
    }

    /* ── below student: result body ── */
    .result-#rnEdadiReferenceV3 { display: flex; flex-direction: column; gap: 14px; }

    /* خدمات سريعة — بعد أزرار الشهادة والطباعة */
    .quick-services {
      padding: 4px 16px 12px;
      border-color: #eef2f6;
      box-shadow: none;
    }
    .divider-title {
      display: flex;
      align-items: center;
      gap: 14px;
      white-space: nowrap;
      font-weight: 900;
    }
    .divider-title::before,
    .divider-title::after {
      content: "";
      flex: 1;
      height: 2px;
      background: #c8d3e0;
      border-radius: 999px;
    }

    .quick-services-title {
      margin-bottom: 8px;
      font-size: 13px;
      color: var(--section);
    }

    /* ★ focal — النتيجة أول ما العين تقع */
    .score-strip {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      overflow: hidden;
      padding: 0;
      background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--result-color, #087fd0) 6%, #fff) 100%);
      border: 1.5px solid color-mix(in srgb, var(--result-color, #087fd0) 35%, #dce4ee);
      box-shadow: 0 6px 22px color-mix(in srgb, var(--result-color, #087fd0) 14%, transparent);
    }
    .score-cell {
      padding: 18px 10px;
      text-align: center;
      border-left: 1px solid var(--line);
    }
    .score-cell:first-child { border-left: none; }
    .score-cell .v {
      display: block;
      font-size: clamp(18px, 4.5vw, 24px);
      font-weight: 900;
      color: var(--accent);
      line-height: 1.2;
    }
    .score-cell .v.ok { color: var(--result-color, var(--green-bright)); font-weight: 900; }
    .score-cell:nth-child(2) .v.ok { font-size: clamp(20px, 5vw, 26px); }
    .score-cell .v.total-mark {
      direction: ltr;
      unicode-bidi: isolate;
      font-weight: inherit;
      color: inherit;
    }
    .score-cell .v.total-mark .big {
      font-size: clamp(20px, 5vw, 28px);
      font-weight: 900;
      color: var(--accent);
    }
    .score-cell:nth-child(4) { background: rgba(255, 255, 255, 0.55); }
    .score-cell .v.total-mark .max {
      font-size: 14px;
      font-weight: 600;
      color: var(--muted);
    }
    .score-cell .v.total-mark .slash {
      font-size: 14px;
      font-weight: 600;
      color: #b8c0cc;
      margin: 0 2px;
    }
    .score-cell .l {
      display: block;
      margin-top: 6px;
      font-size: 11px;
      font-weight: 800;
      color: var(--label);
    }
    .score-cell .l.lbl-core {
      font-size: 12px;
    }
    .score-cell .l:not(.lbl-core) {
      font-weight: 600;
      color: var(--muted);
    }
    @media (max-width: 480px) {
      .score-strip { grid-template-columns: repeat(2, 1fr); }
      .score-cell { border-left: none; border-bottom: 1px solid var(--line); }
      .score-cell:nth-child(odd) { border-left: 1px solid var(--line); }
      .score-cell:nth-last-child(-n+2) { border-bottom: none; }
    }

    .tb-primary { background: #075fc2; color: #fff; box-shadow: none; }
    .tb-secondary { background: #fff; color: var(--blue-dark); border: 1.5px solid var(--line) !important; }

    /* تنسيق الطالب */
    .info-box { padding: 16px 18px; }
    .info-box h3 {
      font-size: 13px;
      font-weight: 800;
      color: var(--section);
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 2px solid #cbd5e1;
    }
    .info-row {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      padding: 7px 0;
      font-size: 13px;
      border-bottom: 1px dashed #e8edf3;
    }
    .info-row:last-child { border-bottom: none; }
    .info-row .k {
      color: var(--label);
      font-weight: 800;
      font-size: 13px;
    }
    .info-row .v {
      font-weight: 700;
      font-size: 15px;
      color: var(--accent);
    }

    .tansiq-bar {
      height: 6px;
      background: #e8edf3;
      border-radius: 999px;
      margin: 10px 0 6px;
      overflow: hidden;
    }
    .tansiq-bar span {
      display: block;
      height: 100%;
      width: 82%;
      background: var(--accent);
      border-radius: 999px;
    }
    .tansiq-note { font-size: 12px; color: var(--muted); font-weight: 600; }

    /* grades — clean table */
    .grades-wrap {
      padding: 0;
      overflow: hidden;
      border: 1px solid var(--line);
    }
    .grades-wrap.is-main {
      border-color: #cfe3f8;
      box-shadow: var(--shadow);
    }
    .grades-wrap.is-extra {
      border-color: #f0dcc8;
      background: #fffcf8;
      box-shadow: var(--shadow);
    }

    .grades-banner {
      padding: 16px 18px 12px;
    }

    .grades-banner-title {
      font-size: 14px;
      font-weight: 900;
      line-height: 1.35;
      color: var(--section);
    }
    .grades-wrap.is-main .grades-banner-title { color: var(--blue-dark); }
    .grades-wrap.is-extra .grades-banner-title { color: var(--orange-deep); }

    .grades-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
    }
    .grades-table thead th {
      background: transparent;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      padding: 10px 14px 8px;
      text-align: right;
      border-bottom: 1px solid var(--line);
      letter-spacing: 0.02em;
    }
    .grades-table tbody td {
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      vertical-align: middle;
    }
    .grades-table tbody tr:last-child td { border-bottom: none; }
    .grades-table.is-main tbody tr { background: #fff; }
    .grades-table.is-extra tbody tr { background: #fffcf8; }

    .subj-cell {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .subj-icon {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--blue-soft);
      color: var(--blue-light);
      display: grid;
      place-items: center;
      font-size: 14px;
      flex-shrink: 0;
    }
    .subj-icon.extra {
      background: #f3ede6;
      color: #9a8468;
    }
    .grades-table .subj { color: var(--text); }
    .grades-table .subj-cell > span {
      font-weight: 800;
      color: #111827;
    }
    .grades-table .mark,
    .grades-table .pct,
    .grades-table .grd {
      font-variant-numeric: tabular-nums;
    }
    .grades-table .mark {
      direction: ltr;
      unicode-bidi: isolate;
      text-align: center;
      white-space: nowrap;
    }
    .grades-table .mark .big {
      font-size: 20px;
      font-weight: 900;
      color: var(--blue-dark);
      letter-spacing: -0.02em;
    }
    .grades-table.is-extra .mark .big { color: var(--blue-dark); }
    .grades-table .mark .max {
      font-size: 14px;
      font-weight: 700;
      color: #566578;
    }
    .grades-table .mark .slash {
      font-size: 14px;
      font-weight: 700;
      color: #98a3b3;
      margin: 0 3px;
    }
    .grades-table .pct {
      font-weight: 800;
      color: var(--green-bright);
      font-size: 15px;
      text-align: center;
    }
    .grades-table .grd {
      font-weight: 800;
      color: var(--green);
      font-size: 15px;
      text-align: center;
    }
    .grades-table .grd.warn { color: var(--orange-deep); }

    @media (max-width: 520px) {
      .grades-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
      .grades-table { min-width: 440px; }
    }

    .note { text-align: center; font-size: 12px; color: var(--muted); padding: 20px; font-weight: 600; }
  