/* الخطوط محلية (تعمل بدون إنترنت) */
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/plex-arabic-400.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/plex-arabic-500.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/plex-arabic-600.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/plex-arabic-700.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-700.woff2') format('woff2'); }

/* أنماط إضافية لا تغطيها Tailwind */
html { -webkit-tap-highlight-color: transparent; }
body { font-feature-settings: "ss01"; }
.font-en { font-family: Inter, system-ui, sans-serif; }

/* سهم القوائم في الاتجاه العربي */
[dir="rtl"] select { background-position: left .6rem center; padding-left: 2.25rem; padding-right: .875rem; }

/* Toast */
.toast { animation: toast-in .22s ease-out; }
.toast-out { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* Modal */
.modal .modal-backdrop { opacity: 0; transition: opacity .15s ease; }
.modal .modal-panel { opacity: 0; transform: translateY(16px); transition: opacity .18s ease, transform .18s ease; }
.modal.modal-open .modal-backdrop { opacity: 1; }
.modal.modal-open .modal-panel { opacity: 1; transform: none; }
@media (min-width: 640px) { .modal .modal-panel { transform: translateY(8px) scale(.98); } }

/* Combobox */
.combo-item.is-active, .combo-add.is-active { background: #eef4ff; }
.combo.is-open .combo-trigger { box-shadow: inset 0 0 0 2px #3463f8; }
@media (max-width: 639px) { .combo-panel:not(.hidden) { animation: sheet-in .2s ease-out; } }
@keyframes sheet-in { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }

/* Dropzone */
[data-dropzone].is-drag { border-color: #3463f8; background: #eef4ff; }
[data-dropzone].has-file { border-style: solid; border-color: #86efac; background: #f0fdf4; }

/* خيارات السؤال للطالب */
.opt input:checked + .opt-box { border-color: #1f45ec; background: #eef4ff; box-shadow: 0 0 0 3px rgba(52,99,248,.15); }
.opt input:checked + .opt-box .opt-letter { background: #1f45ec; color: #fff; border-color: #1f45ec; }
.opt input:focus-visible + .opt-box { outline: 3px solid #bcd3ff; outline-offset: 2px; }
.q-enter { animation: q-in .22s ease-out; }
@keyframes q-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* شريط تمرير رفيع */
.thin-scroll::-webkit-scrollbar { height: 6px; width: 6px; }
.thin-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9px; }

/* الطباعة */
@media print {
  @page { size: A4; margin: 12mm 10mm; }
  body { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print { display: none !important; }
  .print-sheet { box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .print-table th, .print-table td { padding: 5px 6px !important; font-size: 11.5px !important; }
  .print-table tr { page-break-inside: avoid; }
  .print-table thead { display: table-header-group; }
}

/* أدوات إضافية غير موجودة في tailwind.css المبني مسبقاً (شريط انقطاع الاتصال وتفاصيل الجهاز) */
.bg-white\/20 { background-color: rgb(255 255 255 / .2); }
.hover\:bg-white\/30:hover { background-color: rgb(255 255 255 / .3); }
.opacity-50 { opacity: .5; }
.break-all { word-break: break-all; }
