/* الأنماط العامة الأساسية */
html, body {
    height: 100%; /* تأكد أن الـ html و body يأخذان ارتفاع الشاشة الكامل */
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* يجعل الـ padding و border جزءًا من الحجم المحدد */
}

body {
    background-color: var(--e-global-color-413d0ff, #f0f2f5); /* لون خلفية فاتح وناعم */
    font-family: var(--e-global-typography-text-font-family, 'Segoe UI'), Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px; /* تم تعديل حجم الخط العام ليكون أكثر راحة */
    color: var(--e-global-color-text, #333);
    line-height: 1.6; /* تحسين قابلية القراءة */
    /* overflow-x: hidden; تم نقله إلى حاويات محددة لتجنب المشاكل العامة */

    /* Flexbox لتوزيع المساحة الرأسية في home.php */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* يضمن أن الـ body على الأقل بارتفاع الشاشة */
}

.container {
    border-radius: 8px;
    /* margin-top و margin-bottom تم تعديلهما أو إزالتهما في الأنماط الخاصة بالـ iframe */
    margin-top: 20px; /* لتقليل المسافة العلوية في الصفحات العادية */
}


.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, var(--e-global-color-4af5a07) -50%, var(--e-global-color-80964e9) 100%);    color: white;
    font-weight: 500;
    font-size: 1.1rem;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px 20px;
}

.table {
    margin-bottom: 0;
    border-collapse: collapse; /* تم التعديل: استخدام collapse لتوحيد الحدود */
    width: 100%;
    font-size: 0.9rem; /* حجم خط مناسب للجدول */
}

.table thead th {
    color: #ffffff;
    vertical-align: middle;
    text-align: center;
    font-size: 0.9rem; /* حجم خط مناسب لرؤوس الجدول */
    padding: 12px 10px;
    border: 1px solid #444; /* حدود أغمق لرؤوس الجدول */
}
.table tbody tr:hover {
    background-color: var(--e-global-color-91b1d6a, #e9ecef);
}
.table td {
    padding: 10px;
    vertical-align: middle;
    text-align: center;
    font-size: 0.85rem; /* حجم خط مناسب لخلايا الجدول */
    border: 1px solid #dee2e6; /* حدود خفيفة بين الخلايا */
}


.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.03);
}

/* تنسيق خاص للأزرار داخل الجداول */
.btn-group-table {
    display: flex;
    gap: 4px; /* تقليل المسافة بين الأزرار */
    justify-content: center;
    flex-wrap: wrap;
}
.btn-group-table .btn {
    border-radius: 4px; /* حواف أكثر استدارة قليلاً */
    padding: 4px 8px; /* مساحة داخلية أصغر للأزرار */
    font-size: 0.75rem; /* حجم خط أصغر للأزرار */
    line-height: 1; /* لضمان تناسق ارتفاع الأزرار */
}


/* Pagination styles */
.pagination .page-item.active .page-link {
    background-color: #edf7f4 !important;
    color: white;
    box-shadow: 0 2px 5px rgba(0,123,255,0.2);
}
.pagination .page-link {
    color: #007bff;
    border-radius: 5px;
    margin: 0 3px;
    transition: all 0.3s ease;
}
.pagination .page-link:hover {
    background-color: #e9ecef;
}

/* Form styles */
.form-label {
    font-weight: 500;
    margin-bottom: 5px;
}
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    transition: all 0.3s ease;
    font-size: 0.9rem; /* حجم خط مناسب لحقول الإدخال */
}
.form-control:focus, .form-select:focus {
    border-color: var(--e-global-color-primary);
}

/* --------------------------------------------------- */
/* أنماط خاصة بصفحات العرض (monitor_display.php, flights_table.php, checkin_baggage.php, media.php) */
/* --------------------------------------------------- */

body.flight-display-body { /* يستخدم في flights_table.php */
    background-color: black;
    color: white;
    text-align: center;
    margin: 0;
    overflow: hidden; /* لمنع شريط التمرير على شاشات العرض */
}

