﻿@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
html, body, span, h1, h4, h3, h2, h5, h6, div, p, a, MudRadioGroup, MudRadio, MudText {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.mud-input-slot,
.mud-select,
.mud-typography {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 500;
}

.mud-table-cell-custom-group {
    font-weight: 500;
}

.mud-table-cell-custom-group-footer {
    padding-bottom: 50px;
    text-align: right;
}

.components-reconnect-show, .components-reconnect-failed, .components-reconnect-rejected {
    display: none;
}

MudTable {
    color: gray !important;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
}

.appFont {
    font-weight: bolder;
    font-size: 15px;
    color: gray !important;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
}

.Right {
    text-align: right !important;
    direction: rtl !important;
}

.Left {
    text-align: left !important;
    direction: ltr !important;
}

.white-icon .mud-icon-root {
    color: #ffffff !important;
}
.green-icon .mud-icon-root {
    color: #4caf50 !important;
}
.red-icon .mud-icon-root {
    color: red !important;
}
.yellow-icon .mud-icon-root {
    color: #9e8e00 !important;
}

/* =========================================
   Mobile Menu Cards (Hajj Road Style)
   ========================================= */

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    min-height: 95px;
}


    .menu-card:active {
        transform: scale(0.96);
    }

    .menu-card:hover {
        box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    }

.menu-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--primary), var(--icon-color));
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
    

.menu-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

/* تحسين المسافات في الجوال */
@media (max-width: 600px) {
    .menu-card {
        padding: 16px 8px;
        min-height: 100px;
    }

    .menu-icon {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}


/* =========================================
   User & Company Info Bar
   ========================================= */

.user-company-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    margin: 10px 12px 0 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* اسم المستخدم */
.user-name {
    color: var(--primary);
}

/* اسم الشركة */
.company-name {
    color: #555;
}


/* شبكة الأسرة */
.tent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 8px;
    padding: 10px;
}

/* شكل السرير */
.bed {
    height: 55px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

    /* تأثير عند المرور */
    .bed:hover {
        transform: scale(1.08);
    }

/* الحالات */
.w3-green {
    background: #2ecc71;
    color: white;
}

.w3-red {
    background: #e74c3c;
    color: white;
}

.w3-blue {
    background: #3498db;
    color: white;
}

.w3-yellow {
    background: #f1c40f;
    color: black;
}


.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 0.5px solid var(--mud-palette-divider);
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    background: transparent;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    white-space: nowrap;
}

    .filter-chip:hover {
        background: var(--mud-palette-action-hover);
    }

    .filter-chip.chip-on {
        background: #E1F5EE;
        border-color: #1D9E75;
        color: #085041;
    }

    .filter-chip.chip-off {
        background: #FCEBEB;
        border-color: #E24B4A;
        color: #791F1F;
    }


.card-page-wrapper {
    padding: 1rem;
    direction: rtl;
}

/* ── أقسام الفلاتر والطباعة ──
       تستخدم --primary-light من الثيم للفاصل */
.filter-section,
.print-section {
    border-radius: 14px;
    padding: 1rem 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
}

.filter-section__title,
.print-section__title {
    font-size: .88rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: .8rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: .45rem;
}

    /* ── أيقونات عناوين الأقسام تتبع الثيم ── */
    .filter-section__title i,
    .print-section__title i {
        color: var(--primary) !important;
    }

/* ── تسمية حقل الإدخال ── */
.field-label {
    font-size: .8rem;
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 2px;
}

/* ══════════════════════════════════════════════
       أزرار الطباعة — كلها تعتمد على الثيم
       ══════════════════════════════════════════════ */

/* الزر الأساسي: لون الثيم الرئيسي */
.print-btn {
    width: 100%;
    padding: .6rem .5rem;
    border: none;
    border-radius: 10px;
    font-size: .83rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: opacity .15s, transform .15s, box-shadow .15s;
}

    .print-btn:hover {
        opacity: .86;
        transform: translateY(-2px);
        box-shadow: 0 5px 14px rgba(0,0,0,.2);
    }

    .print-btn:active {
        transform: translateY(0);
    }

/* ── نوع ثانوي: لون أغمق من الثيم ── */
.print-btn--secondary {
    background: var(--primary-dark);
}

/* ── نوع outline: إطار بلون الثيم ── */
.print-btn--outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

    .print-btn--outline i {
        color: var(--primary) !important;
    }

    .print-btn--outline:hover {
        background: var(--primary);
        color: #fff;
    }

        .print-btn--outline:hover i {
            color: #fff !important;
        }

/* ── منطقة عرض التقرير ── */
.report-viewer {
    width: 100%;
    height: 72vh;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    margin-top: .5rem;
}


/* ── متغيرات الألوان ── */
:root {
    --card-bg: #1e2535;
    --card-border: rgba(255,255,255,.07);
    --card-shadow: 0 4px 20px rgba(0,0,0,.35);
    --card-hover-lift: -6px;
    --icon-size: 2.4rem;
    --radius: 16px;
    /* ألوان الأنواع */
    --clr-primary: #3b82f6; /* أزرق  — حجاجي          */
    --clr-search: #10b981; /* أخضر  — بحث             */
    --clr-action: #f59e0b; /* ذهبي  — تفويج (تنبيه)   */
    --clr-logout: #ef4444; /* أحمر  — خروج            */
    --clr-default: #6366f1; /* بنفسجي — الباقي          */
}

