:root {
    direction: rtl;
    writing-mode: horizontal-tb;
    text-orientation: mixed;  
    --main-color: #485265;
    --secondary-color: #DDD;
    --accent-color: #EFEFEF;
    --background-color: #FFF;
    --warn-color: #FFFFA9;
    --text-color: #444;
    --nav-color: #BBB;
    --shaddow: 0px 0px 5px rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.8);
    --input-bg: #EEEEEE;
    --select-accent: #888;
    /* Font sizes */
    --fs10: 10px;
    --fs12: 12px;
    --fs14: 14px;
    --fs16: 16px;
    --fs18: 18px;
    --fs20: 20px;
    --fs20: 22px;
    --fs24: 24px;
    --fs26: 26px;
    --fs28: 28px;
    --fs32: 32px;
    --fs36: 36px;
    --fs40: 40px;
    /* Transitions */
    --transition: all 0.3s ease;
}

/*------BUG--------*/
.BUG{
	z-index:90000;
	background-color: #EEE;
	position:fixed;
	top:0;left:0;
	border:1px dashed red;
	color:red;
	float:left;
	margin: 20px;
	padding: 20px;
	direction: LTR;
}
/*------BUG--------*/

.FS-6 { font-size: var(--fs26); }
.FS-4 { font-size: var(--fs24); }
.FS-3 { font-size: var(--fs20); }
.FS-2 { font-size: var(--fs16); }
.FS-1 { font-size: var(--fs12); }

:root ::selection {
    background-color: var(--warn-color);
    color: var(--text-color);
}

/* Font Faces */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

.Cairo { font-family: "Cairo"; }

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Bold.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

.Tajawal { font-family: "Tajawal"; }

