html[dir="rtl"] body,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] p,
html[dir="rtl"] a,
html[dir="rtl"] label,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] optgroup,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[dir="rtl"] table,
html[dir="rtl"] th,
html[dir="rtl"] td,
html[dir="rtl"] .navbar,
html[dir="rtl"] .sidebar,
html[dir="rtl"] .nav-link,
html[dir="rtl"] .dropdown-item,
html[dir="rtl"] .badge,
html[dir="rtl"] .card,
html[dir="rtl"] .modal,
html[dir="rtl"] .form-control,
html[dir="rtl"] .select2-container,
html[dir="rtl"] .bootstrap-table,
html[dir="rtl"] .pagination,
html[dir="rtl"] .swal2-container,
html[dir="rtl"] .jq-toast-wrap {
    font-family: "Cairo", sans-serif !important;
}

/* Keep the login card aligned while its content follows RTL direction. */
html[dir="rtl"] body.bg-image {
    overflow-x: hidden;
}

html[dir="rtl"] body.bg-image .overlay {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
}

html[dir="rtl"] .login-layout-row {
    direction: ltr;
    justify-content: flex-end;
}

html[dir="rtl"] .login-leading-spacer,
html[dir="rtl"] .login-trailing-spacer {
    display: none;
}

html[dir="rtl"] .login-form-column {
    direction: rtl;
}

html[dir="rtl"] .login-form-column .auth-form-light {
    width: auto;
    height: auto;
    overflow: hidden;
    border-radius: 10px;
    text-align: right !important;
}

@media (max-width: 767.98px) {
    html[dir="rtl"] .login-form-column .auth-form-light {
        width: 100%;
        padding: 2rem !important;
    }
}