/* ── البطاقة الأساسية ── */
.nav-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 1.4rem .8rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
    /* خط لوني سفلي */
    border-bottom: 3px solid var(--clr-default);
}

    .nav-card::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 50% 0%, rgba(99,102,241,.15) 0%, transparent 70%);
        opacity: 0;
        transition: opacity .22s ease;
    }

    .nav-card:hover {
        transform: translateY(var(--card-hover-lift));
        box-shadow: 0 12px 32px rgba(0,0,0,.45);
    }

        .nav-card:hover::before {
            opacity: 1;
        }

/* ── غلاف الأيقونة ── */
.nav-card__icon-wrap {
    width: 3.4rem;
    height: 3.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    font-size: var(--icon-size);
    color: var(--clr-default);
    transition: transform .22s ease, color .22s ease;
}

.nav-card:hover .nav-card__icon-wrap {
    transform: scale(1.12) rotate(-4deg);
}

/* ── العنوان ── */
.nav-card__title {
    font-size: .82rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
    line-height: 1.35;
}

/* ── شارة التنبيه ── */
.nav-card__badge {
    position: absolute;
    top: .55rem;
    left: .55rem;
    color: var(--clr-action);
    font-size: 1rem;
    animation: pulse-badge 1.8s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%,100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .6;
        transform: scale(1.25);
    }
}

/* ════════════════════════════
           أنواع البطاقات الملونة
        ════════════════════════════ */
.nav-card--primary {
    border-bottom-color: var(--clr-primary);
}

    .nav-card--primary .nav-card__icon-wrap {
        color: var(--clr-primary);
    }

    .nav-card--primary::before {
        background: radial-gradient(circle at 50% 0%, rgba(59,130,246,.18) 0%, transparent 70%);
    }

.nav-card--search {
    border-bottom-color: var(--clr-search);
}

    .nav-card--search .nav-card__icon-wrap {
        color: var(--clr-search);
    }

    .nav-card--search::before {
        background: radial-gradient(circle at 50% 0%, rgba(16,185,129,.18) 0%, transparent 70%);
    }

.nav-card--action {
    border-bottom-color: var(--clr-action);
}

    .nav-card--action .nav-card__icon-wrap {
        color: var(--clr-action);
    }

    .nav-card--action::before {
        background: radial-gradient(circle at 50% 0%, rgba(245,158,11,.18) 0%, transparent 70%);
    }

.nav-card--logout {
    border-bottom-color: var(--clr-logout);
}

    .nav-card--logout .nav-card__icon-wrap {
        color: var(--clr-logout);
    }

    .nav-card--logout::before {
        background: radial-gradient(circle at 50% 0%, rgba(239,68,68,.18) 0%, transparent 70%);
    }



.hib-wrap {
    direction: rtl;
    overflow: hidden;
    flex-shrink: 0;
}

/* ── شريط الساعة والطقس ── */
.hib-top-strip {
    background: var(--primary, #298376);
    padding: 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hib-clock {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1.5px;
    font-family: 'Courier New', monospace;
}

.hib-weather-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.9);
    font-size: 12px;
}

.hib-w-emoji {
    font-size: 14px;
}

.hib-w-temp {
    font-weight: 600;
    color: #fff;
}

.hib-refresh {
    background: rgba(255,255,255,0.18);
    border: none;
    color: #fff;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.6;
    transition: background .15s;
}

    .hib-refresh:hover {
        background: rgba(255,255,255,0.3);
    }

/* ── شريط المدينة ── */
.hib-city-strip {
    background: var(--primary-light, rgba(41,131,118,0.10));
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 0.5px solid var(--primary-light, rgba(41,131,118,0.15));
}

.hib-city-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary, #298376);
    flex-shrink: 0;
}

.hib-city-text {
    font-size: 11px;
    color: var(--primary-dark, #1F6F63);
    font-weight: 500;
    flex: 1;
}

.hib-spinner {
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--primary-light, rgba(41,131,118,.3));
    border-top-color: var(--primary, #298376);
    border-radius: 50%;
    animation: hib-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes hib-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── شريط الصلاة أفقي ── */
.hib-prayers-strip {
    background: var(--icon-soft, #f8fbfa);
    padding: 5px 8px;
    display: flex;
    gap: 2px;
    justify-content: space-between;
    border-bottom: 0.5px solid var(--primary-light, rgba(41,131,118,0.12));
}

.hib-p-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 3px 2px;
    border-radius: 6px;
    position: relative;
}

.hib-p-next {
    background: var(--primary-light, rgba(41,131,118,0.12));
    border: 0.5px solid var(--primary, rgba(41,131,118,0.3));
}

.hib-p-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffd54f;
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(50%);
}

.hib-p-name {
    font-size: 9px;
    color: #777;
    margin-top: 5px;
    margin-bottom: 1px;
}

.hib-p-next .hib-p-name {
    color: var(--primary-dark, #1F6F63);
    font-weight: 600;
}

.hib-p-time {
    font-size: 10px;
    font-weight: 500;
    color: var(--primary, #298376);
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
}

.hib-p-next .hib-p-time {
    color: var(--primary-dark, #0f6e56);
    font-weight: 700;
}