@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===========================
   Instruction Modal (تعليمات)
=========================== */
.instr-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    padding: 16px;
}

body.instr-modal-open {
    overflow: hidden;
}

.instr-modal {
    width: min(800px, 100%);
    max-height: min(85vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.instr-modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.instr-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.instr-modal-body {
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.9;
}

.instr-modal-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: flex-start;
}

.instr-accept {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
}

.instr-list {
    margin: 0;
    padding: 0 18px 0 0;
}

.instr-list li {
    margin: 8px 0;
}

body, * {
    font-family: 'Cairo', sans-serif !important;
}

/* ===========================
   الأساسيات العامة
=========================== */
body {
    font-family: Tahoma, Arial, sans-serif;
    background: url('../assets/img/bannar0.jpeg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding-top: 60px;  /* مساحة للنڤبار فقط */
    padding-bottom: 20px;
    direction: rtl;
    text-align: right;
}

/* رسائل تنبيه (موحّدة) */
.success-box {
    border: 1px solid #2e7d32;
    background: #e8f5e9;
    color: #1b5e20;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 600;
}

.error-box {
    border: 1px solid #c62828;
    background: #ffebee;
    color: #b71c1c;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 600;
}

html {
    height: 100%;
}

.page-wrapper {
    min-height: calc(100vh - 60px - 80px); /* ارتفاع الشاشة - النڤبار - تقريب ارتفاع الفوتر */
}

.container {
    max-width: 1350px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.90);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    position: relative;
}

h1, h2, h3 {
    margin-top: 0;
}

.index-main-title {
    text-align: center;
}

/* ===========================
   العداد التنازلي
=========================== */

:root {
    --cd-main-color: #1fbbb4;
}

.countdown-cell {
    text-align: center;
    vertical-align: middle;
    padding: 4px 2px;
}

.countdown-cell.cd-text-only {
    font-size: 13px;
    font-weight: 600;
}

.cd-wrapper {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 100%;
    overflow: hidden;
}

.cd-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: conic-gradient(var(--cd-main-color) 0deg, #e6e6e6 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-inner {
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cd-value {
    font-weight: bold;
    font-size: 12px;
    line-height: 1;
}

.cd-label {
    font-size: 9px;
    line-height: 1.1;
}

/* حالة الاختبار بدأ – تومض بلون الثيم شبه شفاف */
.exam-started {
    font-weight: bold;
    animation: exam-blink 1s infinite;
    background-color: rgba(31, 187, 180, 0.15);
}

@keyframes exam-blink {
    0%   { background-color: rgba(31, 187, 180, 0.15); }
    50%  { background-color: rgba(31, 187, 180, 0.40); }
    100% { background-color: rgba(31, 187, 180, 0.15); }
}


/* ===========================
   الجداول العامة
=========================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

table th,
table td {
    border: 1px solid #ccc;
    padding: 6px 8px;
}

table th {
    background-color: #f0f0f0;
}

table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* عمود التاريخ في سطر واحد */
td:nth-child(2) {
    white-space: nowrap;
}


/* ===========================
   النماذج
=========================== */
form {
    margin: 10px 0;
}

input[type="text"],
input[type="password"],
input[type="file"],
input[type="number"],
input[type="email"],
textarea {
    padding: 8px 10px;
    margin: 4px 0;
    width: 250px;
    max-width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
}

select {
    padding: 8px 10px;
    margin: 4px 0;
    width: auto;
    max-width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

/* الشيك بوكس عام بلون #1fbbb4 */
input[type="checkbox"] {
    accent-color: #1fbbb4 !important;
}

button,
input[type="submit"] {
    padding: 8px 14px;
    margin-top: 6px;
    cursor: pointer;
    background: #1fbbb4;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
}

button:hover,
input[type="submit"]:hover {
    opacity: 0.9;
}

/* مدخل الأرقام للحصص */
.number-input {
    width: 80px;
    text-align: center;
}


/* ===========================
   شريط خطوات توزيع المراقبين
=========================== */
.steps {
    margin: 10px 0 15px;
}

.steps span {
    display: inline-block;
    padding: 6px 14px;
    margin-left: 5px;
    border-radius: 6px;
    background: #e9f5fb;
    font-size: 13px;
    color: #333;
}

.steps span.active {
    background: #1fbbb4;
    color: #fff;
    font-weight: bold;
}

/* نصوص صغيرة للملاحظات */
.small-text {
    font-size: 13px;
    color: #555;
}

/* معلومات عامة */
.info-box {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 10px 0;
    font-size: 13px;
}

/* ملخص الحصص */
.quota-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    margin: 10px 0;
}

.quota-summary div {
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #eee;
    padding: 4px 8px;
}


/* ===========================
   رسائل النظام
=========================== */
.msg-ok {
    color: green;
    margin-bottom: 10px;
}

.msg-err {
    color: red;
    margin-bottom: 10px;
}

.checkbox-center {
    text-align: center;
}

/* صناديق الرسائل الجديدة */
.message-box,
.error-box {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.message-box {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.error-box {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
}


/* ===========================
   أزرار أعلى الجداول
=========================== */
.actions-top {
    margin-bottom: 15px;
}

.actions-top form {
    display: inline-block;
    margin-left: 8px;
    margin-bottom: 0;
}

.actions-top button,
.actions-top input[type="submit"] {
    display: inline-block;
    min-width: 260px;
    text-align: center;
    margin-top: 0;
}


/* ===========================
   شريط التصفح
=========================== */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
    background: #1fbbb4;
    color: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo {
    height: 22px;
    vertical-align: middle;
    margin-left: 10px;
    flex: 0 0 auto;
}

/* زر القائمة للجوال – مخفي في الكمبيوتر */
.navbar-toggle {
    display: none;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #fff;
    margin-right: 5px;
    flex: 0 0 auto;
}

/* مجموعة الروابط الرئيسية */
.nav-links {
    display: inline-block;
}

.nav-main-links,
.nav-guest-links {
    display: inline-block;
}

/* الروابط داخل النڤبار */
.navbar a {
    color: #fff;
    margin-left: 8px;
    text-decoration: none;
}

.navbar a:hover {
    text-decoration: underline;
}

/* اسم المستخدم */
.user-fullname {
    font-weight: bold;
    margin-right: auto;
}

/* تبويب الحساب – ينفصل لأقصى اليسار */
.navbar .account-tab {
    margin-right: auto;
    position: relative;
}


/* ===========================
   القوائم المنسدلة (للشريط العلوي)
=========================== */
.dropdown {
    display: inline-block;
    position: relative;
    margin-left: 8px;
}

.dropdown-btn {
    cursor: pointer;
    color: #fff;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 170px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 20;
    text-align: right;
    right: 0;
}

.dropdown-content a {
    display: block;
    padding: 8px 10px;
    color: #333;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background: #f3f3f3;
}

/* في الكمبيوتر – على الهوفر */
.dropdown:hover .dropdown-content {
    display: block;
}

/* قائمة تبويب الحساب */
.navbar .account-tab .dropdown-content {
    right: auto;
    left: 0;
}


/* ===========================
   حالات خاصة
=========================== */
.row-conflict {
    background-color: #ffe0e0;
}

.js-conflict-message {
    color: #b00020;
    margin-bottom: 8px;
    font-size: 13px;
}

.missing {
    background: #fdecea;
}


/* ===========================
   نماذج الفلترة
=========================== */
.filter-form {
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #ccc;
    background: #fafafa;
}

.filter-form label {
    margin-left: 8px;
    font-weight: bold;
}

.filter-form select {
    margin-left: 15px;
    padding: 3px 6px;
}

.filter-form button,
.filter-form a {
    margin-right: 10px;
    padding: 4px 10px;
    text-decoration: none;
}


/* ===========================
   أنماط من inline
=========================== */
.inl_1 { color: green; }
.inl_2 { color: red; }
.inl_3 { display: none; }
.inl_4 { margin-top: 10px; padding: 5px 12px; }
.inl_5 { margin-top: 15px; margin-bottom: 10px; }
.inl_6 { text-align: center !important; }
.inl7  { font-size: 13px; color: #555; }
.inl10 { margin-top: 15px; }
.inl11 { margin-top: 10px; }
.inl12 { margin-top: 20px; }
.inl13 { min-height: 220px; }

.inl5  { margin-top: 15px; margin-bottom: 10px; }
.inl6  { text-align: center !important; }
.inl8  { margin-left: 8px; }
.inl9  { margin-left: 0; }
.inl15 { white-space: nowrap; }


/* ===========================
   أزرار إضافية
=========================== */
.print-btn {
    float: left;
}

.btn-back {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 10px;
    border: 1px solid #999;
    background-color: #1fbbb4;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
}

.btn-back:hover {
    opacity: 0.9;
}


/* ===========================
   إدارة قاعدة البيانات
=========================== */
.db-actions-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.db-card {
    flex: 1 1 300px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
}

.db-card h2 {
    margin-top: 0;
    font-size: 18px;
}

.db-card p {
    margin: 5px 0 10px 0;
    font-size: 14px;
}

.db-card form {
    margin-top: 10px;
}

.db-card button {
    padding: 6px 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #1fbbb4;
    color: #fff;
}

.btn-danger {
    background: #1fbbb4;
    color: #fff;
}

.db-card select,
.db-card input[type="text"],
.db-card input[type="file"] {
    width: 100%;
    padding: 6px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.page-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

.warning-text {
    font-size: 13px;
    color: #b71c1c;
}


/* ===========================
   قوائم المقررات / المستبعدة
=========================== */
.dual-list-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
    margin-top: 10px;
}

.dual-list-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dual-list-column select {
    width: 100%;
    max-width: 100%;
    flex: 1;
}

.dual-list-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.dual-list-controls button {
    padding: 6px 12px;
    min-width: 50px;
}

.reg-status-box {
    border: 1px solid #ccc;
    background: #fafafa;
    padding: 10px;
    width: 260px;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 5px;
}

.reg-status-item {
    display: block;
    padding: 4px 2px;
    font-size: 14px;
    cursor: pointer;
}

.reg-status-item input {
    margin-left: 6px;
}


/* ===========================
   مربع البحث + القائمة (مقررات مجدولة)
=========================== */
.list-with-filter {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.list-with-filter .course-filter-input {
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 6px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    flex: 0 0 auto;
}

.list-with-filter select {
    border: none;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
}


/* ===========================
   الفوتر
=========================== */
.main-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px 0;
    text-align: center;
    z-index: 999;
}

.main-footer small {
    font-size: 12px;
}


/* ===========================
   نماذج الدخول / تغيير كلمة المرور
=========================== */
.auth-form,
.change-pass-form {
    text-align: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.auth-form label,
.change-pass-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form select,
.change-pass-form input[type="text"],
.change-pass-form input[type="password"],
.change-pass-form select {
    width: 100%;
    max-width: 100%;
    margin-bottom: 18px;
}

.auth-form input[type="submit"],
.change-pass-form input[type="submit"],
.auth-form button,
.change-pass-form button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: #1fbbb4;
    color: #fff;
    border: 0;
    border-radius: 6px;
}

.auth-form input[type="submit"]:hover,
.change-pass-form input[type="submit"]:hover {
    opacity: 0.9;
}

.login-logo {
    text-align: center;
    margin-bottom: 15px;
}

.login-logo img {
    width: 250px;
}

body.auth-page .container {
    max-width: 420px;
    margin: 60px auto 40px;
}




/* ===========================
   إظهار/إخفاء كلمة المرور + تحذير CapsLock (SVG)
=========================== */
.pw-field{
    position: relative;
}

.pw-field input.js-password{
    padding-left: 44px;
}

.pw-toggle{
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-toggle img{
    width: 22px;
    height: 22px;
    display: block;
}

.caps-warning{
    display: none;
    color: #b71c1c;
    font-size: 13px;
    margin-top: -12px;
    margin-bottom: 12px;
    text-align: right;
}


/* ===========================
   نماذج المستخدمين / القاعات
=========================== */
.user-grid-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 25px;
    width: 100%;
    margin-top: 15px;
}

.user-grid-form .form-cell {
    display: flex;
    flex-direction: column;
}

.user-grid-form label {
    font-weight: bold;
    margin-bottom: 6px;
}

.user-grid-form input[type="text"],
.user-grid-form input[type="password"],
.user-grid-form select {
    width: 100%;
}

.user-grid-form .form-actions {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 10px;
}

.room-grid-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 25px;
    width: 100%;
    margin-top: 15px;
}

.room-grid-form .form-cell {
    display: flex;
    flex-direction: column;
}

.room-grid-form label {
    font-weight: bold;
    margin-bottom: 6px;
}

.room-grid-form input[type="text"],
.room-grid-form input[type="number"],
room-grid-form select {
    width: 100%;
}

.room-grid-form .form-actions {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 10px;
}


/* ===========================
   التقارير
=========================== */
.reports-layout {
    display: flex;
    gap: 20px;
}

/* ===========================
   سجل الزيارات - كروت ملخص
=========================== */
.report-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 10px 0 18px;
    text-align: center;
}

.summary-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.summary-label {
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.summary-value {
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

.reports-sidebar {
    width: 220px;
    background: #f7f7f7;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.reports-sidebar h3 {
    margin: 10px 0 6px;
    font-size: 15px;
    color: #333;
}

.reports-sidebar a {
    display: block;
    padding: 6px 8px;
    margin-bottom: 4px;
    text-decoration: none;
    font-size: 14px;
    color: #333;
    border-radius: 4px;
}

.reports-sidebar a:hover {
    background: #e9f5fb;
}

.reports-sidebar a.active {
    font-weight: bold;
    border-right: 4px solid #1fbbb4;
    background: #e9f5fb;
}

.reports-content {
    flex: 1;
    min-width: 0;
}

.report-filters {
    margin-bottom: 10px;
    background: #fafafa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 13px;
}

.report-filters label {
    margin-left: 10px;
    font-size: 13px;
}

.report-filters input[type="date"],
.report-filters select {
    font-size: 13px;
}

.report-actions {
    margin-top: 8px;
}

.report-actions button {
    margin-left: 5px;
}

.report-table {
    font-family: tahoma !important;
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}

.report-table *{
    font-family: Tahoma, Arial, sans-serif !important;
}

.report-table-print {
    font-family: tahoma !important;
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}

.report-table th,
.report-table td {
    border: 1px solid #ccc;
    padding: 4px 6px;
}

.report-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.group-row {
    background: #e9f5fb;
    font-weight: bold;
}

.no-data {
    text-align: center;
    padding: 10px;
    color: #555;
}

.monitor-title,
.room-title,
.section-title {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 16px;
}

/* كابتشن اسم المراقب في جداول التقارير */
.monitor-caption {
    display: none;
}

/* كابتشن اسم القاعة في جداول القاعات */
.room-caption {
    display: none;
}

.room-block {
    page-break-inside: avoid;
    break-inside: avoid;
}

.report-main-title {
    margin-top: 10px;
    margin-bottom: 10px;
}

.page-break {
    page-break-before: always;
}


/* ===========================
   غلاف التقارير + الووترمارك
=========================== */
.print-cover {
    display: none;
}

.cover-inner {
    text-align: center;
    padding-top: 120px;
}

.cover-title-main {
    font-size: 20px;
    margin: 2px 0;
    font-weight: bold;
}

.cover-title-sub {
    font-size: 18px;
    margin: 2px 0 10px;
}

.cover-title-report {
    font-size: 16px;
    margin-top: 12px;
    margin-bottom: 8px;
    font-weight: bold;
}

.cover-meta {
    margin-top: 24px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.cover-meta span {
    display: inline-block;
}

.print-watermark {
    display: none;
}

.print-watermark-text {
    font-size: 28px;
    margin: 20px;
    transform: rotate(-30deg);
    white-space: nowrap;
}


/* ===========================
   هيدر الجدول العام + مربع البحث
=========================== */
.general-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.table-search-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-search-inline input {
    padding: 6px 10px;
    width: 220px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.header-section {
    width: 33%;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
}
.header img {
    width: 200px;
    height: auto;
    margin-top: 5px;
}


/* ===========================
   إعدادات الطباعة النهائية
=========================== */
@media print {
    body {
        background: #ffffff !important;
        background-image: none !important;
        padding: 0;
    }

    body.reports-page {
        margin: 0 !important;
        padding: 0 !important;
    }

    body.reports-page .page-wrapper {
        padding-top: 0 !important;
        min-height: auto !important;
    }

    body.reports-page .page-wrapper > .container {
        margin-top: 0 !important;
    }

    .navbar,
    .main-footer,
    .no-print {
        display: none !important;
    }

    .countdown-col {
        display: none !important;
    }

    body.print-student .general-section,
    body.print-student .finished-section {
        display: none !important;
    }

    body.print-general .student-section,
    body.print-general .finished-section {
        display: none !important;
    }

    body.print-student h1,
    body.print-general h1 {
        display: none !important;
    }

    body.print-student hr,
    body.print-general hr {
        display: none !important;
    }

    .page-break {
        page-break-before: always;
    }

    .print-cover {
        display: block;
        page-break-after: always;
    }

    .print-watermark {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 9999;
        flex-wrap: wrap;
        justify-content: center;
        align-content: center;
        pointer-events: none;
        opacity: 0.04;
    }

    body.reports-page .page-wrapper,
    body.reports-page .container,
    body.reports-page .reports-content,
    body.reports-page .report-table {
        position: relative;
        z-index: 1;
    }

    body.reports-page h1,
    body.reports-page .report-main-title,
    body.reports-page .monitor-title,
    body.reports-page .room-title,
    body.reports-page .section-title {
        display: none !important;
    }

    .monitor-caption {
        display: table-caption;
        caption-side: top;
        font-weight: bold;
        text-align: right;
        padding-bottom: 6px;
    }

    .room-caption {
        display: table-caption;
        caption-side: top;
        font-weight: bold;
        text-align: right;
        padding-bottom: 6px;
    }

    .report-table tr,
    .report-table td,
    .report-table th {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    
  /* لا نبي sticky ولا قيود ارتفاع/سكرول وقت الطباعة */
  .reports-layout,
  .reports-content,
  .report-view,
  .table-scroll-20 {
      height: auto !important;
      max-height: none !important;
      overflow: visible !important;
      position: static !important;
  }

  /* الفلاتر تظهر عادي بدون تثبيت */
  .report-filters {
      position: static !important;
      top: auto !important;
  }

  /* غالباً ما نبي السايدبار بالطباعة (إذا تبغاه احذف هالسطر) */
  .reports-sidebar {
      display: none !important;
  }

  /* ضمان الطباعة تكمل بدون قص */
  body.reports-page,
  body.reports-page .page-wrapper,
  body.reports-page .container {
      overflow: visible !important;
      height: auto !important;
  }
}

/* ===========================
   صفحة محضر الغش
=========================== */
.cheat-search-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.cheat-report-title {
    text-align: center;
    margin: 12px 0 14px;
}

.cheat-report-title-main {
    font-size: 18px;
    font-weight: 700;
}

.cheat-report-title-sub {
    font-size: 14px;
    margin-top: 4px;
}

.cheat-info-table td {
    font-size: 14px;
}

.cheat-section {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: rgba(255,255,255,0.55);
}

.cheat-section-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.radio-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cheat-options {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

.cheat-options label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cheat-options .other-row input[type="text"] {
    margin-right: 8px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 220px;
    max-width: 100%;
}

.cheat-notes {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    resize: vertical;
}

.cheat-monitors-table input[type="text"] {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px 10px;
}

.cheat-committee-head {
    padding: 10px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.cheat-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hint {
    font-size: 12px;
    color: #555;
    margin-top: 6px;
}

/* نافذة معاينة الصور (محضر الغش) */
.img-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.img-preview-modal.open {
    display: block;
}

.img-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.img-preview-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(900px, calc(100% - 24px));
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.img-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
}

.img-preview-close {
    background: transparent;
    border: 0;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.img-preview-body {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
    padding: 12px;
}

.img-preview-body img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

.img-preview-nav {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.img-preview-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.img-preview-footer {
    padding: 10px 12px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 13px;
    color: #444;
}

@media (max-width: 991px) {
    .cheat-search-form .form-row {
        grid-template-columns: 1fr;
    }
    .cheat-options {
        grid-template-columns: 1fr;
    }
}


/* ===========================
   رسالة خطأ تسجيل الدخول
=========================== */
.error-box {
    margin-top: 8px;
    background: #ffe5e5;
    border-right: 4px solid #d40000;
    padding: 10px 12px;
    font-size: 14px;
    color: #b10000;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.error-icon {
    font-size: 18px;
    margin-left: 6px;
}

.forgot-msg {
    margin-top: 6px;
    font-size: 13.5px;
    color: #444;
    padding-right: 5px;
}

/* زر اعادة ضبط كلمة المرور */
.reset-cell {
    text-align: center;
    vertical-align: middle;
}
.reset-btn {
    white-space: nowrap;
}


/* ===========================
   القائمة الجانبية للجوال
=========================== */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -295px;
    width: 295px;
    height: 100vh;
    background: #1fbbb4;
    color: #fff;
    z-index: 1000;
    padding: 70px 20px 20px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.3);
    overflow-y: auto;
    transition: right 0.3s ease;
}

body.sidebar-open .mobile-sidebar {
    right: 0;
}

.mobile-user-fullname {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 10px;
}

.mobile-sections {
    display: block;
}

.mobile-section {
    margin-bottom: 12px;
}

.mobile-section-title {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 4px;
    opacity: 0.95;
}

.mobile-sidebar .nav-links,
.mobile-sidebar .account-tab {
    display: block;
    width: 100%;
}

.mobile-sidebar a {
    color: #fff;
    text-decoration: none;
    padding: 3px 0;
    display: block;
    font-size: 25px;
}

.mobile-sidebar a:hover {
    text-decoration: underline;
}


/* إعدادات الجوال */
@media (max-width: 991px) {
    /* إظهار زر الهامبرغر */
    .navbar-toggle {
        display: inline-block;
    }

    /* إخفاء روابط المستخدم المسجّل وتبويب الحساب في النڤبار */
    .navbar .nav-main-links,
    .navbar .account-tab {
        display: none;
    }

    /* إبقاء روابط الزائر (الجدول العام + تسجيل الدخول) ظاهرة */
    .navbar .nav-guest-links {
        display: inline-block;
    }

    /* اسم المستخدم يبقى ظاهر في الجوال */
    .navbar .user-fullname {
        display: inline-block;
        margin-right: auto;
        font-size: 13px;
        max-width: 45%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* حالة طلبات المعامل*/
.status-assigned-lab {
    background-color: #d4edda;
    color: #155724;
    font-weight: bold;
}

.status-assigned-room {
    background-color: #f8d7da;
    color: #721c24;
    font-weight: bold;
}





/* رز التحضير*/
.btn-one-line {
    white-space: nowrap;   /* يمنع نزول النص */
    min-width: 110px;      /* عرض ثابت للزر */
    text-align: center;
}

.table-one-line
{   
    white-space: nowrap;   /* يمنع نزول النص */
}

.attendance-room
{
 width: 150px;
}



/* ===========================
   إظهار/إخفاء كلمة المرور + تحذير CapsLock
=========================== */



/* مساحة للأيقونة داخل الحقل */
.pw-field { 
  position: relative; 
}
.pw-field input.js-password{
  padding-left: 42px;
}

/* Override قوي لأن عندك .auth-form button { width:100% } */
.auth-form .pw-field .pw-toggle,
.change-pass-form .pw-field .pw-toggle{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);

  /* أهم سطرين: يمنع تغطية الحقل */
  width: 20px !important;
  height: 20px !important;

  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 3;      /* فوق الحقل */
  line-height: 0;  /* يلغي الفراغ */
}

/* SVG */
.auth-form .pw-field .pw-toggle img,
.change-pass-form .pw-field .pw-toggle img{
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none; /* الضغط يكون على الزر فقط */
}
/* تثبيت السايدبار والفلاتر في التقارير + سكرول داخل منطقة العرض فقط */
.reports-layout {
    align-items: flex-start;
}

.reports-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(160vh);
    overflow-y: auto;
}

.reports-content {
    flex: 1;
    max-height: calc(160vh);
    overflow: auto;
}

/* تثبيت شريط الفلاتر داخل منطقة العرض */
.report-filters {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid #ddd;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* سجل الزيارات: عرض ~20 صف ثم سكرول داخل الجدول */
.table-scroll-20 {
    max-height: 720px; /* تقريباً 20 صف */
    overflow: auto;
}


/* =========================
   Attendance (غياب/حضور)
   أضفها داخل assets/style.css
========================= */

/* خلية الغياب (أحمر فاتح) */
.td-attendance.is-absent{
    background: #ffe5e5;   /* أحمر فاتح */
    font-weight: 700;
}

/* (اختياري) خلية الحضور (أخضر فاتح) */
.td-attendance.is-present{
    background: #e9fbe9;
    font-weight: 700;
}