.header-display { /* يستخدم في flights_table.php */
    background-color: #0056b3;
    color: white;
    padding: 15px 25px;
    font-size: 2.2rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid #003366;
}
.header-display img {
    height: 60px;
}
.header-display span {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-display h1 {
    font-size: 2.5rem;
    margin: 0;
    color: white;
}
.table-container { /* يستخدم في flights_table.php */
    height: calc(100vh - 180px);
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}
#flightsTable { /* يستخدم في flights_table.php */
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 1.8rem;
}
#flightsTable th, #flightsTable td {
    padding: 15px;
    font-size: 1.6rem;
}
#flightsTable thead th {
    background-color: #003366;
}
#flightsTable tbody tr {
    background-color: black;
    color: white;
}
#flightsTable tbody tr:nth-of-type(odd) {
    background-color: #1a1a1a;
}
.delayed {
    color: #ff4d4d;
    font-weight: 600;
}
.footer-display { /* يستخدم في flights_table.php, checkin_baggage.php */
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 15px 25px;
    background-color: #0056b3;
    color: white;
    font-size: 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 5px solid #003366;
}

/* أنماط خاصة بـ monitor_display.php (رسالة عدم التكوين) */
.fullscreen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: black;
    color: white;
    font-size: 3rem;
    text-align: center;
    flex-direction: column;
    gap: 20px;
}
.fullscreen img {
    max-width: 80%;
    height: auto;
}

/* --------------------------------------------------- */
/* أنماط Home.php الجديدة والمحسنة (لواجهة الإدارة الرئيسية) */
/* --------------------------------------------------- */

.admin-header {
    background: white;
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 100;
    flex-shrink: 0; /* يمنع الهيدر من الانكماش */
    gap: 12px;
}
.admin-header img {
    height: 45px;

}

.admin-header h4 {
    color: #1A202C;
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    padding: 13px 20px;
}
.admin-header .header-logo-link {
    text-decoration: none;
    color: inherit;
}
.admin-header .header-logo-link:hover {
    text-decoration: none;
    color: inherit;
}

/* حاوية الشريط الجانبي والمحتوى الرئيسي */
/* هذه هي div التي تحتوي على d-flex flex-grow-1 في home.php */
.d-flex.flex-grow-1 {
    flex-grow: 1; /* تجعل هذه الـ div تأخذ كل المساحة الرأسية المتبقية */
    display: flex; /* تجعلها حاوية فليكس للأفق */
    width: 100%;
    overflow: hidden; /* لمنع شريط التمرير الأفقي من هذه الحاوية */
}

.admin-sidebar {
    width: 280px;
    background-color: #e0f2f7;
    padding: 30px 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    /* min-height: calc(100vh - 90px); تم إزالتها لأن الـ flex-grow: 1 على الـ d-flex.flex-grow-1 هي المسؤولة الآن */
    flex-shrink: 0; /* يمنع الشريط الجانبي من الانكماش */
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid #cce5ff;
    overflow-y: auto; /* للسماح بالتمرير داخل الشريط الجانبي إذا كانت الأزرار كثيرة */
}
.admin-sidebar .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    font-weight: 600;
    padding: 15px 20px;
    text-align: left;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,123,255,0.2);
    transition: all 0.3s ease;
}
.admin-sidebar .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}
.admin-sidebar .btn-primary.active {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
    color: white;
}

/* منطقة المحتوى الرئيسية التي تحمل الـ iframe */
.admin-main-content {
    flex: 1; /* تجعلها تأخذ كل المساحة الأفقية المتاحة */
    padding: 0; /* حشوة حول الـ iframe */
    background-color: #f8f9fa;
    display: flex; /* تجعلها حاوية فليكس للـ iframe */
    flex-direction: column; /* ترتيب الأطفال (الـ iframe) عموديًا */
    min-height: 0; /* مهم لكي يسمح للـ flex item بالانكماش بشكل صحيح */
    overflow: hidden; /* لمنع أي تجاوز بصري من داخل هذه الحاوية */
}

