@media print {
    @page {
        size: A4 landscape;
        margin: 2cm;
    }

    body {
        font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
        font-size: 12px;
        line-height: 2.0;
        margin: 2cm;
        padding: 0;
    }

    .report-container {
        display: block !important;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    table {
        display: block !important;
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

    table, th, td {
        border: 1px solid #000;
    }

    th, td {
        padding: 8px;
        text-align: right;
    }

    th {
        background-color: #f2f2f2;
        font-weight: bold;
    }

    /* إخفاء العناصر غير المطلوبة عند الطباعة */
    .navbar,
    .footer,
    .no-print,
    .print-footer,
    .report-footer {
        display: none !important;
    }

    /* تنسيقات إضافية للطباعة */
    .page-title {
        text-align: center;
        font-size: 18px;
        margin: 20px 0;
    }

    .print-only {
        display: block !important;
    }
}

body {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Card Styles */
.card-counter {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    padding: 15px; /* Reduced padding */
    background-color: #fff;
    border-radius: 0.5rem;
    transition: all 0.3s ease-in-out;
    position: relative;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.125);
    height: 100px; /* Reduced height */
}

.card-counter:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.card-counter i {
    font-size: 2em; /* Reduced icon size */
    opacity: 0.5;
    position: absolute;
    top: 10px;
    left: 10px;
}

.card-counter .count-numbers {
    font-size: 2em; /* Reduced font size */
    font-weight: bold;
    display: block;
    color: #343a40;
}

.card-counter .count-name {
    text-transform: uppercase;
    font-size: 0.8em; /* Reduced font size */
    color: #6c757d;
}

.card-counter.primary {
    background-color: #e9f8ff;
    color: #007bff;
}

.card-counter.danger {
    background-color: #fff0f3;
    color: #dc3545;
}

.card-counter.success {
    background-color: #e8f8f3;
    color: #28a745;
}

.card-counter.info {
    background-color: #fff9ed;
    color: #ffc107;
}

.card-counter.new-installation {
    background-color: #f2f4f6;
    color: #6c757d;
}

/* Footer Styles */
.footer {
    background-color: #343a40;
    color: white;
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

.footer-content {
    font-size: 1rem;
}

/* Main Content Styles */
.main-content {
    background-color: #f8f9fa; /* Subtle background color */
    padding: 20px;
    border-radius: 10px; /* Rounded corners */
    margin-top: 20px;
}

/* Toastify Custom Styles */
.toastify {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: right;
    direction: rtl;
    padding: 20px;
    min-width: 300px;
    max-width: 450px;
    background: white !important;
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    opacity: 0;
    animation: slideInRight 0.5s ease forwards;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.toastify:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toastify[aria-hidden="true"] {
    animation: slideOutRight 0.5s ease forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* تنسيق الأيقونات حسب نوع الإشعار */
.toastify::before {
    margin-left: 15px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 2rem;
    opacity: 0.2;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* تنسيق النص */
.toastify-text {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    flex-grow: 1;
    padding-left: 40px;
}

/* تنسيق الألوان حسب نوع الإشعار */
.toast-success {
    border-top: 4px solid var(--success-color) !important;
}
.toast-success::before {
    content: "\f00c";
    color: var(--success-color);
}

.toast-error {
    border-top: 4px solid var(--danger-color) !important;
}
.toast-error::before {
    content: "\f00d";
    color: var(--danger-color);
}

.toast-warning {
    border-top: 4px solid var(--warning-color) !important;
}
.toast-warning::before {
    content: "\f071";
    color: var(--warning-color);
}

.toast-info {
    border-top: 4px solid var(--info-color) !important;
}
.toast-info::before {
    content: "\f129";
    color: var(--info-color);
}

/* تأثيرات إضافية */
.toastify.animate__animated {
    animation-duration: 0.5s;
}

/* تحسينات الخطوط العربية */
* {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* حماية رموز Font Awesome من تأثير الخطوط العربية */
.fa, .fas, .far, .fal, .fab, .fad, .fass, .fasr, .fasl, .fast,
i[class*="fa-"], i[class^="fa "], i[class^="fas "], i[class^="far "], 
i[class^="fal "], i[class^="fab "], i[class^="fad "], 
[class*="fa-"]:before, [class^="fa "]:before {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands", "Font Awesome 5 Free", "Font Awesome 5 Pro" !important;
    font-weight: 900 !important;
}

/* تأكيد عمل الرموز */
.fab {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

.far {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-weight: 400 !important;
}

/* حماية إضافية للرموز في الأزرار والعناصر */
.btn i, button i, .nav-link i, .dropdown-item i, .card-header i, .badge i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
}

/* تأكيد عمل الرموز في جميع الحالات */
i.fa, i.fas, i.far, i.fal, i.fab, i.fad {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* تأكيد عمل رموز العلامات التجارية */
i.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* تأكيد عمل الرموز العادية */
i.far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* تحسين عرض النصوص العربية */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
}

/* تحسين الأزرار والعناصر التفاعلية */
.btn, button, input, select, textarea {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تحسين الجداول */
table, th, td {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تحسين النماذج */
.form-control, .form-select, .form-check-label {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تحسين البطاقات */
.card, .card-title, .card-text, .card-header {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تحسين شريط التنقل */
.navbar, .navbar-brand, .nav-link {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
