/* أوراق A4 الاحترافية لمنصة الأستاذ — تُستخدم في المعاينة والطباعة وتصدير HTML وPDF.
   ألوان صريحة غير مرتبطة بالثيم: الورقة بيضاء في الثيمين، والطباعة لا تتأثر بالوضع الليلي. */
.doc-sheet{--ink:#16203a;--muted:#5b6b85;--line:#d9e1ee;--soft:#f3f6fb;--accent:#2563c9;--accent2:#06b6d4;
  direction:rtl;font-family:Tajawal,'Segoe UI',Tahoma,Arial,sans-serif;color:var(--ink);background:#fff;
  width:210mm;min-height:297mm;margin:0 auto 18px;padding:13mm 14mm 12mm;box-sizing:border-box;position:relative;
  border-radius:4px;box-shadow:0 18px 50px -24px rgba(23,32,51,.45);border:1px solid #e3e8f2;font-size:13px;line-height:1.8;
  display:flex;flex-direction:column;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.doc-sheet.landscape{width:297mm;min-height:210mm}
.doc-sheet *{box-sizing:border-box}
.doc-sheet::before{content:"";position:absolute;inset:0 0 auto;height:5px;background:linear-gradient(90deg,var(--accent2),var(--accent));border-radius:4px 4px 0 0}
.ds-head{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;padding-bottom:10px;border-bottom:2px solid var(--accent)}
.ds-head-r,.ds-head-l{display:flex;flex-direction:column;gap:1px;font-size:12px;line-height:1.75}
.ds-head-r span{font-weight:700}
.ds-head-r span:last-child{color:var(--accent);font-weight:800}
.ds-head-l{text-align:left;color:var(--muted);font-size:11.5px}
.ds-logo{width:66px;height:66px;object-fit:contain;display:block}
.ds-logo-mark{display:grid;place-items:center;border-radius:18px;color:#fff;background:linear-gradient(135deg,var(--accent),var(--accent2))}
.ds-logo-mark svg{width:38px;height:38px}
.ds-title{text-align:center;margin:14px 0 8px}
.ds-title h1{margin:0;font-size:21px;font-weight:800;color:#1b3f86;letter-spacing:0}
.ds-title p{margin:3px 0 0;color:var(--muted);font-size:12.5px}
.ds-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 8px;margin:6px 0 12px}
.ds-meta span{background:var(--soft);border:1px solid var(--line);border-radius:8px;padding:3px 11px;font-size:11.5px}
.ds-meta b{color:var(--muted);font-weight:700}
.ds-body{flex:1}
.ds-section{margin:12px 0;break-inside:auto}
.ds-section>h2,.ds-h{font-size:14.5px;margin:0 0 8px;padding:5px 12px;color:#1b3f86;background:linear-gradient(90deg,transparent,#eaf1fd);border-inline-start:4px solid var(--accent);border-radius:6px;font-weight:800;break-after:avoid}
.ds-body p{margin:0 0 8px}
.ds-note,.ds-legend{font-size:11.5px;color:var(--muted);background:var(--soft);border:1px dashed var(--line);border-radius:8px;padding:6px 10px}
.ds-empty{color:var(--muted);text-align:center;padding:12px;border:1px dashed var(--line);border-radius:10px}
.ds-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin:8px 0 12px}
.ds-kpi{border-radius:12px;padding:10px 8px;text-align:center;border:1px solid var(--line);background:#fff;position:relative;overflow:hidden}
.ds-kpi::after{content:"";position:absolute;inset:auto 0 0;height:3px;background:var(--c,#3987e5)}
.ds-kpi b{display:block;font-size:21px;line-height:1.3;color:var(--c,#3987e5);font-weight:800}
.ds-kpi span{font-size:11px;color:var(--muted)}
.ds-kpi.t1{--c:#2563c9}.ds-kpi.t2{--c:#d95926}.ds-kpi.t3{--c:#12855c}.ds-kpi.t4{--c:#b37700}.ds-kpi.t5{--c:#c43f71}.ds-kpi.t6{--c:#0e7f99}.ds-kpi.t7{--c:#6f5fd6}.ds-kpi.t8{--c:#c43f3f}
.ds-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
.ds-cols.three{grid-template-columns:180px 1fr;align-items:center}
.ds-cols>.ds-section{margin:0}
.ds-ring{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.ds-ring small{color:var(--muted)}
.ds-table{width:100%;border-collapse:collapse;font-size:11.5px;margin:4px 0 6px;break-inside:auto}
.ds-table thead{display:table-header-group}
.ds-table th{background:#2563c9;color:#fff;font-weight:700;padding:6px 6px;border:1px solid #2563c9;text-align:center}
.ds-table td{padding:5px 6px;border:1px solid var(--line);text-align:center;vertical-align:middle}
.ds-table td:nth-child(2){text-align:right}
.ds-table tbody tr:nth-child(even) td{background:#f7f9fd}
.ds-table tr{break-inside:avoid}
.ds-table .n{width:30px;color:var(--muted)}
.ds-table.compact{font-size:10.5px}.ds-table.compact td,.ds-table.compact th{padding:4px}
.ds-table.tall td{height:30px}
.ds-table.grid-sheet td{height:24px;min-width:22px}
.ds-table.grid-sheet td:nth-child(2){min-width:150px}
.ds-letter{font-size:14px;line-height:2.15;padding:4px 6px}
.ds-letter p{margin:0 0 10px;text-align:justify}
.ds-points{margin:0 0 10px;padding-inline-start:24px}
.ds-points li{margin:2px 0}
.ds-sign{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-top:22px;break-inside:avoid}
.ds-sign>div{display:flex;flex-direction:column;gap:6px;text-align:center;font-size:12px;padding-top:6px}
.ds-sign b{color:#1b3f86}
.ds-foot{display:flex;justify-content:space-between;gap:10px;margin-top:14px;padding-top:6px;border-top:1px solid var(--line);font-size:10px;color:#98a3b8}
/* charts inside documents */
.doc-sheet .chart{margin:0;break-inside:avoid}
.doc-sheet .chart svg{width:100%;height:auto;display:block}
.doc-sheet .chart .grid{stroke:#e3e9f3;stroke-width:1}
.doc-sheet .chart .axis{fill:#7b8aa5;font-size:11px;font-family:inherit}
.doc-sheet .donut-chart{display:flex;align-items:center;gap:14px;justify-content:center;flex-wrap:wrap}
.doc-sheet .donut-chart svg{width:150px;height:150px}
.doc-sheet .donut-track{stroke:#edf1f7}
.doc-sheet .donut-value,.doc-sheet .ring-value{fill:#16203a;font-size:22px;font-weight:800;font-family:inherit}
.doc-sheet .donut-sub{fill:#7b8aa5;font-size:11px}
.doc-sheet .chart-legend{display:flex;flex-wrap:wrap;gap:4px 12px;justify-content:center;font-size:11px;color:var(--muted);margin-top:4px}
.doc-sheet .chart-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-inline-end:5px;vertical-align:-1px}
.doc-sheet .chart-legend b{color:var(--ink)}
.doc-sheet .bar-list{display:grid;gap:6px}
.doc-sheet .bl-row{display:grid;grid-template-columns:minmax(90px,38%) 1fr auto;gap:8px;align-items:center;font-size:11.5px}
.doc-sheet .bl-track{height:11px;background:#edf1f7;border-radius:99px;overflow:hidden}
.doc-sheet .bl-fill{display:block;height:100%;border-radius:99px}
.doc-sheet .chart-empty{color:var(--muted);font-size:11.5px;text-align:center;padding:16px;border:1px dashed var(--line);border-radius:10px}
.doc-sheet .ring .donut-track{stroke:#edf1f7}
.honor-podium{display:flex;justify-content:center;align-items:flex-end;gap:10px;margin:6px 0 12px}
.podium{display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 14px;border-radius:14px 14px 4px 4px;background:linear-gradient(180deg,#fff7e0,#fff);border:1px solid #f0dca0;min-width:120px}
.podium.p1{padding-top:22px;background:linear-gradient(180deg,#ffe9a8,#fff)}
.podium span{font-size:24px}.podium small{color:var(--muted)}
.seat-board{text-align:center;background:#1f3b2c;color:#fff;border-radius:8px;padding:6px;margin:6px auto 14px;width:60%;font-weight:700}
.seat-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.seat{border:1px solid var(--line);border-radius:10px;padding:10px 6px;text-align:center;font-size:11.5px;min-height:48px;background:#fbfcfe}
.seat small{display:block;color:var(--muted);font-size:10px}
.card-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.stu-card{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;font-size:11.5px;break-inside:avoid;border-top:4px solid var(--accent)}
.stu-card b{font-size:13px}
.stu-card .lines i{display:block;border-bottom:1px dotted #b8c3d6;height:18px}
@media print{
  .doc-sheet{box-shadow:none;border:0;margin:0;width:auto;min-height:auto;padding:0;border-radius:0;break-after:page}
  .doc-sheet:last-child{break-after:auto}
  .doc-sheet::before{border-radius:0}
}
