﻿/* ========================= */
/*        GLOBAL STYLE       */
/* ========================= */

/*html, body {
    overflow-x: auto;
}
*/

body {
    direction: rtl;
    text-align: right;
    font-family: Tahoma, Arial;
    /* overflow-x: hidden;*/
}

/* ========================= */
/*        BLAZOR ERROR       */
/* ========================= */

#blazor-error-ui {
    display: none;
}

/* ========================= */
/*        LOADING SCREEN     */
/* ========================= */

.loading-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: tahoma;
    color: #444;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {

    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========================= */
/*       MATERIAL ICONS      */
/* ========================= */

.material-icons {
    vertical-align: middle;
}



/* 🔷 Header عادي */
.report-header {
    text-align: center;
    margin-bottom: 15px;
}

/* 🔷 يظهر فقط في PDF */
.pdf-only {
    display: none;
}

/* 🔷 إخفاء عناصر من PDF */
.no-print {
    display: block;
}

/* 🔥 إعدادات التصدير */
@media print {

    /* 🔥 إظهار عناصر PDF فقط */
    .pdf-only {
        display: block;
    }

    /* 🔥 إخفاء الأزرار */
    .no-print {
        display: none !important;
    }

    /* 🔥 تحسين الخط */
    body {
        font-size: 12px;
    }

    /* 🔥 منع التكسير */
    .rz-data-grid {
        height: 100%;
        page-break-inside: auto;
    }

        .rz-data-grid tr {
            page-break-inside: avoid;
            page-break-after: auto;
        }

    .rz-group-panel {
        display: none !important;
    }

    /* 🔥 مسافة تحت علشان الفوتر */
    #reportContent {
        padding-bottom: 60px;
    }

    /* 🔥 Footer */
    .pdf-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 12px;
        background: white;
    }
}

#reportContent {
    direction: rtl;
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

    #reportContent * {
        box-sizing: border-box;
    }

.rz-datatable {
    overflow: visible !important;
}

/*.rz-card {
    max-width: 100%;
}

.rz-row {
    max-width: 100%;
}
*/

/*.grid-wrapper {
    height: calc(100vh - 180px);*/ /* عدل الرقم حسب الهيدر والفلتر */
    /*overflow-y: auto;*/ /* scroll رأسي */
    /*overflow-x: hidden;
}*/


.grid-yscroll-y {
    height: 400px; /* تتحكم فيها */
    overflow-y: auto; /* scroll رأسي */
    overflow-x: auto; /* أفقي لو محتاج */
}
/*
.rz-data-grid-scrollable {
    overflow: auto !important;
}

.rz-data-grid-table {
    width: max-content !important;
    min-width: 100% !important;
}

.rz-data-grid-table {
    width: 1500px !important;
}*/


/* ========================= */
/*        SIDE MENU FIX      */
/* ========================= */

/*.nav-scrollable {
    width: 260px !important;
    display: block !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}
*/
.menu {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    font-size: 13px;
    box-sizing: border-box;
}

.menu-category-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 10px 14px !important;
    cursor: pointer;
    font-weight: 700;
    color: white;
    box-sizing: border-box !important;
    min-height: 44px;
    flex-wrap: nowrap !important;
}

.menu-category-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    min-width: 0;
    flex-wrap: nowrap !important;
}

.submenu {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
}

    .submenu > .menu-item {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
    }

.menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    width: 100% !important;
    padding: 10px 14px !important;
    box-sizing: border-box !important;
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px;
    flex-wrap: nowrap !important;
}

.sub-item {
    padding-right: 28px !important;
    font-size: 13px;
}

.menu-item .material-icons,
.menu-category-header .material-icons {
    flex-shrink: 0 !important;
}

.menu-item span,
.menu-category-title span,
.menu-category-header span {
    display: inline-flex;
    align-items: center;
}

.standalone-item {
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}


@media (max-width: 768px) {


    .menu-item,
    .menu-category-header {
        padding: 15px 18px !important;
        min-height: 56px !important;
        font-size: 17px !important;
    }

    .sub-item {
        padding-right: 38px !important;
        font-size: 20px !important;
    }

    .menu-item .material-icons,
    .menu-category-header .material-icons {
        font-size: 25px !important;
    }

}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

    .login-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }

/*لو عايز:

نزود المسافة → زوّد padding
نقلل الارتفاع → قلل height
*/


/* توزيع الأعمدة */
.uniform-input table {
    table-layout: fixed !important;
}

/* مسافة خفيفة بين الأعمدة */
.uniform-input td,
.uniform-input th {
    padding: 3px 5px !important; /* رأسى 3 - أفقى 5 */
    margin: 0 !important;
}

    /* يخلي المحتوى يملى الخلية */
    .uniform-input td > div {
        width: 100%;
    }

/* توحيد ارتفاع الحقول */
.uniform-input .rz-inputtext,
.uniform-input .rz-inputnumber,
.uniform-input .rz-datepicker {
    height: 38px !important;
    line-height: 34px !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* Toggle الجنسية */
.uniform-input .btn-toggle {
    flex: 1;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    height: 38px;
    font-size: 12.5px;
}

    .uniform-input .btn-toggle.active {
        background: #1976d2;
        color: white;
        border-color: #1976d2;
    }

    .uniform-input .btn-toggle.locked {
        background: #eee;
        cursor: not-allowed;
    }