@font-face {
    font-family: 'Readex';
    src: url('../fonts/ReadexPro-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Readex';
    src: url('../fonts/ReadexPro-Bold.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

.Readex { font-family: "Readex"; }

@font-face {
    font-family: 'Naskh';
    src: url('../fonts/NotoNaskhArabic-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Naskh';
    src: url('../fonts/NotoNaskhArabic-Bold.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

.Naskh { font-family: "Naskh"; }

@font-face {
    font-family: 'MarkaziText';
    src: url('../fonts/MarkaziText-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MarkaziText';
    src: url('../fonts/MarkaziText-Bold.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

.MarkaziText { font-family: "MarkaziText"; }

@font-face {
    font-family: 'Kufam';
    src: url('../fonts/Kufam-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kufam';
    src: url('../fonts/Kufam-Bold.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

.Kufam { font-family: "Kufam"; }

@font-face {
    font-family: 'Fustat';
    src: url('../fonts/Fustat-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fustat';
    src: url('../fonts/Fustat-Bold.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

.Fustat { font-family: "Fustat"; }

@font-face {
    font-family: "Samra";
    src: url("../fonts/Hacen_Samra_Lt.eot");
    src: url("../fonts/Hacen_Samra_Lt.eot?#iefix") format("embedded-opentype"),
         url("../fonts/Hacen_Samra_Lt.ttf") format("truetype");
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}

.Samra { font-family: "Samra"; }

@font-face {
    font-family: "Hacen";
    src: url("../fonts/HacenLinerScreen.eot");
    src: url("../fonts/HacenLinerScreen.eot?#iefix") format("embedded-opentype"),
         url("../fonts/HacenLinerScreen.woff2") format("woff2"),
         url("../fonts/HacenLinerScreen.woff") format("woff"),
         url("../fonts/HacenLinerScreen.ttf") format("truetype");
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}

.Hacen { font-family: 'Hacen'; }

/* Connection Status Bar */
#offline-bar {
    display: none;
    background-color: red;
    color: #FFF;
    text-align: center;
    padding: 40px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    font-size: 16px;
    font-weight: bold;
    opacity: 0.5;
}

/* Body Styles */
body {
    direction: rtl;
    writing-mode: horizontal-tb;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    font-family: 'Hacen', sans-serif;
    font-weight: normal;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;

    /* ... القيم الحالية ... */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* ← هذا هو المفتاح */
}


/* Scrollbar Customization */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

/* Page Layout */
.page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    max-width: 99vw;
    min-height: 400px;
    padding: 1px 4px 4px 4px;
    margin: 0 auto;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
     flex: 1 0 auto;
}

/* Headings */
h1 {
    font-size: 3rem;
    font-family: "Samra", sans-serif;
    color: #FFF;
    letter-spacing: 0em;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

p {
    font-size: 1rem;
}

/* Logo Styles */
.logo {
    margin: 50px;
    height: 120px;
    width: 120px;
    position: relative;
}

.w-logo {
    margin: 10px;
    padding: 10px;
    height: 100px;
    width: 100px;
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .logo {
        height: 100px;
        width: 100px;
    }
    
    .w-logo {
        margin: 0;
        height: 50px;
        width: 60px;
        padding-right: 20px;
    }
    
    h1 {
        font-size: 1rem;
        line-height: 50px;
    }
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header and Footer */
header {
    position: relative;
    background: linear-gradient(45deg, #000, var(--main-color));
    text-align: center;
    width: 100%;
    border-radius: 0;
    max-width: 100vw;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.8);
    line-height: 120px;
    margin-top: 0;
}

.footer {
    background-color: #666; /* أو استخدم var(--nav-color) إن أردت */
    color: #fff;
    padding: 10px 0; /* مثلاً — يمكنك تعديله */
    text-align: center;
    width: 100%;
    /* ← لا تُضف position أو top/bottom */
    margin-top: auto; /* ← هذا يدفع الـ footer لأقصى الأسفل داخل body */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-width: 80px;
    box-sizing: border-box;
}

.btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    text-decoration: none;
}

.btn:active {
    background-color: #dee2e6;
    transform: translateY(1px);
}

/* Search Form */
#search-input {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    width: 150px;
    max-width: 40ch;
    box-sizing: border-box;
    display: inline-block;
}

#search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

#search-button {
    padding: 6px 12px;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    min-width: auto;
    margin-left: 5px;
    white-space: nowrap;
    display: inline-block;
}

#search-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

@media (max-width: 768px) {
    #search-input {
        width: calc(100% - 110px);
        margin-bottom: 0;
        max-width: none;
    }
    
    #search-button {
        width: auto;
        padding: 6px 15px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 60px;
        margin: 0 2px;
    }
    
    #search-input {
        width: 100%;
        margin-bottom: 5px;
    }
    
    #search-button {
        width: 100%;
        margin-left: 0;
        padding: 8px 12px;
    }
}

.btn-glass {
    background: var(--secondary-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    box-shadow: var(--shaddow);
}

.btn2 {
    box-shadow: inset 0px -1px 5px 0px #ffffff;
    background: linear-gradient(to bottom, #f9f9f9 5%, #e9e9e9 100%);
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #dcdcdc;
    display: inline-block;
    cursor: pointer;
    color: #666666;
    font-family: 'Hacen';
    font-size: 13px;
    font-weight: bold;
    padding: 6px 14px;
    text-decoration: none;
    text-shadow: 0px 1px 0px #ffffff;
    margin: 2px;
}

.btn2:hover {
    background: linear-gradient(to bottom, #e9e9e9 5%, #f9f9f9 100%);
    background-color: #e9e9e9;
}

.btn2:active {
    position: relative;
    top: 1px;
}

/* Links */
a {
    text-decoration: none;
    color: var(--main-color);
}

a:visited {
    color: var(--main-color);
}

a:hover {
    color: red;
}

/* Sections */
section {
    padding: 8px;
    margin: 8px;
    border: 0;
}

.scal:hover {
    transform: scale(1.1);
}

/* Alerts */
.alert {
    padding: 14px;
    margin: 1px;
    border: 2px solid transparent;
    border-radius: 4px;
    display: flex;
}

.ok {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.ok-line {
    color: #155724;
    padding: 6px;
}

.danger {
    color: #FFF;
    background-color: #E4727E;
    border-color: #DC4251;
}

.danger-line {
    color: red;
    padding: 6px;
}

.warn {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.warn-line {
    color: #856404;
    padding: 6px;
}

.info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.info-line {
    color: #0c5460;
    padding: 6px;
}

.route {	
    display: block;
    padding: 4px 20px;
    color: var(--text-color);
    border-bottom: 2px solid #CCC;
}	

.nav {
    margin: 1px;
    padding: 4px 25px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: 1px solid #CCC;
}

/* Utility Classes */
.Center,
.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.Tar {
    text-align: right;
}

.Tal {
    text-align: left;
}

.Vm {
    vertical-align: middle;
}

.Vt {
    vertical-align: top;
}

.Block,
.block {
    display: block;
}

.Red {
    color: red;
}

.Blue {
    color: blue;
}

.RTL {
    direction: rtl;
}

.LTR {
    direction: ltr;
}

.B0 {
    border: 0;
}

.B1 {
    border: solid 1px #CCC;
}

.Fr {
    float: right;
}

.Fl {
    float: left;
}

/* Width Classes */
.Max100 { max-width: 100px ; }
.Max200 { max-width: 200px ; }
.Max300 { max-width: 300px ; }
.Max400 { max-width: 400px ; }
.Max600 { max-width: 600px ; }
.Max800 { max-width: 800px !important; }

.WE50 { width: 50px; }
.WE100 { width: 100px; }
.WE200 { width: 200px; }
.WE300 { width: 300px; }
.WE400 { width: 400px; }
.WE500 { width: 500px; }
.WE600 { width: 600px; }

.W99 { width: 99%; }
.W100 { width: 100%; }
.W-10 { width: calc(100% - 10px); }
.W-20 { width: calc(100% - 20px); }
.W-100 { width: calc(100% - 100px); }

/* Margin and Padding */
.M10 { margin: 10px; }
.M20 { margin: 20px; }
.M30 { margin: 30px; }
.M40 { margin: 40px; }
.M50 { margin: 50px; }
.M60 { margin: 60px; }

.MinH200 { min-height: 200px; }
.MinH300 { min-height: 300px; }
.MinH400 { min-height: 400px; }
.MinH500 { min-height: 500px; }
.MinH600 { min-height: 600px; }

.P10 { padding: 10px; }
.P20 { padding: 20px; }
.P30 { padding: 30px; }
.P40 { padding: 40px; }
.P50 { padding: 50px; }
.P60 { padding: 60px; }

.PR10 { padding-right: 10px; }
.PR20 { padding-right: 20px; }
.PR30 { padding-right: 30px; }
.PR40 { padding-right: 40px; }
.PR50 { padding-right: 50px; }
.PR60 { padding-right: 60px; }

.PL10 { padding-left: 10px; }
.PL20 { padding-left: 20px; }
.PL30 { padding-left: 30px; }
.PL40 { padding-left: 40px; }
.PL50 { padding-left: 50px; }
.PL60 { padding-left: 60px; }

.Just {
    text-align: justify;
}

/* Background Colors */
.BC-CCC { background-color: #CCC; }

/* Forms */
form {
    margin: 4px;
    padding: 4px;
    position: relative;
}

label {
    display: block;
    margin: 4px;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,

select {
    font-family: 'Hacen', sans-serif;
    width: 100%;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    height: calc(2em + 6px);
    padding: 6px 6px;
    margin: 2px;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    line-height: normal;
    box-sizing: border-box;
    flex: 1 1 200px;

}

/* تحسين مظهر الشريط في WebKit (كروم، سفاري) */
select::-webkit-scrollbar {
    width: 6px;
}
select::-webkit-scrollbar-track {
    background: var(--input-bg);
    border-radius: 3px;
}
select::-webkit-scrollbar-thumb {
    background: var(--select-accent);
    border-radius: 3px;
}

/* تأمين ارتفاع مناسب للقائمة المنبثقة عند الفتح (في بعض المتصفحات) */
select[multiple],
select[size] {
    max-height: 200px; /* ارتفاع القائمة عند الفتح (مثلاً 5 خيارات مرئية) */
}

/* تأثير بسيط عند التركيز */
select:focus {
    outline: 2px solid var(--accent-color);
    border-color: var(--main-color);
}

option {
    font-family: 'Hacen', sans-serif;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    padding: 8px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus{
    background-color: #ddd;
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio and Checkbox */
input[type="radio"],
input[type="checkbox"] {
    /* تم إزالة float: right */
    margin-left: 8px;            
    margin-right: 8px;            
    transform: scale(1.5);
    accent-color: var(--select-accent);
    vertical-align: middle;
}

@media (max-width: 768px) {
    form {
        padding: 15px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 0.9rem;
    }
}

/* Form Container */
.container {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Tabs */
.tabs-container {
    display: table;
    width: 99%;
    background: white;
    overflow: hidden;
    border: 0 solid #ddd;
}

.tabs {
    background: #FFF;
    border-bottom: 1.5px solid #BBB;
    position: relative;
}

.tab-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
    position: relative;
    outline: none;
    font-family: 'Hacen', Arial, sans-serif;
}

.tab-button:hover {
    color: var(--accent-color);
}

.pointer {
    cursor: pointer;
}

.tab-button.active {
    border-radius: 8px 8px 0 0;
    background: #EAEAEA;
}

.tab-content {
    padding: 6px;
    min-height: 150px;
    background: white;
    border-top: 0 solid #ddd;
    line-height: 1.6;
    display: none;
}

/* Cards */
.card {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    text-align: right;
    padding: 10px;
    box-sizing: border-box;
    display: block;
}

.card h2 {
    color: #333;
    font-size: 26px;
    margin: 10px 10px 5px 10px;
    position: relative;
    text-align: right;
}

.card h2::after {
    content: '';
    display: block;
    width: calc(100% - 10px);
    height: 1px;
    background-color: #aaa;
    margin: 10px auto 20px;
}

.card p {
    color: #555;
    line-height: 1.6;
    text-align: right;
    margin: 10px;
}

/* Navigation Menu */
.navbar {
    background: var(--accent-color);
    padding: 0;
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 10000;
    border: 1px solid #BBB;
    font-size: 14px;
    font-family: 'Hacen', sans-serif;
}

.nav-links {
    display: flex;
    gap: 0.6rem;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.nav-link .arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-color);
    transition: var(--transition);
}

.nav-item:hover > .nav-link .arrow {
    transform: rotate(180deg);
    color: #EDAF48;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #EDAF48;
    bottom: 0;
    right: 0;
    opacity: 0.8;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.dropdown-menu {
    position: absolute;
    background: var(--background-color);
    min-width: 200px;
    top: 100%;
    right: 0;
    list-style: none;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    z-index: 10001;
    background-color: #FFF;
    border: 1px solid #DDD;
}

.dropdown-menu .dropdown-menu {
    top: 0;
    right: 100%;
    background: #EEE;
}

.nav-item:hover > .dropdown-menu,
.dropdown-item:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: spring 400ms ease-out;
}

.menu-toggle {
    display: none;
    background: var(--background-color);
    color: var(--main-color);
    border: none;
    padding: 1rem;
    border-radius: 1px;
    cursor: pointer;
    animation: spring 400ms ease-out;
}

@media (max-width: 600px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        background: var(--background-color);
        width: 100%;
        height: calc(100vh - 40px);
        flex-direction: column;
        padding: 0;
        transition: var(--transition);
        -ms-overflow-style: none;
        scrollbar-width: none;
        overflow-y: scroll;
    }
    
    .nav-links::-webkit-scrollbar,
    .dropdown-menu::-webkit-scrollbar {
        display: none;
    }
    
    .dropdown-menu {
        -ms-overflow-style: none;
        scrollbar-width: none;
        overflow-y: scroll;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-item {
        width: 100%;
        background: #EEE;
    }
    
    .nav-link {
        padding: 1rem;
        width: 100%;
        background: var(--background-color);
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--light-gray);
        max-height: 200px;
        width: 100%;
        border-radius: 0;
    }
    
    .dropdown-menu.active {
        display: block;
    }
    
    .dropdown-item {
        width: 100%;
    }
    
    .dropdown-item .nav-link {
        padding-left: 2rem;
        background: var(--light-gray);
    }
    
    .dropdown-menu .dropdown-menu .nav-link {
        padding-left: 3rem;
        background: #EEE;
        color: var(--text-color);
    }
    
    .dropdown-menu .dropdown-menu .nav-link:hover {
        color: #EDAF48;
    }
    
    .dropdown-menu .dropdown-menu .dropdown-menu .nav-link {
        padding-left: 4rem;
        background: var(--secondary-color);
        color: var(--text-color);
    }
    
    .dropdown-menu .dropdown-menu {
        width: 100%;
        right: 0;
    }
}


/* Action Buttons */
.btn-delete,
.btn-edit,
.btn-view {
    padding: 4px 8px;
    margin: 2px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.btn-delete { color: red; }
.btn-edit { color: blue; }
.btn-view { color: green; }



/* Pagination */
.pagination {
    margin: 10px 0;
    text-align: center;
}

.pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 5px;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline;
}

.pagination a,
.pagination span {
    padding: 4px 8px;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    font-size: 14px;
}

.pagination a:hover,
.pagination .active {
    background-color: #f0f0f0;
    color: #000;
    font-weight: bold;
}

.pagination li.active a {
    background-color: #ddd !important;
    color: #000 !important;
    font-weight: bold;
    pointer-events: none;
    cursor: default;
}

/* تأكيد التحويم */
.pagination a:hover {
    background-color: #f0f0f0;
    color: #000;
}


/* Footer */
.footer {
    background-color: #666;
    color: #fff;
    padding: 40px 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    margin: 10px;
}

.footer-section h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.footer-section p {
    font-size: 1em;
    line-height: 1.6;
}

.contact-info p {
    margin: 5px 0;
}

.contact-info i {
    margin-right: 10px;
    color: #475673;
}

.social-icons a {
    color: #fff;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #475673;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #FFF;
}

.footer-bottom p {
    font-size: 0.9em;
}

/* Grid System */
.grid-container {
    display: grid;
    gap: 20px;
}

.grid-container {
    display: grid;
    gap: 20px;
}

.G1 { grid-template-columns: repeat(1, 1fr); }
.G2 { grid-template-columns: repeat(2, 1fr); }
.G3 { grid-template-columns: repeat(3, 1fr); }
.G4 { grid-template-columns: repeat(4, 1fr); }
.G5 { grid-template-columns: repeat(5, 1fr); }
.G6 { grid-template-columns: repeat(6, 1fr); }

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-full { grid-column: 1 / -1; }

.grid-item {
    background: #f0f0f0;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Menu Button */
.menu-button {
    background-color: var(--nav-color);
    color: white;
    padding: 6px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px;
    z-index: 10000;
}

.close-button {
    background-color: transparent;
    color: white;
    border: none;
    font-size: 30px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 10000;
}

.menu {
    position: fixed;
    z-index: 10000;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--nav-color);
    direction: rtl;
    transition: right 0.2s ease;
    overflow-y: scroll;
    scrollbar-width: none;
}

.menu::-webkit-scrollbar {
    display: none;
}

.menu ul {
    list-style: none;
    padding: 4px;
    margin: 0;
    text-align: right;
}

.menu li {
    margin: 10px 0;
    position: relative;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    display: block;
    transition: transform 0.2s;
}

.menu a .arrow {
    margin-right: 20px;
    margin-left: 8px;
}

.menu a:hover {
    transform: translateX(-10px);
    color: var(--text-color);
}

.submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
    background-color: var(--nav-color);
    position: relative;
}

.submenu li {
    margin: 10px 0;
    border-radius: 6px;
}

.submenu li:hover {
    background-color: var(--secondary-color);
    animation: spring 600ms ease-out;
}

.submenu a {
    padding: 1px 30px;
}





/* Sidebar */
.open-sidebar-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #FFF;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1101;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.open-sidebar-btn:hover {
    background: var(--secondary-color);
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 95vw;
    height: 100%;
    background: var(--secondary-color);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.77,0,.18,1);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    background: var(--secondary-color);
}

.company-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    background: var(--background-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
}

.accordion-a-header {
    background: var(--secondary-color);
    color: var(--text-color);
    cursor: pointer;
    padding: 16px 24px;
    text-align: right;
    border: none;
    outline: none;
    font-family: 'Hacen', sans-serif;
    font-size: 1em;
    transition: background 0.3s, color 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid var(--accent-color);
    letter-spacing: 0.5px;
    user-select: none;
}

.accordion-a-header:hover,
.accordion-a-header.active {
    background: var(--accent-color);
    color: red;
}

.accordion-a-content {
    padding: 0 24px 16px 24px;
    display: none;
    background: var(--background-color);
    color: var(--text-color);
    text-align: right;
    font-size: 1em;
    border-bottom: 1px solid var(--input-bg);
    animation: fadeIn 0.4s;
    user-select: text;
    margin-top: 0;
    transition: max-height 0.3s;
}

ul.link-list-a {
    padding: 0;
    margin: 0;
    list-style: none;
}

ul.link-list-a li {
    border-bottom: 1px solid var(--input-bg);
    border-radius: 7px;
    transition: background 0.2s;
    margin: 0;
    padding: 0;
}

ul.link-list-a li:last-child {
    border-bottom: none;
}

ul.link-list-a li a {
    display: block;
    width: 100%;
    padding: 12px 0 12px 0;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, padding-right 0.2s;
    font-size: 1em;
    border-radius: 7px;
    padding-right: 12px;
    padding-left: 12px;
    box-sizing: border-box;
}

ul.link-list-a li:hover a,
ul.link-list-a li a:hover {
    background: var(--hover-color);
    color: var(--accent-color);
    text-decoration: none;
    padding-right: 22px;
}

.icon {
    font-size: 1.2em;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 480px) {
    .sidebar {
        width: 98vw;
        max-width: 98vw;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
    }
}

/* PDF Background */
.background-div {
    width: 800px;
    height: 552px;
    background-image: url('../images/license.png');
    background-size: cover;
    background-position: center;
    color: #000;
    font-weight: normal;
    margin: 0 auto;
    border: 1px solid #DDD;
}
.teachers-license {
    width: 552px;
    height: 800px;
    background-size: cover;
    background-position: center;
    color: #000;
    font-weight: normal;
    margin: 0 auto;
    border: 0px solid #DDD;
}

.quiz-card {
    width: 566px;
    height: 800px;
    background-size: cover;
    background-position: center;
    color: #000;
    font-weight: normal;
    margin: 0 auto;
    border: 0px solid #DDD;
}

btn3 {
    display: block;
    margin: 30px auto;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

btn3:hover {
    background-color: #0056b3;
}

/* Action Icons */
.viewPic {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../images/eye.png') no-repeat center center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    vertical-align: middle;
}

.editPic {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../images/edit.png') no-repeat center center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    vertical-align: middle;
}

.deletePic {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../images/del.png') no-repeat center center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    vertical-align: middle;
}

.goalsPic {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../images/goals.png') no-repeat center center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    vertical-align: middle;
}


.goalsPic:hover,
.viewPic:hover,
.editPic:hover,
.deletePic:hover {
    animation: shake 0.4s ease-in-out;
    opacity: 0.8;
    cursor: pointer;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.3s ease-in-out;
}

/* User Roles */
.supervisor { color: #DC143C; }
.visor { color: #3B7AED; }
.teacher { color: #000; }

.row:hover { background-color: #FFFAD6; }

/* Unit Cards */
.units-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.unit-card {
    background: #EEE;
    border: 1px solid #adb5bd;
    border-radius: 6px;
    padding: 1.5rem;
    width: 300px;
    cursor: pointer;
    transition: var(--transition);
}

.unit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: #ced4da;
}

.unit-card h3 {
    color: #495057;
    margin-top: 0;
}

.unit-card p {
    color: #6c757d;
}

/* Google Map Icon */
.map-icon {
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.2s;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
}

.map-icon:hover {
    transform: scale(1.2);
}

/* Animations */
@keyframes spring {
    0% { transform: translateY(-10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #999;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    position: relative;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/*------Box------*/
.box {
  position: relative;
  background: #fff;
  border-radius: 3px;
  border: 1px solid #AAA;
  padding: 10px;
  min-width: 200px;
  background-color:#EFEFEF;
  
}

.box::before,
.box::after {
  content: '';
  position: absolute;
  bottom: 10px;
  width: 40%;
  height: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,1);
  z-index: -1;
  transition: all .3s ease-in-out;
}

.box::before {
  left: 5px;
  transform: skew(-5deg) rotate(-5deg);
}

.box::after {
  right: 5px;
  transform: skew(5deg) rotate(5deg);
}

.box:hover::before,
.box:hover::after {
  box-shadow: 0 2px 5px rgba(0,0,0,2);
}

.box:hover::before {
  left: 4px;
}

.box:hover::after {
  right: 4px;
}
/*------end Box------*/

/* Modal */
/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* محتوى النموذج */
.modal-content {
    background-color: #FEFEFE;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* شريط الرأس (العنوان) */
.modal-header {
    background-color: #AAA;
    color: white;
    padding: 0;
    text-align: right;
    border-bottom: 1px solid var(--secondary-color);
    position: relative;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    border: 0;
    height: 30px; /* ✅ الارتفاع المطلوب */
    line-height: 30px; /* ✅ محاذاة نصية رأسية */
    overflow: hidden;
}

/* عنوان النموذج (داخل الشريط العلوي) */
.modal-header .modal-title {
    font-size: var(--fs22); /* نُصغر قليلاً ليتناسب مع الارتفاع */
    color: white;
    font-weight: bold;
    margin-right: 20px; /* يبتعد عن اليمين */
    margin-left: 40px; /* يبتعد عن × */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    float: right;
    height: 30px;
    line-height: 30px;
}

/* زر الإغلاق (×) */
.close {
    color: #FFF;
    font-size: 26px; /* نُناسب الحجم مع الارتفاع 20px */
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    position: absolute;
    left: 10px; /* أقرب إلى الحافة */
    top: 50%;
    transform: translateY(-50%); /* تمركز رأسي دقيق */
    line-height: 1;
    z-index: 10001;
    width: 24px;
    height: 24px;
    text-align: center;
}

.close:hover,
.close:focus {
    color: red;
    text-decoration: none;
}

/* محتوى النموذج */
.modal-body {
    padding: 20px 25px;
    color: var(--text-color);
    text-align: right;
    line-height: 1.7;
    background-color: #FEFEFE;
    border: 0;
    margin: 0;
}

.modal-footer {
    text-align: left;
    padding: 15px;
    border-top: 1px solid #DDD;
    background-color: #FAFAFA;
}

/* أنماط إضافية للرسائل */
.alert-success { background-color: #4CAF50; }
.alert-error   { background-color: #F44336; }
.alert-warn    { background-color: #FF9800; }
.alert-info    { background-color: #2196F3; }

/*  END Modal */
 
/*  --------  reports -------------*/
.reports-scroll-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    background: var(--background-color);
    padding: 10px;
    font-family: 'Hacen', sans-serif;
    direction: rtl;
    text-align: right;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--background-color);
}

.reports-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.reports-scroll-container::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

.reports-scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}



.report-card {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--input-bg);
}

.report-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.report-card-header {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 6px;
    font-size: 1.1em;
	background-color: #EEE;
	border: 1px dashed #CCC;
	padding-right: 10px;
}

.report-card-header .report-date {
    font-weight: normal;
    font-size: 0.9em;
    opacity: 0.8;
    margin-inline-start: 8px;
}

.report-card-content {
    line-height: 1.7;
    font-size: 0.95em;
    color: var(--text-color);
    white-space: pre-wrap;
    margin-top: 4px;
}
/*  --------  end reports -------------*/
/*  --------  title Box -------------*/
   .title-box {
        width: 100%;
        box-sizing: border-box;
        background: #fff;
        border-radius: 8px;
        padding:  10px;
        text-align: right;
		padding-right: 20px;
        position: relative;
        overflow: hidden;
        box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
		font-weight: 400;
		font-size: 18px;
        font-style: normal;
        font-family: 'Hacen';
    }
    .title-box::before {
        content: "";
        position: absolute;
        width: 1000px;
        height: 1000px;
        border: 1px solid #888;
        border-radius: 50%;
        top: -800px;
        right: -400px;
        background: rgba(130, 130, 130, 0.2);
        z-index: 0;
        opacity: 0.6;
        transform: rotate(-15deg);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }
    .title-box-content {
        position: relative;
        z-index: 1;
    }
    .title-box .sub-title {
        display: block;
        margin-top: 8px;
        font-style: normal;
        font-family: 'Hacen';
		font-size: 16px;
        opacity: 0.9;
    }
/*  --------  End title Box -------------*/
/*  --------  fieldset -------------*/

    fieldset {
      width: 100%;
      border: 1px solid #999;
      border-radius: 4px;
      padding: 15px;
      margin: 15px 0;
      box-sizing: border-box;
      background-color: #fff;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    legend {
      background-color: #EEE; 
      color: #444;
      border: 1px solid #999;
      border-radius: 3px;
      font-size: 14px;
      font-weight: bold;
      padding: 2px 12px;      
      margin: 0;
    }

    .mine {
      direction: rtl;
    }
    .mine legend {
      margin-left: auto;
      margin-right: 20px; 
    }

    .theirs {
      direction: rtl;
    }
    .theirs legend {
      margin-right: auto;
      margin-left: 20px;
      direction: rtl;
      unicode-bidi: bidi-override;
    }
/*  -------- end  fieldset -------------*/
/*--------------------- النموذج */
        button {
            padding: 3px 8px;
            border: 1px solid #ccc;
            background-color: #FEFEFE;
            color: #333;
            cursor: pointer;
            border-radius: 4px;
            font-size: 18px;
            transition: all 0.2s;
        }
        button:hover {
            background-color: #e0e0e0;
            border-color: #aaa;
        }
        button:active {
            background-color: #d0d0d0;
        }
        #usersForm {
            padding: 20px;
            border: 1px solid #ddd;
            background-color: #ffffff;
            border-radius: 6px;
            box-shadow: 0 1px 5px rgba(0,0,0,0.1);
        }
        #usersForm h3 {
            margin: 0 0 15px 0;
            font-size: 16px;
            color: #444;
            font-weight: 500;
        }

        /* العلامة (tag) للمستخدم المختار */
        .user-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 9px;
            margin: 4px;
            background-color: #f0f0f0;
            border: 1px solid #ccc;
            border-radius: 0;
            font-size: 13.5px;
            font-weight: 500;
            color: #444;
        }
        .user-tag .remove {
            width: 14px;
            height: 14px;
            background-color: #888;
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 0;
            font-size: 11px;
            cursor: pointer;
            margin-right: 3px;
            font-weight: bold;
        }
        .user-tag .remove:hover {
            background-color: #555;
        }
        .user-tag .role {
            margin-right: 4px;
            font-size: 12px;
            color: #666;
            font-weight: normal;
            padding: 1px 4px;
            background-color: #e0e0e0;
            border: 1px solid #ccc;
        }
/*--------------------- نهاية النموذج */
/*--------tooltip */

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

/*-------end -tooltip */
/*-------end -tooltip */
/*-------end -tooltip */

/* زر الطباعة */
.print-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-family: 'Hacen', sans-serif;
    transition: background-color 0.3s ease; /* أضف تأثير انتقالي ناعم */
}
.print-btn:hover,
.print-btn:focus {
    background-color: #0056b3;
    outline: none; /* إزالة الخط عند التبؤر */
}

.noteText {
    position: fixed;
    top: 70px;
    left: 20px;
    z-index: 10000;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    color:#AAA;
    font-family: 'Hacen', sans-serif;
    transition: background-color 0.3s ease; /* أضف تأثير انتقالي ناعم */
}

/* استايلات القسم للطباعة */
.print-section {
    max-width: 210mm; /* عرض الصفحة A4 */
    margin: 0 auto;
    padding: 10px;
    font-family: 'Hacen', sans-serif;
    direction: rtl; /* ضبط اتجاه النص للغة العربية */
}

.report-header {
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 2px solid #444;
    padding-bottom: 8px;
}

.report-subtitle {
    text-align: center;
    font-size: 16px;
    margin-bottom: 15px;
    color: #555;
}

/* الجدول */
th {
    background-color: #EEE;
    text-align: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    box-sizing: border-box;
    table-layout: auto; /* توزيع الأعمدة تلقائياً */
}

th, td {
    border: 1px solid #ddd;
    padding: 6px 10px; /* زيادة الحشو للتقليل من الضغط */
    vertical-align: middle;
    white-space: nowrap; /* عدم التفاف النص افتراضياً */
}

tr.even { background-color: #f9f9f9; }
tr.odd { background-color: #ffffff; }

/* تحسينات للعرض على الشاشات الصغيرة فقط (محددة للشاشة) */
@media screen and (max-width: 768px) {
    .data-table {
        width: 100%;
        font-size: 14px;
        table-layout: auto;
        overflow-x: hidden;
    }
    thead {
        display: none;
    }
    tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin: 10px 0;
        background-color: #fdfdfd;
        padding: 12px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
    td {
        display: block;
        padding: 5px 0;
        text-align: right;
        border: none;
        white-space: normal;
    }
    td::before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #333;
    }
    .actions-cell {
        text-align: center;
        padding: 10px 0;
        border-top: 1px solid #eee !important;
    }
    .actions-cell a {
        margin: 0 10px;
        display: inline-block;
    }
}

/* تنسيقات الطباعة */

/* تنسيقات الطباعة - معدّل ليناسب A4 تمامًا */
@media print {
    /* إزالة الهوامش الافتراضية للمتصفح */
    @page {
        size: A4;
        margin: 10mm; /* هامش داخلي معقول */
    }

    /* إخفاء كل شيء ما عدا قسم الطباعة */
    body * {
        visibility: hidden;
    }

    /* إظهار قسم الطباعة وجميع عناصره */
    .print-section,
    .print-section * {
        visibility: visible;
    }

    /* تثبيت قسم الطباعة ليبدأ من الأعلى */
    .print-section {
        position: absolute;
        top: 0;
        left: 0;
        width: calc(210mm - 20mm); /* 210mm ناقص هامش يمين ويسار (10mm × 2) */
        max-width: none;
        padding: 10mm;
        margin: 0;
        box-sizing: border-box;
        font-size: 14px !important;
        line-height: 1.5;
    }

    /* إخفاء زر الطباعة */
    .print-btn,
    .no-print {
        display: none !important;
    }

    /* تحسين الجداول للطباعة */
    .data-table {
        width: 100% !important;
        table-layout: fixed !important;
        font-size: 13px !important;
        border-collapse: collapse !important;
    }

    .data-table th,
    .data-table td {
        border: 1px solid #000 !important;
        padding: 6px !important;
        word-wrap: break-word !important;
        white-space: normal !important;
        overflow-wrap: break-word;
    }

    /* ضمان ظهور رؤوس الجداول في كل صفحة */
    thead {
        display: table-header-group !important;
    }

    /* منع تقسيم الصفوف داخل الجدول */
    tbody tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* منع تقسيم الفقرات أو العناصر */
    p, h1, h2, h3, h4, h5, h6, .report-card, .box, fieldset {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* تقسيم النص كل ~40 حرفًا */
.force-wrap {
    width: 60ch;
    white-space: normal;
    overflow-wrap: break-word; /* يسمح بالتفاف الكلمات الطويلة جدًا فقط */
    word-wrap: break-word;
}

/*----------------*/
/* تصحيح textarea على الجوال */
@media (max-width: 768px) {
    textarea {
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        padding: 6px;
        margin: 2px 0;
        box-sizing: border-box;
        resize: vertical;
    }
    form,
    .container {
        padding: 4px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* تأثير تمرير المؤشر على صفوف الجدول */
.data-table tbody tr:hover {
    background-color: var(--warn-color) !important;
    transition: background-color 0.2s ease;
}

/* الحفاظ على تأثير التمرير على خلفيات الصفوف المتناوبة */
.data-table tbody tr.even:hover,
.data-table tbody tr.odd:hover {
    background-color: var(--warn-color) !important;
}

/* تأثير تمرير المؤشر على عناصر قائمة المعلمين */
.teacher-checkbox + span {
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
}

.teacher-checkbox + span:hover {
    background-color: var(--warn-color);
    color: var(--text-color);
    cursor: pointer;
}

/* تأثير عند تحديد المعلم */
.teacher-checkbox:checked + span {
    background-color: var(--accent-color);
    border: 1px solid var(--main-color);
    border-radius: 4px;
}

/*----------------*/