/* ===== Base ===== */
html {
    font-size: 16px;
}

* {
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.8;
    /* color: #212529; */
}

/* ===== Headings ===== */
h1 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
}

h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
}

h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
}

h4 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
}

h5 {
    font-size: 18px;
    font-weight: 600;
}

h6 {
    font-size: 16px;
    font-weight: 600;
}

/* ===== Text ===== */
p,
span,
div,
label {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.8;
}

/* ===== Small Text ===== */
small {
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
}

/* ===== Links ===== */
a {
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ===== Buttons ===== */
button,
.btn {
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
}

/* ===== Inputs ===== */
input,
textarea,
select {
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 500;
}

/* ===== Tables ===== */
table {
    font-size: 15px;
}

th {
    font-weight: 700;
}

td {
    font-weight: 500;
}

/* ===== Lists ===== */
ul,
ol,
li {
    font-size: 15px;
    font-weight: 500;
}

/* ===== Cards / Dialogs ===== */
.MuiCard-root,
.MuiDialog-root {
    font-family: 'Cairo', sans-serif;
}



.container-custom {
    width: 90%;
    margin: auto;
    display: flex;
}

.package-card {
    border: 2px solid #ddd;
    border-radius: 10px;
}

.package-card:hover {
    border-color: #7b2ff7;
    box-shadow: 0 0 10px rgba(123, 47, 247, 0.2);
}

.package-card.selected {
    border-color: #7b2ff7 !important;
    box-shadow: 0 0 8px rgba(123, 47, 247, 0.5);
}

#nprogress .bar {
    top: 70px !important;
    /* حسب ارتفاع navbar */
}

.filter-soft-shadow {
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.05) !important;
}

/* ===== Dashboard Analytics Theme ===== */
.analytics-hero {
    border-radius: 18px;
    padding: 22px 20px;
    color: #fff;
    background: linear-gradient(135deg, #a07b1e 0%, #c09a2c 40%, #8e6b12 100%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
    position: relative;
    overflow: hidden;
}

.analytics-hero::after {
    content: "";
    position: absolute;
    inset: -40px -60px auto auto;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, .12);
    border-radius: 40px;
    transform: rotate(18deg);
}

.analytics-hero .subtitle {
    opacity: .9;
    font-size: 14px;
}

.analytics-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
}

.kpi-card {
    border-radius: 16px;
    border: 0;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
    padding: 14px;
    height: 100%;
    position: relative;
}

.kpi-top-badge {
    position: absolute;
    top: 10px;
    left: 12px;
    /* RTL هتظبطها لو عايز right */
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #f1f5f9;
    color: #334155;
}

.kpi-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
}

.kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex: 0 0 auto;
    box-shadow: 0 10px 18px rgba(0, 0, 0, .12);
}

.kpi-title {
    font-size: 13px;
    color: #475569;
    margin: 0;
}

.kpi-value {
    font-size: 22px;
    font-weight: 800;
    margin: 4px 0 0 0;
    color: #0f172a;
}

.kpi-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

.chart-card .card-body {
    padding: 16px;
}

.card-title-strong {
    font-weight: 800;
    margin-bottom: 10px;
}

.analytics-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-soft {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
}

.btn-soft:hover {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.select-soft {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
}

.select-soft option {
    color: #111;
}

@media (max-width: 576px) {
    .analytics-hero {
        padding: 16px 14px;
    }

    .kpi-value {
        font-size: 20px;
    }

    .kpi-top-badge {
        left: 10px;
    }
}


.hero {
    min-height: 100svh;
    /* stable viewport height */
    min-height: 100dvh;
    /* dynamic viewport height */
}

.hero {
    height: calc(var(--vh, 1vh) * 100);
}

.flex-child {
    min-height: 0;
    min-width: 0;
}

input,
select,
textarea {
    font-size: 16px;
}

.header {
    padding-top: env(safe-area-inset-top);
}

.footer {
    padding-bottom: env(safe-area-inset-bottom);
}

.blur {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* مهم جدًا مع Safari */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* لو عندك row للفورم معمول flex */
.form-row,
.form-group,
.field-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* خلّي عنصر الإدخال يتمدد */
.form-row input,
.form-row select,
.form-row textarea,
.form-group input,
.form-group select,
.form-group textarea,
.field-row input,
.field-row select,
.field-row textarea {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    /* دي بتصلّح flex في iOS */
    -webkit-appearance: none;
    appearance: none;
}

/* على الشاشات الصغيرة: خليها عمودي */
@media (max-width: 768px) {

    .form-row,
    .form-group,
    .field-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row label,
    .form-group label,
    .field-row label {
        width: 100%;
    }
}

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    padding-left: 42px;
}

/* لو العين على الشمال */
.password-wrap .eye {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.page {
    min-height: calc(var(--vh, 1vh) * 100);
}

/* iOS Safari fixes */
@supports (-webkit-touch-callout: none) {

    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    /* أهم حاجتين للفلكس على iOS */
    .row>*,
    .d-flex>* {
        min-width: 0;
        min-height: 0;
    }

    input,
    select,
    textarea,
    button {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 12px;
        /* اختياري */
    }

    /* منع zoom التلقائي في inputs */
    input,
    select,
    textarea {
        font-size: 16px;
    }

    /* لو فيه overflow غريب */
    body {
        -webkit-text-size-adjust: 100%;
    }
}

@supports (-webkit-touch-callout: none) {

    .form-group,
    .form-row,
    .input-group {
        display: flex;
        flex-direction: column;
        /* الموبايل: عمودي */
        align-items: stretch;
        gap: 10px;
    }

    .form-group input,
    .form-row input,
    .input-group input,
    .form-group select,
    .form-row select,
    .input-group select,
    .form-group textarea,
    .form-row textarea,
    .input-group textarea {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
    }
}

@supports (-webkit-touch-callout: none) {
    .password-wrap {
        position: relative;
        width: 100%;
    }

    .password-wrap input {
        padding-inline-start: 44px;
    }

    /* مناسب RTL/LTR */
    .password-wrap .eye {
        position: absolute;
        inset-inline-start: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }
}


.booking-card {
    transition: all .25s ease;
}

.booking-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
}

.booking-actions {
    opacity: 0;
    transform: translateY(6px);
    transition: all .25s ease;
}

.booking-card:hover .booking-actions {
    opacity: 1;
    transform: translateY(0);
}

.filter-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1045;
    border-radius: 999px;
    min-height: 52px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.filter-fab i {
    font-size: 18px;
}

.filter-fab-badge {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.filter-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.filter-popup-card {
    width: 100%;
    max-width: 980px;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    animation: filterPopupShow 0.2s ease;
}

.filter-popup-header {
    padding: 18px 20px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.filter-popup-body {
    padding: 20px;
}

.filter-popup-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    border-top: 1px solid #eef2f7;
    margin-top: 20px;
    padding-top: 16px;
    flex-wrap: wrap;
}

@keyframes filterPopupShow {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .filter-fab {
        right: 14px;
        bottom: 14px;
        min-height: 48px;
        padding: 0 14px;
    }

    .filter-fab span {
        font-size: 14px;
    }

    .filter-popup-card {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 16px;
    }

    .filter-popup-header,
    .filter-popup-body {
        padding: 16px;
    }

    .filter-popup-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-popup-footer .ms-auto {
        margin-left: 0 !important;
        width: 100%;
    }

    .filter-popup-footer .ms-auto .btn,
    .filter-popup-footer>.btn {
        width: 100%;
    }
}