/* الـ iframe نفسه */
.admin-main-content iframe {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: transparent; /* يجعل خلفية الـ iframe شفافة لكي تظهر خلفية الـ admin-main-content */
    width: 100%;
    height: 100%; /* مهم جدًا: الـ iframe يأخذ 100% من ارتفاع أبيه (.admin-main-content) */
    display: block; /* يضمن أنه عنصر كتلوي */
    flex-grow: 1; /* يسمح للـ iframe بالنمو لملء المساحة المتاحة له في أبيه الفليكس */
    overflow: auto; /* مهم جدًا: للسماح بظهور أشرطة التمرير داخل الـ iframe إذا كان المحتوى أطول منه */
    border: none; /* إزالة الحدود الافتراضية للـ iframe */
}

@media (max-width: 576px) {
    .admin-header { padding: 12px 16px; }
    .admin-header img { height: 36px; }
    .admin-header h4 { font-size: 1.25rem; padding: 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .header-logo-link img {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    }

}

/* --------------------------------------------------- */
/* أنماط index.php (صفحة تسجيل الدخول) - محسنة مع الصورة */
/* --------------------------------------------------- */

.login-container {
    height: auto;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom right, #e0f2f7, #cce5ff);
}

.login-wrapper {
    display: flex;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
}

.login-image-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f8ff;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-image-section img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
}

.login-image-section img:hover {
    transform: scale(1.03);
}

.login-card {
    flex: 1;
    padding: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card h3 {
    color: #007bff;
    margin-bottom: 35px;
    font-weight: 700;
    font-size: 2rem;
}
.login-card .form-control {
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 1.05rem;
    border: 1px solid #b3d9ff;
}
.login-card .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}
.login-card .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 12px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.login-card .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}
.login-card .custom-alert {
    position: static;
    transform: none;
    margin-bottom: 20px;
    min-width: unset;
    box-shadow: none;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 450px;
    }
    .login-image-section {
        height: 200px;
        flex-shrink: 0;
    }
    .login-card {
        padding: 30px;
    }
    .login-card h3 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
}
/* Custom Alert Styling */
.custom-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none; /* Hidden by default */
    font-size: 1rem;
    text-align: center;
    opacity: 0.95; /* شفافية خفيفة */
}
.custom-alert.alert-success {
    background-color: #e6f7ff; /* أزرق فاتح جداً للنجاح */
    color: #0056b3; /* أزرق داكن للنص */
    border-color: #b3e0ff; /* حدود زرقاء فاتحة */
}
.custom-alert.alert-danger {
    background-color: #cce5ff; /* أزرق متوسط للخطأ (أكثر وضوحاً) */
    color: #004085; /* أزرق داكن جداً للنص */
    border-color: #80bdff; /* حدود زرقاء متوسطة */
}
.custom-alert.alert-info {
    background-color: #f0f8ff; /* أزرق فاتح جداً للمعلومات */
    color: #007bff; /* أزرق أساسي للنص */
    border-color: #cce5ff; /* حدود زرقاء فاتحة */
}
.custom-alert .btn-close {
    font-size: 1rem;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: inherit;
    opacity: 0.7;
    background: none;
    border: none;
    padding: 0;
}
.custom-alert .btn-close:hover {
    opacity: 1;
}
/* css/style.css */

/* ... (جميع الأنماط السابقة حتى) ... */

/* Main content area containing the iframe */
.admin-main-content {
    flex: 1;
    /* أعدنا الـ padding هنا لتوفير مسافة من الأعلى والجانبين لكل المحتوى داخل الـ iframe */
    /*padding: 25px;  يمكنك تعديل هذه القيمة (مثلاً 20px أو 30px) حسب رغبتك */
    background-color: #f8f9fa; /* لون الخلفية الذي سيظهر تحت الـ padding */
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden; /* يضمن عدم وجود scrollbars على مستوى الـ div هذه */
}

/* The Iframe itself */
.admin-main-content iframe {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: transparent; /* يجعل خلفية الـ iframe شفافة لتظهر خلفية الـ admin-main-content */
    width: 100%;
    height: 100%;
    display: block;
    flex-grow: 1;
    overflow: auto; /* مهم: يسمح بظهور أشرطة التمرير داخل الـ iframe إذا تجاوز المحتوى حجمه */
    border: none;
}

/* ... (بقية الأنماط) ... */

